@tachybase/plugin-form-design 1.3.23 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(ue,C){typeof exports=="object"&&typeof module!="undefined"?C(exports,require("@tachybase/client"),require("react/jsx-runtime"),require("react"),require("@tachybase/schema"),require("lodash"),require("antd-style"),require("antd"),require("@tego/client"),require("@dnd-kit/core"),require("@ant-design/icons"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","react/jsx-runtime","react","@tachybase/schema","lodash","antd-style","antd","@tego/client","@dnd-kit/core","@ant-design/icons","react-dom"],C):(ue=typeof globalThis!="undefined"?globalThis:ue||self,C(ue["@tachybase/plugin-form-design"]={},ue["@tachybase/client"],ue.jsxRuntime,ue.react,ue["@tachybase/schema"],ue.lodash,ue["antd-style"],ue.antd,ue["@tego/client"],ue["@dnd-kit/core"],ue["@ant-design/icons"],ue["react-dom"]))})(this,function(ue,C,D,V,A,se,We,oe,he,xe,Me,Fc){"use strict";var id=Object.defineProperty,cd=Object.defineProperties;var ud=Object.getOwnPropertyDescriptors;var Ot=Object.getOwnPropertySymbols;var xc=Object.prototype.hasOwnProperty,gc=Object.prototype.propertyIsEnumerable;var _c=(ue,C,D)=>C in ue?id(ue,C,{enumerable:!0,configurable:!0,writable:!0,value:D}):ue[C]=D,k=(ue,C)=>{for(var D in C||(C={}))xc.call(C,D)&&_c(ue,D,C[D]);if(Ot)for(var D of Ot(C))gc.call(C,D)&&_c(ue,D,C[D]);return ue},W=(ue,C)=>cd(ue,ud(C));var En=(ue,C)=>{var D={};for(var V in ue)xc.call(ue,V)&&C.indexOf(V)<0&&(D[V]=ue[V]);if(ue!=null&&Ot)for(var V of Ot(ue))C.indexOf(V)<0&&gc.call(ue,V)&&(D[V]=ue[V]);return D};var ie=(ue,C,D)=>new Promise((V,A)=>{var se=he=>{try{oe(D.next(he))}catch(xe){A(xe)}},We=he=>{try{oe(D.throw(he))}catch(xe){A(xe)}},oe=he=>he.done?V(he.value):Promise.resolve(he.value).then(se,We);oe((D=D.apply(ue,C)).next())});const jn=V.createContext(null),Sc=({children:e,editableSchemaSettingsManager:t})=>D.jsx(jn.Provider,{value:{editableSchemaSettingsManager:t},children:e}),In=()=>{const e=V.useContext(jn);if(!e)throw new Error("useEditableSchemaSettingsManager must be used within EditableSchemaSettingsProvider");return e.editableSchemaSettingsManager};class Pc{constructor(t=[],o){this._schemaSettings=t,this.app=o,this.schemaSettings={},this.actionList={},this.app=o,this.add(...t)}add(...t){t.forEach(o=>{this.schemaSettings[o.name]=o,Array.isArray(this.actionList[o.name])&&(this.actionList[o.name].forEach(f=>{o[f.type](f.itemName,f.data)}),this.actionList[o.name]=void 0)})}addItem(t,o,f){const r=this.get(t);r?r.add(o,f):(this.actionList[t]||(this.actionList[t]=[]),this.actionList[t].push({type:"add",itemName:o,data:f}))}get(t){return this.schemaSettings[t]}getAll(){return this.schemaSettings}has(t){return!!this.get(t)}remove(t){delete this.schemaSettings[t]}removeItem(t,o){const f=this.get(t);f?f.remove(o):(this.actionList[t]||(this.actionList[t]=[]),this.actionList[t].push({type:"remove",itemName:o}))}}class ye{get items(){return this.options.items}constructor(t){this.options=Object.assign({items:[]},t),this.name=t.name}add(t,o){const f=t.split("."),r=W(k({},o),{name:f[f.length-1]});if(f.length===1){const F=this.items.findIndex(_=>_.name===t);F===-1?this.items.push(r):this.items[F]=r;return}const b=f.slice(0,-1).join("."),v=this.get(b);if(v){v.children||(v.children=[]);const F=v.children.findIndex(_=>_.name===t);F===-1?v.children.push(r):v.children[F]=r}}get(t){const o=t.split(".");let f=this.items;for(let r=0;r<o.length;r++){const b=o[r];if(f=f.find(v=>v.name===b),!f||r===o.length-1)return f;if(f.children)f=f.children;else return}return f}remove(t){const o=t.split(".");if(o.length===1){const r=this.items.findIndex(b=>b.name===o[0]);r!==-1&&this.items.splice(r,1);return}const f=this.get(o.slice(0,-1).join("."));if(f&&f.children){const r=o[o.length-1],b=f.children.findIndex(v=>v.name===r);b!==-1&&f.children.splice(b,1)}}}const Oc="formDesign".toLowerCase(),An="form-design";function Z(){return C.useTranslation([An,"core"],{nsMode:"fallback"})}const Cc=(e,t={ns:An})=>C.tval(e,t),wc=new ye({name:"editableFieldSettings:component:CascadeSelect",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useFieldModeOptions(),r=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:f,onChange:v=>{o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].mode=v,o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=v,C.isSubMode(o)&&r&&(o.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"titleField",useSchema(){var b,v;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useTitleFieldOptions(),r=C.useCollectionField();return{type:"string",title:'{{t("Title field")}}',default:(v=(b=t==null?void 0:t.componentProps)==null?void 0:b.fieldNames)==null?void 0:v.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:f,onChange(F){var n,u;o["x-uid"];const _=W(k(k({},(u=(n=r==null?void 0:r.uiSchema)==null?void 0:n["x-component-props"])==null?void 0:u.fieldNames),t.componentProps.fieldNames),{label:F});o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].fieldNames=_,o["x-component-props"],t.componentProps.fieldNames=o["x-component-props"].fieldNames}}}}}]}),Ec=new ye({name:"editableFieldSettings:component:Cascader",items:[{name:"fieldComponent",useVisible:C.useIsAssociationField,useSchema(){const{t:e}=Z(),t=A.useField(),{fieldSchema:o,collectionField:f}=C.useColumnSchema(),r=A.useFieldSchema(),b=o||r,v=C.useFieldModeOptions({fieldSchema:o,collectionField:f}),F=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:v,allowClear:!1,showSearch:!1,onChange(n){var u,h;b["x-uid"],b["x-component-props"]=b["x-component-props"]||{},b["x-component-props"].mode=n,b["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=n,C.isSubMode(b)&&F&&(b.default=null,(u=t==null?void 0:t.setInitialValue)==null||u.call(t,null),(h=t==null?void 0:t.setValue)==null||h.call(t,null))}}}}},{name:"setTheDataScope",useVisible(){return!C.useIsFieldReadPretty()},useSchema(){var y,m,g;const{getCollectionJoinField:e,getAllCollectionsInheritChain:t}=C.useCollectionManager_deprecated(),{getField:o}=C.useCollection_deprecated(),{t:f}=Z(),{form:r}=C.useFormBlockContext(),b=C.useRecord(),v=A.useField(),{fieldSchema:F,collectionField:_}=C.useColumnSchema(),n=A.useFieldSchema(),u=F||n,{isInSubForm:h,isInSubTable:s}=C.useFlag()||{},a=_||o(u.name)||e(u["x-collection-field"]),l=C.useVariables(),i=C.useLocalVariables(),{getFields:c}=C.useCollectionFilterOptionsV2(a==null?void 0:a.target),p=x=>D.jsx(C.VariableInput,W(k({},x),{form:r,collectionField:x.collectionField,record:b,shouldChange:C.getShouldChange({collectionField:x.collectionField,variables:l,localVariables:i,getAllCollectionsInheritChain:t})})),d=A.createForm({initialValues:{filter:((g=(m=(y=u==null?void 0:u["x-component-props"])==null?void 0:y.service)==null?void 0:m.params)==null?void 0:g.filter)||{}}});return{type:"object",title:f("Set the data scope"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:f("Set the data scope"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:d},properties:{filter:{enum:c(),"x-decorator":x=>D.jsx(C.BaseVariableProvider,W(k({},x),{children:D.jsx(C.FlagProvider,{isInSubForm:h,isInSubTable:s,children:x.children})})),"x-decorator-props":{isDisabled:jc},"x-component":"Filter","x-component-props":{collectionName:a==null?void 0:a.target,dynamicComponent:p}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const x=A.useForm(),P=C.useActionContext();return{onClick(){return ie(this,null,function*(){var E,R,N,L;let j=x.values.filter;j=C.removeNullCondition(j),se.set(v.componentProps,"service.params.filter",j);const O=(E=u["x-component-props"])==null?void 0:E.service;O?O.params.filter=j:u["x-component-props"].service={params:{filter:k({},j)}};const w=u["x-component-props"],I=(N=v.path)==null?void 0:N.splice(((R=v.path)==null?void 0:R.length)-1,1);v.form.query(`${I.concat("*."+u.name)}`).forEach(K=>{K.componentProps=w}),(L=P==null?void 0:P.setVisible)==null||L.call(P,!1)})}}}}}}}}}}}},{name:"setDefaultSortingRules",useVisible(){return!C.useIsFieldReadPretty()},useSchema(){var s,a,l;const e=A.useField(),{t}=Z(),o=A.useFieldSchema(),{getField:f}=C.useCollection_deprecated(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),{columnSchema:b}=C.useColumnSchema(),v=b!=null?b:o,F=f(v.name)||r(v["x-collection-field"]),_=C.useSortFields(F==null?void 0:F.target),n=((l=(a=(s=v["x-component-props"])==null?void 0:s.service)==null?void 0:a.params)==null?void 0:l.sort)||[],u=n==null?void 0:n.map(i=>i!=null&&i.startsWith("-")?{field:i.substring(1),direction:"desc"}:{field:i,direction:"asc"}),h=A.createForm({initialValues:{sort:u}});return{type:"object",title:t("Set default sorting rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:t("Set default sorting rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:h},properties:{sort:{type:"array","x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:_,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260},optionLabelProp:"fullLabel"}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:t("ASC"),value:"asc"},{label:t("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:t("Add sort field"),"x-component":"ArrayItems.Addition"}}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const i=A.useForm(),c=C.useActionContext();return{onClick(){return ie(this,null,function*(){var P,S,j,O,w,I,E,R;const y=i.values.sort.map(N=>N.direction==="desc"?`-${N.field}`:N.field);se.set(e.componentProps,"service.params.sort",y);const m=(P=v["x-component-props"])==null?void 0:P.service;m?m.params.sort=(j=(S=e.componentProps)==null?void 0:S.service.params)==null?void 0:j.sort:v["x-component-props"].service={params:{sort:(w=(O=e.componentProps)==null?void 0:O.service.params)==null?void 0:w.sort}};const g=v["x-component-props"],x=(E=e.path)==null?void 0:E.splice(((I=e.path)==null?void 0:I.length)-1,1);e.form.query(`${x.concat("*."+v.name)}`).forEach(N=>{N.componentProps=g}),(R=c==null?void 0:c.setVisible)==null||R.call(c,!1)})}}}}}}}}}}}},{name:"titleField",useVisible:C.useIsAssociationField,useSchema(){var s,a,l,i;const{t:e}=Z(),t=A.useField(),o=C.useTitleFieldOptions(),{uiSchema:f,fieldSchema:r,collectionField:b}=C.useColumnSchema(),v=A.useFieldSchema(),F=r||v,_=C.useCollectionField(),n=b||_,{getCollectionFields:u}=C.useCollectionManager_deprecated(),h=k(k(k({},(a=(s=n==null?void 0:n.uiSchema)==null?void 0:s["x-component-props"])==null?void 0:a.fieldNames),(l=t==null?void 0:t.componentProps)==null?void 0:l.fieldNames),(i=F==null?void 0:F["x-component-props"])==null?void 0:i.fieldNames);return{type:"string",title:'{{t("Title field")}}',default:h==null?void 0:h.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:o,allowClear:!1,showSearch:!1,onChange(c){var m,g,x,P,S;F["x-uid"];const p=W(k(k({},(g=(m=n==null?void 0:n.uiSchema)==null?void 0:m["x-component-props"])==null?void 0:g.fieldNames),(x=F["x-component-props"])==null?void 0:x.fieldNames),{label:c});F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].fieldNames=p;const d=u(n.target).find(j=>j.name===c);d.interface==="m2o"?F["x-component-props"]["x-next-title"]={label:c,collection:d.collectionName}:F["x-component-props"]["x-next-title"]=null,F["x-component-props"],t.componentProps.fieldNames=F["x-component-props"].fieldNames;const y=(S=t.path)==null?void 0:S.splice(((P=t.path)==null?void 0:P.length)-1,1);t.form.query(`${y.concat("*."+F.name)}`).forEach(j=>{j.componentProps.fieldNames=p})}}}}},{name:"changeOnSelect",useVisible:C.useIsAssociationField,useSchema(){var v;const{t:e}=Z(),{fieldSchema:t,collectionField:o}=C.useColumnSchema(),f=A.useField(),r=A.useFieldSchema(),b=t||r;return{type:"boolean",default:!!((v=b==null?void 0:b["x-component-props"])!=null&&v.changeOnSelect),"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Chang on Parent")}}',"x-component-props":{onInput(F){var n,u;const _=(u=(n=F==null?void 0:F.target)==null?void 0:n.checked)!=null?u:!1;b["x-component-props"]=b["x-component-props"]||{},f.componentProps=f.componentProps||{},b["x-component-props"].changeOnSelect=_,f.componentProps.changeOnSelect=_}}}}}]});function jc(e){var r,b;const{option:t,collectionField:o,uiSchema:f}=e;return!f||!o?!0:o.interface==="json"||t.target?!1:["input","markdown","richText","textarea","username"].includes(o.interface)?!["string","number"].includes((r=t.schema)==null?void 0:r.type):o.interface&&t.interface?o.interface!==t.interface:(f==null?void 0:f["x-component"])!==((b=t.schema)==null?void 0:b["x-component"])}const Ic=new ye({name:"editableFieldSettings:component:Checkbox",items:[{name:"fieldComponent",useSchema(){var v;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f,b=[{label:e("Checkbox"),value:"Checkbox"},{label:e("Radio group"),value:"Radio group"}];return{type:"string",title:'{{t("Field component")}}',default:((v=r["x-component-props"])==null?void 0:v.mode)||"Checkbox","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:b,onChange(F){r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].mode=F,r["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=F}}}}}]});function rt(e){return new Dc(e)}const Dn=e=>{e["x-uid"]||(e["x-uid"]=A.uid()),Object.keys(e.properties||{}).forEach(t=>{Dn(e.properties[t])})},lt=e=>e,Ac=(e,t)=>{if(!(!e||!t)){for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&t[o]!==(e==null?void 0:e[o]))return!1;return!0}},Ct=(e,t)=>{if(e["x-uid"]&&e["x-uid"]===t["x-uid"])return[null,e.toJSON()];const o=e.toJSON(),f=W(k({},o),{properties:{}});let r=null;const b=(v,F)=>{Object.keys(v||{}).forEach(_=>{const n=v[_];if(n["x-uid"]===t["x-uid"]){r=v[_];return}else F.properties[_]=W(k({},n),{properties:{}}),b(n==null?void 0:n.properties,F.properties[_])})};return b(o.properties,f),[f,r]};class Dc{constructor(t){this.events={},this.options=t,this.current=t.current}get model(){return this.options.model}get query(){return this.options.query}loadClientSchemaEvents(){const t=o=>{if(!o)return;const f=Object.values(o.properties).length;o.mapProperties(r=>{r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].width=100/f})};this.on("insertAdjacent",({current:o,position:f,schema:r,wrap:b,wrapped:v,removed:F})=>{(v==null?void 0:v["x-component"])==="Grid.Col"&&t(v.parent),(F==null?void 0:F["x-component"])==="Grid.Col"&&t(F.parent),this.refresh()}),this.on("remove",({removed:o})=>{(o==null?void 0:o["x-component"])==="Grid.Col"&&t(o.parent),this.refresh()})}prepareProperty(t){t.type||(t.type="void"),t.name||(t.name=A.uid()),this.current["x-uid"]&&Dn(t)}on(t,o){this.events[t]||(this.events[t]=[]),this.events[t].push(o)}emit(t,...o){return ie(this,null,function*(){if(!this.events[t])return;const[f,...r]=o;return Promise.all(this.events[t].map(b=>b.bind(this)(k({current:this.current},f),...r)))})}parentsIn(t){if(!t||!A.Schema.isSchemaInstance(t))return!1;let o=this.current;for(;o!=null&&o.parent;){if(o.parent===t)return!0;o=o.parent}return!1}refresh(){const{refresh:t}=this.options;return t==null?void 0:t()}deepMerge(t){const o={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly"},f={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(t).forEach(r=>{o[r]?(this.current[r]=t[r],this.updateModel(o[r],t[r])):f[r]?Object.keys(t[r]).forEach(b=>{se.set(this.current,[r,b],t[r][b]),this.updateModel([f[r],b],t[r][b])}):this.current[r]=t[r]}),this.refresh()}getSchemaAttribute(t,o){return se.get(this.current,t,o)}shallowMerge(t){const o={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly","x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(t).forEach(f=>{this.current[f]=t[f],o[f]&&this.updateModel(o[f],t[f])}),this.refresh()}updateModel(t,o){const f=r=>{se.set(r,t,o)};this.model&&f(this.model),this.query&&this.query.take(f)}insertAdjacent(t,o,f={}){switch(t){case"beforeBegin":return this.insertBeforeBegin(o,f);case"afterBegin":return this.insertAfterBegin(o,f);case"beforeEnd":return this.insertBeforeEnd(o,f);case"afterEnd":return this.insertAfterEnd(o,f)}}recursiveRemoveIfNoChildren(t,o){if(!t)return;let f=t,r;const b=o==null?void 0:o.breakRemoveOn;for(;f;){if(typeof b=="function"){if(b(f))break}else if(Ac(f,b))break;if(Object.keys(f.properties||{}).length>0)break;f.parent&&(r=f.parent.removeProperty(f.name)),f=f.parent}return r}remove(t,o={}){const{breakRemoveOn:f,removeParentsIfNoChildren:r}=o,b=t||this.current;b.parent.removeProperty(b.name),r&&this.recursiveRemoveIfNoChildren(b.parent,{breakRemoveOn:f}),this.refresh()}removeWithoutEmit(t,o={}){const{breakRemoveOn:f,removeParentsIfNoChildren:r}=o,b=t||this.current;let v=b.parent.removeProperty(b.name);if(r){const F=this.recursiveRemoveIfNoChildren(b.parent,{breakRemoveOn:f});F&&(v=F)}return v}insertBeforeBeginOrAfterEnd(t,o={}){if(!A.Schema.isSchemaInstance(this.current)||!A.Schema.isSchemaInstance(t)||this.current.parent!==t.parent)return;let f=0,r=0;return this.current.parent.mapProperties((b,v,F)=>{this.current.name===v&&(r=F),t.name===v&&(f=F)}),f>r?this.insertBeforeBegin(t,o):this.insertAfterEnd(t,o)}insertBeforeBegin(t,o={}){if(!A.Schema.isSchemaInstance(this.current))return;o.onSuccess;const{wrap:f=lt,breakRemoveOn:r,removeParentsIfNoChildren:b}=o;if(A.Schema.isSchemaInstance(t)){if(this.parentsIn(t)){this.refresh();return}t.parent.removeProperty(t.name),b&&this.recursiveRemoveIfNoChildren(t.parent,{breakRemoveOn:r})}else t&&(t=se.cloneDeep(t));const v={};let F=!1,_=0,n=0;this.current.parent.mapProperties((s,a)=>{a===this.current.name&&(n=_,F=!0,++_),s["x-index"]=_,++_,F&&(v[a]=s,this.current.parent.removeProperty(a))}),this.prepareProperty(t);const u=f(t),h=this.current.parent.addProperty(u.name||A.uid(),u);h["x-index"]=n,h.parent=this.current.parent,this.current.parent.setProperties(v),this.refresh()}insertAfterBegin(t,o={}){if(!A.Schema.isSchemaInstance(this.current))return;o.onSuccess;const{wrap:f=lt,breakRemoveOn:r,removeParentsIfNoChildren:b}=o;if(A.Schema.isSchemaInstance(t)){if(this.parentsIn(t)){this.refresh();return}t.parent.removeProperty(t.name),b&&this.recursiveRemoveIfNoChildren(t.parent,{breakRemoveOn:r})}else t&&(t=se.cloneDeep(t));const v={};let F=1;this.current.mapProperties((s,a)=>{s["x-index"]=F,++F,v[a]=s}),this.current.properties={},this.prepareProperty(t);const _=f(t),n=this.current.addProperty(_.name||A.uid(),_);n["x-index"]=0,n.parent=this.current,this.current.setProperties(v);const[u,h]=Ct(n,t);this.refresh()}insertBeforeEnd(t,o={}){if(!A.Schema.isSchemaInstance(this.current))return;delete t["x-index"],o.onSuccess;const{wrap:f=lt,breakRemoveOn:r,removeParentsIfNoChildren:b}=o;if(A.Schema.isSchemaInstance(t)){if(this.parentsIn(t)){this.refresh();return}t.parent.removeProperty(t.name),b&&this.recursiveRemoveIfNoChildren(t.parent,{breakRemoveOn:r})}else t&&(t=se.cloneDeep(t));this.prepareProperty(t);const v=f(t),F=this.current.addProperty(v.name||A.uid(),v);F.parent=this.current;const[_,n]=Ct(F,t);this.refresh()}insertAfterEnd(t,o={}){if(!A.Schema.isSchemaInstance(this.current))return;o==null||o.onSuccess;const{wrap:f=lt,breakRemoveOn:r,removeParentsIfNoChildren:b}=o;let v=0,F=0,_=!1;const n={};if(this.current.parent.mapProperties((l,i)=>{l["x-index"]=v,i===this.current.name&&(++v,F=v,_=!0),++v,_&&i!==this.current.name&&(n[i]=l,this.current.parent.removeProperty(i))}),A.Schema.isSchemaInstance(t)){if(this.parentsIn(t)){this.refresh();return}t.parent.removeProperty(t.name),b&&this.recursiveRemoveIfNoChildren(t.parent,{breakRemoveOn:r}),t.parent=null}else t&&(t=se.cloneDeep(t));this.prepareProperty(t);const u=f(t),h=this.current.parent.addProperty(u.name||A.uid(),u);h.parent=this.current.parent,h["x-index"]=F,this.current.parent.setProperties(n);const[s,a]=Ct(h,t);this.refresh()}}function pt(){const{designable:e,setDesignable:t,refresh:o,reset:f}=V.useContext(C.SchemaComponentContext),r=V.useContext(A.SchemaOptionsContext),b=V.useMemo(()=>(r==null?void 0:r.components)||{},[r]),v=V.useMemo(()=>()=>D.jsx(D.Fragment,{}),[]),F=A.useField(),_=A.useFieldSchema(),n=C.useAPIClient(),{t:u}=Z(),h=V.useMemo(()=>rt({t:u,api:n,refresh:o,current:_,model:F}),[u,n,o,_,F]);return{dn:h,designable:e,reset:f,refresh:o,setDesignable:t,DesignableBar:v,findComponent:V.useCallback(s=>s?typeof s!="string"?s:se.get(b,s):null,[se.get]),patch:V.useCallback((s,a)=>{const l=i=>{Object.keys(i).forEach(c=>{const p=i[c];c==="title"&&(F.title=p,_.title=p),c==="x-decorator-props"&&(F.decoratorProps||(F.decoratorProps={}),_["x-decorator-props"]||(_["x-decorator-props"]={}),Object.keys(p).forEach(d=>{F.decoratorProps[d]=p[d],_["x-decorator-props"][d]=p[d]})),c==="x-component-props"&&(F.componentProps||(F.componentProps={}),_["x-component-props"]||(_["x-component-props"]={}),Object.keys(p).forEach(d=>{F.componentProps[d]=p[d],_["x-component-props"][d]=p[d]}))})};if(typeof s=="string"){const i={};return se.set(i,s,a),l(i)}l(s),o()},[h]),shallowMerge:V.useCallback(s=>{h.shallowMerge(s)},[h]),deepMerge:V.useCallback(s=>{h.deepMerge(s)},[h]),remove:V.useCallback((s,a)=>{h.remove(s,a)},[h]),insertAdjacent:V.useCallback((s,a,l)=>{h.insertAdjacent(s,a,l)},[h]),insertBeforeBegin:V.useCallback(s=>{h.insertBeforeBegin(s)},[h]),insertAfterBegin:V.useCallback(s=>{h.insertAfterBegin(s)},[h]),insertBeforeEnd:V.useCallback(s=>{h.insertBeforeEnd(s)},[h]),insertAfterEnd:V.useCallback(s=>{h.insertAfterEnd(s)},[h])}}const Mc=new ye({name:"editableFieldSettings:component:CustomTitle",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=C.useIsAddNewForm(),f=C.useFieldComponentName(),r=C.useCollectionField(),{fieldSchema:b,collectionField:v}=C.useColumnSchema(),F=A.useFieldSchema(),_=b||F,n=C.useFieldModeOptions({fieldSchema:b,collectionField:v}),u=["select"].includes(r==null?void 0:r.interface),h=[{label:e("Select"),value:"Select"},{label:e("Radio group"),value:"Radio group"}];return{type:"string",title:'{{t("Field component")}}',default:f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:u?h:n,onChange:s=>{var a,l;_["x-uid"],_["x-component-props"]=_["x-component-props"]||{},_["x-component-props"].mode=s,_["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=s,C.isSubMode(_)&&o&&(_.default=null,(a=t==null?void 0:t.setInitialValue)==null||a.call(t,null),(l=t==null?void 0:t.setValue)==null||l.call(t,null))}}}},useVisible:C.useIsMuiltipleAble},{name:"customTitle",useVisible:C.useIsMuiltipleAble,useSchema(){var _,n;const e=A.useFieldSchema(),{fieldSchema:t}=C.useColumnSchema(),o=t||e,{t:f}=Z(),r=C.useFormulaTitleOptions(),b=(n=(_=o["x-component-props"])==null?void 0:_.fieldNames)==null?void 0:n.formula,v=A.useField(),F=A.createForm({initialValues:{formula:b}});return{type:"object",title:f("Custom option label"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:f("Custom option label"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:F},properties:{formula:{required:!0,"x-decorator":"FormItem","x-component":"Variable.TextArea","x-component-props":{scope:r}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const u=A.useForm(),h=C.useActionContext();return{onClick(){return ie(this,null,function*(){var l,i,c;let a=u.values.formula;if(a){const p=W(k({},o["x-component-props"]),{fieldNames:W(k({},(l=o["x-component-props"])==null?void 0:l.fieldNames),{formula:a})});v.componentProps=W(k({},v.componentProps),{fieldNames:W(k({},(i=v.componentProps)==null?void 0:i.fieldNames),{formula:a})}),o["x-component-props"]=p}(c=h==null?void 0:h.setVisible)==null||c.call(h,!1)})}}}}}}}}}}}},{name:"setTheDataScope",useSchema(){var d,y,m;const{t:e}=Z(),{getCollectionJoinField:t,getAllCollectionsInheritChain:o}=C.useCollectionManager_deprecated(),{getField:f}=C.useCollection_deprecated(),{form:r}=C.useFormBlockContext(),b=C.useRecord(),{fieldSchema:v,collectionField:F}=C.useColumnSchema(),_=A.useFieldSchema(),n=v||_,u=F||f(n.name)||t(n["x-collection-field"]),{getFields:h}=C.useCollectionFilterOptionsV2(u==null?void 0:u.target),{isInSubForm:s,isInSubTable:a}=C.useFlag()||{},l=C.useVariables(),i=C.useLocalVariables(),c=g=>D.jsx(C.VariableInput,W(k({},g),{form:r,collectionField:g.collectionField,record:b,shouldChange:C.getShouldChange({collectionField:g.collectionField,variables:l,localVariables:i,getAllCollectionsInheritChain:o})})),p=A.createForm({initialValues:{filter:((m=(y=(d=n==null?void 0:n["x-component-props"])==null?void 0:d.service)==null?void 0:y.params)==null?void 0:m.filter)||{}}});return{type:"object",title:e("Set the data scope"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Set the data scope"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:p},properties:{filter:{type:"object",enum:h(),"x-decorator":g=>D.jsx(C.BaseVariableProvider,W(k({},g),{children:D.jsx(C.FlagProvider,{isInSubForm:s,isInSubTable:a,children:g.children})})),"x-decorator-props":{isDisabled:Rc},"x-component":"Filter","x-component-props":{collectionName:u==null?void 0:u.target,dynamicComponent:c}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const g=A.useForm(),x=C.useActionContext();return{onClick(){return ie(this,null,function*(){var j;let S=g.values.filter;S=C.removeNullCondition(S),se.set(n["x-component-props"],"service.params.filter",S),(j=x==null?void 0:x.setVisible)==null||j.call(x,!1)})}}}}}}}}}}},useVisible(){const e=C.useIsSelectFieldMode(),t=C.useIsFieldReadPretty();return e&&!t}},{name:"setDefaultSortingRules",useSchema(){var u,h,s;const e=A.useField(),{t}=Z(),o=A.useFieldSchema(),{getField:f}=C.useCollection_deprecated(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),b=f(o.name)||r(o["x-collection-field"]),v=C.useSortFields(b==null?void 0:b.target),F=((s=(h=(u=o["x-component-props"])==null?void 0:u.service)==null?void 0:h.params)==null?void 0:s.sort)||[],_=F==null?void 0:F.map(a=>a!=null&&a.startsWith("-")?{field:a.substring(1),direction:"desc"}:{field:a,direction:"asc"}),n=A.createForm({initialValues:{sort:_}});return{type:"object",title:t("Set default sorting rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:t("Set default sorting rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:n},properties:{sort:{type:"array","x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:v,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260},optionLabelProp:"fullLabel"}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:t("ASC"),value:"asc"},{label:t("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:t("Add sort field"),"x-component":"ArrayItems.Addition"}}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const a=A.useForm(),l=C.useActionContext();return{onClick(){return ie(this,null,function*(){var d;const p=a.values.sort.map(y=>y.direction==="desc"?`-${y.field}`:y.field);e.query(new RegExp(`[0-9]+\\.${o.name}$`)).forEach(y=>{se.set(y,"componentProps.service.params.sort",p)}),se.set(o,"x-component-props.service.params.sort",p),e.componentProps=o["x-component-props"],(d=l==null?void 0:l.setVisible)==null||d.call(l,!1)})}}}}}}}}}}},useComponentProps(){const{fieldSchema:e}=C.useColumnSchema();return{fieldSchema:e}},useVisible(){const e=C.useIsSelectFieldMode(),t=C.useIsFieldReadPretty();return e&&!t}},{name:"quickCreate",useSchema(){var b;const{t:e}=Z(),t=C.useAPIClient(),o=A.useField(),f=A.useFieldSchema(),r=V.useMemo(()=>rt({t:e,api:t,current:f,model:o}),[e,t,f,o]);return{type:"string",title:'{{t("Quick create")}}',default:((b=o.componentProps)==null?void 0:b.addMode)||"none","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("None"),value:"none"},{label:e("Dropdown"),value:"quickAdd"},{label:e("Pop-up"),value:"modalAdd"}],onChange:v=>{if(v==="modalAdd"&&!f.reduceProperties((_,n)=>n["x-component"]==="Action"?n:_,null)){const _={"x-action":"create","x-acl-action":"create",title:"{{t('Add new')}}","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:addNew","x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{openMode:"drawer",type:"default",component:"CreateRecordAction"}};r.insertAdjacent("afterBegin",_)}f["x-uid"],f["x-component-props"]=f["x-component-props"]||{},f["x-component-props"].addMode=v,f["x-component-props"],o.componentProps=o.componentProps||{},o.componentProps.addMode=v}}}},useVisible(){const e=C.useIsAssociationField(),t=C.useIsFieldReadPretty(),{fieldSchema:o}=C.useColumnSchema();return e&&!o&&!t}},{name:"allowMultiple",useSchema(){var v;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f,{refresh:b}=pt();return{type:"boolean",default:((v=r["x-component-props"])==null?void 0:v.multiple)===void 0?!0:r["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput:F=>{var n,u;const _=(u=(n=F==null?void 0:F.target)==null?void 0:n.checked)!=null?u:!1;r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},t.componentProps=t.componentProps||{},r["x-component-props"].multiple=_,t.componentProps.multiple=_,r["x-component-props"],b()}}}},useVisible(){const e=C.useIsAssociationField(),t=C.useIsShowMultipleSwitch();return e&&t()}},{name:"enableLink",useSchema(){var v;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f,{refresh:b}=pt();return{type:"boolean",default:((v=r["x-component-props"])==null?void 0:v.enableLink)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Enable link")}}',"x-component-props":{onInput(F){var n,u;const _=(u=(n=F==null?void 0:F.target)==null?void 0:n.checked)!=null?u:!1;r["x-component-props"]=W(k({},r==null?void 0:r["x-component-props"]),{enableLink:_}),t.componentProps.enableLink=_,b()}}}},useVisible(){const e=C.useIsFieldReadPretty();return C.useIsAssociationField()&&e}}]});function Rc(e){var r,b;const{option:t,collectionField:o,uiSchema:f}=e;return!f||!o?!0:o.interface==="json"||t.target?!1:["input","markdown","richText","textarea","username"].includes(o.interface)?!["string","number"].includes((r=t.schema)==null?void 0:r.type):o.interface&&t.interface?o.interface!==t.interface:(f==null?void 0:f["x-component"])!==((b=t.schema)==null?void 0:b["x-component"])}const Nc=We.createStyles(({css:e})=>({radio:e`
1
+ (function(le,C){typeof exports=="object"&&typeof module!="undefined"?C(exports,require("@tachybase/client"),require("react/jsx-runtime"),require("react"),require("@tachybase/schema"),require("lodash"),require("antd-style"),require("antd"),require("@tego/client"),require("@dnd-kit/core"),require("@ant-design/icons"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","react/jsx-runtime","react","@tachybase/schema","lodash","antd-style","antd","@tego/client","@dnd-kit/core","@ant-design/icons","react-dom"],C):(le=typeof globalThis!="undefined"?globalThis:le||self,C(le["@tachybase/plugin-form-design"]={},le["@tachybase/client"],le.jsxRuntime,le.react,le["@tachybase/schema"],le.lodash,le["antd-style"],le.antd,le["@tego/client"],le["@dnd-kit/core"],le["@ant-design/icons"],le["react-dom"]))})(this,function(le,C,D,V,A,se,Ye,oe,he,ge,ke,Sc){"use strict";var cd=Object.defineProperty,ld=Object.defineProperties;var ud=Object.getOwnPropertyDescriptors;var Et=Object.getOwnPropertySymbols;var gc=Object.prototype.hasOwnProperty,Fc=Object.prototype.propertyIsEnumerable;var xc=(le,C,D)=>C in le?cd(le,C,{enumerable:!0,configurable:!0,writable:!0,value:D}):le[C]=D,T=(le,C)=>{for(var D in C||(C={}))gc.call(C,D)&&xc(le,D,C[D]);if(Et)for(var D of Et(C))Fc.call(C,D)&&xc(le,D,C[D]);return le},W=(le,C)=>ld(le,ud(C));var jn=(le,C)=>{var D={};for(var V in le)gc.call(le,V)&&C.indexOf(V)<0&&(D[V]=le[V]);if(le!=null&&Et)for(var V of Et(le))C.indexOf(V)<0&&Fc.call(le,V)&&(D[V]=le[V]);return D};var ie=(le,C,D)=>new Promise((V,A)=>{var se=he=>{try{oe(D.next(he))}catch(ge){A(ge)}},Ye=he=>{try{oe(D.throw(he))}catch(ge){A(ge)}},oe=he=>he.done?V(he.value):Promise.resolve(he.value).then(se,Ye);oe((D=D.apply(le,C)).next())});const In=V.createContext(null),Pc=({children:e,editableSchemaSettingsManager:t})=>D.jsx(In.Provider,{value:{editableSchemaSettingsManager:t},children:e}),An=()=>{const e=V.useContext(In);if(!e)throw new Error("useEditableSchemaSettingsManager must be used within EditableSchemaSettingsProvider");return e.editableSchemaSettingsManager};class Oc{constructor(t=[],o){this._schemaSettings=t,this.app=o,this.schemaSettings={},this.actionList={},this.app=o,this.add(...t)}add(...t){t.forEach(o=>{this.schemaSettings[o.name]=o,Array.isArray(this.actionList[o.name])&&(this.actionList[o.name].forEach(f=>{o[f.type](f.itemName,f.data)}),this.actionList[o.name]=void 0)})}addItem(t,o,f){const r=this.get(t);r?r.add(o,f):(this.actionList[t]||(this.actionList[t]=[]),this.actionList[t].push({type:"add",itemName:o,data:f}))}get(t){return this.schemaSettings[t]}getAll(){return this.schemaSettings}has(t){return!!this.get(t)}remove(t){delete this.schemaSettings[t]}removeItem(t,o){const f=this.get(t);f?f.remove(o):(this.actionList[t]||(this.actionList[t]=[]),this.actionList[t].push({type:"remove",itemName:o}))}}class _e{get items(){return this.options.items}constructor(t){this.options=Object.assign({items:[]},t),this.name=t.name}add(t,o){const f=t.split("."),r=W(T({},o),{name:f[f.length-1]});if(f.length===1){const F=this.items.findIndex(_=>_.name===t);F===-1?this.items.push(r):this.items[F]=r;return}const b=f.slice(0,-1).join("."),v=this.get(b);if(v){v.children||(v.children=[]);const F=v.children.findIndex(_=>_.name===t);F===-1?v.children.push(r):v.children[F]=r}}get(t){const o=t.split(".");let f=this.items;for(let r=0;r<o.length;r++){const b=o[r];if(f=f.find(v=>v.name===b),!f||r===o.length-1)return f;if(f.children)f=f.children;else return}return f}remove(t){const o=t.split(".");if(o.length===1){const r=this.items.findIndex(b=>b.name===o[0]);r!==-1&&this.items.splice(r,1);return}const f=this.get(o.slice(0,-1).join("."));if(f&&f.children){const r=o[o.length-1],b=f.children.findIndex(v=>v.name===r);b!==-1&&f.children.splice(b,1)}}}const Cc="formDesign".toLowerCase(),Dn="form-design";function Z(){return C.useTranslation([Dn,"core"],{nsMode:"fallback"})}const wc=(e,t={ns:Dn})=>C.tval(e,t),Ec=new _e({name:"editableFieldSettings:component:CascadeSelect",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useFieldModeOptions(),r=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:f,onChange:v=>{o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].mode=v,o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=v,C.isSubMode(o)&&r&&(o.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"titleField",useSchema(){var b,v;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useTitleFieldOptions(),r=C.useCollectionField();return{type:"string",title:'{{t("Title field")}}',default:(v=(b=t==null?void 0:t.componentProps)==null?void 0:b.fieldNames)==null?void 0:v.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:f,onChange(F){var n,c;o["x-uid"];const _=W(T(T({},(c=(n=r==null?void 0:r.uiSchema)==null?void 0:n["x-component-props"])==null?void 0:c.fieldNames),t.componentProps.fieldNames),{label:F});o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].fieldNames=_,o["x-component-props"],t.componentProps.fieldNames=o["x-component-props"].fieldNames}}}}}]}),jc=new _e({name:"editableFieldSettings:component:Cascader",items:[{name:"fieldComponent",useVisible:C.useIsAssociationField,useSchema(){const{t:e}=Z(),t=A.useField(),{fieldSchema:o,collectionField:f}=C.useColumnSchema(),r=A.useFieldSchema(),b=o||r,v=C.useFieldModeOptions({fieldSchema:o,collectionField:f}),F=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:v,allowClear:!1,showSearch:!1,onChange(n){var c,h;b["x-uid"],b["x-component-props"]=b["x-component-props"]||{},b["x-component-props"].mode=n,b["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=n,C.isSubMode(b)&&F&&(b.default=null,(c=t==null?void 0:t.setInitialValue)==null||c.call(t,null),(h=t==null?void 0:t.setValue)==null||h.call(t,null))}}}}},{name:"setTheDataScope",useVisible(){return!C.useIsFieldReadPretty()},useSchema(){var y,m,g;const{getCollectionJoinField:e,getAllCollectionsInheritChain:t}=C.useCollectionManager_deprecated(),{getField:o}=C.useCollection_deprecated(),{t:f}=Z(),{form:r}=C.useFormBlockContext(),b=C.useRecord(),v=A.useField(),{fieldSchema:F,collectionField:_}=C.useColumnSchema(),n=A.useFieldSchema(),c=F||n,{isInSubForm:h,isInSubTable:s}=C.useFlag()||{},a=_||o(c.name)||e(c["x-collection-field"]),u=C.useVariables(),i=C.useLocalVariables(),{getFields:l}=C.useCollectionFilterOptionsV2(a==null?void 0:a.target),p=x=>D.jsx(C.VariableInput,W(T({},x),{form:r,collectionField:x.collectionField,record:b,shouldChange:C.getShouldChange({collectionField:x.collectionField,variables:u,localVariables:i,getAllCollectionsInheritChain:t})})),d=A.createForm({initialValues:{filter:((g=(m=(y=c==null?void 0:c["x-component-props"])==null?void 0:y.service)==null?void 0:m.params)==null?void 0:g.filter)||{}}});return{type:"object",title:f("Set the data scope"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:f("Set the data scope"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:d},properties:{filter:{enum:l(),"x-decorator":x=>D.jsx(C.BaseVariableProvider,W(T({},x),{children:D.jsx(C.FlagProvider,{isInSubForm:h,isInSubTable:s,children:x.children})})),"x-decorator-props":{isDisabled:Ic},"x-component":"Filter","x-component-props":{collectionName:a==null?void 0:a.target,dynamicComponent:p}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const x=A.useForm(),P=C.useActionContext();return{onClick(){return ie(this,null,function*(){var E,R,N,L;let j=x.values.filter;j=C.removeNullCondition(j),se.set(v.componentProps,"service.params.filter",j);const O=(E=c["x-component-props"])==null?void 0:E.service;O?O.params.filter=j:c["x-component-props"].service={params:{filter:T({},j)}};const w=c["x-component-props"],I=(N=v.path)==null?void 0:N.splice(((R=v.path)==null?void 0:R.length)-1,1);v.form.query(`${I.concat("*."+c.name)}`).forEach(q=>{q.componentProps=w}),(L=P==null?void 0:P.setVisible)==null||L.call(P,!1)})}}}}}}}}}}}},{name:"setDefaultSortingRules",useVisible(){return!C.useIsFieldReadPretty()},useSchema(){var s,a,u;const e=A.useField(),{t}=Z(),o=A.useFieldSchema(),{getField:f}=C.useCollection_deprecated(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),{columnSchema:b}=C.useColumnSchema(),v=b!=null?b:o,F=f(v.name)||r(v["x-collection-field"]),_=C.useSortFields(F==null?void 0:F.target),n=((u=(a=(s=v["x-component-props"])==null?void 0:s.service)==null?void 0:a.params)==null?void 0:u.sort)||[],c=n==null?void 0:n.map(i=>i!=null&&i.startsWith("-")?{field:i.substring(1),direction:"desc"}:{field:i,direction:"asc"}),h=A.createForm({initialValues:{sort:c}});return{type:"object",title:t("Set default sorting rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:t("Set default sorting rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:h},properties:{sort:{type:"array","x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:_,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260},optionLabelProp:"fullLabel"}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:t("ASC"),value:"asc"},{label:t("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:t("Add sort field"),"x-component":"ArrayItems.Addition"}}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const i=A.useForm(),l=C.useActionContext();return{onClick(){return ie(this,null,function*(){var P,S,j,O,w,I,E,R;const y=i.values.sort.map(N=>N.direction==="desc"?`-${N.field}`:N.field);se.set(e.componentProps,"service.params.sort",y);const m=(P=v["x-component-props"])==null?void 0:P.service;m?m.params.sort=(j=(S=e.componentProps)==null?void 0:S.service.params)==null?void 0:j.sort:v["x-component-props"].service={params:{sort:(w=(O=e.componentProps)==null?void 0:O.service.params)==null?void 0:w.sort}};const g=v["x-component-props"],x=(E=e.path)==null?void 0:E.splice(((I=e.path)==null?void 0:I.length)-1,1);e.form.query(`${x.concat("*."+v.name)}`).forEach(N=>{N.componentProps=g}),(R=l==null?void 0:l.setVisible)==null||R.call(l,!1)})}}}}}}}}}}}},{name:"titleField",useVisible:C.useIsAssociationField,useSchema(){var s,a,u,i;const{t:e}=Z(),t=A.useField(),o=C.useTitleFieldOptions(),{uiSchema:f,fieldSchema:r,collectionField:b}=C.useColumnSchema(),v=A.useFieldSchema(),F=r||v,_=C.useCollectionField(),n=b||_,{getCollectionFields:c}=C.useCollectionManager_deprecated(),h=T(T(T({},(a=(s=n==null?void 0:n.uiSchema)==null?void 0:s["x-component-props"])==null?void 0:a.fieldNames),(u=t==null?void 0:t.componentProps)==null?void 0:u.fieldNames),(i=F==null?void 0:F["x-component-props"])==null?void 0:i.fieldNames);return{type:"string",title:'{{t("Title field")}}',default:h==null?void 0:h.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:o,allowClear:!1,showSearch:!1,onChange(l){var m,g,x,P,S;F["x-uid"];const p=W(T(T({},(g=(m=n==null?void 0:n.uiSchema)==null?void 0:m["x-component-props"])==null?void 0:g.fieldNames),(x=F["x-component-props"])==null?void 0:x.fieldNames),{label:l});F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].fieldNames=p;const d=c(n.target).find(j=>j.name===l);d.interface==="m2o"?F["x-component-props"]["x-next-title"]={label:l,collection:d.collectionName}:F["x-component-props"]["x-next-title"]=null,F["x-component-props"],t.componentProps.fieldNames=F["x-component-props"].fieldNames;const y=(S=t.path)==null?void 0:S.splice(((P=t.path)==null?void 0:P.length)-1,1);t.form.query(`${y.concat("*."+F.name)}`).forEach(j=>{j.componentProps.fieldNames=p})}}}}},{name:"changeOnSelect",useVisible:C.useIsAssociationField,useSchema(){var v;const{t:e}=Z(),{fieldSchema:t,collectionField:o}=C.useColumnSchema(),f=A.useField(),r=A.useFieldSchema(),b=t||r;return{type:"boolean",default:!!((v=b==null?void 0:b["x-component-props"])!=null&&v.changeOnSelect),"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Chang on Parent")}}',"x-component-props":{onInput(F){var n,c;const _=(c=(n=F==null?void 0:F.target)==null?void 0:n.checked)!=null?c:!1;b["x-component-props"]=b["x-component-props"]||{},f.componentProps=f.componentProps||{},b["x-component-props"].changeOnSelect=_,f.componentProps.changeOnSelect=_}}}}}]});function Ic(e){var r,b;const{option:t,collectionField:o,uiSchema:f}=e;return!f||!o?!0:o.interface==="json"||t.target?!1:["input","markdown","richText","textarea","username"].includes(o.interface)?!["string","number"].includes((r=t.schema)==null?void 0:r.type):o.interface&&t.interface?o.interface!==t.interface:(f==null?void 0:f["x-component"])!==((b=t.schema)==null?void 0:b["x-component"])}const Ac=new _e({name:"editableFieldSettings:component:Checkbox",items:[{name:"fieldComponent",useSchema(){var v;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f,b=[{label:e("Checkbox"),value:"Checkbox"},{label:e("Radio group"),value:"Radio group"}];return{type:"string",title:'{{t("Field component")}}',default:((v=r["x-component-props"])==null?void 0:v.mode)||"Checkbox","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:b,onChange(F){r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].mode=F,r["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=F}}}}}]});function ot(e){return new Mc(e)}const Mn=e=>{e["x-uid"]||(e["x-uid"]=A.uid()),Object.keys(e.properties||{}).forEach(t=>{Mn(e.properties[t])})},pt=e=>e,Dc=(e,t)=>{if(!(!e||!t)){for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&t[o]!==(e==null?void 0:e[o]))return!1;return!0}},jt=(e,t)=>{if(e["x-uid"]&&e["x-uid"]===t["x-uid"])return[null,e.toJSON()];const o=e.toJSON(),f=W(T({},o),{properties:{}});let r=null;const b=(v,F)=>{Object.keys(v||{}).forEach(_=>{const n=v[_];if(n["x-uid"]===t["x-uid"]){r=v[_];return}else F.properties[_]=W(T({},n),{properties:{}}),b(n==null?void 0:n.properties,F.properties[_])})};return b(o.properties,f),[f,r]};class Mc{constructor(t){this.events={},this.options=t,this.current=t.current}get model(){return this.options.model}get query(){return this.options.query}loadClientSchemaEvents(){const t=o=>{if(!o)return;const f=Object.values(o.properties).length;o.mapProperties(r=>{r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].width=100/f})};this.on("insertAdjacent",({current:o,position:f,schema:r,wrap:b,wrapped:v,removed:F})=>{(v==null?void 0:v["x-component"])==="Grid.Col"&&t(v.parent),(F==null?void 0:F["x-component"])==="Grid.Col"&&t(F.parent),this.refresh()}),this.on("remove",({removed:o})=>{(o==null?void 0:o["x-component"])==="Grid.Col"&&t(o.parent),this.refresh()})}prepareProperty(t){t.type||(t.type="void"),t.name||(t.name=A.uid()),this.current["x-uid"]&&Mn(t)}on(t,o){this.events[t]||(this.events[t]=[]),this.events[t].push(o)}emit(t,...o){return ie(this,null,function*(){if(!this.events[t])return;const[f,...r]=o;return Promise.all(this.events[t].map(b=>b.bind(this)(T({current:this.current},f),...r)))})}parentsIn(t){if(!t||!A.Schema.isSchemaInstance(t))return!1;let o=this.current;for(;o!=null&&o.parent;){if(o.parent===t)return!0;o=o.parent}return!1}refresh(){const{refresh:t}=this.options;return t==null?void 0:t()}deepMerge(t){const o={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly"},f={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(t).forEach(r=>{o[r]?(this.current[r]=t[r],this.updateModel(o[r],t[r])):f[r]?Object.keys(t[r]).forEach(b=>{se.set(this.current,[r,b],t[r][b]),this.updateModel([f[r],b],t[r][b])}):this.current[r]=t[r]}),this.refresh()}getSchemaAttribute(t,o){return se.get(this.current,t,o)}shallowMerge(t){const o={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly","x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(t).forEach(f=>{this.current[f]=t[f],o[f]&&this.updateModel(o[f],t[f])}),this.refresh()}updateModel(t,o){const f=r=>{se.set(r,t,o)};this.model&&f(this.model),this.query&&this.query.take(f)}insertAdjacent(t,o,f={}){switch(t){case"beforeBegin":return this.insertBeforeBegin(o,f);case"afterBegin":return this.insertAfterBegin(o,f);case"beforeEnd":return this.insertBeforeEnd(o,f);case"afterEnd":return this.insertAfterEnd(o,f)}}recursiveRemoveIfNoChildren(t,o){if(!t)return;let f=t,r;const b=o==null?void 0:o.breakRemoveOn;for(;f;){if(typeof b=="function"){if(b(f))break}else if(Dc(f,b))break;if(Object.keys(f.properties||{}).length>0)break;f.parent&&(r=f.parent.removeProperty(f.name)),f=f.parent}return r}remove(t,o={}){const{breakRemoveOn:f,removeParentsIfNoChildren:r}=o,b=t||this.current;b.parent.removeProperty(b.name),r&&this.recursiveRemoveIfNoChildren(b.parent,{breakRemoveOn:f}),this.refresh()}removeWithoutEmit(t,o={}){const{breakRemoveOn:f,removeParentsIfNoChildren:r}=o,b=t||this.current;let v=b.parent.removeProperty(b.name);if(r){const F=this.recursiveRemoveIfNoChildren(b.parent,{breakRemoveOn:f});F&&(v=F)}return v}insertBeforeBeginOrAfterEnd(t,o={}){if(!A.Schema.isSchemaInstance(this.current)||!A.Schema.isSchemaInstance(t)||this.current.parent!==t.parent)return;let f=0,r=0;return this.current.parent.mapProperties((b,v,F)=>{this.current.name===v&&(r=F),t.name===v&&(f=F)}),f>r?this.insertBeforeBegin(t,o):this.insertAfterEnd(t,o)}insertBeforeBegin(t,o={}){if(!A.Schema.isSchemaInstance(this.current))return;o.onSuccess;const{wrap:f=pt,breakRemoveOn:r,removeParentsIfNoChildren:b}=o;if(A.Schema.isSchemaInstance(t)){if(this.parentsIn(t)){this.refresh();return}t.parent.removeProperty(t.name),b&&this.recursiveRemoveIfNoChildren(t.parent,{breakRemoveOn:r})}else t&&(t=se.cloneDeep(t));const v={};let F=!1,_=0,n=0;this.current.parent.mapProperties((s,a)=>{a===this.current.name&&(n=_,F=!0,++_),s["x-index"]=_,++_,F&&(v[a]=s,this.current.parent.removeProperty(a))}),this.prepareProperty(t);const c=f(t),h=this.current.parent.addProperty(c.name||A.uid(),c);h["x-index"]=n,h.parent=this.current.parent,this.current.parent.setProperties(v),this.refresh()}insertAfterBegin(t,o={}){if(!A.Schema.isSchemaInstance(this.current))return;o.onSuccess;const{wrap:f=pt,breakRemoveOn:r,removeParentsIfNoChildren:b}=o;if(A.Schema.isSchemaInstance(t)){if(this.parentsIn(t)){this.refresh();return}t.parent.removeProperty(t.name),b&&this.recursiveRemoveIfNoChildren(t.parent,{breakRemoveOn:r})}else t&&(t=se.cloneDeep(t));const v={};let F=1;this.current.mapProperties((s,a)=>{s["x-index"]=F,++F,v[a]=s}),this.current.properties={},this.prepareProperty(t);const _=f(t),n=this.current.addProperty(_.name||A.uid(),_);n["x-index"]=0,n.parent=this.current,this.current.setProperties(v);const[c,h]=jt(n,t);this.refresh()}insertBeforeEnd(t,o={}){if(!A.Schema.isSchemaInstance(this.current))return;delete t["x-index"],o.onSuccess;const{wrap:f=pt,breakRemoveOn:r,removeParentsIfNoChildren:b}=o;if(A.Schema.isSchemaInstance(t)){if(this.parentsIn(t)){this.refresh();return}t.parent.removeProperty(t.name),b&&this.recursiveRemoveIfNoChildren(t.parent,{breakRemoveOn:r})}else t&&(t=se.cloneDeep(t));this.prepareProperty(t);const v=f(t),F=this.current.addProperty(v.name||A.uid(),v);F.parent=this.current;const[_,n]=jt(F,t);this.refresh()}insertAfterEnd(t,o={}){if(!A.Schema.isSchemaInstance(this.current))return;o==null||o.onSuccess;const{wrap:f=pt,breakRemoveOn:r,removeParentsIfNoChildren:b}=o;let v=0,F=0,_=!1;const n={};if(this.current.parent.mapProperties((u,i)=>{u["x-index"]=v,i===this.current.name&&(++v,F=v,_=!0),++v,_&&i!==this.current.name&&(n[i]=u,this.current.parent.removeProperty(i))}),A.Schema.isSchemaInstance(t)){if(this.parentsIn(t)){this.refresh();return}t.parent.removeProperty(t.name),b&&this.recursiveRemoveIfNoChildren(t.parent,{breakRemoveOn:r}),t.parent=null}else t&&(t=se.cloneDeep(t));this.prepareProperty(t);const c=f(t),h=this.current.parent.addProperty(c.name||A.uid(),c);h.parent=this.current.parent,h["x-index"]=F,this.current.parent.setProperties(n);const[s,a]=jt(h,t);this.refresh()}}function dt(){const{designable:e,setDesignable:t,refresh:o,reset:f}=V.useContext(C.SchemaComponentContext),r=V.useContext(A.SchemaOptionsContext),b=V.useMemo(()=>(r==null?void 0:r.components)||{},[r]),v=V.useMemo(()=>()=>D.jsx(D.Fragment,{}),[]),F=A.useField(),_=A.useFieldSchema(),n=C.useAPIClient(),{t:c}=Z(),h=V.useMemo(()=>ot({t:c,api:n,refresh:o,current:_,model:F}),[c,n,o,_,F]);return{dn:h,designable:e,reset:f,refresh:o,setDesignable:t,DesignableBar:v,findComponent:V.useCallback(s=>s?typeof s!="string"?s:se.get(b,s):null,[se.get]),patch:V.useCallback((s,a)=>{const u=i=>{Object.keys(i).forEach(l=>{const p=i[l];l==="title"&&(F.title=p,_.title=p),l==="x-decorator-props"&&(F.decoratorProps||(F.decoratorProps={}),_["x-decorator-props"]||(_["x-decorator-props"]={}),Object.keys(p).forEach(d=>{F.decoratorProps[d]=p[d],_["x-decorator-props"][d]=p[d]})),l==="x-component-props"&&(F.componentProps||(F.componentProps={}),_["x-component-props"]||(_["x-component-props"]={}),Object.keys(p).forEach(d=>{F.componentProps[d]=p[d],_["x-component-props"][d]=p[d]}))})};if(typeof s=="string"){const i={};return se.set(i,s,a),u(i)}u(s),o()},[h]),shallowMerge:V.useCallback(s=>{h.shallowMerge(s)},[h]),deepMerge:V.useCallback(s=>{h.deepMerge(s)},[h]),remove:V.useCallback((s,a)=>{h.remove(s,a)},[h]),insertAdjacent:V.useCallback((s,a,u)=>{h.insertAdjacent(s,a,u)},[h]),insertBeforeBegin:V.useCallback(s=>{h.insertBeforeBegin(s)},[h]),insertAfterBegin:V.useCallback(s=>{h.insertAfterBegin(s)},[h]),insertBeforeEnd:V.useCallback(s=>{h.insertBeforeEnd(s)},[h]),insertAfterEnd:V.useCallback(s=>{h.insertAfterEnd(s)},[h])}}const Rc=new _e({name:"editableFieldSettings:component:CustomTitle",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=C.useIsAddNewForm(),f=C.useFieldComponentName(),r=C.useCollectionField(),{fieldSchema:b,collectionField:v}=C.useColumnSchema(),F=A.useFieldSchema(),_=b||F,n=C.useFieldModeOptions({fieldSchema:b,collectionField:v}),c=["select"].includes(r==null?void 0:r.interface),h=[{label:e("Select"),value:"Select"},{label:e("Radio group"),value:"Radio group"}];return{type:"string",title:'{{t("Field component")}}',default:f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:c?h:n,onChange:s=>{var a,u;_["x-uid"],_["x-component-props"]=_["x-component-props"]||{},_["x-component-props"].mode=s,_["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=s,C.isSubMode(_)&&o&&(_.default=null,(a=t==null?void 0:t.setInitialValue)==null||a.call(t,null),(u=t==null?void 0:t.setValue)==null||u.call(t,null))}}}},useVisible:C.useIsMuiltipleAble},{name:"customTitle",useVisible:C.useIsMuiltipleAble,useSchema(){var _,n;const e=A.useFieldSchema(),{fieldSchema:t}=C.useColumnSchema(),o=t||e,{t:f}=Z(),r=C.useFormulaTitleOptions(),b=(n=(_=o["x-component-props"])==null?void 0:_.fieldNames)==null?void 0:n.formula,v=A.useField(),F=A.createForm({initialValues:{formula:b}});return{type:"object",title:f("Custom option label"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:f("Custom option label"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:F},properties:{formula:{required:!0,"x-decorator":"FormItem","x-component":"Variable.TextArea","x-component-props":{scope:r}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const c=A.useForm(),h=C.useActionContext();return{onClick(){return ie(this,null,function*(){var u,i,l;let a=c.values.formula;if(a){const p=W(T({},o["x-component-props"]),{fieldNames:W(T({},(u=o["x-component-props"])==null?void 0:u.fieldNames),{formula:a})});v.componentProps=W(T({},v.componentProps),{fieldNames:W(T({},(i=v.componentProps)==null?void 0:i.fieldNames),{formula:a})}),o["x-component-props"]=p}(l=h==null?void 0:h.setVisible)==null||l.call(h,!1)})}}}}}}}}}}}},{name:"setTheDataScope",useSchema(){var d,y,m;const{t:e}=Z(),{getCollectionJoinField:t,getAllCollectionsInheritChain:o}=C.useCollectionManager_deprecated(),{getField:f}=C.useCollection_deprecated(),{form:r}=C.useFormBlockContext(),b=C.useRecord(),{fieldSchema:v,collectionField:F}=C.useColumnSchema(),_=A.useFieldSchema(),n=v||_,c=F||f(n.name)||t(n["x-collection-field"]),{getFields:h}=C.useCollectionFilterOptionsV2(c==null?void 0:c.target),{isInSubForm:s,isInSubTable:a}=C.useFlag()||{},u=C.useVariables(),i=C.useLocalVariables(),l=g=>D.jsx(C.VariableInput,W(T({},g),{form:r,collectionField:g.collectionField,record:b,shouldChange:C.getShouldChange({collectionField:g.collectionField,variables:u,localVariables:i,getAllCollectionsInheritChain:o})})),p=A.createForm({initialValues:{filter:((m=(y=(d=n==null?void 0:n["x-component-props"])==null?void 0:d.service)==null?void 0:y.params)==null?void 0:m.filter)||{}}});return{type:"object",title:e("Set the data scope"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Set the data scope"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:p},properties:{filter:{type:"object",enum:h(),"x-decorator":g=>D.jsx(C.BaseVariableProvider,W(T({},g),{children:D.jsx(C.FlagProvider,{isInSubForm:s,isInSubTable:a,children:g.children})})),"x-decorator-props":{isDisabled:Nc},"x-component":"Filter","x-component-props":{collectionName:c==null?void 0:c.target,dynamicComponent:l}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const g=A.useForm(),x=C.useActionContext();return{onClick(){return ie(this,null,function*(){var j;let S=g.values.filter;S=C.removeNullCondition(S),se.set(n["x-component-props"],"service.params.filter",S),(j=x==null?void 0:x.setVisible)==null||j.call(x,!1)})}}}}}}}}}}},useVisible(){const e=C.useIsSelectFieldMode(),t=C.useIsFieldReadPretty();return e&&!t}},{name:"setDefaultSortingRules",useSchema(){var c,h,s;const e=A.useField(),{t}=Z(),o=A.useFieldSchema(),{getField:f}=C.useCollection_deprecated(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),b=f(o.name)||r(o["x-collection-field"]),v=C.useSortFields(b==null?void 0:b.target),F=((s=(h=(c=o["x-component-props"])==null?void 0:c.service)==null?void 0:h.params)==null?void 0:s.sort)||[],_=F==null?void 0:F.map(a=>a!=null&&a.startsWith("-")?{field:a.substring(1),direction:"desc"}:{field:a,direction:"asc"}),n=A.createForm({initialValues:{sort:_}});return{type:"object",title:t("Set default sorting rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:t("Set default sorting rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:n},properties:{sort:{type:"array","x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:v,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260},optionLabelProp:"fullLabel"}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:t("ASC"),value:"asc"},{label:t("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:t("Add sort field"),"x-component":"ArrayItems.Addition"}}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const a=A.useForm(),u=C.useActionContext();return{onClick(){return ie(this,null,function*(){var d;const p=a.values.sort.map(y=>y.direction==="desc"?`-${y.field}`:y.field);e.query(new RegExp(`[0-9]+\\.${o.name}$`)).forEach(y=>{se.set(y,"componentProps.service.params.sort",p)}),se.set(o,"x-component-props.service.params.sort",p),e.componentProps=o["x-component-props"],(d=u==null?void 0:u.setVisible)==null||d.call(u,!1)})}}}}}}}}}}},useComponentProps(){const{fieldSchema:e}=C.useColumnSchema();return{fieldSchema:e}},useVisible(){const e=C.useIsSelectFieldMode(),t=C.useIsFieldReadPretty();return e&&!t}},{name:"quickCreate",useSchema(){var b;const{t:e}=Z(),t=C.useAPIClient(),o=A.useField(),f=A.useFieldSchema(),r=V.useMemo(()=>ot({t:e,api:t,current:f,model:o}),[e,t,f,o]);return{type:"string",title:'{{t("Quick create")}}',default:((b=o.componentProps)==null?void 0:b.addMode)||"none","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("None"),value:"none"},{label:e("Dropdown"),value:"quickAdd"},{label:e("Pop-up"),value:"modalAdd"}],onChange:v=>{if(v==="modalAdd"&&!f.reduceProperties((_,n)=>n["x-component"]==="Action"?n:_,null)){const _={"x-action":"create","x-acl-action":"create",title:"{{t('Add new')}}","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:addNew","x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{openMode:"drawer",type:"default",component:"CreateRecordAction"}};r.insertAdjacent("afterBegin",_)}f["x-uid"],f["x-component-props"]=f["x-component-props"]||{},f["x-component-props"].addMode=v,f["x-component-props"],o.componentProps=o.componentProps||{},o.componentProps.addMode=v}}}},useVisible(){const e=C.useIsAssociationField(),t=C.useIsFieldReadPretty(),{fieldSchema:o}=C.useColumnSchema();return e&&!o&&!t}},{name:"allowMultiple",useSchema(){var v;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f,{refresh:b}=dt();return{type:"boolean",default:((v=r["x-component-props"])==null?void 0:v.multiple)===void 0?!0:r["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput:F=>{var n,c;const _=(c=(n=F==null?void 0:F.target)==null?void 0:n.checked)!=null?c:!1;r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},t.componentProps=t.componentProps||{},r["x-component-props"].multiple=_,t.componentProps.multiple=_,r["x-component-props"],b()}}}},useVisible(){const e=C.useIsAssociationField(),t=C.useIsShowMultipleSwitch();return e&&t()}},{name:"enableLink",useSchema(){var v;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f,{refresh:b}=dt();return{type:"boolean",default:((v=r["x-component-props"])==null?void 0:v.enableLink)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Enable link")}}',"x-component-props":{onInput(F){var n,c;const _=(c=(n=F==null?void 0:F.target)==null?void 0:n.checked)!=null?c:!1;r["x-component-props"]=W(T({},r==null?void 0:r["x-component-props"]),{enableLink:_}),t.componentProps.enableLink=_,b()}}}},useVisible(){const e=C.useIsFieldReadPretty();return C.useIsAssociationField()&&e}}]});function Nc(e){var r,b;const{option:t,collectionField:o,uiSchema:f}=e;return!f||!o?!0:o.interface==="json"||t.target?!1:["input","markdown","richText","textarea","username"].includes(o.interface)?!["string","number"].includes((r=t.schema)==null?void 0:r.type):o.interface&&t.interface?o.interface!==t.interface:(f==null?void 0:f["x-component"])!==((b=t.schema)==null?void 0:b["x-component"])}const kc=Ye.createStyles(({css:e})=>({radio:e`
2
2
  .ant-radio-wrapper {
3
3
  display: flex;
4
4
  margin: 5px 0px;
@@ -11,11 +11,11 @@
11
11
  display: flex;
12
12
  margin: 5px 0px;
13
13
  }
14
- `})),Tc=new ye({name:"editableFieldSettings:component:DatePicker",items:[{name:"dateDisplayFormat",useSchema(){var u,h,s,a,l,i,c,p,d;const{t:e}=Z(),t=A.useFieldSchema(),{styles:o}=Nc(),f=A.useField(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),b=r(t==null?void 0:t["x-collection-field"])||{},v=(u=t==null?void 0:t["x-component-props"])==null?void 0:u.showTime,F=((h=t==null?void 0:t["x-component-props"])==null?void 0:h.dateFormat)||((a=(s=b==null?void 0:b.uiSchema)==null?void 0:s["x-component-props"])==null?void 0:a.dateFormat)||"YYYY-MM-DD",_=((l=t==null?void 0:t["x-component-props"])==null?void 0:l.timeFormat)||((c=(i=b==null?void 0:b.uiSchema)==null?void 0:i["x-component-props"])==null?void 0:c.timeFormat)||"HH:mm:ss",n=A.createForm({initialValues:{dateFormat:F,showTime:v===void 0?(d=(p=b==null?void 0:b.uiSchema)==null?void 0:p["x-component-props"])==null?void 0:d.showTime:v,timeFormat:_}});return{type:"object",title:e("Date display format"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Date display format"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:n},properties:{dateFormat:{type:"string",title:'{{t("Date format")}}',"x-component":C.ExpiresRadio,"x-decorator":"FormItem","x-decorator-props":{},"x-component-props":{className:o.radio,defaultValue:"dddd",formats:["MMMM Do YYYY","YYYY-MM-DD","MM/DD/YY","YYYY/MM/DD","DD/MM/YYYY"]},enum:[{label:C.DateFormatCom({format:"MMMM Do YYYY"}),value:"MMMM Do YYYY"},{label:C.DateFormatCom({format:"YYYY-MM-DD"}),value:"YYYY-MM-DD"},{label:C.DateFormatCom({format:"MM/DD/YY"}),value:"MM/DD/YY"},{label:C.DateFormatCom({format:"YYYY/MM/DD"}),value:"YYYY/MM/DD"},{label:C.DateFormatCom({format:"DD/MM/YYYY"}),value:"DD/MM/YYYY"},{label:"custom",value:"custom"}]},showTime:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Show time")}}',"x-reactions":[`{{(field) => {
14
+ `})),Tc=new _e({name:"editableFieldSettings:component:DatePicker",items:[{name:"dateDisplayFormat",useSchema(){var c,h,s,a,u,i,l,p,d;const{t:e}=Z(),t=A.useFieldSchema(),{styles:o}=kc(),f=A.useField(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),b=r(t==null?void 0:t["x-collection-field"])||{},v=(c=t==null?void 0:t["x-component-props"])==null?void 0:c.showTime,F=((h=t==null?void 0:t["x-component-props"])==null?void 0:h.dateFormat)||((a=(s=b==null?void 0:b.uiSchema)==null?void 0:s["x-component-props"])==null?void 0:a.dateFormat)||"YYYY-MM-DD",_=((u=t==null?void 0:t["x-component-props"])==null?void 0:u.timeFormat)||((l=(i=b==null?void 0:b.uiSchema)==null?void 0:i["x-component-props"])==null?void 0:l.timeFormat)||"HH:mm:ss",n=A.createForm({initialValues:{dateFormat:F,showTime:v===void 0?(d=(p=b==null?void 0:b.uiSchema)==null?void 0:p["x-component-props"])==null?void 0:d.showTime:v,timeFormat:_}});return{type:"object",title:e("Date display format"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Date display format"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:n},properties:{dateFormat:{type:"string",title:'{{t("Date format")}}',"x-component":C.ExpiresRadio,"x-decorator":"FormItem","x-decorator-props":{},"x-component-props":{className:o.radio,defaultValue:"dddd",formats:["MMMM Do YYYY","YYYY-MM-DD","MM/DD/YY","YYYY/MM/DD","DD/MM/YYYY"]},enum:[{label:C.DateFormatCom({format:"MMMM Do YYYY"}),value:"MMMM Do YYYY"},{label:C.DateFormatCom({format:"YYYY-MM-DD"}),value:"YYYY-MM-DD"},{label:C.DateFormatCom({format:"MM/DD/YY"}),value:"MM/DD/YY"},{label:C.DateFormatCom({format:"YYYY/MM/DD"}),value:"YYYY/MM/DD"},{label:C.DateFormatCom({format:"DD/MM/YYYY"}),value:"DD/MM/YYYY"},{label:"custom",value:"custom"}]},showTime:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Show time")}}',"x-reactions":[`{{(field) => {
15
15
  field.query('.timeFormat').take(f => {
16
16
  f.display = field.value ? 'visible' : 'none';
17
17
  });
18
- }}}`]},timeFormat:{type:"string",title:'{{t("Time format")}}',"x-component":C.ExpiresRadio,"x-decorator":"FormItem","x-decorator-props":{className:o.margin},"x-component-props":{className:o.redRadio,defaultValue:"h:mm a",formats:["hh:mm:ss a","HH:mm:ss"],timeFormat:!0},enum:[{label:C.DateFormatCom({format:"hh:mm:ss a"}),value:"hh:mm:ss a"},{label:C.DateFormatCom({format:"HH:mm:ss"}),value:"HH:mm:ss"},{label:"custom",value:"custom"}]},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const y=A.useForm(),m=C.useActionContext();return{onClick(){return ie(this,null,function*(){var j;const x=y.values;t["x-uid"],t["x-component-props"],t["x-component-props"]=k(k({},t["x-component-props"]),x),t["x-component-props"],f.componentProps=t["x-component-props"];const P=f.path.entire.split(".");P.pop();const S=P.join(".");f.query(`${S}.*[0:].${t.name}`).forEach(O=>{O.props.name===t.name&&O.setComponentProps(k({},x))}),(j=m==null?void 0:m.setVisible)==null||j.call(m,!1)})}}}}}}}}}}}}]}),kc=new ye({name:"editableFieldSettings:component:DrawerSubTable",items:[{name:"fieldComponent",useSchema(){const e=A.useField(),{fieldSchema:t,collectionField:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=t||f,b=C.useFieldModeOptions({fieldSchema:t,collectionField:o}),v=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:b,allowClear:!1,showSearch:!1,onChange(_){r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].mode=_,r["x-component-props"],e.componentProps=e.componentProps||{},e.componentProps.mode=_,C.isSubMode(r)&&v&&(r.default=null,e.setInitialValue(null),e.setValue(null))}}}}},{name:"allowMultiple",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useCollectionField();return!e&&["hasMany","belongsToMany"].includes(t==null?void 0:t.type)},useSchema(){var o;const e=A.useField(),t=A.useFieldSchema();return{type:"boolean",default:((o=t["x-component-props"])==null?void 0:o.multiple)===void 0?!0:t["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput(f){var b,v;const r=(v=(b=f==null?void 0:f.target)==null?void 0:b.checked)!=null?v:!1;t["x-uid"],t["x-component-props"]=t["x-component-props"]||{},e.componentProps=e.componentProps||{},t["x-component-props"].multiple=r,e.componentProps.multiple=r,t["x-component-props"]}}}}},{name:"titleField",useSchema(){var u,h,s;const e=A.useField(),{uiSchema:t,fieldSchema:o,collectionField:f}=C.useColumnSchema(),r=C.useTitleFieldOptions(),b=A.useFieldSchema(),v=o||b,F=C.useCollectionField(),_=f||F,n=((u=e==null?void 0:e.componentProps)==null?void 0:u.fieldNames)||((h=v==null?void 0:v["x-component-props"])==null?void 0:h.fieldNames)||((s=t==null?void 0:t["x-component-props"])==null?void 0:s.fieldNames);return{type:"string",title:'{{t("Title field")}}',default:n==null?void 0:n.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:r,allowClear:!1,showSearch:!1,onChange(a){var i,c;v["x-uid"];const l=W(k(k({},(c=(i=_==null?void 0:_.uiSchema)==null?void 0:i["x-component-props"])==null?void 0:c.fieldNames),e.componentProps.fieldNames),{label:a});v["x-component-props"]=v["x-component-props"]||{},v["x-component-props"].fieldNames=l,v["x-component-props"],e.componentProps.fieldNames=v["x-component-props"].fieldNames}}}}},{name:"popupSize",useVisible(){return!C.useIsFieldReadPretty()},useSchema(){var b,v,F;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"string",title:'{{t("Popup size")}}',default:(F=(b=r==null?void 0:r["x-component-props"])==null?void 0:b.openSize)!=null?F:((v=r==null?void 0:r["x-component-props"])==null?void 0:v.openMode)==="modal"?"large":"middle","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Small"),value:"small"},{label:e("Middle"),value:"middle"},{label:e("Large"),value:"large"}],onChange:_=>{t.componentProps.openSize=_,r["x-component-props"]=W(k({},r["x-component-props"]),{openSize:_})}}}}}]}),Vc=new ye({name:"editableFieldSettings:component:FileManager",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=C.useIsAddNewForm(),f=C.useFieldComponentName(),{fieldSchema:r,collectionField:b}=C.useColumnSchema(),v=A.useFieldSchema(),F=r||v,_=C.useFieldModeOptions({fieldSchema:r,collectionField:b});return{type:"string",title:'{{t("Field component")}}',default:f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:_,onChange(n){F["x-uid"],F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].mode=n,F["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=n,C.isSubMode(F)&&o&&(F.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"quickUpload",useVisible(){const{fieldSchema:e}=C.useColumnSchema(),t=A.useField(),o=A.useForm();return!((e==null?void 0:e["x-read-pretty"])||t.readPretty||o.readPretty)},useSchema(){var r;const e=A.useField(),{fieldSchema:t}=C.useColumnSchema(),o=A.useFieldSchema(),f=t||o;return{type:"boolean",default:((r=f["x-component-props"])==null?void 0:r.quickUpload)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Quick upload")}}',"x-component-props":{onInput:b=>{var F,_;const v=(_=(F=b==null?void 0:b.target)==null?void 0:F.checked)!=null?_:!1;f["x-uid"],e.componentProps.quickUpload=v,f["x-component-props"]=f["x-component-props"]||{},f["x-component-props"].quickUpload=v,f["x-component-props"]}}}}},{name:"selectFile",useVisible(){const{fieldSchema:e}=C.useColumnSchema(),t=A.useField(),o=A.useForm();return!((e==null?void 0:e["x-read-pretty"])||t.readPretty||o.readPretty)},useSchema(){var b;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"boolean",default:((b=r["x-component-props"])==null?void 0:b.selectFile)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Select file")}}',"x-component-props":{onInput:v=>{var _,n;const F=(n=(_=v==null?void 0:v.target)==null?void 0:_.checked)!=null?n:!1;r["x-uid"],t.componentProps.selectFile=F,r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].selectFile=F,r["x-component-props"]}}}}},{name:"size",type:"select",useVisible(){const e=C.useIsFieldReadPretty(),{fieldSchema:t}=C.useColumnSchema();return e&&!t},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"string",title:e("Size"),default:((f=t==null?void 0:t.componentProps)==null?void 0:f.size)||"default","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Large"),value:"large"},{label:e("Default"),value:"default"},{label:e("Small"),value:"small"}],onChange(r){o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].size=r,o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.size=r}}}}},{name:"allowMultiple",useSchema(){var b;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"boolean",default:((b=r["x-component-props"])==null?void 0:b.multiple)===void 0?!0:r["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput:v=>{var _,n;const F=(n=(_=v==null?void 0:v.target)==null?void 0:_.checked)!=null?n:!1;r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},t.componentProps=t.componentProps||{},r["x-component-props"].multiple=F,t.componentProps.multiple=F,r["x-component-props"]}}}},useVisible(){const e=C.useIsAssociationField(),t=C.useIsShowMultipleSwitch();return e&&t()}}]}),Bc=({unitConversionType:e})=>{const t=A.useForm(),{t:o}=Z();return D.jsxs(oe.Select,{defaultValue:e||"*",style:{width:160},onChange:f=>{t.setValuesIn("unitConversionType",f)},children:[D.jsx(oe.Select.Option,{value:"*",children:o("Multiply by")}),D.jsx(oe.Select.Option,{value:"/",children:o("Divide by")})]})},Lc=new ye({name:"editableFieldSettings:component:InputNumber",items:[{name:"fieldComponent",useVisible(){const e=C.useCollectionField(),t=C.useDataSourceManager();if(!e)return!1;const o=t.collectionFieldInterfaceManager.getFieldInterface(e==null?void 0:e.interface);return Array.isArray(o==null?void 0:o.componentOptions)&&o.componentOptions.length>1&&o.componentOptions.filter(f=>!f.useVisible||f.useVisible()).length>1},useSchema(){var u,h,s,a;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useCollectionField(),b=C.useDataSourceManager().collectionFieldInterfaceManager.getFieldInterface(f==null?void 0:f.interface),{fieldSchema:v}=C.useColumnSchema(),F=v||o,_=C.useCompile(),n=((h=(u=b==null?void 0:b.componentOptions)==null?void 0:u.filter(l=>!l.useVisible||l.useVisible()))==null?void 0:h.map(l=>({label:_(l.label),value:l.value,useProps:l.useProps})))||[];return{type:"string",title:'{{t("Field component")}}',default:((s=F["x-component-props"])==null?void 0:s.component)||((a=n[0])==null?void 0:a.value),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:n,allowClear:!1,showSearch:!1,onChange(l){var p;const i=n.find(d=>d.value===l),c=k({component:l},(p=i==null?void 0:i.useProps)==null?void 0:p.call(i));t.componentProps=c,t.component=l,se.set(F,"x-component-props",c)}}}}},{name:"setSliderMAXNumber",useVisible(){return A.useFieldSchema()["x-component-props"].component==="Slider"},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"number",title:e("Edit Slider Max"),default:(f=o["x-component-props"])==null?void 0:f.max,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{onChange(r){const b=t.componentProps.min;b==null||r>b?(o["x-component-props"].max=r,t.componentProps.max=r):oe.message.warning(e("Cannot be less than or equal to the minimum value"))}}}}},{name:"setSliderMinNumber",useVisible(){return A.useFieldSchema()["x-component-props"].component==="Slider"},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"number",title:e("Edit Slider Min"),default:(f=o["x-component-props"])==null?void 0:f.min,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{onChange(r){const b=t.componentProps.max;b==null||r<b?(o["x-component-props"].min=r,t.componentProps.min=r):oe.message.warning(e("Cannot be greater than or equal to the maximum value"))}}}}},{name:"displayFormat",useVisible(){return C.useIsFieldReadPretty()},useSchema(){const e=A.useFieldSchema(),{fieldSchema:t}=C.useColumnSchema(),o=t||e,f=A.useField(),{t:r}=Z(),{getCollectionJoinField:b}=C.useCollectionManager_deprecated(),v=b(o==null?void 0:o["x-collection-field"])||{},{formatStyle:F,unitConversion:_,unitConversionType:n,separator:u,step:h,addonBefore:s,addonAfter:a}=o["x-component-props"]||{},{step:l}=(v==null?void 0:v.uiSchema["x-component-props"])||{},i=A.createForm({initialValues:{formatStyle:F||"normal",unitConversion:_,separator:u||"0,0.00",step:h||l||"1",addonBefore:s,addonAfter:a}});return{type:"object",title:r("Format"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:r("Format"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:i},properties:{formatStyle:{type:"string",enum:[{value:"normal",label:r("Normal")},{value:"scientifix",label:r("Scientifix notation")}],"x-decorator":"FormItem","x-component":"Select",title:"{{t('Style')}}"},unitConversion:{type:"number","x-decorator":"FormItem","x-component":"InputNumber",title:"{{t('Unit conversion')}}","x-component-props":{style:{width:"100%"},addonBefore:D.jsx(Bc,{unitConversionType:n})}},separator:{type:"string",enum:[{value:"0,0.00",label:r("100,000.00")},{value:"0.0,00",label:r("100.000,00")},{value:"0 0,00",label:r("100 000.00")},{value:"0.00",label:r("100000.00")}],"x-decorator":"FormItem","x-component":"Select",title:"{{t('Separator')}}"},step:{type:"string",title:'{{t("Precision")}}',"x-component":"Select","x-decorator":"FormItem",enum:[{value:"1",label:"1"},{value:"0.1",label:"1.0"},{value:"0.01",label:"1.00"},{value:"0.001",label:"1.000"},{value:"0.0001",label:"1.0000"},{value:"0.00001",label:"1.00000"}]},addonBefore:{type:"string",title:'{{t("Prefix")}}',"x-component":"Input","x-decorator":"FormItem"},addonAfter:{type:"string",title:'{{t("Suffix")}}',"x-component":"Input","x-decorator":"FormItem"},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const c=A.useForm(),p=C.useActionContext();return{onClick(){return ie(this,null,function*(){var x;const y=c.values;o["x-uid"],o["x-component-props"],o["x-component-props"]=k(k({},o["x-component-props"]),y),o["x-component-props"],f.componentProps=o["x-component-props"];const m=f.path.entire.split(".");m.pop();const g=m.join(".");f.query(`${g}.*[0:].${o.name}`).forEach(P=>{P.props.name===o.name&&P.setComponentProps(k({},y))}),(x=p==null?void 0:p.setVisible)==null||x.call(p,!1)})}}}}}}}}}}}}]}),Uc=new ye({name:"editableFieldSettings:component:Radio group",items:[{name:"fieldComponent",useSchema(){var v;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f,b=[{label:e("Checkbox"),value:"Checkbox"},{label:e("Radio group"),value:"Radio group"}];return{type:"string",title:'{{t("Field component")}}',default:((v=r["x-component-props"])==null?void 0:v.mode)||"Radio group","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:b,onChange(F){r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].mode=F,r["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=F}}}}}]}),Gc=new ye({name:"editableFieldSettings:component:Picker",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=C.useIsAddNewForm(),f=C.useFieldComponentName(),{fieldSchema:r,collectionField:b}=C.useColumnSchema(),v=A.useFieldSchema(),F=r||v,_=C.useFieldModeOptions({fieldSchema:r,collectionField:b});return{type:"string",title:'{{t("Field component")}}',default:f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:_,allowClear:!1,showSearch:!1,onChange(n){var u,h;F["x-uid"],F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].mode=n,F["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=n,C.isSubMode(F)&&o&&(F.default=null,(u=t==null?void 0:t.setInitialValue)==null||u.call(t,null),(h=t==null?void 0:t.setValue)==null||h.call(t,null))}}}}},{name:"popupSize",useVisible(){return!C.useIsFieldReadPretty()},useSchema(){var b,v,F;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"string",title:'{{t("Popup size")}}',default:(F=(b=r==null?void 0:r["x-component-props"])==null?void 0:b.openSize)!=null?F:((v=r==null?void 0:r["x-component-props"])==null?void 0:v.openMode)==="modal"?"large":"middle","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Small"),value:"small"},{label:e("Middle"),value:"middle"},{label:e("Large"),value:"large"}],onChange:_=>{t.componentProps.openSize=_,r["x-component-props"]=W(k({},r["x-component-props"]),{openSize:_})}}}}},{name:"allowMultiple",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useCollectionField();return!e&&["hasMany","belongsToMany"].includes(t==null?void 0:t.type)},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:((f=o["x-component-props"])==null?void 0:f.multiple)===void 0?!0:o["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput(r){var v,F;const b=(F=(v=r==null?void 0:r.target)==null?void 0:v.checked)!=null?F:!1;o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},t.componentProps=t.componentProps||{},o["x-component-props"].multiple=b,t.componentProps.multiple=b,o["x-component-props"]}}}}},{name:"titleField",useSchema(){var h,s,a;const{t:e}=Z(),t=A.useField(),{uiSchema:o,fieldSchema:f,collectionField:r}=C.useColumnSchema(),b=C.useTitleFieldOptions(),v=A.useFieldSchema(),F=f||v,_=C.useCollectionField(),n=r||_,u=((h=t==null?void 0:t.componentProps)==null?void 0:h.fieldNames)||((s=F==null?void 0:F["x-component-props"])==null?void 0:s.fieldNames)||((a=o==null?void 0:o["x-component-props"])==null?void 0:a.fieldNames);return{type:"string",title:'{{t("Title field")}}',default:u==null?void 0:u.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:b,allowClear:!1,showSearch:!1,onChange(l){var c,p;F["x-uid"];const i=W(k(k({},(p=(c=n==null?void 0:n.uiSchema)==null?void 0:c["x-component-props"])==null?void 0:p.fieldNames),t.componentProps.fieldNames),{label:l});F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].fieldNames=i,F["x-component-props"],t.componentProps.fieldNames=F["x-component-props"].fieldNames}}}}}]}),Hc=new ye({name:"editableFieldSettings:component:Select",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=C.useIsAddNewForm(),f=C.useFieldComponentName(),r=C.useCollectionField(),{fieldSchema:b,collectionField:v}=C.useColumnSchema(),F=A.useFieldSchema(),_=b||F,n=C.useFieldModeOptions({fieldSchema:b,collectionField:v}),u=["select"].includes(r==null?void 0:r.interface),h=[{label:e("Select"),value:"Select"},{label:e("Radio group"),value:"Radio group"}];return{type:"string",title:'{{t("Field component")}}',default:f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:u?h:n,onChange:s=>{var a,l;_["x-uid"],_["x-component-props"]=_["x-component-props"]||{},_["x-component-props"].mode=s,_["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=s,C.isSubMode(_)&&o&&(_.default=null,(a=t==null?void 0:t.setInitialValue)==null||a.call(t,null),(l=t==null?void 0:t.setValue)==null||l.call(t,null))}}}},useVisible:C.useIsMuiltipleAble},{name:"setTheDataScope",useSchema(){var m,g,x;const{t:e}=Z(),t=A.useField(),{getCollectionJoinField:o,getAllCollectionsInheritChain:f}=C.useCollectionManager_deprecated(),{getField:r}=C.useCollection_deprecated(),{form:b}=C.useFormBlockContext(),v=C.useRecord(),{refresh:F}=pt(),{fieldSchema:_,collectionField:n}=C.useColumnSchema(),u=A.useFieldSchema(),h=_||u,s=n||r(h.name)||o(h["x-collection-field"]),{getFields:a}=C.useCollectionFilterOptionsV2(s==null?void 0:s.target),{isInSubForm:l,isInSubTable:i}=C.useFlag()||{},c=C.useVariables(),p=C.useLocalVariables(),d=P=>D.jsx(C.VariableInput,W(k({},P),{form:b,collectionField:P.collectionField,record:v,shouldChange:C.getShouldChange({collectionField:P.collectionField,variables:c,localVariables:p,getAllCollectionsInheritChain:f})})),y=A.createForm({initialValues:{filter:((x=(g=(m=h==null?void 0:h["x-component-props"])==null?void 0:m.service)==null?void 0:g.params)==null?void 0:x.filter)||{}}});return{type:"object",title:e("Set the data scope"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Set the data scope"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:y},properties:{filter:{type:"object",enum:a(),"x-decorator":P=>D.jsx(C.BaseVariableProvider,W(k({},P),{children:D.jsx(C.FlagProvider,{isInSubForm:l,isInSubTable:i,children:P.children})})),"x-decorator-props":{isDisabled:zc},"x-component":"Filter","x-component-props":{collectionName:s==null?void 0:s.target,dynamicComponent:d}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const P=A.useForm(),S=C.useActionContext();return{onClick(){return ie(this,null,function*(){var w;let O=P.values.filter;O=C.removeNullCondition(O),se.set(h["x-component-props"],"service.params.filter",O),t.componentProps=h["x-component-props"],F(),(w=S==null?void 0:S.setVisible)==null||w.call(S,!1)})}}}}}}}}}}},useVisible(){const e=C.useIsSelectFieldMode(),t=C.useIsFieldReadPretty();return e&&!t}},{name:"setDefaultSortingRules",useSchema(){var u,h,s;const e=A.useField(),{t}=Z(),o=A.useFieldSchema(),{getField:f}=C.useCollection_deprecated(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),b=f(o.name)||r(o["x-collection-field"]),v=C.useSortFields(b==null?void 0:b.target),F=((s=(h=(u=o["x-component-props"])==null?void 0:u.service)==null?void 0:h.params)==null?void 0:s.sort)||[],_=F==null?void 0:F.map(a=>a!=null&&a.startsWith("-")?{field:a.substring(1),direction:"desc"}:{field:a,direction:"asc"}),n=A.createForm({initialValues:{sort:_}});return{type:"object",title:t("Set default sorting rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:t("Set default sorting rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:n},properties:{sort:{type:"array","x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:v,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260},optionLabelProp:"fullLabel"}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:t("ASC"),value:"asc"},{label:t("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:t("Add sort field"),"x-component":"ArrayItems.Addition"}}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const a=A.useForm(),l=C.useActionContext();return{onClick(){return ie(this,null,function*(){var d;const p=a.values.sort.map(y=>y.direction==="desc"?`-${y.field}`:y.field);e.query(new RegExp(`[0-9]+\\.${o.name}$`)).forEach(y=>{se.set(y,"componentProps.service.params.sort",p)}),se.set(o,"x-component-props.service.params.sort",p),e.componentProps=o["x-component-props"],(d=l==null?void 0:l.setVisible)==null||d.call(l,!1)})}}}}}}}}}}},useVisible(){const e=C.useIsSelectFieldMode(),t=C.useIsFieldReadPretty();return e&&!t}},{name:"quickCreate",useSchema(){var b;const{t:e}=Z(),t=C.useAPIClient(),o=A.useField(),f=A.useFieldSchema(),r=V.useMemo(()=>rt({t:e,api:t,current:f,model:o}),[e,t,f,o]);return{type:"string",title:'{{t("Quick create")}}',default:((b=o.componentProps)==null?void 0:b.addMode)||"none","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("None"),value:"none"},{label:e("Dropdown"),value:"quickAdd"},{label:e("Pop-up"),value:"modalAdd"}],onChange:v=>{if(v==="modalAdd"&&!f.reduceProperties((_,n)=>n["x-component"]==="Action"?n:_,null)){const _={"x-action":"create","x-acl-action":"create",title:"{{t('Add new')}}","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:addNew","x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{openMode:"drawer",type:"default",component:"CreateRecordAction"}};r.insertAdjacent("afterBegin",_)}f["x-uid"],f["x-component-props"]=f["x-component-props"]||{},f["x-component-props"].addMode=v,f["x-component-props"],o.componentProps=o.componentProps||{},o.componentProps.addMode=v}}}},useVisible(){const e=C.useIsAssociationField(),t=C.useIsFieldReadPretty(),{fieldSchema:o}=C.useColumnSchema();return e&&!o&&!t}},{name:"allowMultiple",useSchema(){var b;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"boolean",default:((b=r["x-component-props"])==null?void 0:b.multiple)===void 0?!0:r["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput:v=>{var _,n;const F=(n=(_=v==null?void 0:v.target)==null?void 0:_.checked)!=null?n:!1;r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},t.componentProps=t.componentProps||{},r["x-component-props"].multiple=F,t.componentProps.multiple=F,r["x-component-props"]}}}},useVisible(){const e=C.useIsAssociationField(),t=C.useIsShowMultipleSwitch();return e&&t()}},{name:"titleField",useSchema(){var s,a,l,i;const{t:e}=Z(),t=A.useField(),o=C.useTitleFieldOptions(),{uiSchema:f,fieldSchema:r,collectionField:b}=C.useColumnSchema(),v=A.useFieldSchema(),F=r||v,_=C.useCollectionField(),n=b||_,{getCollectionFields:u}=C.useCollectionManager_deprecated(),h=k(k(k({},(a=(s=n==null?void 0:n.uiSchema)==null?void 0:s["x-component-props"])==null?void 0:a.fieldNames),(l=t==null?void 0:t.componentProps)==null?void 0:l.fieldNames),(i=F==null?void 0:F["x-component-props"])==null?void 0:i.fieldNames);return{type:"string",title:'{{t("Title field")}}',default:h==null?void 0:h.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:o,onChange(c){var m,g,x,P,S;F["x-uid"];const p=W(k(k({},(g=(m=n==null?void 0:n.uiSchema)==null?void 0:m["x-component-props"])==null?void 0:g.fieldNames),(x=F["x-component-props"])==null?void 0:x.fieldNames),{label:c});F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].fieldNames=p;const d=u(n.target).find(j=>j.name===c);d.interface==="m2o"?F["x-component-props"]["x-next-title"]={label:c,collection:d.collectionName}:F["x-component-props"]["x-next-title"]=null,F["x-component-props"],t.componentProps.fieldNames=F["x-component-props"].fieldNames;const y=(S=t.path)==null?void 0:S.splice(((P=t.path)==null?void 0:P.length)-1,1);t.form.query(`${y.concat("*."+F.name)}`).forEach(j=>{j.componentProps.fieldNames=h})}}}},useVisible:C.useIsAssociationField},{name:"enableLink",useSchema(){var b;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"boolean",default:((b=r["x-component-props"])==null?void 0:b.enableLink)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Enable link")}}',"x-component-props":{onInput(v){var _,n;const F=(n=(_=v==null?void 0:v.target)==null?void 0:_.checked)!=null?n:!1;r["x-component-props"]=W(k({},r==null?void 0:r["x-component-props"]),{enableLink:F}),t.componentProps.enableLink=F}}}},useVisible(){const e=C.useIsFieldReadPretty();return C.useIsAssociationField()&&e}}]});function zc(e){var r,b;const{option:t,collectionField:o,uiSchema:f}=e;return!f||!o?!0:o.interface==="json"||t.target?!1:["input","markdown","richText","textarea","username"].includes(o.interface)?!["string","number"].includes((r=t.schema)==null?void 0:r.type):o.interface&&t.interface?o.interface!==t.interface:(f==null?void 0:f["x-component"])!==((b=t.schema)==null?void 0:b["x-component"])}const Jc=new ye({name:"editableFieldSettings:component:SubTable",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useFieldModeOptions(),r=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:f,allowClear:!1,showSearch:!1,onChange(v){o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].mode=v,o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=v,C.isSubMode(o)&&r&&(o.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"allowAddNewData",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useIsAssociationField();return!e&&t},useSchema(){var o;const e=A.useField(),t=A.useFieldSchema();return{type:"boolean",default:((o=t["x-component-props"])==null?void 0:o.allowAddnew)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow add new")}}',"x-component-props":{onInput(f){var b,v;const r=(v=(b=f==null?void 0:f.target)==null?void 0:b.checked)!=null?v:!1;t["x-uid"],e.componentProps.allowAddnew=r,t["x-component-props"]=t["x-component-props"]||{},t["x-component-props"].allowAddnew=r,t["x-component-props"]}}}}},{name:"allowSelectExistingRecord",useVisible(){return!C.useIsFieldReadPretty()},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:(f=o["x-component-props"])==null?void 0:f.allowSelectExistingRecord,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow selection of existing records")}}',"x-component-props":{onInput(r){var v,F;const b=(F=(v=r==null?void 0:r.target)==null?void 0:v.checked)!=null?F:!1;o["x-uid"],t.componentProps.allowSelectExistingRecord=b,o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].allowSelectExistingRecord=b,o["x-component-props"]}}}}},{name:"SetDefaultSortingRules",useVisible(){const{getCollectionJoinField:e}=C.useCollectionManager_deprecated(),o=A.useFieldSchema()["x-collection-field"],{interface:f}=e(o)||{};return C.useIsFieldReadPretty()&&["m2m","o2m"].includes(f)},useSchema(){const{getCollectionJoinField:e}=C.useCollectionManager_deprecated(),t=A.useField(),o=A.useFieldSchema(),f=o["x-collection-field"],{target:r}=e(f)||{},b=C.useSortFields(r),{t:v}=Z(),F=t.componentProps.sortArr||[],_=F==null?void 0:F.map(u=>u!=null&&u.startsWith("-")?{field:u.substring(1),direction:"desc"}:{field:u,direction:"asc"}),n=A.createForm({initialValues:{sort:_}});return{type:"object",title:v("Set default sorting rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:v("Set default sorting rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:n},properties:{sort:{type:"array","x-component":he.ArrayItems,"x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:b,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260},optionLabelProp:"fullLabel"}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:v("ASC"),value:"asc"},{label:v("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:v("Add sort field"),"x-component":"ArrayItems.Addition"}}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const u=A.useForm(),h=C.useActionContext();return{onClick(){return ie(this,null,function*(){var i;const l=u.values.sort.map(c=>c.direction==="desc"?`-${c.field}`:c.field);t.componentProps.sortArr=l,o["x-component-props"].sortArr=l,(i=h==null?void 0:h.setVisible)==null||i.call(h,!1)})}}}}}}}}}}}},{name:"clicktoselect",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useIsAssociationField();return!e&&t},useSchema(){var l,i,c,p;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useCompile(),r=C.useCollectionManager(),[b,v]=V.useState(((l=o["x-component-props"].quickAddField)==null?void 0:l.value)||"none"),F=r.getCollection(o["x-collection-field"]),_=C.useIsAddNewForm(),n=F.fields.map(d=>{var y;if(d.interface==="m2o"||d.interface==="select")return W(k({},d),{label:f((y=d.uiSchema)==null?void 0:y.title),value:d.name})}).filter(Boolean);n.unshift({label:"none",value:"none"}),r.getCollectionFields(`${o["x-collection-field"]}.${b}`).map(d=>{if(d.interface==="m2o")return W(k({},d),{label:f(d.uiSchema.title),value:d.name})}).filter(Boolean).unshift({label:e("none"),value:"none"});const s=((c=(i=o["x-component-props"])==null?void 0:i.quickAddParentCollection)==null?void 0:c.value)||"none",a=A.createForm({initialValues:{isquickaddtabs:((p=o["x-component-props"])==null?void 0:p.isQuickAdd)||!1,firstLevelselection:b,secondLevelselection:s}});return{type:"object",title:e("Quick create"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Quick create"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:a},properties:{isquickaddtabs:{title:e("Enable quick create"),type:"boolean","x-decorator":"FormItem","x-component":oe.Switch,"x-component-props":{}},firstLevelselection:{title:e("Set Quick Add Tabs"),"x-decorator":"FormItem","x-component":"Select",enum:n,"x-reactions":[{dependencies:["isquickaddtabs"],fulfill:{state:{visible:"{{$deps[0] === true}}"}}}],"x-component-props":{onChange(d){v(d)}}},secondLevelselection:{title:e("Set Quick Add Parent Tabs"),"x-decorator":"FormItem","x-component":C.SecondLevelSelect,"x-reactions":[{dependencies:["firstLevelselection","isquickaddtabs"],fulfill:{state:{visible:'{{$deps[0] !== "none" && $deps[1] === true}}'},schema:{"x-component-props":{firstLevelValue:"{{$deps[0]}}",collectionField:o["x-collection-field"]}}}}]},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const d=A.useForm(),y=C.useActionContext();return{onClick(){return ie(this,null,function*(){var S,j;const{isquickaddtabs:g,firstLevelselection:x,secondLevelselection:P}=d.values;o["x-uid"],t.componentProps.isQuickAdd=g,o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].isQuickAdd=g,o["x-component-props"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].quickAddField={fieldInterface:((S=n.find(O=>O.value===x))==null?void 0:S.interface)||"none",value:x},o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.quickAddField=o["x-component-props"].quickAddField,o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].quickAddParentCollection={collectionField:`${o["x-collection-field"]}.${x}.${P}`,value:P},o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.quickAddParentCollection={collectionField:`${o["x-collection-field"]}.${x}.${P}`,value:P},C.isSubMode(o)&&_&&(o.default=null,t.setInitialValue(null),t.setValue(null)),(j=y==null?void 0:y.setVisible)==null||j.call(y,!1)})}}}}}}}}}}}}]}),Wc=new ye({name:"editableFieldSettings:component:Tag",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=C.useIsAddNewForm(),{fieldSchema:f,collectionField:r}=C.useColumnSchema(),b=C.useFieldModeOptions({fieldSchema:f,collectionField:r}),v=A.useFieldSchema(),F=f||v;return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:b,onChange:n=>{F["x-uid"],F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].mode=n,F["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=n,C.isSubMode(F)&&o&&(F.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"tagColorField",useSchema(){var n,u;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useCollectionField(),{fieldSchema:r,collectionField:b}=C.useColumnSchema(),v=r||o,F=b||f,_=C.useColorFields((n=F==null?void 0:F.target)!=null?n:F==null?void 0:F.targetCollection);return{type:"string",title:'{{t("Tag color field")}}',default:(u=t==null?void 0:t.componentProps)==null?void 0:u.tagColorField,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:_,onChange(h){v["x-uid"],v["x-component-props"]=v["x-component-props"]||{},v["x-component-props"].tagColorField=h,v["x-component-props"],t.componentProps.tagColorField=h}}}}},{name:"titleField",useSchema(){var n,u;const{t:e}=Z(),t=A.useField(),{fieldSchema:o,collectionField:f}=C.useColumnSchema(),r=A.useFieldSchema(),b=o||r,v=C.useTitleFieldOptions(),F=C.useCollectionField(),_=f||F;return{type:"string",title:'{{t("Title field")}}',default:(u=(n=t==null?void 0:t.componentProps)==null?void 0:n.fieldNames)==null?void 0:u.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:v,onChange(h){var a,l;b["x-uid"];const s=W(k(k({},(l=(a=_==null?void 0:_.uiSchema)==null?void 0:a["x-component-props"])==null?void 0:l.fieldNames),t.componentProps.fieldNames),{label:h});b["x-component-props"]=b["x-component-props"]||{},b["x-component-props"].fieldNames=s,b["x-component-props"],t.componentProps.fieldNames=b["x-component-props"].fieldNames}}}}},{name:"enableLink",useVisible(){return A.useField().readPretty},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:((f=o["x-component-props"])==null?void 0:f.enableLink)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Enable link")}}',"x-component-props":{onInput:r=>{var v,F;const b=(F=(v=r==null?void 0:r.target)==null?void 0:v.checked)!=null?F:!1;o["x-component-props"]=W(k({},o==null?void 0:o["x-component-props"]),{enableLink:b}),t.componentProps.enableLink=b}}}}}]}),Yc=We.createStyles(({css:e})=>({radio:e`
18
+ }}}`]},timeFormat:{type:"string",title:'{{t("Time format")}}',"x-component":C.ExpiresRadio,"x-decorator":"FormItem","x-decorator-props":{className:o.margin},"x-component-props":{className:o.redRadio,defaultValue:"h:mm a",formats:["hh:mm:ss a","HH:mm:ss"],timeFormat:!0},enum:[{label:C.DateFormatCom({format:"hh:mm:ss a"}),value:"hh:mm:ss a"},{label:C.DateFormatCom({format:"HH:mm:ss"}),value:"HH:mm:ss"},{label:"custom",value:"custom"}]},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const y=A.useForm(),m=C.useActionContext();return{onClick(){return ie(this,null,function*(){var j;const x=y.values;t["x-uid"],t["x-component-props"],t["x-component-props"]=T(T({},t["x-component-props"]),x),t["x-component-props"],f.componentProps=t["x-component-props"];const P=f.path.entire.split(".");P.pop();const S=P.join(".");f.query(`${S}.*[0:].${t.name}`).forEach(O=>{O.props.name===t.name&&O.setComponentProps(T({},x))}),(j=m==null?void 0:m.setVisible)==null||j.call(m,!1)})}}}}}}}}}}}}]}),Vc=new _e({name:"editableFieldSettings:component:DrawerSubTable",items:[{name:"fieldComponent",useSchema(){const e=A.useField(),{fieldSchema:t,collectionField:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=t||f,b=C.useFieldModeOptions({fieldSchema:t,collectionField:o}),v=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:b,allowClear:!1,showSearch:!1,onChange(_){r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].mode=_,r["x-component-props"],e.componentProps=e.componentProps||{},e.componentProps.mode=_,C.isSubMode(r)&&v&&(r.default=null,e.setInitialValue(null),e.setValue(null))}}}}},{name:"allowMultiple",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useCollectionField();return!e&&["hasMany","belongsToMany"].includes(t==null?void 0:t.type)},useSchema(){var o;const e=A.useField(),t=A.useFieldSchema();return{type:"boolean",default:((o=t["x-component-props"])==null?void 0:o.multiple)===void 0?!0:t["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput(f){var b,v;const r=(v=(b=f==null?void 0:f.target)==null?void 0:b.checked)!=null?v:!1;t["x-uid"],t["x-component-props"]=t["x-component-props"]||{},e.componentProps=e.componentProps||{},t["x-component-props"].multiple=r,e.componentProps.multiple=r,t["x-component-props"]}}}}},{name:"titleField",useSchema(){var c,h,s;const e=A.useField(),{uiSchema:t,fieldSchema:o,collectionField:f}=C.useColumnSchema(),r=C.useTitleFieldOptions(),b=A.useFieldSchema(),v=o||b,F=C.useCollectionField(),_=f||F,n=((c=e==null?void 0:e.componentProps)==null?void 0:c.fieldNames)||((h=v==null?void 0:v["x-component-props"])==null?void 0:h.fieldNames)||((s=t==null?void 0:t["x-component-props"])==null?void 0:s.fieldNames);return{type:"string",title:'{{t("Title field")}}',default:n==null?void 0:n.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:r,allowClear:!1,showSearch:!1,onChange(a){var i,l;v["x-uid"];const u=W(T(T({},(l=(i=_==null?void 0:_.uiSchema)==null?void 0:i["x-component-props"])==null?void 0:l.fieldNames),e.componentProps.fieldNames),{label:a});v["x-component-props"]=v["x-component-props"]||{},v["x-component-props"].fieldNames=u,v["x-component-props"],e.componentProps.fieldNames=v["x-component-props"].fieldNames}}}}},{name:"popupSize",useVisible(){return!C.useIsFieldReadPretty()},useSchema(){var b,v,F;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"string",title:'{{t("Popup size")}}',default:(F=(b=r==null?void 0:r["x-component-props"])==null?void 0:b.openSize)!=null?F:((v=r==null?void 0:r["x-component-props"])==null?void 0:v.openMode)==="modal"?"large":"middle","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Small"),value:"small"},{label:e("Middle"),value:"middle"},{label:e("Large"),value:"large"}],onChange:_=>{t.componentProps.openSize=_,r["x-component-props"]=W(T({},r["x-component-props"]),{openSize:_})}}}}}]}),Bc=new _e({name:"editableFieldSettings:component:FileManager",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=C.useIsAddNewForm(),f=C.useFieldComponentName(),{fieldSchema:r,collectionField:b}=C.useColumnSchema(),v=A.useFieldSchema(),F=r||v,_=C.useFieldModeOptions({fieldSchema:r,collectionField:b});return{type:"string",title:'{{t("Field component")}}',default:f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:_,onChange(n){F["x-uid"],F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].mode=n,F["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=n,C.isSubMode(F)&&o&&(F.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"quickUpload",useVisible(){const{fieldSchema:e}=C.useColumnSchema(),t=A.useField(),o=A.useForm();return!((e==null?void 0:e["x-read-pretty"])||t.readPretty||o.readPretty)},useSchema(){var r;const e=A.useField(),{fieldSchema:t}=C.useColumnSchema(),o=A.useFieldSchema(),f=t||o;return{type:"boolean",default:((r=f["x-component-props"])==null?void 0:r.quickUpload)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Quick upload")}}',"x-component-props":{onInput:b=>{var F,_;const v=(_=(F=b==null?void 0:b.target)==null?void 0:F.checked)!=null?_:!1;f["x-uid"],e.componentProps.quickUpload=v,f["x-component-props"]=f["x-component-props"]||{},f["x-component-props"].quickUpload=v,f["x-component-props"]}}}}},{name:"selectFile",useVisible(){const{fieldSchema:e}=C.useColumnSchema(),t=A.useField(),o=A.useForm();return!((e==null?void 0:e["x-read-pretty"])||t.readPretty||o.readPretty)},useSchema(){var b;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"boolean",default:((b=r["x-component-props"])==null?void 0:b.selectFile)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Select file")}}',"x-component-props":{onInput:v=>{var _,n;const F=(n=(_=v==null?void 0:v.target)==null?void 0:_.checked)!=null?n:!1;r["x-uid"],t.componentProps.selectFile=F,r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].selectFile=F,r["x-component-props"]}}}}},{name:"size",type:"select",useVisible(){const e=C.useIsFieldReadPretty(),{fieldSchema:t}=C.useColumnSchema();return e&&!t},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"string",title:e("Size"),default:((f=t==null?void 0:t.componentProps)==null?void 0:f.size)||"default","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Large"),value:"large"},{label:e("Default"),value:"default"},{label:e("Small"),value:"small"}],onChange(r){o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].size=r,o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.size=r}}}}},{name:"allowMultiple",useSchema(){var b;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"boolean",default:((b=r["x-component-props"])==null?void 0:b.multiple)===void 0?!0:r["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput:v=>{var _,n;const F=(n=(_=v==null?void 0:v.target)==null?void 0:_.checked)!=null?n:!1;r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},t.componentProps=t.componentProps||{},r["x-component-props"].multiple=F,t.componentProps.multiple=F,r["x-component-props"]}}}},useVisible(){const e=C.useIsAssociationField(),t=C.useIsShowMultipleSwitch();return e&&t()}}]}),Lc=({unitConversionType:e})=>{const t=A.useForm(),{t:o}=Z();return D.jsxs(oe.Select,{defaultValue:e||"*",style:{width:160},onChange:f=>{t.setValuesIn("unitConversionType",f)},children:[D.jsx(oe.Select.Option,{value:"*",children:o("Multiply by")}),D.jsx(oe.Select.Option,{value:"/",children:o("Divide by")})]})},Uc=new _e({name:"editableFieldSettings:component:InputNumber",items:[{name:"fieldComponent",useVisible(){const e=C.useCollectionField(),t=C.useDataSourceManager();if(!e)return!1;const o=t.collectionFieldInterfaceManager.getFieldInterface(e==null?void 0:e.interface);return Array.isArray(o==null?void 0:o.componentOptions)&&o.componentOptions.length>1&&o.componentOptions.filter(f=>!f.useVisible||f.useVisible()).length>1},useSchema(){var c,h,s,a;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useCollectionField(),b=C.useDataSourceManager().collectionFieldInterfaceManager.getFieldInterface(f==null?void 0:f.interface),{fieldSchema:v}=C.useColumnSchema(),F=v||o,_=C.useCompile(),n=((h=(c=b==null?void 0:b.componentOptions)==null?void 0:c.filter(u=>!u.useVisible||u.useVisible()))==null?void 0:h.map(u=>({label:_(u.label),value:u.value,useProps:u.useProps})))||[];return{type:"string",title:'{{t("Field component")}}',default:((s=F["x-component-props"])==null?void 0:s.component)||((a=n[0])==null?void 0:a.value),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:n,allowClear:!1,showSearch:!1,onChange(u){var p;const i=n.find(d=>d.value===u),l=T({component:u},(p=i==null?void 0:i.useProps)==null?void 0:p.call(i));t.componentProps=l,t.component=u,se.set(F,"x-component-props",l)}}}}},{name:"setSliderMAXNumber",useVisible(){return A.useFieldSchema()["x-component-props"].component==="Slider"},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"number",title:e("Edit Slider Max"),default:(f=o["x-component-props"])==null?void 0:f.max,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{onChange(r){const b=t.componentProps.min;b==null||r>b?(o["x-component-props"].max=r,t.componentProps.max=r):oe.message.warning(e("Cannot be less than or equal to the minimum value"))}}}}},{name:"setSliderMinNumber",useVisible(){return A.useFieldSchema()["x-component-props"].component==="Slider"},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"number",title:e("Edit Slider Min"),default:(f=o["x-component-props"])==null?void 0:f.min,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{onChange(r){const b=t.componentProps.max;b==null||r<b?(o["x-component-props"].min=r,t.componentProps.min=r):oe.message.warning(e("Cannot be greater than or equal to the maximum value"))}}}}},{name:"displayFormat",useVisible(){return C.useIsFieldReadPretty()},useSchema(){const e=A.useFieldSchema(),{fieldSchema:t}=C.useColumnSchema(),o=t||e,f=A.useField(),{t:r}=Z(),{getCollectionJoinField:b}=C.useCollectionManager_deprecated(),v=b(o==null?void 0:o["x-collection-field"])||{},{formatStyle:F,unitConversion:_,unitConversionType:n,separator:c,step:h,addonBefore:s,addonAfter:a}=o["x-component-props"]||{},{step:u}=(v==null?void 0:v.uiSchema["x-component-props"])||{},i=A.createForm({initialValues:{formatStyle:F||"normal",unitConversion:_,separator:c||"0,0.00",step:h||u||"1",addonBefore:s,addonAfter:a}});return{type:"object",title:r("Format"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:r("Format"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:i},properties:{formatStyle:{type:"string",enum:[{value:"normal",label:r("Normal")},{value:"scientifix",label:r("Scientifix notation")}],"x-decorator":"FormItem","x-component":"Select",title:"{{t('Style')}}"},unitConversion:{type:"number","x-decorator":"FormItem","x-component":"InputNumber",title:"{{t('Unit conversion')}}","x-component-props":{style:{width:"100%"},addonBefore:D.jsx(Lc,{unitConversionType:n})}},separator:{type:"string",enum:[{value:"0,0.00",label:r("100,000.00")},{value:"0.0,00",label:r("100.000,00")},{value:"0 0,00",label:r("100 000.00")},{value:"0.00",label:r("100000.00")}],"x-decorator":"FormItem","x-component":"Select",title:"{{t('Separator')}}"},step:{type:"string",title:'{{t("Precision")}}',"x-component":"Select","x-decorator":"FormItem",enum:[{value:"1",label:"1"},{value:"0.1",label:"1.0"},{value:"0.01",label:"1.00"},{value:"0.001",label:"1.000"},{value:"0.0001",label:"1.0000"},{value:"0.00001",label:"1.00000"}]},addonBefore:{type:"string",title:'{{t("Prefix")}}',"x-component":"Input","x-decorator":"FormItem"},addonAfter:{type:"string",title:'{{t("Suffix")}}',"x-component":"Input","x-decorator":"FormItem"},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const l=A.useForm(),p=C.useActionContext();return{onClick(){return ie(this,null,function*(){var x;const y=l.values;o["x-uid"],o["x-component-props"],o["x-component-props"]=T(T({},o["x-component-props"]),y),o["x-component-props"],f.componentProps=o["x-component-props"];const m=f.path.entire.split(".");m.pop();const g=m.join(".");f.query(`${g}.*[0:].${o.name}`).forEach(P=>{P.props.name===o.name&&P.setComponentProps(T({},y))}),(x=p==null?void 0:p.setVisible)==null||x.call(p,!1)})}}}}}}}}}}}}]}),Gc=new _e({name:"editableFieldSettings:component:Radio group",items:[{name:"fieldComponent",useSchema(){var v;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f,b=[{label:e("Checkbox"),value:"Checkbox"},{label:e("Radio group"),value:"Radio group"}];return{type:"string",title:'{{t("Field component")}}',default:((v=r["x-component-props"])==null?void 0:v.mode)||"Radio group","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:b,onChange(F){r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].mode=F,r["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=F}}}}}]}),Hc=new _e({name:"editableFieldSettings:component:Picker",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=C.useIsAddNewForm(),f=C.useFieldComponentName(),{fieldSchema:r,collectionField:b}=C.useColumnSchema(),v=A.useFieldSchema(),F=r||v,_=C.useFieldModeOptions({fieldSchema:r,collectionField:b});return{type:"string",title:'{{t("Field component")}}',default:f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:_,allowClear:!1,showSearch:!1,onChange(n){var c,h;F["x-uid"],F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].mode=n,F["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=n,C.isSubMode(F)&&o&&(F.default=null,(c=t==null?void 0:t.setInitialValue)==null||c.call(t,null),(h=t==null?void 0:t.setValue)==null||h.call(t,null))}}}}},{name:"popupSize",useVisible(){return!C.useIsFieldReadPretty()},useSchema(){var b,v,F;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"string",title:'{{t("Popup size")}}',default:(F=(b=r==null?void 0:r["x-component-props"])==null?void 0:b.openSize)!=null?F:((v=r==null?void 0:r["x-component-props"])==null?void 0:v.openMode)==="modal"?"large":"middle","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Small"),value:"small"},{label:e("Middle"),value:"middle"},{label:e("Large"),value:"large"}],onChange:_=>{t.componentProps.openSize=_,r["x-component-props"]=W(T({},r["x-component-props"]),{openSize:_})}}}}},{name:"allowMultiple",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useCollectionField();return!e&&["hasMany","belongsToMany"].includes(t==null?void 0:t.type)},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:((f=o["x-component-props"])==null?void 0:f.multiple)===void 0?!0:o["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput(r){var v,F;const b=(F=(v=r==null?void 0:r.target)==null?void 0:v.checked)!=null?F:!1;o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},t.componentProps=t.componentProps||{},o["x-component-props"].multiple=b,t.componentProps.multiple=b,o["x-component-props"]}}}}},{name:"titleField",useSchema(){var h,s,a;const{t:e}=Z(),t=A.useField(),{uiSchema:o,fieldSchema:f,collectionField:r}=C.useColumnSchema(),b=C.useTitleFieldOptions(),v=A.useFieldSchema(),F=f||v,_=C.useCollectionField(),n=r||_,c=((h=t==null?void 0:t.componentProps)==null?void 0:h.fieldNames)||((s=F==null?void 0:F["x-component-props"])==null?void 0:s.fieldNames)||((a=o==null?void 0:o["x-component-props"])==null?void 0:a.fieldNames);return{type:"string",title:'{{t("Title field")}}',default:c==null?void 0:c.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:b,allowClear:!1,showSearch:!1,onChange(u){var l,p;F["x-uid"];const i=W(T(T({},(p=(l=n==null?void 0:n.uiSchema)==null?void 0:l["x-component-props"])==null?void 0:p.fieldNames),t.componentProps.fieldNames),{label:u});F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].fieldNames=i,F["x-component-props"],t.componentProps.fieldNames=F["x-component-props"].fieldNames}}}}}]}),zc=new _e({name:"editableFieldSettings:component:Select",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=C.useIsAddNewForm(),f=C.useFieldComponentName(),r=C.useCollectionField(),{fieldSchema:b,collectionField:v}=C.useColumnSchema(),F=A.useFieldSchema(),_=b||F,n=C.useFieldModeOptions({fieldSchema:b,collectionField:v}),c=["select"].includes(r==null?void 0:r.interface),h=[{label:e("Select"),value:"Select"},{label:e("Radio group"),value:"Radio group"}];return{type:"string",title:'{{t("Field component")}}',default:f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:c?h:n,onChange:s=>{var a,u;_["x-uid"],_["x-component-props"]=_["x-component-props"]||{},_["x-component-props"].mode=s,_["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=s,C.isSubMode(_)&&o&&(_.default=null,(a=t==null?void 0:t.setInitialValue)==null||a.call(t,null),(u=t==null?void 0:t.setValue)==null||u.call(t,null))}}}},useVisible:C.useIsMuiltipleAble},{name:"setTheDataScope",useSchema(){var m,g,x;const{t:e}=Z(),t=A.useField(),{getCollectionJoinField:o,getAllCollectionsInheritChain:f}=C.useCollectionManager_deprecated(),{getField:r}=C.useCollection_deprecated(),{form:b}=C.useFormBlockContext(),v=C.useRecord(),{refresh:F}=dt(),{fieldSchema:_,collectionField:n}=C.useColumnSchema(),c=A.useFieldSchema(),h=_||c,s=n||r(h.name)||o(h["x-collection-field"]),{getFields:a}=C.useCollectionFilterOptionsV2(s==null?void 0:s.target),{isInSubForm:u,isInSubTable:i}=C.useFlag()||{},l=C.useVariables(),p=C.useLocalVariables(),d=P=>D.jsx(C.VariableInput,W(T({},P),{form:b,collectionField:P.collectionField,record:v,shouldChange:C.getShouldChange({collectionField:P.collectionField,variables:l,localVariables:p,getAllCollectionsInheritChain:f})})),y=A.createForm({initialValues:{filter:((x=(g=(m=h==null?void 0:h["x-component-props"])==null?void 0:m.service)==null?void 0:g.params)==null?void 0:x.filter)||{}}});return{type:"object",title:e("Set the data scope"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Set the data scope"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:y},properties:{filter:{type:"object",enum:a(),"x-decorator":P=>D.jsx(C.BaseVariableProvider,W(T({},P),{children:D.jsx(C.FlagProvider,{isInSubForm:u,isInSubTable:i,children:P.children})})),"x-decorator-props":{isDisabled:Jc},"x-component":"Filter","x-component-props":{collectionName:s==null?void 0:s.target,dynamicComponent:d}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const P=A.useForm(),S=C.useActionContext();return{onClick(){return ie(this,null,function*(){var w;let O=P.values.filter;O=C.removeNullCondition(O),se.set(h["x-component-props"],"service.params.filter",O),t.componentProps=h["x-component-props"],F(),(w=S==null?void 0:S.setVisible)==null||w.call(S,!1)})}}}}}}}}}}},useVisible(){const e=C.useIsSelectFieldMode(),t=C.useIsFieldReadPretty();return e&&!t}},{name:"setDefaultSortingRules",useSchema(){var c,h,s;const e=A.useField(),{t}=Z(),o=A.useFieldSchema(),{getField:f}=C.useCollection_deprecated(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),b=f(o.name)||r(o["x-collection-field"]),v=C.useSortFields(b==null?void 0:b.target),F=((s=(h=(c=o["x-component-props"])==null?void 0:c.service)==null?void 0:h.params)==null?void 0:s.sort)||[],_=F==null?void 0:F.map(a=>a!=null&&a.startsWith("-")?{field:a.substring(1),direction:"desc"}:{field:a,direction:"asc"}),n=A.createForm({initialValues:{sort:_}});return{type:"object",title:t("Set default sorting rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:t("Set default sorting rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:n},properties:{sort:{type:"array","x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:v,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260},optionLabelProp:"fullLabel"}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:t("ASC"),value:"asc"},{label:t("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:t("Add sort field"),"x-component":"ArrayItems.Addition"}}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const a=A.useForm(),u=C.useActionContext();return{onClick(){return ie(this,null,function*(){var d;const p=a.values.sort.map(y=>y.direction==="desc"?`-${y.field}`:y.field);e.query(new RegExp(`[0-9]+\\.${o.name}$`)).forEach(y=>{se.set(y,"componentProps.service.params.sort",p)}),se.set(o,"x-component-props.service.params.sort",p),e.componentProps=o["x-component-props"],(d=u==null?void 0:u.setVisible)==null||d.call(u,!1)})}}}}}}}}}}},useVisible(){const e=C.useIsSelectFieldMode(),t=C.useIsFieldReadPretty();return e&&!t}},{name:"quickCreate",useSchema(){var b;const{t:e}=Z(),t=C.useAPIClient(),o=A.useField(),f=A.useFieldSchema(),r=V.useMemo(()=>ot({t:e,api:t,current:f,model:o}),[e,t,f,o]);return{type:"string",title:'{{t("Quick create")}}',default:((b=o.componentProps)==null?void 0:b.addMode)||"none","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("None"),value:"none"},{label:e("Dropdown"),value:"quickAdd"},{label:e("Pop-up"),value:"modalAdd"}],onChange:v=>{if(v==="modalAdd"&&!f.reduceProperties((_,n)=>n["x-component"]==="Action"?n:_,null)){const _={"x-action":"create","x-acl-action":"create",title:"{{t('Add new')}}","x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:addNew","x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{openMode:"drawer",type:"default",component:"CreateRecordAction"}};r.insertAdjacent("afterBegin",_)}f["x-uid"],f["x-component-props"]=f["x-component-props"]||{},f["x-component-props"].addMode=v,f["x-component-props"],o.componentProps=o.componentProps||{},o.componentProps.addMode=v}}}},useVisible(){const e=C.useIsAssociationField(),t=C.useIsFieldReadPretty(),{fieldSchema:o}=C.useColumnSchema();return e&&!o&&!t}},{name:"allowMultiple",useSchema(){var b;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"boolean",default:((b=r["x-component-props"])==null?void 0:b.multiple)===void 0?!0:r["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput:v=>{var _,n;const F=(n=(_=v==null?void 0:v.target)==null?void 0:_.checked)!=null?n:!1;r["x-uid"],r["x-component-props"]=r["x-component-props"]||{},t.componentProps=t.componentProps||{},r["x-component-props"].multiple=F,t.componentProps.multiple=F,r["x-component-props"]}}}},useVisible(){const e=C.useIsAssociationField(),t=C.useIsShowMultipleSwitch();return e&&t()}},{name:"titleField",useSchema(){var s,a,u,i;const{t:e}=Z(),t=A.useField(),o=C.useTitleFieldOptions(),{uiSchema:f,fieldSchema:r,collectionField:b}=C.useColumnSchema(),v=A.useFieldSchema(),F=r||v,_=C.useCollectionField(),n=b||_,{getCollectionFields:c}=C.useCollectionManager_deprecated(),h=T(T(T({},(a=(s=n==null?void 0:n.uiSchema)==null?void 0:s["x-component-props"])==null?void 0:a.fieldNames),(u=t==null?void 0:t.componentProps)==null?void 0:u.fieldNames),(i=F==null?void 0:F["x-component-props"])==null?void 0:i.fieldNames);return{type:"string",title:'{{t("Title field")}}',default:h==null?void 0:h.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:o,onChange(l){var m,g,x,P,S;F["x-uid"];const p=W(T(T({},(g=(m=n==null?void 0:n.uiSchema)==null?void 0:m["x-component-props"])==null?void 0:g.fieldNames),(x=F["x-component-props"])==null?void 0:x.fieldNames),{label:l});F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].fieldNames=p;const d=c(n.target).find(j=>j.name===l);d.interface==="m2o"?F["x-component-props"]["x-next-title"]={label:l,collection:d.collectionName}:F["x-component-props"]["x-next-title"]=null,F["x-component-props"],t.componentProps.fieldNames=F["x-component-props"].fieldNames;const y=(S=t.path)==null?void 0:S.splice(((P=t.path)==null?void 0:P.length)-1,1);t.form.query(`${y.concat("*."+F.name)}`).forEach(j=>{j.componentProps.fieldNames=h})}}}},useVisible:C.useIsAssociationField},{name:"enableLink",useSchema(){var b;const{t:e}=Z(),t=A.useField(),{fieldSchema:o}=C.useColumnSchema(),f=A.useFieldSchema(),r=o||f;return{type:"boolean",default:((b=r["x-component-props"])==null?void 0:b.enableLink)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Enable link")}}',"x-component-props":{onInput(v){var _,n;const F=(n=(_=v==null?void 0:v.target)==null?void 0:_.checked)!=null?n:!1;r["x-component-props"]=W(T({},r==null?void 0:r["x-component-props"]),{enableLink:F}),t.componentProps.enableLink=F}}}},useVisible(){const e=C.useIsFieldReadPretty();return C.useIsAssociationField()&&e}}]});function Jc(e){var r,b;const{option:t,collectionField:o,uiSchema:f}=e;return!f||!o?!0:o.interface==="json"||t.target?!1:["input","markdown","richText","textarea","username"].includes(o.interface)?!["string","number"].includes((r=t.schema)==null?void 0:r.type):o.interface&&t.interface?o.interface!==t.interface:(f==null?void 0:f["x-component"])!==((b=t.schema)==null?void 0:b["x-component"])}const Wc=new _e({name:"editableFieldSettings:component:SubTable",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useFieldModeOptions(),r=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:f,allowClear:!1,showSearch:!1,onChange(v){o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].mode=v,o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=v,C.isSubMode(o)&&r&&(o.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"allowAddNewData",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useIsAssociationField();return!e&&t},useSchema(){var o;const e=A.useField(),t=A.useFieldSchema();return{type:"boolean",default:((o=t["x-component-props"])==null?void 0:o.allowAddnew)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow add new")}}',"x-component-props":{onInput(f){var b,v;const r=(v=(b=f==null?void 0:f.target)==null?void 0:b.checked)!=null?v:!1;t["x-uid"],e.componentProps.allowAddnew=r,t["x-component-props"]=t["x-component-props"]||{},t["x-component-props"].allowAddnew=r,t["x-component-props"]}}}}},{name:"allowSelectExistingRecord",useVisible(){return!C.useIsFieldReadPretty()},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:(f=o["x-component-props"])==null?void 0:f.allowSelectExistingRecord,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow selection of existing records")}}',"x-component-props":{onInput(r){var v,F;const b=(F=(v=r==null?void 0:r.target)==null?void 0:v.checked)!=null?F:!1;o["x-uid"],t.componentProps.allowSelectExistingRecord=b,o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].allowSelectExistingRecord=b,o["x-component-props"]}}}}},{name:"SetDefaultSortingRules",useVisible(){const{getCollectionJoinField:e}=C.useCollectionManager_deprecated(),o=A.useFieldSchema()["x-collection-field"],{interface:f}=e(o)||{};return C.useIsFieldReadPretty()&&["m2m","o2m"].includes(f)},useSchema(){const{getCollectionJoinField:e}=C.useCollectionManager_deprecated(),t=A.useField(),o=A.useFieldSchema(),f=o["x-collection-field"],{target:r}=e(f)||{},b=C.useSortFields(r),{t:v}=Z(),F=t.componentProps.sortArr||[],_=F==null?void 0:F.map(c=>c!=null&&c.startsWith("-")?{field:c.substring(1),direction:"desc"}:{field:c,direction:"asc"}),n=A.createForm({initialValues:{sort:_}});return{type:"object",title:v("Set default sorting rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:v("Set default sorting rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:n},properties:{sort:{type:"array","x-component":he.ArrayItems,"x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:b,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260},optionLabelProp:"fullLabel"}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:v("ASC"),value:"asc"},{label:v("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:v("Add sort field"),"x-component":"ArrayItems.Addition"}}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const c=A.useForm(),h=C.useActionContext();return{onClick(){return ie(this,null,function*(){var i;const u=c.values.sort.map(l=>l.direction==="desc"?`-${l.field}`:l.field);t.componentProps.sortArr=u,o["x-component-props"].sortArr=u,(i=h==null?void 0:h.setVisible)==null||i.call(h,!1)})}}}}}}}}}}}},{name:"clicktoselect",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useIsAssociationField();return!e&&t},useSchema(){var u,i,l,p;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useCompile(),r=C.useCollectionManager(),[b,v]=V.useState(((u=o["x-component-props"].quickAddField)==null?void 0:u.value)||"none"),F=r.getCollection(o["x-collection-field"]),_=C.useIsAddNewForm(),n=F.fields.map(d=>{var y;if(d.interface==="m2o"||d.interface==="select")return W(T({},d),{label:f((y=d.uiSchema)==null?void 0:y.title),value:d.name})}).filter(Boolean);n.unshift({label:"none",value:"none"}),r.getCollectionFields(`${o["x-collection-field"]}.${b}`).map(d=>{if(d.interface==="m2o")return W(T({},d),{label:f(d.uiSchema.title),value:d.name})}).filter(Boolean).unshift({label:e("none"),value:"none"});const s=((l=(i=o["x-component-props"])==null?void 0:i.quickAddParentCollection)==null?void 0:l.value)||"none",a=A.createForm({initialValues:{isquickaddtabs:((p=o["x-component-props"])==null?void 0:p.isQuickAdd)||!1,firstLevelselection:b,secondLevelselection:s}});return{type:"object",title:e("Quick create"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Quick create"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:a},properties:{isquickaddtabs:{title:e("Enable quick create"),type:"boolean","x-decorator":"FormItem","x-component":oe.Switch,"x-component-props":{}},firstLevelselection:{title:e("Set Quick Add Tabs"),"x-decorator":"FormItem","x-component":"Select",enum:n,"x-reactions":[{dependencies:["isquickaddtabs"],fulfill:{state:{visible:"{{$deps[0] === true}}"}}}],"x-component-props":{onChange(d){v(d)}}},secondLevelselection:{title:e("Set Quick Add Parent Tabs"),"x-decorator":"FormItem","x-component":C.SecondLevelSelect,"x-reactions":[{dependencies:["firstLevelselection","isquickaddtabs"],fulfill:{state:{visible:'{{$deps[0] !== "none" && $deps[1] === true}}'},schema:{"x-component-props":{firstLevelValue:"{{$deps[0]}}",collectionField:o["x-collection-field"]}}}}]},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const d=A.useForm(),y=C.useActionContext();return{onClick(){return ie(this,null,function*(){var S,j;const{isquickaddtabs:g,firstLevelselection:x,secondLevelselection:P}=d.values;o["x-uid"],t.componentProps.isQuickAdd=g,o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].isQuickAdd=g,o["x-component-props"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].quickAddField={fieldInterface:((S=n.find(O=>O.value===x))==null?void 0:S.interface)||"none",value:x},o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.quickAddField=o["x-component-props"].quickAddField,o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].quickAddParentCollection={collectionField:`${o["x-collection-field"]}.${x}.${P}`,value:P},o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.quickAddParentCollection={collectionField:`${o["x-collection-field"]}.${x}.${P}`,value:P},C.isSubMode(o)&&_&&(o.default=null,t.setInitialValue(null),t.setValue(null)),(j=y==null?void 0:y.setVisible)==null||j.call(y,!1)})}}}}}}}}}}}}]}),Yc=new _e({name:"editableFieldSettings:component:Tag",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=C.useIsAddNewForm(),{fieldSchema:f,collectionField:r}=C.useColumnSchema(),b=C.useFieldModeOptions({fieldSchema:f,collectionField:r}),v=A.useFieldSchema(),F=f||v;return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:b,onChange:n=>{F["x-uid"],F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].mode=n,F["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=n,C.isSubMode(F)&&o&&(F.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"tagColorField",useSchema(){var n,c;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useCollectionField(),{fieldSchema:r,collectionField:b}=C.useColumnSchema(),v=r||o,F=b||f,_=C.useColorFields((n=F==null?void 0:F.target)!=null?n:F==null?void 0:F.targetCollection);return{type:"string",title:'{{t("Tag color field")}}',default:(c=t==null?void 0:t.componentProps)==null?void 0:c.tagColorField,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:_,onChange(h){v["x-uid"],v["x-component-props"]=v["x-component-props"]||{},v["x-component-props"].tagColorField=h,v["x-component-props"],t.componentProps.tagColorField=h}}}}},{name:"titleField",useSchema(){var n,c;const{t:e}=Z(),t=A.useField(),{fieldSchema:o,collectionField:f}=C.useColumnSchema(),r=A.useFieldSchema(),b=o||r,v=C.useTitleFieldOptions(),F=C.useCollectionField(),_=f||F;return{type:"string",title:'{{t("Title field")}}',default:(c=(n=t==null?void 0:t.componentProps)==null?void 0:n.fieldNames)==null?void 0:c.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:v,onChange(h){var a,u;b["x-uid"];const s=W(T(T({},(u=(a=_==null?void 0:_.uiSchema)==null?void 0:a["x-component-props"])==null?void 0:u.fieldNames),t.componentProps.fieldNames),{label:h});b["x-component-props"]=b["x-component-props"]||{},b["x-component-props"].fieldNames=s,b["x-component-props"],t.componentProps.fieldNames=b["x-component-props"].fieldNames}}}}},{name:"enableLink",useVisible(){return A.useField().readPretty},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:((f=o["x-component-props"])==null?void 0:f.enableLink)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Enable link")}}',"x-component-props":{onInput:r=>{var v,F;const b=(F=(v=r==null?void 0:r.target)==null?void 0:v.checked)!=null?F:!1;o["x-component-props"]=W(T({},o==null?void 0:o["x-component-props"]),{enableLink:b}),t.componentProps.enableLink=b}}}}}]}),qc=Ye.createStyles(({css:e})=>({radio:e`
19
19
  .ant-radio-wrapper {
20
20
  display: flex;
21
21
  margin: 5px 0px;
@@ -28,11 +28,11 @@
28
28
  display: flex;
29
29
  margin: 5px 0px;
30
30
  }
31
- `})),qc=new ye({name:"editableFieldSettings:component:UnixTimestamp",items:[{name:"dateDisplayFormat",useSchema(){var u,h,s,a,l,i,c,p,d;const{t:e}=Z(),t=A.useFieldSchema(),{styles:o}=Yc(),f=A.useField(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),b=r(t==null?void 0:t["x-collection-field"])||{},v=(u=t==null?void 0:t["x-component-props"])==null?void 0:u.showTime,F=((h=t==null?void 0:t["x-component-props"])==null?void 0:h.dateFormat)||((a=(s=b==null?void 0:b.uiSchema)==null?void 0:s["x-component-props"])==null?void 0:a.dateFormat)||"YYYY-MM-DD",_=((l=t==null?void 0:t["x-component-props"])==null?void 0:l.timeFormat)||((c=(i=b==null?void 0:b.uiSchema)==null?void 0:i["x-component-props"])==null?void 0:c.timeFormat)||"HH:mm:ss",n=A.createForm({initialValues:{dateFormat:F,showTime:v===void 0?(d=(p=b==null?void 0:b.uiSchema)==null?void 0:p["x-component-props"])==null?void 0:d.showTime:v,timeFormat:_}});return{type:"object",title:e("Date display format"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Date display format"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:n},properties:{dateFormat:{type:"string",title:'{{t("Date format")}}',"x-component":C.ExpiresRadio,"x-decorator":"FormItem","x-decorator-props":{},"x-component-props":{className:o.radio,defaultValue:"dddd",formats:["MMMM Do YYYY","YYYY-MM-DD","MM/DD/YY","YYYY/MM/DD","DD/MM/YYYY"]},enum:[{label:C.DateFormatCom({format:"MMMM Do YYYY"}),value:"MMMM Do YYYY"},{label:C.DateFormatCom({format:"YYYY-MM-DD"}),value:"YYYY-MM-DD"},{label:C.DateFormatCom({format:"MM/DD/YY"}),value:"MM/DD/YY"},{label:C.DateFormatCom({format:"YYYY/MM/DD"}),value:"YYYY/MM/DD"},{label:C.DateFormatCom({format:"DD/MM/YYYY"}),value:"DD/MM/YYYY"},{label:"custom",value:"custom"}]},showTime:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Show time")}}',"x-reactions":[`{{(field) => {
31
+ `})),Kc=new _e({name:"editableFieldSettings:component:UnixTimestamp",items:[{name:"dateDisplayFormat",useSchema(){var c,h,s,a,u,i,l,p,d;const{t:e}=Z(),t=A.useFieldSchema(),{styles:o}=qc(),f=A.useField(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),b=r(t==null?void 0:t["x-collection-field"])||{},v=(c=t==null?void 0:t["x-component-props"])==null?void 0:c.showTime,F=((h=t==null?void 0:t["x-component-props"])==null?void 0:h.dateFormat)||((a=(s=b==null?void 0:b.uiSchema)==null?void 0:s["x-component-props"])==null?void 0:a.dateFormat)||"YYYY-MM-DD",_=((u=t==null?void 0:t["x-component-props"])==null?void 0:u.timeFormat)||((l=(i=b==null?void 0:b.uiSchema)==null?void 0:i["x-component-props"])==null?void 0:l.timeFormat)||"HH:mm:ss",n=A.createForm({initialValues:{dateFormat:F,showTime:v===void 0?(d=(p=b==null?void 0:b.uiSchema)==null?void 0:p["x-component-props"])==null?void 0:d.showTime:v,timeFormat:_}});return{type:"object",title:e("Date display format"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Date display format"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:n},properties:{dateFormat:{type:"string",title:'{{t("Date format")}}',"x-component":C.ExpiresRadio,"x-decorator":"FormItem","x-decorator-props":{},"x-component-props":{className:o.radio,defaultValue:"dddd",formats:["MMMM Do YYYY","YYYY-MM-DD","MM/DD/YY","YYYY/MM/DD","DD/MM/YYYY"]},enum:[{label:C.DateFormatCom({format:"MMMM Do YYYY"}),value:"MMMM Do YYYY"},{label:C.DateFormatCom({format:"YYYY-MM-DD"}),value:"YYYY-MM-DD"},{label:C.DateFormatCom({format:"MM/DD/YY"}),value:"MM/DD/YY"},{label:C.DateFormatCom({format:"YYYY/MM/DD"}),value:"YYYY/MM/DD"},{label:C.DateFormatCom({format:"DD/MM/YYYY"}),value:"DD/MM/YYYY"},{label:"custom",value:"custom"}]},showTime:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Show time")}}',"x-reactions":[`{{(field) => {
32
32
  field.query('.timeFormat').take(f => {
33
33
  f.display = field.value ? 'visible' : 'none';
34
34
  });
35
- }}}`]},timeFormat:{type:"string",title:'{{t("Time format")}}',"x-component":C.ExpiresRadio,"x-decorator":"FormItem","x-decorator-props":{className:o.margin},"x-component-props":{className:o.redRadio,defaultValue:"h:mm a",formats:["hh:mm:ss a","HH:mm:ss"],timeFormat:!0},enum:[{label:C.DateFormatCom({format:"hh:mm:ss a"}),value:"hh:mm:ss a"},{label:C.DateFormatCom({format:"HH:mm:ss"}),value:"HH:mm:ss"},{label:"custom",value:"custom"}]},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const y=A.useForm(),m=C.useActionContext();return{onClick(){return ie(this,null,function*(){var j;const x=y.values;t["x-uid"],t["x-component-props"],t["x-component-props"]=k(k({},t["x-component-props"]),x),t["x-component-props"],f.componentProps=t["x-component-props"];const P=f.path.entire.split(".");P.pop();const S=P.join(".");f.query(`${S}.*[0:].${t.name}`).forEach(O=>{O.props.name===t.name&&O.setComponentProps(k({},x))}),(j=m==null?void 0:m.setVisible)==null||j.call(m,!1)})}}}}}}}}}}}}]}),Kc=new ye({name:"editableFieldSettings:component:Upload.Attachment",items:[{name:"size",useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"string",title:e("Size"),default:((f=t==null?void 0:t.componentProps)==null?void 0:f.size)||"default","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Large"),value:"large"},{label:e("Default"),value:"default"},{label:e("Small"),value:"small"}],onChange(r){o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].size=r,o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.size=r}}}},useVisible(){return C.useIsFieldReadPretty()}},{name:"showCount",useSchema(){var r;const{t:e}=Z(),{fieldSchema:t}=C.useColumnSchema(),o=A.useFieldSchema(),f=t||o;return{type:"number",title:e("Show Count"),default:((r=f==null?void 0:f["x-component-props"])==null?void 0:r.showCount)||1,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{precision:0,min:0,max:5,onChange:b=>{const v=f["x-component-props"]||{};v.showCount=b,f["x-uid"]}}}}}]}),Zc=new ye({name:"editableFieldSettings:component:Nester",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useFieldModeOptions(),r=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:f,allowClear:!1,showSearch:!1,onChange(v){o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].mode=v,o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=v,C.isSubMode(o)&&r&&(o.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"allowMultiple",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useCollectionField();return!e&&["hasMany","belongsToMany"].includes(t==null?void 0:t.type)},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:((f=o["x-component-props"])==null?void 0:f.multiple)===void 0?!0:o["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput(r){var v,F;const b=(F=(v=r==null?void 0:r.target)==null?void 0:v.checked)!=null?F:!1;o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},t.componentProps=t.componentProps||{},o["x-component-props"].multiple=b,t.componentProps.multiple=b,o["x-component-props"]}}}}},{name:"allowDissociate",useVisible(){const{type:e}=C.useFormBlockType();return!C.useIsFormReadPretty()&&e==="update"},useSchema(){var o;const e=A.useField(),t=A.useFieldSchema();return{type:"boolean",default:((o=t["x-component-props"])==null?void 0:o.allowDissociate)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow dissociate")}}',"x-component-props":{onInput(f){var b,v;const r=(v=(b=f==null?void 0:f.target)==null?void 0:b.checked)!=null?v:!1;t["x-uid"],t["x-component-props"]=t["x-component-props"]||{},e.componentProps=e.componentProps||{},t["x-component-props"].allowDissociate=r,e.componentProps.allowDissociate=r,t["x-component-props"]}}}}}]}),Qc=new ye({name:"editableFieldSettings:component:PopoverNester",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),{fieldSchema:o,collectionField:f}=C.useColumnSchema(),r=A.useFieldSchema(),b=o||r,v=C.useFieldModeOptions({fieldSchema:o,collectionField:f}),F=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:v,allowClear:!1,showSearch:!1,onChange(n){b["x-uid"],b["x-component-props"]=b["x-component-props"]||{},b["x-component-props"].mode=n,b["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=n,C.isSubMode(b)&&F&&(b.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"allowMultiple",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useCollectionField();return!e&&["hasMany","belongsToMany"].includes(t==null?void 0:t.type)},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:((f=o["x-component-props"])==null?void 0:f.multiple)===void 0?!0:o["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput(r){var v,F;const b=(F=(v=r==null?void 0:r.target)==null?void 0:v.checked)!=null?F:!1;o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},t.componentProps=t.componentProps||{},o["x-component-props"].multiple=b,t.componentProps.multiple=b,o["x-component-props"]}}}}},{name:"titleField",useSchema(){var h,s,a;const{t:e}=Z(),t=A.useField(),{uiSchema:o,fieldSchema:f,collectionField:r}=C.useColumnSchema(),b=C.useTitleFieldOptions(),v=A.useFieldSchema(),F=f||v,_=C.useCollectionField(),n=r||_,u=((h=t==null?void 0:t.componentProps)==null?void 0:h.fieldNames)||((s=F==null?void 0:F["x-component-props"])==null?void 0:s.fieldNames)||((a=o==null?void 0:o["x-component-props"])==null?void 0:a.fieldNames);return{type:"string",title:'{{t("Title field")}}',default:u==null?void 0:u.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:b,allowClear:!1,showSearch:!1,onChange(l){var c,p;F["x-uid"];const i=W(k(k({},(p=(c=n==null?void 0:n.uiSchema)==null?void 0:c["x-component-props"])==null?void 0:p.fieldNames),t.componentProps.fieldNames),{label:l});F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].fieldNames=i,F["x-component-props"],t.componentProps.fieldNames=F["x-component-props"].fieldNames}}}}}]}),Mn=V.createContext({refreshKey:A.uid(),refresh:()=>{}}),Xc=({children:e})=>{const[t,o]=V.useState(A.uid()),f=()=>o(A.uid());return D.jsx(Mn.Provider,{value:{refreshKey:t,refresh:f},children:e})},wt=()=>V.useContext(Mn);function _e(e,t){$c(e)&&(e="100%");var o=eu(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function dt(e){return Math.min(1,Math.max(0,e))}function $c(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function eu(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Rn(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function mt(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Ye(e){return e.length===1?"0"+e:String(e)}function tu(e,t,o){return{r:_e(e,255)*255,g:_e(t,255)*255,b:_e(o,255)*255}}function Nn(e,t,o){e=_e(e,255),t=_e(t,255),o=_e(o,255);var f=Math.max(e,t,o),r=Math.min(e,t,o),b=0,v=0,F=(f+r)/2;if(f===r)v=0,b=0;else{var _=f-r;switch(v=F>.5?_/(2-f-r):_/(f+r),f){case e:b=(t-o)/_+(t<o?6:0);break;case t:b=(o-e)/_+2;break;case o:b=(e-t)/_+4;break}b/=6}return{h:b,s:v,l:F}}function Et(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*(6*o):o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function ru(e,t,o){var f,r,b;if(e=_e(e,360),t=_e(t,100),o=_e(o,100),t===0)r=o,b=o,f=o;else{var v=o<.5?o*(1+t):o+t-o*t,F=2*o-v;f=Et(F,v,e+1/3),r=Et(F,v,e),b=Et(F,v,e-1/3)}return{r:f*255,g:r*255,b:b*255}}function Tn(e,t,o){e=_e(e,255),t=_e(t,255),o=_e(o,255);var f=Math.max(e,t,o),r=Math.min(e,t,o),b=0,v=f,F=f-r,_=f===0?0:F/f;if(f===r)b=0;else{switch(f){case e:b=(t-o)/F+(t<o?6:0);break;case t:b=(o-e)/F+2;break;case o:b=(e-t)/F+4;break}b/=6}return{h:b,s:_,v}}function ou(e,t,o){e=_e(e,360)*6,t=_e(t,100),o=_e(o,100);var f=Math.floor(e),r=e-f,b=o*(1-t),v=o*(1-r*t),F=o*(1-(1-r)*t),_=f%6,n=[o,v,b,b,F,o][_],u=[F,o,o,v,b,b][_],h=[b,b,F,o,o,v][_];return{r:n*255,g:u*255,b:h*255}}function kn(e,t,o,f){var r=[Ye(Math.round(e).toString(16)),Ye(Math.round(t).toString(16)),Ye(Math.round(o).toString(16))];return f&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function nu(e,t,o,f,r){var b=[Ye(Math.round(e).toString(16)),Ye(Math.round(t).toString(16)),Ye(Math.round(o).toString(16)),Ye(su(f))];return r&&b[0].startsWith(b[0].charAt(1))&&b[1].startsWith(b[1].charAt(1))&&b[2].startsWith(b[2].charAt(1))&&b[3].startsWith(b[3].charAt(1))?b[0].charAt(0)+b[1].charAt(0)+b[2].charAt(0)+b[3].charAt(0):b.join("")}function su(e){return Math.round(parseFloat(e)*255).toString(16)}function Vn(e){return Ce(e)/255}function Ce(e){return parseInt(e,16)}function au(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var jt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function iu(e){var t={r:0,g:0,b:0},o=1,f=null,r=null,b=null,v=!1,F=!1;return typeof e=="string"&&(e=lu(e)),typeof e=="object"&&(Ve(e.r)&&Ve(e.g)&&Ve(e.b)?(t=tu(e.r,e.g,e.b),v=!0,F=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ve(e.h)&&Ve(e.s)&&Ve(e.v)?(f=mt(e.s),r=mt(e.v),t=ou(e.h,f,r),v=!0,F="hsv"):Ve(e.h)&&Ve(e.s)&&Ve(e.l)&&(f=mt(e.s),b=mt(e.l),t=ru(e.h,f,b),v=!0,F="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=Rn(o),{ok:v,format:e.format||F,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:o}}var cu="[-\\+]?\\d+%?",uu="[-\\+]?\\d*\\.\\d+%?",ze="(?:".concat(uu,")|(?:").concat(cu,")"),It="[\\s|\\(]+(".concat(ze,")[,|\\s]+(").concat(ze,")[,|\\s]+(").concat(ze,")\\s*\\)?"),At="[\\s|\\(]+(".concat(ze,")[,|\\s]+(").concat(ze,")[,|\\s]+(").concat(ze,")[,|\\s]+(").concat(ze,")\\s*\\)?"),Re={CSS_UNIT:new RegExp(ze),rgb:new RegExp("rgb"+It),rgba:new RegExp("rgba"+At),hsl:new RegExp("hsl"+It),hsla:new RegExp("hsla"+At),hsv:new RegExp("hsv"+It),hsva:new RegExp("hsva"+At),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function lu(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(jt[e])e=jt[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=Re.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=Re.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=Re.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=Re.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=Re.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=Re.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=Re.hex8.exec(e),o?{r:Ce(o[1]),g:Ce(o[2]),b:Ce(o[3]),a:Vn(o[4]),format:t?"name":"hex8"}:(o=Re.hex6.exec(e),o?{r:Ce(o[1]),g:Ce(o[2]),b:Ce(o[3]),format:t?"name":"hex"}:(o=Re.hex4.exec(e),o?{r:Ce(o[1]+o[1]),g:Ce(o[2]+o[2]),b:Ce(o[3]+o[3]),a:Vn(o[4]+o[4]),format:t?"name":"hex8"}:(o=Re.hex3.exec(e),o?{r:Ce(o[1]+o[1]),g:Ce(o[2]+o[2]),b:Ce(o[3]+o[3]),format:t?"name":"hex"}:!1)))))))))}function Ve(e){return!!Re.CSS_UNIT.exec(String(e))}var Dt=function(){function e(t,o){t===void 0&&(t=""),o===void 0&&(o={});var f;if(t instanceof e)return t;typeof t=="number"&&(t=au(t)),this.originalInput=t;var r=iu(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(f=o.format)!==null&&f!==void 0?f:r.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),o,f,r,b=t.r/255,v=t.g/255,F=t.b/255;return b<=.03928?o=b/12.92:o=Math.pow((b+.055)/1.055,2.4),v<=.03928?f=v/12.92:f=Math.pow((v+.055)/1.055,2.4),F<=.03928?r=F/12.92:r=Math.pow((F+.055)/1.055,2.4),.2126*o+.7152*f+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Rn(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Tn(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Tn(this.r,this.g,this.b),o=Math.round(t.h*360),f=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(o,", ").concat(f,"%, ").concat(r,"%)"):"hsva(".concat(o,", ").concat(f,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Nn(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Nn(this.r,this.g,this.b),o=Math.round(t.h*360),f=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(o,", ").concat(f,"%, ").concat(r,"%)"):"hsla(".concat(o,", ").concat(f,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),kn(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),nu(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),o=Math.round(this.g),f=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(o,", ").concat(f,")"):"rgba(".concat(t,", ").concat(o,", ").concat(f,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(o){return"".concat(Math.round(_e(o,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(o){return Math.round(_e(o,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+kn(this.r,this.g,this.b,!1),o=0,f=Object.entries(jt);o<f.length;o++){var r=f[o],b=r[0],v=r[1];if(t===v)return b}return!1},e.prototype.toString=function(t){var o=!!t;t=t!=null?t:this.format;var f=!1,r=this.a<1&&this.a>=0,b=!o&&r&&(t.startsWith("hex")||t==="name");return b?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(f=this.toRgbString()),t==="prgb"&&(f=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(f=this.toHexString()),t==="hex3"&&(f=this.toHexString(!0)),t==="hex4"&&(f=this.toHex8String(!0)),t==="hex8"&&(f=this.toHex8String()),t==="name"&&(f=this.toName()),t==="hsl"&&(f=this.toHslString()),t==="hsv"&&(f=this.toHsvString()),f||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l+=t/100,o.l=dt(o.l),new e(o)},e.prototype.brighten=function(t){t===void 0&&(t=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(t/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(t/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(t/100)))),new e(o)},e.prototype.darken=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l-=t/100,o.l=dt(o.l),new e(o)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s-=t/100,o.s=dt(o.s),new e(o)},e.prototype.saturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s+=t/100,o.s=dt(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var o=this.toHsl(),f=(o.h+t)%360;return o.h=f<0?360+f:f,new e(o)},e.prototype.mix=function(t,o){o===void 0&&(o=50);var f=this.toRgb(),r=new e(t).toRgb(),b=o/100,v={r:(r.r-f.r)*b+f.r,g:(r.g-f.g)*b+f.g,b:(r.b-f.b)*b+f.b,a:(r.a-f.a)*b+f.a};return new e(v)},e.prototype.analogous=function(t,o){t===void 0&&(t=6),o===void 0&&(o=30);var f=this.toHsl(),r=360/o,b=[this];for(f.h=(f.h-(r*t>>1)+720)%360;--t;)f.h=(f.h+r)%360,b.push(new e(f));return b},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var o=this.toHsv(),f=o.h,r=o.s,b=o.v,v=[],F=1/t;t--;)v.push(new e({h:f,s:r,v:b})),b=(b+F)%1;return v},e.prototype.splitcomplement=function(){var t=this.toHsl(),o=t.h;return[this,new e({h:(o+72)%360,s:t.s,l:t.l}),new e({h:(o+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var o=this.toRgb(),f=new e(t).toRgb(),r=o.a+f.a*(1-o.a);return new e({r:(o.r*o.a+f.r*f.a*(1-o.a))/r,g:(o.g*o.a+f.g*f.a*(1-o.a))/r,b:(o.b*o.a+f.b*f.a*(1-o.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var o=this.toHsl(),f=o.h,r=[this],b=360/t,v=1;v<t;v++)r.push(new e({h:(f+v*b)%360,s:o.s,l:o.l}));return r},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();const pu=e=>{const{refresh:t}=C.useDesignable(),o=C.useAPIClient(),{t:f}=C.useTranslation();return r=>{var i,c,p,d,y,m,g,x,P,S,j,O,w,I,E,R,N,L,K,te;const{active:b,over:v}=r,F=(c=(i=b==null?void 0:b.data)==null?void 0:i.current)==null?void 0:c.schema,_=(d=(p=v==null?void 0:v.data)==null?void 0:p.current)==null?void 0:d.schema,n=(m=(y=v==null?void 0:v.data)==null?void 0:y.current)==null?void 0:m.insertAdjacent,u=(x=(g=v==null?void 0:v.data)==null?void 0:g.current)==null?void 0:x.breakRemoveOn,h=(S=(P=v==null?void 0:v.data)==null?void 0:P.current)==null?void 0:S.wrapSchema,s=(O=(j=v==null?void 0:v.data)==null?void 0:j.current)==null?void 0:O.onSuccess,a=(E=(I=(w=v==null?void 0:v.data)==null?void 0:w.current)==null?void 0:I.removeParentsIfNoChildren)!=null?E:!0;if(!F||!_){(R=e==null?void 0:e.onDragEnd)==null||R.call(e,r);return}if(F===_){(N=e==null?void 0:e.onDragEnd)==null||N.call(e,r);return}if(F.parent===_&&n==="beforeEnd"){(L=e==null?void 0:e.onDragEnd)==null||L.call(e,r);return}const l=rt({t:f,api:o,refresh:t,current:_});if(F.parent===_.parent){l.insertBeforeBeginOrAfterEnd(F),(K=e==null?void 0:e.onDragEnd)==null||K.call(e,r);return}if(n){l.insertAdjacent(n,F,{wrap:h,breakRemoveOn:u,removeParentsIfNoChildren:a,onSuccess:s}),(te=e==null?void 0:e.onDragEnd)==null||te.call(e,r);return}}},du=A.observer(e=>{const{t}=C.useTranslation(),[o,f]=V.useState(!0);return D.jsxs(xe.DndContext,W(k({collisionDetection:xe.rectIntersection},e),{onDragStart:r=>{var F,_,n;const{active:b}=r,v=(_=(F=b==null?void 0:b.data)==null?void 0:F.current)==null?void 0:_.schema;f(!!v),e!=null&&e.onDragStart&&((n=e==null?void 0:e.onDragStart)==null||n.call(e,r))},onDragEnd:pu(e),children:[D.jsx(xe.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"}}),e.children]}))},{displayName:"DndContext"}),ot=We.createStyles(({css:e,token:t})=>({editableGrid:e`
35
+ }}}`]},timeFormat:{type:"string",title:'{{t("Time format")}}',"x-component":C.ExpiresRadio,"x-decorator":"FormItem","x-decorator-props":{className:o.margin},"x-component-props":{className:o.redRadio,defaultValue:"h:mm a",formats:["hh:mm:ss a","HH:mm:ss"],timeFormat:!0},enum:[{label:C.DateFormatCom({format:"hh:mm:ss a"}),value:"hh:mm:ss a"},{label:C.DateFormatCom({format:"HH:mm:ss"}),value:"HH:mm:ss"},{label:"custom",value:"custom"}]},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const y=A.useForm(),m=C.useActionContext();return{onClick(){return ie(this,null,function*(){var j;const x=y.values;t["x-uid"],t["x-component-props"],t["x-component-props"]=T(T({},t["x-component-props"]),x),t["x-component-props"],f.componentProps=t["x-component-props"];const P=f.path.entire.split(".");P.pop();const S=P.join(".");f.query(`${S}.*[0:].${t.name}`).forEach(O=>{O.props.name===t.name&&O.setComponentProps(T({},x))}),(j=m==null?void 0:m.setVisible)==null||j.call(m,!1)})}}}}}}}}}}}}]}),Zc=new _e({name:"editableFieldSettings:component:Upload.Attachment",items:[{name:"size",useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"string",title:e("Size"),default:((f=t==null?void 0:t.componentProps)==null?void 0:f.size)||"default","x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Large"),value:"large"},{label:e("Default"),value:"default"},{label:e("Small"),value:"small"}],onChange(r){o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].size=r,o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.size=r}}}},useVisible(){return C.useIsFieldReadPretty()}},{name:"showCount",useSchema(){var r;const{t:e}=Z(),{fieldSchema:t}=C.useColumnSchema(),o=A.useFieldSchema(),f=t||o;return{type:"number",title:e("Show Count"),default:((r=f==null?void 0:f["x-component-props"])==null?void 0:r.showCount)||1,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{precision:0,min:0,max:5,onChange:b=>{const v=f["x-component-props"]||{};v.showCount=b,f["x-uid"]}}}}}]}),Qc=new _e({name:"editableFieldSettings:component:Nester",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useFieldModeOptions(),r=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:f,allowClear:!1,showSearch:!1,onChange(v){o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].mode=v,o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=v,C.isSubMode(o)&&r&&(o.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"allowMultiple",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useCollectionField();return!e&&["hasMany","belongsToMany"].includes(t==null?void 0:t.type)},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:((f=o["x-component-props"])==null?void 0:f.multiple)===void 0?!0:o["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput(r){var v,F;const b=(F=(v=r==null?void 0:r.target)==null?void 0:v.checked)!=null?F:!1;o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},t.componentProps=t.componentProps||{},o["x-component-props"].multiple=b,t.componentProps.multiple=b,o["x-component-props"]}}}}},{name:"allowDissociate",useVisible(){const{type:e}=C.useFormBlockType();return!C.useIsFormReadPretty()&&e==="update"},useSchema(){var o;const e=A.useField(),t=A.useFieldSchema();return{type:"boolean",default:((o=t["x-component-props"])==null?void 0:o.allowDissociate)!==!1,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow dissociate")}}',"x-component-props":{onInput(f){var b,v;const r=(v=(b=f==null?void 0:f.target)==null?void 0:b.checked)!=null?v:!1;t["x-uid"],t["x-component-props"]=t["x-component-props"]||{},e.componentProps=e.componentProps||{},t["x-component-props"].allowDissociate=r,e.componentProps.allowDissociate=r,t["x-component-props"]}}}}}]}),Xc=new _e({name:"editableFieldSettings:component:PopoverNester",items:[{name:"fieldComponent",useSchema(){const{t:e}=Z(),t=A.useField(),{fieldSchema:o,collectionField:f}=C.useColumnSchema(),r=A.useFieldSchema(),b=o||r,v=C.useFieldModeOptions({fieldSchema:o,collectionField:f}),F=C.useIsAddNewForm();return{type:"string",title:'{{t("Field component")}}',default:C.useFieldComponentName(),"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:v,allowClear:!1,showSearch:!1,onChange(n){b["x-uid"],b["x-component-props"]=b["x-component-props"]||{},b["x-component-props"].mode=n,b["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=n,C.isSubMode(b)&&F&&(b.default=null,t.setInitialValue(null),t.setValue(null))}}}}},{name:"allowMultiple",useVisible(){const e=C.useIsFieldReadPretty(),t=C.useCollectionField();return!e&&["hasMany","belongsToMany"].includes(t==null?void 0:t.type)},useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:((f=o["x-component-props"])==null?void 0:f.multiple)===void 0?!0:o["x-component-props"].multiple,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Allow multiple")}}',"x-component-props":{onInput(r){var v,F;const b=(F=(v=r==null?void 0:r.target)==null?void 0:v.checked)!=null?F:!1;o["x-uid"],o["x-component-props"]=o["x-component-props"]||{},t.componentProps=t.componentProps||{},o["x-component-props"].multiple=b,t.componentProps.multiple=b,o["x-component-props"]}}}}},{name:"titleField",useSchema(){var h,s,a;const{t:e}=Z(),t=A.useField(),{uiSchema:o,fieldSchema:f,collectionField:r}=C.useColumnSchema(),b=C.useTitleFieldOptions(),v=A.useFieldSchema(),F=f||v,_=C.useCollectionField(),n=r||_,c=((h=t==null?void 0:t.componentProps)==null?void 0:h.fieldNames)||((s=F==null?void 0:F["x-component-props"])==null?void 0:s.fieldNames)||((a=o==null?void 0:o["x-component-props"])==null?void 0:a.fieldNames);return{type:"string",title:'{{t("Title field")}}',default:c==null?void 0:c.label,"x-decorator":"FormItem","x-component":"Select","x-component-props":{options:b,allowClear:!1,showSearch:!1,onChange(u){var l,p;F["x-uid"];const i=W(T(T({},(p=(l=n==null?void 0:n.uiSchema)==null?void 0:l["x-component-props"])==null?void 0:p.fieldNames),t.componentProps.fieldNames),{label:u});F["x-component-props"]=F["x-component-props"]||{},F["x-component-props"].fieldNames=i,F["x-component-props"],t.componentProps.fieldNames=F["x-component-props"].fieldNames}}}}}]}),Rn=V.createContext({refreshKey:A.uid(),refresh:()=>{}}),$c=({children:e})=>{const[t,o]=V.useState(A.uid()),f=()=>o(A.uid());return D.jsx(Rn.Provider,{value:{refreshKey:t,refresh:f},children:e})},It=()=>V.useContext(Rn);function xe(e,t){el(e)&&(e="100%");const o=tl(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function mt(e){return Math.min(1,Math.max(0,e))}function el(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function tl(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Nn(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ft(e){return Number(e)<=1?`${Number(e)*100}%`:e}function qe(e){return e.length===1?"0"+e:String(e)}function rl(e,t,o){return{r:xe(e,255)*255,g:xe(t,255)*255,b:xe(o,255)*255}}function kn(e,t,o){e=xe(e,255),t=xe(t,255),o=xe(o,255);const f=Math.max(e,t,o),r=Math.min(e,t,o);let b=0,v=0;const F=(f+r)/2;if(f===r)v=0,b=0;else{const _=f-r;switch(v=F>.5?_/(2-f-r):_/(f+r),f){case e:b=(t-o)/_+(t<o?6:0);break;case t:b=(o-e)/_+2;break;case o:b=(e-t)/_+4;break}b/=6}return{h:b,s:v,l:F}}function At(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*(6*o):o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function ol(e,t,o){let f,r,b;if(e=xe(e,360),t=xe(t,100),o=xe(o,100),t===0)r=o,b=o,f=o;else{const v=o<.5?o*(1+t):o+t-o*t,F=2*o-v;f=At(F,v,e+1/3),r=At(F,v,e),b=At(F,v,e-1/3)}return{r:f*255,g:r*255,b:b*255}}function Tn(e,t,o){e=xe(e,255),t=xe(t,255),o=xe(o,255);const f=Math.max(e,t,o),r=Math.min(e,t,o);let b=0;const v=f,F=f-r,_=f===0?0:F/f;if(f===r)b=0;else{switch(f){case e:b=(t-o)/F+(t<o?6:0);break;case t:b=(o-e)/F+2;break;case o:b=(e-t)/F+4;break}b/=6}return{h:b,s:_,v}}function nl(e,t,o){e=xe(e,360)*6,t=xe(t,100),o=xe(o,100);const f=Math.floor(e),r=e-f,b=o*(1-t),v=o*(1-r*t),F=o*(1-(1-r)*t),_=f%6,n=[o,v,b,b,F,o][_],c=[F,o,o,v,b,b][_],h=[b,b,F,o,o,v][_];return{r:n*255,g:c*255,b:h*255}}function Vn(e,t,o,f){const r=[qe(Math.round(e).toString(16)),qe(Math.round(t).toString(16)),qe(Math.round(o).toString(16))];return f&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function sl(e,t,o,f,r){const b=[qe(Math.round(e).toString(16)),qe(Math.round(t).toString(16)),qe(Math.round(o).toString(16)),qe(il(f))];return r&&b[0].startsWith(b[0].charAt(1))&&b[1].startsWith(b[1].charAt(1))&&b[2].startsWith(b[2].charAt(1))&&b[3].startsWith(b[3].charAt(1))?b[0].charAt(0)+b[1].charAt(0)+b[2].charAt(0)+b[3].charAt(0):b.join("")}function al(e,t,o,f){const r=e/100,b=t/100,v=o/100,F=f/100,_=255*(1-r)*(1-F),n=255*(1-b)*(1-F),c=255*(1-v)*(1-F);return{r:_,g:n,b:c}}function Bn(e,t,o){let f=1-e/255,r=1-t/255,b=1-o/255,v=Math.min(f,r,b);return v===1?(f=0,r=0,b=0):(f=(f-v)/(1-v)*100,r=(r-v)/(1-v)*100,b=(b-v)/(1-v)*100),v*=100,{c:Math.round(f),m:Math.round(r),y:Math.round(b),k:Math.round(v)}}function il(e){return Math.round(parseFloat(e)*255).toString(16)}function Ln(e){return we(e)/255}function we(e){return parseInt(e,16)}function cl(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}const Dt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ll(e){let t={r:0,g:0,b:0},o=1,f=null,r=null,b=null,v=!1,F=!1;return typeof e=="string"&&(e=ul(e)),typeof e=="object"&&(Ee(e.r)&&Ee(e.g)&&Ee(e.b)?(t=rl(e.r,e.g,e.b),v=!0,F=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ee(e.h)&&Ee(e.s)&&Ee(e.v)?(f=ft(e.s),r=ft(e.v),t=nl(e.h,f,r),v=!0,F="hsv"):Ee(e.h)&&Ee(e.s)&&Ee(e.l)?(f=ft(e.s),b=ft(e.l),t=ol(e.h,f,b),v=!0,F="hsl"):Ee(e.c)&&Ee(e.m)&&Ee(e.y)&&Ee(e.k)&&(t=al(e.c,e.m,e.y,e.k),v=!0,F="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=Nn(o),{ok:v,format:e.format||F,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:o}}const Je="(?:"+"[-\\+]?\\d*\\.\\d+%?"+")|(?:"+"[-\\+]?\\d+%?"+")",Mt="[\\s|\\(]+("+Je+")[,|\\s]+("+Je+")[,|\\s]+("+Je+")\\s*\\)?",ht="[\\s|\\(]+("+Je+")[,|\\s]+("+Je+")[,|\\s]+("+Je+")[,|\\s]+("+Je+")\\s*\\)?",De={CSS_UNIT:new RegExp(Je),rgb:new RegExp("rgb"+Mt),rgba:new RegExp("rgba"+ht),hsl:new RegExp("hsl"+Mt),hsla:new RegExp("hsla"+ht),hsv:new RegExp("hsv"+Mt),hsva:new RegExp("hsva"+ht),cmyk:new RegExp("cmyk"+ht),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ul(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(Dt[e])e=Dt[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let o=De.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=De.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=De.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=De.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=De.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=De.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=De.cmyk.exec(e),o?{c:o[1],m:o[2],y:o[3],k:o[4]}:(o=De.hex8.exec(e),o?{r:we(o[1]),g:we(o[2]),b:we(o[3]),a:Ln(o[4]),format:t?"name":"hex8"}:(o=De.hex6.exec(e),o?{r:we(o[1]),g:we(o[2]),b:we(o[3]),format:t?"name":"hex"}:(o=De.hex4.exec(e),o?{r:we(o[1]+o[1]),g:we(o[2]+o[2]),b:we(o[3]+o[3]),a:Ln(o[4]+o[4]),format:t?"name":"hex8"}:(o=De.hex3.exec(e),o?{r:we(o[1]+o[1]),g:we(o[2]+o[2]),b:we(o[3]+o[3]),format:t?"name":"hex"}:!1))))))))))}function Ee(e){return typeof e=="number"?!Number.isNaN(e):De.CSS_UNIT.test(e)}class ve{constructor(t="",o={}){var r;if(t instanceof ve)return t;typeof t=="number"&&(t=cl(t)),this.originalInput=t;const f=ll(t);this.originalInput=t,this.r=f.r,this.g=f.g,this.b=f.b,this.a=f.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=o.format)!=null?r:f.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=f.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let o,f,r;const b=t.r/255,v=t.g/255,F=t.b/255;return b<=.03928?o=b/12.92:o=Math.pow((b+.055)/1.055,2.4),v<=.03928?f=v/12.92:f=Math.pow((v+.055)/1.055,2.4),F<=.03928?r=F/12.92:r=Math.pow((F+.055)/1.055,2.4),.2126*o+.7152*f+.0722*r}getAlpha(){return this.a}setAlpha(t){return this.a=Nn(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=Tn(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=Tn(this.r,this.g,this.b),o=Math.round(t.h*360),f=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?`hsv(${o}, ${f}%, ${r}%)`:`hsva(${o}, ${f}%, ${r}%, ${this.roundA})`}toHsl(){const t=kn(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=kn(this.r,this.g,this.b),o=Math.round(t.h*360),f=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?`hsl(${o}, ${f}%, ${r}%)`:`hsla(${o}, ${f}%, ${r}%, ${this.roundA})`}toHex(t=!1){return Vn(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return sl(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),o=Math.round(this.g),f=Math.round(this.b);return this.a===1?`rgb(${t}, ${o}, ${f})`:`rgba(${t}, ${o}, ${f}, ${this.roundA})`}toPercentageRgb(){const t=o=>`${Math.round(xe(o,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=o=>Math.round(xe(o,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return T({},Bn(this.r,this.g,this.b))}toCmykString(){const{c:t,m:o,y:f,k:r}=Bn(this.r,this.g,this.b);return`cmyk(${t}, ${o}, ${f}, ${r})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+Vn(this.r,this.g,this.b,!1);for(const[o,f]of Object.entries(Dt))if(t===f)return o;return!1}toString(t){const o=!!t;t=t!=null?t:this.format;let f=!1;const r=this.a<1&&this.a>=0;return!o&&r&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(f=this.toRgbString()),t==="prgb"&&(f=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(f=this.toHexString()),t==="hex3"&&(f=this.toHexString(!0)),t==="hex4"&&(f=this.toHex8String(!0)),t==="hex8"&&(f=this.toHex8String()),t==="name"&&(f=this.toName()),t==="hsl"&&(f=this.toHslString()),t==="hsv"&&(f=this.toHsvString()),t==="cmyk"&&(f=this.toCmykString()),f||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new ve(this.toString())}lighten(t=10){const o=this.toHsl();return o.l+=t/100,o.l=mt(o.l),new ve(o)}brighten(t=10){const o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(t/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(t/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(t/100)))),new ve(o)}darken(t=10){const o=this.toHsl();return o.l-=t/100,o.l=mt(o.l),new ve(o)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const o=this.toHsl();return o.s-=t/100,o.s=mt(o.s),new ve(o)}saturate(t=10){const o=this.toHsl();return o.s+=t/100,o.s=mt(o.s),new ve(o)}greyscale(){return this.desaturate(100)}spin(t){const o=this.toHsl(),f=(o.h+t)%360;return o.h=f<0?360+f:f,new ve(o)}mix(t,o=50){const f=this.toRgb(),r=new ve(t).toRgb(),b=o/100,v={r:(r.r-f.r)*b+f.r,g:(r.g-f.g)*b+f.g,b:(r.b-f.b)*b+f.b,a:(r.a-f.a)*b+f.a};return new ve(v)}analogous(t=6,o=30){const f=this.toHsl(),r=360/o,b=[this];for(f.h=(f.h-(r*t>>1)+720)%360;--t;)f.h=(f.h+r)%360,b.push(new ve(f));return b}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new ve(t)}monochromatic(t=6){const o=this.toHsv(),{h:f}=o,{s:r}=o;let{v:b}=o;const v=[],F=1/t;for(;t--;)v.push(new ve({h:f,s:r,v:b})),b=(b+F)%1;return v}splitcomplement(){const t=this.toHsl(),{h:o}=t;return[this,new ve({h:(o+72)%360,s:t.s,l:t.l}),new ve({h:(o+216)%360,s:t.s,l:t.l})]}onBackground(t){const o=this.toRgb(),f=new ve(t).toRgb(),r=o.a+f.a*(1-o.a);return new ve({r:(o.r*o.a+f.r*f.a*(1-o.a))/r,g:(o.g*o.a+f.g*f.a*(1-o.a))/r,b:(o.b*o.a+f.b*f.a*(1-o.a))/r,a:r})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const o=this.toHsl(),{h:f}=o,r=[this],b=360/t;for(let v=1;v<t;v++)r.push(new ve({h:(f+v*b)%360,s:o.s,l:o.l}));return r}equals(t){const o=new ve(t);return this.format==="cmyk"||o.format==="cmyk"?this.toCmykString()===o.toCmykString():this.toRgbString()===o.toRgbString()}}const pl=e=>{const{refresh:t}=C.useDesignable(),o=C.useAPIClient(),{t:f}=C.useTranslation();return r=>{var i,l,p,d,y,m,g,x,P,S,j,O,w,I,E,R,N,L,q,te;const{active:b,over:v}=r,F=(l=(i=b==null?void 0:b.data)==null?void 0:i.current)==null?void 0:l.schema,_=(d=(p=v==null?void 0:v.data)==null?void 0:p.current)==null?void 0:d.schema,n=(m=(y=v==null?void 0:v.data)==null?void 0:y.current)==null?void 0:m.insertAdjacent,c=(x=(g=v==null?void 0:v.data)==null?void 0:g.current)==null?void 0:x.breakRemoveOn,h=(S=(P=v==null?void 0:v.data)==null?void 0:P.current)==null?void 0:S.wrapSchema,s=(O=(j=v==null?void 0:v.data)==null?void 0:j.current)==null?void 0:O.onSuccess,a=(E=(I=(w=v==null?void 0:v.data)==null?void 0:w.current)==null?void 0:I.removeParentsIfNoChildren)!=null?E:!0;if(!F||!_){(R=e==null?void 0:e.onDragEnd)==null||R.call(e,r);return}if(F===_){(N=e==null?void 0:e.onDragEnd)==null||N.call(e,r);return}if(F.parent===_&&n==="beforeEnd"){(L=e==null?void 0:e.onDragEnd)==null||L.call(e,r);return}const u=ot({t:f,api:o,refresh:t,current:_});if(F.parent===_.parent){u.insertBeforeBeginOrAfterEnd(F),(q=e==null?void 0:e.onDragEnd)==null||q.call(e,r);return}if(n){u.insertAdjacent(n,F,{wrap:h,breakRemoveOn:c,removeParentsIfNoChildren:a,onSuccess:s}),(te=e==null?void 0:e.onDragEnd)==null||te.call(e,r);return}}},dl=A.observer(e=>{const{t}=C.useTranslation(),[o,f]=V.useState(!0);return D.jsxs(ge.DndContext,W(T({collisionDetection:ge.rectIntersection},e),{onDragStart:r=>{var F,_,n;const{active:b}=r,v=(_=(F=b==null?void 0:b.data)==null?void 0:F.current)==null?void 0:_.schema;f(!!v),e!=null&&e.onDragStart&&((n=e==null?void 0:e.onDragStart)==null||n.call(e,r))},onDragEnd:pl(e),children:[D.jsx(ge.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"}}),e.children]}))},{displayName:"DndContext"}),nt=Ye.createStyles(({css:e,token:t})=>({editableGrid:e`
36
36
  .ColDivider {
37
37
  flex-shrink: 0;
38
38
  width: ${t.marginLG}px;
@@ -66,14 +66,14 @@
66
66
  .showDivider {
67
67
  margin: 0 calc(-1 * ${t.marginLG}px);
68
68
  }
69
- `})),Mt=V.createContext({});Mt.displayName="EditableGridRowContext";const Bn=V.createContext({});Bn.displayName="EditableGridColContext";const Rt=V.createContext({});Rt.displayName="EditableGridContext";const Ln=e=>e["x-component"]==="EditableGrid",Un=e=>e["x-component"]==="EditableGrid.Row",Gn=V.memo(A.RecursionField);Gn.displayName="MemorizedRecursionField";const Hn=e=>{var g,x,P;const{token:t}=C.useToken(),o=V.useRef(null),{cx:f}=ot(),{isOver:r,setNodeRef:b}=xe.useDroppable({id:e.id,data:e.data}),{designable:v}=C.useDesignable(),F=V.useRef(),_=V.useMemo(()=>r?{backgroundColor:new Dt(t.colorSettings).setAlpha(.1).toHex8String()}:{},[r]),u=(P=(x=(g=xe.useDndContext().active)==null?void 0:g.data.current)==null?void 0:x.schema)==null?void 0:P.parent,h=u?Object.keys(u.properties).length:0;let s=!0;if(h===1)if(e.first)s=u!==e.cols[0];else{const S=e.cols[e.index],j=e.cols[e.index+1];s=u!==S&&j!==u}const a=e.cols[e.index],l=e.cols[e.index+1],{attributes:i,listeners:c,setNodeRef:p,isDragging:d}=xe.useDraggable({disabled:e.first||e.last||!v,id:e.id,data:{dividerRef:F,prevSchema:a,nextSchema:l}}),[y,m]=V.useState([0,0]);return xe.useDndMonitor({onDragStart(S){var I;if(((I=S.active.data.current.dividerRef)==null?void 0:I.current)!==F.current)return;o.current=S.active.id;const j=F.current,O=j.previousElementSibling,w=j.nextElementSibling;m([O.clientWidth,w.clientWidth])},onDragMove(S){if(!d)return;o.current===S.active.id&&(o.current=o.current+"_move");const j=F.current,O=j.previousElementSibling,w=j.nextElementSibling;O.style.width=`${y[0]+S.delta.x}px`,w.style.width=`${y[1]-S.delta.x}px`},onDragEnd(S){var N;if(!o.current||(N=o.current)!=null&&N.startsWith(S.active.id)&&!o.current.endsWith("_move")||y[0]<=0||y[1]<=0||(m([0,0]),!a||!l))return;const j=F.current,O=j.previousElementSibling,w=j.nextElementSibling;a["x-component-props"]=a["x-component-props"]||{},l["x-component-props"]=l["x-component-props"]||{};const I=j.clientWidth*(e.cols.length+1)/e.cols.length,E=(100*(O.getBoundingClientRect().width+I)/j.parentElement.clientWidth).toFixed(2),R=(100*(w.getBoundingClientRect().width+I)/j.parentElement.clientWidth).toFixed(2);se.set(a,"x-component-props.width",E),se.set(l,"x-component-props.width",R)}}),D.jsx("div",{ref:S=>{s&&(b(S),F.current=S)},className:f("tb-col-divider","ColDivider"),style:_,children:D.jsx("div",W(k(k({ref:p},c),i),{tabIndex:-1,className:e.first||e.last||!v?null:"DraggableNode"}))})},zn=e=>{var a,l,i;const{token:t}=C.useToken(),{isOver:o,setNodeRef:f}=xe.useDroppable({id:e.id,data:e.data}),{cx:r}=ot(),[b,v]=V.useState(!1),F=V.useMemo(()=>o?{zIndex:b?1e3:-1,backgroundColor:new Dt(t.colorSettings).setAlpha(.1).toHex8String()}:{zIndex:b?1e3:-1},[b,o]),_=xe.useDndContext(),n=e.rows[e.index],u=(i=(l=(a=_.active)==null?void 0:a.data.current)==null?void 0:l.schema)==null?void 0:i.parent.parent,h=u==null?void 0:u.mapProperties(c=>c["x-component"]==="EditableGrid.Col").filter(Boolean).length;let s=!0;if(h===1)if(e.first)s=u!==e.rows[0];else{const c=e.rows[e.index+1];s=u!==n&&c!==u}return xe.useDndMonitor({onDragStart(c){v(!0)},onDragMove(c){},onDragOver(c){},onDragEnd(c){v(!1)},onDragCancel(c){v(!1)}}),D.jsx("span",{ref:s?f:null,className:r("tb-row-divider","RowDivider"),style:F})},Jn=e=>{const t=new A.Schema({type:"void",name:`row_${A.uid()}`,"x-uid":A.uid(),"x-component":"EditableGrid.Row"}),o=t.addProperty(A.uid(),{type:"void","x-uid":A.uid(),"x-component":"EditableGrid.Col"});return A.Schema.isSchemaInstance(e)&&(e.parent=o),o.addProperty(e.name,e),t},Wn=e=>{const t=new A.Schema({type:"void",name:`col_${A.uid()}`,"x-uid":A.uid(),"x-component":"EditableGrid.Col"});return A.Schema.isSchemaInstance(e)&&(e.parent=t),t.addProperty(e.name,e),t},mu=()=>{const e=A.useFieldSchema();return V.useMemo(()=>e.reduceProperties((t,o)=>(o["x-component"]==="EditableGrid.Row"&&!o["x-hidden"]&&t.push(o),t),[]),[Object.keys(e.properties||{}).join(",")])},fu=()=>{const e=A.useFieldSchema();return V.useMemo(()=>e.reduceProperties((t,o)=>(o["x-component"]==="EditableGrid.Col"&&!o["x-hidden"]&&t.push(o),t),[]),[Object.keys(e.properties||{}).join(",")])},hu=e=>e.dndContext===!1?D.jsx(D.Fragment,{children:e.children}):D.jsx(du,W(k({},e.dndContext),{children:e.children})),Yn=()=>V.useContext(Rt),Xe=A.observer(e=>{const{distributed:t,showDivider:o=!0}=e,f=V.useRef(null),r=A.useField(),b=A.useFieldSchema(),{render:v}=C.useSchemaInitializerRender(b["x-initializer"],b["x-initializer-props"]),F=l=>v(l),_=r.address.toString(),n=mu(),{setPrintContent:u}=C.useFormBlockContext(),{styles:h,cx:s}=ot(),a=t===void 0?(b==null?void 0:b.parent["x-component"])==="Page"||(b==null?void 0:b.parent["x-component"])==="Tabs.TabPane":t;return V.useEffect(()=>{f.current&&(u==null||u(f.current))},[f.current]),D.jsx(Rt.Provider,{value:{ref:f,fieldSchema:b,renderSchemaInitializer:v,InitializerComponent:F,showDivider:o},children:D.jsxs("div",{className:s("tb-grid",h.editableGrid),style:{position:"relative"},ref:f,children:[D.jsxs(hu,{dndContext:e.dndContext,children:[o?D.jsx(zn,{rows:n,first:!0,id:`${_}_0`,data:{breakRemoveOn:Ln,wrapSchema:Jn,insertAdjacent:"afterBegin",schema:b}}):null,n.map((l,i)=>D.jsxs(V.Fragment,{children:[a?D.jsx(C.SchemaComponent,{name:l.name,schema:l,distributed:!0}):D.jsx(Gn,{name:l.name,schema:l}),o?D.jsx(zn,{rows:n,index:i,id:`${_}_${i+1}`,data:{breakRemoveOn:Ln,wrapSchema:Jn,insertAdjacent:"afterEnd",schema:l}}):null]},i))]}),v()]})})},{displayName:"EditableGrid"});Xe.Row=A.observer(()=>{const e=A.useField(),t=A.useFieldSchema(),o=e.address.toString(),f=fu(),{showDivider:r}=Yn(),{type:b}=C.useFormBlockType(),{cx:v}=ot();return D.jsx(Mt.Provider,{value:{schema:t,cols:f},children:D.jsxs("div",{className:v("tb-grid-row","CardRow",{showDivider:r}),children:[r&&D.jsx(Hn,{cols:f,first:!0,id:`${o}_0`,data:{breakRemoveOn:Un,wrapSchema:Wn,insertAdjacent:"afterBegin",schema:t}}),f.map((F,_)=>D.jsxs(V.Fragment,{children:[D.jsx(A.RecursionField,{name:F.name,schema:F,mapProperties:n=>(b==="update"&&(n.default=null),n)}),r&&D.jsx(Hn,{cols:f,index:_,last:_===f.length-1,id:`${o}_${_+1}`,data:{breakRemoveOn:Un,wrapSchema:Wn,insertAdjacent:"afterEnd",schema:F}})]},_))]})})},{displayName:"EditableGrid.Row"}),Xe.Col=A.observer(e=>{var a;const{cols:t=[]}=V.useContext(Mt),{showDivider:o}=Yn(),f=A.useFieldSchema(),r=A.useField(),{token:b}=C.useToken(),{cx:v}=ot(),F=V.useMemo(()=>{var i;let l="";return t!=null&&t.length&&(l=`calc(${((i=f==null?void 0:f["x-component-props"])==null?void 0:i.width)||100/t.length}% - ${b.marginLG}px * ${(o?t.length+1:0)/t.length})`),{width:l}},[t==null?void 0:t.length,(a=f==null?void 0:f["x-component-props"])==null?void 0:a.width]),{isOver:_,setNodeRef:n}=xe.useDroppable({id:r.address.toString(),data:{insertAdjacent:"beforeEnd",schema:f,wrapSchema:l=>l}}),[u,h]=V.useState(!1),s=V.useMemo(()=>_?{background:`linear-gradient(to top, ${new Dt(b.colorSettings).setAlpha(.1).toHex8String()} 20%, transparent 20%)`,borderTopRightRadius:"10px",borderTopLeftRadius:"10px",height:"100%"}:{height:"100%"},[u,_]);return xe.useDndMonitor({onDragStart(l){h(!0)},onDragMove(l){},onDragOver(l){},onDragEnd(l){h(!1)},onDragCancel(l){h(!1)}}),D.jsx(Bn.Provider,{value:{cols:t,schema:f},children:D.jsx("div",{ref:n,style:k(k({},F),s),className:v("tb-grid-col","CardCol"),children:e.children})})},{displayName:"EditableGrid.Col"}),Xe.wrap=e=>({type:"void","x-component":"EditableGrid.Row",properties:{[A.uid()]:{type:"void","x-component":"EditableGrid.Col",properties:{[e.name||A.uid()]:e}}}});const bu=A.observer(({schema:e})=>{const t=C.findSchemaUtils(e,"x-component","EditableGrid")||{},{Content:o}=oe.Layout,{refreshKey:f}=wt(),r=!t.properties;return D.jsx(o,{style:{padding:"5px",overflow:"auto"},children:r?D.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",paddingBottom:"10%"},children:D.jsx(C.Icon,{type:"add-fields",style:{width:"200px",height:"100%"}})}):D.jsx(C.SchemaComponent,{schema:e,components:{EditableGrid:Xe}})},f)});var ft=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function nt(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var o=function f(){var r=!1;try{r=this instanceof f}catch(b){}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(f){var r=Object.getOwnPropertyDescriptor(e,f);Object.defineProperty(o,f,r.get?r:{enumerable:!0,get:function(){return e[f]}})}),o}var Nt={exports:{}},Tt={exports:{}},kt={exports:{}},Vt,qn;function Be(){if(qn)return Vt;qn=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(w,I)=>e(w,"name",{value:I,configurable:!0}),b=(w,I)=>{for(var E in I)e(w,E,{get:I[E],enumerable:!0})},v=(w,I,E,R)=>{if(I&&typeof I=="object"||typeof I=="function")for(let N of o(I))!f.call(w,N)&&N!==E&&e(w,N,{get:()=>I[N],enumerable:!(R=t(I,N))||R.enumerable});return w},F=w=>v(e({},"__esModule",{value:!0}),w),_={};b(_,{getType:()=>h,isArr:()=>a,isBool:()=>c,isFn:()=>s,isHTMLElement:()=>O,isMap:()=>d,isNum:()=>p,isNumberLike:()=>x,isObj:()=>P,isPlainObj:()=>l,isReactElement:()=>j,isRegExp:()=>S,isSet:()=>y,isStr:()=>i,isWeakMap:()=>m,isWeakSet:()=>g}),Vt=F(_);const n=Object.prototype.toString,u=r(w=>I=>h(I)===`[object ${w}]`,"isType"),h=r(w=>n.call(w),"getType"),s=r(w=>typeof w=="function","isFn"),a=Array.isArray,l=u("Object"),i=u("String"),c=u("Boolean"),p=u("Number"),d=r(w=>w&&w instanceof Map,"isMap"),y=r(w=>w&&w instanceof Set,"isSet"),m=r(w=>w&&w instanceof WeakMap,"isWeakMap"),g=r(w=>w&&w instanceof WeakSet,"isWeakSet"),x=r(w=>p(w)||/^\d+$/.test(w),"isNumberLike"),P=r(w=>typeof w=="object","isObj"),S=u("RegExp"),j=r(w=>w&&w.$$typeof&&w._owner,"isReactElement"),O=r(w=>Object.prototype.toString.call(w).indexOf("HTML")>-1,"isHTMLElement");return Vt}var Bt,Kn;function Lt(){if(Kn)return Bt;Kn=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>e(m,"name",{value:g,configurable:!0}),b=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},v=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},F=m=>v(e({},"__esModule",{value:!0}),m),_={};b(_,{each:()=>h,every:()=>l,find:()=>p,findIndex:()=>c,includes:()=>d,map:()=>s,move:()=>y,reduce:()=>a,some:()=>i,toArr:()=>u}),Bt=F(_);var n=Be();const u=r(m=>(0,n.isArr)(m)?m:m?[m]:[],"toArr");function h(m,g,x){if((0,n.isArr)(m)||(0,n.isStr)(m)){if(x){for(let P=m.length-1;P>=0;P--)if(g(m[P],P)===!1)return}else for(let P=0;P<m.length;P++)if(g(m[P],P)===!1)return}else if((0,n.isObj)(m)){let P;for(P in m)if(Object.hasOwnProperty.call(m,P)&&g(m[P],P)===!1)return}}r(h,"each");function s(m,g,x){const P=(0,n.isArr)(m)||(0,n.isStr)(m)?[]:{};return h(m,(S,j)=>{const O=g(S,j);(0,n.isArr)(P)?P.push(O):P[j]=O},x),P}r(s,"map");function a(m,g,x,P){let S=x;return h(m,(j,O)=>{S=g(S,j,O)},P),S}r(a,"reduce");function l(m,g,x){let P=!0;return h(m,(S,j)=>{if(!g(S,j))return P=!1,!1},x),P}r(l,"every");function i(m,g,x){let P=!1;return h(m,(S,j)=>{if(g(S,j))return P=!0,!1},x),P}r(i,"some");function c(m,g,x){let P=-1;return h(m,(S,j)=>{if(g(S,j))return P=j,!1},x),P}r(c,"findIndex");function p(m,g,x){let P;return h(m,(S,j)=>{if(g(S,j))return P=S,!1},x),P}r(p,"find");function d(m,g,x){return(0,n.isStr)(m)?m.includes(g):i(m,P=>P===g,x)}r(d,"includes");function y(m,g,x){if(g===x||x<0||g<0||x>m.length-1||g>m.length-1)return m;if(g<x){const P=m[g];for(let S=g;S<x;S++)m[S]=m[S+1];m[x]=P}else{const P=m[g];for(let S=g;S>x;S--)m[S]=m[S-1];m[x]=P}return m}return r(y,"move"),Bt}var Ut,Zn;function Qn(){if(Zn)return Ut;Zn=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(h,s)=>e(h,"name",{value:s,configurable:!0}),b=(h,s)=>{for(var a in s)e(h,a,{get:s[a],enumerable:!0})},v=(h,s,a,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of o(s))!f.call(h,i)&&i!==a&&e(h,i,{get:()=>s[i],enumerable:!(l=t(s,i))||l.enumerable});return h},F=h=>v(e({},"__esModule",{value:!0}),h),_={};b(_,{globalThisPolyfill:()=>u}),Ut=F(_);function n(){try{if(typeof self!="undefined")return self}catch(h){}try{if(typeof window!="undefined")return window}catch(h){}try{if(typeof ft!="undefined")return ft}catch(h){}return Function("return this")()}r(n,"globalSelf");const u=n();return Ut}var Gt,Xn;function Ht(){if(Xn)return Gt;Xn=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{instOf:()=>h}),Gt=F(_);var n=Be(),u=Qn();const h=r((s,a)=>(0,n.isFn)(a)?s instanceof a:(0,n.isStr)(a)&&u.globalThisPolyfill[a]?s instanceof u.globalThisPolyfill[a]:!1,"instOf");return Gt}var zt,$n;function vu(){if($n)return zt;$n=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(c,p)=>e(c,"name",{value:p,configurable:!0}),b=(c,p)=>{for(var d in p)e(c,d,{get:p[d],enumerable:!0})},v=(c,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of o(p))!f.call(c,m)&&m!==d&&e(c,m,{get:()=>p[m],enumerable:!(y=t(p,m))||y.enumerable});return c},F=c=>v(e({},"__esModule",{value:!0}),c),_={};b(_,{isEqual:()=>i}),zt=F(_);var n=Be(),u=Ht();const h=n.isArr,s=Object.keys,a=Object.prototype.hasOwnProperty;function l(c,p){if(c===p)return!0;if(c&&p&&typeof c=="object"&&typeof p=="object"){const d=h(c),y=h(p);let m,g,x;if(d&&y){if(g=c.length,g!==p.length)return!1;for(m=g;m--!==0;)if(!l(c[m],p[m]))return!1;return!0}if(d!==y)return!1;const P=c&&c._isAMomentObject,S=p&&p._isAMomentObject;if(P!==S)return!1;if(P&&S)return c.isSame(p);const j=c&&c.toJS,O=p&&p.toJS;if(j!==O)return!1;if(j)return c.is?c.is(p):c===p;const w=(0,u.instOf)(c,"Date"),I=(0,u.instOf)(p,"Date");if(w!==I)return!1;if(w&&I)return c.getTime()===p.getTime();const E=(0,u.instOf)(c,"RegExp"),R=(0,u.instOf)(p,"RegExp");if(E!==R)return!1;if(E&&R)return c.toString()===p.toString();const N=(0,u.instOf)(c,"URL"),L=(0,u.instOf)(p,"URL");if(N!==L)return!1;if(N&&L)return c.href===p.href;const K=c&&c.toJSON,te=p&&p.toJSON;if(K!==te)return!1;if(K&&te)return l(c.toJSON(),p.toJSON());const Y=s(c);if(g=Y.length,g!==s(p).length)return!1;for(m=g;m--!==0;)if(!a.call(p,Y[m]))return!1;for(m=g;m--!==0;)if(x=Y[m],!(x==="_owner"&&c.$$typeof)&&!l(c[x],p[x]))return!1;return!0}return c!==c&&p!==p}r(l,"equal");const i=r(function(p,d){try{return l(p,d)}catch(y){if(y.message&&y.message.match(/stack|recursion/i)||y.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",y.name,y.message),!1;throw y}},"exportedEqual");return zt}var Jt,es;function yu(){if(es)return Jt;es=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{clone:()=>h,shallowClone:()=>u}),Jt=F(_);var n=Be();const u=r(s=>Array.isArray(s)?s.slice(0):(0,n.isPlainObj)(s)?"$$typeof"in s&&"_owner"in s||s._isBigNumber||s._isAMomentObject||s._isJSONSchemaObject||(0,n.isFn)(s.toJS)||(0,n.isFn)(s.toJSON)?s:k({},s):typeof s=="object"?new s.constructor(s):s,"shallowClone"),h=r(s=>{if(Array.isArray(s)){const a=[];return s.forEach(l=>{a.push(h(l))}),a}else if((0,n.isPlainObj)(s)){if("$$typeof"in s&&"_owner"in s||s._isBigNumber||s._isAMomentObject||s._isJSONSchemaObject)return s;if((0,n.isFn)(s.toJS))return s.toJS();if((0,n.isFn)(s.toJSON))return s.toJSON();const a={};for(const l in s)Object.hasOwnProperty.call(s,l)&&(a[l]=h(s[l]));return a}else return s},"clone");return Jt}var Wt,ts;function Yt(){if(ts)return Wt;ts=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{isEmpty:()=>l,isUndef:()=>s,isValid:()=>a}),Wt=F(_);var n=Ht();const u=Object.prototype.hasOwnProperty,h=Object.prototype.toString,s=r(i=>i===void 0,"isUndef"),a=r(i=>i!=null,"isValid");function l(i,c=!1){if(i==null)return!0;if(typeof i=="boolean"||typeof i=="number")return!1;if(typeof i=="string"||typeof i=="function")return i.length===0;if(Array.isArray(i)){if(i.length===0)return!0;for(let p=0;p<i.length;p++)if(c){if(i[p]!==void 0&&i[p]!==null)return!1}else if(i[p]!==void 0&&i[p]!==null&&i[p]!==""&&i[p]!==0)return!1;return!0}if((0,n.instOf)(i,"Error"))return i.message==="";if(i.toString===h)switch(i.toString()){case"[object File]":case"[object Map]":case"[object Set]":return i.size===0;case"[object Object]":{for(const p in i)if(u.call(i,p))return!1;return!0}}return!1}return r(l,"isEmpty"),Wt}var $e=function(){return $e=Object.assign||function(t){for(var o,f=1,r=arguments.length;f<r;f++){o=arguments[f];for(var b in o)Object.prototype.hasOwnProperty.call(o,b)&&(t[b]=o[b])}return t},$e.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var _u={tr:{regexp:/\u0130|\u0049|\u0049\u0307/g,map:{İ:"i",I:"ı",İ:"i"}},az:{regexp:/\u0130/g,map:{İ:"i",I:"ı",İ:"i"}},lt:{regexp:/\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,map:{I:"i̇",J:"j̇",Į:"į̇",Ì:"i̇̀",Í:"i̇́",Ĩ:"i̇̃"}}};function xu(e,t){var o=_u[t.toLowerCase()];return ht(o?e.replace(o.regexp,function(f){return o.map[f]}):e)}function ht(e){return e.toLowerCase()}const gu=Object.freeze(Object.defineProperty({__proto__:null,localeLowerCase:xu,lowerCase:ht},Symbol.toStringTag,{value:"Module"}));var Fu=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Su=/[^A-Z0-9]+/gi;function rs(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,f=o===void 0?Fu:o,r=t.stripRegexp,b=r===void 0?Su:r,v=t.transform,F=v===void 0?ht:v,_=t.delimiter,n=_===void 0?" ":_,u=os(os(e,f,"$1\0$2"),b,"\0"),h=0,s=u.length;u.charAt(h)==="\0";)h++;for(;u.charAt(s-1)==="\0";)s--;return u.slice(h,s).split("\0").map(F).join(n)}function os(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(f,r){return f.replace(r,o)},e)}function qt(e,t){var o=e.charAt(0),f=e.substr(1).toLowerCase();return t>0&&o>="0"&&o<="9"?"_"+o+f:""+o.toUpperCase()+f}function ns(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function ss(e,t){return t===void 0&&(t={}),rs(e,$e({delimiter:"",transform:qt},t))}const Pu=Object.freeze(Object.defineProperty({__proto__:null,pascalCase:ss,pascalCaseTransform:qt,pascalCaseTransformMerge:ns},Symbol.toStringTag,{value:"Module"}));function as(e,t){return t===0?e.toLowerCase():qt(e,t)}function Ou(e,t){return t===0?e.toLowerCase():ns(e)}function Cu(e,t){return t===void 0&&(t={}),ss(e,$e({transform:as},t))}const wu=nt(Object.freeze(Object.defineProperty({__proto__:null,camelCase:Cu,camelCaseTransform:as,camelCaseTransformMerge:Ou},Symbol.toStringTag,{value:"Module"}))),Eu=nt(gu);function ju(e,t){return t===void 0&&(t={}),rs(e,$e({delimiter:"."},t))}function Iu(e,t){return t===void 0&&(t={}),ju(e,$e({delimiter:"-"},t))}const Au=nt(Object.freeze(Object.defineProperty({__proto__:null,paramCase:Iu},Symbol.toStringTag,{value:"Module"}))),Du=nt(Pu);var Mu={tr:{regexp:/[\u0069]/g,map:{i:"İ"}},az:{regexp:/[\u0069]/g,map:{i:"İ"}},lt:{regexp:/[\u0069\u006A\u012F]\u0307|\u0069\u0307[\u0300\u0301\u0303]/g,map:{i̇:"I",j̇:"J",į̇:"Į",i̇̀:"Ì",i̇́:"Í",i̇̃:"Ĩ"}}};function Ru(e,t){var o=Mu[t.toLowerCase()];return Kt(o?e.replace(o.regexp,function(f){return o.map[f]}):e)}function Kt(e){return e.toUpperCase()}const Nu=nt(Object.freeze(Object.defineProperty({__proto__:null,localeUpperCase:Ru,upperCase:Kt},Symbol.toStringTag,{value:"Module"})));var Zt,is;function Tu(){if(is)return Zt;is=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},b=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},v=a=>b(e({},"__esModule",{value:!0}),a),F={};r(F,{camelCase:()=>_.camelCase,lowerCase:()=>n.lowerCase,paramCase:()=>u.paramCase,pascalCase:()=>h.pascalCase,upperCase:()=>s.upperCase}),Zt=v(F);var _=wu,n=Eu,u=Au,h=Du,s=Nu;return Zt}var Qt,cs;function ku(){if(cs)return Qt;cs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>e(l,"name",{value:i,configurable:!0}),b=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},v=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{stringLength:()=>a}),Qt=F(_);const n=r(()=>{const l=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(l,"g")},"ansiRegex"),u="[\uD800-\uDBFF][\uDC00-\uDFFF]",h=r(l=>l&&l.exact?new RegExp(`^${u}$`):new RegExp(u,"g"),"astralRegex"),s=r(l=>typeof l=="string"?l.replace(n(),""):l,"stripAnsi"),a=r(l=>s(l).replace(h()," ").length,"stringLength");return Qt}var Xt,us;function bt(){if(us)return Xt;us=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(w,I)=>e(w,"name",{value:I,configurable:!0}),b=(w,I)=>{for(var E in I)e(w,E,{get:I[E],enumerable:!0})},v=(w,I,E,R)=>{if(I&&typeof I=="object"||typeof I=="function")for(let N of o(I))!f.call(w,N)&&N!==E&&e(w,N,{get:()=>I[N],enumerable:!(R=t(I,N))||R.enumerable});return w},F=w=>v(e({},"__esModule",{value:!0}),w),_={};b(_,{isArr:()=>s,isAssignable:()=>S,isBool:()=>i,isEqual:()=>j,isFn:()=>h,isNum:()=>c,isNumberLike:()=>y,isObj:()=>p,isPlainObj:()=>a,isRegExp:()=>d,isSegmentEqual:()=>O,isStr:()=>l,toArr:()=>P}),Xt=F(_);const n=Object.prototype.toString,u=r(w=>I=>n.call(I)===`[object ${w}]`,"isType"),h=u("Function"),s=Array.isArray||u("Array"),a=u("Object"),l=u("String"),i=u("Boolean"),c=u("Number"),p=r(w=>typeof w=="object","isObj"),d=u("RegExp"),y=r(w=>c(w)||/^(\d+)(\.\d+)?$/.test(w),"isNumberLike"),m=s,g=Object.keys,x=Object.prototype.hasOwnProperty,P=r(w=>Array.isArray(w)?w:w!==void 0?[w]:[],"toArr"),S=r(w=>typeof w=="object"||typeof w=="function","isAssignable"),j=r((w,I)=>{if(w===I)return!0;if(w&&I&&typeof w=="object"&&typeof I=="object"){const E=m(w),R=m(I);let N,L,K;if(E&&R){if(L=w.length,L!==I.length)return!1;for(N=L;N--!==0;)if(!j(w[N],I[N]))return!1;return!0}if(E!==R)return!1;const te=g(w);if(L=te.length,L!==g(I).length)return!1;for(N=L;N--!==0;)if(!x.call(I,te[N]))return!1;for(N=L;N--!==0;)if(K=te[N],!j(w[K],I[K]))return!1;return!0}return w!==w&&I!==I},"isEqual"),O=r((w,I)=>(w=typeof w=="symbol"?w:`${w}`,I=typeof I=="symbol"?I:`${I}`,w===I),"isSegmentEqual");return Xt}var $t,ls;function ps(){if(ls)return $t;ls=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(g,x)=>e(g,"name",{value:x,configurable:!0}),b=(g,x)=>{for(var P in x)e(g,P,{get:x[P],enumerable:!0})},v=(g,x,P,S)=>{if(x&&typeof x=="object"||typeof x=="function")for(let j of o(x))!f.call(g,j)&&j!==P&&e(g,j,{get:()=>x[j],enumerable:!(S=t(x,j))||S.enumerable});return g},F=g=>v(e({},"__esModule",{value:!0}),g),_={};b(_,{isArrayPattern:()=>m,isDestructorExpression:()=>p,isDotOperator:()=>s,isExpandOperator:()=>l,isGroupExpression:()=>i,isIdentifier:()=>u,isIgnoreExpression:()=>h,isObjectPattern:()=>d,isObjectPatternProperty:()=>y,isRangeExpression:()=>c,isType:()=>n,isWildcardOperator:()=>a}),$t=F(_);const n=r(g=>x=>x&&x.type===g,"isType"),u=n("Identifier"),h=n("IgnoreExpression"),s=n("DotOperator"),a=n("WildcardOperator"),l=n("ExpandOperator"),i=n("GroupExpression"),c=n("RangeExpression"),p=n("DestructorExpression"),d=n("ObjectPattern"),y=n("ObjectPatternProperty"),m=n("ArrayPattern");return $t}var er,ds;function ms(){if(ds)return er;ds=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>e(m,"name",{value:g,configurable:!0}),b=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},v=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},F=m=>v(e({},"__esModule",{value:!0}),m),_={};b(_,{deleteInByDestructor:()=>d,existInByDestructor:()=>y,getDestructor:()=>a,getInByDestructor:()=>p,parseDestructorRules:()=>i,setDestructor:()=>l,setInByDestructor:()=>c}),er=F(_);var n=bt(),u=ps();const h=new Map,s=r(m=>m!=null,"isValid"),a=r(m=>h.get(m),"getDestructor"),l=r((m,g)=>{h.set(m,g)},"setDestructor"),i=r(m=>{const g=[];if((0,u.isObjectPattern)(m)){let x=0;return m.properties.forEach(P=>{g[x]={path:[]},g[x].key=P.key.value,g[x].path.push(P.key.value),(0,u.isIdentifier)(P.value)&&(g[x].key=P.value.value);const S=g[x].path,j=i(P.value);let O=x;j.forEach(w=>{g[O]?(g[O].key=w.key,g[O].path=S.concat(w.path)):g[O]={key:w.key,path:S.concat(w.path)},O++}),O>x?x=O:x++}),g}else if((0,u.isArrayPattern)(m)){let x=0;return m.elements.forEach((P,S)=>{g[x]={path:[]},g[x].key=S,g[x].path.push(S),(0,u.isIdentifier)(P)&&(g[x].key=P.value);const j=g[x].path,O=i(P);let w=x;O.forEach(I=>{g[w]?(g[w].key=I.key,g[w].path=j.concat(I.path)):g[w]={key:I.key,path:j.concat(I.path)},w++}),w>x?x=w:x++}),g}return(0,u.isDestructorExpression)(m)?i(m.value):g},"parseDestructorRules"),c=r((m,g,x,P)=>{g.forEach(({key:S,path:j})=>{P.setIn([S],m,P.getIn(j,x))})},"setInByDestructor"),p=r((m,g,x)=>{let P={};return g.length&&(0,n.isNum)(g[0].path[0])&&(P=[]),m=s(m)?m:{},g.forEach(({key:S,path:j})=>{x.setIn(j,P,m[S])}),P},"getInByDestructor"),d=r((m,g,x)=>{g.forEach(({key:P})=>{x.deleteIn([P],m)})},"deleteInByDestructor"),y=r((m,g,x,P)=>g.every(({key:S})=>P.existIn([S],m,x)),"existInByDestructor");return er}var tr,fs;function Vu(){if(fs)return tr;fs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>e(a,"name",{value:l,configurable:!0}),b=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},v=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{Matcher:()=>s}),tr=F(_);var n=bt(),u=ps();const h=class{constructor(l,i){this.tree=l,this.stack=[],this.excluding=!1,this.wildcards=[],this.record=i}next(l,i){if(l.after)return this.matchNode(l.after,i);if((0,u.isWildcardOperator)(l)&&!l.filter)return this.excluding?!1:i===0||l.optional?!0:!!this.take(i);if(i===this.path.length-1)return!!this.take(i);{const p=this.wildcards.pop();if(p&&p.after)return this.next(p,i)}return!1}shot(){var l;((l=this.record)==null?void 0:l.score)>=0&&this.record.score++}take(l){var i;return String((i=this.path[l])!=null?i:"")}matchExcludeIdentifier(l,i,c){const p=c===this.path.length-1,d=c<this.path.length;if(i.after||(this.excluding=!1),l){if(i.after)return this.next(i,c);if(p)return!1}return p?!0:d}matchIdentifier(l,i){const c=this.take(i);let p=!1;return(0,u.isExpandOperator)(l.after)?(c.indexOf(l.value)===0&&(this.shot(),p=!0),this.excluding?this.matchExcludeIdentifier(p,l.after,i):p&&this.next(l.after,i)):(c===l.value&&(this.shot(),p=!0),this.excluding?this.matchExcludeIdentifier(p,l,i):p&&this.next(l,i))}matchIgnoreExpression(l,i){return(0,n.isEqual)(l.value,this.take(i))&&this.next(l,i)}matchDestructorExpression(l,i){return(0,n.isEqual)(l.source,this.take(i))&&this.next(l,i)}matchExpandOperator(l,i){return this.next(l,i)}matchWildcardOperator(l,i){let c=!1;return l.filter?(this.stack.push(l),c=this.matchNode(l.filter,i),this.stack.pop()):c=this.next(l,i),c}matchGroupExpression(l,i){let c=!1;return l.isExclude&&(c=!this.excluding),(0,n.toArr)(l.value)[c?"every":"some"](p=>(this.wildcards=this.stack.slice(),this.excluding=c,this.matchNode(p,i)))}matchRangeExpression(l,i){const c=Number(this.take(i));return l.start?l.end?c>=Number(l.start.value)&&c<=Number(l.end.value):c>=Number(l.start.value):l.end?c<=Number(l.end.value):(this.wildcards=this.stack.slice(),this.next(l,i))}matchNode(l,i=0){return(0,u.isDotOperator)(l)?this.next(l,i+1):(0,u.isIdentifier)(l)?this.matchIdentifier(l,i):(0,u.isIgnoreExpression)(l)?this.matchIgnoreExpression(l,i):(0,u.isDestructorExpression)(l)?this.matchDestructorExpression(l,i):(0,u.isExpandOperator)(l)?this.matchExpandOperator(l,i):(0,u.isWildcardOperator)(l)?this.matchWildcardOperator(l,i):(0,u.isGroupExpression)(l)?this.matchGroupExpression(l,i):(0,u.isRangeExpression)(l)?this.matchRangeExpression(l,i):!1}match(l){return this.path=l,{matched:this.matchNode(this.tree),record:this.record}}static matchSegments(l,i,c){if(l.length!==i.length)return{matched:!1,record:c};const p=r((d=0)=>{const y=(0,n.isSegmentEqual)(l[d],i[d]);return(c==null?void 0:c.score)>=0&&c.score++,y&&(d<l.length-1?p(d+1):!0)},"match");return{matched:p(),record:c}}};r(h,"Matcher");let s=h;return tr}var rr,hs;function or(){if(hs)return rr;hs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(c,p)=>e(c,"name",{value:p,configurable:!0}),b=(c,p)=>{for(var d in p)e(c,d,{get:p[d],enumerable:!0})},v=(c,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of o(p))!f.call(c,m)&&m!==d&&e(c,m,{get:()=>p[m],enumerable:!(y=t(p,m))||y.enumerable});return c},F=c=>v(e({},"__esModule",{value:!0}),c),_={};b(_,{braceContext:()=>l,bracketArrayContext:()=>h,bracketContext:()=>u,bracketDContext:()=>s,destructorContext:()=>i,parenContext:()=>a}),rr=F(_);const n=r((c,p)=>k({flag:c},p),"ContextType"),u=n("[]"),h=n("[\\d]"),s=n("[[]]"),a=n("()"),l=n("{}"),i=n("{x}");return rr}var nr,bs;function vs(){if(bs)return nr;bs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(E,R)=>e(E,"name",{value:R,configurable:!0}),b=(E,R)=>{for(var N in R)e(E,N,{get:R[N],enumerable:!0})},v=(E,R,N,L)=>{if(R&&typeof R=="object"||typeof R=="function")for(let K of o(R))!f.call(E,K)&&K!==N&&e(E,K,{get:()=>R[K],enumerable:!(L=t(R,K))||L.enumerable});return E},F=E=>v(e({},"__esModule",{value:!0}),E),_={};b(_,{bangTok:()=>i,braceLTok:()=>p,braceRTok:()=>d,bracketDLTok:()=>g,bracketDRTok:()=>x,bracketLTok:()=>y,bracketRTok:()=>m,colonTok:()=>c,commaTok:()=>j,dbStarTok:()=>a,dotTok:()=>l,eofTok:()=>I,expandTok:()=>w,ignoreTok:()=>O,nameTok:()=>h,parenLTok:()=>P,parenRTok:()=>S,starTok:()=>s}),nr=F(_);var n=or();const u=r((E,R)=>k({flag:E},R),"TokenType"),h=u("name",{expectNext(E){return this.includesContext(n.destructorContext)?E===h||E===j||E===m||E===d||E===c:E===l||E===j||E===I||E===m||E===S||E===c||E===w||E===y}}),s=u("*",{expectNext(E){return E===l||E===P||E===y||E===I||E===j||E===S}}),a=u("**",{expectNext(E){return E===l||E===y||E===I||E===j||E===S}}),l=u(".",{expectNext(E){return E===l||E===h||E===g||E===s||E===a||E===y||E===p||E===I},expectPrev(E){return E===l||E===h||E===x||E===s||E===S||E===m||E===w||E===d}}),i=u("!",{expectNext(E){return E===h||E===g}}),c=u(":",{expectNext(E){return this.includesContext(n.destructorContext)?E===h||E===p||E===y:E===h||E===g||E===m}}),p=u("{",{expectNext(E){return E===h},expectPrev(E){return this.includesContext(n.destructorContext)?E===c||E===j||E===y:E===l||E===c||E===P},updateContext(){this.state.context.push(n.braceContext)}}),d=u("}",{expectNext(E){return this.includesContext(n.destructorContext)?E===j||E===d||E===I||E===m:E===l||E===I||E===j},expectPrev(E){return E===h||E===d||E===m},updateContext(){this.state.context.pop(n.braceContext)}}),y=u("[",{expectNext(E){return this.includesContext(n.destructorContext)?E===h||E===y||E===p||E===m:E===h||E===g||E===c||E===y||E===O||E===m},expectPrev(E){return this.includesContext(n.destructorContext)?E===c||E===j||E===y:E===s||E===y||E===l||E===h||E===P||E===j},updateContext(){this.state.context.push(n.bracketContext)}}),m=u("]",{expectNext(E){return this.includesContext(n.destructorContext)?E===j||E===d||E===m||E===I:E===l||E===I||E===j||E===S||E===m},updateContext(){if(!this.includesContext(n.bracketArrayContext)){if(!this.includesContext(n.bracketContext))throw this.unexpect();this.state.context.pop()}}}),g=u("[[",{updateContext(){this.state.context.push(n.bracketDContext)}}),x=u("]]",{updateContext(){if(this.curContext()!==n.bracketDContext)throw this.unexpect();this.state.context.pop()}}),P=u("(",{expectNext(E){return E===h||E===g||E===p||E===i||E===y},expectPrev(E){return E===s},updateContext(){this.state.context.push(n.parenContext)}}),S=u(")",{expectNext(E){return E===l||E===I||E===j||E===S},updateContext(){if(this.curContext()!==n.parenContext)throw this.unexpect();this.state.context.pop()}}),j=u(",",{expectNext(E){return E===h||E===g||E===y||E===p}}),O=u("ignore",{expectNext(E){return E===x},expectPrev(E){return E===g}}),w=u("expandTok",{expectNext(E){return E===l||E===I||E===j||E===S}}),I=u("eof");return nr}var sr,ys;function Bu(){if(ys)return sr;ys=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{Tokenizer:()=>p}),sr=F(_);var n=or(),u=vs();const h=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,s=r((d,y)=>{if(String.fromCharCode)return d.codePointAt(y);const m=d.charCodeAt(y);if(m<=55295||m>=57344)return m;const g=d.charCodeAt(y+1);return(m<<10)+g-56613888},"fullCharCodeAtPos"),a=r(d=>d===42||d===46||d===33||d===91||d===93||d===40||d===41||d===44||d===58||d===126||d===123||d===125,"isRewordCode"),l=r((d,y)=>{const m=new Error(d);return Object.assign(m,y),m},"getError"),i=r((d,y,m)=>{let g="";for(let x=y;x<m;x++){const P=d.charAt(x);P!=="\\"&&(g+=P)}return g},"slice"),c=class{constructor(y){this.input=y,this.state={context:[],type:null,pos:0},this.type_=null}curContext(){return this.state.context[this.state.context.length-1]}includesContext(y){for(let m=this.state.context.length-1;m>=0;m--)if(this.state.context[m]===y)return!0;return!1}unexpect(y){return y=y||this.state.type,l(`Unexpect token "${y.flag}" in ${this.state.pos} char.`,{pos:this.state.pos})}expectNext(y,m){if(y&&y.expectNext&&m&&!y.expectNext.call(this,m))throw l(`Unexpect token "${m.flag}" token should not be behind "${y.flag}" token.(${this.state.pos}th char)`,{pos:this.state.pos})}expectPrev(y,m){if(y&&y.expectPrev&&m&&!y.expectPrev.call(this,m))throw l(`Unexpect token "${y.flag}" should not be behind "${m.flag}"(${this.state.pos}th char).`,{pos:this.state.pos})}match(y){return this.state.type===y}skipSpace(){if(this.curContext()!==n.bracketDContext)e:for(;this.state.pos<this.input.length;){const y=this.input.charCodeAt(this.state.pos);switch(y){case 32:case 160:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos;break;default:if(y>8&&y<14||y>=5760&&h.test(String.fromCharCode(y)))++this.state.pos;else break e}}}next(){if(this.type_=this.state.type,this.input.length<=this.state.pos)return this.finishToken(u.eofTok);this.skipSpace(),this.readToken(this.getCode(),this.state.pos>0?this.getCode(this.state.pos-1):-1/0)}getCode(y=this.state.pos){return s(this.input,y)}eat(y){return this.match(y)?(this.next(),!0):!1}readKeyWord(){let y=this.state.pos,m="";for(;;){const g=this.getCode(),x=this.getCode(this.state.pos-1);if(this.input.length===this.state.pos){m=i(this.input,y,this.state.pos+1);break}if(!a(g)||x===92){if(g===32||g===160||g===10||g===8232||g===8233){m=i(this.input,y,this.state.pos);break}if(g===13&&this.input.charCodeAt(this.state.pos+1)===10){m=i(this.input,y,this.state.pos);break}if(g>8&&g<14||g>=5760&&h.test(String.fromCharCode(g))){m=i(this.input,y,this.state.pos);break}this.state.pos++}else{m=i(this.input,y,this.state.pos);break}}this.finishToken(u.nameTok,m)}readIgnoreString(){let y=this.state.pos,m,g="";for(;;){const x=this.getCode();if(this.state.pos>=this.input.length)break;if((x===91||x===93)&&m===92)this.state.pos++,m="";else if(x===93&&m===93){g=this.input.slice(y,this.state.pos-1).replace(/\\([[\]])/g,"$1"),this.state.pos++;break}else this.state.pos++,m=x}this.finishToken(u.ignoreTok,g),this.finishToken(u.bracketDRTok)}finishToken(y,m){const g=this.state.type;this.state.type=y,m!==void 0&&(this.state.value=m),this.expectNext(g,y),this.expectPrev(y,g),y.updateContext&&y.updateContext.call(this,g)}readToken(y,m){if(m===92)return this.readKeyWord();if(this.input.length<=this.state.pos)this.finishToken(u.eofTok);else if(this.curContext()===n.bracketDContext)this.readIgnoreString();else if(y===123)this.state.pos++,this.finishToken(u.braceLTok);else if(y===125)this.state.pos++,this.finishToken(u.braceRTok);else if(y===42){if(this.state.pos++,this.getCode()===42)return this.state.pos++,this.finishToken(u.dbStarTok);this.finishToken(u.starTok)}else if(y===33)this.state.pos++,this.finishToken(u.bangTok);else if(y===46)this.state.pos++,this.finishToken(u.dotTok);else if(y===91){if(this.state.pos++,this.getCode()===91)return this.state.pos++,this.finishToken(u.bracketDLTok);this.finishToken(u.bracketLTok)}else y===126?(this.state.pos++,this.finishToken(u.expandTok)):y===93?(this.state.pos++,this.finishToken(u.bracketRTok)):y===40?(this.state.pos++,this.finishToken(u.parenLTok)):y===41?(this.state.pos++,this.finishToken(u.parenRTok)):y===44?(this.state.pos++,this.finishToken(u.commaTok)):y===58?(this.state.pos++,this.finishToken(u.colonTok)):this.readKeyWord()}};r(c,"Tokenizer");let p=c;return sr}var ar,_s;function Lu(){if(_s)return ar;_s=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{Parser:()=>p}),ar=F(_);var n=or(),u=ms(),h=bt(),s=Bu(),a=vs();const l=r((d=[],y)=>{const m=d.length,g=r((x=0)=>{const P=x<m-1?g(x+1):y,S=P&&{type:"DotOperator",after:P};return{type:"Identifier",value:d[x],after:S}},"build");return g()},"createTreeBySegments"),i=r((d,y,m)=>{if((0,h.isNumberLike)(d)&&(0,h.isNumberLike)(y)){if(m==="+")return String(Number(d)+Number(y));if(m==="-")return String(Number(d)-Number(y));if(m==="*")return String(Number(d)*Number(y));if(m==="/")return String(Number(d)/Number(y))}else{if(m==="+")return String(d)+String(y);if(m==="-"||m==="*"||m==="/")return"NaN"}return String(Number(y))},"calculate"),c=class extends s.Tokenizer{constructor(y,m){super(y),this.isMatchPattern=!1,this.isWildMatchPattern=!1,this.haveExcludePattern=!1,this.haveRelativePattern=!1,this.base=m}parse(){let y;return this.data={segments:[]},this.eat(a.eofTok)||(this.next(),y=this.parseAtom(this.state.type)),this.data.tree=y,y}append(y,m){y&&m&&(y.after=m)}parseAtom(y){switch(y){case a.braceLTok:case a.bracketLTok:return this.includesContext(n.destructorContext)?y===a.braceLTok?this.parseObjectPattern():this.parseArrayPattern():this.parseDestructorExpression();case a.nameTok:return this.parseIdentifier();case a.expandTok:return this.parseExpandOperator();case a.dbStarTok:case a.starTok:return this.parseWildcardOperator();case a.bracketDLTok:return this.parseIgnoreExpression();case a.dotTok:return this.parseDotOperator()}}pushSegments(y){this.data.segments.push(y)}parseIdentifier(){const y={type:"Identifier",value:this.state.value},m=!this.includesContext(n.destructorContext)&&!this.isMatchPattern&&!this.isWildMatchPattern;if(this.next(),this.includesContext(n.bracketArrayContext)){if(this.state.type!==a.bracketRTok)throw this.unexpect();this.state.context.pop(),this.next()}else m&&this.pushSegments(y.value);if(this.state.type===a.bracketLTok){if(this.next(),this.state.type!==a.nameTok)throw this.unexpect();this.state.context.push(n.bracketArrayContext);let g=!1;/^\d+$/.test(this.state.value)&&(g=!0);const x=this.state.value;this.pushSegments(g?Number(x):x);const P=this.parseAtom(this.state.type);g&&(P.arrayIndex=!0),this.append(y,P)}else this.append(y,this.parseAtom(this.state.type));return y}parseExpandOperator(){const y={type:"ExpandOperator"};return this.isMatchPattern=!0,this.isWildMatchPattern=!0,this.data.segments=[],this.next(),this.append(y,this.parseAtom(this.state.type)),y}parseWildcardOperator(){const y={type:"WildcardOperator"};return this.state.type===a.dbStarTok&&(y.optional=!0),this.isMatchPattern=!0,this.isWildMatchPattern=!0,this.data.segments=[],this.next(),this.state.type===a.parenLTok?y.filter=this.parseGroupExpression(y):this.state.type===a.bracketLTok&&(y.filter=this.parseRangeExpression(y)),this.append(y,this.parseAtom(this.state.type)),y}parseDestructorExpression(){const y={type:"DestructorExpression"};this.state.context.push(n.destructorContext);const m=this.state.pos-1;y.value=this.state.type===a.braceLTok?this.parseObjectPattern():this.parseArrayPattern();const g=this.state.pos;return this.state.context.pop(),y.source=this.input.substring(m,g).replace(/\[\s*([+\-*/])?\s*([^,\]\s]*)\s*\]/,(x,P,S)=>this.relative!==void 0?P?S?i(this.relative,S,P):i(this.relative,1,P):S?i(this.relative,S,"+"):String(this.relative):x).replace(/\s*\.\s*/g,"").replace(/\s*/g,""),this.relative===void 0&&(0,u.setDestructor)(y.source,(0,u.parseDestructorRules)(y)),this.relative=void 0,this.pushSegments(y.source),this.next(),this.append(y,this.parseAtom(this.state.type)),y}parseArrayPattern(){const y={type:"ArrayPattern",elements:[]};return this.next(),y.elements=this.parseArrayPatternElements(),y}parseArrayPatternElements(){const y=[];for(;this.state.type!==a.bracketRTok&&this.state.type!==a.eofTok;){if(y.push(this.parseAtom(this.state.type)),this.state.type===a.bracketRTok)return this.includesContext(n.destructorContext)&&this.next(),y;this.next()}return y}parseObjectPattern(){const y={type:"ObjectPattern",properties:[]};return this.next(),y.properties=this.parseObjectProperties(),y}parseObjectProperties(){const y=[];for(;this.state.type!==a.braceRTok&&this.state.type!==a.eofTok;){const m={type:"ObjectPatternProperty",key:this.parseAtom(this.state.type)};if(y.push(m),this.state.type===a.colonTok&&(this.next(),m.value=this.parseAtom(this.state.type)),this.state.type===a.braceRTok)return this.includesContext(n.destructorContext)&&this.next(),y;this.next()}return y}parseDotOperator(){const y={type:"DotOperator"};if(!this.type_&&this.base){if(this.base.isMatchPattern)throw new Error("Base path must be an absolute path.");for(this.data.segments=this.base.toArr();this.state.type===a.dotTok;)this.relative=this.data.segments.pop(),this.haveRelativePattern=!0,this.next();return l(this.data.segments.slice(),this.parseAtom(this.state.type))}else this.next();return this.append(y,this.parseAtom(this.state.type)),y}parseIgnoreExpression(){this.next();const y=String(this.state.value).replace(/\s*/g,""),m={type:"IgnoreExpression",value:y};return this.pushSegments(y),this.next(),this.append(m,this.parseAtom(this.state.type)),this.next(),m}parseGroupExpression(y){const m={type:"GroupExpression",value:[]};this.isMatchPattern=!0,this.data.segments=[],this.next();e:for(;;)switch(this.state.type){case a.commaTok:this.next();break;case a.bangTok:m.isExclude=!0,this.haveExcludePattern=!0,this.next();break;case a.eofTok:break e;case a.parenRTok:break e;default:m.value.push(this.parseAtom(this.state.type))}return this.next(),this.append(y,this.parseAtom(this.state.type)),m}parseRangeExpression(y){const m={type:"RangeExpression"};this.next(),this.isMatchPattern=!0,this.data.segments=[];let g=!1,x=!1;e:for(;;)switch(this.state.type){case a.colonTok:x=!0,g=!0,this.next();break;case a.bracketRTok:!x&&!m.end&&(m.end=m.start);break e;case a.commaTok:throw this.unexpect();case a.eofTok:break e;default:g?m.end=this.parseAtom(this.state.type):m.start=this.parseAtom(this.state.type)}return this.next(),this.append(y,this.parseAtom(this.state.type)),m}};r(c,"Parser");let p=c;return ar}var ir,xs;function Uu(){if(xs)return ir;xs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(I,E)=>e(I,"name",{value:E,configurable:!0}),b=(I,E)=>{for(var R in E)e(I,R,{get:E[R],enumerable:!0})},v=(I,E,R,N)=>{if(E&&typeof E=="object"||typeof E=="function")for(let L of o(E))!f.call(I,L)&&L!==R&&e(I,L,{get:()=>E[L],enumerable:!(N=t(E,L))||N.enumerable});return I},F=I=>v(e({},"__esModule",{value:!0}),I),_={};b(_,{Path:()=>w}),ir=F(_);var n=ms(),u=Vu(),h=Lu(),s=bt();const a=new Map,l=Symbol("PATH_MATCHER"),i=r(I=>I!=null,"isValid"),c=r(I=>I.indexOf("*")===-1&&I.indexOf("~")===-1&&I.indexOf("[")===-1&&I.indexOf("]")===-1&&I.indexOf(",")===-1&&I.indexOf(":")===-1&&I.indexOf(" ")===-1&&I[0]!==".","isSimplePath"),p=r(I=>typeof I=="object"||typeof I=="function","isAssignable"),d=r(I=>(0,s.isStr)(I)?/^\d+$/.test(I):(0,s.isNum)(I),"isNumberIndex"),y=r((I,E)=>{for(let R=0;R<I.length;R++){const N=I[R],L=(0,n.getDestructor)(N);if(L){E=(0,n.getInByDestructor)(E,L,{setIn:m,getIn:y});break}else{if(!i(E))return;E=E[N]}}return E},"getIn"),m=r((I,E,R)=>{for(let N=0;N<I.length;N++){const L=I[N],K=(0,n.getDestructor)(L);if(K){(0,n.setInByDestructor)(E,K,R,{setIn:m,getIn:y});break}else{if(!i(E)||!p(E)||(0,s.isArr)(E)&&!d(L))return;if(!i(E[L])){if(R===void 0){E[L]===null&&(E[L]=R);return}N<I.length-1&&(E[L]=(0,s.isNum)(I[N+1])?[]:{})}N===I.length-1&&(E[L]=R),E=E[L]}}},"setIn"),g=r((I,E)=>{for(let R=0;R<I.length;R++){const N=I[R],L=(0,n.getDestructor)(N);if(L){(0,n.deleteInByDestructor)(E,L,{setIn:m,getIn:y,deleteIn:g});break}else{if(R===I.length-1&&i(E)){delete E[N];return}if(!i(E)||!p(E)||(E=E[N],!(0,s.isObj)(E)))return}}},"deleteIn"),x=Object.prototype.hasOwnProperty,P=r((I,E,R)=>{R instanceof w&&(R=R.length);for(let N=R;N<I.length;N++){const L=I[N],K=(0,n.getDestructor)(L);if(K)return(0,n.existInByDestructor)(E,K,R,{setIn:m,getIn:y,deleteIn:g,existIn:P});if(N===I.length-1)return x.call(E,L);if(!i(E)||!p(E)||(E=E[L],!(0,s.isObj)(E)))return!1}},"existIn"),S=r((I,E)=>{if(I instanceof w)return{entire:I.entire,segments:I.segments.slice(),isRegExp:!1,haveRelativePattern:I.haveRelativePattern,isWildMatchPattern:I.isWildMatchPattern,isMatchPattern:I.isMatchPattern,haveExcludePattern:I.haveExcludePattern,tree:I.tree};if((0,s.isStr)(I)){if(!I)return{entire:"",segments:[],isRegExp:!1,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!1};if(c(I))return{entire:I,segments:I.split("."),isRegExp:!1,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!1};const R=new h.Parser(I,w.parse(E)),N=R.parse();if(R.isMatchPattern)return{entire:I,segments:[],isRegExp:!1,haveRelativePattern:!1,isWildMatchPattern:R.isWildMatchPattern,haveExcludePattern:R.haveExcludePattern,isMatchPattern:!0,tree:N};{const L=R.data.segments;return{entire:L.join("."),segments:L,tree:N,isRegExp:!1,haveRelativePattern:R.haveRelativePattern,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!1}}}else return(0,s.isFn)(I)&&I[l]?S(I.path):(0,s.isArr)(I)?{entire:I.join("."),segments:I.reduce((R,N)=>R.concat(j(N)),[]),isRegExp:!1,haveRelativePattern:!1,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!1}:(0,s.isRegExp)(I)?{entire:I,segments:[],isRegExp:!0,haveRelativePattern:!1,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!0}:{entire:"",isRegExp:!1,segments:I!==void 0?[I]:[],haveRelativePattern:!1,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!1}},"parse"),j=r(I=>{if((0,s.isStr)(I)){I=I.replace(/\s*/g,"");try{const{segments:E,isMatchPattern:R}=S(I);return R?I:E}catch(E){return I}}else if(I instanceof w)return I.segments;return I},"parseString"),O=class Fe{constructor(E,R){this.concat=r((...B)=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be concat`);const U=new Fe("");return U.segments=this.segments.concat(...B.map(J=>j(J))),U.entire=U.segments.join("."),U},"concat"),this.slice=r((B,U)=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be slice`);const J=new Fe("");return J.segments=this.segments.slice(B,U),J.entire=J.segments.join("."),J},"slice"),this.push=r((...B)=>this.concat(...B),"push"),this.pop=r(()=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be pop`);return new Fe(this.segments.slice(0,this.segments.length-1))},"pop"),this.splice=r((B,U,...J)=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be splice`);J=J.reduce((ee,ne)=>ee.concat(j(ne)),[]);const Q=this.segments.slice();return Q.splice(B,U,...J),new Fe(Q)},"splice"),this.forEach=r(B=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be each`);this.segments.forEach(B)},"forEach"),this.map=r(B=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be map`);return this.segments.map(B)},"map"),this.reduce=r((B,U)=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be reduce`);return this.segments.reduce(B,U)},"reduce"),this.parent=r(()=>this.slice(0,this.length-1),"parent"),this.includes=r(B=>{const{entire:U,segments:J,isMatchPattern:Q}=Fe.parse(B),ee=this.includesCache.get(U);if(ee!==void 0)return ee;const ne=r(pe=>(this.includesCache.set(U,pe),pe),"cacheWith");if(this.isMatchPattern){if(Q)throw new Error(`${this.entire} cannot be used to match ${U}`);return ne(this.match(J))}if(Q)throw new Error(`${this.entire} cannot be used to match ${U}`);if(J.length>this.segments.length)return ne(!1);for(let pe=0;pe<J.length;pe++)if(!(0,s.isEqual)(String(J[pe]),String(this.segments[pe])))return ne(!1);return ne(!0)},"includes"),this.transform=r((B,U)=>{if(!(0,s.isFn)(U))return"";if(this.isMatchPattern)throw new Error(`${this.entire} cannot be transformed`);const J=new RegExp(B),Q=this.segments.filter(ee=>J.test(ee));return U(...Q)},"transform"),this.match=r(B=>{var U,J;const Q=Fe.parse(B),ee=this.matchCache.get(Q.entire);if(ee!==void 0)return ee.record&&ee.record.score!==void 0&&(this.matchScore=ee.record.score),ee.matched;const ne=r(pe=>(this.matchCache.set(Q.entire,pe),pe),"cacheWith");if(Q.isMatchPattern){if(this.isMatchPattern)throw new Error(`${Q.entire} cannot match ${this.entire}`);return this.matchScore=0,ne(Q.match(this.segments))}else if(this.isMatchPattern){if(this.isRegExp)try{return(J=(U=this.entire)==null?void 0:U.test)==null?void 0:J.call(U,Q.entire)}finally{this.entire.lastIndex=0}const pe={score:0},Oe=ne(new u.Matcher(this.tree,pe).match(Q.segments));return this.matchScore=pe.score,Oe.matched}else{const pe={score:0},Oe=ne(u.Matcher.matchSegments(this.segments,Q.segments,pe));return this.matchScore=pe.score,Oe.matched}},"match"),this.matchAliasGroup=r((B,U)=>{const J=Fe.parse(B),Q=Fe.parse(U),ee=this.match(J),ne=this.matchScore,pe=this.match(Q),Oe=this.matchScore;return this.haveExcludePattern?ne>=Oe?ee:pe:ee||pe},"matchAliasGroup"),this.existIn=r((B,U=0)=>P(this.segments,B,U),"existIn"),this.getIn=r(B=>y(this.segments,B),"getIn"),this.setIn=r((B,U)=>(m(this.segments,B,U),B),"setIn"),this.deleteIn=r(B=>(g(this.segments,B),B),"deleteIn"),this.ensureIn=r((B,U)=>{const J=this.getIn(B);return J===void 0?(this.setIn(B,U),this.getIn(B)):J},"ensureIn");const{tree:N,segments:L,entire:K,isRegExp:te,isMatchPattern:Y,isWildMatchPattern:re,haveRelativePattern:ae,haveExcludePattern:z}=S(E,R);this.entire=K,this.segments=L,this.isMatchPattern=Y,this.isWildMatchPattern=re,this.haveRelativePattern=ae,this.isRegExp=te,this.haveExcludePattern=z,this.tree=N,this.matchCache=new Map,this.includesCache=new Map}toString(){var E;return(E=this.entire)==null?void 0:E.toString()}toArr(){var E;return(E=this.segments)==null?void 0:E.slice()}get length(){return this.segments.length}static match(E){const R=Fe.parse(E),N=r(L=>R.match(L),"matcher");return N[l]=!0,N.path=R,N}static isPathPattern(E){return!!((0,s.isStr)(E)||(0,s.isArr)(E)||(0,s.isRegExp)(E)||(0,s.isFn)(E)&&E[l])}static transform(E,R,N){return Fe.parse(E).transform(R,N)}static parse(E="",R){if(E instanceof Fe){const N=a.get(E.entire);return N||(a.set(E.entire,E),E)}else{if(E&&E[l])return Fe.parse(E.path);{const N=R?Fe.parse(R):"",L=`${E}:${N}`,K=a.get(L);return K||(E=new Fe(E,R),a.set(L,E),E)}}}};r(O,"Path"),O.getIn=r((I,E)=>O.parse(E).getIn(I),"getIn"),O.setIn=r((I,E,R)=>O.parse(E).setIn(I,R),"setIn"),O.deleteIn=r((I,E)=>O.parse(E).deleteIn(I),"deleteIn"),O.existIn=r((I,E,R)=>O.parse(E).existIn(I,R),"existIn"),O.ensureIn=r((I,E,R)=>O.parse(E).ensureIn(I,R),"ensureIn");let w=O;return ir}var cr,gs;function Gu(){if(gs)return cr;gs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(n,u)=>{for(var h in u)e(n,h,{get:u[h],enumerable:!0})},b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of o(u))!f.call(n,a)&&a!==h&&e(n,a,{get:()=>u[a],enumerable:!(s=t(u,a))||s.enumerable});return n},v=n=>b(e({},"__esModule",{value:!0}),n),F={};r(F,{FormPath:()=>_.Path}),cr=v(F);var _=Uu();return cr}var ur,Fs;function Hu(){if(Fs)return ur;Fs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{deprecate:()=>h}),ur=F(_);var n=Be();const u={};function h(s,a,l){if((0,n.isFn)(s))return function(i,c,p,d,y){return h(a,l),s.apply(this,arguments)};(0,n.isStr)(s)&&!u[s]&&(u[s]=!0,console.warn(new Error(`${s} has been deprecated. Do not continue to use this api.${a||""}`)))}return r(h,"deprecate"),ur}var lr,Ss;function zu(){if(Ss)return lr;Ss=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>e(a,"name",{value:l,configurable:!0}),b=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},v=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{Subscribable:()=>s}),lr=F(_);var n=Lt(),u=Be();const h=class{constructor(){this.subscribers={index:0},this.subscribe=r(l=>{if((0,u.isFn)(l)){const i=this.subscribers.index+1;return this.subscribers[i]=l,this.subscribers.index++,i}},"subscribe"),this.unsubscribe=r(l=>{this.subscribers[l]?delete this.subscribers[l]:l||(this.subscribers={index:0})},"unsubscribe"),this.notify=r((l,i)=>{if(this.subscription&&this.subscription&&(0,u.isFn)(this.subscription.notify)&&this.subscription.notify.call(this,l)===!1||i)return;const c=r(p=>this.subscription&&(0,u.isFn)(this.subscription.filter)?this.subscription.filter.call(this,p):p,"filter");(0,n.each)(this.subscribers,p=>{(0,u.isFn)(p)&&p(c(l))})},"notify")}};r(h,"Subscribable");let s=h;return lr}var pr,Ps;function Ju(){if(Ps)return pr;Ps=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,h)=>e(u,"name",{value:h,configurable:!0}),b=(u,h)=>{for(var s in h)e(u,s,{get:h[s],enumerable:!0})},v=(u,h,s,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let l of o(h))!f.call(u,l)&&l!==s&&e(u,l,{get:()=>h[l],enumerable:!(a=t(h,l))||a.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{applyMiddleware:()=>n}),pr=F(_);const n=r((u,h=[])=>{const s=r((a,l)=>{const i=a;return Promise.resolve(l[0](a,c=>s(c!=null?c:i,l.slice(1))))},"compose");return new Promise((a,l)=>{s(u,h.concat(i=>{a(i)})).catch(l)})},"applyMiddleware");return pr}var dr,Os;function Wu(){if(Os)return dr;Os=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(O,w)=>e(O,"name",{value:w,configurable:!0}),b=(O,w)=>{for(var I in w)e(O,I,{get:w[I],enumerable:!0})},v=(O,w,I,E)=>{if(w&&typeof w=="object"||typeof w=="function")for(let R of o(w))!f.call(O,R)&&R!==I&&e(O,R,{get:()=>w[R],enumerable:!(E=t(w,R))||E.enumerable});return O},F=O=>v(e({},"__esModule",{value:!0}),O),_={};b(_,{lazyMerge:()=>S,merge:()=>j}),dr=F(_);var n=Be(),u=Yt();function h(O){return s(O)&&!a(O)}r(h,"defaultIsMergeableObject");function s(O){return!!O&&typeof O=="object"}r(s,"isNonNullObject");function a(O){return"$$typeof"in O&&"_owner"in O||O._isAMomentObject||O._isJSONSchemaObject||(0,n.isFn)(O.toJS)||(0,n.isFn)(O.toJSON)?!0:!(0,n.isPlainObj)(O)}r(a,"isSpecial");function l(O){return Array.isArray(O)?[]:{}}r(l,"emptyTarget");function i(O,w){var I;return w.clone!==!1&&((I=w.isMergeableObject)!=null&&I.call(w,O))?P(l(O),O,w):O}r(i,"cloneUnlessOtherwiseSpecified");function c(O,w,I){return O.concat(w).map(function(E){return i(E,I)})}r(c,"defaultArrayMerge");function p(O,w){if(!w.customMerge)return P;const I=w.customMerge(O);return typeof I=="function"?I:P}r(p,"getMergeFunction");function d(O){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(O).filter(function(w){return O.propertyIsEnumerable(w)}):[]}r(d,"getEnumerableOwnPropertySymbols");function y(O){return(0,u.isValid)(O)?Object.keys(O).concat(d(O)):[]}r(y,"getKeys");function m(O,w){try{return w in O}catch(I){return!1}}r(m,"propertyIsOnObject");function g(O,w){return m(O,w)&&!(Object.hasOwnProperty.call(O,w)&&Object.propertyIsEnumerable.call(O,w))}r(g,"propertyIsUnsafe");function x(O,w,I){const E=I.assign?O||{}:{};return I.isMergeableObject(O)?(I.assign||y(O).forEach(function(R){E[R]=i(O[R],I)}),y(w).forEach(function(R){g(O,R)||((0,u.isEmpty)(O[R])?E[R]=w[R]:m(O,R)&&I.isMergeableObject(w[R])?E[R]=p(R,I)(O[R],w[R],I):E[R]=i(w[R],I))}),E):O}r(x,"mergeObject");function P(O,w,I){I=I||{},I.arrayMerge=I.arrayMerge||c,I.isMergeableObject=I.isMergeableObject||h,I.cloneUnlessOtherwiseSpecified=i;const E=Array.isArray(w),R=Array.isArray(O);return E===R?E?I.arrayMerge(O,w,I):x(O,w,I):i(w,I)}r(P,"deepmerge");const S=r((O,...w)=>{const I=r((E,R)=>{if(!(0,u.isValid)(R))return E;if(!(0,u.isValid)(E))return R;const N=typeof E=="object",L=typeof R=="object",K=typeof E=="function",te=typeof R=="function";if(!N&&!K)return R;if(!L&&!te)return E;const Y=r(()=>K?E():E,"getTarget"),re=r(()=>te?R():R,"getSource"),ae=r((ee,ne,pe)=>{const Oe=re(),tt=Y();return ne in Oe?Oe[ne]=pe:ne in tt?tt[ne]=pe:Oe[ne]=pe,!0},"set"),z=r((ee,ne)=>{const pe=re();return ne in pe?pe[ne]:Y()[ne]},"get"),B=r(()=>{const ee=re(),ne=Y(),pe=Object.keys(ne);for(const Oe in ee)Oe in ne||pe.push(Oe);return pe},"ownKeys"),U=r((ee,ne)=>({value:z(ee,ne),enumerable:!0,configurable:!0}),"getOwnPropertyDescriptor"),J=r((ee,ne)=>ne in re()||ne in Y(),"has"),Q=r(()=>Object.getPrototypeOf({}),"getPrototypeOf");return new Proxy(Object.create(null),{set:ae,get:z,ownKeys:B,getPrototypeOf:Q,getOwnPropertyDescriptor:U,has:J})},"_lazyMerge");return w.reduce((E,R)=>I(E,R),O)},"lazyMerge"),j=P;return dr}var mr,Cs;function Yu(){if(Cs)return mr;Cs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{defaults:()=>l}),mr=F(_);var n=Lt(),u=Be(),h=Yt();const s=r(i=>{if(i!=null&&i._owner&&(i!=null&&i.$$typeof)||i!=null&&i._isAMomentObject||i!=null&&i._isJSONSchemaObject||i!=null&&i.toJS||i!=null&&i.toJSON)return!0},"isUnNormalObject"),a=r(i=>s(i)?!1:typeof i=="object","isEnumerableObject"),l=r((i,c)=>{if((0,u.getType)(i)!==(0,u.getType)(c)||!a(i)||!a(c))return(0,h.isEmpty)(c)?i:c;{const p=(0,u.isArr)(i)?[]:(0,u.isPlainObj)(i)?{}:i;return(0,n.each)(c,(d,y)=>{p[y]=l(i[y],d)}),(0,n.each)(i,(d,y)=>{(0,h.isValid)(p[y])||(p[y]=d)}),p}},"defaults");return mr}var fr,ws;function qu(){if(ws)return fr;ws=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{uid:()=>h}),fr=F(_);let n=36,u="";for(;n--;)u+=n.toString(36);function h(s){let a="",l=s||11;for(;l--;)a+=u[Math.random()*36|0];return a}return r(h,"uid"),fr}var Es;function le(){return Es||(Es=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Lt(),e.exports),v(_,vu(),e.exports),v(_,Be(),e.exports),v(_,yu(),e.exports),v(_,Yt(),e.exports),v(_,Tu(),e.exports),v(_,ku(),e.exports),v(_,Qn(),e.exports),v(_,Gu(),e.exports),v(_,Hu(),e.exports),v(_,zu(),e.exports),v(_,Ju(),e.exports),v(_,Wu(),e.exports),v(_,Ht(),e.exports),v(_,Yu(),e.exports),v(_,qu(),e.exports)}(kt)),kt.exports}var hr={exports:{}},br,js;function Le(){if(js)return br;js=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>e(m,"name",{value:g,configurable:!0}),b=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},v=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},F=m=>v(e({},"__esModule",{value:!0}),m),_={};b(_,{isArr:()=>i,isCollectionType:()=>d,isFn:()=>l,isMap:()=>u,isNormalType:()=>y,isPlainObj:()=>c,isSet:()=>h,isValid:()=>p,isWeakMap:()=>s,isWeakSet:()=>a}),br=F(_);const n=Object.prototype.toString,u=r(m=>m&&m instanceof Map,"isMap"),h=r(m=>m&&m instanceof Set,"isSet"),s=r(m=>m&&m instanceof WeakMap,"isWeakMap"),a=r(m=>m&&m instanceof WeakSet,"isWeakSet"),l=r(m=>typeof m=="function","isFn"),i=Array.isArray,c=r(m=>n.call(m)==="[object Object]","isPlainObj"),p=r(m=>m!=null,"isValid"),d=r(m=>u(m)||s(m)||h(m)||a(m),"isCollectionType"),y=r(m=>c(m)||i(m),"isNormalType");return br}var vr,Is;function yr(){if(Is)return vr;Is=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{ArraySet:()=>h,toArray:()=>n}),vr=F(_);const n=r(s=>Array.isArray(s)?s:s!=null?[s]:[],"toArray"),u=class{constructor(a=[]){this.forEachIndex=0,this.value=a}add(a){this.has(a)||this.value.push(a)}has(a){return this.value.indexOf(a)>-1}delete(a){const l=this.value.length;if(l===0)return;if(l===1&&this.value[0]===a){this.value=[];return}const i=this.value.indexOf(a);i>-1&&(this.value.splice(i,1),i<=this.forEachIndex&&(this.forEachIndex-=1))}forEach(a){if(this.value.length!==0)for(this.forEachIndex=0;this.forEachIndex<this.value.length;this.forEachIndex++)a(this.value[this.forEachIndex])}batchDelete(a){if(this.value.length!==0)for(this.forEachIndex=0;this.forEachIndex<this.value.length;this.forEachIndex++){const l=this.value[this.forEachIndex];this.value.splice(this.forEachIndex,1),this.forEachIndex--,a(l)}}clear(){this.value.length=0}};r(u,"ArraySet");let h=u;return vr}var _r,As;function Se(){if(As)return _r;As=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(O,w)=>{for(var I in w)e(O,I,{get:w[I],enumerable:!0})},b=(O,w,I,E)=>{if(w&&typeof w=="object"||typeof w=="function")for(let R of o(w))!f.call(O,R)&&R!==I&&e(O,R,{get:()=>w[R],enumerable:!(E=t(w,R))||E.enumerable});return O},v=O=>b(e({},"__esModule",{value:!0}),O),F={};r(F,{BatchCount:()=>i,BatchEndpoints:()=>g,BatchScope:()=>p,DependencyCollected:()=>d,MakeObModelSymbol:()=>P,ObModelNodeSymbol:()=>j,ObModelSymbol:()=>S,ObserverListeners:()=>x,PendingReactions:()=>y,PendingScopeReactions:()=>m,ProxyRaw:()=>n,RawNode:()=>s,RawProxy:()=>u,RawReactionsMap:()=>a,RawShallowProxy:()=>h,ReactionStack:()=>l,UntrackCount:()=>c}),_r=v(F);var _=yr();const n=new WeakMap,u=new WeakMap,h=new WeakMap,s=new WeakMap,a=new WeakMap,l=[],i={value:0},c={value:0},p={value:!1},d={value:!1},y=new _.ArraySet,m=new _.ArraySet,g=new _.ArraySet,x=new _.ArraySet,P=Symbol("MakeObModelSymbol"),S=Symbol("ObModelSymbol"),j=Symbol("ObModelNodeSymbol");return _r}var xr,Ds;function Je(){if(Ds)return xr;Ds=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{DataChange:()=>s,DataNode:()=>l,buildDataTree:()=>p,getDataNode:()=>i,setDataNode:()=>c}),xr=F(_);var n=Se(),u=et();const h=class{constructor(y,m){this.node=m,this.key=y.key,this.type=y.type,this.object=y.target,this.value=y.value,this.oldValue=y.oldValue}get path(){return this.node.path.concat(this.key)}};r(h,"DataChange");let s=h;const a=class{constructor(y,m,g){this.target=y,this.key=m,this.value=g}get path(){return this.parent?this.parent.path.concat(this.key):this.key?[this.key]:[]}get targetRaw(){return(0,u.raw)(this.target)}get parent(){if(this.target)return i(this.targetRaw)}isEqual(y){return this.key?y.targetRaw===this.targetRaw&&y.key===this.key:y.value===this.value}contains(y){if(y===this)return!0;let m=y.parent;for(;m;){if(this.isEqual(m))return!0;m=m.parent}return!1}};r(a,"DataNode");let l=a;const i=r(d=>d!=null&&d[n.ObModelNodeSymbol]?d[n.ObModelNodeSymbol]:n.RawNode.get(d),"getDataNode"),c=r((d,y)=>{if(d!=null&&d[n.ObModelSymbol]){d[n.ObModelNodeSymbol]=y;return}n.RawNode.set(d,y)},"setDataNode"),p=r((d,y,m)=>{const g=(0,u.raw)(m),x=i(g);if(x)return x;c(g,new l(d,y,m))},"buildDataTree");return xr}var gr,Ms;function et(){if(Ms)return gr;Ms=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(S,j)=>e(S,"name",{value:j,configurable:!0}),b=(S,j)=>{for(var O in j)e(S,O,{get:j[O],enumerable:!0})},v=(S,j,O,w)=>{if(j&&typeof j=="object"||typeof j=="function")for(let I of o(j))!f.call(S,I)&&I!==O&&e(S,I,{get:()=>j[I],enumerable:!(w=t(j,I))||w.enumerable});return S},F=S=>v(e({},"__esModule",{value:!0}),S),_={};b(_,{contains:()=>x,hasCollected:()=>P,isAnnotation:()=>c,isObservable:()=>i,isSupportObservable:()=>p,markObservable:()=>y,markRaw:()=>d,raw:()=>m,toJS:()=>g}),gr=F(_);var n=Le(),u=Se(),h=Je();const s=Symbol("RAW_TYPE"),a=Symbol("OBSERVABLE_TYPE"),l=Object.prototype.hasOwnProperty,i=r(S=>u.ProxyRaw.has(S)||!!(S!=null&&S[u.ObModelSymbol]),"isObservable"),c=r(S=>S&&!!S[u.MakeObModelSymbol],"isAnnotation"),p=r(S=>(0,n.isValid)(S)?(0,n.isArr)(S)?!0:(0,n.isPlainObj)(S)?S[s]?!1:S[a]?!0:!("$$typeof"in S&&"_owner"in S||S._isAMomentObject||S._isJSONSchemaObject||(0,n.isFn)(S.toJS)||(0,n.isFn)(S.toJSON)):!!((0,n.isMap)(S)||(0,n.isWeakMap)(S)||(0,n.isSet)(S)||(0,n.isWeakSet)(S)):!1,"isSupportObservable"),d=r(S=>{if(S)return(0,n.isFn)(S)?S.prototype[s]=!0:S[s]=!0,S},"markRaw"),y=r(S=>{if(S)return(0,n.isFn)(S)?S.prototype[a]=!0:S[a]=!0,S},"markObservable"),m=r(S=>S!=null&&S[u.ObModelSymbol]?S[u.ObModelSymbol]:u.ProxyRaw.get(S)||S,"raw"),g=r(S=>{const j=new WeakSet,O=r(w=>{if(j.has(w)||w&&w[s])return w;if((0,n.isArr)(w)){if(i(w)){j.add(w);const I=[];return w.forEach(E=>{I.push(O(E))}),j.delete(w),I}}else if((0,n.isPlainObj)(w)&&i(w)){j.add(w);const I={};for(const E in w)l.call(w,E)&&(I[E]=O(w[E]));return j.delete(w),I}return w},"_toJS");return O(S)},"toJS"),x=r((S,j)=>{const O=m(S),w=m(j);if(O===w)return!0;const I=(0,h.getDataNode)(O),E=(0,h.getDataNode)(w);return!I||!E?!1:I.contains(E)},"contains"),P=r(S=>(u.DependencyCollected.value=!1,S==null||S(),u.DependencyCollected.value),"hasCollected");return gr}var Fr,Rs;function Ne(){if(Rs)return Fr;Rs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(z,B)=>e(z,"name",{value:B,configurable:!0}),b=(z,B)=>{for(var U in B)e(z,U,{get:B[U],enumerable:!0})},v=(z,B,U,J)=>{if(B&&typeof B=="object"||typeof B=="function")for(let Q of o(B))!f.call(z,Q)&&Q!==U&&e(z,Q,{get:()=>B[Q],enumerable:!(J=t(B,Q))||J.enumerable});return z},F=z=>v(e({},"__esModule",{value:!0}),z),_={};b(_,{batchEnd:()=>O,batchScopeEnd:()=>I,batchScopeStart:()=>w,batchStart:()=>j,bindComputedReactions:()=>y,bindTargetKeyWithCurrentReaction:()=>d,disposeBindingReactions:()=>S,disposeEffects:()=>ae,executeBatchEndpoints:()=>Y,executePendingReactions:()=>te,hasDepsChange:()=>re,hasRunningReaction:()=>g,isBatching:()=>N,isScopeBatching:()=>L,isUntracking:()=>K,releaseBindingReactions:()=>x,runReactionsFromTargetKey:()=>m,suspendComputedReactions:()=>P,untrackEnd:()=>R,untrackStart:()=>E}),Fr=F(_);var n=yr(),u=Le(),h=Se();const s=Symbol("iteration key"),a=r((z,B,U)=>{const J=h.RawReactionsMap.get(z);if(J){const Q=J.get(B);return Q?Q.add(U):J.set(B,new n.ArraySet([U])),J}else{const Q=new Map([[B,new n.ArraySet([U])]]);return h.RawReactionsMap.set(z,Q),Q}},"addRawReactionsMap"),l=r((z,B)=>{const U=z._reactionsSet;return U?U.add(B):z._reactionsSet=new n.ArraySet([B]),U},"addReactionsMapToReaction"),i=r((z,B)=>{const U=h.RawReactionsMap.get(z),J=[];if(U){const Q=U.get(B);Q&&Q.forEach(ee=>{J.indexOf(ee)===-1&&J.push(ee)})}return J},"getReactionsFromTargetKey"),c=r((z,B)=>{const U=i(z,B),J=h.UntrackCount.value;h.UntrackCount.value=0;for(let Q=0,ee=U.length;Q<ee;Q++){const ne=U[Q];ne._isComputed?ne._scheduler(ne):L()?h.PendingScopeReactions.add(ne):N()?h.PendingReactions.add(ne):(0,u.isFn)(ne._scheduler)?ne._scheduler(ne):ne()}h.UntrackCount.value=J},"runReactions"),p=r(z=>{h.ObserverListeners.forEach(B=>B(z))},"notifyObservers"),d=r(z=>{let{key:B,type:U,target:J}=z;U==="iterate"&&(B=s);const Q=h.ReactionStack.length;if(Q===0)return;const ee=h.ReactionStack[Q-1];K()||ee&&(h.DependencyCollected.value=!0,l(ee,a(J,B,ee)))},"bindTargetKeyWithCurrentReaction"),y=r(z=>{if((0,u.isFn)(z)){const B=h.ReactionStack[h.ReactionStack.length-1];if(B){const U=B._computesSet;U?U.add(z):B._computesSet=new n.ArraySet([z])}}},"bindComputedReactions"),m=r(z=>{let{key:B,type:U,target:J,oldTarget:Q}=z;if(j(),p(z),U==="clear"?Q.forEach((ee,ne)=>{c(J,ne)}):c(J,B),U==="add"||U==="delete"||U==="clear"){const ee=Array.isArray(J)?"length":s;c(J,ee)}O()},"runReactionsFromTargetKey"),g=r(()=>h.ReactionStack.length>0,"hasRunningReaction"),x=r(z=>{var B;(B=z._reactionsSet)==null||B.forEach(U=>{U.forEach(J=>{J.delete(z)})}),h.PendingReactions.delete(z),h.PendingScopeReactions.delete(z),delete z._reactionsSet},"releaseBindingReactions"),P=r(z=>{var B;(B=z._computesSet)==null||B.forEach(U=>{i(U._context,U._property).length===0&&(S(U),U._dirty=!0)})},"suspendComputedReactions"),S=r(z=>{z._disposed=!0,x(z),P(z)},"disposeBindingReactions"),j=r(()=>{h.BatchCount.value++},"batchStart"),O=r(()=>{if(h.BatchCount.value--,h.BatchCount.value===0){const z=h.UntrackCount.value;h.UntrackCount.value=0,te(),Y(),h.UntrackCount.value=z}},"batchEnd"),w=r(()=>{h.BatchScope.value=!0},"batchScopeStart"),I=r(()=>{const z=h.UntrackCount.value;h.BatchScope.value=!1,h.UntrackCount.value=0,h.PendingScopeReactions.batchDelete(B=>{(0,u.isFn)(B._scheduler)?B._scheduler(B):B()}),h.UntrackCount.value=z},"batchScopeEnd"),E=r(()=>{h.UntrackCount.value++},"untrackStart"),R=r(()=>{h.UntrackCount.value--},"untrackEnd"),N=r(()=>h.BatchCount.value>0,"isBatching"),L=r(()=>h.BatchScope.value,"isScopeBatching"),K=r(()=>h.UntrackCount.value>0,"isUntracking"),te=r(()=>{h.PendingReactions.batchDelete(z=>{(0,u.isFn)(z._scheduler)?z._scheduler(z):z()})},"executePendingReactions"),Y=r(()=>{h.BatchEndpoints.batchDelete(z=>{z()})},"executeBatchEndpoints"),re=r((z,B)=>z===B?!1:!!(z.length!==B.length||z.some((U,J)=>U!==B[J])),"hasDepsChange"),ae=r(z=>{if(z._effects)try{j(),z._effects.queue.forEach(B=>{!B||!B.dispose||B.dispose()})}finally{O()}},"disposeEffects");return Fr}var Sr,Ns;function Ku(){if(Ns)return Sr;Ns=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>e(m,"name",{value:g,configurable:!0}),b=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},v=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},F=m=>v(e({},"__esModule",{value:!0}),m),_={};b(_,{baseHandlers:()=>y,collectionHandlers:()=>d}),Sr=F(_);var n=Se(),u=et(),h=Te(),s=Ne();const a=new Set(Object.getOwnPropertyNames(Symbol).reduce((m,g)=>{if(g==="arguments"||g==="caller")return m;const x=Symbol[g];return typeof x=="symbol"?m.concat(x):m},[])),l=Object.prototype.hasOwnProperty;function i(m,g,x){const P=n.RawProxy.get(x);return P||(!(0,u.isObservable)(x)&&(0,u.isSupportObservable)(x)?(0,h.createObservable)(m,g,x):x)}r(i,"findObservable");function c(m,g,x,P){const S=x.next;return x.next=()=>{let{done:j,value:O}=S.call(x);return j||(P?O[1]=i(m,g,O[1]):O=i(m,g,O)),{done:j,value:O}},x}r(c,"patchIterator");const p={has(m){const g=n.ProxyRaw.get(this),x=Reflect.getPrototypeOf(this);return(0,s.bindTargetKeyWithCurrentReaction)({target:g,key:m,type:"has"}),x.has.apply(g,arguments)},get(m){const g=n.ProxyRaw.get(this),x=Reflect.getPrototypeOf(this);return(0,s.bindTargetKeyWithCurrentReaction)({target:g,key:m,type:"get"}),i(g,m,x.get.apply(g,arguments))},add(m){const g=n.ProxyRaw.get(this),x=Reflect.getPrototypeOf(this),P=x.has.call(g,m),S=x.add.apply(g,arguments);return P||(0,s.runReactionsFromTargetKey)({target:g,key:m,value:m,type:"add"}),S},set(m,g){const x=n.ProxyRaw.get(this),P=Reflect.getPrototypeOf(this),S=P.has.call(x,m),j=P.get.call(x,m),O=P.set.apply(x,arguments);return S?g!==j&&(0,s.runReactionsFromTargetKey)({target:x,key:m,value:g,oldValue:j,type:"set"}):(0,s.runReactionsFromTargetKey)({target:x,key:m,value:g,type:"add"}),O},delete(m){const g=n.ProxyRaw.get(this),x=Reflect.getPrototypeOf(this),P=x.has.call(g,m),S=x.get?x.get.call(g,m):void 0,j=x.delete.apply(g,arguments);return P&&(0,s.runReactionsFromTargetKey)({target:g,key:m,oldValue:S,type:"delete"}),j},clear(){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this),x=m.size!==0,P=m instanceof Map?new Map(m):new Set(m),S=g.clear.apply(m,arguments);return x&&(0,s.runReactionsFromTargetKey)({target:m,oldTarget:P,type:"clear"}),S},forEach(m,...g){const x=n.ProxyRaw.get(this),P=Reflect.getPrototypeOf(this);(0,s.bindTargetKeyWithCurrentReaction)({target:x,type:"iterate"});const S=r((j,O,...w)=>m(i(x,O,j),O,...w),"wrappedCb");return P.forEach.call(x,S,...g)},keys(){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this);return(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"}),g.keys.apply(m,arguments)},values(){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this);(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"});const x=g.values.apply(m,arguments);return c(m,"",x,!1)},entries(){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this);(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"});const x=g.entries.apply(m,arguments);return c(m,"",x,!0)},[Symbol.iterator](){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this);(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"});const x=g[Symbol.iterator].apply(m,arguments);return c(m,"",x,m instanceof Map)},get size(){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this);return(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"}),Reflect.get(g,"size",m)}},d={get(m,g,x){return m=l.call(p,g)?p:m,Reflect.get(m,g,x)}},y={get(m,g,x){if(!g)return;const P=m[g];if(typeof g=="symbol"&&a.has(g))return P;(0,s.bindTargetKeyWithCurrentReaction)({target:m,key:g,receiver:x,type:"get"});const S=n.RawProxy.get(P);if(S)return S;if(!(0,u.isObservable)(P)&&(0,u.isSupportObservable)(P)){const j=Reflect.getOwnPropertyDescriptor(m,g);if(!j||!(j.writable===!1&&j.configurable===!1))return(0,h.createObservable)(m,g,P)}return P},has(m,g){const x=Reflect.has(m,g);return(0,s.bindTargetKeyWithCurrentReaction)({target:m,key:g,type:"has"}),x},ownKeys(m){const g=Reflect.ownKeys(m);return(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"}),g},set(m,g,x,P){if(g==="__proto__")return m[g]=x,!0;const S=l.call(m,g),j=(0,h.createObservable)(m,g,x),O=m[g];return m[g]=j,S?x!==O&&(0,s.runReactionsFromTargetKey)({target:m,key:g,value:j,oldValue:O,receiver:P,type:"set"}):(0,s.runReactionsFromTargetKey)({target:m,key:g,value:j,oldValue:O,receiver:P,type:"add"}),!0},deleteProperty(m,g){const x=m[g];return delete m[g],(0,s.runReactionsFromTargetKey)({target:m,key:g,oldValue:x,type:"delete"}),!0}};return Sr}var Pr,Ts;function Te(){if(Ts)return Pr;Ts=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(P,S)=>e(P,"name",{value:S,configurable:!0}),b=(P,S)=>{for(var j in S)e(P,j,{get:S[j],enumerable:!0})},v=(P,S,j,O)=>{if(S&&typeof S=="object"||typeof S=="function")for(let w of o(S))!f.call(P,w)&&w!==j&&e(P,w,{get:()=>S[w],enumerable:!(O=t(S,w))||O.enumerable});return P},F=P=>v(e({},"__esModule",{value:!0}),P),_={};b(_,{createAnnotation:()=>d,createBindFunction:()=>g,createBoundaryAnnotation:()=>x,createBoundaryFunction:()=>m,createObservable:()=>p,getObservableMaker:()=>y}),Pr=F(_);var n=Le(),u=Se(),h=et(),s=Ku(),a=Je();const l=r((P,S)=>{const j=new Proxy(P,s.baseHandlers);return u.ProxyRaw.set(j,P),S?u.RawShallowProxy.set(P,j):u.RawProxy.set(P,j),j},"createNormalProxy"),i=r((P,S)=>{const j=new Proxy(P,s.collectionHandlers);return u.ProxyRaw.set(j,P),S?u.RawShallowProxy.set(P,j):u.RawProxy.set(P,j),j},"createCollectionProxy"),c=r(P=>(0,n.isNormalType)(P)?l(P,!0):(0,n.isCollectionType)(P)?i(P,!0):P,"createShallowProxy"),p=r((P,S,j,O)=>{if(typeof j!="object")return j;const w=u.ProxyRaw.get(j);if(w){const I=(0,a.getDataNode)(w);return I.target||(I.target=P),I.key=S,j}if(!(0,h.isSupportObservable)(j))return j;if(P){const I=u.ProxyRaw.get(P)||P;if(u.RawShallowProxy.get(I))return j}return(0,a.buildDataTree)(P,S,j),O?c(j):(0,n.isNormalType)(j)?l(j):(0,n.isCollectionType)(j)?i(j):j},"createObservable"),d=r(P=>{const S=r(j=>P({value:j}),"annotation");return(0,n.isFn)(P)&&(S[u.MakeObModelSymbol]=P),S},"createAnnotation"),y=r(P=>{if(P[u.MakeObModelSymbol])return P[u.MakeObModelSymbol][u.MakeObModelSymbol]?y(P[u.MakeObModelSymbol]):P[u.MakeObModelSymbol]},"getObservableMaker"),m=r((P,S)=>{function j(O){let w;try{P(),(0,n.isFn)(O)&&(w=O())}finally{S()}return w}return r(j,"boundary"),j.bound=g(j),j},"createBoundaryFunction"),g=r(P=>{function S(j,O){return(...w)=>P(()=>j.apply(O,w))}return r(S,"bind"),S},"createBindFunction"),x=r((P,S)=>{const j=m(P,S),O=d(({target:w,key:I})=>(w[I]=j.bound(w[I],w),w));return j[u.MakeObModelSymbol]=O,j.bound[u.MakeObModelSymbol]=O,j},"createBoundaryAnnotation");return Pr}var Or,ks;function Zu(){if(ks)return Or;ks=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},b=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},v=a=>b(e({},"__esModule",{value:!0}),a),F={};r(F,{batch:()=>s}),Or=v(F);var _=Le(),n=Se(),u=Te(),h=Ne();const s=(0,u.createBoundaryAnnotation)(h.batchStart,h.batchEnd);return s.scope=(0,u.createBoundaryAnnotation)(h.batchScopeStart,h.batchScopeEnd),s.endpoint=a=>{(0,_.isFn)(a)&&(n.BatchCount.value===0?a():n.BatchEndpoints.add(a))},Or}var Cr,Vs;function Bs(){if(Vs)return Cr;Vs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(h,s)=>{for(var a in s)e(h,a,{get:s[a],enumerable:!0})},b=(h,s,a,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of o(s))!f.call(h,i)&&i!==a&&e(h,i,{get:()=>s[i],enumerable:!(l=t(s,i))||l.enumerable});return h},v=h=>b(e({},"__esModule",{value:!0}),h),F={};r(F,{action:()=>u}),Cr=v(F);var _=Te(),n=Ne();const u=(0,_.createBoundaryAnnotation)(()=>{(0,n.batchStart)(),(0,n.untrackStart)()},()=>{(0,n.untrackEnd)(),(0,n.batchEnd)()});return u.scope=(0,_.createBoundaryAnnotation)(()=>{(0,n.batchScopeStart)(),(0,n.untrackStart)()},()=>{(0,n.untrackEnd)(),(0,n.batchScopeEnd)()}),Cr}var wr,Ls;function Qu(){if(Ls)return wr;Ls=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(h,s)=>{for(var a in s)e(h,a,{get:s[a],enumerable:!0})},b=(h,s,a,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of o(s))!f.call(h,i)&&i!==a&&e(h,i,{get:()=>s[i],enumerable:!(l=t(s,i))||l.enumerable});return h},v=h=>b(e({},"__esModule",{value:!0}),h),F={};r(F,{untracked:()=>u}),wr=v(F);var _=Te(),n=Ne();const u=(0,_.createBoundaryFunction)(n.untrackStart,n.untrackEnd);return wr}var Er={exports:{}},jr,Us;function Xu(){if(Us)return jr;Us=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{observable:()=>h}),jr=F(_);var n=Te(),u=Ne();const h=(0,n.createAnnotation)(({target:s,key:a,value:l})=>{const i={value:(0,n.createObservable)(s,a,s?s[a]:l)};function c(){return(0,u.bindTargetKeyWithCurrentReaction)({target:s,key:a,type:"get"}),i.value}r(c,"get");function p(d){const y=i.value;d=(0,n.createObservable)(s,a,d),i.value=d,y!==d&&(0,u.runReactionsFromTargetKey)({target:s,key:a,type:"set",oldValue:y,value:d})}return r(p,"set"),s?(Object.defineProperty(s,a,{set:p,get:c,enumerable:!0,configurable:!1}),s):i.value});return jr}var Ir,Gs;function $u(){if(Gs)return Ir;Gs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>e(l,"name",{value:i,configurable:!0}),b=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},v=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{box:()=>a}),Ir=F(_);var n=Se(),u=Te(),h=Ne(),s=Je();const a=(0,u.createAnnotation)(({target:l,key:i,value:c})=>{const p={value:l?l[i]:c},d={set:m,get:y};n.ProxyRaw.set(d,p),n.RawProxy.set(p,d),(0,s.buildDataTree)(l,i,p);function y(){return(0,h.bindTargetKeyWithCurrentReaction)({target:p,key:i,type:"get"}),p.value}r(y,"get");function m(g){const x=p.value;p.value=g,x!==g&&(0,h.runReactionsFromTargetKey)({target:p,key:i,type:"set",oldValue:x,value:g})}return r(m,"set"),l?(Object.defineProperty(l,i,{value:d,enumerable:!0,configurable:!1,writable:!1}),l):d});return Ir}var Ar,Hs;function el(){if(Hs)return Ar;Hs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>e(l,"name",{value:i,configurable:!0}),b=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},v=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{ref:()=>a}),Ar=F(_);var n=Se(),u=Te(),h=Ne(),s=Je();const a=(0,u.createAnnotation)(({target:l,key:i,value:c})=>{const p={value:l?l[i]:c},d={},y=l||p,m=l?i:"value";function g(){return(0,h.bindTargetKeyWithCurrentReaction)({target:y,key:m,type:"get"}),p.value}r(g,"get");function x(P){const S=p.value;p.value=P,S!==P&&(0,h.runReactionsFromTargetKey)({target:y,key:m,type:"set",oldValue:S,value:P})}return r(x,"set"),l?(Object.defineProperty(l,i,{get:g,set:x,enumerable:!0}),l):(Object.defineProperty(d,"value",{set:x,get:g}),(0,s.buildDataTree)(l,i,p),d[n.ObModelSymbol]=p,d)});return Ar}var Dr,zs;function tl(){if(zs)return Dr;zs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{shallow:()=>h}),Dr=F(_);var n=Te(),u=Ne();const h=(0,n.createAnnotation)(({target:s,key:a,value:l})=>{const i={value:(0,n.createObservable)(s,a,s?s[a]:l,!0)};function c(){return(0,u.bindTargetKeyWithCurrentReaction)({target:s,key:a,type:"get"}),i.value}r(c,"get");function p(d){const y=i.value;d=(0,n.createObservable)(s,a,d,!0),i.value=d,y!==d&&(0,u.runReactionsFromTargetKey)({target:s,key:a,type:"set",oldValue:y,value:d})}return r(p,"set"),s?(Object.defineProperty(s,a,{set:p,get:c,enumerable:!0,configurable:!1}),s):i.value});return Dr}var Mr,Js;function rl(){if(Js)return Mr;Js=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(g,x)=>e(g,"name",{value:x,configurable:!0}),b=(g,x)=>{for(var P in x)e(g,P,{get:x[P],enumerable:!0})},v=(g,x,P,S)=>{if(x&&typeof x=="object"||typeof x=="function")for(let j of o(x))!f.call(g,j)&&j!==P&&e(g,j,{get:()=>x[j],enumerable:!(S=t(x,j))||S.enumerable});return g},F=g=>v(e({},"__esModule",{value:!0}),g),_={};b(_,{computed:()=>m}),Mr=F(_);var n=Le(),u=Se(),h=Te(),s=Ne(),a=Je();const l=Object.getOwnPropertyDescriptor,i=Object.getPrototypeOf,c=Symbol("ClassDescriptorSymbol");function p(g,x){if(g)return l(g,x)||p(i(g),x)}r(p,"getPropertyDescriptor");function d(g,x){const P=g.constructor;if(P===Object||P===Array)return p(g,x);const S=P[c]||{},j=S[x];if(j)return j;const O=p(g,x);return P[c]=S,S[x]=O,O}r(d,"getPropertyDescriptorCache");function y(g,x,P){if(!g)return P?(0,n.isFn)(P)?{get:P}:P:{};const S=d(g,x);return S||{}}r(y,"getPrototypeDescriptor");const m=(0,h.createAnnotation)(({target:g,key:x,value:P})=>{const S={},j={},O=g||S,w=g?x:"value",I=y(g,w,P);function E(){var K;S.value=(K=I.get)==null?void 0:K.call(O)}r(E,"compute");function R(){if(u.ReactionStack.indexOf(R)===-1){(0,s.releaseBindingReactions)(R);try{u.ReactionStack.push(R),E()}finally{u.ReactionStack.pop()}}}r(R,"reaction"),R._name="ComputedReaction",R._scheduler=()=>{R._dirty=!0,(0,s.runReactionsFromTargetKey)({target:O,key:w,value:S.value,type:"set"})},R._isComputed=!0,R._dirty=!0,R._context=O,R._property=w;function N(){return(0,s.hasRunningReaction)()&&(0,s.bindComputedReactions)(R),(0,s.isUntracking)()?E():R._dirty&&(R(),R._dirty=!1),(0,s.bindTargetKeyWithCurrentReaction)({target:O,key:w,type:"get"}),S.value}r(N,"get");function L(K){var te;try{(0,s.batchStart)(),(te=I.set)==null||te.call(O,K)}finally{(0,s.batchEnd)()}}return r(L,"set"),g?(Object.defineProperty(g,x,{get:N,set:L,enumerable:!0}),g):(Object.defineProperty(j,"value",{set:L,get:N}),(0,a.buildDataTree)(g,x,S),j[u.ObModelSymbol]=S,j)});return Mr}var Ws;function ol(){return Ws||(Ws=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Xu(),e.exports),v(_,$u(),e.exports),v(_,el(),e.exports),v(_,tl(),e.exports),v(_,rl(),e.exports)}(Er)),Er.exports}var Rr,Ys;function qs(){if(Ys)return Rr;Ys=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(c,p)=>t(c,"name",{value:p,configurable:!0}),F=(c,p)=>{for(var d in p)t(c,d,{get:p[d],enumerable:!0})},_=(c,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of f(p))!b.call(c,m)&&m!==d&&t(c,m,{get:()=>p[m],enumerable:!(y=o(p,m))||y.enumerable});return c},n=(c,p,d)=>(d=c!=null?e(r(c)):{},_(!c||!c.__esModule?t(d,"default",{value:c,enumerable:!0}):d,c)),u=c=>_(t({},"__esModule",{value:!0}),c),h={};F(h,{observable:()=>i}),Rr=u(h);var s=n(ol()),a=Se(),l=Te();function i(c){return(0,l.createObservable)(null,null,c)}return v(i,"observable"),i.box=s.box,i.ref=s.ref,i.deep=s.observable,i.shallow=s.shallow,i.computed=s.computed,i[a.MakeObModelSymbol]=s.observable,Rr}var Nr,Ks;function nl(){if(Ks)return Nr;Ks=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{define:()=>c,model:()=>p}),Nr=F(_);var n=Bs(),u=Le(),h=Se(),s=et(),a=Te(),l=qs(),i=Je();function c(d,y){if((0,s.isObservable)(d)||!(0,s.isSupportObservable)(d))return d;d[h.ObModelSymbol]=d,(0,i.buildDataTree)(void 0,void 0,d);for(const m in y){const g=y[m];(0,s.isAnnotation)(g)&&(0,a.getObservableMaker)(g)({target:d,key:m})}return d}r(c,"define");function p(d){const y=Object.keys(d||{}).reduce((m,g)=>{const x=Object.getOwnPropertyDescriptor(d,g);return x&&x.get?m[g]=l.observable.computed:(0,u.isFn)(d[g])?m[g]=n.action:m[g]=l.observable,m},{});return c(d,y)}return r(p,"model"),Nr}var Tr,Zs;function sl(){if(Zs)return Tr;Zs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{autorun:()=>a,reaction:()=>l}),Tr=F(_);var n=yr(),u=Le(),h=Se(),s=Ne();const a=r((i,c="AutoRun")=>{const p=r(()=>{if((0,u.isFn)(i)&&!(p._boundary>0)&&h.ReactionStack.indexOf(p)===-1){(0,s.releaseBindingReactions)(p);try{(0,s.batchStart)(),h.ReactionStack.push(p),i()}finally{h.ReactionStack.pop(),p._boundary++,(0,s.batchEnd)(),p._boundary=0,p._memos.cursor=0,p._effects.cursor=0}}},"reaction"),d=r(()=>{p._memos={queue:[],cursor:0},p._effects={queue:[],cursor:0}},"cleanRefs");return p._boundary=0,p._name=c,d(),p(),()=>{(0,s.disposeBindingReactions)(p),(0,s.disposeEffects)(p),d()}},"autorun");a.memo=(i,c)=>{if(!(0,u.isFn)(i))return;const p=h.ReactionStack[h.ReactionStack.length-1];if(!p||!p._memos)throw new Error("autorun.memo must used in autorun function body.");const d=(0,n.toArray)(c||[]),y=p._memos.cursor++,m=p._memos.queue[y];if(!m||(0,s.hasDepsChange)(d,m.deps)){const g=i();return p._memos.queue[y]={value:g,deps:d},g}return m.value},a.effect=(i,c)=>{if(!(0,u.isFn)(i))return;const p=h.ReactionStack[h.ReactionStack.length-1];if(!p||!p._effects)throw new Error("autorun.effect must used in autorun function body.");const d=p._effects,y=(0,n.toArray)(c||[{}]),m=d.cursor++,g=d.queue[m];(!g||(0,s.hasDepsChange)(y,g.deps))&&(Promise.resolve(0).then(()=>{if(p._disposed)return;const x=i();(0,u.isFn)(x)&&(d.queue[m].dispose=x)}),d.queue[m]={deps:y})};const l=r((i,c,p)=>{const d=k({name:"Reaction"},p),y={},m=r(()=>(0,u.isFn)(d.equals)?!d.equals(y.oldValue,y.currentValue):y.oldValue!==y.currentValue,"dirtyCheck"),g=r(()=>{try{(0,s.batchStart)(),(0,u.isFn)(c)&&c(y.currentValue,y.oldValue)}finally{(0,s.batchEnd)()}},"fireAction"),x=r(()=>{if(h.ReactionStack.indexOf(x)===-1){(0,s.releaseBindingReactions)(x);try{h.ReactionStack.push(x),y.currentValue=i()}finally{h.ReactionStack.pop()}}},"reaction");return x._scheduler=P=>{P(),m()&&g(),y.oldValue=y.currentValue},x._name=d.name,x(),y.oldValue=y.currentValue,d.fireImmediately&&g(),()=>{(0,s.disposeBindingReactions)(x)}},"reaction");return Tr}var kr,Qs;function al(){if(Qs)return kr;Qs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>e(l,"name",{value:i,configurable:!0}),b=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},v=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{Tracker:()=>a}),kr=F(_);var n=Le(),u=Se(),h=Ne();const s=class{constructor(i,c="TrackerReaction"){this.track=r(p=>{if(!(0,n.isFn)(p))return this.results;if(!(this.track._boundary>0)){if(u.ReactionStack.indexOf(this.track)===-1){(0,h.releaseBindingReactions)(this.track);try{(0,h.batchStart)(),u.ReactionStack.push(this.track),this.results=p()}finally{u.ReactionStack.pop(),this.track._boundary++,(0,h.batchEnd)(),this.track._boundary=0}}return this.results}},"track"),this.dispose=r(()=>{(0,h.disposeBindingReactions)(this.track)},"dispose"),this.track._scheduler=p=>{this.track._boundary===0&&this.dispose(),(0,n.isFn)(p)&&i(p)},this.track._name=c,this.track._boundary=0}};r(s,"Tracker");let a=s;return kr}var Vr,Xs;function il(){if(Xs)return Vr;Xs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>e(l,"name",{value:i,configurable:!0}),b=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},v=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{observe:()=>a}),Vr=F(_);var n=Le(),u=Se(),h=et(),s=Je();const a=r((l,i,c=!0)=>{const p=r(d=>{const y=(0,h.raw)(d),m=(0,s.getDataNode)(y),g=r(x=>{const P=(0,h.raw)(x.target),S=(0,s.getDataNode)(P);if(c&&m.contains(S)){i(new s.DataChange(x,S));return}(m===S||m.targetRaw===P&&m.key===x.key)&&i(new s.DataChange(x,S))},"listener");return m&&(0,n.isFn)(i)&&u.ObserverListeners.add(g),()=>{u.ObserverListeners.delete(g)}},"addListener");if(l&&typeof l!="object")throw Error(`Can not observe ${typeof l} type.`);return p(l)},"observe");return Vr}var Br={exports:{}},$s;function cl(){return $s||($s=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Je(),e.exports)}(Br)),Br.exports}var ea;function Pe(){return ea||(ea=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Zu(),e.exports),v(_,Bs(),e.exports),v(_,Qu(),e.exports),v(_,qs(),e.exports),v(_,nl(),e.exports),v(_,sl(),e.exports),v(_,al(),e.exports),v(_,il(),e.exports),v(_,et(),e.exports),v(_,cl(),e.exports)}(hr)),hr.exports}var Lr,ta;function ra(){if(ta)return Lr;ta=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(S,j)=>e(S,"name",{value:j,configurable:!0}),b=(S,j)=>{for(var O in j)e(S,O,{get:j[O],enumerable:!0})},v=(S,j,O,w)=>{if(j&&typeof j=="object"||typeof j=="function")for(let I of o(j))!f.call(S,I)&&I!==O&&e(S,I,{get:()=>j[I],enumerable:!(w=t(j,I))||w.enumerable});return S},F=S=>v(e({},"__esModule",{value:!0}),S),_={};b(_,{SchemaNestedMap:()=>a,SchemaNormalKeys:()=>c,SchemaStateMap:()=>l,SchemaValidatorKeys:()=>p,SchemaValidatorMap:()=>i,createDataSource:()=>x,hasOwnProperty:()=>d,isNoNeedCompileObject:()=>g,patchStateFormSchema:()=>P,traverse:()=>y,traverseSchema:()=>m}),Lr=F(_);var n=Pe(),u=le(),h=$a();const s=Symbol.for("__REVA_ACTIONS"),a={parent:!0,root:!0,properties:!0,patternProperties:!0,additionalProperties:!0,items:!0,additionalItems:!0,"x-linkages":!0,"x-reactions":!0},l={title:"title",description:"description",default:"initialValue",enum:"dataSource",readOnly:"readOnly",writeOnly:"editable","x-content":"content","x-data":"data","x-value":"value","x-editable":"editable","x-disabled":"disabled","x-read-pretty":"readPretty","x-read-only":"readOnly","x-visible":"visible","x-hidden":"hidden","x-display":"display","x-pattern":"pattern","x-validator":"validator","x-decorator":"decoratorType","x-component":"componentType","x-decorator-props":"decoratorProps","x-component-props":"componentProps"},i={required:!0,format:!0,maxItems:!0,minItems:!0,maxLength:!0,minLength:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,pattern:!0,const:!0,multipleOf:!0,maxProperties:!0,minProperties:!0,uniqueItems:!0},c=Object.keys(l),p=Object.keys(i),d=Object.prototype.hasOwnProperty,y=r((S,j)=>{const O=[],w=S,I=r((E,R=[])=>{if((0,u.isPlainObj)(E)){if(O.indexOf(E)>-1)return;const L=O.length;if(O.push(E),g(E)&&w!==E){j(E,R);return}(0,u.each)(E,(K,te)=>{I(K,R.concat(te))}),O.splice(L,1)}else j(E,R)},"traverse");I(S)},"traverse"),m=r((S,j)=>{var O;S["x-validator"]!==void 0&&j(S["x-validator"],["x-validator"],(O=S["x-compile-omitted"])==null?void 0:O.includes("x-validator"));const w=[],I=S,E=r((R,N=[])=>{var L;if(!(N[0]==="x-compile-omitted"||N[0]==="x-validator"||N[0]==="version"||N[0]==="_isJSONSchemaObject")&&!(String(N[0]).indexOf("x-")===-1&&(0,u.isFn)(R))&&!a[N[0]]){if(((L=S["x-compile-omitted"])==null?void 0:L.indexOf(N[0]))>-1){j(R,N,!0);return}if((0,u.isPlainObj)(R)){if(N[0]==="default"||N[0]==="x-value"){j(R,N);return}if(w.indexOf(R)>-1)return;const te=w.length;if(w.push(R),g(R)&&I!==R){j(R,N);return}(0,u.each)(R,(Y,re)=>{E(Y,N.concat(re))}),w.splice(te,1)}else j(R,N)}},"traverse");E(S)},"traverseSchema"),g=r(S=>!!("$$typeof"in S&&"_owner"in S||S._isAMomentObject||h.Schema.isSchemaInstance(S)||S[s]||(0,u.isFn)(S.toJS)||(0,u.isFn)(S.toJSON)||(0,n.isObservable)(S)),"isNoNeedCompileObject"),x=r(S=>(0,u.toArr)(S).map(j=>typeof j=="object"?j:{label:j,value:j}),"createDataSource"),P=r((S,j,O)=>{(0,n.untracked)(()=>{var w;const E=u.FormPath.parse(j).segments,R=E[0],N=R==="enum"&&(0,u.isArr)(O),L=l[R];L?u.FormPath.setIn(S,[L].concat(E.slice(1)),N?x(O):O):i[R]&&((w=S.setValidatorRule)==null||w.call(S,R,O))})},"patchStateFormSchema");return Lr}var Ur,oa;function na(){if(oa)return Ur;oa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>e(m,"name",{value:g,configurable:!0}),b=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},v=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},F=m=>v(e({},"__esModule",{value:!0}),m),_={};b(_,{compile:()=>p,patchCompile:()=>d,patchSchemaCompile:()=>y,registerCompiler:()=>i,shallowCompile:()=>c,silent:()=>l}),Ur=F(_);var n=Pe(),u=le(),h=ra();const s=/^\s*\{\{([\s\S]*)\}\}\s*$/,a={silent:!1,compile(m,g={}){if(a.silent)try{return new Function("$root",`with($root) { return (${m}); }`)(g)}catch(x){}else return new Function("$root",`with($root) { return (${m}); }`)(g)}},l=r((m=!0)=>{a.silent=!!m},"silent"),i=r(m=>{(0,u.isFn)(m)&&(a.compile=m)},"registerCompiler"),c=r((m,g)=>{if((0,u.isStr)(m)){const x=m.match(s);return x?a.compile(x[1],g):m}return m},"shallowCompile"),p=r((m,g)=>{const x=[],P=r(S=>{if((0,u.isStr)(S))return c(S,g);if((0,u.isArr)(S))return S.map(j=>P(j));if((0,u.isPlainObj)(S)){if((0,h.isNoNeedCompileObject)(S)||x.indexOf(S)>-1)return S;const O=x.length;x.push(S);const w=(0,u.reduce)(S,(I,E,R)=>(I[R]=P(E),I),{});return x.splice(O,1),w}return S},"compile");return P(m)},"compile"),d=r((m,g,x)=>{(0,h.traverse)(g,(P,S)=>{const j=p(P,x);if(j===void 0)return;const O=u.FormPath.parse(S),w=O.segments[0];h.hasOwnProperty.call(m,w)&&(0,n.untracked)(()=>u.FormPath.setIn(m,O,j))})},"patchCompile"),y=r((m,g,x,P=!1)=>{(0,h.traverseSchema)(g,(S,j,O)=>{let w=S,I=(0,n.hasCollected)(()=>{O||(w=p(S,x))});w!==void 0&&(P?(I||!m.initialized)&&(0,h.patchStateFormSchema)(m,j,w):(0,h.patchStateFormSchema)(m,j,w))})},"patchSchemaCompile");return Ur}var Gr,sa;function aa(){if(sa)return Gr;sa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(c,p)=>e(c,"name",{value:p,configurable:!0}),b=(c,p)=>{for(var d in p)e(c,d,{get:p[d],enumerable:!0})},v=(c,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of o(p))!f.call(c,m)&&m!==d&&e(c,m,{get:()=>p[m],enumerable:!(y=t(p,m))||y.enumerable});return c},F=c=>v(e({},"__esModule",{value:!0}),c),_={};b(_,{enablePolyfills:()=>i,reducePatches:()=>s,registerPatches:()=>a,registerPolyfills:()=>l}),Gr=F(_);var n=le();const u=[],h={},s=r(c=>u.reduce((p,d)=>d(p),k({},c)),"reducePatches"),a=r((...c)=>{c.forEach(p=>{(0,n.isFn)(p)&&u.push(p)})},"registerPatches"),l=r((c,p)=>{c&&(0,n.isFn)(p)&&(h[c]=h[c]||[],h[c].push(p))},"registerPolyfills"),i=r(c=>{(0,n.isArr)(c)&&c.forEach(p=>{(0,n.isArr)(h[p])&&h[p].forEach(d=>{a(d)})})},"enablePolyfills");return Gr}var Hr={exports:{}},zr,ia;function ul(){if(ia)return zr;ia=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{registerTypeDefaultComponents:()=>p,registerVoidComponents:()=>c}),zr=F(_);var n=le(),u=aa();const h=["card","block","grid-col","grid-row","grid","layout","step","tab","text-box"],s={},a=r(d=>{if((0,n.isStr)(d))return d.replace(/\$value/,"$self.value")},"transformCondition"),l=r(d=>(0,n.isArr)(d)?d.reduce((y,m)=>{if(!m)return y;if(m.type==="value:visible")return y.concat({target:m.target,when:a(m.condition),fulfill:{state:{visible:!0}},otherwise:{state:{visible:!1}}});if(m.type==="value:schema")return y.concat({target:m.target,when:a(m.condition),fulfill:{schema:i(k({version:"1.0"},m.schema))},otherwise:{schema:i(k({version:"1.0"},m.otherwise))}});if(m.type==="value:state")return y.concat({target:m.target,when:a(m.condition),fulfill:{state:m.state},otherwise:{state:m.otherwise}})},[]):[],"transformXLinkage"),i=r(d=>((0,n.isValid)(d.editable)&&(d["x-editable"]=d["x-editable"]||d.editable,delete d.editable),(0,n.isValid)(d.visible)&&(d["x-visible"]=d["x-visible"]||d.visible,delete d.visible),(0,n.isValid)(d.display)&&(d["x-display"]=d["x-display"]||(d.display?"visible":"hidden"),delete d.display),(0,n.isValid)(d["x-props"])&&(d["x-decorator-props"]=d["x-decorator-props"]||d["x-props"],delete d.display),d["x-linkages"]&&(d["x-reactions"]=(0,n.toArr)(d["x-reactions"]).concat(l(d["x-linkages"])),delete d["x-linkages"]),d["x-component"]?h.some(y=>(0,n.lowerCase)(y)===(0,n.lowerCase)(d["x-component"]))&&(d.type="void"):s[d.type]&&(d["x-component"]=s[d.type]),!d["x-decorator"]&&d.type!=="void"&&d.type!=="object"&&(d["x-decorator"]=d["x-decorator"]||"FormItem"),d["x-rules"]&&(d["x-validator"]=[].concat(d["x-validator"]||[]).concat(d["x-rules"])),d),"SpecificationV1Polyfill");(0,u.registerPolyfills)("1.0",i);const c=r(d=>{h.push(...d)},"registerVoidComponents"),p=r(d=>{Object.assign(s,d)},"registerTypeDefaultComponents");return zr}var ca;function ll(){return ca||(ca=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,ul(),e.exports)}(Hr)),Hr.exports}var Jr={exports:{}},Wr={exports:{}},Yr,ua;function pl(){if(ua)return Yr;ua=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(n,u)=>{for(var h in u)e(n,h,{get:u[h],enumerable:!0})},b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of o(u))!f.call(n,a)&&a!==h&&e(n,a,{get:()=>u[a],enumerable:!(s=t(u,a))||s.enumerable});return n},v=n=>b(e({},"__esModule",{value:!0}),n),F={};r(F,{default:()=>_}),Yr=v(F);var _={url:new RegExp("^(?:(?:(?:https?|ftp|rtmp):)?//)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:22[0-3]|2[01]\\d|[1-9]\\d?|1\\d\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1?\\d{1,2})){2}(?:\\.(?:25[0-4]|2[0-4]\\d|1\\d\\d|[1-9]\\d?))|(?:(?:[a-z\\u00a1-\\uffff0-9_]-*)*[a-z\\u00a1-\\uffff0-9_]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9_]-*)*[a-z\\u00a1-\\uffff0-9_]+)*(?:\\.(?:[a-z\\u00a1-\\uffff_]{2,})))(?::\\d{2,5})?(?:/?\\S*)?$"),email:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,ipv4:/^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$/,number:/^[+-]?\d+(\.\d+)?$/,integer:/^[+-]?\d+$/,qq:/^(\+?[1-9]\d*|0)$/,phone:/^\d{3}-\d{8}$|^\d{4}-\d{7}$|^\d{11}$/,idcard:/^\d{15}$|^\d{17}(\d|x|X)$/,money:/^([\u0024\u00A2\u00A3\u00A4\u20AC\u00A5\u20B1\u20B9\uFFE5]\s*)(\d+,?)+(\.\d+)?\s*$/,zh:/^[\u4e00-\u9fa5]+$/,date:/^[0-9]+[./-][0-9]+[./-][0-9]+\s*(?:[0-9]+\s*:\s*[0-9]+\s*:\s*[0-9]+)?$/,zip:/^[0-9]{6}$/};return Yr}var qr,la;function dl(){if(la)return qr;la=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(n,u)=>{for(var h in u)e(n,h,{get:u[h],enumerable:!0})},b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of o(u))!f.call(n,a)&&a!==h&&e(n,a,{get:()=>u[a],enumerable:!(s=t(u,a))||s.enumerable});return n},v=n=>b(e({},"__esModule",{value:!0}),n),F={};r(F,{default:()=>_}),qr=v(F);var _={en:{pattern:"This field is invalid",invalid:"This field is invalid",required:"The field value is required",number:"The field value is not a number",integer:"The field value is not an integer number",url:"The field value is a invalid url",email:"The field value is not a email format",ipv6:"The field value is not a ipv6 format",ipv4:"The field value is not a ipv4 format",idcard:"The field value is not an idcard format",qq:"The field value is not a qq number format",phone:"The field value is not a phone number format",money:"The field value is not a currency format",zh:"The field value is not a chinese string",date:"The field value is not a valid date format",zip:"The field value is not a zip format",len:"The length or number of entries must be {{len}}",min:"The length or number of entries must be at least {{min}}",minLength:"The length or number of entries must be at least {{minLength}}",minItems:"The length or number of entries must be at least {{minItems}}",maximum:"The field value cannot be greater than {{maximum}}",exclusiveMaximum:"The field value must be less than {{exclusiveMaximum}}",minimum:"The field value cannot be less than {{minimum}}",exclusiveMinimum:"The field value must be greater than {{exclusiveMinimum}}",max:"The field length or number of entries must be at most {{max}}",maxLength:"The field length or number of entries must be at most {{maxLength}}",maxItems:"The field length or number of entries must be at most {{maxItems}}",whitespace:"This field value cannot be blank string.",enum:"The field value must be one of {{enum}}",const:"The field value must be equal to {{const}}",multipleOf:"The field value must be divisible by {{multipleOf}}",maxProperties:"The number of field properties cannot be greater than {{maxProperties}}",minProperties:"The number of field properties cannot be less than {{maxProperties}}",uniqueItems:"Array elements are not unique"},zh:{pattern:"该字段不是一个合法的字段",invalid:"该字段不是一个合法的字段",required:"该字段是必填字段",number:"该字段不是合法的数字",integer:"该字段不是合法的整型数字",url:"该字段不是合法的url",email:"该字段不是合法的邮箱格式",ipv6:"该字段不是合法的ipv6格式",ipv4:"该字段不是合法的ipv4格式",idcard:"该字段不是合法的身份证格式",qq:"该字段不符合QQ号格式",phone:"该字段不是有效的手机号",money:"该字段不是有效货币格式",zh:"该字段不是合法的中文字符串",date:"该字段不是合法的日期格式",zip:"该字段不是合法的邮编格式",len:"长度或条目数必须为{{len}}",min:"长度或条目数不能小于{{min}}",minLength:"长度或条目数不能小于{{minLength}}",minItems:"长度或条目数不能小于{{minItems}}",max:"长度或条目数不能大于{{max}}",maxLength:"长度或条目数不能大于{{maxLength}}",maxItems:"长度或条目数不能大于{{maxItems}}",maximum:"数值不能大于{{maximum}}",exclusiveMaximum:"数值必须小于{{exclusiveMaximum}}",minimum:"数值不能小于{{minimum}}",exclusiveMinimum:"数值必须大于{{exclusiveMinimum}}",whitespace:"不能为纯空白字符串",enum:"字段值必须为{{enum}}其中一个",const:"字段值必须等于{{const}}",multipleOf:"字段值不能被{{multipleOf}}整除",maxProperties:"字段属性数量不能大于{{maxProperties}}",minProperties:"字段属性数量不能小于{{minProperties}}",uniqueItems:"数组元素不唯一"},"en-US":{pattern:"This field is invalid",invalid:"This field is invalid",required:"The field value is required",number:"The field value is not a number",integer:"The field value is not an integer number",url:"The field value is a invalid url",email:"The field value is not a email format",ipv6:"The field value is not a ipv6 format",ipv4:"The field value is not a ipv4 format",idcard:"The field value is not an idcard format",qq:"The field value is not a qq number format",phone:"The field value is not a phone number format",money:"The field value is not a currency format",zh:"The field value is not a chinese string",date:"The field value is not a valid date format",zip:"The field value is not a zip format",len:"The length or number of entries must be {{len}}",min:"The length or number of entries must be at least {{min}}",minLength:"The length or number of entries must be at least {{minLength}}",minItems:"The length or number of entries must be at least {{minItems}}",maximum:"The field value cannot be greater than {{maximum}}",exclusiveMaximum:"The field value must be less than {{exclusiveMaximum}}",minimum:"The field value cannot be less than {{minimum}}",exclusiveMinimum:"The field value must be greater than {{exclusiveMinimum}}",max:"The field length or number of entries must be at most {{max}}",maxLength:"The field length or number of entries must be at most {{maxLength}}",maxItems:"The field length or number of entries must be at most {{maxItems}}",whitespace:"This field value cannot be blank string.",enum:"The field value must be one of {{enum}}",const:"The field value must be equal to {{const}}",multipleOf:"The field value must be divisible by {{multipleOf}}",maxProperties:"The number of field properties cannot be greater than {{maxProperties}}",minProperties:"The number of field properties cannot be less than {{maxProperties}}",uniqueItems:"Array elements are not unique"},"zh-CN":{pattern:"该字段不是一个合法的字段",invalid:"该字段不是一个合法的字段",required:"该字段是必填字段",number:"该字段不是合法的数字",integer:"该字段不是合法的整型数字",url:"该字段不是合法的url",email:"该字段不是合法的邮箱格式",ipv6:"该字段不是合法的ipv6格式",ipv4:"该字段不是合法的ipv4格式",idcard:"该字段不是合法的身份证格式",qq:"该字段不符合QQ号格式",phone:"该字段不是有效的手机号",money:"该字段不是有效货币格式",zh:"该字段不是合法的中文字符串",date:"该字段不是合法的日期格式",zip:"该字段不是合法的邮编格式",len:"长度或条目数必须为{{len}}",min:"长度或条目数不能小于{{min}}",minLength:"长度或条目数不能小于{{minLength}}",minItems:"长度或条目数不能小于{{minItems}}",maxLength:"长度或条目数不能大于{{maxLength}}",maxItems:"长度或条目数不能大于{{maxItems}}",max:"长度或条目数不能大于{{max}}",maximum:"数值不能大于{{maximum}}",exclusiveMaximum:"数值必须小于{{exclusiveMaximum}}",minimum:"数值不能小于{{minimum}}",exclusiveMinimum:"数值必须大于{{exclusiveMinimum}}",whitespace:"不能为纯空白字符串",enum:"字段值必须为{{enum}}其中一个",const:"字段值必须等于{{const}}",multipleOf:"字段值不能被{{multipleOf}}整除",maxProperties:"字段属性数量不能大于{{maxProperties}}",minProperties:"字段属性数量不能小于{{minProperties}}",uniqueItems:"数组元素不唯一"},"zh-TW":{pattern:"該字段不是一個合法的字段",invalid:"該字段不是一個合法的字段",required:"該字段是必填字段",number:"該字段不是合法的數字",integer:"該字段不是合法的整型數字",url:"該字段不是合法的url",email:"該字段不是合法的郵箱格式",ipv6:"該字段不是合法的ipv6格式",ipv4:"該字段不是合法的ipv4格式",idcard:"該字段不是合法的身份證格式",qq:"該字段不符合QQ號格式",phone:"該字段不是有效的手機號",money:"該字段不是有效貨幣格式",zh:"該字段不是合法的中文字符串",date:"該字段不是合法的日期格式",zip:"該字段不是合法的郵編格式",len:"長度或條目數必須為{{len}}",min:"長度或條目數不能小於{{min}}",minItems:"長度或條目數不能小於{{minItems}}",minLength:"長度或條目數不能小於{{minLength}}",max:"長度或條目數不能大於{{max}}",maxItems:"長度或條目數不能大於{{maxItems}}",maxLength:"長度或條目數不能大於{{maxLength}}",maximum:"數值不能大於{{maximum}}",exclusiveMaximum:"數值必須小於{{exclusiveMaximum}}",minimum:"數值不能小於{{minimum}}",exclusiveMinimum:"數值必須大於{{exclusiveMinimum}}",whitespace:"不能為純空白字符串",enum:"字段值必須為{{enum}}其中一個",const:"字段值必須等於{{const}}",multipleOf:"字段值不能被{{multipleOf}}整除",maxProperties:"字段屬性數量不能大於{{maxProperties}}",minProperties:"字段屬性數量不能小於{{minProperties}}",uniqueItems:"數組元素不唯一"},ja:{url:"このフィールドは無効なURLです",whitespace:"このフィールドを空の文字列にすることはできません。",zh:"このフィールドは中国語の文字列ではありません",zip:"このフィールドはzip形式ではありません",date:"このフィールドは有効な日付形式ではありません",email:"このフィールドはメール形式ではありません",exclusiveMaximum:"値は{{exclusiveMaximum}}未満である必要があります",exclusiveMinimum:"値は{{exclusiveMinimum}}より大きい必要があります",idcard:"このフィールドはIDカード形式ではありません",integer:"このフィールドは整数ではありません",ipv4:"このフィールドはIPv4形式ではありません",ipv6:"このフィールドはIPv6形式ではありません",len:"エントリの長さまたは数は{{len}}でなければなりません",max:"エントリの長さまたは数は最大{{max}}でなければなりません",maxItems:"エントリの長さまたは数は最大{{maxItems}}でなければなりません",maxLength:"エントリの長さまたは数は最大{{maxLength}}でなければなりません",maximum:"値は{{最大}}を超えることはできません",min:"エントリの長さまたは数は、少なくとも{{min}}である必要があります",minItems:"エントリの長さまたは数は、少なくとも{{minItems}}である必要があります",minLength:"エントリの長さまたは数は、少なくとも{{minLength}}である必要があります",minimum:"値は{{minimum}}以上にする必要があります",money:"このフィールドは通貨形式ではありません",number:"このフィールドは数値ではありません",pattern:"このフィールドはどのパターンとも一致しません",invalid:"このフィールドはどのパターンとも一致しません",phone:"このフィールドは電話番号の形式ではありません",qq:"このフィールドはqq数値形式ではありません",required:"この項目は必須です",enum:"フィールド値は{{enum}}のいずれかである必要があります",cons:"フィールド値は{{const}}と等しくなければなりません",multipleOf:"フィールド値を{{multipleOf}}で割り切れない",maxProperties:"フィールドプロパティの数は{{maxProperties}}を超えることはできません",minProperties:"フィールドプロパティの数は{{minProperties}}未満にすることはできません",uniqueItems:"配列要素は一意ではありません"}};return qr}var Kr,pa;function st(){if(pa)return Kr;pa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(I,E)=>e(I,"name",{value:E,configurable:!0}),b=(I,E)=>{for(var R in E)e(I,R,{get:E[R],enumerable:!0})},v=(I,E,R,N)=>{if(E&&typeof E=="object"||typeof E=="function")for(let L of o(E))!f.call(I,L)&&L!==R&&e(I,L,{get:()=>E[L],enumerable:!(N=t(E,L))||N.enumerable});return I},F=I=>v(e({},"__esModule",{value:!0}),I),_={};b(_,{getLocaleByPath:()=>y,getValidateFormats:()=>x,getValidateLanguage:()=>d,getValidateLocale:()=>m,getValidateLocaleIOSCode:()=>c,getValidateMessageTemplateEngine:()=>g,getValidateRules:()=>P,registerValidateFormats:()=>O,registerValidateLocale:()=>S,registerValidateMessageTemplateEngine:()=>w,registerValidateRules:()=>j,setValidateLanguage:()=>p}),Kr=F(_);var n=le();const u=n.FormPath.getIn,h=n.globalThisPolyfill,s="en",l={locales:{messages:{},language:r(()=>h.navigator&&(h.navigator.browserlanguage||h.navigator.language)||s,"getBrowserlanguage")()},formats:{},rules:{},template:null},i=r(I=>{let E=l.locales.language;if(l.locales.messages[I])return I;const R=(0,n.lowerCase)(I);return(0,n.each)(l.locales.messages,(N,L)=>{const K=(0,n.lowerCase)(L);if(K.indexOf(R)>-1||R.indexOf(K)>-1)return E=L,!1}),E},"getISOCode"),c=i,p=r(I=>{l.locales.language=I||s},"setValidateLanguage"),d=r(()=>l.locales.language,"getValidateLanguage"),y=r((I,E=l.locales.language)=>u(l.locales.messages,`${i(E)}.${I}`),"getLocaleByPath"),m=r(I=>y(I)||y("pattern")||y("pattern",s),"getValidateLocale"),g=r(()=>l.template,"getValidateMessageTemplateEngine"),x=r(I=>I?l.formats[I]:l.formats,"getValidateFormats"),P=r(I=>I?l.rules[I]:l.rules,"getValidateRules"),S=r(I=>{l.locales.messages=(0,n.merge)(l.locales.messages,I)},"registerValidateLocale"),j=r(I=>{(0,n.each)(I,(E,R)=>{(0,n.isFn)(E)&&(l.rules[R]=E)})},"registerValidateRules"),O=r(I=>{(0,n.each)(I,(E,R)=>{((0,n.isStr)(E)||E instanceof RegExp)&&(l.formats[R]=new RegExp(E))})},"registerValidateFormats"),w=r(I=>{l.template=I},"registerValidateMessageTemplateEngine");return Kr}var Zr,da;function ml(){if(da)return Zr;da=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{render:()=>h}),Zr=F(_);var n=le(),u=st();const h=r((s,a)=>{const{message:l}=s;if((0,n.isStr)(l)){const i=(0,u.getValidateMessageTemplateEngine)();(0,n.isFn)(i)&&(s.message=i(l,a)),s.message=s.message.replace(/\{\{\s*([\w.]+)\s*\}\}/g,(c,p)=>n.FormPath.getIn(a,p))}return s},"render");return Zr}var Qr,ma;function fa(){if(ma)return Qr;ma=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,h)=>e(u,"name",{value:h,configurable:!0}),b=(u,h)=>{for(var s in h)e(u,s,{get:h[s],enumerable:!0})},v=(u,h,s,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let l of o(h))!f.call(u,l)&&l!==s&&e(u,l,{get:()=>h[l],enumerable:!(a=t(h,l))||a.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{isValidateResult:()=>n}),Qr=F(_);const n=r(u=>!!u.type&&!!u.message,"isValidateResult");return Qr}var Xr,ha;function ba(){if(ha)return Xr;ha=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{parseValidator:()=>p,parseValidatorDescription:()=>l,parseValidatorDescriptions:()=>i,parseValidatorRules:()=>c}),Xr=F(_);var n=le(),u=st(),h=ml(),s=fa();const a=r((d,y)=>d.format?d.message||(0,u.getValidateLocale)(d.format):d.message||(0,u.getValidateLocale)(y),"getRuleMessage"),l=r(d=>{if(!d)return{};let y={};return(0,n.isStr)(d)?y.format=d:(0,n.isFn)(d)?y.validator=d:y=Object.assign(y,d),y},"parseValidatorDescription"),i=r(d=>d?((0,n.isArr)(d)?d:[d]).map(m=>l(m)):[],"parseValidatorDescriptions"),c=r((d={})=>{const y=r(()=>{const x=[];"required"in d&&x.push("required");for(let P in d)P==="required"||P==="validator"||x.push(P);return"validator"in d&&x.push("validator"),x},"getRulesKeys"),m=r((x,P)=>W(k(k({},d),x),{value:P}),"getContext"),g=r((x,P)=>(S,j)=>ie(null,null,function*(){const O=m(j,S);try{const w=yield x(S,W(k({},d),{message:P}),O,(I,E)=>{var R;return(R=(0,h.render)({type:"error",message:I},Object.assign(O,E)))==null?void 0:R.message});return(0,n.isBool)(w)?w?{type:"error",message:void 0}:(0,h.render)({type:"error",message:P},O):w?(0,s.isValidateResult)(w)?(0,h.render)(w,O):(0,h.render)({type:"error",message:w},O):{type:"error",message:void 0}}catch(w){return{type:"error",message:(w==null?void 0:w.message)||w}}}),"createValidate");return y().reduce((x,P)=>{const S=(0,u.getValidateRules)(P);if(S){const j=g(S,a(d,P));return x.concat(j)}return x},[])},"parseValidatorRules"),p=r((d,y={})=>d?((0,n.isArr)(d)?d:[d]).reduce((g,x)=>{var j;const P=l(x),S=(j=P.triggerType)!=null?j:"onInput";return y!=null&&y.triggerType&&y.triggerType!==S?g:P?g.concat(c(P)):g},[]):[],"parseValidator");return Xr}var $r,va;function fl(){if(va)return $r;va=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(p,d)=>e(p,"name",{value:d,configurable:!0}),b=(p,d)=>{for(var y in d)e(p,y,{get:d[y],enumerable:!0})},v=(p,d,y,m)=>{if(d&&typeof d=="object"||typeof d=="function")for(let g of o(d))!f.call(p,g)&&g!==y&&e(p,g,{get:()=>d[g],enumerable:!(m=t(d,g))||m.enumerable});return p},F=p=>v(e({},"__esModule",{value:!0}),p),_={};b(_,{default:()=>i}),$r=F(_);var n=le(),u=st();const h=r(p=>{var d;if((0,n.isArr)(p)){for(let y=0;y<p.length;y++)if((0,n.isValid)(p[y]))return!1;return!0}else return p!=null&&p.getCurrentContent?!((d=p.getCurrentContent())!=null&&d.hasText()):(0,n.isEmpty)(p)},"isValidateEmpty"),s=r(p=>(0,n.isStr)(p)?(0,n.stringLength)(p):p?p.length:0,"getLength"),a=r((p,d)=>{(0,n.each)(d,(y,m)=>{p[m]=(g,x,...P)=>p[y](g,W(k({},x),{[y]:x[m]}),...P)})},"extendSameRules"),l={format(p,d){if(h(p))return"";if(d.format){const y=(0,u.getValidateFormats)(d.format);if(y)return new RegExp(y).test(p)?"":d.message}return""},required(p,d){return d.required===!1?"":h(p)?d.message:""},max(p,d){if(h(p))return"";const y=(0,n.isNum)(p)?p:s(p),m=Number(d.max);return y>m?d.message:""},min(p,d){if(h(p))return"";const y=(0,n.isNum)(p)?p:s(p),m=Number(d.min);return y<m?d.message:""},exclusiveMaximum(p,d){if(h(p))return"";const y=(0,n.isNum)(p)?p:s(p),m=Number(d.exclusiveMaximum);return y>=m?d.message:""},exclusiveMinimum(p,d){if(h(p))return"";const y=(0,n.isNum)(p)?p:s(p),m=Number(d.exclusiveMinimum);return y<=m?d.message:""},len(p,d){if(h(p))return"";const y=s(p),m=Number(d.len);return y!==m?d.message:""},pattern(p,d){return h(p)||new RegExp(d.pattern).test(p)?"":d.message},validator(p,d,y,m){return ie(this,null,function*(){if((0,n.isFn)(d.validator)){const g=yield Promise.resolve(d.validator(p,d,y,m));return(0,n.isBool)(g)?g?"":d.message:g}throw new Error("The rule's validator property must be a function.")})},whitespace(p,d){if(h(p))return"";if(d.whitespace)return/^\s+$/.test(p)?d.message:""},enum(p,d){return h(p)?"":(0,n.toArr)(d.enum).indexOf(p)===-1?d.message:""},const(p,d){return h(p)?"":d.const!==p?d.message:""},multipleOf(p,d){return h(p)?"":Number(p)%Number(d.multipleOf)!==0?d.message:""},uniqueItems(p,d){return h(p)?"":(p=(0,n.toArr)(p),p.some((y,m)=>{for(let g=0;g<p.length;g++)if(g!==m&&!(0,n.isEqual)(p[g],y))return!1;return!0})?"":d.message)},maxProperties(p,d){return h(p)||Object.keys(p||{}).length<=Number(d.maxProperties)?"":d.message},minProperties(p,d){return h(p)||Object.keys(p||{}).length>=Number(d.minProperties)?"":d.message}};a(l,{maximum:"max",minimum:"min",maxItems:"max",minItems:"min",maxLength:"max",minLength:"min"});var i=l;return $r}var eo,ya;function hl(){if(ya)return eo;ya=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(d,y)=>t(d,"name",{value:y,configurable:!0}),F=(d,y)=>{for(var m in y)t(d,m,{get:y[m],enumerable:!0})},_=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of f(y))!b.call(d,x)&&x!==m&&t(d,x,{get:()=>y[x],enumerable:!(g=o(y,x))||g.enumerable});return d},n=(d,y,m)=>(m=d!=null?e(r(d)):{},_(!d||!d.__esModule?t(m,"default",{value:d,enumerable:!0}):m,d)),u=d=>_(t({},"__esModule",{value:!0}),d),h={};F(h,{validate:()=>p}),eo=u(h);var s=n(pl()),a=n(dl()),l=ba(),i=st(),c=n(fl());(0,i.registerValidateRules)(c.default),(0,i.registerValidateLocale)(a.default),(0,i.registerValidateFormats)(s.default);const p=v((d,y,m)=>ie(null,null,function*(){const g=(0,l.parseValidator)(y,m),x={error:[],success:[],warning:[]};for(let P=0;P<g.length;P++){const S=yield g[P](d,m==null?void 0:m.context),{type:j,message:O}=S;if(x[j]=x[j]||[],O&&(x[j].push(O),m!=null&&m.validateFirst))break}return x}),"validate");return eo}var _a;function to(){return _a||(_a=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,hl(),e.exports),v(_,ba(),e.exports),v(_,st(),e.exports),v(_,fa(),e.exports)}(Wr)),Wr.exports}var ro={exports:{}},oo,xa;function ga(){if(xa)return oo;xa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{LifeCycle:()=>h}),oo=F(_);var n=le();const u=class{constructor(...a){this.buildListener=r(l=>function(i,c){for(let p=0;p<l.length;p++){let d=l[p];(0,n.isFn)(d)?d.call(this,i,c):(0,n.isStr)(d)&&(0,n.isFn)(l[p+1])?(d===i.type&&l[p+1].call(this,i.payload,c),p++):(0,n.each)(d,(y,m)=>{if((0,n.isFn)(y)&&(0,n.isStr)(m)&&m===i.type)return y.call(this,i.payload,c),!1})}},"buildListener"),this.notify=r((l,i,c)=>{(0,n.isStr)(l)&&this.listener.call(c,{type:l,payload:i},c)},"notify"),this.listener=this.buildListener(a)}};r(u,"LifeCycle");let h=u;return oo}var no,Fa;function Sa(){if(Fa)return no;Fa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>e(a,"name",{value:l,configurable:!0}),b=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},v=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{Heart:()=>s}),no=F(_);var n=le(),u=ga();const h=class extends n.Subscribable{constructor({lifecycles:l,context:i}={}){super(),this.lifecycles=[],this.outerLifecycles=new Map,this.buildLifeCycles=r(c=>c.reduce((p,d)=>d instanceof u.LifeCycle?p.concat(d):(0,n.isArr)(d)?this.buildLifeCycles(d):(typeof d=="object"&&(this.context=d),p),[]),"buildLifeCycles"),this.addLifeCycles=r((c,p=[])=>{const d=this.buildLifeCycles(p);d.length&&this.outerLifecycles.set(c,d)},"addLifeCycles"),this.hasLifeCycles=r(c=>this.outerLifecycles.has(c),"hasLifeCycles"),this.removeLifeCycles=r(c=>{this.outerLifecycles.delete(c)},"removeLifeCycles"),this.setLifeCycles=r((c=[])=>{this.lifecycles=this.buildLifeCycles(c)},"setLifeCycles"),this.publish=r((c,p,d)=>{(0,n.isStr)(c)&&(this.lifecycles.forEach(y=>{y.notify(c,p,d||this.context)}),this.outerLifecycles.forEach(y=>{y.forEach(m=>{m.notify(c,p,d||this.context)})}),this.notify({type:c,payload:p}))},"publish"),this.clear=r(()=>{this.lifecycles=[],this.outerLifecycles.clear(),this.unsubscribe()},"clear"),this.lifecycles=this.buildLifeCycles(l||[]),this.context=i}};r(h,"Heart");let s=h;return no}var so,Pa;function vt(){if(Pa)return so;Pa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(O,w)=>e(O,"name",{value:w,configurable:!0}),b=(O,w)=>{for(var I in w)e(O,I,{get:w[I],enumerable:!0})},v=(O,w,I,E)=>{if(w&&typeof w=="object"||typeof w=="function")for(let R of o(w))!f.call(O,R)&&R!==I&&e(O,R,{get:()=>w[R],enumerable:!(E=t(w,R))||E.enumerable});return O},F=O=>v(e({},"__esModule",{value:!0}),O),_={};b(_,{isArrayField:()=>l,isArrayFieldState:()=>m,isDataField:()=>g,isDataFieldState:()=>x,isField:()=>a,isFieldState:()=>d,isForm:()=>h,isFormState:()=>p,isGeneralField:()=>s,isGeneralFieldState:()=>y,isObjectField:()=>i,isObjectFieldState:()=>P,isQuery:()=>j,isVoidField:()=>c,isVoidFieldState:()=>S}),so=F(_);var n=le(),u=xo();const h=r(O=>O instanceof u.Form,"isForm"),s=r(O=>O instanceof u.Field||O instanceof u.VoidField,"isGeneralField"),a=r(O=>O instanceof u.Field,"isField"),l=r(O=>O instanceof u.ArrayField,"isArrayField"),i=r(O=>O instanceof u.ObjectField,"isObjectField"),c=r(O=>O instanceof u.VoidField,"isVoidField"),p=r(O=>(0,n.isFn)(O==null?void 0:O.initialize)?!1:(O==null?void 0:O.displayName)==="Form","isFormState"),d=r(O=>(0,n.isFn)(O==null?void 0:O.initialize)?!1:(O==null?void 0:O.displayName)==="Field","isFieldState"),y=r(O=>{var w;return(0,n.isFn)(O==null?void 0:O.initialize)?!1:((w=O==null?void 0:O.displayName)==null?void 0:w.indexOf("Field"))>-1},"isGeneralFieldState"),m=r(O=>(0,n.isFn)(O==null?void 0:O.initialize)?!1:(O==null?void 0:O.displayName)==="ArrayField","isArrayFieldState"),g=r(O=>a(O)||l(O)||i(O),"isDataField"),x=r(O=>d(O)||P(O)||m(O),"isDataFieldState"),P=r(O=>(0,n.isFn)(O==null?void 0:O.initialize)?!1:(O==null?void 0:O.displayName)==="ObjectField","isObjectFieldState"),S=r(O=>(0,n.isFn)(O==null?void 0:O.initialize)?!1:(O==null?void 0:O.displayName)==="VoidField","isVoidFieldState"),j=r(O=>O&&O instanceof u.Query,"isQuery");return so}var ao,Oa;function Ca(){if(Oa)return ao;Oa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>e(l,"name",{value:i,configurable:!0}),b=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},v=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{Graph:()=>a}),ao=F(_);var n=Pe(),u=le(),h=vt();const s=class{constructor(i){this.getGraph=r(()=>{const c={};return c[""]=this.form.getState(),(0,u.each)(this.form.fields,(p,d)=>{c[d]=p.getState()}),c},"getGraph"),this.setGraph=r(c=>{const p=this.form,d=r((y,m)=>{const g=u.FormPath.parse(y),x=g.segments[g.segments.length-1],P=g.parent();return(0,h.isFieldState)(m)?this.form.createField({name:x,basePath:P}):(0,h.isArrayFieldState)(m)?this.form.createArrayField({name:x,basePath:P}):(0,h.isObjectFieldState)(m)?this.form.createObjectField({name:x,basePath:P}):this.form.createVoidField({name:x,basePath:P})},"createField");(0,u.each)(c,(y,m)=>{if((0,h.isFormState)(y))p.setState(y);else{const g=p.fields[m];g?g.setState(y):d(m,y).setState(y)}})},"setGraph"),this.form=i,(0,n.define)(this,{setGraph:n.batch})}};r(s,"Graph");let a=s;return ao}var io,wa;function qe(){if(wa)return io;wa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(n,u)=>{for(var h in u)e(n,h,{get:u[h],enumerable:!0})},b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of o(u))!f.call(n,a)&&a!==h&&e(n,a,{get:()=>u[a],enumerable:!(s=t(u,a))||s.enumerable});return n},v=n=>b(e({},"__esModule",{value:!0}),n),F={};r(F,{LifeCycleTypes:()=>_}),io=v(F);var _=(n=>(n.ON_FORM_INIT="onFormInit",n.ON_FORM_MOUNT="onFormMount",n.ON_FORM_UNMOUNT="onFormUnmount",n.ON_FORM_INPUT_CHANGE="onFormInputChange",n.ON_FORM_VALUES_CHANGE="onFormValuesChange",n.ON_FORM_INITIAL_VALUES_CHANGE="onFormInitialValuesChange",n.ON_FORM_SUBMIT="onFormSubmit",n.ON_FORM_RESET="onFormReset",n.ON_FORM_SUBMIT_START="onFormSubmitStart",n.ON_FORM_SUBMITTING="onFormSubmitting",n.ON_FORM_SUBMIT_END="onFormSubmitEnd",n.ON_FORM_SUBMIT_VALIDATE_START="onFormSubmitValidateStart",n.ON_FORM_SUBMIT_VALIDATE_SUCCESS="onFormSubmitValidateSuccess",n.ON_FORM_SUBMIT_VALIDATE_FAILED="onFormSubmitValidateFailed",n.ON_FORM_SUBMIT_VALIDATE_END="onFormSubmitValidateEnd",n.ON_FORM_SUBMIT_SUCCESS="onFormSubmitSuccess",n.ON_FORM_SUBMIT_FAILED="onFormSubmitFailed",n.ON_FORM_VALIDATE_START="onFormValidateStart",n.ON_FORM_VALIDATING="onFormValidating",n.ON_FORM_VALIDATE_SUCCESS="onFormValidateSuccess",n.ON_FORM_VALIDATE_FAILED="onFormValidateFailed",n.ON_FORM_VALIDATE_END="onFormValidateEnd",n.ON_FORM_GRAPH_CHANGE="onFormGraphChange",n.ON_FORM_LOADING="onFormLoading",n.ON_FIELD_INIT="onFieldInit",n.ON_FIELD_INPUT_VALUE_CHANGE="onFieldInputValueChange",n.ON_FIELD_VALUE_CHANGE="onFieldValueChange",n.ON_FIELD_INITIAL_VALUE_CHANGE="onFieldInitialValueChange",n.ON_FIELD_SUBMIT="onFieldSubmit",n.ON_FIELD_SUBMIT_START="onFieldSubmitStart",n.ON_FIELD_SUBMITTING="onFieldSubmitting",n.ON_FIELD_SUBMIT_END="onFieldSubmitEnd",n.ON_FIELD_SUBMIT_VALIDATE_START="onFieldSubmitValidateStart",n.ON_FIELD_SUBMIT_VALIDATE_SUCCESS="onFieldSubmitValidateSuccess",n.ON_FIELD_SUBMIT_VALIDATE_FAILED="onFieldSubmitValidateFailed",n.ON_FIELD_SUBMIT_VALIDATE_END="onFieldSubmitValidateEnd",n.ON_FIELD_SUBMIT_SUCCESS="onFieldSubmitSuccess",n.ON_FIELD_SUBMIT_FAILED="onFieldSubmitFailed",n.ON_FIELD_VALIDATE_START="onFieldValidateStart",n.ON_FIELD_VALIDATING="onFieldValidating",n.ON_FIELD_VALIDATE_SUCCESS="onFieldValidateSuccess",n.ON_FIELD_VALIDATE_FAILED="onFieldValidateFailed",n.ON_FIELD_VALIDATE_END="onFieldValidateEnd",n.ON_FIELD_LOADING="onFieldLoading",n.ON_FIELD_RESET="onFieldReset",n.ON_FIELD_MOUNT="onFieldMount",n.ON_FIELD_UNMOUNT="onFieldUnmount",n))(_||{});return io}var co,Ea;function ja(){if(Ea)return co;Ea=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(c,p)=>{for(var d in p)e(c,d,{get:p[d],enumerable:!0})},b=(c,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of o(p))!f.call(c,m)&&m!==d&&e(c,m,{get:()=>p[m],enumerable:!(y=t(p,m))||y.enumerable});return c},v=c=>b(e({},"__esModule",{value:!0}),c),F={};r(F,{GlobalState:()=>l,MutuallyExclusiveProperties:()=>s,NumberIndexReg:()=>i,RESPONSE_REQUEST_DURATION:()=>a,ReadOnlyProperties:()=>n,ReservedProperties:()=>_}),co=v(F);const _={form:!0,parent:!0,props:!0,caches:!0,requests:!0,disposers:!0,heart:!0,graph:!0,indexes:!0,fields:!0,lifecycles:!0,componentType:!0,componentProps:!0,decoratorType:!0,decoratorProps:!0},n={address:!0,path:!0,valid:!0,invalid:!0,selfValid:!0,selfInvalid:!0,errors:!0,successes:!0,warnings:!0,validateStatus:!0},u="selfDisplay",h="selfPattern",s={pattern:h,editable:h,readOnly:h,readPretty:h,disabled:h,display:u,hidden:u,visible:u},a=100,l={lifecycles:[],context:[],effectStart:!1,effectEnd:!1,initializing:!1},i=/^\.(\d+)/;return co}var uo,Ia;function Ke(){if(Ia)return uo;Ia=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(M,T)=>e(M,"name",{value:T,configurable:!0}),b=(M,T)=>{for(var G in T)e(M,G,{get:T[G],enumerable:!0})},v=(M,T,G,H)=>{if(T&&typeof T=="object"||typeof T=="function")for(let q of o(T))!f.call(M,q)&&q!==G&&e(M,q,{get:()=>T[q],enumerable:!(H=t(T,q))||H.enumerable});return M},F=M=>v(e({},"__esModule",{value:!0}),M),_={};b(_,{allowAssignDefaultValue:()=>wn,batchReset:()=>Qp,batchSubmit:()=>Kp,batchValidate:()=>Zp,buildDataPath:()=>g,buildFieldPath:()=>m,cleanupArrayChildren:()=>te,cleanupObjectChildren:()=>Y,createBatchStateGetter:()=>ne,createBatchStateSetter:()=>ee,createChildrenFeedbackFilter:()=>U,createReaction:()=>rd,createReactions:()=>td,createStateGetter:()=>Q,createStateSetter:()=>J,deserialize:()=>z,destroy:()=>S,exchangeArrayState:()=>K,getArrayParent:()=>sd,getObjectParent:()=>ad,getTypedDefaultValue:()=>y,getValidFieldDefaultValue:()=>ed,getValidFormValues:()=>$p,getValuesFromEvent:()=>d,initFieldUpdate:()=>re,initializeEnd:()=>nd,initializeStart:()=>od,isHTMLInputEvent:()=>p,locateNode:()=>x,matchFeedback:()=>O,modifySelf:()=>Xp,patchFieldStates:()=>P,patchFormValues:()=>j,queryFeedbackMessages:()=>I,queryFeedbacks:()=>w,resetSelf:()=>yc,serialize:()=>B,setLoading:()=>qp,setSubmitting:()=>Yp,setValidating:()=>tt,setValidatorRule:()=>N,spliceArrayState:()=>L,subscribeUpdate:()=>ae,triggerFormInitialValuesChange:()=>pe,triggerFormValuesChange:()=>Oe,updateFeedback:()=>E,validateSelf:()=>Cn,validateToFeedbacks:()=>R}),uo=F(_);var n=Pe(),u=le(),h=to(),s=qe(),a=ja(),l=Ja();const i=Object.prototype.hasOwnProperty,c=r((M,T,G)=>{(0,l.isForm)(M)?M.notify(T):M.notify(G)},"notify"),p=r((M,T=!0)=>{var G;if(M!=null&&M.target){if(typeof M.target=="object"&&("value"in M.target||"checked"in M.target))return!0;T&&((G=M.stopPropagation)==null||G.call(M))}return!1},"isHTMLInputEvent"),d=r(M=>M.map(T=>T!=null&&T.target?(0,u.isValid)(T.target.value)?T.target.value:(0,u.isValid)(T.target.checked)?T.target.checked:void 0:T),"getValuesFromEvent"),y=r(M=>{if((0,l.isArrayField)(M))return[];if((0,l.isObjectField)(M))return{}},"getTypedDefaultValue"),m=r(M=>g(M.form.fields,M.address),"buildFieldPath"),g=r((M,T)=>{let G=!1;const H=T.segments,q=H.reduce((X,$,ce)=>{const me=X.concat($),ve=H.slice(0,ce+1),Ie=M[ve.join(".")];if(G)return(0,l.isVoidField)(Ie)||(G=!1),X;if(ce>=H.length-1)return me;if((0,l.isVoidField)(Ie)){const Ae=H.slice(0,ce),ct=M[Ae.join(".")];return(0,l.isArrayField)(ct)&&(0,u.isNumberLike)($)?(G=!0,me):X}else G=!1;return me},[]);return new u.FormPath(q)},"buildDataPath"),x=r((M,T)=>(M.address=u.FormPath.parse(T),M.path=m(M),M.form.indexes[M.path.toString()]=M.address.toString(),M),"locateNode"),P=r((M,T)=>{T.forEach(({type:G,address:H,oldAddress:q,payload:X})=>{G==="remove"?S(M,H,!1):G==="update"&&(X&&(M[H]=X,M[q]===X&&(M[q]=void 0)),H&&X&&x(X,H))})},"patchFieldStates"),S=r((M,T,G=!0)=>{const H=M[T];if(H==null||H.dispose(),(0,l.isDataField)(H)&&G){const q=H.form,X=H.path;q.deleteValuesIn(X),q.deleteInitialValuesIn(X)}delete M[T]},"destroy"),j=r((M,T,G)=>{const H=r((X,$)=>{X.length?M.setValuesIn(X,(0,u.clone)($)):Object.assign(M.values,(0,u.clone)($))},"update"),q=r((X,$=[])=>{const ce=M.getValuesIn($),me=M.query($).take(),ve=me&&!(0,l.isVoidField)(me);if(ve&&me.display==="none"){me.caches.value=(0,u.clone)(X);return}if(wn(ce,X))H($,X);else{if((0,u.isEmpty)(X)||a.GlobalState.initializing)return;(0,u.isPlainObj)(ce)&&(0,u.isPlainObj)(X)?(0,u.each)(X,(Ie,Ae)=>{q(Ie,$.concat(Ae))}):me?ve&&!me.selfModified&&H($,X):M.initialized&&H($,X)}},"patch");q(G,T)},"patchFormValues"),O=r((M,T)=>!(!M||!T||M.type&&M.type!==T.type||M.code&&M.code!==T.code||M.path&&T.path&&!u.FormPath.parse(M.path).match(T.path)||M.address&&T.address&&!u.FormPath.parse(M.address).match(T.address)||M.triggerType&&M.triggerType!==T.triggerType),"matchFeedback"),w=r((M,T)=>M.feedbacks.filter(G=>{var H,q,X;return(H=G.messages)!=null&&H.length?O(T,W(k({},G),{address:(q=M.address)==null?void 0:q.toString(),path:(X=M.path)==null?void 0:X.toString()})):!1}),"queryFeedbacks"),I=r((M,T)=>M.feedbacks.length?w(M,T).reduce((G,H)=>(0,u.isEmpty)(H.messages)?G:G.concat(H.messages),[]):[],"queryFeedbackMessages"),E=r((M,T)=>{if(T)return(0,n.batch)(()=>{var G,H;if(M.feedbacks.length){const q=w(M,T);if(q.length){M.feedbacks=M.feedbacks.reduce((X,$)=>{var ce;return q.includes($)?(ce=T.messages)!=null&&ce.length?($.messages=T.messages,X.concat($)):X:X.concat($)},[]);return}else(H=T.messages)!=null&&H.length&&(M.feedbacks=M.feedbacks.concat(T))}else{if(!((G=T.messages)!=null&&G.length))return;M.feedbacks=[T]}})},"updateFeedback"),R=r((M,T="onInput")=>ie(null,null,function*(){var H;const G=yield(0,h.validate)(M.value,M.validator,{triggerType:T,validateFirst:(H=M.props.validateFirst)!=null?H:M.form.props.validateFirst,context:{field:M,form:M.form}});return(0,n.batch)(()=>{(0,u.each)(G,(q,X)=>{M.setFeedback({triggerType:T,type:X,code:(0,u.pascalCase)(`validate-${X}`),messages:q})})}),G}),"validateToFeedbacks"),N=r((M,T,G)=>{if(!(0,u.isValid)(G))return;const H=(0,h.parseValidatorDescriptions)(M.validator),q=H.some($=>T in $),X={[T]:G};q?M.validator=H.map($=>((0,u.isPlainObj)($)&&i.call($,T)&&($[T]=G),$)):T==="required"?M.validator=[X].concat(H):M.validator=H.concat(X)},"setValidatorRule"),L=r((M,T)=>{const{startIndex:G,deleteCount:H,insertCount:q}=k({startIndex:0,deleteCount:0,insertCount:0},T),X=M.address.toString(),$=X.length,me=M.form.fields,ve=[],Ie=q-H,Ae=r(be=>be.indexOf(X)===0&&be.length>$,"isArrayChildren"),ct=r(be=>{var fe;const ke=(fe=be.substring($).match(a.NumberIndexReg))==null?void 0:fe[1];return ke===void 0?!1:Number(ke)>G+H-1},"isAfterNode"),Ee=r(be=>{var fe;const ke=(fe=be.substring($).match(a.NumberIndexReg))==null?void 0:fe[1];if(ke===void 0)return!1;const He=Number(ke);return He>=G&&He<G+q},"isInsertNode"),ge=r(be=>{var fe;const De=be.substring(0,$),ke=be.substring($),He=(fe=ke.match(a.NumberIndexReg))==null?void 0:fe[1];if(He===void 0)return!1;const ut=Number(He);return ut>G&&!me[`${De}${ke.replace(/^\.\d+/,`.${ut+H}`)}`]||ut===G},"isDeleteNode"),Ge=r(be=>{var fe;if(Ie===0)return be;const De=be.substring(0,$),ke=be.substring($),He=(fe=ke.match(a.NumberIndexReg))==null?void 0:fe[1];if(He===void 0)return be;const ut=Number(He)+Ie;return`${De}${ke.replace(/^\.\d+/,`.${ut}`)}`},"moveIndex");(0,n.batch)(()=>{(0,u.each)(me,(be,fe)=>{if(Ae(fe)){if(ct(fe)){const De=Ge(fe);ve.push({type:"update",address:De,oldAddress:fe,payload:be})}(Ee(fe)||ge(fe))&&ve.push({type:"remove",address:fe})}}),P(me,ve)}),M.form.notify(s.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)},"spliceArrayState"),K=r((M,T)=>{const{fromIndex:G,toIndex:H}=k({fromIndex:0,toIndex:0},T),q=M.address.toString(),X=M.form.fields,$=q.length,ce=[],me=r(Ee=>Ee.indexOf(q)===0&&Ee.length>$,"isArrayChildren"),ve=G<H,Ie=r(Ee=>{var ge;const be=(ge=Ee.slice(q.length).match(a.NumberIndexReg))==null?void 0:ge[1];if(be===void 0)return!1;const fe=Number(be);return ve?fe>G&&fe<=H:fe<G&&fe>=H},"isMoveNode"),Ae=r(Ee=>{var ge;const be=(ge=Ee.substring($).match(a.NumberIndexReg))==null?void 0:ge[1];return be===void 0?!1:Number(be)===G},"isFromNode"),ct=r(Ee=>{const ge=Ee.substring(0,$),Ge=Ee.substring($),be=Ge.match(a.NumberIndexReg)[1];let De=Number(be);return De===G?De=H:De+=ve?-1:1,`${ge}${Ge.replace(/^\.\d+/,`.${De}`)}`},"moveIndex");(0,n.batch)(()=>{(0,u.each)(X,(Ee,ge)=>{if(me(ge)&&(Ie(ge)||Ae(ge))){const Ge=ct(ge);ce.push({type:"update",address:Ge,oldAddress:ge,payload:Ee}),X[Ge]||ce.push({type:"remove",address:ge})}}),P(X,ce)}),M.form.notify(s.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)},"exchangeArrayState"),te=r((M,T)=>{const G=M.address.toString(),H=M.form.fields,q=r($=>$.indexOf(G)===0&&$.length>G.length,"isArrayChildren"),X=r($=>{var ce;const ve=(ce=$.slice(G.length).match(a.NumberIndexReg))==null?void 0:ce[1];return ve===void 0?!1:Number(ve)>=T},"isNeedCleanup");(0,n.batch)(()=>{(0,u.each)(H,($,ce)=>{q(ce)&&X(ce)&&$.destroy()})})},"cleanupArrayChildren"),Y=r((M,T)=>{if(T.length===0)return;const G=M.address.toString(),H=M.form.fields,q=r($=>$.indexOf(G)===0&&$.length>G.length,"isObjectChildren"),X=r($=>{var ce;const ve=(ce=$.slice(G.length).match(/^\.([^.]+)/))==null?void 0:ce[1];return ve===void 0?!1:T.includes(ve)},"isNeedCleanup");(0,n.batch)(()=>{(0,u.each)(H,($,ce)=>{q(ce)&&X(ce)&&$.destroy()})})},"cleanupObjectChildren"),re=n.batch.scope.bound(M=>{const T=M.form,G=u.FormPath.ensureIn(T,"requests.updates",[]),H=u.FormPath.ensureIn(T,"requests.updateIndexes",{});for(let q=0;q<G.length;q++){const{pattern:X,callbacks:$}=G[q];let ce=!1;M.match(X)&&($.forEach(me=>{M.setState(me)}),!X.isWildMatchPattern&&!X.isMatchPattern&&(G.splice(q--,1),ce=!0)),ce?delete H[X.toString()]:H[X.toString()]=q}}),ae=r((M,T,G)=>{const H=u.FormPath.ensureIn(M,"requests.updates",[]),q=u.FormPath.ensureIn(M,"requests.updateIndexes",{}),X=T.toString(),$=q[X];(0,u.isValid)($)?H[$]&&!H[$].callbacks.some(ce=>ce.toString()===G.toString()?ce===G:!1)&&H[$].callbacks.push(G):(q[X]=H.length,H.push({pattern:T,callbacks:[G]}))},"subscribeUpdate"),z=r((M,T)=>{if(M){if((0,u.isFn)(T))T(M);else for(let G in T){if(!i.call(T,G)||a.ReadOnlyProperties[G]||a.ReservedProperties[G])continue;const H=a.MutuallyExclusiveProperties[G];if(H&&i.call(T,H)&&!(0,u.isValid)(T[H]))continue;const q=T[G];(0,u.isFn)(q)||(M[G]=q)}return M}},"deserialize"),B=r((M,T)=>{if((0,u.isFn)(T))return T(M);{const G={};for(let H in M){if(!i.call(M,H)||a.ReservedProperties[H])continue;if(H==="address"||H==="path"){G[H]=M[H].toString();continue}const q=M[H];(0,u.isFn)(q)||(G[H]=(0,n.toJS)(q))}return G}},"serialize"),U=r(M=>{var T;const G=(T=M.address)==null?void 0:T.toString();return({address:H})=>H===G||H.indexOf(G+".")===0},"createChildrenFeedbackFilter"),J=r(M=>n.batch.bound(T=>z(M,T)),"createStateSetter"),Q=r(M=>T=>B(M,T),"createStateGetter"),ee=r(M=>n.batch.bound((T,G)=>{if((0,l.isQuery)(T))T.forEach(H=>{H.setState(G)});else if((0,l.isGeneralField)(T))T.setState(G);else{let H=0,q=u.FormPath.parse(T);M.query(q).forEach(X=>{X.setState(G),H++}),(H===0||q.isWildMatchPattern)&&ae(M,q,G)}}),"createBatchStateSetter"),ne=r(M=>(T,G)=>(0,l.isQuery)(T)?T.take(G):(0,l.isGeneralField)(T)?T.getState(G):M.query(T).take(H=>H.getState(G)),"createBatchStateGetter"),pe=r((M,T)=>{Array.isArray(T.object)&&T.key==="length"||((0,n.contains)(M.initialValues,T.object)||M.initialValues===T.value)&&((T.type==="add"||T.type==="set")&&j(M,T.path.slice(1),T.value),M.initialized&&M.notify(s.LifeCycleTypes.ON_FORM_INITIAL_VALUES_CHANGE))},"triggerFormInitialValuesChange"),Oe=r((M,T)=>{Array.isArray(T.object)&&T.key==="length"||((0,n.contains)(M.values,T.object)||M.values===T.value)&&M.initialized&&M.notify(s.LifeCycleTypes.ON_FORM_VALUES_CHANGE)},"triggerFormValuesChange"),tt=r((M,T)=>{clearTimeout(M.requests.validate),T?(M.requests.validate=setTimeout(()=>{(0,n.batch)(()=>{M.validating=T,c(M,s.LifeCycleTypes.ON_FORM_VALIDATING,s.LifeCycleTypes.ON_FIELD_VALIDATING)})},a.RESPONSE_REQUEST_DURATION),c(M,s.LifeCycleTypes.ON_FORM_VALIDATE_START,s.LifeCycleTypes.ON_FIELD_VALIDATE_START)):(M.validating!==T&&(M.validating=T),c(M,s.LifeCycleTypes.ON_FORM_VALIDATE_END,s.LifeCycleTypes.ON_FIELD_VALIDATE_END))},"setValidating"),Yp=r((M,T)=>{clearTimeout(M.requests.submit),T?(M.requests.submit=setTimeout(()=>{(0,n.batch)(()=>{M.submitting=T,c(M,s.LifeCycleTypes.ON_FORM_SUBMITTING,s.LifeCycleTypes.ON_FIELD_SUBMITTING)})},a.RESPONSE_REQUEST_DURATION),c(M,s.LifeCycleTypes.ON_FORM_SUBMIT_START,s.LifeCycleTypes.ON_FIELD_SUBMIT_START)):(M.submitting!==T&&(M.submitting=T),c(M,s.LifeCycleTypes.ON_FORM_SUBMIT_END,s.LifeCycleTypes.ON_FIELD_SUBMIT_END))},"setSubmitting"),qp=r((M,T)=>{clearTimeout(M.requests.loading),T?M.requests.loading=setTimeout(()=>{(0,n.batch)(()=>{M.loading=T,c(M,s.LifeCycleTypes.ON_FORM_LOADING,s.LifeCycleTypes.ON_FIELD_LOADING)})},a.RESPONSE_REQUEST_DURATION):M.loading!==T&&(M.loading=T)},"setLoading"),Kp=r((M,T)=>ie(null,null,function*(){const G=r(q=>(0,l.isForm)(q)?(0,n.toJS)(q.values):(0,n.toJS)(q.value),"getValues");M.setSubmitting(!0);try{c(M,s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_START,s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_START),yield M.validate(),c(M,s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_SUCCESS,s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_SUCCESS)}catch(q){c(M,s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_FAILED,s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_FAILED)}c(M,s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_END,s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_END);let H;try{if(M.invalid)throw M.errors;(0,u.isFn)(T)?H=yield T(G(M)):H=G(M),c(M,s.LifeCycleTypes.ON_FORM_SUBMIT_SUCCESS,s.LifeCycleTypes.ON_FIELD_SUBMIT_SUCCESS)}catch(q){throw M.setSubmitting(!1),c(M,s.LifeCycleTypes.ON_FORM_SUBMIT_FAILED,s.LifeCycleTypes.ON_FIELD_SUBMIT_FAILED),c(M,s.LifeCycleTypes.ON_FORM_SUBMIT,s.LifeCycleTypes.ON_FIELD_SUBMIT),q}return M.setSubmitting(!1),c(M,s.LifeCycleTypes.ON_FORM_SUBMIT,s.LifeCycleTypes.ON_FIELD_SUBMIT),H}),"batchSubmit"),vc=r(M=>{var H,q,X,$;const T=(q=(H=M.props.validatePattern)!=null?H:M.form.props.validatePattern)!=null?q:["editable"],G=($=(X=M.props.validateDisplay)!=null?X:M.form.props.validateDisplay)!=null?$:["visible"];return T.includes(M.pattern)&&G.includes(M.display)},"shouldValidate"),Zp=r((M,T,G)=>ie(null,null,function*(){if((0,l.isForm)(M))M.setValidating(!0);else if(!vc(M))return;const H=[];if(M.query(T).forEach(q=>{(0,l.isVoidField)(q)||H.push(Cn(q,G,q===M))}),yield Promise.all(H),(0,l.isForm)(M)&&M.setValidating(!1),M.invalid)throw c(M,s.LifeCycleTypes.ON_FORM_VALIDATE_FAILED,s.LifeCycleTypes.ON_FIELD_VALIDATE_FAILED),M.errors;c(M,s.LifeCycleTypes.ON_FORM_VALIDATE_SUCCESS,s.LifeCycleTypes.ON_FIELD_VALIDATE_SUCCESS)}),"batchValidate"),Qp=r((M,T,G)=>ie(null,null,function*(){const H=[];M.query(T).forEach(q=>{(0,l.isVoidField)(q)||H.push(yc(q,G,M===q))}),(0,l.isForm)(M)&&(M.modified=!1),c(M,s.LifeCycleTypes.ON_FORM_RESET,s.LifeCycleTypes.ON_FIELD_RESET),yield Promise.all(H)}),"batchReset"),Cn=n.batch.bound((M,T,G=!1)=>ie(null,null,function*(){const H=r(()=>{tt(M,!0)},"start"),q=r(()=>{tt(M,!1),!G&&(M.selfValid?M.notify(s.LifeCycleTypes.ON_FIELD_VALIDATE_SUCCESS):M.notify(s.LifeCycleTypes.ON_FIELD_VALIDATE_FAILED))},"end");if(!vc(M))return{};if(H(),!T){const $=(0,h.parseValidatorDescriptions)(M.validator).reduce((me,ve)=>me.indexOf(ve.triggerType)>-1?me:me.concat(ve.triggerType),[]),ce={};for(let me=0;me<$.length;me++){const ve=yield R(M,$[me]);(0,u.each)(ve,(Ie,Ae)=>{ce[Ae]=ce[Ae]||[],ce[Ae]=ce[Ae].concat(Ie)})}return q(),ce}const X=yield R(M,T);return q(),X})),yc=n.batch.bound((M,T,G=!1)=>ie(null,null,function*(){const H=y(M);if(M.modified=!1,M.selfModified=!1,M.visited=!1,M.feedbacks=[],M.inputValue=H,M.inputValues=[],M.caches={},!(0,u.isUndef)(M.value))if(T!=null&&T.forceClear)M.value=H;else{const q=M.initialValue;M.value=(0,n.toJS)((0,u.isUndef)(q)?H:q)}if(G||M.notify(s.LifeCycleTypes.ON_FIELD_RESET),T!=null&&T.validate)return yield Cn(M)})),Xp=r(M=>{if(M.selfModified)return;M.selfModified=!0,M.modified=!0;let T=M.parent;for(;T;){if((0,l.isDataField)(T)){if(T.modified)return;T.modified=!0}T=T.parent}M.form.modified=!0},"modifySelf"),$p=r(M=>(0,n.isObservable)(M)?M:(0,u.clone)(M||{}),"getValidFormValues"),ed=r((M,T)=>wn(M,T)?(0,u.clone)(T):M,"getValidFieldDefaultValue"),wn=r((M,T)=>{const G=!(0,u.isUndef)(M),H=!(0,u.isUndef)(T);if(!G)return H;if(typeof M==typeof T&&(M===""||M===0))return!1;const q=M!==null&&(0,u.isEmpty)(M,!0),X=T!==null&&(0,u.isEmpty)(T,!0);return q?!X:!1},"allowAssignDefaultValue"),td=r(M=>{const T=(0,u.toArr)(M.props.reactions);M.form.addEffects(M,()=>{T.forEach(G=>{(0,u.isFn)(G)&&M.disposers.push((0,n.autorun)(n.batch.scope.bound(()=>{M.destroyed||G(M)})))})})},"createReactions"),rd=r((M,T)=>(0,n.reaction)(M,n.untracked.bound(T)),"createReaction"),od=r(()=>{a.GlobalState.initializing=!0},"initializeStart"),nd=r(()=>{n.batch.endpoint(()=>{a.GlobalState.initializing=!1})},"initializeEnd"),sd=r((M,T=M.index)=>{if(T>-1){let G=M.parent;for(;G;){if((0,l.isArrayField)(G))return G;if(G===M.form)return;G=G.parent}}},"getArrayParent"),ad=r(M=>{let T=M.parent;for(;T;){if((0,l.isArrayField)(T))return;if((0,l.isObjectField)(T))return T;if(T===M.form)return;T=T.parent}},"getObjectParent");return uo}var lo,Aa;function po(){if(Aa)return lo;Aa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{Query:()=>l}),lo=F(_);var n=le(),u=Ke();const h=r((i,c)=>{if(i)return(0,n.isFn)(c)?c(i,i.address):i},"output"),s=r((i,c)=>{const p=c.toString(),d=i.indexes[p],y=i.fields[p],m=i.fields[d];if(y)return p;if(m)return d},"takeMatchPattern"),a=class{constructor(c){if(this.addresses=[],this.pattern=n.FormPath.parse(c.pattern,c.base),this.form=c.form,this.pattern.isMatchPattern)(0,n.each)(this.form.fields,(p,d)=>{if(!p){delete this.form.fields[d];return}p.match(this.pattern)&&this.addresses.push(d)});else{const p=s(this.form,this.pattern.haveRelativePattern?(0,u.buildDataPath)(c.form.fields,this.pattern):this.pattern);p&&(this.addresses=[p])}}take(c){return h(this.form.fields[this.addresses[0]],c)}map(c){return this.addresses.map(p=>h(this.form.fields[p],c))}forEach(c){return this.addresses.forEach(p=>h(this.form.fields[p],c))}reduce(c,p){return this.addresses.reduce((d,y)=>h(this.form.fields[y],(m,g)=>c(d,m,g)),p)}get(c){const p=this.take();if(p)return p[c]}getIn(c){return n.FormPath.getIn(this.take(),c)}value(){return this.get("value")}initialValue(){return this.get("initialValue")}};r(a,"Query");let l=a;return lo}var mo,Da;function yt(){if(Da)return mo;Da=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{createEffectContext:()=>l,createEffectHook:()=>a,runEffects:()=>p,useEffectForm:()=>c}),mo=F(_);var n=le(),u=xo(),h=vt(),s=ja();const a=r((d,y)=>(...m)=>{if(s.GlobalState.effectStart)s.GlobalState.lifecycles.push(new u.LifeCycle(d,(g,x)=>{(0,n.isFn)(y)&&y(g,x,...s.GlobalState.context)(...m)}));else throw new Error("Effect hooks cannot be used in asynchronous function body")},"createEffectHook"),l=r(d=>{let y;return{provide(m){if(s.GlobalState.effectStart)y=s.GlobalState.context.length,s.GlobalState.context[y]=(0,n.isValid)(m)?m:d;else throw new Error("Provide method cannot be used in asynchronous function body")},consume(){if(!s.GlobalState.effectStart)throw new Error("Consume method cannot be used in asynchronous function body");return s.GlobalState.context[y]}}},"createEffectContext"),i=l(),c=i.consume,p=r((d,...y)=>(s.GlobalState.lifecycles=[],s.GlobalState.context=[],s.GlobalState.effectStart=!0,s.GlobalState.effectEnd=!1,(0,h.isForm)(d)&&i.provide(d),y.forEach(m=>{(0,n.isFn)(m)&&m(d)}),s.GlobalState.context=[],s.GlobalState.effectStart=!1,s.GlobalState.effectEnd=!0,s.GlobalState.lifecycles),"runEffects");return mo}var fo,Ma;function Ra(){if(Ma)return fo;Ma=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{BaseField:()=>l}),fo=F(_);var n=le(),u=Ke(),h=qe(),s=po();const a=class{constructor(){this.disposers=[],this.actions={},this.setTitle=r(c=>{this.title=c},"setTitle"),this.setDescription=r(c=>{this.description=c},"setDescription"),this.setDisplay=r(c=>{this.display=c},"setDisplay"),this.setPattern=r(c=>{this.pattern=c},"setPattern"),this.setComponent=r((c,p)=>{c&&(this.componentType=c),p&&(this.componentProps=this.componentProps||{},Object.assign(this.componentProps,p))},"setComponent"),this.setComponentProps=r(c=>{c&&(this.componentProps=this.componentProps||{},Object.assign(this.componentProps,c))},"setComponentProps"),this.setDecorator=r((c,p)=>{c&&(this.decoratorType=c),p&&(this.decoratorProps=this.decoratorProps||{},Object.assign(this.decoratorProps,p))},"setDecorator"),this.setDecoratorProps=r(c=>{c&&(this.decoratorProps=this.decoratorProps||{},Object.assign(this.decoratorProps,c))},"setDecoratorProps"),this.setData=r(c=>{this.data=c},"setData"),this.setContent=r(c=>{this.content=c},"setContent"),this.onInit=r(()=>{this.initialized=!0,(0,u.initFieldUpdate)(this),this.notify(h.LifeCycleTypes.ON_FIELD_INIT)},"onInit"),this.onMount=r(()=>{this.mounted=!0,this.unmounted=!1,this.notify(h.LifeCycleTypes.ON_FIELD_MOUNT)},"onMount"),this.onUnmount=r(()=>{this.mounted=!1,this.unmounted=!0,this.notify(h.LifeCycleTypes.ON_FIELD_UNMOUNT)},"onUnmount"),this.query=r(c=>new s.Query({pattern:c,base:this.address,form:this.form}),"query"),this.notify=r((c,p)=>this.form.notify(c,p!=null?p:this),"notify"),this.dispose=r(()=>{this.disposers.forEach(c=>{c()}),this.form.removeEffects(this)},"dispose"),this.destroy=r((c=!0)=>{(0,u.destroy)(this.form.fields,this.address.toString(),c)},"destroy"),this.match=r(c=>n.FormPath.parse(c).matchAliasGroup(this.address,this.path),"match"),this.inject=r(c=>{(0,n.each)(c,(p,d)=>{(0,n.isFn)(p)&&(this.actions[d]=p)})},"inject"),this.invoke=r((c,...p)=>{var d,y;return(y=(d=this.actions)[c])==null?void 0:y.call(d,...p)},"invoke")}locate(c){this.form.fields[c.toString()]=this,(0,u.locateNode)(this,c)}get indexes(){return this.path.transform(/^\d+$/,(...c)=>c.map(p=>Number(p)))}get index(){var c;return(c=this.indexes[this.indexes.length-1])!=null?c:-1}get records(){const c=(0,u.getArrayParent)(this);return c==null?void 0:c.value}get record(){var c;const p=(0,u.getObjectParent)(this);if(p)return p.value;const d=this.index,y=(0,u.getArrayParent)(this,d);return y?(c=y.value)==null?void 0:c[d]:this.form.values}get component(){return[this.componentType,this.componentProps]}set component(c){const p=(0,n.toArr)(c);this.componentType=p[0],this.componentProps=p[1]||{}}get decorator(){return[this.decoratorType,this.decoratorProps]}set decorator(c){const p=(0,n.toArr)(c);this.decoratorType=p[0],this.decoratorProps=p[1]||{}}get parent(){let c=this.address.parent(),p=c.toString();for(;!this.form.fields[p];)if(c=c.parent(),p=c.toString(),!p)return;return this.form.fields[p]}get display(){var c;const p=(c=this.parent)==null?void 0:c.display;return p&&p!=="visible"?this.selfDisplay&&this.selfDisplay!=="visible"?this.selfDisplay:p:(0,n.isValid)(this.selfDisplay)?this.selfDisplay:p||this.form.display||"visible"}get pattern(){var c;const p=((c=this.parent)==null?void 0:c.pattern)||this.form.pattern||"editable",d=this.selfPattern;return(0,n.isValid)(d)?p==="readPretty"&&d!=="editable"?p:d:p}get editable(){return this.pattern==="editable"}get disabled(){return this.pattern==="disabled"}get readOnly(){return this.pattern==="readOnly"}get readPretty(){return this.pattern==="readPretty"}get hidden(){return this.display==="hidden"}get visible(){return this.display==="visible"}get destroyed(){return!this.form.fields[this.address.toString()]}set hidden(c){(0,n.isValid)(c)&&(c?this.display="hidden":this.display="visible")}set visible(c){(0,n.isValid)(c)&&(c?this.display="visible":this.display="none")}set editable(c){(0,n.isValid)(c)&&(c?this.pattern="editable":this.pattern="readPretty")}set readOnly(c){(0,n.isValid)(c)&&(c?this.pattern="readOnly":this.pattern="editable")}set disabled(c){(0,n.isValid)(c)&&(c?this.pattern="disabled":this.pattern="editable")}set readPretty(c){(0,n.isValid)(c)&&(c?this.pattern="readPretty":this.pattern="editable")}set pattern(c){this.selfPattern=c}set display(c){this.selfDisplay=c}};r(a,"BaseField");let l=a;return fo}var ho,Na;function _t(){if(Na)return ho;Na=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(p,d)=>e(p,"name",{value:d,configurable:!0}),b=(p,d)=>{for(var y in d)e(p,y,{get:d[y],enumerable:!0})},v=(p,d,y,m)=>{if(d&&typeof d=="object"||typeof d=="function")for(let g of o(d))!f.call(p,g)&&g!==y&&e(p,g,{get:()=>d[g],enumerable:!(m=t(d,g))||m.enumerable});return p},F=p=>v(e({},"__esModule",{value:!0}),p),_={};b(_,{Field:()=>c}),ho=F(_);var n=Pe(),u=le(),h=to(),s=Ke(),a=qe(),l=Ra();const i=class extends l.BaseField{constructor(d,y,m,g){super(),this.displayName="Field",this.caches={},this.requests={},this.setDataSource=r(x=>{this.dataSource=x},"setDataSource"),this.setFeedback=r(x=>{(0,s.updateFeedback)(this,x)},"setFeedback"),this.setSelfErrors=r(x=>{this.selfErrors=x},"setSelfErrors"),this.setSelfWarnings=r(x=>{this.selfWarnings=x},"setSelfWarnings"),this.setSelfSuccesses=r(x=>{this.selfSuccesses=x},"setSelfSuccesses"),this.setValidator=r(x=>{this.validator=x},"setValidator"),this.setValidatorRule=r((x,P)=>{(0,s.setValidatorRule)(this,x,P)},"setValidatorRule"),this.setRequired=r(x=>{this.required=x},"setRequired"),this.setValue=r(x=>{if(!this.destroyed){if(!this.initialized){if(this.display==="none"){this.caches.value=x;return}if(x=(0,s.getValidFieldDefaultValue)(x,this.initialValue),!(0,s.allowAssignDefaultValue)(this.value,x)&&!this.designable)return}this.form.setValuesIn(this.path,x)}},"setValue"),this.setInitialValue=r(x=>{this.destroyed||!this.initialized&&!(0,s.allowAssignDefaultValue)(this.initialValue,x)&&!this.designable||this.form.setInitialValuesIn(this.path,x)},"setInitialValue"),this.setLoading=r(x=>{(0,s.setLoading)(this,x)},"setLoading"),this.setValidating=r(x=>{(0,s.setValidating)(this,x)},"setValidating"),this.setSubmitting=r(x=>{(0,s.setSubmitting)(this,x)},"setSubmitting"),this.setState=(0,s.createStateSetter)(this),this.getState=(0,s.createStateGetter)(this),this.onInput=r((...x)=>ie(this,null,function*(){const P=r(w=>{var I,E;return(0,s.isHTMLInputEvent)(w[0])&&"currentTarget"in w[0]?((I=w[0])==null?void 0:I.target)===((E=w[0])==null?void 0:E.currentTarget):!0},"isHTMLInputEventFromSelf"),S=r(w=>{var I;return(I=w[0])!=null&&I.target&&!(0,s.isHTMLInputEvent)(w[0])?w:(0,s.getValuesFromEvent)(w)},"getValues");if(!P(x))return;const j=S(x),O=j[0];this.caches.inputting=!0,this.inputValue=O,this.inputValues=j,this.value=O,this.modify(),this.notify(a.LifeCycleTypes.ON_FIELD_INPUT_VALUE_CHANGE),this.notify(a.LifeCycleTypes.ON_FORM_INPUT_CHANGE,this.form),yield(0,s.validateSelf)(this,"onInput"),this.caches.inputting=!1}),"onInput"),this.onFocus=r((...x)=>ie(this,null,function*(){var P;(P=x[0])!=null&&P.target&&!(0,s.isHTMLInputEvent)(x[0],!1)||(this.active=!0,this.visited=!0,yield(0,s.validateSelf)(this,"onFocus"))}),"onFocus"),this.onBlur=r((...x)=>ie(this,null,function*(){var P;(P=x[0])!=null&&P.target&&!(0,s.isHTMLInputEvent)(x[0],!1)||(this.active=!1,yield(0,s.validateSelf)(this,"onBlur"))}),"onBlur"),this.validate=r(x=>(0,s.batchValidate)(this,`${this.address}.**`,x),"validate"),this.submit=r(x=>(0,s.batchSubmit)(this,x),"submit"),this.reset=r(x=>(0,s.batchReset)(this,`${this.address}.**`,x),"reset"),this.queryFeedbacks=r(x=>(0,s.queryFeedbacks)(this,x),"queryFeedbacks"),this.modify=r(()=>(0,s.modifySelf)(this),"modify"),this.form=m,this.props=y,this.designable=g,(0,s.initializeStart)(),this.locate(d),this.initialize(),this.makeObservable(),this.makeReactive(),this.onInit(),(0,s.initializeEnd)()}initialize(){this.initialized=!1,this.loading=!1,this.validating=!1,this.submitting=!1,this.selfModified=!1,this.active=!1,this.visited=!1,this.mounted=!1,this.unmounted=!1,this.inputValues=[],this.inputValue=null,this.feedbacks=[],this.title=this.props.title,this.description=this.props.description,this.display=this.props.display,this.pattern=this.props.pattern,this.editable=this.props.editable,this.disabled=this.props.disabled,this.readOnly=this.props.readOnly,this.readPretty=this.props.readPretty,this.visible=this.props.visible,this.hidden=this.props.hidden,this.dataSource=this.props.dataSource,this.validator=this.props.validator,this.required=this.props.required,this.content=this.props.content,this.initialValue=this.props.initialValue,this.value=this.props.value,this.data=this.props.data,this.decorator=(0,u.toArr)(this.props.decorator),this.component=(0,u.toArr)(this.props.component)}makeObservable(){this.designable||(0,n.define)(this,{path:n.observable.ref,title:n.observable.ref,description:n.observable.ref,dataSource:n.observable.ref,selfDisplay:n.observable.ref,selfPattern:n.observable.ref,loading:n.observable.ref,validating:n.observable.ref,submitting:n.observable.ref,selfModified:n.observable.ref,modified:n.observable.ref,active:n.observable.ref,visited:n.observable.ref,initialized:n.observable.ref,mounted:n.observable.ref,unmounted:n.observable.ref,inputValue:n.observable.ref,inputValues:n.observable.ref,decoratorType:n.observable.ref,componentType:n.observable.ref,content:n.observable.ref,feedbacks:n.observable.ref,decoratorProps:n.observable,componentProps:n.observable,validator:n.observable.shallow,data:n.observable.shallow,component:n.observable.computed,decorator:n.observable.computed,errors:n.observable.computed,warnings:n.observable.computed,successes:n.observable.computed,valid:n.observable.computed,invalid:n.observable.computed,selfErrors:n.observable.computed,selfWarnings:n.observable.computed,selfSuccesses:n.observable.computed,selfValid:n.observable.computed,selfInvalid:n.observable.computed,validateStatus:n.observable.computed,value:n.observable.computed,initialValue:n.observable.computed,display:n.observable.computed,pattern:n.observable.computed,required:n.observable.computed,hidden:n.observable.computed,visible:n.observable.computed,disabled:n.observable.computed,readOnly:n.observable.computed,readPretty:n.observable.computed,editable:n.observable.computed,indexes:n.observable.computed,setDisplay:n.action,setTitle:n.action,setDescription:n.action,setDataSource:n.action,setValue:n.action,setPattern:n.action,setInitialValue:n.action,setLoading:n.action,setValidating:n.action,setFeedback:n.action,setSelfErrors:n.action,setSelfWarnings:n.action,setSelfSuccesses:n.action,setValidator:n.action,setRequired:n.action,setComponent:n.action,setComponentProps:n.action,setDecorator:n.action,setDecoratorProps:n.action,setData:n.action,setContent:n.action,validate:n.action,reset:n.action,onInit:n.batch,onInput:n.batch,onMount:n.batch,onUnmount:n.batch,onFocus:n.batch,onBlur:n.batch})}makeReactive(){this.designable||(this.disposers.push((0,s.createReaction)(()=>this.value,d=>{this.notify(a.LifeCycleTypes.ON_FIELD_VALUE_CHANGE),(0,u.isValid)(d)&&(this.selfModified&&!this.caches.inputting&&(0,s.validateSelf)(this),!(0,u.isEmpty)(d)&&this.display==="none"&&(this.caches.value=(0,n.toJS)(d),this.form.deleteValuesIn(this.path)))}),(0,s.createReaction)(()=>this.initialValue,()=>{this.notify(a.LifeCycleTypes.ON_FIELD_INITIAL_VALUE_CHANGE)}),(0,s.createReaction)(()=>this.display,d=>{var m;const y=this.value;d!=="none"?y===void 0&&this.caches.value!==void 0&&(this.setValue(this.caches.value),this.caches.value=void 0):(this.caches.value=(m=(0,n.toJS)(y))!=null?m:(0,n.toJS)(this.initialValue),this.form.deleteValuesIn(this.path)),(d==="none"||d==="hidden")&&this.setFeedback({type:"error",messages:[]})}),(0,s.createReaction)(()=>this.pattern,d=>{d!=="editable"&&this.setFeedback({type:"error",messages:[]})})),(0,s.createReactions)(this))}get selfErrors(){return(0,s.queryFeedbackMessages)(this,{type:"error"})}get errors(){return this.form.errors.filter((0,s.createChildrenFeedbackFilter)(this))}get selfWarnings(){return(0,s.queryFeedbackMessages)(this,{type:"warning"})}get warnings(){return this.form.warnings.filter((0,s.createChildrenFeedbackFilter)(this))}get selfSuccesses(){return(0,s.queryFeedbackMessages)(this,{type:"success"})}get successes(){return this.form.successes.filter((0,s.createChildrenFeedbackFilter)(this))}get selfValid(){return!this.selfErrors.length}get valid(){return!this.errors.length}get selfInvalid(){return!this.selfValid}get invalid(){return!this.valid}get value(){return this.form.getValuesIn(this.path)}get initialValue(){return this.form.getInitialValuesIn(this.path)}get required(){return((0,u.isArr)(this.validator)?this.validator:(0,h.parseValidatorDescriptions)(this.validator)).some(y=>!!(y!=null&&y.required))}get validateStatus(){if(this.validating)return"validating";if(this.selfInvalid)return"error";if(this.selfWarnings.length)return"warning";if(this.selfSuccesses.length)return"success"}set required(d){this.required!==d&&this.setValidatorRule("required",d)}set value(d){this.setValue(d)}set initialValue(d){this.setInitialValue(d)}set selfErrors(d){this.setFeedback({type:"error",code:"EffectError",messages:d})}set selfWarnings(d){this.setFeedback({type:"warning",code:"EffectWarning",messages:d})}set selfSuccesses(d){this.setFeedback({type:"success",code:"EffectSuccess",messages:d})}};r(i,"Field");let c=i;return ho}var bo,Ta;function ka(){if(Ta)return bo;Ta=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{ArrayField:()=>l}),bo=F(_);var n=Pe(),u=le(),h=Ke(),s=_t();const a=class extends s.Field{constructor(c,p,d,y){super(c,p,d,y),this.displayName="ArrayField",this.push=r((...m)=>(0,n.action)(()=>((0,u.isArr)(this.value)||(this.value=[]),this.value.push(...m),this.onInput(this.value))),"push"),this.pop=r(()=>{if((0,u.isArr)(this.value))return(0,n.action)(()=>{const m=this.value.length-1;return(0,h.spliceArrayState)(this,{startIndex:m,deleteCount:1}),this.value.pop(),this.onInput(this.value)})},"pop"),this.insert=r((m,...g)=>(0,n.action)(()=>{if((0,u.isArr)(this.value)||(this.value=[]),g.length!==0)return(0,h.spliceArrayState)(this,{startIndex:m,insertCount:g.length}),this.value.splice(m,0,...g),this.onInput(this.value)}),"insert"),this.remove=r(m=>{if((0,u.isArr)(this.value))return(0,n.action)(()=>((0,h.spliceArrayState)(this,{startIndex:m,deleteCount:1}),this.value.splice(m,1),this.onInput(this.value)))},"remove"),this.shift=r(()=>{if((0,u.isArr)(this.value))return(0,n.action)(()=>(this.value.shift(),this.onInput(this.value)))},"shift"),this.unshift=r((...m)=>(0,n.action)(()=>((0,u.isArr)(this.value)||(this.value=[]),(0,h.spliceArrayState)(this,{startIndex:0,insertCount:m.length}),this.value.unshift(...m),this.onInput(this.value))),"unshift"),this.move=r((m,g)=>{if((0,u.isArr)(this.value)&&m!==g)return(0,n.action)(()=>((0,u.move)(this.value,m,g),(0,h.exchangeArrayState)(this,{fromIndex:m,toIndex:g}),this.onInput(this.value)))},"move"),this.moveUp=r(m=>{if((0,u.isArr)(this.value))return this.move(m,m-1<0?this.value.length-1:m-1)},"moveUp"),this.moveDown=r(m=>{if((0,u.isArr)(this.value))return this.move(m,m+1>=this.value.length?0:m+1)},"moveDown"),this.makeAutoCleanable()}makeAutoCleanable(){this.disposers.push((0,n.reaction)(()=>{var c;return(c=this.value)==null?void 0:c.length},(c,p)=>{p&&!c?(0,h.cleanupArrayChildren)(this,0):c<p&&(0,h.cleanupArrayChildren)(this,c)}))}};r(a,"ArrayField");let l=a;return bo}var vo,Va;function Ba(){if(Va)return vo;Va=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>e(l,"name",{value:i,configurable:!0}),b=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},v=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{ObjectField:()=>a}),vo=F(_);var n=Pe(),u=Ke(),h=_t();const s=class extends h.Field{constructor(i,c,p,d){super(i,c,p,d),this.displayName="ObjectField",this.additionalProperties=[],this.addProperty=r((y,m)=>(this.form.setValuesIn(this.path.concat(y),m),this.additionalProperties.push(y),this.onInput(this.value)),"addProperty"),this.removeProperty=r(y=>(this.form.deleteValuesIn(this.path.concat(y)),this.additionalProperties.splice(this.additionalProperties.indexOf(y),1),this.onInput(this.value)),"removeProperty"),this.existProperty=r(y=>this.form.existValuesIn(this.path.concat(y)),"existProperty"),this.makeAutoCleanable()}makeAutoCleanable(){this.disposers.push((0,n.reaction)(()=>Object.keys(this.value||{}),i=>{const c=this.additionalProperties.filter(p=>!i.includes(p));(0,u.cleanupObjectChildren)(this,c)}))}};r(s,"ObjectField");let a=s;return vo}var yo,La;function Ua(){if(La)return yo;La=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{VoidField:()=>l}),yo=F(_);var n=Pe(),u=le(),h=Ke(),s=Ra();const a=class extends s.BaseField{constructor(c,p,d,y){super(),this.displayName="VoidField",this.setState=(0,h.createStateSetter)(this),this.getState=(0,h.createStateGetter)(this),this.form=d,this.props=p,this.designable=y,(0,h.initializeStart)(),this.locate(c),this.initialize(),this.makeObservable(),this.makeReactive(),this.onInit(),(0,h.initializeEnd)()}initialize(){this.mounted=!1,this.unmounted=!1,this.initialized=!1,this.title=this.props.title,this.description=this.props.description,this.pattern=this.props.pattern,this.display=this.props.display,this.hidden=this.props.hidden,this.editable=this.props.editable,this.disabled=this.props.disabled,this.readOnly=this.props.readOnly,this.readPretty=this.props.readPretty,this.visible=this.props.visible,this.content=this.props.content,this.data=this.props.data,this.decorator=(0,u.toArr)(this.props.decorator),this.component=(0,u.toArr)(this.props.component)}makeObservable(){this.designable||(0,n.define)(this,{path:n.observable.ref,title:n.observable.ref,description:n.observable.ref,selfDisplay:n.observable.ref,selfPattern:n.observable.ref,initialized:n.observable.ref,mounted:n.observable.ref,unmounted:n.observable.ref,decoratorType:n.observable.ref,componentType:n.observable.ref,content:n.observable.ref,data:n.observable.shallow,decoratorProps:n.observable,componentProps:n.observable,display:n.observable.computed,pattern:n.observable.computed,hidden:n.observable.computed,visible:n.observable.computed,disabled:n.observable.computed,readOnly:n.observable.computed,readPretty:n.observable.computed,editable:n.observable.computed,component:n.observable.computed,decorator:n.observable.computed,indexes:n.observable.computed,setTitle:n.action,setDescription:n.action,setDisplay:n.action,setPattern:n.action,setComponent:n.action,setComponentProps:n.action,setDecorator:n.action,setDecoratorProps:n.action,setData:n.action,setContent:n.action,onInit:n.batch,onMount:n.batch,onUnmount:n.batch})}makeReactive(){this.designable||(0,h.createReactions)(this)}};r(a,"VoidField");let l=a;return yo}var _o,Ga;function bl(){if(Ga)return _o;Ga=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(j,O)=>e(j,"name",{value:O,configurable:!0}),b=(j,O)=>{for(var w in O)e(j,w,{get:O[w],enumerable:!0})},v=(j,O,w,I)=>{if(O&&typeof O=="object"||typeof O=="function")for(let E of o(O))!f.call(j,E)&&E!==w&&e(j,E,{get:()=>O[E],enumerable:!(I=t(O,E))||I.enumerable});return j},F=j=>v(e({},"__esModule",{value:!0}),j),_={};b(_,{Form:()=>S}),_o=F(_);var n=Pe(),u=le(),h=vt(),s=yt(),a=Ke(),l=qe(),i=ka(),c=_t(),p=Ca(),d=Sa(),y=Ba(),m=po(),g=Ua();const x="__FORMILY_DEV_TOOLS_HOOK__",P=class{constructor(O){this.displayName="Form",this.fields={},this.requests={},this.indexes={},this.disposers=[],this.createField=r(w=>{const I=u.FormPath.parse(w.basePath).concat(w.name),E=I.toString();if(E)return(!this.fields[E]||this.props.designable)&&((0,n.batch)(()=>{new c.Field(I,w,this,this.props.designable)}),this.notify(l.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)),this.fields[E]},"createField"),this.createArrayField=r(w=>{const I=u.FormPath.parse(w.basePath).concat(w.name),E=I.toString();if(E)return(!this.fields[E]||this.props.designable)&&((0,n.batch)(()=>{new i.ArrayField(I,W(k({},w),{value:(0,u.isArr)(w.value)?w.value:[]}),this,this.props.designable)}),this.notify(l.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)),this.fields[E]},"createArrayField"),this.createObjectField=r(w=>{const I=u.FormPath.parse(w.basePath).concat(w.name),E=I.toString();if(E)return(!this.fields[E]||this.props.designable)&&((0,n.batch)(()=>{new y.ObjectField(I,W(k({},w),{value:(0,u.isObj)(w.value)?w.value:{}}),this,this.props.designable)}),this.notify(l.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)),this.fields[E]},"createObjectField"),this.createVoidField=r(w=>{const I=u.FormPath.parse(w.basePath).concat(w.name),E=I.toString();if(E)return(!this.fields[E]||this.props.designable)&&((0,n.batch)(()=>{new g.VoidField(I,w,this,this.props.designable)}),this.notify(l.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)),this.fields[E]},"createVoidField"),this.setValues=r((w,I="merge")=>{(0,u.isPlainObj)(w)&&(I==="merge"||I==="deepMerge"?(0,u.merge)(this.values,w,{arrayMerge:r((E,R)=>R,"arrayMerge"),assign:!0}):I==="shallowMerge"?Object.assign(this.values,w):this.values=w)},"setValues"),this.setInitialValues=r((w,I="merge")=>{(0,u.isPlainObj)(w)&&(I==="merge"||I==="deepMerge"?(0,u.merge)(this.initialValues,w,{arrayMerge:r((E,R)=>R,"arrayMerge"),assign:!0}):I==="shallowMerge"?Object.assign(this.initialValues,w):this.initialValues=w)},"setInitialValues"),this.setValuesIn=r((w,I)=>{u.FormPath.setIn(this.values,w,I)},"setValuesIn"),this.deleteValuesIn=r(w=>{u.FormPath.deleteIn(this.values,w)},"deleteValuesIn"),this.existValuesIn=r(w=>u.FormPath.existIn(this.values,w),"existValuesIn"),this.getValuesIn=r(w=>u.FormPath.getIn(this.values,w),"getValuesIn"),this.setInitialValuesIn=r((w,I)=>{u.FormPath.setIn(this.initialValues,w,I)},"setInitialValuesIn"),this.deleteInitialValuesIn=r(w=>{u.FormPath.deleteIn(this.initialValues,w)},"deleteInitialValuesIn"),this.existInitialValuesIn=r(w=>u.FormPath.existIn(this.initialValues,w),"existInitialValuesIn"),this.getInitialValuesIn=r(w=>u.FormPath.getIn(this.initialValues,w),"getInitialValuesIn"),this.setLoading=r(w=>{(0,a.setLoading)(this,w)},"setLoading"),this.setSubmitting=r(w=>{(0,a.setSubmitting)(this,w)},"setSubmitting"),this.setValidating=r(w=>{(0,a.setValidating)(this,w)},"setValidating"),this.setDisplay=r(w=>{this.display=w},"setDisplay"),this.setPattern=r(w=>{this.pattern=w},"setPattern"),this.addEffects=r((w,I)=>{this.heart.hasLifeCycles(w)||this.heart.addLifeCycles(w,(0,s.runEffects)(this,I))},"addEffects"),this.removeEffects=r(w=>{this.heart.removeLifeCycles(w)},"removeEffects"),this.setEffects=r(w=>{this.heart.setLifeCycles((0,s.runEffects)(this,w))},"setEffects"),this.clearErrors=r((w="*")=>{this.query(w).forEach(I=>{(0,h.isVoidField)(I)||I.setFeedback({type:"error",messages:[]})})},"clearErrors"),this.clearWarnings=r((w="*")=>{this.query(w).forEach(I=>{(0,h.isVoidField)(I)||I.setFeedback({type:"warning",messages:[]})})},"clearWarnings"),this.clearSuccesses=r((w="*")=>{this.query(w).forEach(I=>{(0,h.isVoidField)(I)||I.setFeedback({type:"success",messages:[]})})},"clearSuccesses"),this.query=r(w=>new m.Query({pattern:w,base:"",form:this}),"query"),this.queryFeedbacks=r(w=>this.query(w.address||w.path||"*").reduce((I,E)=>(0,h.isVoidField)(E)?I:I.concat(E.queryFeedbacks(w).map(R=>W(k({},R),{address:E.address.toString(),path:E.path.toString()})).filter(R=>R.messages.length>0)),[]),"queryFeedbacks"),this.notify=r((w,I)=>{this.heart.publish(w,I!=null?I:this)},"notify"),this.subscribe=r(w=>this.heart.subscribe(w),"subscribe"),this.unsubscribe=r(w=>{this.heart.unsubscribe(w)},"unsubscribe"),this.onInit=r(()=>{this.initialized=!0,this.notify(l.LifeCycleTypes.ON_FORM_INIT)},"onInit"),this.onMount=r(()=>{this.mounted=!0,this.notify(l.LifeCycleTypes.ON_FORM_MOUNT),u.globalThisPolyfill[x]&&!this.props.designable&&u.globalThisPolyfill[x].inject(this.id,this)},"onMount"),this.onUnmount=r(()=>{this.notify(l.LifeCycleTypes.ON_FORM_UNMOUNT),this.query("*").forEach(w=>w.destroy(!1)),this.disposers.forEach(w=>w()),this.unmounted=!0,this.indexes={},this.heart.clear(),u.globalThisPolyfill[x]&&!this.props.designable&&u.globalThisPolyfill[x].unmount(this.id)},"onUnmount"),this.setState=(0,a.createStateSetter)(this),this.getState=(0,a.createStateGetter)(this),this.setFormState=(0,a.createStateSetter)(this),this.getFormState=(0,a.createStateGetter)(this),this.setFieldState=(0,a.createBatchStateSetter)(this),this.getFieldState=(0,a.createBatchStateGetter)(this),this.getFormGraph=r(()=>this.graph.getGraph(),"getFormGraph"),this.setFormGraph=r(w=>{this.graph.setGraph(w)},"setFormGraph"),this.clearFormGraph=r((w="*",I=!0)=>{this.query(w).forEach(E=>{E.destroy(I)})},"clearFormGraph"),this.validate=r((w="*")=>(0,a.batchValidate)(this,w),"validate"),this.submit=r(w=>(0,a.batchSubmit)(this,w),"submit"),this.reset=r((w="*",I)=>(0,a.batchReset)(this,w,I),"reset"),this.initialize(O),this.makeObservable(),this.makeReactive(),this.makeValues(),this.onInit()}initialize(O){this.id=(0,u.uid)(),this.props=k({},O),this.initialized=!1,this.submitting=!1,this.validating=!1,this.loading=!1,this.modified=!1,this.mounted=!1,this.unmounted=!1,this.display=this.props.display||"visible",this.pattern=this.props.pattern||"editable",this.editable=this.props.editable,this.disabled=this.props.disabled,this.readOnly=this.props.readOnly,this.readPretty=this.props.readPretty,this.visible=this.props.visible,this.hidden=this.props.hidden,this.graph=new p.Graph(this),this.heart=new d.Heart({lifecycles:this.lifecycles,context:this})}makeValues(){this.values=(0,a.getValidFormValues)(this.props.values),this.initialValues=(0,a.getValidFormValues)(this.props.initialValues)}makeObservable(){(0,n.define)(this,{fields:n.observable.shallow,indexes:n.observable.shallow,initialized:n.observable.ref,validating:n.observable.ref,submitting:n.observable.ref,loading:n.observable.ref,modified:n.observable.ref,pattern:n.observable.ref,display:n.observable.ref,mounted:n.observable.ref,unmounted:n.observable.ref,values:n.observable,initialValues:n.observable,valid:n.observable.computed,invalid:n.observable.computed,errors:n.observable.computed,warnings:n.observable.computed,successes:n.observable.computed,hidden:n.observable.computed,visible:n.observable.computed,editable:n.observable.computed,readOnly:n.observable.computed,readPretty:n.observable.computed,disabled:n.observable.computed,setValues:n.action,setValuesIn:n.action,setInitialValues:n.action,setInitialValuesIn:n.action,setPattern:n.action,setDisplay:n.action,setState:n.action,deleteInitialValuesIn:n.action,deleteValuesIn:n.action,setSubmitting:n.action,setValidating:n.action,reset:n.action,submit:n.action,validate:n.action,onMount:n.batch,onUnmount:n.batch,onInit:n.batch})}makeReactive(){this.disposers.push((0,n.observe)(this,O=>{(0,a.triggerFormInitialValuesChange)(this,O),(0,a.triggerFormValuesChange)(this,O)},!0))}get valid(){return!this.invalid}get invalid(){return this.errors.length>0}get errors(){return this.queryFeedbacks({type:"error"})}get warnings(){return this.queryFeedbacks({type:"warning"})}get successes(){return this.queryFeedbacks({type:"success"})}get lifecycles(){return(0,s.runEffects)(this,this.props.effects)}get hidden(){return this.display==="hidden"}get visible(){return this.display==="visible"}set hidden(O){(0,u.isValid)(O)&&(O?this.display="hidden":this.display="visible")}set visible(O){(0,u.isValid)(O)&&(O?this.display="visible":this.display="none")}get editable(){return this.pattern==="editable"}set editable(O){(0,u.isValid)(O)&&(O?this.pattern="editable":this.pattern="readPretty")}get readOnly(){return this.pattern==="readOnly"}set readOnly(O){(0,u.isValid)(O)&&(O?this.pattern="readOnly":this.pattern="editable")}get disabled(){return this.pattern==="disabled"}set disabled(O){(0,u.isValid)(O)&&(O?this.pattern="disabled":this.pattern="editable")}get readPretty(){return this.pattern==="readPretty"}set readPretty(O){(0,u.isValid)(O)&&(O?this.pattern="readPretty":this.pattern="editable")}};r(P,"Form");let S=P;return _o}var Ha;function xo(){return Ha||(Ha=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Sa(),e.exports),v(_,ga(),e.exports),v(_,Ca(),e.exports),v(_,po(),e.exports),v(_,bl(),e.exports),v(_,_t(),e.exports),v(_,ka(),e.exports),v(_,Ba(),e.exports),v(_,Ua(),e.exports)}(ro)),ro.exports}var go,za;function Ja(){if(za)return go;za=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{FormPath:()=>n.FormPath,createEffectContext:()=>a.createEffectContext,createEffectHook:()=>a.createEffectHook,createForm:()=>l,getLocaleByPath:()=>u.getLocaleByPath,getValidateLocaleIOSCode:()=>u.getValidateLocaleIOSCode,isArrayField:()=>s.isArrayField,isArrayFieldState:()=>s.isArrayFieldState,isDataField:()=>s.isDataField,isDataFieldState:()=>s.isDataFieldState,isField:()=>s.isField,isFieldState:()=>s.isFieldState,isForm:()=>s.isForm,isFormState:()=>s.isFormState,isGeneralField:()=>s.isGeneralField,isGeneralFieldState:()=>s.isGeneralFieldState,isObjectField:()=>s.isObjectField,isObjectFieldState:()=>s.isObjectFieldState,isQuery:()=>s.isQuery,isVoidField:()=>s.isVoidField,isVoidFieldState:()=>s.isVoidFieldState,registerValidateFormats:()=>u.registerValidateFormats,registerValidateLocale:()=>u.registerValidateLocale,registerValidateMessageTemplateEngine:()=>u.registerValidateMessageTemplateEngine,registerValidateRules:()=>u.registerValidateRules,setValidateLanguage:()=>u.setValidateLanguage,useEffectForm:()=>a.useEffectForm}),go=F(_);var n=le(),u=to(),h=xo(),s=vt(),a=yt();const l=r(i=>new h.Form(i),"createForm");return go}var Fo,Wa;function vl(){if(Wa)return Fo;Wa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(F,_,n,u)=>{if(_&&typeof _=="object"||typeof _=="function")for(let h of o(_))!f.call(F,h)&&h!==n&&e(F,h,{get:()=>_[h],enumerable:!(u=t(_,h))||u.enumerable});return F},b=F=>r(e({},"__esModule",{value:!0}),F),v={};return Fo=b(v),Fo}var So={exports:{}},Po,Ya;function yl(){if(Ya)return Po;Ya=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(ae,z)=>e(ae,"name",{value:z,configurable:!0}),b=(ae,z)=>{for(var B in z)e(ae,B,{get:z[B],enumerable:!0})},v=(ae,z,B,U)=>{if(z&&typeof z=="object"||typeof z=="function")for(let J of o(z))!f.call(ae,J)&&J!==B&&e(ae,J,{get:()=>z[J],enumerable:!(U=t(z,J))||U.enumerable});return ae},F=ae=>v(e({},"__esModule",{value:!0}),ae),_={};b(_,{onFormGraphChange:()=>te,onFormInit:()=>l,onFormInitialValuesChange:()=>d,onFormInputChange:()=>y,onFormLoading:()=>Y,onFormMount:()=>i,onFormReact:()=>re,onFormReset:()=>g,onFormSubmit:()=>m,onFormSubmitEnd:()=>P,onFormSubmitFailed:()=>j,onFormSubmitStart:()=>x,onFormSubmitSuccess:()=>S,onFormSubmitValidateEnd:()=>E,onFormSubmitValidateFailed:()=>I,onFormSubmitValidateStart:()=>O,onFormSubmitValidateSuccess:()=>w,onFormUnmount:()=>c,onFormValidateEnd:()=>K,onFormValidateFailed:()=>L,onFormValidateStart:()=>R,onFormValidateSuccess:()=>N,onFormValuesChange:()=>p}),Po=F(_);var n=Pe(),u=le(),h=yt(),s=qe();function a(ae){return(0,h.createEffectHook)(ae,z=>B=>{(0,n.batch)(()=>{B(z)})})}r(a,"createFormEffect");const l=a(s.LifeCycleTypes.ON_FORM_INIT),i=a(s.LifeCycleTypes.ON_FORM_MOUNT),c=a(s.LifeCycleTypes.ON_FORM_UNMOUNT),p=a(s.LifeCycleTypes.ON_FORM_VALUES_CHANGE),d=a(s.LifeCycleTypes.ON_FORM_INITIAL_VALUES_CHANGE),y=a(s.LifeCycleTypes.ON_FORM_INPUT_CHANGE),m=a(s.LifeCycleTypes.ON_FORM_SUBMIT),g=a(s.LifeCycleTypes.ON_FORM_RESET),x=a(s.LifeCycleTypes.ON_FORM_SUBMIT_START),P=a(s.LifeCycleTypes.ON_FORM_SUBMIT_END),S=a(s.LifeCycleTypes.ON_FORM_SUBMIT_SUCCESS),j=a(s.LifeCycleTypes.ON_FORM_SUBMIT_FAILED),O=a(s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_START),w=a(s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_SUCCESS),I=a(s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_FAILED),E=a(s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_END),R=a(s.LifeCycleTypes.ON_FORM_VALIDATE_START),N=a(s.LifeCycleTypes.ON_FORM_VALIDATE_SUCCESS),L=a(s.LifeCycleTypes.ON_FORM_VALIDATE_FAILED),K=a(s.LifeCycleTypes.ON_FORM_VALIDATE_END),te=a(s.LifeCycleTypes.ON_FORM_GRAPH_CHANGE),Y=a(s.LifeCycleTypes.ON_FORM_LOADING);function re(ae){let z=null;l(B=>{z=(0,n.autorun)(()=>{(0,u.isFn)(ae)&&ae(B)})}),c(()=>{z()})}return r(re,"onFormReact"),Po}var Oo,qa;function _l(){if(qa)return Oo;qa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(B,U)=>e(B,"name",{value:U,configurable:!0}),b=(B,U)=>{for(var J in U)e(B,J,{get:U[J],enumerable:!0})},v=(B,U,J,Q)=>{if(U&&typeof U=="object"||typeof U=="function")for(let ee of o(U))!f.call(B,ee)&&ee!==J&&e(B,ee,{get:()=>U[ee],enumerable:!(Q=t(U,ee))||Q.enumerable});return B},F=B=>v(e({},"__esModule",{value:!0}),B),_={};b(_,{onFieldChange:()=>z,onFieldInit:()=>re,onFieldInitialValueChange:()=>d,onFieldInputValueChange:()=>y,onFieldLoading:()=>Y,onFieldMount:()=>i,onFieldReact:()=>ae,onFieldReset:()=>te,onFieldSubmit:()=>j,onFieldSubmitEnd:()=>w,onFieldSubmitFailed:()=>N,onFieldSubmitStart:()=>O,onFieldSubmitSuccess:()=>R,onFieldSubmitValidateEnd:()=>E,onFieldSubmitValidateFailed:()=>K,onFieldSubmitValidateStart:()=>I,onFieldSubmitValidateSuccess:()=>L,onFieldUnmount:()=>c,onFieldValidateEnd:()=>g,onFieldValidateFailed:()=>P,onFieldValidateStart:()=>m,onFieldValidateSuccess:()=>S,onFieldValidating:()=>x,onFieldValueChange:()=>p}),Oo=F(_);var n=Pe(),u=le(),h=yt(),s=qe();function a(B){return(0,h.createEffectHook)(B,(U,J)=>(Q,ee)=>{u.FormPath.parse(Q).matchAliasGroup(U.address,U.path)&&(0,n.batch)(()=>{ee(U,J)})})}r(a,"createFieldEffect");const l=a(s.LifeCycleTypes.ON_FIELD_INIT),i=a(s.LifeCycleTypes.ON_FIELD_MOUNT),c=a(s.LifeCycleTypes.ON_FIELD_UNMOUNT),p=a(s.LifeCycleTypes.ON_FIELD_VALUE_CHANGE),d=a(s.LifeCycleTypes.ON_FIELD_INITIAL_VALUE_CHANGE),y=a(s.LifeCycleTypes.ON_FIELD_INPUT_VALUE_CHANGE),m=a(s.LifeCycleTypes.ON_FIELD_VALIDATE_START),g=a(s.LifeCycleTypes.ON_FIELD_VALIDATE_END),x=a(s.LifeCycleTypes.ON_FIELD_VALIDATING),P=a(s.LifeCycleTypes.ON_FIELD_VALIDATE_FAILED),S=a(s.LifeCycleTypes.ON_FIELD_VALIDATE_SUCCESS),j=a(s.LifeCycleTypes.ON_FIELD_SUBMIT),O=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_START),w=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_END),I=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_START),E=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_END),R=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_SUCCESS),N=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_FAILED),L=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_SUCCESS),K=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_FAILED),te=a(s.LifeCycleTypes.ON_FIELD_RESET),Y=a(s.LifeCycleTypes.ON_FIELD_LOADING);function re(B,U){const J=(0,h.useEffectForm)();J.query(B).reduce((ee,ne)=>(U(ne,J),ee+1),0)===0&&l(B,U)}r(re,"onFieldInit");function ae(B,U){re(B,(J,Q)=>{J.disposers.push((0,n.autorun)(()=>{(0,u.isFn)(U)&&U(J,Q)}))})}r(ae,"onFieldReact");function z(B,U,J){(0,u.isFn)(U)?(J=U,U=["value"]):U=U||["value"],re(B,(Q,ee)=>{(0,u.isFn)(J)&&J(Q,ee);const ne=(0,n.reaction)(()=>(0,u.toArr)(U).map(pe=>Q[pe]),()=>{(0,u.isFn)(J)&&J(Q,ee)});Q.disposers.push(ne)})}return r(z,"onFieldChange"),Oo}var Ka;function xl(){return Ka||(Ka=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,yl(),e.exports),v(_,_l(),e.exports)}(So)),So.exports}var Za;function xt(){return Za||(Za=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Ja(),e.exports),v(_,vl(),e.exports),v(_,xl(),e.exports),v(_,qe(),e.exports)}(Jr)),Jr.exports}var Co,Qa;function gl(){if(Qa)return Co;Qa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(x,P)=>e(x,"name",{value:P,configurable:!0}),b=(x,P)=>{for(var S in P)e(x,S,{get:P[S],enumerable:!0})},v=(x,P,S,j)=>{if(P&&typeof P=="object"||typeof P=="function")for(let O of o(P))!f.call(x,O)&&O!==S&&e(x,O,{get:()=>P[O],enumerable:!(j=t(P,O))||j.enumerable});return x},F=x=>v(e({},"__esModule",{value:!0}),x),_={};b(_,{transformFieldProps:()=>g}),Co=F(_);var n=xt(),u=Pe(),h=le(),s=na();const a={onFieldInit:n.onFieldInit,onFieldMount:n.onFieldMount,onFieldUnmount:n.onFieldUnmount,onFieldValueChange:n.onFieldValueChange,onFieldInputValueChange:n.onFieldInputValueChange,onFieldInitialValueChange:n.onFieldInitialValueChange,onFieldValidateStart:n.onFieldValidateStart,onFieldValidateEnd:n.onFieldValidateEnd,onFieldValidateFailed:n.onFieldValidateFailed,onFieldValidateSuccess:n.onFieldValidateSuccess},l=["onFieldInit","onFieldValueChange"],i=r((x,P,S)=>{const[j,O]=String(P).split(/\s*#\s*/);return x.query(j).getIn(O||S||"value")},"getDependencyValue"),c=r((x,P)=>{if((0,h.isArr)(P)){const S=[];return P.forEach(j=>{(0,h.isStr)(j)?S.push(i(x,j)):(0,h.isPlainObj)(j)&&j.name&&j.source&&(S[j.name]=i(x,j.source,j.property))}),S}else if((0,h.isPlainObj)(P))return(0,h.reduce)(P,(S,j,O)=>(S[O]=i(x,j),S),{});return[]},"getDependencies"),p=r((x,P=!1)=>{const{request:S,target:j,runner:O,field:w,scope:I}=x||{};S&&(j?(S.state&&w.form.setFieldState(j,E=>(0,s.patchCompile)(E,S.state,(0,h.lazyMerge)(I,{$target:E}))),S.schema&&w.form.setFieldState(j,E=>(0,s.patchSchemaCompile)(E,S.schema,(0,h.lazyMerge)(I,{$target:E}),P)),(0,h.isStr)(O)&&O&&w.form.setFieldState(j,E=>{(0,s.shallowCompile)(`{{function(){${O}}}}`,(0,h.lazyMerge)(I,{$target:E}))()})):(S.state&&w.setState(E=>(0,s.patchCompile)(E,S.state,I)),S.schema&&w.setState(E=>(0,s.patchSchemaCompile)(E,S.schema,I,P)),(0,h.isStr)(O)&&O&&(0,s.shallowCompile)(`{{function(){${O}}}}`,I)()))},"setSchemaFieldState"),d=r((x,P={})=>{const S=r((N,L)=>u.autorun.memo(()=>(0,u.observable)(N),L),"$observable"),j=r(N=>x.setComponentProps(N),"$props"),O=u.autorun.effect,w=u.autorun.memo,I=x,E=x.form,R=x.form.values;return(0,h.lazyMerge)({get $lookup(){var L;var N;return(L=(N=P==null?void 0:P.scope)==null?void 0:N.$record)!=null?L:R},get $records(){return x.records},get $record(){const N=x.record;return typeof N=="object"?(0,h.lazyMerge)(N,{get $lookup(){var K;var L;return(K=(L=P==null?void 0:P.scope)==null?void 0:L.$record)!=null?K:R},get $index(){return x.index}}):N},get $index(){return x.index}},P.scope,{$form:E,$self:I,$observable:S,$effect:O,$memo:w,$props:j,$values:R})},"getBaseScope"),y=r((x,P)=>S=>{p({field:S,request:{schema:x},scope:d(S,P)},!0)},"getBaseReactions"),m=r((x,P)=>(0,h.toArr)(x["x-reactions"]).map(j=>O=>{const w=d(O,P),I=(0,s.shallowCompile)(j,w);if(!I)return;if((0,h.isFn)(I))return I(O,w);const{when:E,fulfill:R,otherwise:N,target:L,effects:K}=I,te=r(()=>{const Y=c(O,I.dependencies),re=Y,ae=(0,h.lazyMerge)(w,{$target:null,$deps:Y,$dependencies:re}),z=(0,s.shallowCompile)(E,ae),U=(E?z:!0)?R:N,J=U==null?void 0:U.run;p({field:O,target:L,request:U,runner:J,scope:ae})},"run");L&&(I.effects=K!=null&&K.length?K:l),I.effects?u.autorun.memo(()=>{(0,u.untracked)(()=>{(0,h.each)(I.effects,Y=>{a[Y]&&a[Y](O.address,te)})})},[]):te()}),"getUserReactions"),g=r((x,P)=>({name:x.name,reactions:[y(x,P)].concat(m(x,P))}),"transformFieldProps");return Co}var wo,Xa;function $a(){if(Xa)return wo;Xa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(p,d)=>e(p,"name",{value:d,configurable:!0}),b=(p,d)=>{for(var y in d)e(p,y,{get:d[y],enumerable:!0})},v=(p,d,y,m)=>{if(d&&typeof d=="object"||typeof d=="function")for(let g of o(d))!f.call(p,g)&&g!==y&&e(p,g,{get:()=>d[g],enumerable:!(m=t(d,g))||m.enumerable});return p},F=p=>v(e({},"__esModule",{value:!0}),p),_={};b(_,{Schema:()=>c}),wo=F(_);var n=le(),u=na(),h=aa(),s=ll(),a=ra(),l=gl();const i=class je{constructor(d,y){return this._isJSONSchemaObject=!0,this.version="2.0",this.addProperty=r((m,g)=>(this.properties=this.properties||{},this.properties[m]=new je(g,this),this.properties[m].name=m,this.properties[m]),"addProperty"),this.removeProperty=r(m=>{const g=this.properties[m];return delete this.properties[m],g},"removeProperty"),this.setProperties=r(m=>{for(const g in m)this.addProperty(g,m[g]);return this},"setProperties"),this.addPatternProperty=r((m,g)=>{if(g)return this.patternProperties=this.patternProperties||{},this.patternProperties[m]=new je(g,this),this.patternProperties[m].name=m,this.patternProperties[m]},"addPatternProperty"),this.removePatternProperty=r(m=>{const g=this.patternProperties[m];return delete this.patternProperties[m],g},"removePatternProperty"),this.setPatternProperties=r(m=>{if(!m)return this;for(const g in m)this.addPatternProperty(g,m[g]);return this},"setPatternProperties"),this.setAdditionalProperties=r(m=>{if(m)return this.additionalProperties=new je(m),this.additionalProperties},"setAdditionalProperties"),this.setItems=r(m=>{if(m)return Array.isArray(m)?this.items=m.map(g=>new je(g,this)):this.items=new je(m,this),this.items},"setItems"),this.setAdditionalItems=r(m=>{if(m)return this.additionalItems=new je(m,this),this.additionalItems},"setAdditionalItems"),this.findDefinitions=r(m=>{if(!(!m||!this.root||!(0,n.isStr)(m))&&m.indexOf("#/")===0)return n.FormPath.getIn(this.root,m.substring(2).split("/"))},"findDefinitions"),this.mapProperties=r(m=>je.getOrderProperties(this).map(({schema:g,key:x},P)=>m(g,x,P)),"mapProperties"),this.mapPatternProperties=r(m=>je.getOrderProperties(this,"patternProperties").map(({schema:g,key:x},P)=>m(g,x,P)),"mapPatternProperties"),this.reduceProperties=r((m,g)=>{let x=g;return je.getOrderProperties(this,"properties").forEach(({schema:P,key:S},j)=>{x=m(x,P,S,j)}),x},"reduceProperties"),this.reducePatternProperties=r((m,g)=>{let x=g;return je.getOrderProperties(this,"patternProperties").forEach(({schema:P,key:S},j)=>{x=m(x,P,S,j)}),x},"reducePatternProperties"),this.compile=r(m=>{const g=new je({},this.parent);return(0,n.each)(this,(x,P)=>{(0,n.isFn)(x)&&!P.includes("x-")||P==="parent"||P==="root"||(a.SchemaNestedMap[P]?g[P]=x&&(0,u.shallowCompile)(x,m):g[P]=x&&(0,u.compile)(x,m))}),g},"compile"),this.fromJSON=r(m=>m?je.isSchemaInstance(m)?m:((0,n.each)((0,h.reducePatches)(m),(g,x)=>{(0,n.isFn)(g)&&!x.includes("x-")||(x==="properties"?this.setProperties(g):x==="patternProperties"?this.setPatternProperties(g):x==="additionalProperties"?this.setAdditionalProperties(g):x==="items"?this.setItems(g):x==="additionalItems"?this.setAdditionalItems(g):x==="$ref"?this.fromJSON(this.findDefinitions(g)):this[x]=g)}),this):this,"fromJSON"),this.toJSON=r((m=!0)=>{const g={};return(0,n.each)(this,(x,P)=>{var S,j;if(!((0,n.isFn)(x)&&!P.includes("x-")||P==="parent"||P==="root"))if(P==="properties"||P==="patternProperties"){if(!m)return;g[P]=(0,n.map)(x,O=>{var w;return(w=O==null?void 0:O.toJSON)==null?void 0:w.call(O)})}else if(P==="additionalProperties"||P==="additionalItems"){if(!m)return;g[P]=(S=x==null?void 0:x.toJSON)==null?void 0:S.call(x)}else if(P==="items"){if(!m)return;Array.isArray(x)?g[P]=x.map(O=>{var w;return(w=O==null?void 0:O.toJSON)==null?void 0:w.call(O)}):g[P]=(j=x==null?void 0:x.toJSON)==null?void 0:j.call(x)}else g[P]=x}),g},"toJSON"),this.toFieldProps=r(m=>(0,l.transformFieldProps)(this,m),"toFieldProps"),y?(this.parent=y,this.root=y.root):this.root=this,this.fromJSON(d)}};r(i,"Schema"),i.getOrderProperties=r((p={},d="properties")=>{const y=[],m=[];for(const g in p[d]){const x=p[d][g],P=x["x-index"];isNaN(P)?m.push({schema:x,key:g}):y[P]={schema:x,key:g}}return y.concat(m).filter(g=>!!g)},"getOrderProperties"),i.compile=r((p,d)=>(0,u.compile)(p,d),"compile"),i.shallowCompile=r((p,d)=>(0,u.shallowCompile)(p,d),"shallowCompile"),i.isSchemaInstance=r(p=>(0,n.instOf)(p,i),"isSchemaInstance"),i.registerCompiler=u.registerCompiler,i.registerPatches=h.registerPatches,i.registerVoidComponents=s.registerVoidComponents,i.registerTypeDefaultComponents=s.registerTypeDefaultComponents,i.registerPolyfills=h.registerPolyfills,i.enablePolyfills=h.enablePolyfills,i.silent=u.silent;let c=i;return wo}var Eo,ei;function Fl(){if(ei)return Eo;ei=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(F,_,n,u)=>{if(_&&typeof _=="object"||typeof _=="function")for(let h of o(_))!f.call(F,h)&&h!==n&&e(F,h,{get:()=>_[h],enumerable:!(u=t(_,h))||u.enumerable});return F},b=F=>r(e({},"__esModule",{value:!0}),F),v={};return Eo=b(v),Eo}var ti;function jo(){return ti||(ti=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,$a(),e.exports),v(_,Fl(),e.exports)}(Tt)),Tt.exports}var Io={exports:{}},Ao={exports:{}},Do={exports:{}},de={};/** @license React v16.13.1
69
+ `})),Rt=V.createContext({});Rt.displayName="EditableGridRowContext";const Un=V.createContext({});Un.displayName="EditableGridColContext";const Nt=V.createContext({});Nt.displayName="EditableGridContext";const Gn=e=>e["x-component"]==="EditableGrid",Hn=e=>e["x-component"]==="EditableGrid.Row",zn=V.memo(A.RecursionField);zn.displayName="MemorizedRecursionField";const Jn=e=>{var g,x,P;const{token:t}=C.useToken(),o=V.useRef(null),{cx:f}=nt(),{isOver:r,setNodeRef:b}=ge.useDroppable({id:e.id,data:e.data}),{designable:v}=C.useDesignable(),F=V.useRef(),_=V.useMemo(()=>r?{backgroundColor:new ve(t.colorSettings).setAlpha(.1).toHex8String()}:{},[r]),c=(P=(x=(g=ge.useDndContext().active)==null?void 0:g.data.current)==null?void 0:x.schema)==null?void 0:P.parent,h=c?Object.keys(c.properties).length:0;let s=!0;if(h===1)if(e.first)s=c!==e.cols[0];else{const S=e.cols[e.index],j=e.cols[e.index+1];s=c!==S&&j!==c}const a=e.cols[e.index],u=e.cols[e.index+1],{attributes:i,listeners:l,setNodeRef:p,isDragging:d}=ge.useDraggable({disabled:e.first||e.last||!v,id:e.id,data:{dividerRef:F,prevSchema:a,nextSchema:u}}),[y,m]=V.useState([0,0]);return ge.useDndMonitor({onDragStart(S){var I;if(((I=S.active.data.current.dividerRef)==null?void 0:I.current)!==F.current)return;o.current=S.active.id;const j=F.current,O=j.previousElementSibling,w=j.nextElementSibling;m([O.clientWidth,w.clientWidth])},onDragMove(S){if(!d)return;o.current===S.active.id&&(o.current=o.current+"_move");const j=F.current,O=j.previousElementSibling,w=j.nextElementSibling;O.style.width=`${y[0]+S.delta.x}px`,w.style.width=`${y[1]-S.delta.x}px`},onDragEnd(S){var N;if(!o.current||(N=o.current)!=null&&N.startsWith(S.active.id)&&!o.current.endsWith("_move")||y[0]<=0||y[1]<=0||(m([0,0]),!a||!u))return;const j=F.current,O=j.previousElementSibling,w=j.nextElementSibling;a["x-component-props"]=a["x-component-props"]||{},u["x-component-props"]=u["x-component-props"]||{};const I=j.clientWidth*(e.cols.length+1)/e.cols.length,E=(100*(O.getBoundingClientRect().width+I)/j.parentElement.clientWidth).toFixed(2),R=(100*(w.getBoundingClientRect().width+I)/j.parentElement.clientWidth).toFixed(2);se.set(a,"x-component-props.width",E),se.set(u,"x-component-props.width",R)}}),D.jsx("div",{ref:S=>{s&&(b(S),F.current=S)},className:f("tb-col-divider","ColDivider"),style:_,children:D.jsx("div",W(T(T({ref:p},l),i),{tabIndex:-1,className:e.first||e.last||!v?null:"DraggableNode"}))})},Wn=e=>{var a,u,i;const{token:t}=C.useToken(),{isOver:o,setNodeRef:f}=ge.useDroppable({id:e.id,data:e.data}),{cx:r}=nt(),[b,v]=V.useState(!1),F=V.useMemo(()=>o?{zIndex:b?1e3:-1,backgroundColor:new ve(t.colorSettings).setAlpha(.1).toHex8String()}:{zIndex:b?1e3:-1},[b,o]),_=ge.useDndContext(),n=e.rows[e.index],c=(i=(u=(a=_.active)==null?void 0:a.data.current)==null?void 0:u.schema)==null?void 0:i.parent.parent,h=c==null?void 0:c.mapProperties(l=>l["x-component"]==="EditableGrid.Col").filter(Boolean).length;let s=!0;if(h===1)if(e.first)s=c!==e.rows[0];else{const l=e.rows[e.index+1];s=c!==n&&l!==c}return ge.useDndMonitor({onDragStart(l){v(!0)},onDragMove(l){},onDragOver(l){},onDragEnd(l){v(!1)},onDragCancel(l){v(!1)}}),D.jsx("span",{ref:s?f:null,className:r("tb-row-divider","RowDivider"),style:F})},Yn=e=>{const t=new A.Schema({type:"void",name:`row_${A.uid()}`,"x-uid":A.uid(),"x-component":"EditableGrid.Row"}),o=t.addProperty(A.uid(),{type:"void","x-uid":A.uid(),"x-component":"EditableGrid.Col"});return A.Schema.isSchemaInstance(e)&&(e.parent=o),o.addProperty(e.name,e),t},qn=e=>{const t=new A.Schema({type:"void",name:`col_${A.uid()}`,"x-uid":A.uid(),"x-component":"EditableGrid.Col"});return A.Schema.isSchemaInstance(e)&&(e.parent=t),t.addProperty(e.name,e),t},ml=()=>{const e=A.useFieldSchema();return V.useMemo(()=>e.reduceProperties((t,o)=>(o["x-component"]==="EditableGrid.Row"&&!o["x-hidden"]&&t.push(o),t),[]),[Object.keys(e.properties||{}).join(",")])},fl=()=>{const e=A.useFieldSchema();return V.useMemo(()=>e.reduceProperties((t,o)=>(o["x-component"]==="EditableGrid.Col"&&!o["x-hidden"]&&t.push(o),t),[]),[Object.keys(e.properties||{}).join(",")])},hl=e=>e.dndContext===!1?D.jsx(D.Fragment,{children:e.children}):D.jsx(dl,W(T({},e.dndContext),{children:e.children})),Kn=()=>V.useContext(Nt),$e=A.observer(e=>{const{distributed:t,showDivider:o=!0}=e,f=V.useRef(null),r=A.useField(),b=A.useFieldSchema(),{render:v}=C.useSchemaInitializerRender(b["x-initializer"],b["x-initializer-props"]),F=u=>v(u),_=r.address.toString(),n=ml(),{setPrintContent:c}=C.useFormBlockContext(),{styles:h,cx:s}=nt(),a=t===void 0?(b==null?void 0:b.parent["x-component"])==="Page"||(b==null?void 0:b.parent["x-component"])==="Tabs.TabPane":t;return V.useEffect(()=>{f.current&&(c==null||c(f.current))},[f.current]),D.jsx(Nt.Provider,{value:{ref:f,fieldSchema:b,renderSchemaInitializer:v,InitializerComponent:F,showDivider:o},children:D.jsxs("div",{className:s("tb-grid",h.editableGrid),style:{position:"relative"},ref:f,children:[D.jsxs(hl,{dndContext:e.dndContext,children:[o?D.jsx(Wn,{rows:n,first:!0,id:`${_}_0`,data:{breakRemoveOn:Gn,wrapSchema:Yn,insertAdjacent:"afterBegin",schema:b}}):null,n.map((u,i)=>D.jsxs(V.Fragment,{children:[a?D.jsx(C.SchemaComponent,{name:u.name,schema:u,distributed:!0}):D.jsx(zn,{name:u.name,schema:u}),o?D.jsx(Wn,{rows:n,index:i,id:`${_}_${i+1}`,data:{breakRemoveOn:Gn,wrapSchema:Yn,insertAdjacent:"afterEnd",schema:u}}):null]},i))]}),v()]})})},{displayName:"EditableGrid"});$e.Row=A.observer(()=>{const e=A.useField(),t=A.useFieldSchema(),o=e.address.toString(),f=fl(),{showDivider:r}=Kn(),{type:b}=C.useFormBlockType(),{cx:v}=nt();return D.jsx(Rt.Provider,{value:{schema:t,cols:f},children:D.jsxs("div",{className:v("tb-grid-row","CardRow",{showDivider:r}),children:[r&&D.jsx(Jn,{cols:f,first:!0,id:`${o}_0`,data:{breakRemoveOn:Hn,wrapSchema:qn,insertAdjacent:"afterBegin",schema:t}}),f.map((F,_)=>D.jsxs(V.Fragment,{children:[D.jsx(A.RecursionField,{name:F.name,schema:F,mapProperties:n=>(b==="update"&&(n.default=null),n)}),r&&D.jsx(Jn,{cols:f,index:_,last:_===f.length-1,id:`${o}_${_+1}`,data:{breakRemoveOn:Hn,wrapSchema:qn,insertAdjacent:"afterEnd",schema:F}})]},_))]})})},{displayName:"EditableGrid.Row"}),$e.Col=A.observer(e=>{var a;const{cols:t=[]}=V.useContext(Rt),{showDivider:o}=Kn(),f=A.useFieldSchema(),r=A.useField(),{token:b}=C.useToken(),{cx:v}=nt(),F=V.useMemo(()=>{var i;let u="";return t!=null&&t.length&&(u=`calc(${((i=f==null?void 0:f["x-component-props"])==null?void 0:i.width)||100/t.length}% - ${b.marginLG}px * ${(o?t.length+1:0)/t.length})`),{width:u}},[t==null?void 0:t.length,(a=f==null?void 0:f["x-component-props"])==null?void 0:a.width]),{isOver:_,setNodeRef:n}=ge.useDroppable({id:r.address.toString(),data:{insertAdjacent:"beforeEnd",schema:f,wrapSchema:u=>u}}),[c,h]=V.useState(!1),s=V.useMemo(()=>_?{background:`linear-gradient(to top, ${new ve(b.colorSettings).setAlpha(.1).toHex8String()} 20%, transparent 20%)`,borderTopRightRadius:"10px",borderTopLeftRadius:"10px",height:"100%"}:{height:"100%"},[c,_]);return ge.useDndMonitor({onDragStart(u){h(!0)},onDragMove(u){},onDragOver(u){},onDragEnd(u){h(!1)},onDragCancel(u){h(!1)}}),D.jsx(Un.Provider,{value:{cols:t,schema:f},children:D.jsx("div",{ref:n,style:T(T({},F),s),className:v("tb-grid-col","CardCol"),children:e.children})})},{displayName:"EditableGrid.Col"}),$e.wrap=e=>({type:"void","x-component":"EditableGrid.Row",properties:{[A.uid()]:{type:"void","x-component":"EditableGrid.Col",properties:{[e.name||A.uid()]:e}}}});const bl=A.observer(({schema:e})=>{const t=C.findSchemaUtils(e,"x-component","EditableGrid")||{},{Content:o}=oe.Layout,{refreshKey:f}=It(),r=!t.properties;return D.jsx(o,{style:{padding:"5px",overflow:"auto"},children:r?D.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",paddingBottom:"10%"},children:D.jsx(C.Icon,{type:"add-fields",style:{width:"200px",height:"100%"}})}):D.jsx(C.SchemaComponent,{schema:e,components:{EditableGrid:$e}})},f)});var bt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function st(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var o=function f(){var r=!1;try{r=this instanceof f}catch(b){}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(f){var r=Object.getOwnPropertyDescriptor(e,f);Object.defineProperty(o,f,r.get?r:{enumerable:!0,get:function(){return e[f]}})}),o}var kt={exports:{}},Tt={exports:{}},Vt={exports:{}},Bt,Zn;function Le(){if(Zn)return Bt;Zn=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(w,I)=>e(w,"name",{value:I,configurable:!0}),b=(w,I)=>{for(var E in I)e(w,E,{get:I[E],enumerable:!0})},v=(w,I,E,R)=>{if(I&&typeof I=="object"||typeof I=="function")for(let N of o(I))!f.call(w,N)&&N!==E&&e(w,N,{get:()=>I[N],enumerable:!(R=t(I,N))||R.enumerable});return w},F=w=>v(e({},"__esModule",{value:!0}),w),_={};b(_,{getType:()=>h,isArr:()=>a,isBool:()=>l,isFn:()=>s,isHTMLElement:()=>O,isMap:()=>d,isNum:()=>p,isNumberLike:()=>x,isObj:()=>P,isPlainObj:()=>u,isReactElement:()=>j,isRegExp:()=>S,isSet:()=>y,isStr:()=>i,isWeakMap:()=>m,isWeakSet:()=>g}),Bt=F(_);const n=Object.prototype.toString,c=r(w=>I=>h(I)===`[object ${w}]`,"isType"),h=r(w=>n.call(w),"getType"),s=r(w=>typeof w=="function","isFn"),a=Array.isArray,u=c("Object"),i=c("String"),l=c("Boolean"),p=c("Number"),d=r(w=>w&&w instanceof Map,"isMap"),y=r(w=>w&&w instanceof Set,"isSet"),m=r(w=>w&&w instanceof WeakMap,"isWeakMap"),g=r(w=>w&&w instanceof WeakSet,"isWeakSet"),x=r(w=>p(w)||/^\d+$/.test(w),"isNumberLike"),P=r(w=>typeof w=="object","isObj"),S=c("RegExp"),j=r(w=>w&&w.$$typeof&&w._owner,"isReactElement"),O=r(w=>Object.prototype.toString.call(w).indexOf("HTML")>-1,"isHTMLElement");return Bt}var Lt,Qn;function Ut(){if(Qn)return Lt;Qn=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>e(m,"name",{value:g,configurable:!0}),b=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},v=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},F=m=>v(e({},"__esModule",{value:!0}),m),_={};b(_,{each:()=>h,every:()=>u,find:()=>p,findIndex:()=>l,includes:()=>d,map:()=>s,move:()=>y,reduce:()=>a,some:()=>i,toArr:()=>c}),Lt=F(_);var n=Le();const c=r(m=>(0,n.isArr)(m)?m:m?[m]:[],"toArr");function h(m,g,x){if((0,n.isArr)(m)||(0,n.isStr)(m)){if(x){for(let P=m.length-1;P>=0;P--)if(g(m[P],P)===!1)return}else for(let P=0;P<m.length;P++)if(g(m[P],P)===!1)return}else if((0,n.isObj)(m)){let P;for(P in m)if(Object.hasOwnProperty.call(m,P)&&g(m[P],P)===!1)return}}r(h,"each");function s(m,g,x){const P=(0,n.isArr)(m)||(0,n.isStr)(m)?[]:{};return h(m,(S,j)=>{const O=g(S,j);(0,n.isArr)(P)?P.push(O):P[j]=O},x),P}r(s,"map");function a(m,g,x,P){let S=x;return h(m,(j,O)=>{S=g(S,j,O)},P),S}r(a,"reduce");function u(m,g,x){let P=!0;return h(m,(S,j)=>{if(!g(S,j))return P=!1,!1},x),P}r(u,"every");function i(m,g,x){let P=!1;return h(m,(S,j)=>{if(g(S,j))return P=!0,!1},x),P}r(i,"some");function l(m,g,x){let P=-1;return h(m,(S,j)=>{if(g(S,j))return P=j,!1},x),P}r(l,"findIndex");function p(m,g,x){let P;return h(m,(S,j)=>{if(g(S,j))return P=S,!1},x),P}r(p,"find");function d(m,g,x){return(0,n.isStr)(m)?m.includes(g):i(m,P=>P===g,x)}r(d,"includes");function y(m,g,x){if(g===x||x<0||g<0||x>m.length-1||g>m.length-1)return m;if(g<x){const P=m[g];for(let S=g;S<x;S++)m[S]=m[S+1];m[x]=P}else{const P=m[g];for(let S=g;S>x;S--)m[S]=m[S-1];m[x]=P}return m}return r(y,"move"),Lt}var Gt,Xn;function $n(){if(Xn)return Gt;Xn=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(h,s)=>e(h,"name",{value:s,configurable:!0}),b=(h,s)=>{for(var a in s)e(h,a,{get:s[a],enumerable:!0})},v=(h,s,a,u)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of o(s))!f.call(h,i)&&i!==a&&e(h,i,{get:()=>s[i],enumerable:!(u=t(s,i))||u.enumerable});return h},F=h=>v(e({},"__esModule",{value:!0}),h),_={};b(_,{globalThisPolyfill:()=>c}),Gt=F(_);function n(){try{if(typeof self!="undefined")return self}catch(h){}try{if(typeof window!="undefined")return window}catch(h){}try{if(typeof bt!="undefined")return bt}catch(h){}return Function("return this")()}r(n,"globalSelf");const c=n();return Gt}var Ht,es;function zt(){if(es)return Ht;es=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{instOf:()=>h}),Ht=F(_);var n=Le(),c=$n();const h=r((s,a)=>(0,n.isFn)(a)?s instanceof a:(0,n.isStr)(a)&&c.globalThisPolyfill[a]?s instanceof c.globalThisPolyfill[a]:!1,"instOf");return Ht}var Jt,ts;function vl(){if(ts)return Jt;ts=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,p)=>e(l,"name",{value:p,configurable:!0}),b=(l,p)=>{for(var d in p)e(l,d,{get:p[d],enumerable:!0})},v=(l,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of o(p))!f.call(l,m)&&m!==d&&e(l,m,{get:()=>p[m],enumerable:!(y=t(p,m))||y.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{isEqual:()=>i}),Jt=F(_);var n=Le(),c=zt();const h=n.isArr,s=Object.keys,a=Object.prototype.hasOwnProperty;function u(l,p){if(l===p)return!0;if(l&&p&&typeof l=="object"&&typeof p=="object"){const d=h(l),y=h(p);let m,g,x;if(d&&y){if(g=l.length,g!==p.length)return!1;for(m=g;m--!==0;)if(!u(l[m],p[m]))return!1;return!0}if(d!==y)return!1;const P=l&&l._isAMomentObject,S=p&&p._isAMomentObject;if(P!==S)return!1;if(P&&S)return l.isSame(p);const j=l&&l.toJS,O=p&&p.toJS;if(j!==O)return!1;if(j)return l.is?l.is(p):l===p;const w=(0,c.instOf)(l,"Date"),I=(0,c.instOf)(p,"Date");if(w!==I)return!1;if(w&&I)return l.getTime()===p.getTime();const E=(0,c.instOf)(l,"RegExp"),R=(0,c.instOf)(p,"RegExp");if(E!==R)return!1;if(E&&R)return l.toString()===p.toString();const N=(0,c.instOf)(l,"URL"),L=(0,c.instOf)(p,"URL");if(N!==L)return!1;if(N&&L)return l.href===p.href;const q=l&&l.toJSON,te=p&&p.toJSON;if(q!==te)return!1;if(q&&te)return u(l.toJSON(),p.toJSON());const Y=s(l);if(g=Y.length,g!==s(p).length)return!1;for(m=g;m--!==0;)if(!a.call(p,Y[m]))return!1;for(m=g;m--!==0;)if(x=Y[m],!(x==="_owner"&&l.$$typeof)&&!u(l[x],p[x]))return!1;return!0}return l!==l&&p!==p}r(u,"equal");const i=r(function(p,d){try{return u(p,d)}catch(y){if(y.message&&y.message.match(/stack|recursion/i)||y.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",y.name,y.message),!1;throw y}},"exportedEqual");return Jt}var Wt,rs;function yl(){if(rs)return Wt;rs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{clone:()=>h,shallowClone:()=>c}),Wt=F(_);var n=Le();const c=r(s=>Array.isArray(s)?s.slice(0):(0,n.isPlainObj)(s)?"$$typeof"in s&&"_owner"in s||s._isBigNumber||s._isAMomentObject||s._isJSONSchemaObject||(0,n.isFn)(s.toJS)||(0,n.isFn)(s.toJSON)?s:T({},s):typeof s=="object"?new s.constructor(s):s,"shallowClone"),h=r(s=>{if(Array.isArray(s)){const a=[];return s.forEach(u=>{a.push(h(u))}),a}else if((0,n.isPlainObj)(s)){if("$$typeof"in s&&"_owner"in s||s._isBigNumber||s._isAMomentObject||s._isJSONSchemaObject)return s;if((0,n.isFn)(s.toJS))return s.toJS();if((0,n.isFn)(s.toJSON))return s.toJSON();const a={};for(const u in s)Object.hasOwnProperty.call(s,u)&&(a[u]=h(s[u]));return a}else return s},"clone");return Wt}var Yt,os;function qt(){if(os)return Yt;os=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{isEmpty:()=>u,isUndef:()=>s,isValid:()=>a}),Yt=F(_);var n=zt();const c=Object.prototype.hasOwnProperty,h=Object.prototype.toString,s=r(i=>i===void 0,"isUndef"),a=r(i=>i!=null,"isValid");function u(i,l=!1){if(i==null)return!0;if(typeof i=="boolean"||typeof i=="number")return!1;if(typeof i=="string"||typeof i=="function")return i.length===0;if(Array.isArray(i)){if(i.length===0)return!0;for(let p=0;p<i.length;p++)if(l){if(i[p]!==void 0&&i[p]!==null)return!1}else if(i[p]!==void 0&&i[p]!==null&&i[p]!==""&&i[p]!==0)return!1;return!0}if((0,n.instOf)(i,"Error"))return i.message==="";if(i.toString===h)switch(i.toString()){case"[object File]":case"[object Map]":case"[object Set]":return i.size===0;case"[object Object]":{for(const p in i)if(c.call(i,p))return!1;return!0}}return!1}return r(u,"isEmpty"),Yt}var et=function(){return et=Object.assign||function(t){for(var o,f=1,r=arguments.length;f<r;f++){o=arguments[f];for(var b in o)Object.prototype.hasOwnProperty.call(o,b)&&(t[b]=o[b])}return t},et.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var _l={tr:{regexp:/\u0130|\u0049|\u0049\u0307/g,map:{İ:"i",I:"ı",İ:"i"}},az:{regexp:/\u0130/g,map:{İ:"i",I:"ı",İ:"i"}},lt:{regexp:/\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,map:{I:"i̇",J:"j̇",Į:"į̇",Ì:"i̇̀",Í:"i̇́",Ĩ:"i̇̃"}}};function xl(e,t){var o=_l[t.toLowerCase()];return vt(o?e.replace(o.regexp,function(f){return o.map[f]}):e)}function vt(e){return e.toLowerCase()}const gl=Object.freeze(Object.defineProperty({__proto__:null,localeLowerCase:xl,lowerCase:vt},Symbol.toStringTag,{value:"Module"}));var Fl=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Sl=/[^A-Z0-9]+/gi;function ns(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,f=o===void 0?Fl:o,r=t.stripRegexp,b=r===void 0?Sl:r,v=t.transform,F=v===void 0?vt:v,_=t.delimiter,n=_===void 0?" ":_,c=ss(ss(e,f,"$1\0$2"),b,"\0"),h=0,s=c.length;c.charAt(h)==="\0";)h++;for(;c.charAt(s-1)==="\0";)s--;return c.slice(h,s).split("\0").map(F).join(n)}function ss(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(f,r){return f.replace(r,o)},e)}function Kt(e,t){var o=e.charAt(0),f=e.substr(1).toLowerCase();return t>0&&o>="0"&&o<="9"?"_"+o+f:""+o.toUpperCase()+f}function as(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function is(e,t){return t===void 0&&(t={}),ns(e,et({delimiter:"",transform:Kt},t))}const Pl=Object.freeze(Object.defineProperty({__proto__:null,pascalCase:is,pascalCaseTransform:Kt,pascalCaseTransformMerge:as},Symbol.toStringTag,{value:"Module"}));function cs(e,t){return t===0?e.toLowerCase():Kt(e,t)}function Ol(e,t){return t===0?e.toLowerCase():as(e)}function Cl(e,t){return t===void 0&&(t={}),is(e,et({transform:cs},t))}const wl=st(Object.freeze(Object.defineProperty({__proto__:null,camelCase:Cl,camelCaseTransform:cs,camelCaseTransformMerge:Ol},Symbol.toStringTag,{value:"Module"}))),El=st(gl);function jl(e,t){return t===void 0&&(t={}),ns(e,et({delimiter:"."},t))}function Il(e,t){return t===void 0&&(t={}),jl(e,et({delimiter:"-"},t))}const Al=st(Object.freeze(Object.defineProperty({__proto__:null,paramCase:Il},Symbol.toStringTag,{value:"Module"}))),Dl=st(Pl);var Ml={tr:{regexp:/[\u0069]/g,map:{i:"İ"}},az:{regexp:/[\u0069]/g,map:{i:"İ"}},lt:{regexp:/[\u0069\u006A\u012F]\u0307|\u0069\u0307[\u0300\u0301\u0303]/g,map:{i̇:"I",j̇:"J",į̇:"Į",i̇̀:"Ì",i̇́:"Í",i̇̃:"Ĩ"}}};function Rl(e,t){var o=Ml[t.toLowerCase()];return Zt(o?e.replace(o.regexp,function(f){return o.map[f]}):e)}function Zt(e){return e.toUpperCase()}const Nl=st(Object.freeze(Object.defineProperty({__proto__:null,localeUpperCase:Rl,upperCase:Zt},Symbol.toStringTag,{value:"Module"})));var Qt,ls;function kl(){if(ls)return Qt;ls=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},b=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},v=a=>b(e({},"__esModule",{value:!0}),a),F={};r(F,{camelCase:()=>_.camelCase,lowerCase:()=>n.lowerCase,paramCase:()=>c.paramCase,pascalCase:()=>h.pascalCase,upperCase:()=>s.upperCase}),Qt=v(F);var _=wl,n=El,c=Al,h=Dl,s=Nl;return Qt}var Xt,us;function Tl(){if(us)return Xt;us=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>e(u,"name",{value:i,configurable:!0}),b=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},v=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{stringLength:()=>a}),Xt=F(_);const n=r(()=>{const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(u,"g")},"ansiRegex"),c="[\uD800-\uDBFF][\uDC00-\uDFFF]",h=r(u=>u&&u.exact?new RegExp(`^${c}$`):new RegExp(c,"g"),"astralRegex"),s=r(u=>typeof u=="string"?u.replace(n(),""):u,"stripAnsi"),a=r(u=>s(u).replace(h()," ").length,"stringLength");return Xt}var $t,ps;function yt(){if(ps)return $t;ps=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(w,I)=>e(w,"name",{value:I,configurable:!0}),b=(w,I)=>{for(var E in I)e(w,E,{get:I[E],enumerable:!0})},v=(w,I,E,R)=>{if(I&&typeof I=="object"||typeof I=="function")for(let N of o(I))!f.call(w,N)&&N!==E&&e(w,N,{get:()=>I[N],enumerable:!(R=t(I,N))||R.enumerable});return w},F=w=>v(e({},"__esModule",{value:!0}),w),_={};b(_,{isArr:()=>s,isAssignable:()=>S,isBool:()=>i,isEqual:()=>j,isFn:()=>h,isNum:()=>l,isNumberLike:()=>y,isObj:()=>p,isPlainObj:()=>a,isRegExp:()=>d,isSegmentEqual:()=>O,isStr:()=>u,toArr:()=>P}),$t=F(_);const n=Object.prototype.toString,c=r(w=>I=>n.call(I)===`[object ${w}]`,"isType"),h=c("Function"),s=Array.isArray||c("Array"),a=c("Object"),u=c("String"),i=c("Boolean"),l=c("Number"),p=r(w=>typeof w=="object","isObj"),d=c("RegExp"),y=r(w=>l(w)||/^(\d+)(\.\d+)?$/.test(w),"isNumberLike"),m=s,g=Object.keys,x=Object.prototype.hasOwnProperty,P=r(w=>Array.isArray(w)?w:w!==void 0?[w]:[],"toArr"),S=r(w=>typeof w=="object"||typeof w=="function","isAssignable"),j=r((w,I)=>{if(w===I)return!0;if(w&&I&&typeof w=="object"&&typeof I=="object"){const E=m(w),R=m(I);let N,L,q;if(E&&R){if(L=w.length,L!==I.length)return!1;for(N=L;N--!==0;)if(!j(w[N],I[N]))return!1;return!0}if(E!==R)return!1;const te=g(w);if(L=te.length,L!==g(I).length)return!1;for(N=L;N--!==0;)if(!x.call(I,te[N]))return!1;for(N=L;N--!==0;)if(q=te[N],!j(w[q],I[q]))return!1;return!0}return w!==w&&I!==I},"isEqual"),O=r((w,I)=>(w=typeof w=="symbol"?w:`${w}`,I=typeof I=="symbol"?I:`${I}`,w===I),"isSegmentEqual");return $t}var er,ds;function ms(){if(ds)return er;ds=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(g,x)=>e(g,"name",{value:x,configurable:!0}),b=(g,x)=>{for(var P in x)e(g,P,{get:x[P],enumerable:!0})},v=(g,x,P,S)=>{if(x&&typeof x=="object"||typeof x=="function")for(let j of o(x))!f.call(g,j)&&j!==P&&e(g,j,{get:()=>x[j],enumerable:!(S=t(x,j))||S.enumerable});return g},F=g=>v(e({},"__esModule",{value:!0}),g),_={};b(_,{isArrayPattern:()=>m,isDestructorExpression:()=>p,isDotOperator:()=>s,isExpandOperator:()=>u,isGroupExpression:()=>i,isIdentifier:()=>c,isIgnoreExpression:()=>h,isObjectPattern:()=>d,isObjectPatternProperty:()=>y,isRangeExpression:()=>l,isType:()=>n,isWildcardOperator:()=>a}),er=F(_);const n=r(g=>x=>x&&x.type===g,"isType"),c=n("Identifier"),h=n("IgnoreExpression"),s=n("DotOperator"),a=n("WildcardOperator"),u=n("ExpandOperator"),i=n("GroupExpression"),l=n("RangeExpression"),p=n("DestructorExpression"),d=n("ObjectPattern"),y=n("ObjectPatternProperty"),m=n("ArrayPattern");return er}var tr,fs;function hs(){if(fs)return tr;fs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>e(m,"name",{value:g,configurable:!0}),b=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},v=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},F=m=>v(e({},"__esModule",{value:!0}),m),_={};b(_,{deleteInByDestructor:()=>d,existInByDestructor:()=>y,getDestructor:()=>a,getInByDestructor:()=>p,parseDestructorRules:()=>i,setDestructor:()=>u,setInByDestructor:()=>l}),tr=F(_);var n=yt(),c=ms();const h=new Map,s=r(m=>m!=null,"isValid"),a=r(m=>h.get(m),"getDestructor"),u=r((m,g)=>{h.set(m,g)},"setDestructor"),i=r(m=>{const g=[];if((0,c.isObjectPattern)(m)){let x=0;return m.properties.forEach(P=>{g[x]={path:[]},g[x].key=P.key.value,g[x].path.push(P.key.value),(0,c.isIdentifier)(P.value)&&(g[x].key=P.value.value);const S=g[x].path,j=i(P.value);let O=x;j.forEach(w=>{g[O]?(g[O].key=w.key,g[O].path=S.concat(w.path)):g[O]={key:w.key,path:S.concat(w.path)},O++}),O>x?x=O:x++}),g}else if((0,c.isArrayPattern)(m)){let x=0;return m.elements.forEach((P,S)=>{g[x]={path:[]},g[x].key=S,g[x].path.push(S),(0,c.isIdentifier)(P)&&(g[x].key=P.value);const j=g[x].path,O=i(P);let w=x;O.forEach(I=>{g[w]?(g[w].key=I.key,g[w].path=j.concat(I.path)):g[w]={key:I.key,path:j.concat(I.path)},w++}),w>x?x=w:x++}),g}return(0,c.isDestructorExpression)(m)?i(m.value):g},"parseDestructorRules"),l=r((m,g,x,P)=>{g.forEach(({key:S,path:j})=>{P.setIn([S],m,P.getIn(j,x))})},"setInByDestructor"),p=r((m,g,x)=>{let P={};return g.length&&(0,n.isNum)(g[0].path[0])&&(P=[]),m=s(m)?m:{},g.forEach(({key:S,path:j})=>{x.setIn(j,P,m[S])}),P},"getInByDestructor"),d=r((m,g,x)=>{g.forEach(({key:P})=>{x.deleteIn([P],m)})},"deleteInByDestructor"),y=r((m,g,x,P)=>g.every(({key:S})=>P.existIn([S],m,x)),"existInByDestructor");return tr}var rr,bs;function Vl(){if(bs)return rr;bs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>e(a,"name",{value:u,configurable:!0}),b=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},v=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{Matcher:()=>s}),rr=F(_);var n=yt(),c=ms();const h=class{constructor(u,i){this.tree=u,this.stack=[],this.excluding=!1,this.wildcards=[],this.record=i}next(u,i){if(u.after)return this.matchNode(u.after,i);if((0,c.isWildcardOperator)(u)&&!u.filter)return this.excluding?!1:i===0||u.optional?!0:!!this.take(i);if(i===this.path.length-1)return!!this.take(i);{const p=this.wildcards.pop();if(p&&p.after)return this.next(p,i)}return!1}shot(){var u;((u=this.record)==null?void 0:u.score)>=0&&this.record.score++}take(u){var i;return String((i=this.path[u])!=null?i:"")}matchExcludeIdentifier(u,i,l){const p=l===this.path.length-1,d=l<this.path.length;if(i.after||(this.excluding=!1),u){if(i.after)return this.next(i,l);if(p)return!1}return p?!0:d}matchIdentifier(u,i){const l=this.take(i);let p=!1;return(0,c.isExpandOperator)(u.after)?(l.indexOf(u.value)===0&&(this.shot(),p=!0),this.excluding?this.matchExcludeIdentifier(p,u.after,i):p&&this.next(u.after,i)):(l===u.value&&(this.shot(),p=!0),this.excluding?this.matchExcludeIdentifier(p,u,i):p&&this.next(u,i))}matchIgnoreExpression(u,i){return(0,n.isEqual)(u.value,this.take(i))&&this.next(u,i)}matchDestructorExpression(u,i){return(0,n.isEqual)(u.source,this.take(i))&&this.next(u,i)}matchExpandOperator(u,i){return this.next(u,i)}matchWildcardOperator(u,i){let l=!1;return u.filter?(this.stack.push(u),l=this.matchNode(u.filter,i),this.stack.pop()):l=this.next(u,i),l}matchGroupExpression(u,i){let l=!1;return u.isExclude&&(l=!this.excluding),(0,n.toArr)(u.value)[l?"every":"some"](p=>(this.wildcards=this.stack.slice(),this.excluding=l,this.matchNode(p,i)))}matchRangeExpression(u,i){const l=Number(this.take(i));return u.start?u.end?l>=Number(u.start.value)&&l<=Number(u.end.value):l>=Number(u.start.value):u.end?l<=Number(u.end.value):(this.wildcards=this.stack.slice(),this.next(u,i))}matchNode(u,i=0){return(0,c.isDotOperator)(u)?this.next(u,i+1):(0,c.isIdentifier)(u)?this.matchIdentifier(u,i):(0,c.isIgnoreExpression)(u)?this.matchIgnoreExpression(u,i):(0,c.isDestructorExpression)(u)?this.matchDestructorExpression(u,i):(0,c.isExpandOperator)(u)?this.matchExpandOperator(u,i):(0,c.isWildcardOperator)(u)?this.matchWildcardOperator(u,i):(0,c.isGroupExpression)(u)?this.matchGroupExpression(u,i):(0,c.isRangeExpression)(u)?this.matchRangeExpression(u,i):!1}match(u){return this.path=u,{matched:this.matchNode(this.tree),record:this.record}}static matchSegments(u,i,l){if(u.length!==i.length)return{matched:!1,record:l};const p=r((d=0)=>{const y=(0,n.isSegmentEqual)(u[d],i[d]);return(l==null?void 0:l.score)>=0&&l.score++,y&&(d<u.length-1?p(d+1):!0)},"match");return{matched:p(),record:l}}};r(h,"Matcher");let s=h;return rr}var or,vs;function nr(){if(vs)return or;vs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,p)=>e(l,"name",{value:p,configurable:!0}),b=(l,p)=>{for(var d in p)e(l,d,{get:p[d],enumerable:!0})},v=(l,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of o(p))!f.call(l,m)&&m!==d&&e(l,m,{get:()=>p[m],enumerable:!(y=t(p,m))||y.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{braceContext:()=>u,bracketArrayContext:()=>h,bracketContext:()=>c,bracketDContext:()=>s,destructorContext:()=>i,parenContext:()=>a}),or=F(_);const n=r((l,p)=>T({flag:l},p),"ContextType"),c=n("[]"),h=n("[\\d]"),s=n("[[]]"),a=n("()"),u=n("{}"),i=n("{x}");return or}var sr,ys;function _s(){if(ys)return sr;ys=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(E,R)=>e(E,"name",{value:R,configurable:!0}),b=(E,R)=>{for(var N in R)e(E,N,{get:R[N],enumerable:!0})},v=(E,R,N,L)=>{if(R&&typeof R=="object"||typeof R=="function")for(let q of o(R))!f.call(E,q)&&q!==N&&e(E,q,{get:()=>R[q],enumerable:!(L=t(R,q))||L.enumerable});return E},F=E=>v(e({},"__esModule",{value:!0}),E),_={};b(_,{bangTok:()=>i,braceLTok:()=>p,braceRTok:()=>d,bracketDLTok:()=>g,bracketDRTok:()=>x,bracketLTok:()=>y,bracketRTok:()=>m,colonTok:()=>l,commaTok:()=>j,dbStarTok:()=>a,dotTok:()=>u,eofTok:()=>I,expandTok:()=>w,ignoreTok:()=>O,nameTok:()=>h,parenLTok:()=>P,parenRTok:()=>S,starTok:()=>s}),sr=F(_);var n=nr();const c=r((E,R)=>T({flag:E},R),"TokenType"),h=c("name",{expectNext(E){return this.includesContext(n.destructorContext)?E===h||E===j||E===m||E===d||E===l:E===u||E===j||E===I||E===m||E===S||E===l||E===w||E===y}}),s=c("*",{expectNext(E){return E===u||E===P||E===y||E===I||E===j||E===S}}),a=c("**",{expectNext(E){return E===u||E===y||E===I||E===j||E===S}}),u=c(".",{expectNext(E){return E===u||E===h||E===g||E===s||E===a||E===y||E===p||E===I},expectPrev(E){return E===u||E===h||E===x||E===s||E===S||E===m||E===w||E===d}}),i=c("!",{expectNext(E){return E===h||E===g}}),l=c(":",{expectNext(E){return this.includesContext(n.destructorContext)?E===h||E===p||E===y:E===h||E===g||E===m}}),p=c("{",{expectNext(E){return E===h},expectPrev(E){return this.includesContext(n.destructorContext)?E===l||E===j||E===y:E===u||E===l||E===P},updateContext(){this.state.context.push(n.braceContext)}}),d=c("}",{expectNext(E){return this.includesContext(n.destructorContext)?E===j||E===d||E===I||E===m:E===u||E===I||E===j},expectPrev(E){return E===h||E===d||E===m},updateContext(){this.state.context.pop(n.braceContext)}}),y=c("[",{expectNext(E){return this.includesContext(n.destructorContext)?E===h||E===y||E===p||E===m:E===h||E===g||E===l||E===y||E===O||E===m},expectPrev(E){return this.includesContext(n.destructorContext)?E===l||E===j||E===y:E===s||E===y||E===u||E===h||E===P||E===j},updateContext(){this.state.context.push(n.bracketContext)}}),m=c("]",{expectNext(E){return this.includesContext(n.destructorContext)?E===j||E===d||E===m||E===I:E===u||E===I||E===j||E===S||E===m},updateContext(){if(!this.includesContext(n.bracketArrayContext)){if(!this.includesContext(n.bracketContext))throw this.unexpect();this.state.context.pop()}}}),g=c("[[",{updateContext(){this.state.context.push(n.bracketDContext)}}),x=c("]]",{updateContext(){if(this.curContext()!==n.bracketDContext)throw this.unexpect();this.state.context.pop()}}),P=c("(",{expectNext(E){return E===h||E===g||E===p||E===i||E===y},expectPrev(E){return E===s},updateContext(){this.state.context.push(n.parenContext)}}),S=c(")",{expectNext(E){return E===u||E===I||E===j||E===S},updateContext(){if(this.curContext()!==n.parenContext)throw this.unexpect();this.state.context.pop()}}),j=c(",",{expectNext(E){return E===h||E===g||E===y||E===p}}),O=c("ignore",{expectNext(E){return E===x},expectPrev(E){return E===g}}),w=c("expandTok",{expectNext(E){return E===u||E===I||E===j||E===S}}),I=c("eof");return sr}var ar,xs;function Bl(){if(xs)return ar;xs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{Tokenizer:()=>p}),ar=F(_);var n=nr(),c=_s();const h=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,s=r((d,y)=>{if(String.fromCharCode)return d.codePointAt(y);const m=d.charCodeAt(y);if(m<=55295||m>=57344)return m;const g=d.charCodeAt(y+1);return(m<<10)+g-56613888},"fullCharCodeAtPos"),a=r(d=>d===42||d===46||d===33||d===91||d===93||d===40||d===41||d===44||d===58||d===126||d===123||d===125,"isRewordCode"),u=r((d,y)=>{const m=new Error(d);return Object.assign(m,y),m},"getError"),i=r((d,y,m)=>{let g="";for(let x=y;x<m;x++){const P=d.charAt(x);P!=="\\"&&(g+=P)}return g},"slice"),l=class{constructor(y){this.input=y,this.state={context:[],type:null,pos:0},this.type_=null}curContext(){return this.state.context[this.state.context.length-1]}includesContext(y){for(let m=this.state.context.length-1;m>=0;m--)if(this.state.context[m]===y)return!0;return!1}unexpect(y){return y=y||this.state.type,u(`Unexpect token "${y.flag}" in ${this.state.pos} char.`,{pos:this.state.pos})}expectNext(y,m){if(y&&y.expectNext&&m&&!y.expectNext.call(this,m))throw u(`Unexpect token "${m.flag}" token should not be behind "${y.flag}" token.(${this.state.pos}th char)`,{pos:this.state.pos})}expectPrev(y,m){if(y&&y.expectPrev&&m&&!y.expectPrev.call(this,m))throw u(`Unexpect token "${y.flag}" should not be behind "${m.flag}"(${this.state.pos}th char).`,{pos:this.state.pos})}match(y){return this.state.type===y}skipSpace(){if(this.curContext()!==n.bracketDContext)e:for(;this.state.pos<this.input.length;){const y=this.input.charCodeAt(this.state.pos);switch(y){case 32:case 160:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos;break;default:if(y>8&&y<14||y>=5760&&h.test(String.fromCharCode(y)))++this.state.pos;else break e}}}next(){if(this.type_=this.state.type,this.input.length<=this.state.pos)return this.finishToken(c.eofTok);this.skipSpace(),this.readToken(this.getCode(),this.state.pos>0?this.getCode(this.state.pos-1):-1/0)}getCode(y=this.state.pos){return s(this.input,y)}eat(y){return this.match(y)?(this.next(),!0):!1}readKeyWord(){let y=this.state.pos,m="";for(;;){const g=this.getCode(),x=this.getCode(this.state.pos-1);if(this.input.length===this.state.pos){m=i(this.input,y,this.state.pos+1);break}if(!a(g)||x===92){if(g===32||g===160||g===10||g===8232||g===8233){m=i(this.input,y,this.state.pos);break}if(g===13&&this.input.charCodeAt(this.state.pos+1)===10){m=i(this.input,y,this.state.pos);break}if(g>8&&g<14||g>=5760&&h.test(String.fromCharCode(g))){m=i(this.input,y,this.state.pos);break}this.state.pos++}else{m=i(this.input,y,this.state.pos);break}}this.finishToken(c.nameTok,m)}readIgnoreString(){let y=this.state.pos,m,g="";for(;;){const x=this.getCode();if(this.state.pos>=this.input.length)break;if((x===91||x===93)&&m===92)this.state.pos++,m="";else if(x===93&&m===93){g=this.input.slice(y,this.state.pos-1).replace(/\\([[\]])/g,"$1"),this.state.pos++;break}else this.state.pos++,m=x}this.finishToken(c.ignoreTok,g),this.finishToken(c.bracketDRTok)}finishToken(y,m){const g=this.state.type;this.state.type=y,m!==void 0&&(this.state.value=m),this.expectNext(g,y),this.expectPrev(y,g),y.updateContext&&y.updateContext.call(this,g)}readToken(y,m){if(m===92)return this.readKeyWord();if(this.input.length<=this.state.pos)this.finishToken(c.eofTok);else if(this.curContext()===n.bracketDContext)this.readIgnoreString();else if(y===123)this.state.pos++,this.finishToken(c.braceLTok);else if(y===125)this.state.pos++,this.finishToken(c.braceRTok);else if(y===42){if(this.state.pos++,this.getCode()===42)return this.state.pos++,this.finishToken(c.dbStarTok);this.finishToken(c.starTok)}else if(y===33)this.state.pos++,this.finishToken(c.bangTok);else if(y===46)this.state.pos++,this.finishToken(c.dotTok);else if(y===91){if(this.state.pos++,this.getCode()===91)return this.state.pos++,this.finishToken(c.bracketDLTok);this.finishToken(c.bracketLTok)}else y===126?(this.state.pos++,this.finishToken(c.expandTok)):y===93?(this.state.pos++,this.finishToken(c.bracketRTok)):y===40?(this.state.pos++,this.finishToken(c.parenLTok)):y===41?(this.state.pos++,this.finishToken(c.parenRTok)):y===44?(this.state.pos++,this.finishToken(c.commaTok)):y===58?(this.state.pos++,this.finishToken(c.colonTok)):this.readKeyWord()}};r(l,"Tokenizer");let p=l;return ar}var ir,gs;function Ll(){if(gs)return ir;gs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{Parser:()=>p}),ir=F(_);var n=nr(),c=hs(),h=yt(),s=Bl(),a=_s();const u=r((d=[],y)=>{const m=d.length,g=r((x=0)=>{const P=x<m-1?g(x+1):y,S=P&&{type:"DotOperator",after:P};return{type:"Identifier",value:d[x],after:S}},"build");return g()},"createTreeBySegments"),i=r((d,y,m)=>{if((0,h.isNumberLike)(d)&&(0,h.isNumberLike)(y)){if(m==="+")return String(Number(d)+Number(y));if(m==="-")return String(Number(d)-Number(y));if(m==="*")return String(Number(d)*Number(y));if(m==="/")return String(Number(d)/Number(y))}else{if(m==="+")return String(d)+String(y);if(m==="-"||m==="*"||m==="/")return"NaN"}return String(Number(y))},"calculate"),l=class extends s.Tokenizer{constructor(y,m){super(y),this.isMatchPattern=!1,this.isWildMatchPattern=!1,this.haveExcludePattern=!1,this.haveRelativePattern=!1,this.base=m}parse(){let y;return this.data={segments:[]},this.eat(a.eofTok)||(this.next(),y=this.parseAtom(this.state.type)),this.data.tree=y,y}append(y,m){y&&m&&(y.after=m)}parseAtom(y){switch(y){case a.braceLTok:case a.bracketLTok:return this.includesContext(n.destructorContext)?y===a.braceLTok?this.parseObjectPattern():this.parseArrayPattern():this.parseDestructorExpression();case a.nameTok:return this.parseIdentifier();case a.expandTok:return this.parseExpandOperator();case a.dbStarTok:case a.starTok:return this.parseWildcardOperator();case a.bracketDLTok:return this.parseIgnoreExpression();case a.dotTok:return this.parseDotOperator()}}pushSegments(y){this.data.segments.push(y)}parseIdentifier(){const y={type:"Identifier",value:this.state.value},m=!this.includesContext(n.destructorContext)&&!this.isMatchPattern&&!this.isWildMatchPattern;if(this.next(),this.includesContext(n.bracketArrayContext)){if(this.state.type!==a.bracketRTok)throw this.unexpect();this.state.context.pop(),this.next()}else m&&this.pushSegments(y.value);if(this.state.type===a.bracketLTok){if(this.next(),this.state.type!==a.nameTok)throw this.unexpect();this.state.context.push(n.bracketArrayContext);let g=!1;/^\d+$/.test(this.state.value)&&(g=!0);const x=this.state.value;this.pushSegments(g?Number(x):x);const P=this.parseAtom(this.state.type);g&&(P.arrayIndex=!0),this.append(y,P)}else this.append(y,this.parseAtom(this.state.type));return y}parseExpandOperator(){const y={type:"ExpandOperator"};return this.isMatchPattern=!0,this.isWildMatchPattern=!0,this.data.segments=[],this.next(),this.append(y,this.parseAtom(this.state.type)),y}parseWildcardOperator(){const y={type:"WildcardOperator"};return this.state.type===a.dbStarTok&&(y.optional=!0),this.isMatchPattern=!0,this.isWildMatchPattern=!0,this.data.segments=[],this.next(),this.state.type===a.parenLTok?y.filter=this.parseGroupExpression(y):this.state.type===a.bracketLTok&&(y.filter=this.parseRangeExpression(y)),this.append(y,this.parseAtom(this.state.type)),y}parseDestructorExpression(){const y={type:"DestructorExpression"};this.state.context.push(n.destructorContext);const m=this.state.pos-1;y.value=this.state.type===a.braceLTok?this.parseObjectPattern():this.parseArrayPattern();const g=this.state.pos;return this.state.context.pop(),y.source=this.input.substring(m,g).replace(/\[\s*([+\-*/])?\s*([^,\]\s]*)\s*\]/,(x,P,S)=>this.relative!==void 0?P?S?i(this.relative,S,P):i(this.relative,1,P):S?i(this.relative,S,"+"):String(this.relative):x).replace(/\s*\.\s*/g,"").replace(/\s*/g,""),this.relative===void 0&&(0,c.setDestructor)(y.source,(0,c.parseDestructorRules)(y)),this.relative=void 0,this.pushSegments(y.source),this.next(),this.append(y,this.parseAtom(this.state.type)),y}parseArrayPattern(){const y={type:"ArrayPattern",elements:[]};return this.next(),y.elements=this.parseArrayPatternElements(),y}parseArrayPatternElements(){const y=[];for(;this.state.type!==a.bracketRTok&&this.state.type!==a.eofTok;){if(y.push(this.parseAtom(this.state.type)),this.state.type===a.bracketRTok)return this.includesContext(n.destructorContext)&&this.next(),y;this.next()}return y}parseObjectPattern(){const y={type:"ObjectPattern",properties:[]};return this.next(),y.properties=this.parseObjectProperties(),y}parseObjectProperties(){const y=[];for(;this.state.type!==a.braceRTok&&this.state.type!==a.eofTok;){const m={type:"ObjectPatternProperty",key:this.parseAtom(this.state.type)};if(y.push(m),this.state.type===a.colonTok&&(this.next(),m.value=this.parseAtom(this.state.type)),this.state.type===a.braceRTok)return this.includesContext(n.destructorContext)&&this.next(),y;this.next()}return y}parseDotOperator(){const y={type:"DotOperator"};if(!this.type_&&this.base){if(this.base.isMatchPattern)throw new Error("Base path must be an absolute path.");for(this.data.segments=this.base.toArr();this.state.type===a.dotTok;)this.relative=this.data.segments.pop(),this.haveRelativePattern=!0,this.next();return u(this.data.segments.slice(),this.parseAtom(this.state.type))}else this.next();return this.append(y,this.parseAtom(this.state.type)),y}parseIgnoreExpression(){this.next();const y=String(this.state.value).replace(/\s*/g,""),m={type:"IgnoreExpression",value:y};return this.pushSegments(y),this.next(),this.append(m,this.parseAtom(this.state.type)),this.next(),m}parseGroupExpression(y){const m={type:"GroupExpression",value:[]};this.isMatchPattern=!0,this.data.segments=[],this.next();e:for(;;)switch(this.state.type){case a.commaTok:this.next();break;case a.bangTok:m.isExclude=!0,this.haveExcludePattern=!0,this.next();break;case a.eofTok:break e;case a.parenRTok:break e;default:m.value.push(this.parseAtom(this.state.type))}return this.next(),this.append(y,this.parseAtom(this.state.type)),m}parseRangeExpression(y){const m={type:"RangeExpression"};this.next(),this.isMatchPattern=!0,this.data.segments=[];let g=!1,x=!1;e:for(;;)switch(this.state.type){case a.colonTok:x=!0,g=!0,this.next();break;case a.bracketRTok:!x&&!m.end&&(m.end=m.start);break e;case a.commaTok:throw this.unexpect();case a.eofTok:break e;default:g?m.end=this.parseAtom(this.state.type):m.start=this.parseAtom(this.state.type)}return this.next(),this.append(y,this.parseAtom(this.state.type)),m}};r(l,"Parser");let p=l;return ir}var cr,Fs;function Ul(){if(Fs)return cr;Fs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(I,E)=>e(I,"name",{value:E,configurable:!0}),b=(I,E)=>{for(var R in E)e(I,R,{get:E[R],enumerable:!0})},v=(I,E,R,N)=>{if(E&&typeof E=="object"||typeof E=="function")for(let L of o(E))!f.call(I,L)&&L!==R&&e(I,L,{get:()=>E[L],enumerable:!(N=t(E,L))||N.enumerable});return I},F=I=>v(e({},"__esModule",{value:!0}),I),_={};b(_,{Path:()=>w}),cr=F(_);var n=hs(),c=Vl(),h=Ll(),s=yt();const a=new Map,u=Symbol("PATH_MATCHER"),i=r(I=>I!=null,"isValid"),l=r(I=>I.indexOf("*")===-1&&I.indexOf("~")===-1&&I.indexOf("[")===-1&&I.indexOf("]")===-1&&I.indexOf(",")===-1&&I.indexOf(":")===-1&&I.indexOf(" ")===-1&&I[0]!==".","isSimplePath"),p=r(I=>typeof I=="object"||typeof I=="function","isAssignable"),d=r(I=>(0,s.isStr)(I)?/^\d+$/.test(I):(0,s.isNum)(I),"isNumberIndex"),y=r((I,E)=>{for(let R=0;R<I.length;R++){const N=I[R],L=(0,n.getDestructor)(N);if(L){E=(0,n.getInByDestructor)(E,L,{setIn:m,getIn:y});break}else{if(!i(E))return;E=E[N]}}return E},"getIn"),m=r((I,E,R)=>{for(let N=0;N<I.length;N++){const L=I[N],q=(0,n.getDestructor)(L);if(q){(0,n.setInByDestructor)(E,q,R,{setIn:m,getIn:y});break}else{if(!i(E)||!p(E)||(0,s.isArr)(E)&&!d(L))return;if(!i(E[L])){if(R===void 0){E[L]===null&&(E[L]=R);return}N<I.length-1&&(E[L]=(0,s.isNum)(I[N+1])?[]:{})}N===I.length-1&&(E[L]=R),E=E[L]}}},"setIn"),g=r((I,E)=>{for(let R=0;R<I.length;R++){const N=I[R],L=(0,n.getDestructor)(N);if(L){(0,n.deleteInByDestructor)(E,L,{setIn:m,getIn:y,deleteIn:g});break}else{if(R===I.length-1&&i(E)){delete E[N];return}if(!i(E)||!p(E)||(E=E[N],!(0,s.isObj)(E)))return}}},"deleteIn"),x=Object.prototype.hasOwnProperty,P=r((I,E,R)=>{R instanceof w&&(R=R.length);for(let N=R;N<I.length;N++){const L=I[N],q=(0,n.getDestructor)(L);if(q)return(0,n.existInByDestructor)(E,q,R,{setIn:m,getIn:y,deleteIn:g,existIn:P});if(N===I.length-1)return x.call(E,L);if(!i(E)||!p(E)||(E=E[L],!(0,s.isObj)(E)))return!1}},"existIn"),S=r((I,E)=>{if(I instanceof w)return{entire:I.entire,segments:I.segments.slice(),isRegExp:!1,haveRelativePattern:I.haveRelativePattern,isWildMatchPattern:I.isWildMatchPattern,isMatchPattern:I.isMatchPattern,haveExcludePattern:I.haveExcludePattern,tree:I.tree};if((0,s.isStr)(I)){if(!I)return{entire:"",segments:[],isRegExp:!1,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!1};if(l(I))return{entire:I,segments:I.split("."),isRegExp:!1,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!1};const R=new h.Parser(I,w.parse(E)),N=R.parse();if(R.isMatchPattern)return{entire:I,segments:[],isRegExp:!1,haveRelativePattern:!1,isWildMatchPattern:R.isWildMatchPattern,haveExcludePattern:R.haveExcludePattern,isMatchPattern:!0,tree:N};{const L=R.data.segments;return{entire:L.join("."),segments:L,tree:N,isRegExp:!1,haveRelativePattern:R.haveRelativePattern,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!1}}}else return(0,s.isFn)(I)&&I[u]?S(I.path):(0,s.isArr)(I)?{entire:I.join("."),segments:I.reduce((R,N)=>R.concat(j(N)),[]),isRegExp:!1,haveRelativePattern:!1,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!1}:(0,s.isRegExp)(I)?{entire:I,segments:[],isRegExp:!0,haveRelativePattern:!1,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!0}:{entire:"",isRegExp:!1,segments:I!==void 0?[I]:[],haveRelativePattern:!1,isWildMatchPattern:!1,haveExcludePattern:!1,isMatchPattern:!1}},"parse"),j=r(I=>{if((0,s.isStr)(I)){I=I.replace(/\s*/g,"");try{const{segments:E,isMatchPattern:R}=S(I);return R?I:E}catch(E){return I}}else if(I instanceof w)return I.segments;return I},"parseString"),O=class Se{constructor(E,R){this.concat=r((...B)=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be concat`);const U=new Se("");return U.segments=this.segments.concat(...B.map(J=>j(J))),U.entire=U.segments.join("."),U},"concat"),this.slice=r((B,U)=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be slice`);const J=new Se("");return J.segments=this.segments.slice(B,U),J.entire=J.segments.join("."),J},"slice"),this.push=r((...B)=>this.concat(...B),"push"),this.pop=r(()=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be pop`);return new Se(this.segments.slice(0,this.segments.length-1))},"pop"),this.splice=r((B,U,...J)=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be splice`);J=J.reduce((ee,ne)=>ee.concat(j(ne)),[]);const Q=this.segments.slice();return Q.splice(B,U,...J),new Se(Q)},"splice"),this.forEach=r(B=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be each`);this.segments.forEach(B)},"forEach"),this.map=r(B=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be map`);return this.segments.map(B)},"map"),this.reduce=r((B,U)=>{if(this.isMatchPattern||this.isRegExp)throw new Error(`${this.entire} cannot be reduce`);return this.segments.reduce(B,U)},"reduce"),this.parent=r(()=>this.slice(0,this.length-1),"parent"),this.includes=r(B=>{const{entire:U,segments:J,isMatchPattern:Q}=Se.parse(B),ee=this.includesCache.get(U);if(ee!==void 0)return ee;const ne=r(pe=>(this.includesCache.set(U,pe),pe),"cacheWith");if(this.isMatchPattern){if(Q)throw new Error(`${this.entire} cannot be used to match ${U}`);return ne(this.match(J))}if(Q)throw new Error(`${this.entire} cannot be used to match ${U}`);if(J.length>this.segments.length)return ne(!1);for(let pe=0;pe<J.length;pe++)if(!(0,s.isEqual)(String(J[pe]),String(this.segments[pe])))return ne(!1);return ne(!0)},"includes"),this.transform=r((B,U)=>{if(!(0,s.isFn)(U))return"";if(this.isMatchPattern)throw new Error(`${this.entire} cannot be transformed`);const J=new RegExp(B),Q=this.segments.filter(ee=>J.test(ee));return U(...Q)},"transform"),this.match=r(B=>{var U,J;const Q=Se.parse(B),ee=this.matchCache.get(Q.entire);if(ee!==void 0)return ee.record&&ee.record.score!==void 0&&(this.matchScore=ee.record.score),ee.matched;const ne=r(pe=>(this.matchCache.set(Q.entire,pe),pe),"cacheWith");if(Q.isMatchPattern){if(this.isMatchPattern)throw new Error(`${Q.entire} cannot match ${this.entire}`);return this.matchScore=0,ne(Q.match(this.segments))}else if(this.isMatchPattern){if(this.isRegExp)try{return(J=(U=this.entire)==null?void 0:U.test)==null?void 0:J.call(U,Q.entire)}finally{this.entire.lastIndex=0}const pe={score:0},Ce=ne(new c.Matcher(this.tree,pe).match(Q.segments));return this.matchScore=pe.score,Ce.matched}else{const pe={score:0},Ce=ne(c.Matcher.matchSegments(this.segments,Q.segments,pe));return this.matchScore=pe.score,Ce.matched}},"match"),this.matchAliasGroup=r((B,U)=>{const J=Se.parse(B),Q=Se.parse(U),ee=this.match(J),ne=this.matchScore,pe=this.match(Q),Ce=this.matchScore;return this.haveExcludePattern?ne>=Ce?ee:pe:ee||pe},"matchAliasGroup"),this.existIn=r((B,U=0)=>P(this.segments,B,U),"existIn"),this.getIn=r(B=>y(this.segments,B),"getIn"),this.setIn=r((B,U)=>(m(this.segments,B,U),B),"setIn"),this.deleteIn=r(B=>(g(this.segments,B),B),"deleteIn"),this.ensureIn=r((B,U)=>{const J=this.getIn(B);return J===void 0?(this.setIn(B,U),this.getIn(B)):J},"ensureIn");const{tree:N,segments:L,entire:q,isRegExp:te,isMatchPattern:Y,isWildMatchPattern:re,haveRelativePattern:ae,haveExcludePattern:z}=S(E,R);this.entire=q,this.segments=L,this.isMatchPattern=Y,this.isWildMatchPattern=re,this.haveRelativePattern=ae,this.isRegExp=te,this.haveExcludePattern=z,this.tree=N,this.matchCache=new Map,this.includesCache=new Map}toString(){var E;return(E=this.entire)==null?void 0:E.toString()}toArr(){var E;return(E=this.segments)==null?void 0:E.slice()}get length(){return this.segments.length}static match(E){const R=Se.parse(E),N=r(L=>R.match(L),"matcher");return N[u]=!0,N.path=R,N}static isPathPattern(E){return!!((0,s.isStr)(E)||(0,s.isArr)(E)||(0,s.isRegExp)(E)||(0,s.isFn)(E)&&E[u])}static transform(E,R,N){return Se.parse(E).transform(R,N)}static parse(E="",R){if(E instanceof Se){const N=a.get(E.entire);return N||(a.set(E.entire,E),E)}else{if(E&&E[u])return Se.parse(E.path);{const N=R?Se.parse(R):"",L=`${E}:${N}`,q=a.get(L);return q||(E=new Se(E,R),a.set(L,E),E)}}}};r(O,"Path"),O.getIn=r((I,E)=>O.parse(E).getIn(I),"getIn"),O.setIn=r((I,E,R)=>O.parse(E).setIn(I,R),"setIn"),O.deleteIn=r((I,E)=>O.parse(E).deleteIn(I),"deleteIn"),O.existIn=r((I,E,R)=>O.parse(E).existIn(I,R),"existIn"),O.ensureIn=r((I,E,R)=>O.parse(E).ensureIn(I,R),"ensureIn");let w=O;return cr}var lr,Ss;function Gl(){if(Ss)return lr;Ss=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(n,c)=>{for(var h in c)e(n,h,{get:c[h],enumerable:!0})},b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of o(c))!f.call(n,a)&&a!==h&&e(n,a,{get:()=>c[a],enumerable:!(s=t(c,a))||s.enumerable});return n},v=n=>b(e({},"__esModule",{value:!0}),n),F={};r(F,{FormPath:()=>_.Path}),lr=v(F);var _=Ul();return lr}var ur,Ps;function Hl(){if(Ps)return ur;Ps=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{deprecate:()=>h}),ur=F(_);var n=Le();const c={};function h(s,a,u){if((0,n.isFn)(s))return function(i,l,p,d,y){return h(a,u),s.apply(this,arguments)};(0,n.isStr)(s)&&!c[s]&&(c[s]=!0,console.warn(new Error(`${s} has been deprecated. Do not continue to use this api.${a||""}`)))}return r(h,"deprecate"),ur}var pr,Os;function zl(){if(Os)return pr;Os=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>e(a,"name",{value:u,configurable:!0}),b=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},v=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{Subscribable:()=>s}),pr=F(_);var n=Ut(),c=Le();const h=class{constructor(){this.subscribers={index:0},this.subscribe=r(u=>{if((0,c.isFn)(u)){const i=this.subscribers.index+1;return this.subscribers[i]=u,this.subscribers.index++,i}},"subscribe"),this.unsubscribe=r(u=>{this.subscribers[u]?delete this.subscribers[u]:u||(this.subscribers={index:0})},"unsubscribe"),this.notify=r((u,i)=>{if(this.subscription&&this.subscription&&(0,c.isFn)(this.subscription.notify)&&this.subscription.notify.call(this,u)===!1||i)return;const l=r(p=>this.subscription&&(0,c.isFn)(this.subscription.filter)?this.subscription.filter.call(this,p):p,"filter");(0,n.each)(this.subscribers,p=>{(0,c.isFn)(p)&&p(l(u))})},"notify")}};r(h,"Subscribable");let s=h;return pr}var dr,Cs;function Jl(){if(Cs)return dr;Cs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(c,h)=>e(c,"name",{value:h,configurable:!0}),b=(c,h)=>{for(var s in h)e(c,s,{get:h[s],enumerable:!0})},v=(c,h,s,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let u of o(h))!f.call(c,u)&&u!==s&&e(c,u,{get:()=>h[u],enumerable:!(a=t(h,u))||a.enumerable});return c},F=c=>v(e({},"__esModule",{value:!0}),c),_={};b(_,{applyMiddleware:()=>n}),dr=F(_);const n=r((c,h=[])=>{const s=r((a,u)=>{const i=a;return Promise.resolve(u[0](a,l=>s(l!=null?l:i,u.slice(1))))},"compose");return new Promise((a,u)=>{s(c,h.concat(i=>{a(i)})).catch(u)})},"applyMiddleware");return dr}var mr,ws;function Wl(){if(ws)return mr;ws=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(O,w)=>e(O,"name",{value:w,configurable:!0}),b=(O,w)=>{for(var I in w)e(O,I,{get:w[I],enumerable:!0})},v=(O,w,I,E)=>{if(w&&typeof w=="object"||typeof w=="function")for(let R of o(w))!f.call(O,R)&&R!==I&&e(O,R,{get:()=>w[R],enumerable:!(E=t(w,R))||E.enumerable});return O},F=O=>v(e({},"__esModule",{value:!0}),O),_={};b(_,{lazyMerge:()=>S,merge:()=>j}),mr=F(_);var n=Le(),c=qt();function h(O){return s(O)&&!a(O)}r(h,"defaultIsMergeableObject");function s(O){return!!O&&typeof O=="object"}r(s,"isNonNullObject");function a(O){return"$$typeof"in O&&"_owner"in O||O._isAMomentObject||O._isJSONSchemaObject||(0,n.isFn)(O.toJS)||(0,n.isFn)(O.toJSON)?!0:!(0,n.isPlainObj)(O)}r(a,"isSpecial");function u(O){return Array.isArray(O)?[]:{}}r(u,"emptyTarget");function i(O,w){var I;return w.clone!==!1&&((I=w.isMergeableObject)!=null&&I.call(w,O))?P(u(O),O,w):O}r(i,"cloneUnlessOtherwiseSpecified");function l(O,w,I){return O.concat(w).map(function(E){return i(E,I)})}r(l,"defaultArrayMerge");function p(O,w){if(!w.customMerge)return P;const I=w.customMerge(O);return typeof I=="function"?I:P}r(p,"getMergeFunction");function d(O){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(O).filter(function(w){return O.propertyIsEnumerable(w)}):[]}r(d,"getEnumerableOwnPropertySymbols");function y(O){return(0,c.isValid)(O)?Object.keys(O).concat(d(O)):[]}r(y,"getKeys");function m(O,w){try{return w in O}catch(I){return!1}}r(m,"propertyIsOnObject");function g(O,w){return m(O,w)&&!(Object.hasOwnProperty.call(O,w)&&Object.propertyIsEnumerable.call(O,w))}r(g,"propertyIsUnsafe");function x(O,w,I){const E=I.assign?O||{}:{};return I.isMergeableObject(O)?(I.assign||y(O).forEach(function(R){E[R]=i(O[R],I)}),y(w).forEach(function(R){g(O,R)||((0,c.isEmpty)(O[R])?E[R]=w[R]:m(O,R)&&I.isMergeableObject(w[R])?E[R]=p(R,I)(O[R],w[R],I):E[R]=i(w[R],I))}),E):O}r(x,"mergeObject");function P(O,w,I){I=I||{},I.arrayMerge=I.arrayMerge||l,I.isMergeableObject=I.isMergeableObject||h,I.cloneUnlessOtherwiseSpecified=i;const E=Array.isArray(w),R=Array.isArray(O);return E===R?E?I.arrayMerge(O,w,I):x(O,w,I):i(w,I)}r(P,"deepmerge");const S=r((O,...w)=>{const I=r((E,R)=>{if(!(0,c.isValid)(R))return E;if(!(0,c.isValid)(E))return R;const N=typeof E=="object",L=typeof R=="object",q=typeof E=="function",te=typeof R=="function";if(!N&&!q)return R;if(!L&&!te)return E;const Y=r(()=>q?E():E,"getTarget"),re=r(()=>te?R():R,"getSource"),ae=r((ee,ne,pe)=>{const Ce=re(),rt=Y();return ne in Ce?Ce[ne]=pe:ne in rt?rt[ne]=pe:Ce[ne]=pe,!0},"set"),z=r((ee,ne)=>{const pe=re();return ne in pe?pe[ne]:Y()[ne]},"get"),B=r(()=>{const ee=re(),ne=Y(),pe=Object.keys(ne);for(const Ce in ee)Ce in ne||pe.push(Ce);return pe},"ownKeys"),U=r((ee,ne)=>({value:z(ee,ne),enumerable:!0,configurable:!0}),"getOwnPropertyDescriptor"),J=r((ee,ne)=>ne in re()||ne in Y(),"has"),Q=r(()=>Object.getPrototypeOf({}),"getPrototypeOf");return new Proxy(Object.create(null),{set:ae,get:z,ownKeys:B,getPrototypeOf:Q,getOwnPropertyDescriptor:U,has:J})},"_lazyMerge");return w.reduce((E,R)=>I(E,R),O)},"lazyMerge"),j=P;return mr}var fr,Es;function Yl(){if(Es)return fr;Es=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{defaults:()=>u}),fr=F(_);var n=Ut(),c=Le(),h=qt();const s=r(i=>{if(i!=null&&i._owner&&(i!=null&&i.$$typeof)||i!=null&&i._isAMomentObject||i!=null&&i._isJSONSchemaObject||i!=null&&i.toJS||i!=null&&i.toJSON)return!0},"isUnNormalObject"),a=r(i=>s(i)?!1:typeof i=="object","isEnumerableObject"),u=r((i,l)=>{if((0,c.getType)(i)!==(0,c.getType)(l)||!a(i)||!a(l))return(0,h.isEmpty)(l)?i:l;{const p=(0,c.isArr)(i)?[]:(0,c.isPlainObj)(i)?{}:i;return(0,n.each)(l,(d,y)=>{p[y]=u(i[y],d)}),(0,n.each)(i,(d,y)=>{(0,h.isValid)(p[y])||(p[y]=d)}),p}},"defaults");return fr}var hr,js;function ql(){if(js)return hr;js=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{uid:()=>h}),hr=F(_);let n=36,c="";for(;n--;)c+=n.toString(36);function h(s){let a="",u=s||11;for(;u--;)a+=c[Math.random()*36|0];return a}return r(h,"uid"),hr}var Is;function ue(){return Is||(Is=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Ut(),e.exports),v(_,vl(),e.exports),v(_,Le(),e.exports),v(_,yl(),e.exports),v(_,qt(),e.exports),v(_,kl(),e.exports),v(_,Tl(),e.exports),v(_,$n(),e.exports),v(_,Gl(),e.exports),v(_,Hl(),e.exports),v(_,zl(),e.exports),v(_,Jl(),e.exports),v(_,Wl(),e.exports),v(_,zt(),e.exports),v(_,Yl(),e.exports),v(_,ql(),e.exports)}(Vt)),Vt.exports}var br={exports:{}},vr,As;function Ue(){if(As)return vr;As=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>e(m,"name",{value:g,configurable:!0}),b=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},v=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},F=m=>v(e({},"__esModule",{value:!0}),m),_={};b(_,{isArr:()=>i,isCollectionType:()=>d,isFn:()=>u,isMap:()=>c,isNormalType:()=>y,isPlainObj:()=>l,isSet:()=>h,isValid:()=>p,isWeakMap:()=>s,isWeakSet:()=>a}),vr=F(_);const n=Object.prototype.toString,c=r(m=>m&&m instanceof Map,"isMap"),h=r(m=>m&&m instanceof Set,"isSet"),s=r(m=>m&&m instanceof WeakMap,"isWeakMap"),a=r(m=>m&&m instanceof WeakSet,"isWeakSet"),u=r(m=>typeof m=="function","isFn"),i=Array.isArray,l=r(m=>n.call(m)==="[object Object]","isPlainObj"),p=r(m=>m!=null,"isValid"),d=r(m=>c(m)||s(m)||h(m)||a(m),"isCollectionType"),y=r(m=>l(m)||i(m),"isNormalType");return vr}var yr,Ds;function _r(){if(Ds)return yr;Ds=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{ArraySet:()=>h,toArray:()=>n}),yr=F(_);const n=r(s=>Array.isArray(s)?s:s!=null?[s]:[],"toArray"),c=class{constructor(a=[]){this.forEachIndex=0,this.value=a}add(a){this.has(a)||this.value.push(a)}has(a){return this.value.indexOf(a)>-1}delete(a){const u=this.value.length;if(u===0)return;if(u===1&&this.value[0]===a){this.value=[];return}const i=this.value.indexOf(a);i>-1&&(this.value.splice(i,1),i<=this.forEachIndex&&(this.forEachIndex-=1))}forEach(a){if(this.value.length!==0)for(this.forEachIndex=0;this.forEachIndex<this.value.length;this.forEachIndex++)a(this.value[this.forEachIndex])}batchDelete(a){if(this.value.length!==0)for(this.forEachIndex=0;this.forEachIndex<this.value.length;this.forEachIndex++){const u=this.value[this.forEachIndex];this.value.splice(this.forEachIndex,1),this.forEachIndex--,a(u)}}clear(){this.value.length=0}};r(c,"ArraySet");let h=c;return yr}var xr,Ms;function Pe(){if(Ms)return xr;Ms=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(O,w)=>{for(var I in w)e(O,I,{get:w[I],enumerable:!0})},b=(O,w,I,E)=>{if(w&&typeof w=="object"||typeof w=="function")for(let R of o(w))!f.call(O,R)&&R!==I&&e(O,R,{get:()=>w[R],enumerable:!(E=t(w,R))||E.enumerable});return O},v=O=>b(e({},"__esModule",{value:!0}),O),F={};r(F,{BatchCount:()=>i,BatchEndpoints:()=>g,BatchScope:()=>p,DependencyCollected:()=>d,MakeObModelSymbol:()=>P,ObModelNodeSymbol:()=>j,ObModelSymbol:()=>S,ObserverListeners:()=>x,PendingReactions:()=>y,PendingScopeReactions:()=>m,ProxyRaw:()=>n,RawNode:()=>s,RawProxy:()=>c,RawReactionsMap:()=>a,RawShallowProxy:()=>h,ReactionStack:()=>u,UntrackCount:()=>l}),xr=v(F);var _=_r();const n=new WeakMap,c=new WeakMap,h=new WeakMap,s=new WeakMap,a=new WeakMap,u=[],i={value:0},l={value:0},p={value:!1},d={value:!1},y=new _.ArraySet,m=new _.ArraySet,g=new _.ArraySet,x=new _.ArraySet,P=Symbol("MakeObModelSymbol"),S=Symbol("ObModelSymbol"),j=Symbol("ObModelNodeSymbol");return xr}var gr,Rs;function We(){if(Rs)return gr;Rs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{DataChange:()=>s,DataNode:()=>u,buildDataTree:()=>p,getDataNode:()=>i,setDataNode:()=>l}),gr=F(_);var n=Pe(),c=tt();const h=class{constructor(y,m){this.node=m,this.key=y.key,this.type=y.type,this.object=y.target,this.value=y.value,this.oldValue=y.oldValue}get path(){return this.node.path.concat(this.key)}};r(h,"DataChange");let s=h;const a=class{constructor(y,m,g){this.target=y,this.key=m,this.value=g}get path(){return this.parent?this.parent.path.concat(this.key):this.key?[this.key]:[]}get targetRaw(){return(0,c.raw)(this.target)}get parent(){if(this.target)return i(this.targetRaw)}isEqual(y){return this.key?y.targetRaw===this.targetRaw&&y.key===this.key:y.value===this.value}contains(y){if(y===this)return!0;let m=y.parent;for(;m;){if(this.isEqual(m))return!0;m=m.parent}return!1}};r(a,"DataNode");let u=a;const i=r(d=>d!=null&&d[n.ObModelNodeSymbol]?d[n.ObModelNodeSymbol]:n.RawNode.get(d),"getDataNode"),l=r((d,y)=>{if(d!=null&&d[n.ObModelSymbol]){d[n.ObModelNodeSymbol]=y;return}n.RawNode.set(d,y)},"setDataNode"),p=r((d,y,m)=>{const g=(0,c.raw)(m),x=i(g);if(x)return x;l(g,new u(d,y,m))},"buildDataTree");return gr}var Fr,Ns;function tt(){if(Ns)return Fr;Ns=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(S,j)=>e(S,"name",{value:j,configurable:!0}),b=(S,j)=>{for(var O in j)e(S,O,{get:j[O],enumerable:!0})},v=(S,j,O,w)=>{if(j&&typeof j=="object"||typeof j=="function")for(let I of o(j))!f.call(S,I)&&I!==O&&e(S,I,{get:()=>j[I],enumerable:!(w=t(j,I))||w.enumerable});return S},F=S=>v(e({},"__esModule",{value:!0}),S),_={};b(_,{contains:()=>x,hasCollected:()=>P,isAnnotation:()=>l,isObservable:()=>i,isSupportObservable:()=>p,markObservable:()=>y,markRaw:()=>d,raw:()=>m,toJS:()=>g}),Fr=F(_);var n=Ue(),c=Pe(),h=We();const s=Symbol("RAW_TYPE"),a=Symbol("OBSERVABLE_TYPE"),u=Object.prototype.hasOwnProperty,i=r(S=>c.ProxyRaw.has(S)||!!(S!=null&&S[c.ObModelSymbol]),"isObservable"),l=r(S=>S&&!!S[c.MakeObModelSymbol],"isAnnotation"),p=r(S=>(0,n.isValid)(S)?(0,n.isArr)(S)?!0:(0,n.isPlainObj)(S)?S[s]?!1:S[a]?!0:!("$$typeof"in S&&"_owner"in S||S._isAMomentObject||S._isJSONSchemaObject||(0,n.isFn)(S.toJS)||(0,n.isFn)(S.toJSON)):!!((0,n.isMap)(S)||(0,n.isWeakMap)(S)||(0,n.isSet)(S)||(0,n.isWeakSet)(S)):!1,"isSupportObservable"),d=r(S=>{if(S)return(0,n.isFn)(S)?S.prototype[s]=!0:S[s]=!0,S},"markRaw"),y=r(S=>{if(S)return(0,n.isFn)(S)?S.prototype[a]=!0:S[a]=!0,S},"markObservable"),m=r(S=>S!=null&&S[c.ObModelSymbol]?S[c.ObModelSymbol]:c.ProxyRaw.get(S)||S,"raw"),g=r(S=>{const j=new WeakSet,O=r(w=>{if(j.has(w)||w&&w[s])return w;if((0,n.isArr)(w)){if(i(w)){j.add(w);const I=[];return w.forEach(E=>{I.push(O(E))}),j.delete(w),I}}else if((0,n.isPlainObj)(w)&&i(w)){j.add(w);const I={};for(const E in w)u.call(w,E)&&(I[E]=O(w[E]));return j.delete(w),I}return w},"_toJS");return O(S)},"toJS"),x=r((S,j)=>{const O=m(S),w=m(j);if(O===w)return!0;const I=(0,h.getDataNode)(O),E=(0,h.getDataNode)(w);return!I||!E?!1:I.contains(E)},"contains"),P=r(S=>(c.DependencyCollected.value=!1,S==null||S(),c.DependencyCollected.value),"hasCollected");return Fr}var Sr,ks;function Te(){if(ks)return Sr;ks=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(z,B)=>e(z,"name",{value:B,configurable:!0}),b=(z,B)=>{for(var U in B)e(z,U,{get:B[U],enumerable:!0})},v=(z,B,U,J)=>{if(B&&typeof B=="object"||typeof B=="function")for(let Q of o(B))!f.call(z,Q)&&Q!==U&&e(z,Q,{get:()=>B[Q],enumerable:!(J=t(B,Q))||J.enumerable});return z},F=z=>v(e({},"__esModule",{value:!0}),z),_={};b(_,{batchEnd:()=>O,batchScopeEnd:()=>I,batchScopeStart:()=>w,batchStart:()=>j,bindComputedReactions:()=>y,bindTargetKeyWithCurrentReaction:()=>d,disposeBindingReactions:()=>S,disposeEffects:()=>ae,executeBatchEndpoints:()=>Y,executePendingReactions:()=>te,hasDepsChange:()=>re,hasRunningReaction:()=>g,isBatching:()=>N,isScopeBatching:()=>L,isUntracking:()=>q,releaseBindingReactions:()=>x,runReactionsFromTargetKey:()=>m,suspendComputedReactions:()=>P,untrackEnd:()=>R,untrackStart:()=>E}),Sr=F(_);var n=_r(),c=Ue(),h=Pe();const s=Symbol("iteration key"),a=r((z,B,U)=>{const J=h.RawReactionsMap.get(z);if(J){const Q=J.get(B);return Q?Q.add(U):J.set(B,new n.ArraySet([U])),J}else{const Q=new Map([[B,new n.ArraySet([U])]]);return h.RawReactionsMap.set(z,Q),Q}},"addRawReactionsMap"),u=r((z,B)=>{const U=z._reactionsSet;return U?U.add(B):z._reactionsSet=new n.ArraySet([B]),U},"addReactionsMapToReaction"),i=r((z,B)=>{const U=h.RawReactionsMap.get(z),J=[];if(U){const Q=U.get(B);Q&&Q.forEach(ee=>{J.indexOf(ee)===-1&&J.push(ee)})}return J},"getReactionsFromTargetKey"),l=r((z,B)=>{const U=i(z,B),J=h.UntrackCount.value;h.UntrackCount.value=0;for(let Q=0,ee=U.length;Q<ee;Q++){const ne=U[Q];ne._isComputed?ne._scheduler(ne):L()?h.PendingScopeReactions.add(ne):N()?h.PendingReactions.add(ne):(0,c.isFn)(ne._scheduler)?ne._scheduler(ne):ne()}h.UntrackCount.value=J},"runReactions"),p=r(z=>{h.ObserverListeners.forEach(B=>B(z))},"notifyObservers"),d=r(z=>{let{key:B,type:U,target:J}=z;U==="iterate"&&(B=s);const Q=h.ReactionStack.length;if(Q===0)return;const ee=h.ReactionStack[Q-1];q()||ee&&(h.DependencyCollected.value=!0,u(ee,a(J,B,ee)))},"bindTargetKeyWithCurrentReaction"),y=r(z=>{if((0,c.isFn)(z)){const B=h.ReactionStack[h.ReactionStack.length-1];if(B){const U=B._computesSet;U?U.add(z):B._computesSet=new n.ArraySet([z])}}},"bindComputedReactions"),m=r(z=>{let{key:B,type:U,target:J,oldTarget:Q}=z;if(j(),p(z),U==="clear"?Q.forEach((ee,ne)=>{l(J,ne)}):l(J,B),U==="add"||U==="delete"||U==="clear"){const ee=Array.isArray(J)?"length":s;l(J,ee)}O()},"runReactionsFromTargetKey"),g=r(()=>h.ReactionStack.length>0,"hasRunningReaction"),x=r(z=>{var B;(B=z._reactionsSet)==null||B.forEach(U=>{U.forEach(J=>{J.delete(z)})}),h.PendingReactions.delete(z),h.PendingScopeReactions.delete(z),delete z._reactionsSet},"releaseBindingReactions"),P=r(z=>{var B;(B=z._computesSet)==null||B.forEach(U=>{i(U._context,U._property).length===0&&(S(U),U._dirty=!0)})},"suspendComputedReactions"),S=r(z=>{z._disposed=!0,x(z),P(z)},"disposeBindingReactions"),j=r(()=>{h.BatchCount.value++},"batchStart"),O=r(()=>{if(h.BatchCount.value--,h.BatchCount.value===0){const z=h.UntrackCount.value;h.UntrackCount.value=0,te(),Y(),h.UntrackCount.value=z}},"batchEnd"),w=r(()=>{h.BatchScope.value=!0},"batchScopeStart"),I=r(()=>{const z=h.UntrackCount.value;h.BatchScope.value=!1,h.UntrackCount.value=0,h.PendingScopeReactions.batchDelete(B=>{(0,c.isFn)(B._scheduler)?B._scheduler(B):B()}),h.UntrackCount.value=z},"batchScopeEnd"),E=r(()=>{h.UntrackCount.value++},"untrackStart"),R=r(()=>{h.UntrackCount.value--},"untrackEnd"),N=r(()=>h.BatchCount.value>0,"isBatching"),L=r(()=>h.BatchScope.value,"isScopeBatching"),q=r(()=>h.UntrackCount.value>0,"isUntracking"),te=r(()=>{h.PendingReactions.batchDelete(z=>{(0,c.isFn)(z._scheduler)?z._scheduler(z):z()})},"executePendingReactions"),Y=r(()=>{h.BatchEndpoints.batchDelete(z=>{z()})},"executeBatchEndpoints"),re=r((z,B)=>z===B?!1:!!(z.length!==B.length||z.some((U,J)=>U!==B[J])),"hasDepsChange"),ae=r(z=>{if(z._effects)try{j(),z._effects.queue.forEach(B=>{!B||!B.dispose||B.dispose()})}finally{O()}},"disposeEffects");return Sr}var Pr,Ts;function Kl(){if(Ts)return Pr;Ts=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>e(m,"name",{value:g,configurable:!0}),b=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},v=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},F=m=>v(e({},"__esModule",{value:!0}),m),_={};b(_,{baseHandlers:()=>y,collectionHandlers:()=>d}),Pr=F(_);var n=Pe(),c=tt(),h=Ve(),s=Te();const a=new Set(Object.getOwnPropertyNames(Symbol).reduce((m,g)=>{if(g==="arguments"||g==="caller")return m;const x=Symbol[g];return typeof x=="symbol"?m.concat(x):m},[])),u=Object.prototype.hasOwnProperty;function i(m,g,x){const P=n.RawProxy.get(x);return P||(!(0,c.isObservable)(x)&&(0,c.isSupportObservable)(x)?(0,h.createObservable)(m,g,x):x)}r(i,"findObservable");function l(m,g,x,P){const S=x.next;return x.next=()=>{let{done:j,value:O}=S.call(x);return j||(P?O[1]=i(m,g,O[1]):O=i(m,g,O)),{done:j,value:O}},x}r(l,"patchIterator");const p={has(m){const g=n.ProxyRaw.get(this),x=Reflect.getPrototypeOf(this);return(0,s.bindTargetKeyWithCurrentReaction)({target:g,key:m,type:"has"}),x.has.apply(g,arguments)},get(m){const g=n.ProxyRaw.get(this),x=Reflect.getPrototypeOf(this);return(0,s.bindTargetKeyWithCurrentReaction)({target:g,key:m,type:"get"}),i(g,m,x.get.apply(g,arguments))},add(m){const g=n.ProxyRaw.get(this),x=Reflect.getPrototypeOf(this),P=x.has.call(g,m),S=x.add.apply(g,arguments);return P||(0,s.runReactionsFromTargetKey)({target:g,key:m,value:m,type:"add"}),S},set(m,g){const x=n.ProxyRaw.get(this),P=Reflect.getPrototypeOf(this),S=P.has.call(x,m),j=P.get.call(x,m),O=P.set.apply(x,arguments);return S?g!==j&&(0,s.runReactionsFromTargetKey)({target:x,key:m,value:g,oldValue:j,type:"set"}):(0,s.runReactionsFromTargetKey)({target:x,key:m,value:g,type:"add"}),O},delete(m){const g=n.ProxyRaw.get(this),x=Reflect.getPrototypeOf(this),P=x.has.call(g,m),S=x.get?x.get.call(g,m):void 0,j=x.delete.apply(g,arguments);return P&&(0,s.runReactionsFromTargetKey)({target:g,key:m,oldValue:S,type:"delete"}),j},clear(){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this),x=m.size!==0,P=m instanceof Map?new Map(m):new Set(m),S=g.clear.apply(m,arguments);return x&&(0,s.runReactionsFromTargetKey)({target:m,oldTarget:P,type:"clear"}),S},forEach(m,...g){const x=n.ProxyRaw.get(this),P=Reflect.getPrototypeOf(this);(0,s.bindTargetKeyWithCurrentReaction)({target:x,type:"iterate"});const S=r((j,O,...w)=>m(i(x,O,j),O,...w),"wrappedCb");return P.forEach.call(x,S,...g)},keys(){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this);return(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"}),g.keys.apply(m,arguments)},values(){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this);(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"});const x=g.values.apply(m,arguments);return l(m,"",x,!1)},entries(){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this);(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"});const x=g.entries.apply(m,arguments);return l(m,"",x,!0)},[Symbol.iterator](){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this);(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"});const x=g[Symbol.iterator].apply(m,arguments);return l(m,"",x,m instanceof Map)},get size(){const m=n.ProxyRaw.get(this),g=Reflect.getPrototypeOf(this);return(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"}),Reflect.get(g,"size",m)}},d={get(m,g,x){return m=u.call(p,g)?p:m,Reflect.get(m,g,x)}},y={get(m,g,x){if(!g)return;const P=m[g];if(typeof g=="symbol"&&a.has(g))return P;(0,s.bindTargetKeyWithCurrentReaction)({target:m,key:g,receiver:x,type:"get"});const S=n.RawProxy.get(P);if(S)return S;if(!(0,c.isObservable)(P)&&(0,c.isSupportObservable)(P)){const j=Reflect.getOwnPropertyDescriptor(m,g);if(!j||!(j.writable===!1&&j.configurable===!1))return(0,h.createObservable)(m,g,P)}return P},has(m,g){const x=Reflect.has(m,g);return(0,s.bindTargetKeyWithCurrentReaction)({target:m,key:g,type:"has"}),x},ownKeys(m){const g=Reflect.ownKeys(m);return(0,s.bindTargetKeyWithCurrentReaction)({target:m,type:"iterate"}),g},set(m,g,x,P){if(g==="__proto__")return m[g]=x,!0;const S=u.call(m,g),j=(0,h.createObservable)(m,g,x),O=m[g];return m[g]=j,S?x!==O&&(0,s.runReactionsFromTargetKey)({target:m,key:g,value:j,oldValue:O,receiver:P,type:"set"}):(0,s.runReactionsFromTargetKey)({target:m,key:g,value:j,oldValue:O,receiver:P,type:"add"}),!0},deleteProperty(m,g){const x=m[g];return delete m[g],(0,s.runReactionsFromTargetKey)({target:m,key:g,oldValue:x,type:"delete"}),!0}};return Pr}var Or,Vs;function Ve(){if(Vs)return Or;Vs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(P,S)=>e(P,"name",{value:S,configurable:!0}),b=(P,S)=>{for(var j in S)e(P,j,{get:S[j],enumerable:!0})},v=(P,S,j,O)=>{if(S&&typeof S=="object"||typeof S=="function")for(let w of o(S))!f.call(P,w)&&w!==j&&e(P,w,{get:()=>S[w],enumerable:!(O=t(S,w))||O.enumerable});return P},F=P=>v(e({},"__esModule",{value:!0}),P),_={};b(_,{createAnnotation:()=>d,createBindFunction:()=>g,createBoundaryAnnotation:()=>x,createBoundaryFunction:()=>m,createObservable:()=>p,getObservableMaker:()=>y}),Or=F(_);var n=Ue(),c=Pe(),h=tt(),s=Kl(),a=We();const u=r((P,S)=>{const j=new Proxy(P,s.baseHandlers);return c.ProxyRaw.set(j,P),S?c.RawShallowProxy.set(P,j):c.RawProxy.set(P,j),j},"createNormalProxy"),i=r((P,S)=>{const j=new Proxy(P,s.collectionHandlers);return c.ProxyRaw.set(j,P),S?c.RawShallowProxy.set(P,j):c.RawProxy.set(P,j),j},"createCollectionProxy"),l=r(P=>(0,n.isNormalType)(P)?u(P,!0):(0,n.isCollectionType)(P)?i(P,!0):P,"createShallowProxy"),p=r((P,S,j,O)=>{if(typeof j!="object")return j;const w=c.ProxyRaw.get(j);if(w){const I=(0,a.getDataNode)(w);return I.target||(I.target=P),I.key=S,j}if(!(0,h.isSupportObservable)(j))return j;if(P){const I=c.ProxyRaw.get(P)||P;if(c.RawShallowProxy.get(I))return j}return(0,a.buildDataTree)(P,S,j),O?l(j):(0,n.isNormalType)(j)?u(j):(0,n.isCollectionType)(j)?i(j):j},"createObservable"),d=r(P=>{const S=r(j=>P({value:j}),"annotation");return(0,n.isFn)(P)&&(S[c.MakeObModelSymbol]=P),S},"createAnnotation"),y=r(P=>{if(P[c.MakeObModelSymbol])return P[c.MakeObModelSymbol][c.MakeObModelSymbol]?y(P[c.MakeObModelSymbol]):P[c.MakeObModelSymbol]},"getObservableMaker"),m=r((P,S)=>{function j(O){let w;try{P(),(0,n.isFn)(O)&&(w=O())}finally{S()}return w}return r(j,"boundary"),j.bound=g(j),j},"createBoundaryFunction"),g=r(P=>{function S(j,O){return(...w)=>P(()=>j.apply(O,w))}return r(S,"bind"),S},"createBindFunction"),x=r((P,S)=>{const j=m(P,S),O=d(({target:w,key:I})=>(w[I]=j.bound(w[I],w),w));return j[c.MakeObModelSymbol]=O,j.bound[c.MakeObModelSymbol]=O,j},"createBoundaryAnnotation");return Or}var Cr,Bs;function Zl(){if(Bs)return Cr;Bs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},b=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},v=a=>b(e({},"__esModule",{value:!0}),a),F={};r(F,{batch:()=>s}),Cr=v(F);var _=Ue(),n=Pe(),c=Ve(),h=Te();const s=(0,c.createBoundaryAnnotation)(h.batchStart,h.batchEnd);return s.scope=(0,c.createBoundaryAnnotation)(h.batchScopeStart,h.batchScopeEnd),s.endpoint=a=>{(0,_.isFn)(a)&&(n.BatchCount.value===0?a():n.BatchEndpoints.add(a))},Cr}var wr,Ls;function Us(){if(Ls)return wr;Ls=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(h,s)=>{for(var a in s)e(h,a,{get:s[a],enumerable:!0})},b=(h,s,a,u)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of o(s))!f.call(h,i)&&i!==a&&e(h,i,{get:()=>s[i],enumerable:!(u=t(s,i))||u.enumerable});return h},v=h=>b(e({},"__esModule",{value:!0}),h),F={};r(F,{action:()=>c}),wr=v(F);var _=Ve(),n=Te();const c=(0,_.createBoundaryAnnotation)(()=>{(0,n.batchStart)(),(0,n.untrackStart)()},()=>{(0,n.untrackEnd)(),(0,n.batchEnd)()});return c.scope=(0,_.createBoundaryAnnotation)(()=>{(0,n.batchScopeStart)(),(0,n.untrackStart)()},()=>{(0,n.untrackEnd)(),(0,n.batchScopeEnd)()}),wr}var Er,Gs;function Ql(){if(Gs)return Er;Gs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(h,s)=>{for(var a in s)e(h,a,{get:s[a],enumerable:!0})},b=(h,s,a,u)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of o(s))!f.call(h,i)&&i!==a&&e(h,i,{get:()=>s[i],enumerable:!(u=t(s,i))||u.enumerable});return h},v=h=>b(e({},"__esModule",{value:!0}),h),F={};r(F,{untracked:()=>c}),Er=v(F);var _=Ve(),n=Te();const c=(0,_.createBoundaryFunction)(n.untrackStart,n.untrackEnd);return Er}var jr={exports:{}},Ir,Hs;function Xl(){if(Hs)return Ir;Hs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{observable:()=>h}),Ir=F(_);var n=Ve(),c=Te();const h=(0,n.createAnnotation)(({target:s,key:a,value:u})=>{const i={value:(0,n.createObservable)(s,a,s?s[a]:u)};function l(){return(0,c.bindTargetKeyWithCurrentReaction)({target:s,key:a,type:"get"}),i.value}r(l,"get");function p(d){const y=i.value;d=(0,n.createObservable)(s,a,d),i.value=d,y!==d&&(0,c.runReactionsFromTargetKey)({target:s,key:a,type:"set",oldValue:y,value:d})}return r(p,"set"),s?(Object.defineProperty(s,a,{set:p,get:l,enumerable:!0,configurable:!1}),s):i.value});return Ir}var Ar,zs;function $l(){if(zs)return Ar;zs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>e(u,"name",{value:i,configurable:!0}),b=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},v=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{box:()=>a}),Ar=F(_);var n=Pe(),c=Ve(),h=Te(),s=We();const a=(0,c.createAnnotation)(({target:u,key:i,value:l})=>{const p={value:u?u[i]:l},d={set:m,get:y};n.ProxyRaw.set(d,p),n.RawProxy.set(p,d),(0,s.buildDataTree)(u,i,p);function y(){return(0,h.bindTargetKeyWithCurrentReaction)({target:p,key:i,type:"get"}),p.value}r(y,"get");function m(g){const x=p.value;p.value=g,x!==g&&(0,h.runReactionsFromTargetKey)({target:p,key:i,type:"set",oldValue:x,value:g})}return r(m,"set"),u?(Object.defineProperty(u,i,{value:d,enumerable:!0,configurable:!1,writable:!1}),u):d});return Ar}var Dr,Js;function eu(){if(Js)return Dr;Js=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>e(u,"name",{value:i,configurable:!0}),b=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},v=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{ref:()=>a}),Dr=F(_);var n=Pe(),c=Ve(),h=Te(),s=We();const a=(0,c.createAnnotation)(({target:u,key:i,value:l})=>{const p={value:u?u[i]:l},d={},y=u||p,m=u?i:"value";function g(){return(0,h.bindTargetKeyWithCurrentReaction)({target:y,key:m,type:"get"}),p.value}r(g,"get");function x(P){const S=p.value;p.value=P,S!==P&&(0,h.runReactionsFromTargetKey)({target:y,key:m,type:"set",oldValue:S,value:P})}return r(x,"set"),u?(Object.defineProperty(u,i,{get:g,set:x,enumerable:!0}),u):(Object.defineProperty(d,"value",{set:x,get:g}),(0,s.buildDataTree)(u,i,p),d[n.ObModelSymbol]=p,d)});return Dr}var Mr,Ws;function tu(){if(Ws)return Mr;Ws=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{shallow:()=>h}),Mr=F(_);var n=Ve(),c=Te();const h=(0,n.createAnnotation)(({target:s,key:a,value:u})=>{const i={value:(0,n.createObservable)(s,a,s?s[a]:u,!0)};function l(){return(0,c.bindTargetKeyWithCurrentReaction)({target:s,key:a,type:"get"}),i.value}r(l,"get");function p(d){const y=i.value;d=(0,n.createObservable)(s,a,d,!0),i.value=d,y!==d&&(0,c.runReactionsFromTargetKey)({target:s,key:a,type:"set",oldValue:y,value:d})}return r(p,"set"),s?(Object.defineProperty(s,a,{set:p,get:l,enumerable:!0,configurable:!1}),s):i.value});return Mr}var Rr,Ys;function ru(){if(Ys)return Rr;Ys=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(g,x)=>e(g,"name",{value:x,configurable:!0}),b=(g,x)=>{for(var P in x)e(g,P,{get:x[P],enumerable:!0})},v=(g,x,P,S)=>{if(x&&typeof x=="object"||typeof x=="function")for(let j of o(x))!f.call(g,j)&&j!==P&&e(g,j,{get:()=>x[j],enumerable:!(S=t(x,j))||S.enumerable});return g},F=g=>v(e({},"__esModule",{value:!0}),g),_={};b(_,{computed:()=>m}),Rr=F(_);var n=Ue(),c=Pe(),h=Ve(),s=Te(),a=We();const u=Object.getOwnPropertyDescriptor,i=Object.getPrototypeOf,l=Symbol("ClassDescriptorSymbol");function p(g,x){if(g)return u(g,x)||p(i(g),x)}r(p,"getPropertyDescriptor");function d(g,x){const P=g.constructor;if(P===Object||P===Array)return p(g,x);const S=P[l]||{},j=S[x];if(j)return j;const O=p(g,x);return P[l]=S,S[x]=O,O}r(d,"getPropertyDescriptorCache");function y(g,x,P){if(!g)return P?(0,n.isFn)(P)?{get:P}:P:{};const S=d(g,x);return S||{}}r(y,"getPrototypeDescriptor");const m=(0,h.createAnnotation)(({target:g,key:x,value:P})=>{const S={},j={},O=g||S,w=g?x:"value",I=y(g,w,P);function E(){var q;S.value=(q=I.get)==null?void 0:q.call(O)}r(E,"compute");function R(){if(c.ReactionStack.indexOf(R)===-1){(0,s.releaseBindingReactions)(R);try{c.ReactionStack.push(R),E()}finally{c.ReactionStack.pop()}}}r(R,"reaction"),R._name="ComputedReaction",R._scheduler=()=>{R._dirty=!0,(0,s.runReactionsFromTargetKey)({target:O,key:w,value:S.value,type:"set"})},R._isComputed=!0,R._dirty=!0,R._context=O,R._property=w;function N(){return(0,s.hasRunningReaction)()&&(0,s.bindComputedReactions)(R),(0,s.isUntracking)()?E():R._dirty&&(R(),R._dirty=!1),(0,s.bindTargetKeyWithCurrentReaction)({target:O,key:w,type:"get"}),S.value}r(N,"get");function L(q){var te;try{(0,s.batchStart)(),(te=I.set)==null||te.call(O,q)}finally{(0,s.batchEnd)()}}return r(L,"set"),g?(Object.defineProperty(g,x,{get:N,set:L,enumerable:!0}),g):(Object.defineProperty(j,"value",{set:L,get:N}),(0,a.buildDataTree)(g,x,S),j[c.ObModelSymbol]=S,j)});return Rr}var qs;function ou(){return qs||(qs=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Xl(),e.exports),v(_,$l(),e.exports),v(_,eu(),e.exports),v(_,tu(),e.exports),v(_,ru(),e.exports)}(jr)),jr.exports}var Nr,Ks;function Zs(){if(Ks)return Nr;Ks=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(l,p)=>t(l,"name",{value:p,configurable:!0}),F=(l,p)=>{for(var d in p)t(l,d,{get:p[d],enumerable:!0})},_=(l,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of f(p))!b.call(l,m)&&m!==d&&t(l,m,{get:()=>p[m],enumerable:!(y=o(p,m))||y.enumerable});return l},n=(l,p,d)=>(d=l!=null?e(r(l)):{},_(!l||!l.__esModule?t(d,"default",{value:l,enumerable:!0}):d,l)),c=l=>_(t({},"__esModule",{value:!0}),l),h={};F(h,{observable:()=>i}),Nr=c(h);var s=n(ou()),a=Pe(),u=Ve();function i(l){return(0,u.createObservable)(null,null,l)}return v(i,"observable"),i.box=s.box,i.ref=s.ref,i.deep=s.observable,i.shallow=s.shallow,i.computed=s.computed,i[a.MakeObModelSymbol]=s.observable,Nr}var kr,Qs;function nu(){if(Qs)return kr;Qs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{define:()=>l,model:()=>p}),kr=F(_);var n=Us(),c=Ue(),h=Pe(),s=tt(),a=Ve(),u=Zs(),i=We();function l(d,y){if((0,s.isObservable)(d)||!(0,s.isSupportObservable)(d))return d;d[h.ObModelSymbol]=d,(0,i.buildDataTree)(void 0,void 0,d);for(const m in y){const g=y[m];(0,s.isAnnotation)(g)&&(0,a.getObservableMaker)(g)({target:d,key:m})}return d}r(l,"define");function p(d){const y=Object.keys(d||{}).reduce((m,g)=>{const x=Object.getOwnPropertyDescriptor(d,g);return x&&x.get?m[g]=u.observable.computed:(0,c.isFn)(d[g])?m[g]=n.action:m[g]=u.observable,m},{});return l(d,y)}return r(p,"model"),kr}var Tr,Xs;function su(){if(Xs)return Tr;Xs=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{autorun:()=>a,reaction:()=>u}),Tr=F(_);var n=_r(),c=Ue(),h=Pe(),s=Te();const a=r((i,l="AutoRun")=>{const p=r(()=>{if((0,c.isFn)(i)&&!(p._boundary>0)&&h.ReactionStack.indexOf(p)===-1){(0,s.releaseBindingReactions)(p);try{(0,s.batchStart)(),h.ReactionStack.push(p),i()}finally{h.ReactionStack.pop(),p._boundary++,(0,s.batchEnd)(),p._boundary=0,p._memos.cursor=0,p._effects.cursor=0}}},"reaction"),d=r(()=>{p._memos={queue:[],cursor:0},p._effects={queue:[],cursor:0}},"cleanRefs");return p._boundary=0,p._name=l,d(),p(),()=>{(0,s.disposeBindingReactions)(p),(0,s.disposeEffects)(p),d()}},"autorun");a.memo=(i,l)=>{if(!(0,c.isFn)(i))return;const p=h.ReactionStack[h.ReactionStack.length-1];if(!p||!p._memos)throw new Error("autorun.memo must used in autorun function body.");const d=(0,n.toArray)(l||[]),y=p._memos.cursor++,m=p._memos.queue[y];if(!m||(0,s.hasDepsChange)(d,m.deps)){const g=i();return p._memos.queue[y]={value:g,deps:d},g}return m.value},a.effect=(i,l)=>{if(!(0,c.isFn)(i))return;const p=h.ReactionStack[h.ReactionStack.length-1];if(!p||!p._effects)throw new Error("autorun.effect must used in autorun function body.");const d=p._effects,y=(0,n.toArray)(l||[{}]),m=d.cursor++,g=d.queue[m];(!g||(0,s.hasDepsChange)(y,g.deps))&&(Promise.resolve(0).then(()=>{if(p._disposed)return;const x=i();(0,c.isFn)(x)&&(d.queue[m].dispose=x)}),d.queue[m]={deps:y})};const u=r((i,l,p)=>{const d=T({name:"Reaction"},p),y={},m=r(()=>(0,c.isFn)(d.equals)?!d.equals(y.oldValue,y.currentValue):y.oldValue!==y.currentValue,"dirtyCheck"),g=r(()=>{try{(0,s.batchStart)(),(0,c.isFn)(l)&&l(y.currentValue,y.oldValue)}finally{(0,s.batchEnd)()}},"fireAction"),x=r(()=>{if(h.ReactionStack.indexOf(x)===-1){(0,s.releaseBindingReactions)(x);try{h.ReactionStack.push(x),y.currentValue=i()}finally{h.ReactionStack.pop()}}},"reaction");return x._scheduler=P=>{P(),m()&&g(),y.oldValue=y.currentValue},x._name=d.name,x(),y.oldValue=y.currentValue,d.fireImmediately&&g(),()=>{(0,s.disposeBindingReactions)(x)}},"reaction");return Tr}var Vr,$s;function au(){if($s)return Vr;$s=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>e(u,"name",{value:i,configurable:!0}),b=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},v=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{Tracker:()=>a}),Vr=F(_);var n=Ue(),c=Pe(),h=Te();const s=class{constructor(i,l="TrackerReaction"){this.track=r(p=>{if(!(0,n.isFn)(p))return this.results;if(!(this.track._boundary>0)){if(c.ReactionStack.indexOf(this.track)===-1){(0,h.releaseBindingReactions)(this.track);try{(0,h.batchStart)(),c.ReactionStack.push(this.track),this.results=p()}finally{c.ReactionStack.pop(),this.track._boundary++,(0,h.batchEnd)(),this.track._boundary=0}}return this.results}},"track"),this.dispose=r(()=>{(0,h.disposeBindingReactions)(this.track)},"dispose"),this.track._scheduler=p=>{this.track._boundary===0&&this.dispose(),(0,n.isFn)(p)&&i(p)},this.track._name=l,this.track._boundary=0}};r(s,"Tracker");let a=s;return Vr}var Br,ea;function iu(){if(ea)return Br;ea=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>e(u,"name",{value:i,configurable:!0}),b=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},v=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{observe:()=>a}),Br=F(_);var n=Ue(),c=Pe(),h=tt(),s=We();const a=r((u,i,l=!0)=>{const p=r(d=>{const y=(0,h.raw)(d),m=(0,s.getDataNode)(y),g=r(x=>{const P=(0,h.raw)(x.target),S=(0,s.getDataNode)(P);if(l&&m.contains(S)){i(new s.DataChange(x,S));return}(m===S||m.targetRaw===P&&m.key===x.key)&&i(new s.DataChange(x,S))},"listener");return m&&(0,n.isFn)(i)&&c.ObserverListeners.add(g),()=>{c.ObserverListeners.delete(g)}},"addListener");if(u&&typeof u!="object")throw Error(`Can not observe ${typeof u} type.`);return p(u)},"observe");return Br}var Lr={exports:{}},ta;function cu(){return ta||(ta=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,We(),e.exports)}(Lr)),Lr.exports}var ra;function Oe(){return ra||(ra=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Zl(),e.exports),v(_,Us(),e.exports),v(_,Ql(),e.exports),v(_,Zs(),e.exports),v(_,nu(),e.exports),v(_,su(),e.exports),v(_,au(),e.exports),v(_,iu(),e.exports),v(_,tt(),e.exports),v(_,cu(),e.exports)}(br)),br.exports}var Ur,oa;function na(){if(oa)return Ur;oa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(S,j)=>e(S,"name",{value:j,configurable:!0}),b=(S,j)=>{for(var O in j)e(S,O,{get:j[O],enumerable:!0})},v=(S,j,O,w)=>{if(j&&typeof j=="object"||typeof j=="function")for(let I of o(j))!f.call(S,I)&&I!==O&&e(S,I,{get:()=>j[I],enumerable:!(w=t(j,I))||w.enumerable});return S},F=S=>v(e({},"__esModule",{value:!0}),S),_={};b(_,{SchemaNestedMap:()=>a,SchemaNormalKeys:()=>l,SchemaStateMap:()=>u,SchemaValidatorKeys:()=>p,SchemaValidatorMap:()=>i,createDataSource:()=>x,hasOwnProperty:()=>d,isNoNeedCompileObject:()=>g,patchStateFormSchema:()=>P,traverse:()=>y,traverseSchema:()=>m}),Ur=F(_);var n=Oe(),c=ue(),h=ti();const s=Symbol.for("__REVA_ACTIONS"),a={parent:!0,root:!0,properties:!0,patternProperties:!0,additionalProperties:!0,items:!0,additionalItems:!0,"x-linkages":!0,"x-reactions":!0},u={title:"title",description:"description",default:"initialValue",enum:"dataSource",readOnly:"readOnly",writeOnly:"editable","x-content":"content","x-data":"data","x-value":"value","x-editable":"editable","x-disabled":"disabled","x-read-pretty":"readPretty","x-read-only":"readOnly","x-visible":"visible","x-hidden":"hidden","x-display":"display","x-pattern":"pattern","x-validator":"validator","x-decorator":"decoratorType","x-component":"componentType","x-decorator-props":"decoratorProps","x-component-props":"componentProps"},i={required:!0,format:!0,maxItems:!0,minItems:!0,maxLength:!0,minLength:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,pattern:!0,const:!0,multipleOf:!0,maxProperties:!0,minProperties:!0,uniqueItems:!0},l=Object.keys(u),p=Object.keys(i),d=Object.prototype.hasOwnProperty,y=r((S,j)=>{const O=[],w=S,I=r((E,R=[])=>{if((0,c.isPlainObj)(E)){if(O.indexOf(E)>-1)return;const L=O.length;if(O.push(E),g(E)&&w!==E){j(E,R);return}(0,c.each)(E,(q,te)=>{I(q,R.concat(te))}),O.splice(L,1)}else j(E,R)},"traverse");I(S)},"traverse"),m=r((S,j)=>{var O;S["x-validator"]!==void 0&&j(S["x-validator"],["x-validator"],(O=S["x-compile-omitted"])==null?void 0:O.includes("x-validator"));const w=[],I=S,E=r((R,N=[])=>{var L;if(!(N[0]==="x-compile-omitted"||N[0]==="x-validator"||N[0]==="version"||N[0]==="_isJSONSchemaObject")&&!(String(N[0]).indexOf("x-")===-1&&(0,c.isFn)(R))&&!a[N[0]]){if(((L=S["x-compile-omitted"])==null?void 0:L.indexOf(N[0]))>-1){j(R,N,!0);return}if((0,c.isPlainObj)(R)){if(N[0]==="default"||N[0]==="x-value"){j(R,N);return}if(w.indexOf(R)>-1)return;const te=w.length;if(w.push(R),g(R)&&I!==R){j(R,N);return}(0,c.each)(R,(Y,re)=>{E(Y,N.concat(re))}),w.splice(te,1)}else j(R,N)}},"traverse");E(S)},"traverseSchema"),g=r(S=>!!("$$typeof"in S&&"_owner"in S||S._isAMomentObject||h.Schema.isSchemaInstance(S)||S[s]||(0,c.isFn)(S.toJS)||(0,c.isFn)(S.toJSON)||(0,n.isObservable)(S)),"isNoNeedCompileObject"),x=r(S=>(0,c.toArr)(S).map(j=>typeof j=="object"?j:{label:j,value:j}),"createDataSource"),P=r((S,j,O)=>{(0,n.untracked)(()=>{var w;const E=c.FormPath.parse(j).segments,R=E[0],N=R==="enum"&&(0,c.isArr)(O),L=u[R];L?c.FormPath.setIn(S,[L].concat(E.slice(1)),N?x(O):O):i[R]&&((w=S.setValidatorRule)==null||w.call(S,R,O))})},"patchStateFormSchema");return Ur}var Gr,sa;function aa(){if(sa)return Gr;sa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>e(m,"name",{value:g,configurable:!0}),b=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},v=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},F=m=>v(e({},"__esModule",{value:!0}),m),_={};b(_,{compile:()=>p,patchCompile:()=>d,patchSchemaCompile:()=>y,registerCompiler:()=>i,shallowCompile:()=>l,silent:()=>u}),Gr=F(_);var n=Oe(),c=ue(),h=na();const s=/^\s*\{\{([\s\S]*)\}\}\s*$/,a={silent:!1,compile(m,g={}){if(a.silent)try{return new Function("$root",`with($root) { return (${m}); }`)(g)}catch(x){}else return new Function("$root",`with($root) { return (${m}); }`)(g)}},u=r((m=!0)=>{a.silent=!!m},"silent"),i=r(m=>{(0,c.isFn)(m)&&(a.compile=m)},"registerCompiler"),l=r((m,g)=>{if((0,c.isStr)(m)){const x=m.match(s);return x?a.compile(x[1],g):m}return m},"shallowCompile"),p=r((m,g)=>{const x=[],P=r(S=>{if((0,c.isStr)(S))return l(S,g);if((0,c.isArr)(S))return S.map(j=>P(j));if((0,c.isPlainObj)(S)){if((0,h.isNoNeedCompileObject)(S)||x.indexOf(S)>-1)return S;const O=x.length;x.push(S);const w=(0,c.reduce)(S,(I,E,R)=>(I[R]=P(E),I),{});return x.splice(O,1),w}return S},"compile");return P(m)},"compile"),d=r((m,g,x)=>{(0,h.traverse)(g,(P,S)=>{const j=p(P,x);if(j===void 0)return;const O=c.FormPath.parse(S),w=O.segments[0];h.hasOwnProperty.call(m,w)&&(0,n.untracked)(()=>c.FormPath.setIn(m,O,j))})},"patchCompile"),y=r((m,g,x,P=!1)=>{(0,h.traverseSchema)(g,(S,j,O)=>{let w=S,I=(0,n.hasCollected)(()=>{O||(w=p(S,x))});w!==void 0&&(P?(I||!m.initialized)&&(0,h.patchStateFormSchema)(m,j,w):(0,h.patchStateFormSchema)(m,j,w))})},"patchSchemaCompile");return Gr}var Hr,ia;function ca(){if(ia)return Hr;ia=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,p)=>e(l,"name",{value:p,configurable:!0}),b=(l,p)=>{for(var d in p)e(l,d,{get:p[d],enumerable:!0})},v=(l,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of o(p))!f.call(l,m)&&m!==d&&e(l,m,{get:()=>p[m],enumerable:!(y=t(p,m))||y.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{enablePolyfills:()=>i,reducePatches:()=>s,registerPatches:()=>a,registerPolyfills:()=>u}),Hr=F(_);var n=ue();const c=[],h={},s=r(l=>c.reduce((p,d)=>d(p),T({},l)),"reducePatches"),a=r((...l)=>{l.forEach(p=>{(0,n.isFn)(p)&&c.push(p)})},"registerPatches"),u=r((l,p)=>{l&&(0,n.isFn)(p)&&(h[l]=h[l]||[],h[l].push(p))},"registerPolyfills"),i=r(l=>{(0,n.isArr)(l)&&l.forEach(p=>{(0,n.isArr)(h[p])&&h[p].forEach(d=>{a(d)})})},"enablePolyfills");return Hr}var zr={exports:{}},Jr,la;function lu(){if(la)return Jr;la=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{registerTypeDefaultComponents:()=>p,registerVoidComponents:()=>l}),Jr=F(_);var n=ue(),c=ca();const h=["card","block","grid-col","grid-row","grid","layout","step","tab","text-box"],s={},a=r(d=>{if((0,n.isStr)(d))return d.replace(/\$value/,"$self.value")},"transformCondition"),u=r(d=>(0,n.isArr)(d)?d.reduce((y,m)=>{if(!m)return y;if(m.type==="value:visible")return y.concat({target:m.target,when:a(m.condition),fulfill:{state:{visible:!0}},otherwise:{state:{visible:!1}}});if(m.type==="value:schema")return y.concat({target:m.target,when:a(m.condition),fulfill:{schema:i(T({version:"1.0"},m.schema))},otherwise:{schema:i(T({version:"1.0"},m.otherwise))}});if(m.type==="value:state")return y.concat({target:m.target,when:a(m.condition),fulfill:{state:m.state},otherwise:{state:m.otherwise}})},[]):[],"transformXLinkage"),i=r(d=>((0,n.isValid)(d.editable)&&(d["x-editable"]=d["x-editable"]||d.editable,delete d.editable),(0,n.isValid)(d.visible)&&(d["x-visible"]=d["x-visible"]||d.visible,delete d.visible),(0,n.isValid)(d.display)&&(d["x-display"]=d["x-display"]||(d.display?"visible":"hidden"),delete d.display),(0,n.isValid)(d["x-props"])&&(d["x-decorator-props"]=d["x-decorator-props"]||d["x-props"],delete d.display),d["x-linkages"]&&(d["x-reactions"]=(0,n.toArr)(d["x-reactions"]).concat(u(d["x-linkages"])),delete d["x-linkages"]),d["x-component"]?h.some(y=>(0,n.lowerCase)(y)===(0,n.lowerCase)(d["x-component"]))&&(d.type="void"):s[d.type]&&(d["x-component"]=s[d.type]),!d["x-decorator"]&&d.type!=="void"&&d.type!=="object"&&(d["x-decorator"]=d["x-decorator"]||"FormItem"),d["x-rules"]&&(d["x-validator"]=[].concat(d["x-validator"]||[]).concat(d["x-rules"])),d),"SpecificationV1Polyfill");(0,c.registerPolyfills)("1.0",i);const l=r(d=>{h.push(...d)},"registerVoidComponents"),p=r(d=>{Object.assign(s,d)},"registerTypeDefaultComponents");return Jr}var ua;function uu(){return ua||(ua=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,lu(),e.exports)}(zr)),zr.exports}var Wr={exports:{}},Yr={exports:{}},qr,pa;function pu(){if(pa)return qr;pa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(n,c)=>{for(var h in c)e(n,h,{get:c[h],enumerable:!0})},b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of o(c))!f.call(n,a)&&a!==h&&e(n,a,{get:()=>c[a],enumerable:!(s=t(c,a))||s.enumerable});return n},v=n=>b(e({},"__esModule",{value:!0}),n),F={};r(F,{default:()=>_}),qr=v(F);var _={url:new RegExp("^(?:(?:(?:https?|ftp|rtmp):)?//)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:22[0-3]|2[01]\\d|[1-9]\\d?|1\\d\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1?\\d{1,2})){2}(?:\\.(?:25[0-4]|2[0-4]\\d|1\\d\\d|[1-9]\\d?))|(?:(?:[a-z\\u00a1-\\uffff0-9_]-*)*[a-z\\u00a1-\\uffff0-9_]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9_]-*)*[a-z\\u00a1-\\uffff0-9_]+)*(?:\\.(?:[a-z\\u00a1-\\uffff_]{2,})))(?::\\d{2,5})?(?:/?\\S*)?$"),email:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,ipv4:/^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$/,number:/^[+-]?\d+(\.\d+)?$/,integer:/^[+-]?\d+$/,qq:/^(\+?[1-9]\d*|0)$/,phone:/^\d{3}-\d{8}$|^\d{4}-\d{7}$|^\d{11}$/,idcard:/^\d{15}$|^\d{17}(\d|x|X)$/,money:/^([\u0024\u00A2\u00A3\u00A4\u20AC\u00A5\u20B1\u20B9\uFFE5]\s*)(\d+,?)+(\.\d+)?\s*$/,zh:/^[\u4e00-\u9fa5]+$/,date:/^[0-9]+[./-][0-9]+[./-][0-9]+\s*(?:[0-9]+\s*:\s*[0-9]+\s*:\s*[0-9]+)?$/,zip:/^[0-9]{6}$/};return qr}var Kr,da;function du(){if(da)return Kr;da=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(n,c)=>{for(var h in c)e(n,h,{get:c[h],enumerable:!0})},b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of o(c))!f.call(n,a)&&a!==h&&e(n,a,{get:()=>c[a],enumerable:!(s=t(c,a))||s.enumerable});return n},v=n=>b(e({},"__esModule",{value:!0}),n),F={};r(F,{default:()=>_}),Kr=v(F);var _={en:{pattern:"This field is invalid",invalid:"This field is invalid",required:"The field value is required",number:"The field value is not a number",integer:"The field value is not an integer number",url:"The field value is a invalid url",email:"The field value is not a email format",ipv6:"The field value is not a ipv6 format",ipv4:"The field value is not a ipv4 format",idcard:"The field value is not an idcard format",qq:"The field value is not a qq number format",phone:"The field value is not a phone number format",money:"The field value is not a currency format",zh:"The field value is not a chinese string",date:"The field value is not a valid date format",zip:"The field value is not a zip format",len:"The length or number of entries must be {{len}}",min:"The length or number of entries must be at least {{min}}",minLength:"The length or number of entries must be at least {{minLength}}",minItems:"The length or number of entries must be at least {{minItems}}",maximum:"The field value cannot be greater than {{maximum}}",exclusiveMaximum:"The field value must be less than {{exclusiveMaximum}}",minimum:"The field value cannot be less than {{minimum}}",exclusiveMinimum:"The field value must be greater than {{exclusiveMinimum}}",max:"The field length or number of entries must be at most {{max}}",maxLength:"The field length or number of entries must be at most {{maxLength}}",maxItems:"The field length or number of entries must be at most {{maxItems}}",whitespace:"This field value cannot be blank string.",enum:"The field value must be one of {{enum}}",const:"The field value must be equal to {{const}}",multipleOf:"The field value must be divisible by {{multipleOf}}",maxProperties:"The number of field properties cannot be greater than {{maxProperties}}",minProperties:"The number of field properties cannot be less than {{maxProperties}}",uniqueItems:"Array elements are not unique"},zh:{pattern:"该字段不是一个合法的字段",invalid:"该字段不是一个合法的字段",required:"该字段是必填字段",number:"该字段不是合法的数字",integer:"该字段不是合法的整型数字",url:"该字段不是合法的url",email:"该字段不是合法的邮箱格式",ipv6:"该字段不是合法的ipv6格式",ipv4:"该字段不是合法的ipv4格式",idcard:"该字段不是合法的身份证格式",qq:"该字段不符合QQ号格式",phone:"该字段不是有效的手机号",money:"该字段不是有效货币格式",zh:"该字段不是合法的中文字符串",date:"该字段不是合法的日期格式",zip:"该字段不是合法的邮编格式",len:"长度或条目数必须为{{len}}",min:"长度或条目数不能小于{{min}}",minLength:"长度或条目数不能小于{{minLength}}",minItems:"长度或条目数不能小于{{minItems}}",max:"长度或条目数不能大于{{max}}",maxLength:"长度或条目数不能大于{{maxLength}}",maxItems:"长度或条目数不能大于{{maxItems}}",maximum:"数值不能大于{{maximum}}",exclusiveMaximum:"数值必须小于{{exclusiveMaximum}}",minimum:"数值不能小于{{minimum}}",exclusiveMinimum:"数值必须大于{{exclusiveMinimum}}",whitespace:"不能为纯空白字符串",enum:"字段值必须为{{enum}}其中一个",const:"字段值必须等于{{const}}",multipleOf:"字段值不能被{{multipleOf}}整除",maxProperties:"字段属性数量不能大于{{maxProperties}}",minProperties:"字段属性数量不能小于{{minProperties}}",uniqueItems:"数组元素不唯一"},"en-US":{pattern:"This field is invalid",invalid:"This field is invalid",required:"The field value is required",number:"The field value is not a number",integer:"The field value is not an integer number",url:"The field value is a invalid url",email:"The field value is not a email format",ipv6:"The field value is not a ipv6 format",ipv4:"The field value is not a ipv4 format",idcard:"The field value is not an idcard format",qq:"The field value is not a qq number format",phone:"The field value is not a phone number format",money:"The field value is not a currency format",zh:"The field value is not a chinese string",date:"The field value is not a valid date format",zip:"The field value is not a zip format",len:"The length or number of entries must be {{len}}",min:"The length or number of entries must be at least {{min}}",minLength:"The length or number of entries must be at least {{minLength}}",minItems:"The length or number of entries must be at least {{minItems}}",maximum:"The field value cannot be greater than {{maximum}}",exclusiveMaximum:"The field value must be less than {{exclusiveMaximum}}",minimum:"The field value cannot be less than {{minimum}}",exclusiveMinimum:"The field value must be greater than {{exclusiveMinimum}}",max:"The field length or number of entries must be at most {{max}}",maxLength:"The field length or number of entries must be at most {{maxLength}}",maxItems:"The field length or number of entries must be at most {{maxItems}}",whitespace:"This field value cannot be blank string.",enum:"The field value must be one of {{enum}}",const:"The field value must be equal to {{const}}",multipleOf:"The field value must be divisible by {{multipleOf}}",maxProperties:"The number of field properties cannot be greater than {{maxProperties}}",minProperties:"The number of field properties cannot be less than {{maxProperties}}",uniqueItems:"Array elements are not unique"},"zh-CN":{pattern:"该字段不是一个合法的字段",invalid:"该字段不是一个合法的字段",required:"该字段是必填字段",number:"该字段不是合法的数字",integer:"该字段不是合法的整型数字",url:"该字段不是合法的url",email:"该字段不是合法的邮箱格式",ipv6:"该字段不是合法的ipv6格式",ipv4:"该字段不是合法的ipv4格式",idcard:"该字段不是合法的身份证格式",qq:"该字段不符合QQ号格式",phone:"该字段不是有效的手机号",money:"该字段不是有效货币格式",zh:"该字段不是合法的中文字符串",date:"该字段不是合法的日期格式",zip:"该字段不是合法的邮编格式",len:"长度或条目数必须为{{len}}",min:"长度或条目数不能小于{{min}}",minLength:"长度或条目数不能小于{{minLength}}",minItems:"长度或条目数不能小于{{minItems}}",maxLength:"长度或条目数不能大于{{maxLength}}",maxItems:"长度或条目数不能大于{{maxItems}}",max:"长度或条目数不能大于{{max}}",maximum:"数值不能大于{{maximum}}",exclusiveMaximum:"数值必须小于{{exclusiveMaximum}}",minimum:"数值不能小于{{minimum}}",exclusiveMinimum:"数值必须大于{{exclusiveMinimum}}",whitespace:"不能为纯空白字符串",enum:"字段值必须为{{enum}}其中一个",const:"字段值必须等于{{const}}",multipleOf:"字段值不能被{{multipleOf}}整除",maxProperties:"字段属性数量不能大于{{maxProperties}}",minProperties:"字段属性数量不能小于{{minProperties}}",uniqueItems:"数组元素不唯一"},"zh-TW":{pattern:"該字段不是一個合法的字段",invalid:"該字段不是一個合法的字段",required:"該字段是必填字段",number:"該字段不是合法的數字",integer:"該字段不是合法的整型數字",url:"該字段不是合法的url",email:"該字段不是合法的郵箱格式",ipv6:"該字段不是合法的ipv6格式",ipv4:"該字段不是合法的ipv4格式",idcard:"該字段不是合法的身份證格式",qq:"該字段不符合QQ號格式",phone:"該字段不是有效的手機號",money:"該字段不是有效貨幣格式",zh:"該字段不是合法的中文字符串",date:"該字段不是合法的日期格式",zip:"該字段不是合法的郵編格式",len:"長度或條目數必須為{{len}}",min:"長度或條目數不能小於{{min}}",minItems:"長度或條目數不能小於{{minItems}}",minLength:"長度或條目數不能小於{{minLength}}",max:"長度或條目數不能大於{{max}}",maxItems:"長度或條目數不能大於{{maxItems}}",maxLength:"長度或條目數不能大於{{maxLength}}",maximum:"數值不能大於{{maximum}}",exclusiveMaximum:"數值必須小於{{exclusiveMaximum}}",minimum:"數值不能小於{{minimum}}",exclusiveMinimum:"數值必須大於{{exclusiveMinimum}}",whitespace:"不能為純空白字符串",enum:"字段值必須為{{enum}}其中一個",const:"字段值必須等於{{const}}",multipleOf:"字段值不能被{{multipleOf}}整除",maxProperties:"字段屬性數量不能大於{{maxProperties}}",minProperties:"字段屬性數量不能小於{{minProperties}}",uniqueItems:"數組元素不唯一"},ja:{url:"このフィールドは無効なURLです",whitespace:"このフィールドを空の文字列にすることはできません。",zh:"このフィールドは中国語の文字列ではありません",zip:"このフィールドはzip形式ではありません",date:"このフィールドは有効な日付形式ではありません",email:"このフィールドはメール形式ではありません",exclusiveMaximum:"値は{{exclusiveMaximum}}未満である必要があります",exclusiveMinimum:"値は{{exclusiveMinimum}}より大きい必要があります",idcard:"このフィールドはIDカード形式ではありません",integer:"このフィールドは整数ではありません",ipv4:"このフィールドはIPv4形式ではありません",ipv6:"このフィールドはIPv6形式ではありません",len:"エントリの長さまたは数は{{len}}でなければなりません",max:"エントリの長さまたは数は最大{{max}}でなければなりません",maxItems:"エントリの長さまたは数は最大{{maxItems}}でなければなりません",maxLength:"エントリの長さまたは数は最大{{maxLength}}でなければなりません",maximum:"値は{{最大}}を超えることはできません",min:"エントリの長さまたは数は、少なくとも{{min}}である必要があります",minItems:"エントリの長さまたは数は、少なくとも{{minItems}}である必要があります",minLength:"エントリの長さまたは数は、少なくとも{{minLength}}である必要があります",minimum:"値は{{minimum}}以上にする必要があります",money:"このフィールドは通貨形式ではありません",number:"このフィールドは数値ではありません",pattern:"このフィールドはどのパターンとも一致しません",invalid:"このフィールドはどのパターンとも一致しません",phone:"このフィールドは電話番号の形式ではありません",qq:"このフィールドはqq数値形式ではありません",required:"この項目は必須です",enum:"フィールド値は{{enum}}のいずれかである必要があります",cons:"フィールド値は{{const}}と等しくなければなりません",multipleOf:"フィールド値を{{multipleOf}}で割り切れない",maxProperties:"フィールドプロパティの数は{{maxProperties}}を超えることはできません",minProperties:"フィールドプロパティの数は{{minProperties}}未満にすることはできません",uniqueItems:"配列要素は一意ではありません"}};return Kr}var Zr,ma;function at(){if(ma)return Zr;ma=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(I,E)=>e(I,"name",{value:E,configurable:!0}),b=(I,E)=>{for(var R in E)e(I,R,{get:E[R],enumerable:!0})},v=(I,E,R,N)=>{if(E&&typeof E=="object"||typeof E=="function")for(let L of o(E))!f.call(I,L)&&L!==R&&e(I,L,{get:()=>E[L],enumerable:!(N=t(E,L))||N.enumerable});return I},F=I=>v(e({},"__esModule",{value:!0}),I),_={};b(_,{getLocaleByPath:()=>y,getValidateFormats:()=>x,getValidateLanguage:()=>d,getValidateLocale:()=>m,getValidateLocaleIOSCode:()=>l,getValidateMessageTemplateEngine:()=>g,getValidateRules:()=>P,registerValidateFormats:()=>O,registerValidateLocale:()=>S,registerValidateMessageTemplateEngine:()=>w,registerValidateRules:()=>j,setValidateLanguage:()=>p}),Zr=F(_);var n=ue();const c=n.FormPath.getIn,h=n.globalThisPolyfill,s="en",u={locales:{messages:{},language:r(()=>h.navigator&&(h.navigator.browserlanguage||h.navigator.language)||s,"getBrowserlanguage")()},formats:{},rules:{},template:null},i=r(I=>{let E=u.locales.language;if(u.locales.messages[I])return I;const R=(0,n.lowerCase)(I);return(0,n.each)(u.locales.messages,(N,L)=>{const q=(0,n.lowerCase)(L);if(q.indexOf(R)>-1||R.indexOf(q)>-1)return E=L,!1}),E},"getISOCode"),l=i,p=r(I=>{u.locales.language=I||s},"setValidateLanguage"),d=r(()=>u.locales.language,"getValidateLanguage"),y=r((I,E=u.locales.language)=>c(u.locales.messages,`${i(E)}.${I}`),"getLocaleByPath"),m=r(I=>y(I)||y("pattern")||y("pattern",s),"getValidateLocale"),g=r(()=>u.template,"getValidateMessageTemplateEngine"),x=r(I=>I?u.formats[I]:u.formats,"getValidateFormats"),P=r(I=>I?u.rules[I]:u.rules,"getValidateRules"),S=r(I=>{u.locales.messages=(0,n.merge)(u.locales.messages,I)},"registerValidateLocale"),j=r(I=>{(0,n.each)(I,(E,R)=>{(0,n.isFn)(E)&&(u.rules[R]=E)})},"registerValidateRules"),O=r(I=>{(0,n.each)(I,(E,R)=>{((0,n.isStr)(E)||E instanceof RegExp)&&(u.formats[R]=new RegExp(E))})},"registerValidateFormats"),w=r(I=>{u.template=I},"registerValidateMessageTemplateEngine");return Zr}var Qr,fa;function mu(){if(fa)return Qr;fa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{render:()=>h}),Qr=F(_);var n=ue(),c=at();const h=r((s,a)=>{const{message:u}=s;if((0,n.isStr)(u)){const i=(0,c.getValidateMessageTemplateEngine)();(0,n.isFn)(i)&&(s.message=i(u,a)),s.message=s.message.replace(/\{\{\s*([\w.]+)\s*\}\}/g,(l,p)=>n.FormPath.getIn(a,p))}return s},"render");return Qr}var Xr,ha;function ba(){if(ha)return Xr;ha=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(c,h)=>e(c,"name",{value:h,configurable:!0}),b=(c,h)=>{for(var s in h)e(c,s,{get:h[s],enumerable:!0})},v=(c,h,s,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let u of o(h))!f.call(c,u)&&u!==s&&e(c,u,{get:()=>h[u],enumerable:!(a=t(h,u))||a.enumerable});return c},F=c=>v(e({},"__esModule",{value:!0}),c),_={};b(_,{isValidateResult:()=>n}),Xr=F(_);const n=r(c=>!!c.type&&!!c.message,"isValidateResult");return Xr}var $r,va;function ya(){if(va)return $r;va=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{parseValidator:()=>p,parseValidatorDescription:()=>u,parseValidatorDescriptions:()=>i,parseValidatorRules:()=>l}),$r=F(_);var n=ue(),c=at(),h=mu(),s=ba();const a=r((d,y)=>d.format?d.message||(0,c.getValidateLocale)(d.format):d.message||(0,c.getValidateLocale)(y),"getRuleMessage"),u=r(d=>{if(!d)return{};let y={};return(0,n.isStr)(d)?y.format=d:(0,n.isFn)(d)?y.validator=d:y=Object.assign(y,d),y},"parseValidatorDescription"),i=r(d=>d?((0,n.isArr)(d)?d:[d]).map(m=>u(m)):[],"parseValidatorDescriptions"),l=r((d={})=>{const y=r(()=>{const x=[];"required"in d&&x.push("required");for(let P in d)P==="required"||P==="validator"||x.push(P);return"validator"in d&&x.push("validator"),x},"getRulesKeys"),m=r((x,P)=>W(T(T({},d),x),{value:P}),"getContext"),g=r((x,P)=>(S,j)=>ie(null,null,function*(){const O=m(j,S);try{const w=yield x(S,W(T({},d),{message:P}),O,(I,E)=>{var R;return(R=(0,h.render)({type:"error",message:I},Object.assign(O,E)))==null?void 0:R.message});return(0,n.isBool)(w)?w?{type:"error",message:void 0}:(0,h.render)({type:"error",message:P},O):w?(0,s.isValidateResult)(w)?(0,h.render)(w,O):(0,h.render)({type:"error",message:w},O):{type:"error",message:void 0}}catch(w){return{type:"error",message:(w==null?void 0:w.message)||w}}}),"createValidate");return y().reduce((x,P)=>{const S=(0,c.getValidateRules)(P);if(S){const j=g(S,a(d,P));return x.concat(j)}return x},[])},"parseValidatorRules"),p=r((d,y={})=>d?((0,n.isArr)(d)?d:[d]).reduce((g,x)=>{var j;const P=u(x),S=(j=P.triggerType)!=null?j:"onInput";return y!=null&&y.triggerType&&y.triggerType!==S?g:P?g.concat(l(P)):g},[]):[],"parseValidator");return $r}var eo,_a;function fu(){if(_a)return eo;_a=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(p,d)=>e(p,"name",{value:d,configurable:!0}),b=(p,d)=>{for(var y in d)e(p,y,{get:d[y],enumerable:!0})},v=(p,d,y,m)=>{if(d&&typeof d=="object"||typeof d=="function")for(let g of o(d))!f.call(p,g)&&g!==y&&e(p,g,{get:()=>d[g],enumerable:!(m=t(d,g))||m.enumerable});return p},F=p=>v(e({},"__esModule",{value:!0}),p),_={};b(_,{default:()=>i}),eo=F(_);var n=ue(),c=at();const h=r(p=>{var d;if((0,n.isArr)(p)){for(let y=0;y<p.length;y++)if((0,n.isValid)(p[y]))return!1;return!0}else return p!=null&&p.getCurrentContent?!((d=p.getCurrentContent())!=null&&d.hasText()):(0,n.isEmpty)(p)},"isValidateEmpty"),s=r(p=>(0,n.isStr)(p)?(0,n.stringLength)(p):p?p.length:0,"getLength"),a=r((p,d)=>{(0,n.each)(d,(y,m)=>{p[m]=(g,x,...P)=>p[y](g,W(T({},x),{[y]:x[m]}),...P)})},"extendSameRules"),u={format(p,d){if(h(p))return"";if(d.format){const y=(0,c.getValidateFormats)(d.format);if(y)return new RegExp(y).test(p)?"":d.message}return""},required(p,d){return d.required===!1?"":h(p)?d.message:""},max(p,d){if(h(p))return"";const y=(0,n.isNum)(p)?p:s(p),m=Number(d.max);return y>m?d.message:""},min(p,d){if(h(p))return"";const y=(0,n.isNum)(p)?p:s(p),m=Number(d.min);return y<m?d.message:""},exclusiveMaximum(p,d){if(h(p))return"";const y=(0,n.isNum)(p)?p:s(p),m=Number(d.exclusiveMaximum);return y>=m?d.message:""},exclusiveMinimum(p,d){if(h(p))return"";const y=(0,n.isNum)(p)?p:s(p),m=Number(d.exclusiveMinimum);return y<=m?d.message:""},len(p,d){if(h(p))return"";const y=s(p),m=Number(d.len);return y!==m?d.message:""},pattern(p,d){return h(p)||new RegExp(d.pattern).test(p)?"":d.message},validator(p,d,y,m){return ie(this,null,function*(){if((0,n.isFn)(d.validator)){const g=yield Promise.resolve(d.validator(p,d,y,m));return(0,n.isBool)(g)?g?"":d.message:g}throw new Error("The rule's validator property must be a function.")})},whitespace(p,d){if(h(p))return"";if(d.whitespace)return/^\s+$/.test(p)?d.message:""},enum(p,d){return h(p)?"":(0,n.toArr)(d.enum).indexOf(p)===-1?d.message:""},const(p,d){return h(p)?"":d.const!==p?d.message:""},multipleOf(p,d){return h(p)?"":Number(p)%Number(d.multipleOf)!==0?d.message:""},uniqueItems(p,d){return h(p)?"":(p=(0,n.toArr)(p),p.some((y,m)=>{for(let g=0;g<p.length;g++)if(g!==m&&!(0,n.isEqual)(p[g],y))return!1;return!0})?"":d.message)},maxProperties(p,d){return h(p)||Object.keys(p||{}).length<=Number(d.maxProperties)?"":d.message},minProperties(p,d){return h(p)||Object.keys(p||{}).length>=Number(d.minProperties)?"":d.message}};a(u,{maximum:"max",minimum:"min",maxItems:"max",minItems:"min",maxLength:"max",minLength:"min"});var i=u;return eo}var to,xa;function hu(){if(xa)return to;xa=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(d,y)=>t(d,"name",{value:y,configurable:!0}),F=(d,y)=>{for(var m in y)t(d,m,{get:y[m],enumerable:!0})},_=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of f(y))!b.call(d,x)&&x!==m&&t(d,x,{get:()=>y[x],enumerable:!(g=o(y,x))||g.enumerable});return d},n=(d,y,m)=>(m=d!=null?e(r(d)):{},_(!d||!d.__esModule?t(m,"default",{value:d,enumerable:!0}):m,d)),c=d=>_(t({},"__esModule",{value:!0}),d),h={};F(h,{validate:()=>p}),to=c(h);var s=n(pu()),a=n(du()),u=ya(),i=at(),l=n(fu());(0,i.registerValidateRules)(l.default),(0,i.registerValidateLocale)(a.default),(0,i.registerValidateFormats)(s.default);const p=v((d,y,m)=>ie(null,null,function*(){const g=(0,u.parseValidator)(y,m),x={error:[],success:[],warning:[]};for(let P=0;P<g.length;P++){const S=yield g[P](d,m==null?void 0:m.context),{type:j,message:O}=S;if(x[j]=x[j]||[],O&&(x[j].push(O),m!=null&&m.validateFirst))break}return x}),"validate");return to}var ga;function ro(){return ga||(ga=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,hu(),e.exports),v(_,ya(),e.exports),v(_,at(),e.exports),v(_,ba(),e.exports)}(Yr)),Yr.exports}var oo={exports:{}},no,Fa;function Sa(){if(Fa)return no;Fa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{LifeCycle:()=>h}),no=F(_);var n=ue();const c=class{constructor(...a){this.buildListener=r(u=>function(i,l){for(let p=0;p<u.length;p++){let d=u[p];(0,n.isFn)(d)?d.call(this,i,l):(0,n.isStr)(d)&&(0,n.isFn)(u[p+1])?(d===i.type&&u[p+1].call(this,i.payload,l),p++):(0,n.each)(d,(y,m)=>{if((0,n.isFn)(y)&&(0,n.isStr)(m)&&m===i.type)return y.call(this,i.payload,l),!1})}},"buildListener"),this.notify=r((u,i,l)=>{(0,n.isStr)(u)&&this.listener.call(l,{type:u,payload:i},l)},"notify"),this.listener=this.buildListener(a)}};r(c,"LifeCycle");let h=c;return no}var so,Pa;function Oa(){if(Pa)return so;Pa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>e(a,"name",{value:u,configurable:!0}),b=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},v=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{Heart:()=>s}),so=F(_);var n=ue(),c=Sa();const h=class extends n.Subscribable{constructor({lifecycles:u,context:i}={}){super(),this.lifecycles=[],this.outerLifecycles=new Map,this.buildLifeCycles=r(l=>l.reduce((p,d)=>d instanceof c.LifeCycle?p.concat(d):(0,n.isArr)(d)?this.buildLifeCycles(d):(typeof d=="object"&&(this.context=d),p),[]),"buildLifeCycles"),this.addLifeCycles=r((l,p=[])=>{const d=this.buildLifeCycles(p);d.length&&this.outerLifecycles.set(l,d)},"addLifeCycles"),this.hasLifeCycles=r(l=>this.outerLifecycles.has(l),"hasLifeCycles"),this.removeLifeCycles=r(l=>{this.outerLifecycles.delete(l)},"removeLifeCycles"),this.setLifeCycles=r((l=[])=>{this.lifecycles=this.buildLifeCycles(l)},"setLifeCycles"),this.publish=r((l,p,d)=>{(0,n.isStr)(l)&&(this.lifecycles.forEach(y=>{y.notify(l,p,d||this.context)}),this.outerLifecycles.forEach(y=>{y.forEach(m=>{m.notify(l,p,d||this.context)})}),this.notify({type:l,payload:p}))},"publish"),this.clear=r(()=>{this.lifecycles=[],this.outerLifecycles.clear(),this.unsubscribe()},"clear"),this.lifecycles=this.buildLifeCycles(u||[]),this.context=i}};r(h,"Heart");let s=h;return so}var ao,Ca;function _t(){if(Ca)return ao;Ca=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(O,w)=>e(O,"name",{value:w,configurable:!0}),b=(O,w)=>{for(var I in w)e(O,I,{get:w[I],enumerable:!0})},v=(O,w,I,E)=>{if(w&&typeof w=="object"||typeof w=="function")for(let R of o(w))!f.call(O,R)&&R!==I&&e(O,R,{get:()=>w[R],enumerable:!(E=t(w,R))||E.enumerable});return O},F=O=>v(e({},"__esModule",{value:!0}),O),_={};b(_,{isArrayField:()=>u,isArrayFieldState:()=>m,isDataField:()=>g,isDataFieldState:()=>x,isField:()=>a,isFieldState:()=>d,isForm:()=>h,isFormState:()=>p,isGeneralField:()=>s,isGeneralFieldState:()=>y,isObjectField:()=>i,isObjectFieldState:()=>P,isQuery:()=>j,isVoidField:()=>l,isVoidFieldState:()=>S}),ao=F(_);var n=ue(),c=go();const h=r(O=>O instanceof c.Form,"isForm"),s=r(O=>O instanceof c.Field||O instanceof c.VoidField,"isGeneralField"),a=r(O=>O instanceof c.Field,"isField"),u=r(O=>O instanceof c.ArrayField,"isArrayField"),i=r(O=>O instanceof c.ObjectField,"isObjectField"),l=r(O=>O instanceof c.VoidField,"isVoidField"),p=r(O=>(0,n.isFn)(O==null?void 0:O.initialize)?!1:(O==null?void 0:O.displayName)==="Form","isFormState"),d=r(O=>(0,n.isFn)(O==null?void 0:O.initialize)?!1:(O==null?void 0:O.displayName)==="Field","isFieldState"),y=r(O=>{var w;return(0,n.isFn)(O==null?void 0:O.initialize)?!1:((w=O==null?void 0:O.displayName)==null?void 0:w.indexOf("Field"))>-1},"isGeneralFieldState"),m=r(O=>(0,n.isFn)(O==null?void 0:O.initialize)?!1:(O==null?void 0:O.displayName)==="ArrayField","isArrayFieldState"),g=r(O=>a(O)||u(O)||i(O),"isDataField"),x=r(O=>d(O)||P(O)||m(O),"isDataFieldState"),P=r(O=>(0,n.isFn)(O==null?void 0:O.initialize)?!1:(O==null?void 0:O.displayName)==="ObjectField","isObjectFieldState"),S=r(O=>(0,n.isFn)(O==null?void 0:O.initialize)?!1:(O==null?void 0:O.displayName)==="VoidField","isVoidFieldState"),j=r(O=>O&&O instanceof c.Query,"isQuery");return ao}var io,wa;function Ea(){if(wa)return io;wa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>e(u,"name",{value:i,configurable:!0}),b=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},v=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{Graph:()=>a}),io=F(_);var n=Oe(),c=ue(),h=_t();const s=class{constructor(i){this.getGraph=r(()=>{const l={};return l[""]=this.form.getState(),(0,c.each)(this.form.fields,(p,d)=>{l[d]=p.getState()}),l},"getGraph"),this.setGraph=r(l=>{const p=this.form,d=r((y,m)=>{const g=c.FormPath.parse(y),x=g.segments[g.segments.length-1],P=g.parent();return(0,h.isFieldState)(m)?this.form.createField({name:x,basePath:P}):(0,h.isArrayFieldState)(m)?this.form.createArrayField({name:x,basePath:P}):(0,h.isObjectFieldState)(m)?this.form.createObjectField({name:x,basePath:P}):this.form.createVoidField({name:x,basePath:P})},"createField");(0,c.each)(l,(y,m)=>{if((0,h.isFormState)(y))p.setState(y);else{const g=p.fields[m];g?g.setState(y):d(m,y).setState(y)}})},"setGraph"),this.form=i,(0,n.define)(this,{setGraph:n.batch})}};r(s,"Graph");let a=s;return io}var co,ja;function Ke(){if(ja)return co;ja=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(n,c)=>{for(var h in c)e(n,h,{get:c[h],enumerable:!0})},b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of o(c))!f.call(n,a)&&a!==h&&e(n,a,{get:()=>c[a],enumerable:!(s=t(c,a))||s.enumerable});return n},v=n=>b(e({},"__esModule",{value:!0}),n),F={};r(F,{LifeCycleTypes:()=>_}),co=v(F);var _=(n=>(n.ON_FORM_INIT="onFormInit",n.ON_FORM_MOUNT="onFormMount",n.ON_FORM_UNMOUNT="onFormUnmount",n.ON_FORM_INPUT_CHANGE="onFormInputChange",n.ON_FORM_VALUES_CHANGE="onFormValuesChange",n.ON_FORM_INITIAL_VALUES_CHANGE="onFormInitialValuesChange",n.ON_FORM_SUBMIT="onFormSubmit",n.ON_FORM_RESET="onFormReset",n.ON_FORM_SUBMIT_START="onFormSubmitStart",n.ON_FORM_SUBMITTING="onFormSubmitting",n.ON_FORM_SUBMIT_END="onFormSubmitEnd",n.ON_FORM_SUBMIT_VALIDATE_START="onFormSubmitValidateStart",n.ON_FORM_SUBMIT_VALIDATE_SUCCESS="onFormSubmitValidateSuccess",n.ON_FORM_SUBMIT_VALIDATE_FAILED="onFormSubmitValidateFailed",n.ON_FORM_SUBMIT_VALIDATE_END="onFormSubmitValidateEnd",n.ON_FORM_SUBMIT_SUCCESS="onFormSubmitSuccess",n.ON_FORM_SUBMIT_FAILED="onFormSubmitFailed",n.ON_FORM_VALIDATE_START="onFormValidateStart",n.ON_FORM_VALIDATING="onFormValidating",n.ON_FORM_VALIDATE_SUCCESS="onFormValidateSuccess",n.ON_FORM_VALIDATE_FAILED="onFormValidateFailed",n.ON_FORM_VALIDATE_END="onFormValidateEnd",n.ON_FORM_GRAPH_CHANGE="onFormGraphChange",n.ON_FORM_LOADING="onFormLoading",n.ON_FIELD_INIT="onFieldInit",n.ON_FIELD_INPUT_VALUE_CHANGE="onFieldInputValueChange",n.ON_FIELD_VALUE_CHANGE="onFieldValueChange",n.ON_FIELD_INITIAL_VALUE_CHANGE="onFieldInitialValueChange",n.ON_FIELD_SUBMIT="onFieldSubmit",n.ON_FIELD_SUBMIT_START="onFieldSubmitStart",n.ON_FIELD_SUBMITTING="onFieldSubmitting",n.ON_FIELD_SUBMIT_END="onFieldSubmitEnd",n.ON_FIELD_SUBMIT_VALIDATE_START="onFieldSubmitValidateStart",n.ON_FIELD_SUBMIT_VALIDATE_SUCCESS="onFieldSubmitValidateSuccess",n.ON_FIELD_SUBMIT_VALIDATE_FAILED="onFieldSubmitValidateFailed",n.ON_FIELD_SUBMIT_VALIDATE_END="onFieldSubmitValidateEnd",n.ON_FIELD_SUBMIT_SUCCESS="onFieldSubmitSuccess",n.ON_FIELD_SUBMIT_FAILED="onFieldSubmitFailed",n.ON_FIELD_VALIDATE_START="onFieldValidateStart",n.ON_FIELD_VALIDATING="onFieldValidating",n.ON_FIELD_VALIDATE_SUCCESS="onFieldValidateSuccess",n.ON_FIELD_VALIDATE_FAILED="onFieldValidateFailed",n.ON_FIELD_VALIDATE_END="onFieldValidateEnd",n.ON_FIELD_LOADING="onFieldLoading",n.ON_FIELD_RESET="onFieldReset",n.ON_FIELD_MOUNT="onFieldMount",n.ON_FIELD_UNMOUNT="onFieldUnmount",n))(_||{});return co}var lo,Ia;function Aa(){if(Ia)return lo;Ia=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,p)=>{for(var d in p)e(l,d,{get:p[d],enumerable:!0})},b=(l,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of o(p))!f.call(l,m)&&m!==d&&e(l,m,{get:()=>p[m],enumerable:!(y=t(p,m))||y.enumerable});return l},v=l=>b(e({},"__esModule",{value:!0}),l),F={};r(F,{GlobalState:()=>u,MutuallyExclusiveProperties:()=>s,NumberIndexReg:()=>i,RESPONSE_REQUEST_DURATION:()=>a,ReadOnlyProperties:()=>n,ReservedProperties:()=>_}),lo=v(F);const _={form:!0,parent:!0,props:!0,caches:!0,requests:!0,disposers:!0,heart:!0,graph:!0,indexes:!0,fields:!0,lifecycles:!0,componentType:!0,componentProps:!0,decoratorType:!0,decoratorProps:!0},n={address:!0,path:!0,valid:!0,invalid:!0,selfValid:!0,selfInvalid:!0,errors:!0,successes:!0,warnings:!0,validateStatus:!0},c="selfDisplay",h="selfPattern",s={pattern:h,editable:h,readOnly:h,readPretty:h,disabled:h,display:c,hidden:c,visible:c},a=100,u={lifecycles:[],context:[],effectStart:!1,effectEnd:!1,initializing:!1},i=/^\.(\d+)/;return lo}var uo,Da;function Ze(){if(Da)return uo;Da=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(M,k)=>e(M,"name",{value:k,configurable:!0}),b=(M,k)=>{for(var G in k)e(M,G,{get:k[G],enumerable:!0})},v=(M,k,G,H)=>{if(k&&typeof k=="object"||typeof k=="function")for(let K of o(k))!f.call(M,K)&&K!==G&&e(M,K,{get:()=>k[K],enumerable:!(H=t(k,K))||H.enumerable});return M},F=M=>v(e({},"__esModule",{value:!0}),M),_={};b(_,{allowAssignDefaultValue:()=>En,batchReset:()=>Xp,batchSubmit:()=>Zp,batchValidate:()=>Qp,buildDataPath:()=>g,buildFieldPath:()=>m,cleanupArrayChildren:()=>te,cleanupObjectChildren:()=>Y,createBatchStateGetter:()=>ne,createBatchStateSetter:()=>ee,createChildrenFeedbackFilter:()=>U,createReaction:()=>od,createReactions:()=>rd,createStateGetter:()=>Q,createStateSetter:()=>J,deserialize:()=>z,destroy:()=>S,exchangeArrayState:()=>q,getArrayParent:()=>ad,getObjectParent:()=>id,getTypedDefaultValue:()=>y,getValidFieldDefaultValue:()=>td,getValidFormValues:()=>ed,getValuesFromEvent:()=>d,initFieldUpdate:()=>re,initializeEnd:()=>sd,initializeStart:()=>nd,isHTMLInputEvent:()=>p,locateNode:()=>x,matchFeedback:()=>O,modifySelf:()=>$p,patchFieldStates:()=>P,patchFormValues:()=>j,queryFeedbackMessages:()=>I,queryFeedbacks:()=>w,resetSelf:()=>_c,serialize:()=>B,setLoading:()=>Kp,setSubmitting:()=>qp,setValidating:()=>rt,setValidatorRule:()=>N,spliceArrayState:()=>L,subscribeUpdate:()=>ae,triggerFormInitialValuesChange:()=>pe,triggerFormValuesChange:()=>Ce,updateFeedback:()=>E,validateSelf:()=>wn,validateToFeedbacks:()=>R}),uo=F(_);var n=Oe(),c=ue(),h=ro(),s=Ke(),a=Aa(),u=Ya();const i=Object.prototype.hasOwnProperty,l=r((M,k,G)=>{(0,u.isForm)(M)?M.notify(k):M.notify(G)},"notify"),p=r((M,k=!0)=>{var G;if(M!=null&&M.target){if(typeof M.target=="object"&&("value"in M.target||"checked"in M.target))return!0;k&&((G=M.stopPropagation)==null||G.call(M))}return!1},"isHTMLInputEvent"),d=r(M=>M.map(k=>k!=null&&k.target?(0,c.isValid)(k.target.value)?k.target.value:(0,c.isValid)(k.target.checked)?k.target.checked:void 0:k),"getValuesFromEvent"),y=r(M=>{if((0,u.isArrayField)(M))return[];if((0,u.isObjectField)(M))return{}},"getTypedDefaultValue"),m=r(M=>g(M.form.fields,M.address),"buildFieldPath"),g=r((M,k)=>{let G=!1;const H=k.segments,K=H.reduce((X,$,ce)=>{const me=X.concat($),ye=H.slice(0,ce+1),Me=M[ye.join(".")];if(G)return(0,u.isVoidField)(Me)||(G=!1),X;if(ce>=H.length-1)return me;if((0,u.isVoidField)(Me)){const Re=H.slice(0,ce),lt=M[Re.join(".")];return(0,u.isArrayField)(lt)&&(0,c.isNumberLike)($)?(G=!0,me):X}else G=!1;return me},[]);return new c.FormPath(K)},"buildDataPath"),x=r((M,k)=>(M.address=c.FormPath.parse(k),M.path=m(M),M.form.indexes[M.path.toString()]=M.address.toString(),M),"locateNode"),P=r((M,k)=>{k.forEach(({type:G,address:H,oldAddress:K,payload:X})=>{G==="remove"?S(M,H,!1):G==="update"&&(X&&(M[H]=X,M[K]===X&&(M[K]=void 0)),H&&X&&x(X,H))})},"patchFieldStates"),S=r((M,k,G=!0)=>{const H=M[k];if(H==null||H.dispose(),(0,u.isDataField)(H)&&G){const K=H.form,X=H.path;K.deleteValuesIn(X),K.deleteInitialValuesIn(X)}delete M[k]},"destroy"),j=r((M,k,G)=>{const H=r((X,$)=>{X.length?M.setValuesIn(X,(0,c.clone)($)):Object.assign(M.values,(0,c.clone)($))},"update"),K=r((X,$=[])=>{const ce=M.getValuesIn($),me=M.query($).take(),ye=me&&!(0,u.isVoidField)(me);if(ye&&me.display==="none"){me.caches.value=(0,c.clone)(X);return}if(En(ce,X))H($,X);else{if((0,c.isEmpty)(X)||a.GlobalState.initializing)return;(0,c.isPlainObj)(ce)&&(0,c.isPlainObj)(X)?(0,c.each)(X,(Me,Re)=>{K(Me,$.concat(Re))}):me?ye&&!me.selfModified&&H($,X):M.initialized&&H($,X)}},"patch");K(G,k)},"patchFormValues"),O=r((M,k)=>!(!M||!k||M.type&&M.type!==k.type||M.code&&M.code!==k.code||M.path&&k.path&&!c.FormPath.parse(M.path).match(k.path)||M.address&&k.address&&!c.FormPath.parse(M.address).match(k.address)||M.triggerType&&M.triggerType!==k.triggerType),"matchFeedback"),w=r((M,k)=>M.feedbacks.filter(G=>{var H,K,X;return(H=G.messages)!=null&&H.length?O(k,W(T({},G),{address:(K=M.address)==null?void 0:K.toString(),path:(X=M.path)==null?void 0:X.toString()})):!1}),"queryFeedbacks"),I=r((M,k)=>M.feedbacks.length?w(M,k).reduce((G,H)=>(0,c.isEmpty)(H.messages)?G:G.concat(H.messages),[]):[],"queryFeedbackMessages"),E=r((M,k)=>{if(k)return(0,n.batch)(()=>{var G,H;if(M.feedbacks.length){const K=w(M,k);if(K.length){M.feedbacks=M.feedbacks.reduce((X,$)=>{var ce;return K.includes($)?(ce=k.messages)!=null&&ce.length?($.messages=k.messages,X.concat($)):X:X.concat($)},[]);return}else(H=k.messages)!=null&&H.length&&(M.feedbacks=M.feedbacks.concat(k))}else{if(!((G=k.messages)!=null&&G.length))return;M.feedbacks=[k]}})},"updateFeedback"),R=r((M,k="onInput")=>ie(null,null,function*(){var H;const G=yield(0,h.validate)(M.value,M.validator,{triggerType:k,validateFirst:(H=M.props.validateFirst)!=null?H:M.form.props.validateFirst,context:{field:M,form:M.form}});return(0,n.batch)(()=>{(0,c.each)(G,(K,X)=>{M.setFeedback({triggerType:k,type:X,code:(0,c.pascalCase)(`validate-${X}`),messages:K})})}),G}),"validateToFeedbacks"),N=r((M,k,G)=>{if(!(0,c.isValid)(G))return;const H=(0,h.parseValidatorDescriptions)(M.validator),K=H.some($=>k in $),X={[k]:G};K?M.validator=H.map($=>((0,c.isPlainObj)($)&&i.call($,k)&&($[k]=G),$)):k==="required"?M.validator=[X].concat(H):M.validator=H.concat(X)},"setValidatorRule"),L=r((M,k)=>{const{startIndex:G,deleteCount:H,insertCount:K}=T({startIndex:0,deleteCount:0,insertCount:0},k),X=M.address.toString(),$=X.length,me=M.form.fields,ye=[],Me=K-H,Re=r(be=>be.indexOf(X)===0&&be.length>$,"isArrayChildren"),lt=r(be=>{var fe;const Be=(fe=be.substring($).match(a.NumberIndexReg))==null?void 0:fe[1];return Be===void 0?!1:Number(Be)>G+H-1},"isAfterNode"),Ie=r(be=>{var fe;const Be=(fe=be.substring($).match(a.NumberIndexReg))==null?void 0:fe[1];if(Be===void 0)return!1;const ze=Number(Be);return ze>=G&&ze<G+K},"isInsertNode"),Fe=r(be=>{var fe;const Ne=be.substring(0,$),Be=be.substring($),ze=(fe=Be.match(a.NumberIndexReg))==null?void 0:fe[1];if(ze===void 0)return!1;const ut=Number(ze);return ut>G&&!me[`${Ne}${Be.replace(/^\.\d+/,`.${ut+H}`)}`]||ut===G},"isDeleteNode"),He=r(be=>{var fe;if(Me===0)return be;const Ne=be.substring(0,$),Be=be.substring($),ze=(fe=Be.match(a.NumberIndexReg))==null?void 0:fe[1];if(ze===void 0)return be;const ut=Number(ze)+Me;return`${Ne}${Be.replace(/^\.\d+/,`.${ut}`)}`},"moveIndex");(0,n.batch)(()=>{(0,c.each)(me,(be,fe)=>{if(Re(fe)){if(lt(fe)){const Ne=He(fe);ye.push({type:"update",address:Ne,oldAddress:fe,payload:be})}(Ie(fe)||Fe(fe))&&ye.push({type:"remove",address:fe})}}),P(me,ye)}),M.form.notify(s.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)},"spliceArrayState"),q=r((M,k)=>{const{fromIndex:G,toIndex:H}=T({fromIndex:0,toIndex:0},k),K=M.address.toString(),X=M.form.fields,$=K.length,ce=[],me=r(Ie=>Ie.indexOf(K)===0&&Ie.length>$,"isArrayChildren"),ye=G<H,Me=r(Ie=>{var Fe;const be=(Fe=Ie.slice(K.length).match(a.NumberIndexReg))==null?void 0:Fe[1];if(be===void 0)return!1;const fe=Number(be);return ye?fe>G&&fe<=H:fe<G&&fe>=H},"isMoveNode"),Re=r(Ie=>{var Fe;const be=(Fe=Ie.substring($).match(a.NumberIndexReg))==null?void 0:Fe[1];return be===void 0?!1:Number(be)===G},"isFromNode"),lt=r(Ie=>{const Fe=Ie.substring(0,$),He=Ie.substring($),be=He.match(a.NumberIndexReg)[1];let Ne=Number(be);return Ne===G?Ne=H:Ne+=ye?-1:1,`${Fe}${He.replace(/^\.\d+/,`.${Ne}`)}`},"moveIndex");(0,n.batch)(()=>{(0,c.each)(X,(Ie,Fe)=>{if(me(Fe)&&(Me(Fe)||Re(Fe))){const He=lt(Fe);ce.push({type:"update",address:He,oldAddress:Fe,payload:Ie}),X[He]||ce.push({type:"remove",address:Fe})}}),P(X,ce)}),M.form.notify(s.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)},"exchangeArrayState"),te=r((M,k)=>{const G=M.address.toString(),H=M.form.fields,K=r($=>$.indexOf(G)===0&&$.length>G.length,"isArrayChildren"),X=r($=>{var ce;const ye=(ce=$.slice(G.length).match(a.NumberIndexReg))==null?void 0:ce[1];return ye===void 0?!1:Number(ye)>=k},"isNeedCleanup");(0,n.batch)(()=>{(0,c.each)(H,($,ce)=>{K(ce)&&X(ce)&&$.destroy()})})},"cleanupArrayChildren"),Y=r((M,k)=>{if(k.length===0)return;const G=M.address.toString(),H=M.form.fields,K=r($=>$.indexOf(G)===0&&$.length>G.length,"isObjectChildren"),X=r($=>{var ce;const ye=(ce=$.slice(G.length).match(/^\.([^.]+)/))==null?void 0:ce[1];return ye===void 0?!1:k.includes(ye)},"isNeedCleanup");(0,n.batch)(()=>{(0,c.each)(H,($,ce)=>{K(ce)&&X(ce)&&$.destroy()})})},"cleanupObjectChildren"),re=n.batch.scope.bound(M=>{const k=M.form,G=c.FormPath.ensureIn(k,"requests.updates",[]),H=c.FormPath.ensureIn(k,"requests.updateIndexes",{});for(let K=0;K<G.length;K++){const{pattern:X,callbacks:$}=G[K];let ce=!1;M.match(X)&&($.forEach(me=>{M.setState(me)}),!X.isWildMatchPattern&&!X.isMatchPattern&&(G.splice(K--,1),ce=!0)),ce?delete H[X.toString()]:H[X.toString()]=K}}),ae=r((M,k,G)=>{const H=c.FormPath.ensureIn(M,"requests.updates",[]),K=c.FormPath.ensureIn(M,"requests.updateIndexes",{}),X=k.toString(),$=K[X];(0,c.isValid)($)?H[$]&&!H[$].callbacks.some(ce=>ce.toString()===G.toString()?ce===G:!1)&&H[$].callbacks.push(G):(K[X]=H.length,H.push({pattern:k,callbacks:[G]}))},"subscribeUpdate"),z=r((M,k)=>{if(M){if((0,c.isFn)(k))k(M);else for(let G in k){if(!i.call(k,G)||a.ReadOnlyProperties[G]||a.ReservedProperties[G])continue;const H=a.MutuallyExclusiveProperties[G];if(H&&i.call(k,H)&&!(0,c.isValid)(k[H]))continue;const K=k[G];(0,c.isFn)(K)||(M[G]=K)}return M}},"deserialize"),B=r((M,k)=>{if((0,c.isFn)(k))return k(M);{const G={};for(let H in M){if(!i.call(M,H)||a.ReservedProperties[H])continue;if(H==="address"||H==="path"){G[H]=M[H].toString();continue}const K=M[H];(0,c.isFn)(K)||(G[H]=(0,n.toJS)(K))}return G}},"serialize"),U=r(M=>{var k;const G=(k=M.address)==null?void 0:k.toString();return({address:H})=>H===G||H.indexOf(G+".")===0},"createChildrenFeedbackFilter"),J=r(M=>n.batch.bound(k=>z(M,k)),"createStateSetter"),Q=r(M=>k=>B(M,k),"createStateGetter"),ee=r(M=>n.batch.bound((k,G)=>{if((0,u.isQuery)(k))k.forEach(H=>{H.setState(G)});else if((0,u.isGeneralField)(k))k.setState(G);else{let H=0,K=c.FormPath.parse(k);M.query(K).forEach(X=>{X.setState(G),H++}),(H===0||K.isWildMatchPattern)&&ae(M,K,G)}}),"createBatchStateSetter"),ne=r(M=>(k,G)=>(0,u.isQuery)(k)?k.take(G):(0,u.isGeneralField)(k)?k.getState(G):M.query(k).take(H=>H.getState(G)),"createBatchStateGetter"),pe=r((M,k)=>{Array.isArray(k.object)&&k.key==="length"||((0,n.contains)(M.initialValues,k.object)||M.initialValues===k.value)&&((k.type==="add"||k.type==="set")&&j(M,k.path.slice(1),k.value),M.initialized&&M.notify(s.LifeCycleTypes.ON_FORM_INITIAL_VALUES_CHANGE))},"triggerFormInitialValuesChange"),Ce=r((M,k)=>{Array.isArray(k.object)&&k.key==="length"||((0,n.contains)(M.values,k.object)||M.values===k.value)&&M.initialized&&M.notify(s.LifeCycleTypes.ON_FORM_VALUES_CHANGE)},"triggerFormValuesChange"),rt=r((M,k)=>{clearTimeout(M.requests.validate),k?(M.requests.validate=setTimeout(()=>{(0,n.batch)(()=>{M.validating=k,l(M,s.LifeCycleTypes.ON_FORM_VALIDATING,s.LifeCycleTypes.ON_FIELD_VALIDATING)})},a.RESPONSE_REQUEST_DURATION),l(M,s.LifeCycleTypes.ON_FORM_VALIDATE_START,s.LifeCycleTypes.ON_FIELD_VALIDATE_START)):(M.validating!==k&&(M.validating=k),l(M,s.LifeCycleTypes.ON_FORM_VALIDATE_END,s.LifeCycleTypes.ON_FIELD_VALIDATE_END))},"setValidating"),qp=r((M,k)=>{clearTimeout(M.requests.submit),k?(M.requests.submit=setTimeout(()=>{(0,n.batch)(()=>{M.submitting=k,l(M,s.LifeCycleTypes.ON_FORM_SUBMITTING,s.LifeCycleTypes.ON_FIELD_SUBMITTING)})},a.RESPONSE_REQUEST_DURATION),l(M,s.LifeCycleTypes.ON_FORM_SUBMIT_START,s.LifeCycleTypes.ON_FIELD_SUBMIT_START)):(M.submitting!==k&&(M.submitting=k),l(M,s.LifeCycleTypes.ON_FORM_SUBMIT_END,s.LifeCycleTypes.ON_FIELD_SUBMIT_END))},"setSubmitting"),Kp=r((M,k)=>{clearTimeout(M.requests.loading),k?M.requests.loading=setTimeout(()=>{(0,n.batch)(()=>{M.loading=k,l(M,s.LifeCycleTypes.ON_FORM_LOADING,s.LifeCycleTypes.ON_FIELD_LOADING)})},a.RESPONSE_REQUEST_DURATION):M.loading!==k&&(M.loading=k)},"setLoading"),Zp=r((M,k)=>ie(null,null,function*(){const G=r(K=>(0,u.isForm)(K)?(0,n.toJS)(K.values):(0,n.toJS)(K.value),"getValues");M.setSubmitting(!0);try{l(M,s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_START,s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_START),yield M.validate(),l(M,s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_SUCCESS,s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_SUCCESS)}catch(K){l(M,s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_FAILED,s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_FAILED)}l(M,s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_END,s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_END);let H;try{if(M.invalid)throw M.errors;(0,c.isFn)(k)?H=yield k(G(M)):H=G(M),l(M,s.LifeCycleTypes.ON_FORM_SUBMIT_SUCCESS,s.LifeCycleTypes.ON_FIELD_SUBMIT_SUCCESS)}catch(K){throw M.setSubmitting(!1),l(M,s.LifeCycleTypes.ON_FORM_SUBMIT_FAILED,s.LifeCycleTypes.ON_FIELD_SUBMIT_FAILED),l(M,s.LifeCycleTypes.ON_FORM_SUBMIT,s.LifeCycleTypes.ON_FIELD_SUBMIT),K}return M.setSubmitting(!1),l(M,s.LifeCycleTypes.ON_FORM_SUBMIT,s.LifeCycleTypes.ON_FIELD_SUBMIT),H}),"batchSubmit"),yc=r(M=>{var H,K,X,$;const k=(K=(H=M.props.validatePattern)!=null?H:M.form.props.validatePattern)!=null?K:["editable"],G=($=(X=M.props.validateDisplay)!=null?X:M.form.props.validateDisplay)!=null?$:["visible"];return k.includes(M.pattern)&&G.includes(M.display)},"shouldValidate"),Qp=r((M,k,G)=>ie(null,null,function*(){if((0,u.isForm)(M))M.setValidating(!0);else if(!yc(M))return;const H=[];if(M.query(k).forEach(K=>{(0,u.isVoidField)(K)||H.push(wn(K,G,K===M))}),yield Promise.all(H),(0,u.isForm)(M)&&M.setValidating(!1),M.invalid)throw l(M,s.LifeCycleTypes.ON_FORM_VALIDATE_FAILED,s.LifeCycleTypes.ON_FIELD_VALIDATE_FAILED),M.errors;l(M,s.LifeCycleTypes.ON_FORM_VALIDATE_SUCCESS,s.LifeCycleTypes.ON_FIELD_VALIDATE_SUCCESS)}),"batchValidate"),Xp=r((M,k,G)=>ie(null,null,function*(){const H=[];M.query(k).forEach(K=>{(0,u.isVoidField)(K)||H.push(_c(K,G,M===K))}),(0,u.isForm)(M)&&(M.modified=!1),l(M,s.LifeCycleTypes.ON_FORM_RESET,s.LifeCycleTypes.ON_FIELD_RESET),yield Promise.all(H)}),"batchReset"),wn=n.batch.bound((M,k,G=!1)=>ie(null,null,function*(){const H=r(()=>{rt(M,!0)},"start"),K=r(()=>{rt(M,!1),!G&&(M.selfValid?M.notify(s.LifeCycleTypes.ON_FIELD_VALIDATE_SUCCESS):M.notify(s.LifeCycleTypes.ON_FIELD_VALIDATE_FAILED))},"end");if(!yc(M))return{};if(H(),!k){const $=(0,h.parseValidatorDescriptions)(M.validator).reduce((me,ye)=>me.indexOf(ye.triggerType)>-1?me:me.concat(ye.triggerType),[]),ce={};for(let me=0;me<$.length;me++){const ye=yield R(M,$[me]);(0,c.each)(ye,(Me,Re)=>{ce[Re]=ce[Re]||[],ce[Re]=ce[Re].concat(Me)})}return K(),ce}const X=yield R(M,k);return K(),X})),_c=n.batch.bound((M,k,G=!1)=>ie(null,null,function*(){const H=y(M);if(M.modified=!1,M.selfModified=!1,M.visited=!1,M.feedbacks=[],M.inputValue=H,M.inputValues=[],M.caches={},!(0,c.isUndef)(M.value))if(k!=null&&k.forceClear)M.value=H;else{const K=M.initialValue;M.value=(0,n.toJS)((0,c.isUndef)(K)?H:K)}if(G||M.notify(s.LifeCycleTypes.ON_FIELD_RESET),k!=null&&k.validate)return yield wn(M)})),$p=r(M=>{if(M.selfModified)return;M.selfModified=!0,M.modified=!0;let k=M.parent;for(;k;){if((0,u.isDataField)(k)){if(k.modified)return;k.modified=!0}k=k.parent}M.form.modified=!0},"modifySelf"),ed=r(M=>(0,n.isObservable)(M)?M:(0,c.clone)(M||{}),"getValidFormValues"),td=r((M,k)=>En(M,k)?(0,c.clone)(k):M,"getValidFieldDefaultValue"),En=r((M,k)=>{const G=!(0,c.isUndef)(M),H=!(0,c.isUndef)(k);if(!G)return H;if(typeof M==typeof k&&(M===""||M===0))return!1;const K=M!==null&&(0,c.isEmpty)(M,!0),X=k!==null&&(0,c.isEmpty)(k,!0);return K?!X:!1},"allowAssignDefaultValue"),rd=r(M=>{const k=(0,c.toArr)(M.props.reactions);M.form.addEffects(M,()=>{k.forEach(G=>{(0,c.isFn)(G)&&M.disposers.push((0,n.autorun)(n.batch.scope.bound(()=>{M.destroyed||G(M)})))})})},"createReactions"),od=r((M,k)=>(0,n.reaction)(M,n.untracked.bound(k)),"createReaction"),nd=r(()=>{a.GlobalState.initializing=!0},"initializeStart"),sd=r(()=>{n.batch.endpoint(()=>{a.GlobalState.initializing=!1})},"initializeEnd"),ad=r((M,k=M.index)=>{if(k>-1){let G=M.parent;for(;G;){if((0,u.isArrayField)(G))return G;if(G===M.form)return;G=G.parent}}},"getArrayParent"),id=r(M=>{let k=M.parent;for(;k;){if((0,u.isArrayField)(k))return;if((0,u.isObjectField)(k))return k;if(k===M.form)return;k=k.parent}},"getObjectParent");return uo}var po,Ma;function mo(){if(Ma)return po;Ma=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{Query:()=>u}),po=F(_);var n=ue(),c=Ze();const h=r((i,l)=>{if(i)return(0,n.isFn)(l)?l(i,i.address):i},"output"),s=r((i,l)=>{const p=l.toString(),d=i.indexes[p],y=i.fields[p],m=i.fields[d];if(y)return p;if(m)return d},"takeMatchPattern"),a=class{constructor(l){if(this.addresses=[],this.pattern=n.FormPath.parse(l.pattern,l.base),this.form=l.form,this.pattern.isMatchPattern)(0,n.each)(this.form.fields,(p,d)=>{if(!p){delete this.form.fields[d];return}p.match(this.pattern)&&this.addresses.push(d)});else{const p=s(this.form,this.pattern.haveRelativePattern?(0,c.buildDataPath)(l.form.fields,this.pattern):this.pattern);p&&(this.addresses=[p])}}take(l){return h(this.form.fields[this.addresses[0]],l)}map(l){return this.addresses.map(p=>h(this.form.fields[p],l))}forEach(l){return this.addresses.forEach(p=>h(this.form.fields[p],l))}reduce(l,p){return this.addresses.reduce((d,y)=>h(this.form.fields[y],(m,g)=>l(d,m,g)),p)}get(l){const p=this.take();if(p)return p[l]}getIn(l){return n.FormPath.getIn(this.take(),l)}value(){return this.get("value")}initialValue(){return this.get("initialValue")}};r(a,"Query");let u=a;return po}var fo,Ra;function xt(){if(Ra)return fo;Ra=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(d,y)=>e(d,"name",{value:y,configurable:!0}),b=(d,y)=>{for(var m in y)e(d,m,{get:y[m],enumerable:!0})},v=(d,y,m,g)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of o(y))!f.call(d,x)&&x!==m&&e(d,x,{get:()=>y[x],enumerable:!(g=t(y,x))||g.enumerable});return d},F=d=>v(e({},"__esModule",{value:!0}),d),_={};b(_,{createEffectContext:()=>u,createEffectHook:()=>a,runEffects:()=>p,useEffectForm:()=>l}),fo=F(_);var n=ue(),c=go(),h=_t(),s=Aa();const a=r((d,y)=>(...m)=>{if(s.GlobalState.effectStart)s.GlobalState.lifecycles.push(new c.LifeCycle(d,(g,x)=>{(0,n.isFn)(y)&&y(g,x,...s.GlobalState.context)(...m)}));else throw new Error("Effect hooks cannot be used in asynchronous function body")},"createEffectHook"),u=r(d=>{let y;return{provide(m){if(s.GlobalState.effectStart)y=s.GlobalState.context.length,s.GlobalState.context[y]=(0,n.isValid)(m)?m:d;else throw new Error("Provide method cannot be used in asynchronous function body")},consume(){if(!s.GlobalState.effectStart)throw new Error("Consume method cannot be used in asynchronous function body");return s.GlobalState.context[y]}}},"createEffectContext"),i=u(),l=i.consume,p=r((d,...y)=>(s.GlobalState.lifecycles=[],s.GlobalState.context=[],s.GlobalState.effectStart=!0,s.GlobalState.effectEnd=!1,(0,h.isForm)(d)&&i.provide(d),y.forEach(m=>{(0,n.isFn)(m)&&m(d)}),s.GlobalState.context=[],s.GlobalState.effectStart=!1,s.GlobalState.effectEnd=!0,s.GlobalState.lifecycles),"runEffects");return fo}var ho,Na;function ka(){if(Na)return ho;Na=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{BaseField:()=>u}),ho=F(_);var n=ue(),c=Ze(),h=Ke(),s=mo();const a=class{constructor(){this.disposers=[],this.actions={},this.setTitle=r(l=>{this.title=l},"setTitle"),this.setDescription=r(l=>{this.description=l},"setDescription"),this.setDisplay=r(l=>{this.display=l},"setDisplay"),this.setPattern=r(l=>{this.pattern=l},"setPattern"),this.setComponent=r((l,p)=>{l&&(this.componentType=l),p&&(this.componentProps=this.componentProps||{},Object.assign(this.componentProps,p))},"setComponent"),this.setComponentProps=r(l=>{l&&(this.componentProps=this.componentProps||{},Object.assign(this.componentProps,l))},"setComponentProps"),this.setDecorator=r((l,p)=>{l&&(this.decoratorType=l),p&&(this.decoratorProps=this.decoratorProps||{},Object.assign(this.decoratorProps,p))},"setDecorator"),this.setDecoratorProps=r(l=>{l&&(this.decoratorProps=this.decoratorProps||{},Object.assign(this.decoratorProps,l))},"setDecoratorProps"),this.setData=r(l=>{this.data=l},"setData"),this.setContent=r(l=>{this.content=l},"setContent"),this.onInit=r(()=>{this.initialized=!0,(0,c.initFieldUpdate)(this),this.notify(h.LifeCycleTypes.ON_FIELD_INIT)},"onInit"),this.onMount=r(()=>{this.mounted=!0,this.unmounted=!1,this.notify(h.LifeCycleTypes.ON_FIELD_MOUNT)},"onMount"),this.onUnmount=r(()=>{this.mounted=!1,this.unmounted=!0,this.notify(h.LifeCycleTypes.ON_FIELD_UNMOUNT)},"onUnmount"),this.query=r(l=>new s.Query({pattern:l,base:this.address,form:this.form}),"query"),this.notify=r((l,p)=>this.form.notify(l,p!=null?p:this),"notify"),this.dispose=r(()=>{this.disposers.forEach(l=>{l()}),this.form.removeEffects(this)},"dispose"),this.destroy=r((l=!0)=>{(0,c.destroy)(this.form.fields,this.address.toString(),l)},"destroy"),this.match=r(l=>n.FormPath.parse(l).matchAliasGroup(this.address,this.path),"match"),this.inject=r(l=>{(0,n.each)(l,(p,d)=>{(0,n.isFn)(p)&&(this.actions[d]=p)})},"inject"),this.invoke=r((l,...p)=>{var d,y;return(y=(d=this.actions)[l])==null?void 0:y.call(d,...p)},"invoke")}locate(l){this.form.fields[l.toString()]=this,(0,c.locateNode)(this,l)}get indexes(){return this.path.transform(/^\d+$/,(...l)=>l.map(p=>Number(p)))}get index(){var l;return(l=this.indexes[this.indexes.length-1])!=null?l:-1}get records(){const l=(0,c.getArrayParent)(this);return l==null?void 0:l.value}get record(){var l;const p=(0,c.getObjectParent)(this);if(p)return p.value;const d=this.index,y=(0,c.getArrayParent)(this,d);return y?(l=y.value)==null?void 0:l[d]:this.form.values}get component(){return[this.componentType,this.componentProps]}set component(l){const p=(0,n.toArr)(l);this.componentType=p[0],this.componentProps=p[1]||{}}get decorator(){return[this.decoratorType,this.decoratorProps]}set decorator(l){const p=(0,n.toArr)(l);this.decoratorType=p[0],this.decoratorProps=p[1]||{}}get parent(){let l=this.address.parent(),p=l.toString();for(;!this.form.fields[p];)if(l=l.parent(),p=l.toString(),!p)return;return this.form.fields[p]}get display(){var l;const p=(l=this.parent)==null?void 0:l.display;return p&&p!=="visible"?this.selfDisplay&&this.selfDisplay!=="visible"?this.selfDisplay:p:(0,n.isValid)(this.selfDisplay)?this.selfDisplay:p||this.form.display||"visible"}get pattern(){var l;const p=((l=this.parent)==null?void 0:l.pattern)||this.form.pattern||"editable",d=this.selfPattern;return(0,n.isValid)(d)?p==="readPretty"&&d!=="editable"?p:d:p}get editable(){return this.pattern==="editable"}get disabled(){return this.pattern==="disabled"}get readOnly(){return this.pattern==="readOnly"}get readPretty(){return this.pattern==="readPretty"}get hidden(){return this.display==="hidden"}get visible(){return this.display==="visible"}get destroyed(){return!this.form.fields[this.address.toString()]}set hidden(l){(0,n.isValid)(l)&&(l?this.display="hidden":this.display="visible")}set visible(l){(0,n.isValid)(l)&&(l?this.display="visible":this.display="none")}set editable(l){(0,n.isValid)(l)&&(l?this.pattern="editable":this.pattern="readPretty")}set readOnly(l){(0,n.isValid)(l)&&(l?this.pattern="readOnly":this.pattern="editable")}set disabled(l){(0,n.isValid)(l)&&(l?this.pattern="disabled":this.pattern="editable")}set readPretty(l){(0,n.isValid)(l)&&(l?this.pattern="readPretty":this.pattern="editable")}set pattern(l){this.selfPattern=l}set display(l){this.selfDisplay=l}};r(a,"BaseField");let u=a;return ho}var bo,Ta;function gt(){if(Ta)return bo;Ta=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(p,d)=>e(p,"name",{value:d,configurable:!0}),b=(p,d)=>{for(var y in d)e(p,y,{get:d[y],enumerable:!0})},v=(p,d,y,m)=>{if(d&&typeof d=="object"||typeof d=="function")for(let g of o(d))!f.call(p,g)&&g!==y&&e(p,g,{get:()=>d[g],enumerable:!(m=t(d,g))||m.enumerable});return p},F=p=>v(e({},"__esModule",{value:!0}),p),_={};b(_,{Field:()=>l}),bo=F(_);var n=Oe(),c=ue(),h=ro(),s=Ze(),a=Ke(),u=ka();const i=class extends u.BaseField{constructor(d,y,m,g){super(),this.displayName="Field",this.caches={},this.requests={},this.setDataSource=r(x=>{this.dataSource=x},"setDataSource"),this.setFeedback=r(x=>{(0,s.updateFeedback)(this,x)},"setFeedback"),this.setSelfErrors=r(x=>{this.selfErrors=x},"setSelfErrors"),this.setSelfWarnings=r(x=>{this.selfWarnings=x},"setSelfWarnings"),this.setSelfSuccesses=r(x=>{this.selfSuccesses=x},"setSelfSuccesses"),this.setValidator=r(x=>{this.validator=x},"setValidator"),this.setValidatorRule=r((x,P)=>{(0,s.setValidatorRule)(this,x,P)},"setValidatorRule"),this.setRequired=r(x=>{this.required=x},"setRequired"),this.setValue=r(x=>{if(!this.destroyed){if(!this.initialized){if(this.display==="none"){this.caches.value=x;return}if(x=(0,s.getValidFieldDefaultValue)(x,this.initialValue),!(0,s.allowAssignDefaultValue)(this.value,x)&&!this.designable)return}this.form.setValuesIn(this.path,x)}},"setValue"),this.setInitialValue=r(x=>{this.destroyed||!this.initialized&&!(0,s.allowAssignDefaultValue)(this.initialValue,x)&&!this.designable||this.form.setInitialValuesIn(this.path,x)},"setInitialValue"),this.setLoading=r(x=>{(0,s.setLoading)(this,x)},"setLoading"),this.setValidating=r(x=>{(0,s.setValidating)(this,x)},"setValidating"),this.setSubmitting=r(x=>{(0,s.setSubmitting)(this,x)},"setSubmitting"),this.setState=(0,s.createStateSetter)(this),this.getState=(0,s.createStateGetter)(this),this.onInput=r((...x)=>ie(this,null,function*(){const P=r(w=>{var I,E;return(0,s.isHTMLInputEvent)(w[0])&&"currentTarget"in w[0]?((I=w[0])==null?void 0:I.target)===((E=w[0])==null?void 0:E.currentTarget):!0},"isHTMLInputEventFromSelf"),S=r(w=>{var I;return(I=w[0])!=null&&I.target&&!(0,s.isHTMLInputEvent)(w[0])?w:(0,s.getValuesFromEvent)(w)},"getValues");if(!P(x))return;const j=S(x),O=j[0];this.caches.inputting=!0,this.inputValue=O,this.inputValues=j,this.value=O,this.modify(),this.notify(a.LifeCycleTypes.ON_FIELD_INPUT_VALUE_CHANGE),this.notify(a.LifeCycleTypes.ON_FORM_INPUT_CHANGE,this.form),yield(0,s.validateSelf)(this,"onInput"),this.caches.inputting=!1}),"onInput"),this.onFocus=r((...x)=>ie(this,null,function*(){var P;(P=x[0])!=null&&P.target&&!(0,s.isHTMLInputEvent)(x[0],!1)||(this.active=!0,this.visited=!0,yield(0,s.validateSelf)(this,"onFocus"))}),"onFocus"),this.onBlur=r((...x)=>ie(this,null,function*(){var P;(P=x[0])!=null&&P.target&&!(0,s.isHTMLInputEvent)(x[0],!1)||(this.active=!1,yield(0,s.validateSelf)(this,"onBlur"))}),"onBlur"),this.validate=r(x=>(0,s.batchValidate)(this,`${this.address}.**`,x),"validate"),this.submit=r(x=>(0,s.batchSubmit)(this,x),"submit"),this.reset=r(x=>(0,s.batchReset)(this,`${this.address}.**`,x),"reset"),this.queryFeedbacks=r(x=>(0,s.queryFeedbacks)(this,x),"queryFeedbacks"),this.modify=r(()=>(0,s.modifySelf)(this),"modify"),this.form=m,this.props=y,this.designable=g,(0,s.initializeStart)(),this.locate(d),this.initialize(),this.makeObservable(),this.makeReactive(),this.onInit(),(0,s.initializeEnd)()}initialize(){this.initialized=!1,this.loading=!1,this.validating=!1,this.submitting=!1,this.selfModified=!1,this.active=!1,this.visited=!1,this.mounted=!1,this.unmounted=!1,this.inputValues=[],this.inputValue=null,this.feedbacks=[],this.title=this.props.title,this.description=this.props.description,this.display=this.props.display,this.pattern=this.props.pattern,this.editable=this.props.editable,this.disabled=this.props.disabled,this.readOnly=this.props.readOnly,this.readPretty=this.props.readPretty,this.visible=this.props.visible,this.hidden=this.props.hidden,this.dataSource=this.props.dataSource,this.validator=this.props.validator,this.required=this.props.required,this.content=this.props.content,this.initialValue=this.props.initialValue,this.value=this.props.value,this.data=this.props.data,this.decorator=(0,c.toArr)(this.props.decorator),this.component=(0,c.toArr)(this.props.component)}makeObservable(){this.designable||(0,n.define)(this,{path:n.observable.ref,title:n.observable.ref,description:n.observable.ref,dataSource:n.observable.ref,selfDisplay:n.observable.ref,selfPattern:n.observable.ref,loading:n.observable.ref,validating:n.observable.ref,submitting:n.observable.ref,selfModified:n.observable.ref,modified:n.observable.ref,active:n.observable.ref,visited:n.observable.ref,initialized:n.observable.ref,mounted:n.observable.ref,unmounted:n.observable.ref,inputValue:n.observable.ref,inputValues:n.observable.ref,decoratorType:n.observable.ref,componentType:n.observable.ref,content:n.observable.ref,feedbacks:n.observable.ref,decoratorProps:n.observable,componentProps:n.observable,validator:n.observable.shallow,data:n.observable.shallow,component:n.observable.computed,decorator:n.observable.computed,errors:n.observable.computed,warnings:n.observable.computed,successes:n.observable.computed,valid:n.observable.computed,invalid:n.observable.computed,selfErrors:n.observable.computed,selfWarnings:n.observable.computed,selfSuccesses:n.observable.computed,selfValid:n.observable.computed,selfInvalid:n.observable.computed,validateStatus:n.observable.computed,value:n.observable.computed,initialValue:n.observable.computed,display:n.observable.computed,pattern:n.observable.computed,required:n.observable.computed,hidden:n.observable.computed,visible:n.observable.computed,disabled:n.observable.computed,readOnly:n.observable.computed,readPretty:n.observable.computed,editable:n.observable.computed,indexes:n.observable.computed,setDisplay:n.action,setTitle:n.action,setDescription:n.action,setDataSource:n.action,setValue:n.action,setPattern:n.action,setInitialValue:n.action,setLoading:n.action,setValidating:n.action,setFeedback:n.action,setSelfErrors:n.action,setSelfWarnings:n.action,setSelfSuccesses:n.action,setValidator:n.action,setRequired:n.action,setComponent:n.action,setComponentProps:n.action,setDecorator:n.action,setDecoratorProps:n.action,setData:n.action,setContent:n.action,validate:n.action,reset:n.action,onInit:n.batch,onInput:n.batch,onMount:n.batch,onUnmount:n.batch,onFocus:n.batch,onBlur:n.batch})}makeReactive(){this.designable||(this.disposers.push((0,s.createReaction)(()=>this.value,d=>{this.notify(a.LifeCycleTypes.ON_FIELD_VALUE_CHANGE),(0,c.isValid)(d)&&(this.selfModified&&!this.caches.inputting&&(0,s.validateSelf)(this),!(0,c.isEmpty)(d)&&this.display==="none"&&(this.caches.value=(0,n.toJS)(d),this.form.deleteValuesIn(this.path)))}),(0,s.createReaction)(()=>this.initialValue,()=>{this.notify(a.LifeCycleTypes.ON_FIELD_INITIAL_VALUE_CHANGE)}),(0,s.createReaction)(()=>this.display,d=>{var m;const y=this.value;d!=="none"?y===void 0&&this.caches.value!==void 0&&(this.setValue(this.caches.value),this.caches.value=void 0):(this.caches.value=(m=(0,n.toJS)(y))!=null?m:(0,n.toJS)(this.initialValue),this.form.deleteValuesIn(this.path)),(d==="none"||d==="hidden")&&this.setFeedback({type:"error",messages:[]})}),(0,s.createReaction)(()=>this.pattern,d=>{d!=="editable"&&this.setFeedback({type:"error",messages:[]})})),(0,s.createReactions)(this))}get selfErrors(){return(0,s.queryFeedbackMessages)(this,{type:"error"})}get errors(){return this.form.errors.filter((0,s.createChildrenFeedbackFilter)(this))}get selfWarnings(){return(0,s.queryFeedbackMessages)(this,{type:"warning"})}get warnings(){return this.form.warnings.filter((0,s.createChildrenFeedbackFilter)(this))}get selfSuccesses(){return(0,s.queryFeedbackMessages)(this,{type:"success"})}get successes(){return this.form.successes.filter((0,s.createChildrenFeedbackFilter)(this))}get selfValid(){return!this.selfErrors.length}get valid(){return!this.errors.length}get selfInvalid(){return!this.selfValid}get invalid(){return!this.valid}get value(){return this.form.getValuesIn(this.path)}get initialValue(){return this.form.getInitialValuesIn(this.path)}get required(){return((0,c.isArr)(this.validator)?this.validator:(0,h.parseValidatorDescriptions)(this.validator)).some(y=>!!(y!=null&&y.required))}get validateStatus(){if(this.validating)return"validating";if(this.selfInvalid)return"error";if(this.selfWarnings.length)return"warning";if(this.selfSuccesses.length)return"success"}set required(d){this.required!==d&&this.setValidatorRule("required",d)}set value(d){this.setValue(d)}set initialValue(d){this.setInitialValue(d)}set selfErrors(d){this.setFeedback({type:"error",code:"EffectError",messages:d})}set selfWarnings(d){this.setFeedback({type:"warning",code:"EffectWarning",messages:d})}set selfSuccesses(d){this.setFeedback({type:"success",code:"EffectSuccess",messages:d})}};r(i,"Field");let l=i;return bo}var vo,Va;function Ba(){if(Va)return vo;Va=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{ArrayField:()=>u}),vo=F(_);var n=Oe(),c=ue(),h=Ze(),s=gt();const a=class extends s.Field{constructor(l,p,d,y){super(l,p,d,y),this.displayName="ArrayField",this.push=r((...m)=>(0,n.action)(()=>((0,c.isArr)(this.value)||(this.value=[]),this.value.push(...m),this.onInput(this.value))),"push"),this.pop=r(()=>{if((0,c.isArr)(this.value))return(0,n.action)(()=>{const m=this.value.length-1;return(0,h.spliceArrayState)(this,{startIndex:m,deleteCount:1}),this.value.pop(),this.onInput(this.value)})},"pop"),this.insert=r((m,...g)=>(0,n.action)(()=>{if((0,c.isArr)(this.value)||(this.value=[]),g.length!==0)return(0,h.spliceArrayState)(this,{startIndex:m,insertCount:g.length}),this.value.splice(m,0,...g),this.onInput(this.value)}),"insert"),this.remove=r(m=>{if((0,c.isArr)(this.value))return(0,n.action)(()=>((0,h.spliceArrayState)(this,{startIndex:m,deleteCount:1}),this.value.splice(m,1),this.onInput(this.value)))},"remove"),this.shift=r(()=>{if((0,c.isArr)(this.value))return(0,n.action)(()=>(this.value.shift(),this.onInput(this.value)))},"shift"),this.unshift=r((...m)=>(0,n.action)(()=>((0,c.isArr)(this.value)||(this.value=[]),(0,h.spliceArrayState)(this,{startIndex:0,insertCount:m.length}),this.value.unshift(...m),this.onInput(this.value))),"unshift"),this.move=r((m,g)=>{if((0,c.isArr)(this.value)&&m!==g)return(0,n.action)(()=>((0,c.move)(this.value,m,g),(0,h.exchangeArrayState)(this,{fromIndex:m,toIndex:g}),this.onInput(this.value)))},"move"),this.moveUp=r(m=>{if((0,c.isArr)(this.value))return this.move(m,m-1<0?this.value.length-1:m-1)},"moveUp"),this.moveDown=r(m=>{if((0,c.isArr)(this.value))return this.move(m,m+1>=this.value.length?0:m+1)},"moveDown"),this.makeAutoCleanable()}makeAutoCleanable(){this.disposers.push((0,n.reaction)(()=>{var l;return(l=this.value)==null?void 0:l.length},(l,p)=>{p&&!l?(0,h.cleanupArrayChildren)(this,0):l<p&&(0,h.cleanupArrayChildren)(this,l)}))}};r(a,"ArrayField");let u=a;return vo}var yo,La;function Ua(){if(La)return yo;La=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>e(u,"name",{value:i,configurable:!0}),b=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},v=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{ObjectField:()=>a}),yo=F(_);var n=Oe(),c=Ze(),h=gt();const s=class extends h.Field{constructor(i,l,p,d){super(i,l,p,d),this.displayName="ObjectField",this.additionalProperties=[],this.addProperty=r((y,m)=>(this.form.setValuesIn(this.path.concat(y),m),this.additionalProperties.push(y),this.onInput(this.value)),"addProperty"),this.removeProperty=r(y=>(this.form.deleteValuesIn(this.path.concat(y)),this.additionalProperties.splice(this.additionalProperties.indexOf(y),1),this.onInput(this.value)),"removeProperty"),this.existProperty=r(y=>this.form.existValuesIn(this.path.concat(y)),"existProperty"),this.makeAutoCleanable()}makeAutoCleanable(){this.disposers.push((0,n.reaction)(()=>Object.keys(this.value||{}),i=>{const l=this.additionalProperties.filter(p=>!i.includes(p));(0,c.cleanupObjectChildren)(this,l)}))}};r(s,"ObjectField");let a=s;return yo}var _o,Ga;function Ha(){if(Ga)return _o;Ga=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{VoidField:()=>u}),_o=F(_);var n=Oe(),c=ue(),h=Ze(),s=ka();const a=class extends s.BaseField{constructor(l,p,d,y){super(),this.displayName="VoidField",this.setState=(0,h.createStateSetter)(this),this.getState=(0,h.createStateGetter)(this),this.form=d,this.props=p,this.designable=y,(0,h.initializeStart)(),this.locate(l),this.initialize(),this.makeObservable(),this.makeReactive(),this.onInit(),(0,h.initializeEnd)()}initialize(){this.mounted=!1,this.unmounted=!1,this.initialized=!1,this.title=this.props.title,this.description=this.props.description,this.pattern=this.props.pattern,this.display=this.props.display,this.hidden=this.props.hidden,this.editable=this.props.editable,this.disabled=this.props.disabled,this.readOnly=this.props.readOnly,this.readPretty=this.props.readPretty,this.visible=this.props.visible,this.content=this.props.content,this.data=this.props.data,this.decorator=(0,c.toArr)(this.props.decorator),this.component=(0,c.toArr)(this.props.component)}makeObservable(){this.designable||(0,n.define)(this,{path:n.observable.ref,title:n.observable.ref,description:n.observable.ref,selfDisplay:n.observable.ref,selfPattern:n.observable.ref,initialized:n.observable.ref,mounted:n.observable.ref,unmounted:n.observable.ref,decoratorType:n.observable.ref,componentType:n.observable.ref,content:n.observable.ref,data:n.observable.shallow,decoratorProps:n.observable,componentProps:n.observable,display:n.observable.computed,pattern:n.observable.computed,hidden:n.observable.computed,visible:n.observable.computed,disabled:n.observable.computed,readOnly:n.observable.computed,readPretty:n.observable.computed,editable:n.observable.computed,component:n.observable.computed,decorator:n.observable.computed,indexes:n.observable.computed,setTitle:n.action,setDescription:n.action,setDisplay:n.action,setPattern:n.action,setComponent:n.action,setComponentProps:n.action,setDecorator:n.action,setDecoratorProps:n.action,setData:n.action,setContent:n.action,onInit:n.batch,onMount:n.batch,onUnmount:n.batch})}makeReactive(){this.designable||(0,h.createReactions)(this)}};r(a,"VoidField");let u=a;return _o}var xo,za;function bu(){if(za)return xo;za=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(j,O)=>e(j,"name",{value:O,configurable:!0}),b=(j,O)=>{for(var w in O)e(j,w,{get:O[w],enumerable:!0})},v=(j,O,w,I)=>{if(O&&typeof O=="object"||typeof O=="function")for(let E of o(O))!f.call(j,E)&&E!==w&&e(j,E,{get:()=>O[E],enumerable:!(I=t(O,E))||I.enumerable});return j},F=j=>v(e({},"__esModule",{value:!0}),j),_={};b(_,{Form:()=>S}),xo=F(_);var n=Oe(),c=ue(),h=_t(),s=xt(),a=Ze(),u=Ke(),i=Ba(),l=gt(),p=Ea(),d=Oa(),y=Ua(),m=mo(),g=Ha();const x="__FORMILY_DEV_TOOLS_HOOK__",P=class{constructor(O){this.displayName="Form",this.fields={},this.requests={},this.indexes={},this.disposers=[],this.createField=r(w=>{const I=c.FormPath.parse(w.basePath).concat(w.name),E=I.toString();if(E)return(!this.fields[E]||this.props.designable)&&((0,n.batch)(()=>{new l.Field(I,w,this,this.props.designable)}),this.notify(u.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)),this.fields[E]},"createField"),this.createArrayField=r(w=>{const I=c.FormPath.parse(w.basePath).concat(w.name),E=I.toString();if(E)return(!this.fields[E]||this.props.designable)&&((0,n.batch)(()=>{new i.ArrayField(I,W(T({},w),{value:(0,c.isArr)(w.value)?w.value:[]}),this,this.props.designable)}),this.notify(u.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)),this.fields[E]},"createArrayField"),this.createObjectField=r(w=>{const I=c.FormPath.parse(w.basePath).concat(w.name),E=I.toString();if(E)return(!this.fields[E]||this.props.designable)&&((0,n.batch)(()=>{new y.ObjectField(I,W(T({},w),{value:(0,c.isObj)(w.value)?w.value:{}}),this,this.props.designable)}),this.notify(u.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)),this.fields[E]},"createObjectField"),this.createVoidField=r(w=>{const I=c.FormPath.parse(w.basePath).concat(w.name),E=I.toString();if(E)return(!this.fields[E]||this.props.designable)&&((0,n.batch)(()=>{new g.VoidField(I,w,this,this.props.designable)}),this.notify(u.LifeCycleTypes.ON_FORM_GRAPH_CHANGE)),this.fields[E]},"createVoidField"),this.setValues=r((w,I="merge")=>{(0,c.isPlainObj)(w)&&(I==="merge"||I==="deepMerge"?(0,c.merge)(this.values,w,{arrayMerge:r((E,R)=>R,"arrayMerge"),assign:!0}):I==="shallowMerge"?Object.assign(this.values,w):this.values=w)},"setValues"),this.setInitialValues=r((w,I="merge")=>{(0,c.isPlainObj)(w)&&(I==="merge"||I==="deepMerge"?(0,c.merge)(this.initialValues,w,{arrayMerge:r((E,R)=>R,"arrayMerge"),assign:!0}):I==="shallowMerge"?Object.assign(this.initialValues,w):this.initialValues=w)},"setInitialValues"),this.setValuesIn=r((w,I)=>{c.FormPath.setIn(this.values,w,I)},"setValuesIn"),this.deleteValuesIn=r(w=>{c.FormPath.deleteIn(this.values,w)},"deleteValuesIn"),this.existValuesIn=r(w=>c.FormPath.existIn(this.values,w),"existValuesIn"),this.getValuesIn=r(w=>c.FormPath.getIn(this.values,w),"getValuesIn"),this.setInitialValuesIn=r((w,I)=>{c.FormPath.setIn(this.initialValues,w,I)},"setInitialValuesIn"),this.deleteInitialValuesIn=r(w=>{c.FormPath.deleteIn(this.initialValues,w)},"deleteInitialValuesIn"),this.existInitialValuesIn=r(w=>c.FormPath.existIn(this.initialValues,w),"existInitialValuesIn"),this.getInitialValuesIn=r(w=>c.FormPath.getIn(this.initialValues,w),"getInitialValuesIn"),this.setLoading=r(w=>{(0,a.setLoading)(this,w)},"setLoading"),this.setSubmitting=r(w=>{(0,a.setSubmitting)(this,w)},"setSubmitting"),this.setValidating=r(w=>{(0,a.setValidating)(this,w)},"setValidating"),this.setDisplay=r(w=>{this.display=w},"setDisplay"),this.setPattern=r(w=>{this.pattern=w},"setPattern"),this.addEffects=r((w,I)=>{this.heart.hasLifeCycles(w)||this.heart.addLifeCycles(w,(0,s.runEffects)(this,I))},"addEffects"),this.removeEffects=r(w=>{this.heart.removeLifeCycles(w)},"removeEffects"),this.setEffects=r(w=>{this.heart.setLifeCycles((0,s.runEffects)(this,w))},"setEffects"),this.clearErrors=r((w="*")=>{this.query(w).forEach(I=>{(0,h.isVoidField)(I)||I.setFeedback({type:"error",messages:[]})})},"clearErrors"),this.clearWarnings=r((w="*")=>{this.query(w).forEach(I=>{(0,h.isVoidField)(I)||I.setFeedback({type:"warning",messages:[]})})},"clearWarnings"),this.clearSuccesses=r((w="*")=>{this.query(w).forEach(I=>{(0,h.isVoidField)(I)||I.setFeedback({type:"success",messages:[]})})},"clearSuccesses"),this.query=r(w=>new m.Query({pattern:w,base:"",form:this}),"query"),this.queryFeedbacks=r(w=>this.query(w.address||w.path||"*").reduce((I,E)=>(0,h.isVoidField)(E)?I:I.concat(E.queryFeedbacks(w).map(R=>W(T({},R),{address:E.address.toString(),path:E.path.toString()})).filter(R=>R.messages.length>0)),[]),"queryFeedbacks"),this.notify=r((w,I)=>{this.heart.publish(w,I!=null?I:this)},"notify"),this.subscribe=r(w=>this.heart.subscribe(w),"subscribe"),this.unsubscribe=r(w=>{this.heart.unsubscribe(w)},"unsubscribe"),this.onInit=r(()=>{this.initialized=!0,this.notify(u.LifeCycleTypes.ON_FORM_INIT)},"onInit"),this.onMount=r(()=>{this.mounted=!0,this.notify(u.LifeCycleTypes.ON_FORM_MOUNT),c.globalThisPolyfill[x]&&!this.props.designable&&c.globalThisPolyfill[x].inject(this.id,this)},"onMount"),this.onUnmount=r(()=>{this.notify(u.LifeCycleTypes.ON_FORM_UNMOUNT),this.query("*").forEach(w=>w.destroy(!1)),this.disposers.forEach(w=>w()),this.unmounted=!0,this.indexes={},this.heart.clear(),c.globalThisPolyfill[x]&&!this.props.designable&&c.globalThisPolyfill[x].unmount(this.id)},"onUnmount"),this.setState=(0,a.createStateSetter)(this),this.getState=(0,a.createStateGetter)(this),this.setFormState=(0,a.createStateSetter)(this),this.getFormState=(0,a.createStateGetter)(this),this.setFieldState=(0,a.createBatchStateSetter)(this),this.getFieldState=(0,a.createBatchStateGetter)(this),this.getFormGraph=r(()=>this.graph.getGraph(),"getFormGraph"),this.setFormGraph=r(w=>{this.graph.setGraph(w)},"setFormGraph"),this.clearFormGraph=r((w="*",I=!0)=>{this.query(w).forEach(E=>{E.destroy(I)})},"clearFormGraph"),this.validate=r((w="*")=>(0,a.batchValidate)(this,w),"validate"),this.submit=r(w=>(0,a.batchSubmit)(this,w),"submit"),this.reset=r((w="*",I)=>(0,a.batchReset)(this,w,I),"reset"),this.initialize(O),this.makeObservable(),this.makeReactive(),this.makeValues(),this.onInit()}initialize(O){this.id=(0,c.uid)(),this.props=T({},O),this.initialized=!1,this.submitting=!1,this.validating=!1,this.loading=!1,this.modified=!1,this.mounted=!1,this.unmounted=!1,this.display=this.props.display||"visible",this.pattern=this.props.pattern||"editable",this.editable=this.props.editable,this.disabled=this.props.disabled,this.readOnly=this.props.readOnly,this.readPretty=this.props.readPretty,this.visible=this.props.visible,this.hidden=this.props.hidden,this.graph=new p.Graph(this),this.heart=new d.Heart({lifecycles:this.lifecycles,context:this})}makeValues(){this.values=(0,a.getValidFormValues)(this.props.values),this.initialValues=(0,a.getValidFormValues)(this.props.initialValues)}makeObservable(){(0,n.define)(this,{fields:n.observable.shallow,indexes:n.observable.shallow,initialized:n.observable.ref,validating:n.observable.ref,submitting:n.observable.ref,loading:n.observable.ref,modified:n.observable.ref,pattern:n.observable.ref,display:n.observable.ref,mounted:n.observable.ref,unmounted:n.observable.ref,values:n.observable,initialValues:n.observable,valid:n.observable.computed,invalid:n.observable.computed,errors:n.observable.computed,warnings:n.observable.computed,successes:n.observable.computed,hidden:n.observable.computed,visible:n.observable.computed,editable:n.observable.computed,readOnly:n.observable.computed,readPretty:n.observable.computed,disabled:n.observable.computed,setValues:n.action,setValuesIn:n.action,setInitialValues:n.action,setInitialValuesIn:n.action,setPattern:n.action,setDisplay:n.action,setState:n.action,deleteInitialValuesIn:n.action,deleteValuesIn:n.action,setSubmitting:n.action,setValidating:n.action,reset:n.action,submit:n.action,validate:n.action,onMount:n.batch,onUnmount:n.batch,onInit:n.batch})}makeReactive(){this.disposers.push((0,n.observe)(this,O=>{(0,a.triggerFormInitialValuesChange)(this,O),(0,a.triggerFormValuesChange)(this,O)},!0))}get valid(){return!this.invalid}get invalid(){return this.errors.length>0}get errors(){return this.queryFeedbacks({type:"error"})}get warnings(){return this.queryFeedbacks({type:"warning"})}get successes(){return this.queryFeedbacks({type:"success"})}get lifecycles(){return(0,s.runEffects)(this,this.props.effects)}get hidden(){return this.display==="hidden"}get visible(){return this.display==="visible"}set hidden(O){(0,c.isValid)(O)&&(O?this.display="hidden":this.display="visible")}set visible(O){(0,c.isValid)(O)&&(O?this.display="visible":this.display="none")}get editable(){return this.pattern==="editable"}set editable(O){(0,c.isValid)(O)&&(O?this.pattern="editable":this.pattern="readPretty")}get readOnly(){return this.pattern==="readOnly"}set readOnly(O){(0,c.isValid)(O)&&(O?this.pattern="readOnly":this.pattern="editable")}get disabled(){return this.pattern==="disabled"}set disabled(O){(0,c.isValid)(O)&&(O?this.pattern="disabled":this.pattern="editable")}get readPretty(){return this.pattern==="readPretty"}set readPretty(O){(0,c.isValid)(O)&&(O?this.pattern="readPretty":this.pattern="editable")}};r(P,"Form");let S=P;return xo}var Ja;function go(){return Ja||(Ja=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Oa(),e.exports),v(_,Sa(),e.exports),v(_,Ea(),e.exports),v(_,mo(),e.exports),v(_,bu(),e.exports),v(_,gt(),e.exports),v(_,Ba(),e.exports),v(_,Ua(),e.exports),v(_,Ha(),e.exports)}(oo)),oo.exports}var Fo,Wa;function Ya(){if(Wa)return Fo;Wa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{FormPath:()=>n.FormPath,createEffectContext:()=>a.createEffectContext,createEffectHook:()=>a.createEffectHook,createForm:()=>u,getLocaleByPath:()=>c.getLocaleByPath,getValidateLocaleIOSCode:()=>c.getValidateLocaleIOSCode,isArrayField:()=>s.isArrayField,isArrayFieldState:()=>s.isArrayFieldState,isDataField:()=>s.isDataField,isDataFieldState:()=>s.isDataFieldState,isField:()=>s.isField,isFieldState:()=>s.isFieldState,isForm:()=>s.isForm,isFormState:()=>s.isFormState,isGeneralField:()=>s.isGeneralField,isGeneralFieldState:()=>s.isGeneralFieldState,isObjectField:()=>s.isObjectField,isObjectFieldState:()=>s.isObjectFieldState,isQuery:()=>s.isQuery,isVoidField:()=>s.isVoidField,isVoidFieldState:()=>s.isVoidFieldState,registerValidateFormats:()=>c.registerValidateFormats,registerValidateLocale:()=>c.registerValidateLocale,registerValidateMessageTemplateEngine:()=>c.registerValidateMessageTemplateEngine,registerValidateRules:()=>c.registerValidateRules,setValidateLanguage:()=>c.setValidateLanguage,useEffectForm:()=>a.useEffectForm}),Fo=F(_);var n=ue(),c=ro(),h=go(),s=_t(),a=xt();const u=r(i=>new h.Form(i),"createForm");return Fo}var So,qa;function vu(){if(qa)return So;qa=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(F,_,n,c)=>{if(_&&typeof _=="object"||typeof _=="function")for(let h of o(_))!f.call(F,h)&&h!==n&&e(F,h,{get:()=>_[h],enumerable:!(c=t(_,h))||c.enumerable});return F},b=F=>r(e({},"__esModule",{value:!0}),F),v={};return So=b(v),So}var Po={exports:{}},Oo,Ka;function yu(){if(Ka)return Oo;Ka=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(ae,z)=>e(ae,"name",{value:z,configurable:!0}),b=(ae,z)=>{for(var B in z)e(ae,B,{get:z[B],enumerable:!0})},v=(ae,z,B,U)=>{if(z&&typeof z=="object"||typeof z=="function")for(let J of o(z))!f.call(ae,J)&&J!==B&&e(ae,J,{get:()=>z[J],enumerable:!(U=t(z,J))||U.enumerable});return ae},F=ae=>v(e({},"__esModule",{value:!0}),ae),_={};b(_,{onFormGraphChange:()=>te,onFormInit:()=>u,onFormInitialValuesChange:()=>d,onFormInputChange:()=>y,onFormLoading:()=>Y,onFormMount:()=>i,onFormReact:()=>re,onFormReset:()=>g,onFormSubmit:()=>m,onFormSubmitEnd:()=>P,onFormSubmitFailed:()=>j,onFormSubmitStart:()=>x,onFormSubmitSuccess:()=>S,onFormSubmitValidateEnd:()=>E,onFormSubmitValidateFailed:()=>I,onFormSubmitValidateStart:()=>O,onFormSubmitValidateSuccess:()=>w,onFormUnmount:()=>l,onFormValidateEnd:()=>q,onFormValidateFailed:()=>L,onFormValidateStart:()=>R,onFormValidateSuccess:()=>N,onFormValuesChange:()=>p}),Oo=F(_);var n=Oe(),c=ue(),h=xt(),s=Ke();function a(ae){return(0,h.createEffectHook)(ae,z=>B=>{(0,n.batch)(()=>{B(z)})})}r(a,"createFormEffect");const u=a(s.LifeCycleTypes.ON_FORM_INIT),i=a(s.LifeCycleTypes.ON_FORM_MOUNT),l=a(s.LifeCycleTypes.ON_FORM_UNMOUNT),p=a(s.LifeCycleTypes.ON_FORM_VALUES_CHANGE),d=a(s.LifeCycleTypes.ON_FORM_INITIAL_VALUES_CHANGE),y=a(s.LifeCycleTypes.ON_FORM_INPUT_CHANGE),m=a(s.LifeCycleTypes.ON_FORM_SUBMIT),g=a(s.LifeCycleTypes.ON_FORM_RESET),x=a(s.LifeCycleTypes.ON_FORM_SUBMIT_START),P=a(s.LifeCycleTypes.ON_FORM_SUBMIT_END),S=a(s.LifeCycleTypes.ON_FORM_SUBMIT_SUCCESS),j=a(s.LifeCycleTypes.ON_FORM_SUBMIT_FAILED),O=a(s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_START),w=a(s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_SUCCESS),I=a(s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_FAILED),E=a(s.LifeCycleTypes.ON_FORM_SUBMIT_VALIDATE_END),R=a(s.LifeCycleTypes.ON_FORM_VALIDATE_START),N=a(s.LifeCycleTypes.ON_FORM_VALIDATE_SUCCESS),L=a(s.LifeCycleTypes.ON_FORM_VALIDATE_FAILED),q=a(s.LifeCycleTypes.ON_FORM_VALIDATE_END),te=a(s.LifeCycleTypes.ON_FORM_GRAPH_CHANGE),Y=a(s.LifeCycleTypes.ON_FORM_LOADING);function re(ae){let z=null;u(B=>{z=(0,n.autorun)(()=>{(0,c.isFn)(ae)&&ae(B)})}),l(()=>{z()})}return r(re,"onFormReact"),Oo}var Co,Za;function _u(){if(Za)return Co;Za=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(B,U)=>e(B,"name",{value:U,configurable:!0}),b=(B,U)=>{for(var J in U)e(B,J,{get:U[J],enumerable:!0})},v=(B,U,J,Q)=>{if(U&&typeof U=="object"||typeof U=="function")for(let ee of o(U))!f.call(B,ee)&&ee!==J&&e(B,ee,{get:()=>U[ee],enumerable:!(Q=t(U,ee))||Q.enumerable});return B},F=B=>v(e({},"__esModule",{value:!0}),B),_={};b(_,{onFieldChange:()=>z,onFieldInit:()=>re,onFieldInitialValueChange:()=>d,onFieldInputValueChange:()=>y,onFieldLoading:()=>Y,onFieldMount:()=>i,onFieldReact:()=>ae,onFieldReset:()=>te,onFieldSubmit:()=>j,onFieldSubmitEnd:()=>w,onFieldSubmitFailed:()=>N,onFieldSubmitStart:()=>O,onFieldSubmitSuccess:()=>R,onFieldSubmitValidateEnd:()=>E,onFieldSubmitValidateFailed:()=>q,onFieldSubmitValidateStart:()=>I,onFieldSubmitValidateSuccess:()=>L,onFieldUnmount:()=>l,onFieldValidateEnd:()=>g,onFieldValidateFailed:()=>P,onFieldValidateStart:()=>m,onFieldValidateSuccess:()=>S,onFieldValidating:()=>x,onFieldValueChange:()=>p}),Co=F(_);var n=Oe(),c=ue(),h=xt(),s=Ke();function a(B){return(0,h.createEffectHook)(B,(U,J)=>(Q,ee)=>{c.FormPath.parse(Q).matchAliasGroup(U.address,U.path)&&(0,n.batch)(()=>{ee(U,J)})})}r(a,"createFieldEffect");const u=a(s.LifeCycleTypes.ON_FIELD_INIT),i=a(s.LifeCycleTypes.ON_FIELD_MOUNT),l=a(s.LifeCycleTypes.ON_FIELD_UNMOUNT),p=a(s.LifeCycleTypes.ON_FIELD_VALUE_CHANGE),d=a(s.LifeCycleTypes.ON_FIELD_INITIAL_VALUE_CHANGE),y=a(s.LifeCycleTypes.ON_FIELD_INPUT_VALUE_CHANGE),m=a(s.LifeCycleTypes.ON_FIELD_VALIDATE_START),g=a(s.LifeCycleTypes.ON_FIELD_VALIDATE_END),x=a(s.LifeCycleTypes.ON_FIELD_VALIDATING),P=a(s.LifeCycleTypes.ON_FIELD_VALIDATE_FAILED),S=a(s.LifeCycleTypes.ON_FIELD_VALIDATE_SUCCESS),j=a(s.LifeCycleTypes.ON_FIELD_SUBMIT),O=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_START),w=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_END),I=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_START),E=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_END),R=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_SUCCESS),N=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_FAILED),L=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_SUCCESS),q=a(s.LifeCycleTypes.ON_FIELD_SUBMIT_VALIDATE_FAILED),te=a(s.LifeCycleTypes.ON_FIELD_RESET),Y=a(s.LifeCycleTypes.ON_FIELD_LOADING);function re(B,U){const J=(0,h.useEffectForm)();J.query(B).reduce((ee,ne)=>(U(ne,J),ee+1),0)===0&&u(B,U)}r(re,"onFieldInit");function ae(B,U){re(B,(J,Q)=>{J.disposers.push((0,n.autorun)(()=>{(0,c.isFn)(U)&&U(J,Q)}))})}r(ae,"onFieldReact");function z(B,U,J){(0,c.isFn)(U)?(J=U,U=["value"]):U=U||["value"],re(B,(Q,ee)=>{(0,c.isFn)(J)&&J(Q,ee);const ne=(0,n.reaction)(()=>(0,c.toArr)(U).map(pe=>Q[pe]),()=>{(0,c.isFn)(J)&&J(Q,ee)});Q.disposers.push(ne)})}return r(z,"onFieldChange"),Co}var Qa;function xu(){return Qa||(Qa=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,yu(),e.exports),v(_,_u(),e.exports)}(Po)),Po.exports}var Xa;function Ft(){return Xa||(Xa=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Ya(),e.exports),v(_,vu(),e.exports),v(_,xu(),e.exports),v(_,Ke(),e.exports)}(Wr)),Wr.exports}var wo,$a;function gu(){if($a)return wo;$a=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(x,P)=>e(x,"name",{value:P,configurable:!0}),b=(x,P)=>{for(var S in P)e(x,S,{get:P[S],enumerable:!0})},v=(x,P,S,j)=>{if(P&&typeof P=="object"||typeof P=="function")for(let O of o(P))!f.call(x,O)&&O!==S&&e(x,O,{get:()=>P[O],enumerable:!(j=t(P,O))||j.enumerable});return x},F=x=>v(e({},"__esModule",{value:!0}),x),_={};b(_,{transformFieldProps:()=>g}),wo=F(_);var n=Ft(),c=Oe(),h=ue(),s=aa();const a={onFieldInit:n.onFieldInit,onFieldMount:n.onFieldMount,onFieldUnmount:n.onFieldUnmount,onFieldValueChange:n.onFieldValueChange,onFieldInputValueChange:n.onFieldInputValueChange,onFieldInitialValueChange:n.onFieldInitialValueChange,onFieldValidateStart:n.onFieldValidateStart,onFieldValidateEnd:n.onFieldValidateEnd,onFieldValidateFailed:n.onFieldValidateFailed,onFieldValidateSuccess:n.onFieldValidateSuccess},u=["onFieldInit","onFieldValueChange"],i=r((x,P,S)=>{const[j,O]=String(P).split(/\s*#\s*/);return x.query(j).getIn(O||S||"value")},"getDependencyValue"),l=r((x,P)=>{if((0,h.isArr)(P)){const S=[];return P.forEach(j=>{(0,h.isStr)(j)?S.push(i(x,j)):(0,h.isPlainObj)(j)&&j.name&&j.source&&(S[j.name]=i(x,j.source,j.property))}),S}else if((0,h.isPlainObj)(P))return(0,h.reduce)(P,(S,j,O)=>(S[O]=i(x,j),S),{});return[]},"getDependencies"),p=r((x,P=!1)=>{const{request:S,target:j,runner:O,field:w,scope:I}=x||{};S&&(j?(S.state&&w.form.setFieldState(j,E=>(0,s.patchCompile)(E,S.state,(0,h.lazyMerge)(I,{$target:E}))),S.schema&&w.form.setFieldState(j,E=>(0,s.patchSchemaCompile)(E,S.schema,(0,h.lazyMerge)(I,{$target:E}),P)),(0,h.isStr)(O)&&O&&w.form.setFieldState(j,E=>{(0,s.shallowCompile)(`{{function(){${O}}}}`,(0,h.lazyMerge)(I,{$target:E}))()})):(S.state&&w.setState(E=>(0,s.patchCompile)(E,S.state,I)),S.schema&&w.setState(E=>(0,s.patchSchemaCompile)(E,S.schema,I,P)),(0,h.isStr)(O)&&O&&(0,s.shallowCompile)(`{{function(){${O}}}}`,I)()))},"setSchemaFieldState"),d=r((x,P={})=>{const S=r((N,L)=>c.autorun.memo(()=>(0,c.observable)(N),L),"$observable"),j=r(N=>x.setComponentProps(N),"$props"),O=c.autorun.effect,w=c.autorun.memo,I=x,E=x.form,R=x.form.values;return(0,h.lazyMerge)({get $lookup(){var L;var N;return(L=(N=P==null?void 0:P.scope)==null?void 0:N.$record)!=null?L:R},get $records(){return x.records},get $record(){const N=x.record;return typeof N=="object"?(0,h.lazyMerge)(N,{get $lookup(){var q;var L;return(q=(L=P==null?void 0:P.scope)==null?void 0:L.$record)!=null?q:R},get $index(){return x.index}}):N},get $index(){return x.index}},P.scope,{$form:E,$self:I,$observable:S,$effect:O,$memo:w,$props:j,$values:R})},"getBaseScope"),y=r((x,P)=>S=>{p({field:S,request:{schema:x},scope:d(S,P)},!0)},"getBaseReactions"),m=r((x,P)=>(0,h.toArr)(x["x-reactions"]).map(j=>O=>{const w=d(O,P),I=(0,s.shallowCompile)(j,w);if(!I)return;if((0,h.isFn)(I))return I(O,w);const{when:E,fulfill:R,otherwise:N,target:L,effects:q}=I,te=r(()=>{const Y=l(O,I.dependencies),re=Y,ae=(0,h.lazyMerge)(w,{$target:null,$deps:Y,$dependencies:re}),z=(0,s.shallowCompile)(E,ae),U=(E?z:!0)?R:N,J=U==null?void 0:U.run;p({field:O,target:L,request:U,runner:J,scope:ae})},"run");L&&(I.effects=q!=null&&q.length?q:u),I.effects?c.autorun.memo(()=>{(0,c.untracked)(()=>{(0,h.each)(I.effects,Y=>{a[Y]&&a[Y](O.address,te)})})},[]):te()}),"getUserReactions"),g=r((x,P)=>({name:x.name,reactions:[y(x,P)].concat(m(x,P))}),"transformFieldProps");return wo}var Eo,ei;function ti(){if(ei)return Eo;ei=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(p,d)=>e(p,"name",{value:d,configurable:!0}),b=(p,d)=>{for(var y in d)e(p,y,{get:d[y],enumerable:!0})},v=(p,d,y,m)=>{if(d&&typeof d=="object"||typeof d=="function")for(let g of o(d))!f.call(p,g)&&g!==y&&e(p,g,{get:()=>d[g],enumerable:!(m=t(d,g))||m.enumerable});return p},F=p=>v(e({},"__esModule",{value:!0}),p),_={};b(_,{Schema:()=>l}),Eo=F(_);var n=ue(),c=aa(),h=ca(),s=uu(),a=na(),u=gu();const i=class Ae{constructor(d,y){return this._isJSONSchemaObject=!0,this.version="2.0",this.addProperty=r((m,g)=>(this.properties=this.properties||{},this.properties[m]=new Ae(g,this),this.properties[m].name=m,this.properties[m]),"addProperty"),this.removeProperty=r(m=>{const g=this.properties[m];return delete this.properties[m],g},"removeProperty"),this.setProperties=r(m=>{for(const g in m)this.addProperty(g,m[g]);return this},"setProperties"),this.addPatternProperty=r((m,g)=>{if(g)return this.patternProperties=this.patternProperties||{},this.patternProperties[m]=new Ae(g,this),this.patternProperties[m].name=m,this.patternProperties[m]},"addPatternProperty"),this.removePatternProperty=r(m=>{const g=this.patternProperties[m];return delete this.patternProperties[m],g},"removePatternProperty"),this.setPatternProperties=r(m=>{if(!m)return this;for(const g in m)this.addPatternProperty(g,m[g]);return this},"setPatternProperties"),this.setAdditionalProperties=r(m=>{if(m)return this.additionalProperties=new Ae(m),this.additionalProperties},"setAdditionalProperties"),this.setItems=r(m=>{if(m)return Array.isArray(m)?this.items=m.map(g=>new Ae(g,this)):this.items=new Ae(m,this),this.items},"setItems"),this.setAdditionalItems=r(m=>{if(m)return this.additionalItems=new Ae(m,this),this.additionalItems},"setAdditionalItems"),this.findDefinitions=r(m=>{if(!(!m||!this.root||!(0,n.isStr)(m))&&m.indexOf("#/")===0)return n.FormPath.getIn(this.root,m.substring(2).split("/"))},"findDefinitions"),this.mapProperties=r(m=>Ae.getOrderProperties(this).map(({schema:g,key:x},P)=>m(g,x,P)),"mapProperties"),this.mapPatternProperties=r(m=>Ae.getOrderProperties(this,"patternProperties").map(({schema:g,key:x},P)=>m(g,x,P)),"mapPatternProperties"),this.reduceProperties=r((m,g)=>{let x=g;return Ae.getOrderProperties(this,"properties").forEach(({schema:P,key:S},j)=>{x=m(x,P,S,j)}),x},"reduceProperties"),this.reducePatternProperties=r((m,g)=>{let x=g;return Ae.getOrderProperties(this,"patternProperties").forEach(({schema:P,key:S},j)=>{x=m(x,P,S,j)}),x},"reducePatternProperties"),this.compile=r(m=>{const g=new Ae({},this.parent);return(0,n.each)(this,(x,P)=>{(0,n.isFn)(x)&&!P.includes("x-")||P==="parent"||P==="root"||(a.SchemaNestedMap[P]?g[P]=x&&(0,c.shallowCompile)(x,m):g[P]=x&&(0,c.compile)(x,m))}),g},"compile"),this.fromJSON=r(m=>m?Ae.isSchemaInstance(m)?m:((0,n.each)((0,h.reducePatches)(m),(g,x)=>{(0,n.isFn)(g)&&!x.includes("x-")||(x==="properties"?this.setProperties(g):x==="patternProperties"?this.setPatternProperties(g):x==="additionalProperties"?this.setAdditionalProperties(g):x==="items"?this.setItems(g):x==="additionalItems"?this.setAdditionalItems(g):x==="$ref"?this.fromJSON(this.findDefinitions(g)):this[x]=g)}),this):this,"fromJSON"),this.toJSON=r((m=!0)=>{const g={};return(0,n.each)(this,(x,P)=>{var S,j;if(!((0,n.isFn)(x)&&!P.includes("x-")||P==="parent"||P==="root"))if(P==="properties"||P==="patternProperties"){if(!m)return;g[P]=(0,n.map)(x,O=>{var w;return(w=O==null?void 0:O.toJSON)==null?void 0:w.call(O)})}else if(P==="additionalProperties"||P==="additionalItems"){if(!m)return;g[P]=(S=x==null?void 0:x.toJSON)==null?void 0:S.call(x)}else if(P==="items"){if(!m)return;Array.isArray(x)?g[P]=x.map(O=>{var w;return(w=O==null?void 0:O.toJSON)==null?void 0:w.call(O)}):g[P]=(j=x==null?void 0:x.toJSON)==null?void 0:j.call(x)}else g[P]=x}),g},"toJSON"),this.toFieldProps=r(m=>(0,u.transformFieldProps)(this,m),"toFieldProps"),y?(this.parent=y,this.root=y.root):this.root=this,this.fromJSON(d)}};r(i,"Schema"),i.getOrderProperties=r((p={},d="properties")=>{const y=[],m=[];for(const g in p[d]){const x=p[d][g],P=x["x-index"];isNaN(P)?m.push({schema:x,key:g}):y[P]={schema:x,key:g}}return y.concat(m).filter(g=>!!g)},"getOrderProperties"),i.compile=r((p,d)=>(0,c.compile)(p,d),"compile"),i.shallowCompile=r((p,d)=>(0,c.shallowCompile)(p,d),"shallowCompile"),i.isSchemaInstance=r(p=>(0,n.instOf)(p,i),"isSchemaInstance"),i.registerCompiler=c.registerCompiler,i.registerPatches=h.registerPatches,i.registerVoidComponents=s.registerVoidComponents,i.registerTypeDefaultComponents=s.registerTypeDefaultComponents,i.registerPolyfills=h.registerPolyfills,i.enablePolyfills=h.enablePolyfills,i.silent=c.silent;let l=i;return Eo}var jo,ri;function Fu(){if(ri)return jo;ri=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(F,_,n,c)=>{if(_&&typeof _=="object"||typeof _=="function")for(let h of o(_))!f.call(F,h)&&h!==n&&e(F,h,{get:()=>_[h],enumerable:!(c=t(_,h))||c.enumerable});return F},b=F=>r(e({},"__esModule",{value:!0}),F),v={};return jo=b(v),jo}var oi;function Io(){return oi||(oi=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,ti(),e.exports),v(_,Fu(),e.exports)}(Tt)),Tt.exports}var Ao={exports:{}},Do={exports:{}},Mo={exports:{}},de={};/** @license React v16.13.1
70
70
  * react-is.production.min.js
71
71
  *
72
72
  * Copyright (c) Facebook, Inc. and its affiliates.
73
73
  *
74
74
  * This source code is licensed under the MIT license found in the
75
75
  * LICENSE file in the root directory of this source tree.
76
- */var ri;function Sl(){if(ri)return de;ri=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,f=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,b=e?Symbol.for("react.profiler"):60114,v=e?Symbol.for("react.provider"):60109,F=e?Symbol.for("react.context"):60110,_=e?Symbol.for("react.async_mode"):60111,n=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,s=e?Symbol.for("react.suspense_list"):60120,a=e?Symbol.for("react.memo"):60115,l=e?Symbol.for("react.lazy"):60116,i=e?Symbol.for("react.block"):60121,c=e?Symbol.for("react.fundamental"):60117,p=e?Symbol.for("react.responder"):60118,d=e?Symbol.for("react.scope"):60119;function y(g){if(typeof g=="object"&&g!==null){var x=g.$$typeof;switch(x){case t:switch(g=g.type,g){case _:case n:case f:case b:case r:case h:return g;default:switch(g=g&&g.$$typeof,g){case F:case u:case l:case a:case v:return g;default:return x}}case o:return x}}}function m(g){return y(g)===n}return de.AsyncMode=_,de.ConcurrentMode=n,de.ContextConsumer=F,de.ContextProvider=v,de.Element=t,de.ForwardRef=u,de.Fragment=f,de.Lazy=l,de.Memo=a,de.Portal=o,de.Profiler=b,de.StrictMode=r,de.Suspense=h,de.isAsyncMode=function(g){return m(g)||y(g)===_},de.isConcurrentMode=m,de.isContextConsumer=function(g){return y(g)===F},de.isContextProvider=function(g){return y(g)===v},de.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},de.isForwardRef=function(g){return y(g)===u},de.isFragment=function(g){return y(g)===f},de.isLazy=function(g){return y(g)===l},de.isMemo=function(g){return y(g)===a},de.isPortal=function(g){return y(g)===o},de.isProfiler=function(g){return y(g)===b},de.isStrictMode=function(g){return y(g)===r},de.isSuspense=function(g){return y(g)===h},de.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===f||g===n||g===b||g===r||g===h||g===s||typeof g=="object"&&g!==null&&(g.$$typeof===l||g.$$typeof===a||g.$$typeof===v||g.$$typeof===F||g.$$typeof===u||g.$$typeof===c||g.$$typeof===p||g.$$typeof===d||g.$$typeof===i)},de.typeOf=y,de}var oi;function Pl(){return oi||(oi=1,Do.exports=Sl()),Do.exports}var Mo,ni;function si(){if(ni)return Mo;ni=1;var e=Pl(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},f={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},b={};b[e.ForwardRef]=f,b[e.Memo]=r;function v(l){return e.isMemo(l)?r:b[l.$$typeof]||t}var F=Object.defineProperty,_=Object.getOwnPropertyNames,n=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,s=Object.prototype;function a(l,i,c){if(typeof i!="string"){if(s){var p=h(i);p&&p!==s&&a(l,p,c)}var d=_(i);n&&(d=d.concat(n(i)));for(var y=v(l),m=v(i),g=0;g<d.length;++g){var x=d[g];if(!o[x]&&!(c&&c[x])&&!(m&&m[x])&&!(y&&y[x])){var P=u(i,x);try{F(l,x,P)}catch(S){}}}}return l}return Mo=a,Mo}var Ro={exports:{}},No,ai;function Ol(){if(ai)return No;ai=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(h,s)=>e(h,"name",{value:s,configurable:!0}),b=(h,s)=>{for(var a in s)e(h,a,{get:s[a],enumerable:!0})},v=(h,s,a,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of o(s))!f.call(h,i)&&i!==a&&e(h,i,{get:()=>s[i],enumerable:!(l=t(s,i))||l.enumerable});return h},F=h=>v(e({},"__esModule",{value:!0}),h),_={};b(_,{globalThisPolyfill:()=>u}),No=F(_);function n(){try{if(typeof self!="undefined")return self}catch(h){}try{if(typeof window!="undefined")return window}catch(h){}try{if(typeof ft!="undefined")return ft}catch(h){}return Function("return this")()}r(n,"globalSelf");const u=n();return No}var To,ii;function Cl(){if(ii)return To;ii=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>e(a,"name",{value:l,configurable:!0}),b=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},v=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{GarbageCollector:()=>s}),To=F(_);var n=Ol();const u=n.globalThisPolyfill.FinalizationRegistry&&new n.globalThisPolyfill.FinalizationRegistry(a=>{var l;return(l=a==null?void 0:a.clean)==null?void 0:l.call(a)}),h=class{constructor(l,i=1e4){this.token={clean:l},this.expireTime=i}open(l){u?u.register(l,this.token,this.token):this.request=setTimeout(()=>{var i,c;(c=(i=this.token)==null?void 0:i.clean)==null||c.call(i)},this.expireTime)}close(){u?u.unregister(this.token):clearTimeout(this.request)}};r(h,"GarbageCollector");let s=h;return To}var ko,ci;function wl(){if(ci)return ko;ci=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,h)=>e(u,"name",{value:h,configurable:!0}),b=(u,h)=>{for(var s in h)e(u,s,{get:h[s],enumerable:!0})},v=(u,h,s,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let l of o(h))!f.call(u,l)&&l!==s&&e(u,l,{get:()=>h[l],enumerable:!(a=t(h,l))||a.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{immediate:()=>n}),ko=F(_);const n=r(u=>{let h=!1;return Promise.resolve(0).then(()=>{if(h){h=!1;return}u()}),()=>{h=!0}},"immediate");return ko}var ui;function Vo(){return ui||(ui=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Cl(),e.exports),v(_,wl(),e.exports)}(Ro)),Ro.exports}var Bo,li;function pi(){if(li)return Bo;li=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>e(l,"name",{value:i,configurable:!0}),b=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},v=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{useCompatEffect:()=>a}),Bo=F(_);var n=V,u=Vo();const h=Array.isArray,s=r((l,i)=>{const c=h(l),p=h(i);return c!==p?!1:c?l.length!==i.length?!1:l.every((d,y)=>d===i[y]):l===i},"isEqualDeps"),a=r((l,i)=>{const c=(0,n.useRef)(null),p=(0,n.useRef)(!1);(0,n.useEffect)(()=>{p.current=!0;const d=l();return()=>{if(p.current=!1,!s(c.current,i)){d&&d();return}(0,u.immediate)(()=>{p.current||d&&d()})}},i),c.current=i},"useCompatEffect");return Bo}var Lo,di;function mi(){if(di)return Lo;di=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(y,m)=>t(y,"name",{value:m,configurable:!0}),F=(y,m)=>{for(var g in m)t(y,g,{get:m[g],enumerable:!0})},_=(y,m,g,x)=>{if(m&&typeof m=="object"||typeof m=="function")for(let P of f(m))!b.call(y,P)&&P!==g&&t(y,P,{get:()=>m[P],enumerable:!(x=o(m,P))||x.enumerable});return y},n=(y,m,g)=>(g=y!=null?e(r(y)):{},_(!y||!y.__esModule?t(g,"default",{value:y,enumerable:!0}):g,y)),u=y=>_(t({},"__esModule",{value:!0}),y),h={};F(h,{useCompatFactory:()=>d}),Lo=u(h);var s=n(V),a=Vo(),l=pi();const i=class{};v(i,"ObjectToBeRetainedByReact");let c=i;function p(){return new c}v(p,"objectToBeRetainedByReactFactory");const d=v(y=>{const m=s.default.useRef(null),g=s.default.useRef(),[x]=s.default.useState(p);return m.current||(m.current=y()),g.current||(g.current=new a.GarbageCollector(()=>{m.current&&m.current.dispose()}),g.current.open(x)),(0,l.useCompatEffect)(()=>(g.current.close(),()=>{m.current&&(m.current.dispose(),m.current=null)}),[]),m.current},"useCompatFactory");return Lo}var Uo,fi;function Go(){if(fi)return Uo;fi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,h)=>{for(var s in h)e(u,s,{get:h[s],enumerable:!0})},b=(u,h,s,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let l of o(h))!f.call(u,l)&&l!==s&&e(u,l,{get:()=>h[l],enumerable:!(a=t(h,l))||a.enumerable});return u},v=u=>b(e({},"__esModule",{value:!0}),u),F={};r(F,{useLayoutEffect:()=>n}),Uo=v(F);var _=V;const n=typeof document!="undefined"?_.useLayoutEffect:_.useEffect;return Uo}var Ho,hi;function bi(){if(hi)return Ho;hi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>e(a,"name",{value:l,configurable:!0}),b=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},v=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{useDidUpdate:()=>s}),Ho=F(_);var n=V,u=Vo(),h=Go();const s=r(a=>{const l=(0,n.useRef)(null);l.current=(0,u.immediate)(a),(0,h.useLayoutEffect)(()=>{l.current(),a()})},"useDidUpdate");return Ho}var zo,vi;function yi(){if(vi)return zo;vi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(c,p)=>e(c,"name",{value:p,configurable:!0}),b=(c,p)=>{for(var d in p)e(c,d,{get:p[d],enumerable:!0})},v=(c,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of o(p))!f.call(c,m)&&m!==d&&e(c,m,{get:()=>p[m],enumerable:!(y=t(p,m))||y.enumerable});return c},F=c=>v(e({},"__esModule",{value:!0}),c),_={};b(_,{useForceUpdate:()=>i}),zo=F(_);var n=V,u=bi(),h=Go();const s=[],a={value:0},l=new Set;function i(){const[,c]=(0,n.useState)([]),p=(0,n.useRef)(!1),d=(0,n.useRef)(!1);(0,h.useLayoutEffect)(()=>(p.current=!0,d.current&&(c([]),d.current=!1),()=>{p.current=!1}),s);const y=(0,n.useCallback)(()=>{c([])},s),m=(0,n.useCallback)(()=>{if(!p.current){d.current=!0;return}a.value===0?y():l.add(y)},s);return a.value++,(0,u.useDidUpdate)(()=>{a.value>0&&a.value--,a.value===0&&l.forEach(g=>{l.delete(g),g()})}),m}return r(i,"useForceUpdate"),zo}var Jo,_i;function xi(){if(_i)return Jo;_i=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>e(a,"name",{value:l,configurable:!0}),b=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},v=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{useObserver:()=>s}),Jo=F(_);var n=Pe(),u=mi(),h=yi();const s=r((a,l)=>{const i=(0,h.useForceUpdate)();return(0,u.useCompatFactory)(()=>new n.Tracker(()=>{typeof(l==null?void 0:l.scheduler)=="function"?l.scheduler(i):i()},l==null?void 0:l.displayName)).track(a)},"useObserver");return Jo}var Wo,gi;function El(){if(gi)return Wo;gi=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(p,d)=>t(p,"name",{value:d,configurable:!0}),F=(p,d)=>{for(var y in d)t(p,y,{get:d[y],enumerable:!0})},_=(p,d,y,m)=>{if(d&&typeof d=="object"||typeof d=="function")for(let g of f(d))!b.call(p,g)&&g!==y&&t(p,g,{get:()=>d[g],enumerable:!(m=o(d,g))||m.enumerable});return p},n=(p,d,y)=>(y=p!=null?e(r(p)):{},_(!p||!p.__esModule?t(y,"default",{value:p,enumerable:!0}):y,p)),u=p=>_(t({},"__esModule",{value:!0}),p),h={};F(h,{Observer:()=>c,observer:()=>i}),Wo=u(h);var s=n(V),a=n(si()),l=xi();function i(p,d){const y=k({forwardRef:!1},d),m=y.forwardRef?(0,s.forwardRef)((x,P)=>(0,l.useObserver)(()=>p(W(k({},x),{ref:P})),y)):x=>(0,l.useObserver)(()=>p(x),y),g=(0,s.memo)(m);return(0,a.default)(g,p),y.displayName&&(g.displayName=y.displayName),g}v(i,"observer");const c=i(p=>{const d=typeof p.children=="function"?p.children():p.children;return s.default.createElement(s.Fragment,{},d)});return Wo}var Yo,Fi;function jl(){if(Fi)return Yo;Fi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},b=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},v=m=>b(e({},"__esModule",{value:!0}),m),F={};r(F,{unstable_useCompatEffect:()=>i,unstable_useCompatFactory:()=>c,unstable_useDidUpdate:()=>p,unstable_useForceUpdate:()=>l,unstable_useLayoutEffect:()=>d,unstable_useObserver:()=>y}),Yo=v(F);var _=pi(),n=mi(),u=bi(),h=yi(),s=Go(),a=xi();const l=h.useForceUpdate,i=_.useCompatEffect,c=n.useCompatFactory,p=u.useDidUpdate,d=s.useLayoutEffect,y=a.useObserver;return Yo}var qo,Si;function Il(){if(Si)return qo;Si=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(F,_,n,u)=>{if(_&&typeof _=="object"||typeof _=="function")for(let h of o(_))!f.call(F,h)&&h!==n&&e(F,h,{get:()=>_[h],enumerable:!(u=t(_,h))||u.enumerable});return F},b=F=>r(e({},"__esModule",{value:!0}),F),v={};return qo=b(v),qo}var Pi;function at(){return Pi||(Pi=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,El(),e.exports),v(_,jl(),e.exports),v(_,Il(),e.exports)}(Ao)),Ao.exports}var Ko,Oi;function gt(){if(Oi)return Ko;Oi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(h,s)=>e(h,"name",{value:s,configurable:!0}),b=(h,s)=>{for(var a in s)e(h,a,{get:s[a],enumerable:!0})},v=(h,s,a,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of o(s))!f.call(h,i)&&i!==a&&e(h,i,{get:()=>s[i],enumerable:!(l=t(s,i))||l.enumerable});return h},F=h=>v(e({},"__esModule",{value:!0}),h),_={};b(_,{useAttach:()=>u}),Ko=F(_);var n=at();const u=r(h=>((0,n.unstable_useCompatEffect)(()=>(h.onMount(),()=>h.onUnmount()),[h]),h),"useAttach");return Ko}var Zo={exports:{}},Qo,Ci;function wi(){if(Ci)return Qo;Ci=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(x,P)=>t(x,"name",{value:P,configurable:!0}),F=(x,P)=>{for(var S in P)t(x,S,{get:P[S],enumerable:!0})},_=(x,P,S,j)=>{if(P&&typeof P=="object"||typeof P=="function")for(let O of f(P))!b.call(x,O)&&O!==S&&t(x,O,{get:()=>P[O],enumerable:!(j=o(P,O))||j.enumerable});return x},n=(x,P,S)=>(S=x!=null?e(r(x)):{},_(!x||!x.__esModule?t(S,"default",{value:x,enumerable:!0}):S,x)),u=x=>_(t({},"__esModule",{value:!0}),x),h={};F(h,{ContextCleaner:()=>g,FieldContext:()=>i,FormContext:()=>l,SchemaComponentsContext:()=>y,SchemaContext:()=>p,SchemaExpressionScopeContext:()=>d,SchemaMarkupContext:()=>c,SchemaOptionsContext:()=>m}),Qo=u(h);var s=n(V);const a=v((...x)=>({children:P})=>x.reduce((S,j)=>s.default.createElement(j.Provider,{value:void 0},S),P),"createContextCleaner"),l=(0,s.createContext)(null),i=(0,s.createContext)(null),c=(0,s.createContext)(null),p=(0,s.createContext)(null),d=(0,s.createContext)(null),y=(0,s.createContext)(null),m=(0,s.createContext)(null),g=a(i,c,p,d,y,m);return Qo}var Xo={exports:{}},$o,Ei;function en(){if(Ei)return $o;Ei=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{useForm:()=>h}),$o=F(_);var n=V,u=we();const h=r(()=>(0,n.useContext)(u.FormContext),"useForm");return $o}var tn,ji;function Ii(){if(ji)return tn;ji=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{useField:()=>h}),tn=F(_);var n=V,u=we();const h=r(()=>(0,n.useContext)(u.FieldContext),"useField");return tn}var rn,Ai;function Al(){if(Ai)return rn;Ai=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>e(a,"name",{value:l,configurable:!0}),b=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},v=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{useParentForm:()=>s}),rn=F(_);var n=xt(),u=Ii(),h=en();const s=r(()=>{const a=(0,u.useField)(),l=(0,h.useForm)(),i=r(c=>c?(0,n.isObjectField)(c)?c:i(c==null?void 0:c.parent):l,"findObjectParent");return i(a)},"useParentForm");return rn}var on,Di;function Dl(){if(Di)return on;Di=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{useFieldSchema:()=>h}),on=F(_);var n=V,u=we();const h=r(()=>(0,n.useContext)(u.SchemaContext),"useFieldSchema");return on}var nn,Mi;function Ml(){if(Mi)return nn;Mi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>e(a,"name",{value:l,configurable:!0}),b=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},v=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{useFormEffects:()=>s}),nn=F(_);var n=at(),u=le(),h=en();const s=r(a=>{const l=(0,h.useForm)();(0,n.unstable_useCompatFactory)(()=>{const i=(0,u.uid)();return l.addEffects(i,a),{dispose(){l.removeEffects(i)}}})},"useFormEffects");return nn}var sn,Ri;function Rl(){if(Ri)return sn;Ri=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{useExpressionScope:()=>h}),sn=F(_);var n=V,u=wi();const h=r(()=>(0,n.useContext)(u.SchemaExpressionScopeContext),"useExpressionScope");return sn}var Ni;function Ue(){return Ni||(Ni=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,en(),e.exports),v(_,Ii(),e.exports),v(_,Al(),e.exports),v(_,Dl(),e.exports),v(_,Ml(),e.exports),v(_,Rl(),e.exports)}(Xo)),Xo.exports}var an,Ti;function Nl(){if(Ti)return an;Ti=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(g,x)=>t(g,"name",{value:x,configurable:!0}),F=(g,x)=>{for(var P in x)t(g,P,{get:x[P],enumerable:!0})},_=(g,x,P,S)=>{if(x&&typeof x=="object"||typeof x=="function")for(let j of f(x))!b.call(g,j)&&j!==P&&t(g,j,{get:()=>x[j],enumerable:!(S=o(x,j))||S.enumerable});return g},n=(g,x,P)=>(P=g!=null?e(r(g)):{},_(!g||!g.__esModule?t(P,"default",{value:g,enumerable:!0}):P,g)),u=g=>_(t({},"__esModule",{value:!0}),g),h={};F(h,{Observer:()=>i.Observer,connect:()=>m,mapProps:()=>d,mapReadPretty:()=>y,observer:()=>i.observer}),an=u(h);var s=n(V),a=n(si()),l=xt(),i=at(),c=le(),p=Ue();function d(...g){return x=>(0,i.observer)(P=>{const S=(0,p.useField)(),j=g.reduce((O,w)=>((0,c.isFn)(w)?O=Object.assign(O,w(O,S)):(0,c.each)(w,(I,E)=>{const R=c.FormPath.getIn(S,E),N=(0,c.isStr)(I)?I:E,L=c.FormPath.getIn(O,N);E==="value"&&I!==E&&delete O.value,!((0,c.isValid)(L)&&!(0,c.isValid)(R))&&c.FormPath.setIn(O,N,R)}),O),k({},P));return s.default.createElement(x,j)},{forwardRef:!0})}v(d,"mapProps");function y(g,x){return P=>(0,i.observer)(S=>{const j=(0,p.useField)();return!(0,l.isVoidField)(j)&&(j==null?void 0:j.pattern)==="readPretty"?s.default.createElement(g,k(k({},x),S)):s.default.createElement(P,S)},{forwardRef:!0})}v(y,"mapReadPretty");function m(g,...x){const P=x.reduce((j,O)=>O(j),g),S=s.default.forwardRef((j,O)=>s.default.createElement(P,W(k({},j),{ref:O})));return g&&(0,a.default)(S,g),S}return v(m,"connect"),an}var ki;function we(){return ki||(ki=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,wi(),e.exports),v(_,Nl(),e.exports)}(Zo)),Zo.exports}var cn,Vi;function Tl(){if(Vi)return cn;Vi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,l)=>e(a,"name",{value:l,configurable:!0}),b=(a,l)=>{for(var i in l)e(a,i,{get:l[i],enumerable:!0})},v=(a,l,i,c)=>{if(l&&typeof l=="object"||typeof l=="function")for(let p of o(l))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>l[p],enumerable:!(c=t(l,p))||c.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{FormProvider:()=>s}),cn=F(_);var n=D,u=gt(),h=we();const s=r(a=>{const l=(0,u.useAttach)(a.form);return(0,n.jsx)(h.ContextCleaner,{children:(0,n.jsx)(h.FormContext.Provider,{value:l,children:a.children})})},"FormProvider");return s.displayName="FormProvider",cn}var un,Bi;function kl(){if(Bi)return un;Bi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},b=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},v=l=>b(e({},"__esModule",{value:!0}),l),F={};r(F,{FormConsumer:()=>a}),un=v(F);var _=D,n=V,u=at(),h=le(),s=Ue();const a=(0,u.observer)(l=>{const i=(0,h.isFn)(l.children)?l.children((0,s.useForm)()):null;return(0,_.jsx)(n.Fragment,{children:i})});return a.displayName="FormConsumer",un}var ln,Li;function Ft(){if(Li)return ln;Li=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(S,j)=>t(S,"name",{value:j,configurable:!0}),F=(S,j)=>{for(var O in j)t(S,O,{get:j[O],enumerable:!0})},_=(S,j,O,w)=>{if(j&&typeof j=="object"||typeof j=="function")for(let I of f(j))!b.call(S,I)&&I!==O&&t(S,I,{get:()=>j[I],enumerable:!(w=o(j,I))||w.enumerable});return S},n=(S,j,O)=>(O=S!=null?e(r(S)):{},_(!S||!S.__esModule?t(O,"default",{value:S,enumerable:!0}):O,S)),u=S=>_(t({},"__esModule",{value:!0}),S),h={};F(h,{ReactiveField:()=>P}),ln=u(h);var s=D,a=n(V),l=xt(),i=Pe(),c=at(),p=le(),d=we();const y=v((S,j)=>{if(!(!S&&!j)&&!(0,p.isFn)(S))return(0,s.jsxs)(a.Fragment,{children:[S,j]})},"mergeChildren"),m=v(S=>S&&(typeof S=="object"||typeof S=="function"),"isValidComponent"),g=v((S,j,O)=>(0,p.isFn)(S)?S(j,O):S,"renderChildren"),x=v(S=>{var N;const j=(0,a.useContext)(d.SchemaComponentsContext);if(!S.field)return(0,s.jsx)(a.Fragment,{children:g(S.children)});const O=S.field,w=y(g(S.children,O,O.form),(N=O.content)!=null?N:O.componentProps.children);if(O.display!=="visible")return null;const I=v(L=>{var K;return m(L)?L:(K=p.FormPath.getIn(j,L))!=null?K:L},"getComponent");return v(L=>O.decoratorType?a.default.createElement(I(O.decoratorType),(0,i.toJS)(O.decoratorProps),L):(0,s.jsx)(a.Fragment,{children:L}),"renderDecorator")(v(()=>{var L,K,te;if(!O.componentType)return w;const Y=(0,l.isVoidField)(O)?void 0:O.value,re=(0,l.isVoidField)(O)?(L=O.componentProps)==null?void 0:L.onChange:(...J)=>{var Q,ee;O.onInput(...J),(ee=(Q=O.componentProps)==null?void 0:Q.onChange)==null||ee.call(Q,...J)},ae=(0,l.isVoidField)(O)?(K=O.componentProps)==null?void 0:K.onFocus:(...J)=>{var Q,ee;O.onFocus(...J),(ee=(Q=O.componentProps)==null?void 0:Q.onFocus)==null||ee.call(Q,...J)},z=(0,l.isVoidField)(O)?(te=O.componentProps)==null?void 0:te.onBlur:(...J)=>{var Q,ee;O.onBlur(...J),(ee=(Q=O.componentProps)==null?void 0:Q.onBlur)==null||ee.call(Q,...J)},B=(0,l.isVoidField)(O)?void 0:O.pattern==="disabled"||O.pattern==="readPretty",U=(0,l.isVoidField)(O)?void 0:O.pattern==="readOnly";return a.default.createElement(I(O.componentType),W(k({disabled:B,readOnly:U},(0,i.toJS)(O.componentProps)),{value:Y,onChange:re,onFocus:ae,onBlur:z}),w)},"renderComponent")())},"ReactiveInternal");x.displayName="ReactiveField";const P=(0,c.observer)(x,{forwardRef:!0});return ln}var pn,Ui;function Gi(){if(Ui)return pn;Ui=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{ArrayField:()=>l}),pn=F(_);var n=D,u=Ue(),h=gt(),s=we(),a=Ft();const l=r(i=>{const c=(0,u.useForm)(),p=(0,u.useField)(),d=(0,h.useAttach)(c.createArrayField(k({basePath:p==null?void 0:p.address},i)));return(0,n.jsx)(s.FieldContext.Provider,{value:d,children:(0,n.jsx)(a.ReactiveField,{field:d,children:i.children})})},"ArrayField");return l.displayName="ArrayField",pn}var dn,Hi;function zi(){if(Hi)return dn;Hi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{ObjectField:()=>l}),dn=F(_);var n=D,u=Ue(),h=gt(),s=we(),a=Ft();const l=r(i=>{const c=(0,u.useForm)(),p=(0,u.useField)(),d=(0,h.useAttach)(c.createObjectField(k({basePath:p==null?void 0:p.address},i)));return(0,n.jsx)(s.FieldContext.Provider,{value:d,children:(0,n.jsx)(a.ReactiveField,{field:d,children:i.children})})},"ObjectField");return l.displayName="ObjectField",dn}var mn,Ji;function Wi(){if(Ji)return mn;Ji=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{VoidField:()=>l}),mn=F(_);var n=D,u=Ue(),h=gt(),s=we(),a=Ft();const l=r(i=>{const c=(0,u.useForm)(),p=(0,u.useField)(),d=(0,h.useAttach)(c.createVoidField(k({basePath:p==null?void 0:p.address},i)));return(0,n.jsx)(s.FieldContext.Provider,{value:d,children:(0,n.jsx)(a.ReactiveField,{field:d,children:i.children})})},"VoidField");return l.displayName="VoidField",mn}var fn,Yi;function qi(){if(Yi)return fn;Yi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,c)=>e(i,"name",{value:c,configurable:!0}),b=(i,c)=>{for(var p in c)e(i,p,{get:c[p],enumerable:!0})},v=(i,c,p,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let y of o(c))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>c[y],enumerable:!(d=t(c,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{Field:()=>l}),fn=F(_);var n=D,u=V,h=Ue(),s=we(),a=Ft();const l=r(i=>{const c=(0,h.useForm)(),p=(0,h.useField)(),d=c.createField(k({basePath:p==null?void 0:p.address},i));return(0,u.useEffect)(()=>(d==null||d.onMount(),()=>{d==null||d.onUnmount()}),[d]),(0,n.jsx)(s.FieldContext.Provider,{value:d,children:(0,n.jsx)(a.ReactiveField,{field:d,children:i.children})})},"Field");return l.displayName="Field",fn}var hn,Ki;function Zi(){if(Ki)return hn;Ki=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(x,P)=>e(x,"name",{value:P,configurable:!0}),b=(x,P)=>{for(var S in P)e(x,S,{get:P[S],enumerable:!0})},v=(x,P,S,j)=>{if(P&&typeof P=="object"||typeof P=="function")for(let O of o(P))!f.call(x,O)&&O!==S&&e(x,O,{get:()=>P[O],enumerable:!(j=t(P,O))||j.enumerable});return x},F=x=>v(e({},"__esModule",{value:!0}),x),_={};b(_,{RecursionField:()=>g}),hn=F(_);var n=D,u=V,h=jo(),s=le(),a=Ue(),l=we(),i=Gi(),c=qi(),p=zi(),d=Wi();const y=r(x=>{const P=(0,a.useExpressionScope)();return x.toFieldProps({scope:P})},"useFieldProps"),m=r(x=>{const P=(0,a.useField)();return x.onlyRenderProperties?x.basePath||(P==null?void 0:P.address.concat(x.name)):x.basePath||(P==null?void 0:P.address)},"useBasePath"),g=r(x=>{const P=m(x),S=(0,u.useMemo)(()=>new h.Schema(x.schema),[x.schema]),j=y(S),O=r(I=>{if(x.onlyRenderSelf)return;const E=h.Schema.getOrderProperties(S);if(E.length)return(0,n.jsx)(u.Fragment,{children:E.map(({schema:R,key:N},L)=>{const K=(I==null?void 0:I.address)||P;let te=R;if((0,s.isFn)(x.mapProperties)){const Y=x.mapProperties(R,N);Y&&(te=Y)}return(0,s.isFn)(x.filterProperties)&&x.filterProperties(te,N)===!1?null:(0,s.isBool)(x.propsRecursion)&&x.propsRecursion?(0,n.jsx)(g,{propsRecursion:!0,filterProperties:x.filterProperties,mapProperties:x.mapProperties,schema:te,name:N,basePath:K},`${L}-${N}`):(0,n.jsx)(g,{schema:te,name:N,basePath:K},`${L}-${N}`)})})},"renderProperties"),w=r(()=>(0,s.isValid)(x.name)?S.type==="object"?x.onlyRenderProperties?O():(0,n.jsx)(p.ObjectField,W(k({},j),{name:x.name,basePath:P,children:O})):S.type==="array"?(0,n.jsx)(i.ArrayField,W(k({},j),{name:x.name,basePath:P})):S.type==="void"?x.onlyRenderProperties?O():(0,n.jsx)(d.VoidField,W(k({},j),{name:x.name,basePath:P,children:O})):(0,n.jsx)(c.Field,W(k({},j),{name:x.name,basePath:P})):O(),"render");return S?(0,n.jsx)(l.SchemaContext.Provider,{value:S,children:w()}):(0,n.jsx)(u.Fragment,{})},"RecursionField");return hn}var bn,Qi;function St(){if(Qi)return bn;Qi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>e(l,"name",{value:i,configurable:!0}),b=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},v=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{ExpressionScope:()=>a}),bn=F(_);var n=D,u=V,h=le(),s=we();const a=r(l=>{const i=(0,u.useContext)(s.SchemaExpressionScopeContext);return(0,n.jsx)(s.SchemaExpressionScopeContext.Provider,{value:(0,h.lazyMerge)(i,l.value),children:l.children})},"ExpressionScope");return bn}var vn,Xi;function Vl(){if(Xi)return vn;Xi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var l in a)e(s,l,{get:a[l],enumerable:!0})},v=(s,a,l,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of o(a))!f.call(s,c)&&c!==l&&e(s,c,{get:()=>a[c],enumerable:!(i=t(a,c))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{RecordsScope:()=>h}),vn=F(_);var n=D,u=St();const h=r(s=>(0,n.jsx)(u.ExpressionScope,{value:{get $records(){var l;var a;return(l=(a=s.getRecords)==null?void 0:a.call(s))!=null?l:[]}},children:s.children}),"RecordsScope");return vn}var yn,$i;function Bl(){if($i)return yn;$i=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,i)=>e(l,"name",{value:i,configurable:!0}),b=(l,i)=>{for(var c in i)e(l,c,{get:i[c],enumerable:!0})},v=(l,i,c,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(l,d)&&d!==c&&e(l,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{RecordScope:()=>a}),yn=F(_);var n=D,u=le(),h=Ue(),s=St();const a=r(l=>{const i=(0,h.useExpressionScope)();return(0,n.jsx)(s.ExpressionScope,{value:{get $lookup(){return i==null?void 0:i.$record},get $record(){var c;const p=(c=l.getRecord)==null?void 0:c.call(l);return typeof p=="object"?(0,u.lazyMerge)(p,{get $lookup(){return i==null?void 0:i.$record},get $index(){var d;return(d=l.getIndex)==null?void 0:d.call(l)}}):p},get $index(){var c;return(c=l.getIndex)==null?void 0:c.call(l)}},children:l.children})},"RecordScope");return yn}var _n,ec;function Ll(){if(ec)return _n;ec=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(x,P)=>t(x,"name",{value:P,configurable:!0}),F=(x,P)=>{for(var S in P)t(x,S,{get:P[S],enumerable:!0})},_=(x,P,S,j)=>{if(P&&typeof P=="object"||typeof P=="function")for(let O of f(P))!b.call(x,O)&&O!==S&&t(x,O,{get:()=>P[O],enumerable:!(j=o(P,O))||j.enumerable});return x},n=(x,P,S)=>(S=x!=null?e(r(x)):{},_(!x||!x.__esModule?t(S,"default",{value:x,enumerable:!0}):S,x)),u=x=>_(t({},"__esModule",{value:!0}),x),h={};F(h,{render:()=>g}),_n=u(h);var s=n(V),a=le(),l,i,c,p,d;const y={portalDOM:(c=(i=(l=a.globalThisPolyfill)==null?void 0:l.document)==null?void 0:i.createElement)==null?void 0:c.call(i,"div"),createPortal:(d=(p=a.globalThisPolyfill)==null?void 0:p.ReactDOM)==null?void 0:d.createPortal},m=v(()=>{var P;var x;if(!y.createPortal)try{(P=y.createPortal)!=null||(y.createPortal=(x=require("react-dom"))==null?void 0:x.createPortal)}catch(S){}if(!y.createPortal)try{import("react-dom").then(S=>{var j;return(j=y.createPortal)!=null?j:y.createPortal=S==null?void 0:S.createPortal}).catch(()=>{})}catch(S){}},"loadCreatePortal"),g=v(x=>{var P;return((P=a.globalThisPolyfill.navigator)==null?void 0:P.product)==="ReactNative"?null:y.portalDOM&&y.createPortal?y.createPortal(x,y.portalDOM):s.default.createElement("template",{},x)},"render");return m(),_n}var xn,tc;function Ul(){if(tc)return xn;tc=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(P,S)=>t(P,"name",{value:S,configurable:!0}),F=(P,S)=>{for(var j in S)t(P,j,{get:S[j],enumerable:!0})},_=(P,S,j,O)=>{if(S&&typeof S=="object"||typeof S=="function")for(let w of f(S))!b.call(P,w)&&w!==j&&t(P,w,{get:()=>S[w],enumerable:!(O=o(S,w))||O.enumerable});return P},n=(P,S,j)=>(j=P!=null?e(r(P)):{},_(!P||!P.__esModule?t(j,"default",{value:P,enumerable:!0}):j,P)),u=P=>_(t({},"__esModule",{value:!0}),P),h={};F(h,{createSchemaField:()=>x}),xn=u(h);var s=D,a=n(V),l=jo(),i=le(),c=we(),p=Ll(),d=St(),y=Zi();const m={nonameId:0},g=v(()=>`NO_NAME_FIELD_$${m.nonameId++}`,"getRandomName");function x(P={}){function S(Y){const re=l.Schema.isSchemaInstance(Y.schema)?Y.schema:new l.Schema(k({type:"object"},Y.schema)),ae=v(()=>(m.nonameId=0,Y.schema?null:(0,p.render)((0,s.jsx)(c.SchemaMarkupContext.Provider,{value:re,children:Y.children}))),"renderMarkup"),z=v(()=>(0,s.jsx)(y.RecursionField,W(k({},Y),{schema:re})),"renderChildren");return(0,s.jsx)(c.SchemaOptionsContext.Provider,{value:P,children:(0,s.jsx)(c.SchemaComponentsContext.Provider,{value:(0,i.lazyMerge)(P.components,Y.components),children:(0,s.jsxs)(d.ExpressionScope,{value:(0,i.lazyMerge)(P.scope,Y.scope),children:[ae(),z()]})})})}v(S,"SchemaField"),S.displayName="SchemaField";function j(Y){const re=(0,a.useContext)(c.SchemaMarkupContext);if(!re)return(0,s.jsx)(a.Fragment,{});const ae=v(()=>(0,s.jsx)(a.default.Fragment,{children:Y.children}),"renderChildren"),z=v(B=>{const U=re.items;return U&&U.name!==Y.name?re.addProperty(Y.name,B):re.setItems(B)},"appendArraySchema");if(re.type==="object"||re.type==="void"){const B=re.addProperty(Y.name,Y);return(0,s.jsx)(c.SchemaMarkupContext.Provider,{value:B,children:ae()})}else if(re.type==="array"){const B=z(Y);return(0,s.jsx)(c.SchemaMarkupContext.Provider,{value:Array.isArray(B)?B[0]:B,children:Y.children})}else return ae()}v(j,"MarkupRender");function O(Y){return(0,s.jsx)(j,W(k({},Y),{name:Y.name||g()}))}v(O,"MarkupField"),O.displayName="MarkupField";function w(Y){return(0,s.jsx)(O,W(k({},Y),{type:"string"}))}v(w,"StringField"),w.displayName="StringField";function I(Y){return(0,s.jsx)(O,W(k({},Y),{type:"object"}))}v(I,"ObjectField"),I.displayName="ObjectField";function E(Y){return(0,s.jsx)(O,W(k({},Y),{type:"array"}))}v(E,"ArrayField"),E.displayName="ArrayField";function R(Y){return(0,s.jsx)(O,W(k({},Y),{type:"boolean"}))}v(R,"BooleanField"),R.displayName="BooleanField";function N(Y){return(0,s.jsx)(O,W(k({},Y),{type:"number"}))}v(N,"NumberField"),N.displayName="NumberField";function L(Y){return(0,s.jsx)(O,W(k({},Y),{type:"date"}))}v(L,"DateField"),L.displayName="DateField";function K(Y){return(0,s.jsx)(O,W(k({},Y),{type:"datetime"}))}v(K,"DateTimeField"),K.displayName="DateTimeField";function te(Y){return(0,s.jsx)(O,W(k({},Y),{type:"void"}))}return v(te,"VoidField"),te.displayName="VoidField",S.Markup=O,S.String=w,S.Object=I,S.Array=E,S.Boolean=R,S.Date=L,S.DateTime=K,S.Void=te,S.Number=N,S}return v(x,"createSchemaField"),xn}var rc;function Gl(){return rc||(rc=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Tl(),e.exports),v(_,kl(),e.exports),v(_,Gi(),e.exports),v(_,zi(),e.exports),v(_,Wi(),e.exports),v(_,Zi(),e.exports),v(_,St(),e.exports),v(_,Vl(),e.exports),v(_,Bl(),e.exports),v(_,Ul(),e.exports),v(_,qi(),e.exports)}(Io)),Io.exports}var gn,oc;function Hl(){if(oc)return gn;oc=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(F,_,n,u)=>{if(_&&typeof _=="object"||typeof _=="function")for(let h of o(_))!f.call(F,h)&&h!==n&&e(F,h,{get:()=>_[h],enumerable:!(u=t(_,h))||u.enumerable});return F},b=F=>r(e({},"__esModule",{value:!0}),F),v={};return gn=b(v),gn}var nc;function zl(){return nc||(nc=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,u,h,s)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of f(u))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>u[a],enumerable:!(s=o(u,a))||s.enumerable});return n},v=(n,u,h)=>(b(n,u,"default"),h&&b(h,u,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,jo(),e.exports),v(_,Gl(),e.exports),v(_,we(),e.exports),v(_,Ue(),e.exports),v(_,Hl(),e.exports)}(Nt)),Nt.exports}var Ze=zl();const sc=V.createContext(null),Fn=({children:e})=>{const[t,o]=V.useState({field:null,fieldSchema:null,schemaMarkup:null,expressionScope:null,schemaComponents:null,schemaOptions:null,form:null,formBlockValue:null}),f=r=>{o(b=>k(k({},b),r))};return D.jsx(sc.Provider,{value:W(k({},t),{setEditableField:f}),children:e})},ac=()=>{const e=V.useContext(sc);if(!e)throw new Error("useEditableSelectedField must be used within EditableSelectedFieldProvider");return e},ic=V.createContext(null),Sn=({children:e})=>{const[t,o]=V.useState({field:null,fieldSchema:null,schemaMarkup:null,expressionScope:null,schemaComponents:null,schemaOptions:null,form:null,formBlockValue:null}),f=r=>{o(b=>k(k({},b),r))};return D.jsx(ic.Provider,{value:W(k({},t),{setEditableForm:f}),children:e})},cc=()=>{const e=V.useContext(ic);if(!e)throw new Error("useEditableSelectedForm must be used within EditableSelectedFormProvider");return e},Qe=We.createStyles(({css:e})=>({editModel:e`
76
+ */var ni;function Su(){if(ni)return de;ni=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,f=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,b=e?Symbol.for("react.profiler"):60114,v=e?Symbol.for("react.provider"):60109,F=e?Symbol.for("react.context"):60110,_=e?Symbol.for("react.async_mode"):60111,n=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,s=e?Symbol.for("react.suspense_list"):60120,a=e?Symbol.for("react.memo"):60115,u=e?Symbol.for("react.lazy"):60116,i=e?Symbol.for("react.block"):60121,l=e?Symbol.for("react.fundamental"):60117,p=e?Symbol.for("react.responder"):60118,d=e?Symbol.for("react.scope"):60119;function y(g){if(typeof g=="object"&&g!==null){var x=g.$$typeof;switch(x){case t:switch(g=g.type,g){case _:case n:case f:case b:case r:case h:return g;default:switch(g=g&&g.$$typeof,g){case F:case c:case u:case a:case v:return g;default:return x}}case o:return x}}}function m(g){return y(g)===n}return de.AsyncMode=_,de.ConcurrentMode=n,de.ContextConsumer=F,de.ContextProvider=v,de.Element=t,de.ForwardRef=c,de.Fragment=f,de.Lazy=u,de.Memo=a,de.Portal=o,de.Profiler=b,de.StrictMode=r,de.Suspense=h,de.isAsyncMode=function(g){return m(g)||y(g)===_},de.isConcurrentMode=m,de.isContextConsumer=function(g){return y(g)===F},de.isContextProvider=function(g){return y(g)===v},de.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},de.isForwardRef=function(g){return y(g)===c},de.isFragment=function(g){return y(g)===f},de.isLazy=function(g){return y(g)===u},de.isMemo=function(g){return y(g)===a},de.isPortal=function(g){return y(g)===o},de.isProfiler=function(g){return y(g)===b},de.isStrictMode=function(g){return y(g)===r},de.isSuspense=function(g){return y(g)===h},de.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===f||g===n||g===b||g===r||g===h||g===s||typeof g=="object"&&g!==null&&(g.$$typeof===u||g.$$typeof===a||g.$$typeof===v||g.$$typeof===F||g.$$typeof===c||g.$$typeof===l||g.$$typeof===p||g.$$typeof===d||g.$$typeof===i)},de.typeOf=y,de}var si;function Pu(){return si||(si=1,Mo.exports=Su()),Mo.exports}var Ro,ai;function ii(){if(ai)return Ro;ai=1;var e=Pu(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},f={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},b={};b[e.ForwardRef]=f,b[e.Memo]=r;function v(u){return e.isMemo(u)?r:b[u.$$typeof]||t}var F=Object.defineProperty,_=Object.getOwnPropertyNames,n=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,s=Object.prototype;function a(u,i,l){if(typeof i!="string"){if(s){var p=h(i);p&&p!==s&&a(u,p,l)}var d=_(i);n&&(d=d.concat(n(i)));for(var y=v(u),m=v(i),g=0;g<d.length;++g){var x=d[g];if(!o[x]&&!(l&&l[x])&&!(m&&m[x])&&!(y&&y[x])){var P=c(i,x);try{F(u,x,P)}catch(S){}}}}return u}return Ro=a,Ro}var No={exports:{}},ko,ci;function Ou(){if(ci)return ko;ci=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(h,s)=>e(h,"name",{value:s,configurable:!0}),b=(h,s)=>{for(var a in s)e(h,a,{get:s[a],enumerable:!0})},v=(h,s,a,u)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of o(s))!f.call(h,i)&&i!==a&&e(h,i,{get:()=>s[i],enumerable:!(u=t(s,i))||u.enumerable});return h},F=h=>v(e({},"__esModule",{value:!0}),h),_={};b(_,{globalThisPolyfill:()=>c}),ko=F(_);function n(){try{if(typeof self!="undefined")return self}catch(h){}try{if(typeof window!="undefined")return window}catch(h){}try{if(typeof bt!="undefined")return bt}catch(h){}return Function("return this")()}r(n,"globalSelf");const c=n();return ko}var To,li;function Cu(){if(li)return To;li=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>e(a,"name",{value:u,configurable:!0}),b=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},v=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{GarbageCollector:()=>s}),To=F(_);var n=Ou();const c=n.globalThisPolyfill.FinalizationRegistry&&new n.globalThisPolyfill.FinalizationRegistry(a=>{var u;return(u=a==null?void 0:a.clean)==null?void 0:u.call(a)}),h=class{constructor(u,i=1e4){this.token={clean:u},this.expireTime=i}open(u){c?c.register(u,this.token,this.token):this.request=setTimeout(()=>{var i,l;(l=(i=this.token)==null?void 0:i.clean)==null||l.call(i)},this.expireTime)}close(){c?c.unregister(this.token):clearTimeout(this.request)}};r(h,"GarbageCollector");let s=h;return To}var Vo,ui;function wu(){if(ui)return Vo;ui=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(c,h)=>e(c,"name",{value:h,configurable:!0}),b=(c,h)=>{for(var s in h)e(c,s,{get:h[s],enumerable:!0})},v=(c,h,s,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let u of o(h))!f.call(c,u)&&u!==s&&e(c,u,{get:()=>h[u],enumerable:!(a=t(h,u))||a.enumerable});return c},F=c=>v(e({},"__esModule",{value:!0}),c),_={};b(_,{immediate:()=>n}),Vo=F(_);const n=r(c=>{let h=!1;return Promise.resolve(0).then(()=>{if(h){h=!1;return}c()}),()=>{h=!0}},"immediate");return Vo}var pi;function Bo(){return pi||(pi=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Cu(),e.exports),v(_,wu(),e.exports)}(No)),No.exports}var Lo,di;function mi(){if(di)return Lo;di=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>e(u,"name",{value:i,configurable:!0}),b=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},v=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{useCompatEffect:()=>a}),Lo=F(_);var n=V,c=Bo();const h=Array.isArray,s=r((u,i)=>{const l=h(u),p=h(i);return l!==p?!1:l?u.length!==i.length?!1:u.every((d,y)=>d===i[y]):u===i},"isEqualDeps"),a=r((u,i)=>{const l=(0,n.useRef)(null),p=(0,n.useRef)(!1);(0,n.useEffect)(()=>{p.current=!0;const d=u();return()=>{if(p.current=!1,!s(l.current,i)){d&&d();return}(0,c.immediate)(()=>{p.current||d&&d()})}},i),l.current=i},"useCompatEffect");return Lo}var Uo,fi;function hi(){if(fi)return Uo;fi=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(y,m)=>t(y,"name",{value:m,configurable:!0}),F=(y,m)=>{for(var g in m)t(y,g,{get:m[g],enumerable:!0})},_=(y,m,g,x)=>{if(m&&typeof m=="object"||typeof m=="function")for(let P of f(m))!b.call(y,P)&&P!==g&&t(y,P,{get:()=>m[P],enumerable:!(x=o(m,P))||x.enumerable});return y},n=(y,m,g)=>(g=y!=null?e(r(y)):{},_(!y||!y.__esModule?t(g,"default",{value:y,enumerable:!0}):g,y)),c=y=>_(t({},"__esModule",{value:!0}),y),h={};F(h,{useCompatFactory:()=>d}),Uo=c(h);var s=n(V),a=Bo(),u=mi();const i=class{};v(i,"ObjectToBeRetainedByReact");let l=i;function p(){return new l}v(p,"objectToBeRetainedByReactFactory");const d=v(y=>{const m=s.default.useRef(null),g=s.default.useRef(),[x]=s.default.useState(p);return m.current||(m.current=y()),g.current||(g.current=new a.GarbageCollector(()=>{m.current&&m.current.dispose()}),g.current.open(x)),(0,u.useCompatEffect)(()=>(g.current.close(),()=>{m.current&&(m.current.dispose(),m.current=null)}),[]),m.current},"useCompatFactory");return Uo}var Go,bi;function Ho(){if(bi)return Go;bi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(c,h)=>{for(var s in h)e(c,s,{get:h[s],enumerable:!0})},b=(c,h,s,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let u of o(h))!f.call(c,u)&&u!==s&&e(c,u,{get:()=>h[u],enumerable:!(a=t(h,u))||a.enumerable});return c},v=c=>b(e({},"__esModule",{value:!0}),c),F={};r(F,{useLayoutEffect:()=>n}),Go=v(F);var _=V;const n=typeof document!="undefined"?_.useLayoutEffect:_.useEffect;return Go}var zo,vi;function yi(){if(vi)return zo;vi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>e(a,"name",{value:u,configurable:!0}),b=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},v=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{useDidUpdate:()=>s}),zo=F(_);var n=V,c=Bo(),h=Ho();const s=r(a=>{const u=(0,n.useRef)(null);u.current=(0,c.immediate)(a),(0,h.useLayoutEffect)(()=>{u.current(),a()})},"useDidUpdate");return zo}var Jo,_i;function xi(){if(_i)return Jo;_i=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(l,p)=>e(l,"name",{value:p,configurable:!0}),b=(l,p)=>{for(var d in p)e(l,d,{get:p[d],enumerable:!0})},v=(l,p,d,y)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of o(p))!f.call(l,m)&&m!==d&&e(l,m,{get:()=>p[m],enumerable:!(y=t(p,m))||y.enumerable});return l},F=l=>v(e({},"__esModule",{value:!0}),l),_={};b(_,{useForceUpdate:()=>i}),Jo=F(_);var n=V,c=yi(),h=Ho();const s=[],a={value:0},u=new Set;function i(){const[,l]=(0,n.useState)([]),p=(0,n.useRef)(!1),d=(0,n.useRef)(!1);(0,h.useLayoutEffect)(()=>(p.current=!0,d.current&&(l([]),d.current=!1),()=>{p.current=!1}),s);const y=(0,n.useCallback)(()=>{l([])},s),m=(0,n.useCallback)(()=>{if(!p.current){d.current=!0;return}a.value===0?y():u.add(y)},s);return a.value++,(0,c.useDidUpdate)(()=>{a.value>0&&a.value--,a.value===0&&u.forEach(g=>{u.delete(g),g()})}),m}return r(i,"useForceUpdate"),Jo}var Wo,gi;function Fi(){if(gi)return Wo;gi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>e(a,"name",{value:u,configurable:!0}),b=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},v=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{useObserver:()=>s}),Wo=F(_);var n=Oe(),c=hi(),h=xi();const s=r((a,u)=>{const i=(0,h.useForceUpdate)();return(0,c.useCompatFactory)(()=>new n.Tracker(()=>{typeof(u==null?void 0:u.scheduler)=="function"?u.scheduler(i):i()},u==null?void 0:u.displayName)).track(a)},"useObserver");return Wo}var Yo,Si;function Eu(){if(Si)return Yo;Si=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(p,d)=>t(p,"name",{value:d,configurable:!0}),F=(p,d)=>{for(var y in d)t(p,y,{get:d[y],enumerable:!0})},_=(p,d,y,m)=>{if(d&&typeof d=="object"||typeof d=="function")for(let g of f(d))!b.call(p,g)&&g!==y&&t(p,g,{get:()=>d[g],enumerable:!(m=o(d,g))||m.enumerable});return p},n=(p,d,y)=>(y=p!=null?e(r(p)):{},_(!p||!p.__esModule?t(y,"default",{value:p,enumerable:!0}):y,p)),c=p=>_(t({},"__esModule",{value:!0}),p),h={};F(h,{Observer:()=>l,observer:()=>i}),Yo=c(h);var s=n(V),a=n(ii()),u=Fi();function i(p,d){const y=T({forwardRef:!1},d),m=y.forwardRef?(0,s.forwardRef)((x,P)=>(0,u.useObserver)(()=>p(W(T({},x),{ref:P})),y)):x=>(0,u.useObserver)(()=>p(x),y),g=(0,s.memo)(m);return(0,a.default)(g,p),y.displayName&&(g.displayName=y.displayName),g}v(i,"observer");const l=i(p=>{const d=typeof p.children=="function"?p.children():p.children;return s.default.createElement(s.Fragment,{},d)});return Yo}var qo,Pi;function ju(){if(Pi)return qo;Pi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(m,g)=>{for(var x in g)e(m,x,{get:g[x],enumerable:!0})},b=(m,g,x,P)=>{if(g&&typeof g=="object"||typeof g=="function")for(let S of o(g))!f.call(m,S)&&S!==x&&e(m,S,{get:()=>g[S],enumerable:!(P=t(g,S))||P.enumerable});return m},v=m=>b(e({},"__esModule",{value:!0}),m),F={};r(F,{unstable_useCompatEffect:()=>i,unstable_useCompatFactory:()=>l,unstable_useDidUpdate:()=>p,unstable_useForceUpdate:()=>u,unstable_useLayoutEffect:()=>d,unstable_useObserver:()=>y}),qo=v(F);var _=mi(),n=hi(),c=yi(),h=xi(),s=Ho(),a=Fi();const u=h.useForceUpdate,i=_.useCompatEffect,l=n.useCompatFactory,p=c.useDidUpdate,d=s.useLayoutEffect,y=a.useObserver;return qo}var Ko,Oi;function Iu(){if(Oi)return Ko;Oi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(F,_,n,c)=>{if(_&&typeof _=="object"||typeof _=="function")for(let h of o(_))!f.call(F,h)&&h!==n&&e(F,h,{get:()=>_[h],enumerable:!(c=t(_,h))||c.enumerable});return F},b=F=>r(e({},"__esModule",{value:!0}),F),v={};return Ko=b(v),Ko}var Ci;function it(){return Ci||(Ci=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Eu(),e.exports),v(_,ju(),e.exports),v(_,Iu(),e.exports)}(Do)),Do.exports}var Zo,wi;function St(){if(wi)return Zo;wi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(h,s)=>e(h,"name",{value:s,configurable:!0}),b=(h,s)=>{for(var a in s)e(h,a,{get:s[a],enumerable:!0})},v=(h,s,a,u)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of o(s))!f.call(h,i)&&i!==a&&e(h,i,{get:()=>s[i],enumerable:!(u=t(s,i))||u.enumerable});return h},F=h=>v(e({},"__esModule",{value:!0}),h),_={};b(_,{useAttach:()=>c}),Zo=F(_);var n=it();const c=r(h=>((0,n.unstable_useCompatEffect)(()=>(h.onMount(),()=>h.onUnmount()),[h]),h),"useAttach");return Zo}var Qo={exports:{}},Xo,Ei;function ji(){if(Ei)return Xo;Ei=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(x,P)=>t(x,"name",{value:P,configurable:!0}),F=(x,P)=>{for(var S in P)t(x,S,{get:P[S],enumerable:!0})},_=(x,P,S,j)=>{if(P&&typeof P=="object"||typeof P=="function")for(let O of f(P))!b.call(x,O)&&O!==S&&t(x,O,{get:()=>P[O],enumerable:!(j=o(P,O))||j.enumerable});return x},n=(x,P,S)=>(S=x!=null?e(r(x)):{},_(!x||!x.__esModule?t(S,"default",{value:x,enumerable:!0}):S,x)),c=x=>_(t({},"__esModule",{value:!0}),x),h={};F(h,{ContextCleaner:()=>g,FieldContext:()=>i,FormContext:()=>u,SchemaComponentsContext:()=>y,SchemaContext:()=>p,SchemaExpressionScopeContext:()=>d,SchemaMarkupContext:()=>l,SchemaOptionsContext:()=>m}),Xo=c(h);var s=n(V);const a=v((...x)=>({children:P})=>x.reduce((S,j)=>s.default.createElement(j.Provider,{value:void 0},S),P),"createContextCleaner"),u=(0,s.createContext)(null),i=(0,s.createContext)(null),l=(0,s.createContext)(null),p=(0,s.createContext)(null),d=(0,s.createContext)(null),y=(0,s.createContext)(null),m=(0,s.createContext)(null),g=a(i,l,p,d,y,m);return Xo}var $o={exports:{}},en,Ii;function tn(){if(Ii)return en;Ii=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{useForm:()=>h}),en=F(_);var n=V,c=je();const h=r(()=>(0,n.useContext)(c.FormContext),"useForm");return en}var rn,Ai;function Di(){if(Ai)return rn;Ai=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{useField:()=>h}),rn=F(_);var n=V,c=je();const h=r(()=>(0,n.useContext)(c.FieldContext),"useField");return rn}var on,Mi;function Au(){if(Mi)return on;Mi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>e(a,"name",{value:u,configurable:!0}),b=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},v=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{useParentForm:()=>s}),on=F(_);var n=Ft(),c=Di(),h=tn();const s=r(()=>{const a=(0,c.useField)(),u=(0,h.useForm)(),i=r(l=>l?(0,n.isObjectField)(l)?l:i(l==null?void 0:l.parent):u,"findObjectParent");return i(a)},"useParentForm");return on}var nn,Ri;function Du(){if(Ri)return nn;Ri=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{useFieldSchema:()=>h}),nn=F(_);var n=V,c=je();const h=r(()=>(0,n.useContext)(c.SchemaContext),"useFieldSchema");return nn}var sn,Ni;function Mu(){if(Ni)return sn;Ni=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>e(a,"name",{value:u,configurable:!0}),b=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},v=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{useFormEffects:()=>s}),sn=F(_);var n=it(),c=ue(),h=tn();const s=r(a=>{const u=(0,h.useForm)();(0,n.unstable_useCompatFactory)(()=>{const i=(0,c.uid)();return u.addEffects(i,a),{dispose(){u.removeEffects(i)}}})},"useFormEffects");return sn}var an,ki;function Ru(){if(ki)return an;ki=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{useExpressionScope:()=>h}),an=F(_);var n=V,c=ji();const h=r(()=>(0,n.useContext)(c.SchemaExpressionScopeContext),"useExpressionScope");return an}var Ti;function Ge(){return Ti||(Ti=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,tn(),e.exports),v(_,Di(),e.exports),v(_,Au(),e.exports),v(_,Du(),e.exports),v(_,Mu(),e.exports),v(_,Ru(),e.exports)}($o)),$o.exports}var cn,Vi;function Nu(){if(Vi)return cn;Vi=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(g,x)=>t(g,"name",{value:x,configurable:!0}),F=(g,x)=>{for(var P in x)t(g,P,{get:x[P],enumerable:!0})},_=(g,x,P,S)=>{if(x&&typeof x=="object"||typeof x=="function")for(let j of f(x))!b.call(g,j)&&j!==P&&t(g,j,{get:()=>x[j],enumerable:!(S=o(x,j))||S.enumerable});return g},n=(g,x,P)=>(P=g!=null?e(r(g)):{},_(!g||!g.__esModule?t(P,"default",{value:g,enumerable:!0}):P,g)),c=g=>_(t({},"__esModule",{value:!0}),g),h={};F(h,{Observer:()=>i.Observer,connect:()=>m,mapProps:()=>d,mapReadPretty:()=>y,observer:()=>i.observer}),cn=c(h);var s=n(V),a=n(ii()),u=Ft(),i=it(),l=ue(),p=Ge();function d(...g){return x=>(0,i.observer)(P=>{const S=(0,p.useField)(),j=g.reduce((O,w)=>((0,l.isFn)(w)?O=Object.assign(O,w(O,S)):(0,l.each)(w,(I,E)=>{const R=l.FormPath.getIn(S,E),N=(0,l.isStr)(I)?I:E,L=l.FormPath.getIn(O,N);E==="value"&&I!==E&&delete O.value,!((0,l.isValid)(L)&&!(0,l.isValid)(R))&&l.FormPath.setIn(O,N,R)}),O),T({},P));return s.default.createElement(x,j)},{forwardRef:!0})}v(d,"mapProps");function y(g,x){return P=>(0,i.observer)(S=>{const j=(0,p.useField)();return!(0,u.isVoidField)(j)&&(j==null?void 0:j.pattern)==="readPretty"?s.default.createElement(g,T(T({},x),S)):s.default.createElement(P,S)},{forwardRef:!0})}v(y,"mapReadPretty");function m(g,...x){const P=x.reduce((j,O)=>O(j),g),S=s.default.forwardRef((j,O)=>s.default.createElement(P,W(T({},j),{ref:O})));return g&&(0,a.default)(S,g),S}return v(m,"connect"),cn}var Bi;function je(){return Bi||(Bi=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,ji(),e.exports),v(_,Nu(),e.exports)}(Qo)),Qo.exports}var ln,Li;function ku(){if(Li)return ln;Li=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(a,u)=>e(a,"name",{value:u,configurable:!0}),b=(a,u)=>{for(var i in u)e(a,i,{get:u[i],enumerable:!0})},v=(a,u,i,l)=>{if(u&&typeof u=="object"||typeof u=="function")for(let p of o(u))!f.call(a,p)&&p!==i&&e(a,p,{get:()=>u[p],enumerable:!(l=t(u,p))||l.enumerable});return a},F=a=>v(e({},"__esModule",{value:!0}),a),_={};b(_,{FormProvider:()=>s}),ln=F(_);var n=D,c=St(),h=je();const s=r(a=>{const u=(0,c.useAttach)(a.form);return(0,n.jsx)(h.ContextCleaner,{children:(0,n.jsx)(h.FormContext.Provider,{value:u,children:a.children})})},"FormProvider");return s.displayName="FormProvider",ln}var un,Ui;function Tu(){if(Ui)return un;Ui=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},b=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},v=u=>b(e({},"__esModule",{value:!0}),u),F={};r(F,{FormConsumer:()=>a}),un=v(F);var _=D,n=V,c=it(),h=ue(),s=Ge();const a=(0,c.observer)(u=>{const i=(0,h.isFn)(u.children)?u.children((0,s.useForm)()):null;return(0,_.jsx)(n.Fragment,{children:i})});return a.displayName="FormConsumer",un}var pn,Gi;function Pt(){if(Gi)return pn;Gi=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(S,j)=>t(S,"name",{value:j,configurable:!0}),F=(S,j)=>{for(var O in j)t(S,O,{get:j[O],enumerable:!0})},_=(S,j,O,w)=>{if(j&&typeof j=="object"||typeof j=="function")for(let I of f(j))!b.call(S,I)&&I!==O&&t(S,I,{get:()=>j[I],enumerable:!(w=o(j,I))||w.enumerable});return S},n=(S,j,O)=>(O=S!=null?e(r(S)):{},_(!S||!S.__esModule?t(O,"default",{value:S,enumerable:!0}):O,S)),c=S=>_(t({},"__esModule",{value:!0}),S),h={};F(h,{ReactiveField:()=>P}),pn=c(h);var s=D,a=n(V),u=Ft(),i=Oe(),l=it(),p=ue(),d=je();const y=v((S,j)=>{if(!(!S&&!j)&&!(0,p.isFn)(S))return(0,s.jsxs)(a.Fragment,{children:[S,j]})},"mergeChildren"),m=v(S=>S&&(typeof S=="object"||typeof S=="function"),"isValidComponent"),g=v((S,j,O)=>(0,p.isFn)(S)?S(j,O):S,"renderChildren"),x=v(S=>{var N;const j=(0,a.useContext)(d.SchemaComponentsContext);if(!S.field)return(0,s.jsx)(a.Fragment,{children:g(S.children)});const O=S.field,w=y(g(S.children,O,O.form),(N=O.content)!=null?N:O.componentProps.children);if(O.display!=="visible")return null;const I=v(L=>{var q;return m(L)?L:(q=p.FormPath.getIn(j,L))!=null?q:L},"getComponent");return v(L=>O.decoratorType?a.default.createElement(I(O.decoratorType),(0,i.toJS)(O.decoratorProps),L):(0,s.jsx)(a.Fragment,{children:L}),"renderDecorator")(v(()=>{var L,q,te;if(!O.componentType)return w;const Y=(0,u.isVoidField)(O)?void 0:O.value,re=(0,u.isVoidField)(O)?(L=O.componentProps)==null?void 0:L.onChange:(...J)=>{var Q,ee;O.onInput(...J),(ee=(Q=O.componentProps)==null?void 0:Q.onChange)==null||ee.call(Q,...J)},ae=(0,u.isVoidField)(O)?(q=O.componentProps)==null?void 0:q.onFocus:(...J)=>{var Q,ee;O.onFocus(...J),(ee=(Q=O.componentProps)==null?void 0:Q.onFocus)==null||ee.call(Q,...J)},z=(0,u.isVoidField)(O)?(te=O.componentProps)==null?void 0:te.onBlur:(...J)=>{var Q,ee;O.onBlur(...J),(ee=(Q=O.componentProps)==null?void 0:Q.onBlur)==null||ee.call(Q,...J)},B=(0,u.isVoidField)(O)?void 0:O.pattern==="disabled"||O.pattern==="readPretty",U=(0,u.isVoidField)(O)?void 0:O.pattern==="readOnly";return a.default.createElement(I(O.componentType),W(T({disabled:B,readOnly:U},(0,i.toJS)(O.componentProps)),{value:Y,onChange:re,onFocus:ae,onBlur:z}),w)},"renderComponent")())},"ReactiveInternal");x.displayName="ReactiveField";const P=(0,l.observer)(x,{forwardRef:!0});return pn}var dn,Hi;function zi(){if(Hi)return dn;Hi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{ArrayField:()=>u}),dn=F(_);var n=D,c=Ge(),h=St(),s=je(),a=Pt();const u=r(i=>{const l=(0,c.useForm)(),p=(0,c.useField)(),d=(0,h.useAttach)(l.createArrayField(T({basePath:p==null?void 0:p.address},i)));return(0,n.jsx)(s.FieldContext.Provider,{value:d,children:(0,n.jsx)(a.ReactiveField,{field:d,children:i.children})})},"ArrayField");return u.displayName="ArrayField",dn}var mn,Ji;function Wi(){if(Ji)return mn;Ji=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{ObjectField:()=>u}),mn=F(_);var n=D,c=Ge(),h=St(),s=je(),a=Pt();const u=r(i=>{const l=(0,c.useForm)(),p=(0,c.useField)(),d=(0,h.useAttach)(l.createObjectField(T({basePath:p==null?void 0:p.address},i)));return(0,n.jsx)(s.FieldContext.Provider,{value:d,children:(0,n.jsx)(a.ReactiveField,{field:d,children:i.children})})},"ObjectField");return u.displayName="ObjectField",mn}var fn,Yi;function qi(){if(Yi)return fn;Yi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{VoidField:()=>u}),fn=F(_);var n=D,c=Ge(),h=St(),s=je(),a=Pt();const u=r(i=>{const l=(0,c.useForm)(),p=(0,c.useField)(),d=(0,h.useAttach)(l.createVoidField(T({basePath:p==null?void 0:p.address},i)));return(0,n.jsx)(s.FieldContext.Provider,{value:d,children:(0,n.jsx)(a.ReactiveField,{field:d,children:i.children})})},"VoidField");return u.displayName="VoidField",fn}var hn,Ki;function Zi(){if(Ki)return hn;Ki=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(i,l)=>e(i,"name",{value:l,configurable:!0}),b=(i,l)=>{for(var p in l)e(i,p,{get:l[p],enumerable:!0})},v=(i,l,p,d)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of o(l))!f.call(i,y)&&y!==p&&e(i,y,{get:()=>l[y],enumerable:!(d=t(l,y))||d.enumerable});return i},F=i=>v(e({},"__esModule",{value:!0}),i),_={};b(_,{Field:()=>u}),hn=F(_);var n=D,c=V,h=Ge(),s=je(),a=Pt();const u=r(i=>{const l=(0,h.useForm)(),p=(0,h.useField)(),d=l.createField(T({basePath:p==null?void 0:p.address},i));return(0,c.useEffect)(()=>(d==null||d.onMount(),()=>{d==null||d.onUnmount()}),[d]),(0,n.jsx)(s.FieldContext.Provider,{value:d,children:(0,n.jsx)(a.ReactiveField,{field:d,children:i.children})})},"Field");return u.displayName="Field",hn}var bn,Qi;function Xi(){if(Qi)return bn;Qi=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(x,P)=>e(x,"name",{value:P,configurable:!0}),b=(x,P)=>{for(var S in P)e(x,S,{get:P[S],enumerable:!0})},v=(x,P,S,j)=>{if(P&&typeof P=="object"||typeof P=="function")for(let O of o(P))!f.call(x,O)&&O!==S&&e(x,O,{get:()=>P[O],enumerable:!(j=t(P,O))||j.enumerable});return x},F=x=>v(e({},"__esModule",{value:!0}),x),_={};b(_,{RecursionField:()=>g}),bn=F(_);var n=D,c=V,h=Io(),s=ue(),a=Ge(),u=je(),i=zi(),l=Zi(),p=Wi(),d=qi();const y=r(x=>{const P=(0,a.useExpressionScope)();return x.toFieldProps({scope:P})},"useFieldProps"),m=r(x=>{const P=(0,a.useField)();return x.onlyRenderProperties?x.basePath||(P==null?void 0:P.address.concat(x.name)):x.basePath||(P==null?void 0:P.address)},"useBasePath"),g=r(x=>{const P=m(x),S=(0,c.useMemo)(()=>new h.Schema(x.schema),[x.schema]),j=y(S),O=r(I=>{if(x.onlyRenderSelf)return;const E=h.Schema.getOrderProperties(S);if(E.length)return(0,n.jsx)(c.Fragment,{children:E.map(({schema:R,key:N},L)=>{const q=(I==null?void 0:I.address)||P;let te=R;if((0,s.isFn)(x.mapProperties)){const Y=x.mapProperties(R,N);Y&&(te=Y)}return(0,s.isFn)(x.filterProperties)&&x.filterProperties(te,N)===!1?null:(0,s.isBool)(x.propsRecursion)&&x.propsRecursion?(0,n.jsx)(g,{propsRecursion:!0,filterProperties:x.filterProperties,mapProperties:x.mapProperties,schema:te,name:N,basePath:q},`${L}-${N}`):(0,n.jsx)(g,{schema:te,name:N,basePath:q},`${L}-${N}`)})})},"renderProperties"),w=r(()=>(0,s.isValid)(x.name)?S.type==="object"?x.onlyRenderProperties?O():(0,n.jsx)(p.ObjectField,W(T({},j),{name:x.name,basePath:P,children:O})):S.type==="array"?(0,n.jsx)(i.ArrayField,W(T({},j),{name:x.name,basePath:P})):S.type==="void"?x.onlyRenderProperties?O():(0,n.jsx)(d.VoidField,W(T({},j),{name:x.name,basePath:P,children:O})):(0,n.jsx)(l.Field,W(T({},j),{name:x.name,basePath:P})):O(),"render");return S?(0,n.jsx)(u.SchemaContext.Provider,{value:S,children:w()}):(0,n.jsx)(c.Fragment,{})},"RecursionField");return bn}var vn,$i;function Ot(){if($i)return vn;$i=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>e(u,"name",{value:i,configurable:!0}),b=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},v=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{ExpressionScope:()=>a}),vn=F(_);var n=D,c=V,h=ue(),s=je();const a=r(u=>{const i=(0,c.useContext)(s.SchemaExpressionScopeContext);return(0,n.jsx)(s.SchemaExpressionScopeContext.Provider,{value:(0,h.lazyMerge)(i,u.value),children:u.children})},"ExpressionScope");return vn}var yn,ec;function Vu(){if(ec)return yn;ec=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(s,a)=>e(s,"name",{value:a,configurable:!0}),b=(s,a)=>{for(var u in a)e(s,u,{get:a[u],enumerable:!0})},v=(s,a,u,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let l of o(a))!f.call(s,l)&&l!==u&&e(s,l,{get:()=>a[l],enumerable:!(i=t(a,l))||i.enumerable});return s},F=s=>v(e({},"__esModule",{value:!0}),s),_={};b(_,{RecordsScope:()=>h}),yn=F(_);var n=D,c=Ot();const h=r(s=>(0,n.jsx)(c.ExpressionScope,{value:{get $records(){var u;var a;return(u=(a=s.getRecords)==null?void 0:a.call(s))!=null?u:[]}},children:s.children}),"RecordsScope");return yn}var _n,tc;function Bu(){if(tc)return _n;tc=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(u,i)=>e(u,"name",{value:i,configurable:!0}),b=(u,i)=>{for(var l in i)e(u,l,{get:i[l],enumerable:!0})},v=(u,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of o(i))!f.call(u,d)&&d!==l&&e(u,d,{get:()=>i[d],enumerable:!(p=t(i,d))||p.enumerable});return u},F=u=>v(e({},"__esModule",{value:!0}),u),_={};b(_,{RecordScope:()=>a}),_n=F(_);var n=D,c=ue(),h=Ge(),s=Ot();const a=r(u=>{const i=(0,h.useExpressionScope)();return(0,n.jsx)(s.ExpressionScope,{value:{get $lookup(){return i==null?void 0:i.$record},get $record(){var l;const p=(l=u.getRecord)==null?void 0:l.call(u);return typeof p=="object"?(0,c.lazyMerge)(p,{get $lookup(){return i==null?void 0:i.$record},get $index(){var d;return(d=u.getIndex)==null?void 0:d.call(u)}}):p},get $index(){var l;return(l=u.getIndex)==null?void 0:l.call(u)}},children:u.children})},"RecordScope");return _n}var xn,rc;function Lu(){if(rc)return xn;rc=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(x,P)=>t(x,"name",{value:P,configurable:!0}),F=(x,P)=>{for(var S in P)t(x,S,{get:P[S],enumerable:!0})},_=(x,P,S,j)=>{if(P&&typeof P=="object"||typeof P=="function")for(let O of f(P))!b.call(x,O)&&O!==S&&t(x,O,{get:()=>P[O],enumerable:!(j=o(P,O))||j.enumerable});return x},n=(x,P,S)=>(S=x!=null?e(r(x)):{},_(!x||!x.__esModule?t(S,"default",{value:x,enumerable:!0}):S,x)),c=x=>_(t({},"__esModule",{value:!0}),x),h={};F(h,{render:()=>g}),xn=c(h);var s=n(V),a=ue(),u,i,l,p,d;const y={portalDOM:(l=(i=(u=a.globalThisPolyfill)==null?void 0:u.document)==null?void 0:i.createElement)==null?void 0:l.call(i,"div"),createPortal:(d=(p=a.globalThisPolyfill)==null?void 0:p.ReactDOM)==null?void 0:d.createPortal},m=v(()=>{var P;var x;if(!y.createPortal)try{(P=y.createPortal)!=null||(y.createPortal=(x=require("react-dom"))==null?void 0:x.createPortal)}catch(S){}if(!y.createPortal)try{import("react-dom").then(S=>{var j;return(j=y.createPortal)!=null?j:y.createPortal=S==null?void 0:S.createPortal}).catch(()=>{})}catch(S){}},"loadCreatePortal"),g=v(x=>{var P;return((P=a.globalThisPolyfill.navigator)==null?void 0:P.product)==="ReactNative"?null:y.portalDOM&&y.createPortal?y.createPortal(x,y.portalDOM):s.default.createElement("template",{},x)},"render");return m(),xn}var gn,oc;function Uu(){if(oc)return gn;oc=1;var e=Object.create,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,v=(P,S)=>t(P,"name",{value:S,configurable:!0}),F=(P,S)=>{for(var j in S)t(P,j,{get:S[j],enumerable:!0})},_=(P,S,j,O)=>{if(S&&typeof S=="object"||typeof S=="function")for(let w of f(S))!b.call(P,w)&&w!==j&&t(P,w,{get:()=>S[w],enumerable:!(O=o(S,w))||O.enumerable});return P},n=(P,S,j)=>(j=P!=null?e(r(P)):{},_(!P||!P.__esModule?t(j,"default",{value:P,enumerable:!0}):j,P)),c=P=>_(t({},"__esModule",{value:!0}),P),h={};F(h,{createSchemaField:()=>x}),gn=c(h);var s=D,a=n(V),u=Io(),i=ue(),l=je(),p=Lu(),d=Ot(),y=Xi();const m={nonameId:0},g=v(()=>`NO_NAME_FIELD_$${m.nonameId++}`,"getRandomName");function x(P={}){function S(Y){const re=u.Schema.isSchemaInstance(Y.schema)?Y.schema:new u.Schema(T({type:"object"},Y.schema)),ae=v(()=>(m.nonameId=0,Y.schema?null:(0,p.render)((0,s.jsx)(l.SchemaMarkupContext.Provider,{value:re,children:Y.children}))),"renderMarkup"),z=v(()=>(0,s.jsx)(y.RecursionField,W(T({},Y),{schema:re})),"renderChildren");return(0,s.jsx)(l.SchemaOptionsContext.Provider,{value:P,children:(0,s.jsx)(l.SchemaComponentsContext.Provider,{value:(0,i.lazyMerge)(P.components,Y.components),children:(0,s.jsxs)(d.ExpressionScope,{value:(0,i.lazyMerge)(P.scope,Y.scope),children:[ae(),z()]})})})}v(S,"SchemaField"),S.displayName="SchemaField";function j(Y){const re=(0,a.useContext)(l.SchemaMarkupContext);if(!re)return(0,s.jsx)(a.Fragment,{});const ae=v(()=>(0,s.jsx)(a.default.Fragment,{children:Y.children}),"renderChildren"),z=v(B=>{const U=re.items;return U&&U.name!==Y.name?re.addProperty(Y.name,B):re.setItems(B)},"appendArraySchema");if(re.type==="object"||re.type==="void"){const B=re.addProperty(Y.name,Y);return(0,s.jsx)(l.SchemaMarkupContext.Provider,{value:B,children:ae()})}else if(re.type==="array"){const B=z(Y);return(0,s.jsx)(l.SchemaMarkupContext.Provider,{value:Array.isArray(B)?B[0]:B,children:Y.children})}else return ae()}v(j,"MarkupRender");function O(Y){return(0,s.jsx)(j,W(T({},Y),{name:Y.name||g()}))}v(O,"MarkupField"),O.displayName="MarkupField";function w(Y){return(0,s.jsx)(O,W(T({},Y),{type:"string"}))}v(w,"StringField"),w.displayName="StringField";function I(Y){return(0,s.jsx)(O,W(T({},Y),{type:"object"}))}v(I,"ObjectField"),I.displayName="ObjectField";function E(Y){return(0,s.jsx)(O,W(T({},Y),{type:"array"}))}v(E,"ArrayField"),E.displayName="ArrayField";function R(Y){return(0,s.jsx)(O,W(T({},Y),{type:"boolean"}))}v(R,"BooleanField"),R.displayName="BooleanField";function N(Y){return(0,s.jsx)(O,W(T({},Y),{type:"number"}))}v(N,"NumberField"),N.displayName="NumberField";function L(Y){return(0,s.jsx)(O,W(T({},Y),{type:"date"}))}v(L,"DateField"),L.displayName="DateField";function q(Y){return(0,s.jsx)(O,W(T({},Y),{type:"datetime"}))}v(q,"DateTimeField"),q.displayName="DateTimeField";function te(Y){return(0,s.jsx)(O,W(T({},Y),{type:"void"}))}return v(te,"VoidField"),te.displayName="VoidField",S.Markup=O,S.String=w,S.Object=I,S.Array=E,S.Boolean=R,S.Date=L,S.DateTime=q,S.Void=te,S.Number=N,S}return v(x,"createSchemaField"),gn}var nc;function Gu(){return nc||(nc=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,ku(),e.exports),v(_,Tu(),e.exports),v(_,zi(),e.exports),v(_,Wi(),e.exports),v(_,qi(),e.exports),v(_,Xi(),e.exports),v(_,Ot(),e.exports),v(_,Vu(),e.exports),v(_,Bu(),e.exports),v(_,Uu(),e.exports),v(_,Zi(),e.exports)}(Ao)),Ao.exports}var Fn,sc;function Hu(){if(sc)return Fn;sc=1;var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,r=(F,_,n,c)=>{if(_&&typeof _=="object"||typeof _=="function")for(let h of o(_))!f.call(F,h)&&h!==n&&e(F,h,{get:()=>_[h],enumerable:!(c=t(_,h))||c.enumerable});return F},b=F=>r(e({},"__esModule",{value:!0}),F),v={};return Fn=b(v),Fn}var ac;function zu(){return ac||(ac=1,function(e){var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,b=(n,c,h,s)=>{if(c&&typeof c=="object"||typeof c=="function")for(let a of f(c))!r.call(n,a)&&a!==h&&t(n,a,{get:()=>c[a],enumerable:!(s=o(c,a))||s.enumerable});return n},v=(n,c,h)=>(b(n,c,"default"),h&&b(h,c,"default")),F=n=>b(t({},"__esModule",{value:!0}),n),_={};e.exports=F(_),v(_,Io(),e.exports),v(_,Gu(),e.exports),v(_,je(),e.exports),v(_,Ge(),e.exports),v(_,Hu(),e.exports)}(kt)),kt.exports}var Qe=zu();const ic=V.createContext(null),Sn=({children:e})=>{const[t,o]=V.useState({field:null,fieldSchema:null,schemaMarkup:null,expressionScope:null,schemaComponents:null,schemaOptions:null,form:null,formBlockValue:null,highLightField:null}),f=r=>{o(b=>T(T({},b),r))};return D.jsx(ic.Provider,{value:W(T({},t),{setEditableField:f}),children:e})},Ct=()=>{const e=V.useContext(ic);if(!e)throw new Error("useEditableSelectedField must be used within EditableSelectedFieldProvider");return e},cc=V.createContext(null),Pn=({children:e})=>{const[t,o]=V.useState({field:null,fieldSchema:null,schemaMarkup:null,expressionScope:null,schemaComponents:null,schemaOptions:null,form:null,formBlockValue:null}),f=r=>{o(b=>T(T({},b),r))};return D.jsx(cc.Provider,{value:W(T({},t),{setEditableForm:f}),children:e})},lc=()=>{const e=V.useContext(cc);if(!e)throw new Error("useEditableSelectedForm must be used within EditableSelectedFormProvider");return e},Xe=Ye.createStyles(({css:e})=>({editModel:e`
77
77
  height: 100vh;
78
78
  top: auto !important;
79
79
  max-width: 100vw;
@@ -162,14 +162,14 @@
162
162
  color: #fff;
163
163
  display: block;
164
164
  }
165
- `,overrideAntdCSS:e`
165
+ `,currentbar:{position:"absolute",zIndex:999,top:0,left:0,right:0,bottom:0,background:"var(--colorBgSettingsHover)",pointerEvents:"none",".ant-space-item .anticon":{margin:0}},overrideAntdCSS:e`
166
166
  & .ant-space-item .anticon {
167
167
  margin: 0;
168
168
  }
169
169
  &:hover {
170
170
  display: flex !important;
171
171
  }
172
- `})),Jl=({schema:e,setSchemakey:t,eddn:o})=>{const{Sider:f}=oe.Layout,{styles:r}=Qe(),{t:b}=Z();return D.jsx(f,{width:300,style:{background:"white",overflow:"auto"},children:D.jsx(oe.Tabs,{defaultActiveKey:"field",centered:!0,tabBarGutter:50,items:[{label:b("Field properties"),key:"field",children:D.jsx(Wl,{schema:e,setSchemakey:t})},{label:b("Form properties"),key:"form",children:D.jsx(Kl,{schema:e})}]})})},Wl=({schema:e,setSchemakey:t})=>{const o=ac(),{t:f}=Z(),u=o,{setEditableField:r,fieldSchema:b}=u,v=En(u,["setEditableField","fieldSchema"]),F=(b==null?void 0:b["x-uid"])||null,_=V.useMemo(()=>!e||!F?null:C.findSchemaUtils(e,"x-uid",F)||null,[e,F]);return e&&F&&(_==null?void 0:_.name)?D.jsx("div",{children:D.jsx(uc,W(k({fieldSchema:_},v),{children:D.jsx(C.CollectionFieldProvider,{name:_.name,children:D.jsx(Yl,{})})}))},F):D.jsx("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#999",fontSize:"14px",marginTop:"20%"},children:f("Click a field to start customizing its properties")})},Yl=()=>{const e=C.useFieldComponentName(),{refreshKey:t}=wt();return D.jsx("div",{children:D.jsx(ql,{fieldComponentName:e},e)},t)},uc=({children:e,form:t=null,field:o=null,fieldSchema:f=null,schemaMarkup:r=null,expressionScope:b=null,schemaComponents:v=null,schemaOptions:F=null,formBlockValue:_=null})=>{const n=C.useFormActiveFields(),u=C.useSchemaComponentContext(),{getField:h}=C.useCollection_deprecated(),s=h(f.name);return D.jsx(Ze.ContextCleaner,{children:D.jsx(A.FormContext.Provider,{value:t,children:D.jsx(A.FieldContext.Provider,{value:o,children:D.jsx(Ze.SchemaMarkupContext.Provider,{value:r,children:D.jsx(A.SchemaContext.Provider,{value:f,children:D.jsx(A.SchemaExpressionScopeContext.Provider,{value:b,children:D.jsx(A.SchemaComponentsContext.Provider,{value:v,children:D.jsx(A.SchemaOptionsContext.Provider,{value:F,children:D.jsx(C.FormBlockContext.Provider,{value:_,children:D.jsx(C.FormActiveFieldsProvider,{name:"form",getActiveFieldsName:n==null?void 0:n.getActiveFieldsName,children:D.jsx(C.SchemaComponentContext.Provider,{value:W(k({},u),{designable:!1}),children:D.jsx(C.RecordProvider,{record:s,children:e})})})})})})})})})})})})},ql=({fieldComponentName:e})=>{var h,s,a,l,i,c,p,d,y;const[t]=V.useState(()=>A.createForm()),o=In(),f=(a=(s=(h=o==null?void 0:o.get(`editableFieldSettings:component:${e}`))==null?void 0:h.options)==null?void 0:s.items)!=null?a:[],r=(c=(i=(l=o==null?void 0:o.get("editableFieldSettings:FormItem"))==null?void 0:l.options)==null?void 0:i.items)!=null?c:[],v=[...(y=(d=(p=o==null?void 0:o.get("editableFieldSettings:Fields:Infterface"))==null?void 0:p.options)==null?void 0:d.items)!=null?y:[],...r,...f],{handleUpdate:F,components:_,fullSchema:n,initialValues:u}=lc(v);return t.setValues(u),D.jsxs("div",{style:{padding:"10px"},children:[v.map((m,g)=>D.jsx(pc,{item:m,onUpdate:x=>F(m.name||g,x)},m.name||g)),D.jsx(C.SchemaComponent,{schema:n,components:k(k({},C.CMConfigurationComponents),_)})]})},lc=e=>{var u;const[t,o]=V.useState({}),f=V.useCallback((h,s)=>{o(a=>a[h]===s?a:W(k({},a),{[h]:s}))},[]),r=V.useMemo(()=>e.reduce((h,s)=>(s.components&&typeof s.components=="object"&&Object.assign(h,s.components),h),{}),[e]),b={},v={};for(const h in t){const s=t[h];!(s!=null&&s.isVisible)||!(s!=null&&s.schema)||(b[h]=W(k({},s.schema),{name:h,"x-component-props":k(k({},s.schema["x-component-props"]),s.props)}),((u=s.props)==null?void 0:u.value)!==void 0&&(v[h]=s.props.value))}const F=V.useMemo(()=>A.uid(),[]),_=V.useMemo(()=>A.createForm(),[]),n={type:"void",properties:{[F]:{type:"void","x-component":"FormV2","x-component-props":{form:_},properties:b}}};return{itemStates:t,handleUpdate:f,components:r,fieldSchemas:b,initialValues:v,fullSchema:n}},pc=({item:e,onUpdate:t})=>{var r,b;const o=e.useVisible?(r=e.useVisible())!=null?r:!1:!0,f=(b=e.useSchema)==null?void 0:b.call(e);return V.useEffect(()=>{t({name:e.name,isVisible:o,schema:f})},[e.name,o]),null},Kl=({schema:e})=>{const v=cc(),{setEditableForm:o,fieldSchema:f}=v,r=En(v,["setEditableForm","fieldSchema"]);return e&&(f==null?void 0:f.name)?D.jsx("div",{children:D.jsx(uc,W(k({fieldSchema:f},r),{children:D.jsx(Zl,{})}))}):null},Zl=()=>{var F,_,n;const[e]=V.useState(()=>A.createForm()),t=In(),o=(n=(_=(F=t==null?void 0:t.get("blockEditableSettings:createForm"))==null?void 0:F.options)==null?void 0:_.items)!=null?n:[],{handleUpdate:f,components:r,fullSchema:b,initialValues:v}=lc(o);return e.setValues(v),D.jsxs("div",{style:{padding:"10px"},children:[o.map((u,h)=>D.jsx(pc,{item:u,onUpdate:s=>f(u.name||h,s)},u.name||h)),D.jsx(C.SchemaComponent,{schema:b,components:r})]})},Ql=({schema:e,setSchemakey:t,eddn:o})=>{const f=C.useCollection_deprecated(),{Sider:r}=oe.Layout,{t:b}=Z(),v=C.findSchemaUtils(e,"x-component","EditableGrid")||{},F={fieldsOptions:rp(),fieldsParentOptions:op(),fieldsExtendOptions:np(),associatedFormFieldsOptions:sp({readPretty:!0,block:"Form"})},_=h=>{const s=ep(h);let a=0,l=!1;v.mapProperties(i=>{const c=i["x-index"];typeof c=="number"&&(l=!0,c>a&&(a=c))}),s["x-index"]=l?a+1:1,v.addProperty(A.uid(),s),t(A.uid())},n=V.useMemo(()=>A.createForm(),[]),u={association:{sourceKey:"name",targetKey:"name"},collection:tp,request:{resource:"collections.fields",action:"list",params:{paginate:!1,filter:{$or:[{"interface.$not":null},{"options.source.$notEmpty":!0}]},sort:["sort"]}}};return D.jsx(r,{width:250,style:{background:"white",overflow:"auto"},children:D.jsx(C.RecordProvider,{record:f,children:D.jsx(C.ResourceActionProvider,W(k({},u),{children:D.jsx(A.FormContext.Provider,{value:n,children:D.jsx(oe.Tabs,{defaultActiveKey:"existing",centered:!0,tabBarGutter:50,items:[{label:b("Configure columns"),key:"existing",children:D.jsx(Xl,{schema:v,options:F,handleInsert:_})},{label:b("Add field"),key:"extra",children:D.jsx($l,{schema:v,handleInsert:_})}]})})}))})})},Xl=({schema:e,options:t,handleInsert:o})=>{var l;const{fieldsOptions:f,fieldsParentOptions:r,fieldsExtendOptions:b,associatedFormFieldsOptions:v}=t,_=C.useApp().schemaInitializerManager.get("form:configureFields"),u=(((l=_==null?void 0:_.options)==null?void 0:l.items)||[]).filter(i=>!["displayFields","parentCollectionFields","extendCollectionFields","associationFields","divider"].includes(i.name)),h=C.useCompile(),{t:s}=Z(),{styles:a}=Qe();return D.jsxs("div",{className:a.fieldsBlock,children:[D.jsx("p",{style:{fontWeight:400},children:s("Display fields")}),D.jsx(it,{schema:e,items:f,onInsert:o}),(r==null?void 0:r.length)>0&&D.jsxs(D.Fragment,{children:[D.jsx("p",{style:{fontWeight:400},children:s("Parent collection fields")}),D.jsx(oe.Collapse,{items:r.map((i,c)=>({key:String(c),label:h(i.title),children:D.jsx(it,{schema:e,items:i.children,onInsert:o}),styles:{body:{padding:0}}})),bordered:!1,style:{background:"white"}})]}),(b==null?void 0:b.length)>0&&D.jsxs(D.Fragment,{children:[D.jsx("p",{style:{fontWeight:400},children:s("Extend collections")}),D.jsx(oe.Collapse,{items:b.map((i,c)=>({key:String(c),label:h(i.title),children:D.jsx(it,{schema:e,items:i.children,onInsert:o}),styles:{body:{padding:0}}})),bordered:!1,style:{background:"white"}})]}),(v==null?void 0:v.length)>0&&D.jsxs(D.Fragment,{children:[D.jsx("p",{style:{fontWeight:400,marginBottom:0},children:s("Display association fields")}),D.jsx(oe.Collapse,{items:v.map((i,c)=>({key:String(c),label:h(i.title),children:D.jsx(it,{schema:e,items:i.children,onInsert:o}),styles:{body:{padding:0}}})),bordered:!1,style:{background:"white"}})]}),D.jsx("p",{style:{fontWeight:400},children:s("Other fields")}),D.jsx(it,{schema:e,items:u.map(i=>i.name==="addText"?W(k({},i),{schema:{type:"void",name:A.uid(),"x-editable":!1,"x-decorator":"FormItem","x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:markdown","x-component":"Markdown.Void","x-component-props":{content:'{{t("This is a demo text, **supports Markdown syntax**.")}}'}}}):i),onInsert:o,span:24})]})},it=({schema:e,items:t,onInsert:o,span:f=12})=>{const r=C.useCompile();return D.jsx(oe.Row,{gutter:[8,8],style:{marginBottom:"20px",rowGap:"12px"},children:t.map((b,v)=>{const F=b.schema;let _=!1;return e&&(F!=null&&F.name)&&(_=!!C.findSchemaUtils(e,"name",String(F.name))),D.jsx(oe.Col,{span:f,style:{paddingLeft:"8px",paddingRight:"8px"},children:D.jsx(oe.Tooltip,{title:r(b.title),arrow:!1,overlayInnerStyle:{fontSize:12},children:D.jsxs(oe.Button,{className:"ant-btn-fields",variant:"filled",style:{alignItems:"center",justifyContent:"flex-start"},onClick:()=>{var n;_||((n=b==null?void 0:b.schemaInitialize)==null||n.call(b,F),o(F))},disabled:!!_,children:[D.jsx(C.Icon,{type:b.icon||"EditOutlined",style:{fontSize:14}}),D.jsx("span",{style:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12},children:r(b.title)})]})})},b.name||v)})})},$l=({schema:e,handleInsert:t})=>{var d,y;const{data:o}=V.useContext(C.CollectionRecordContext),{data:{database:f}}=C.useCurrentAppInfo(),{getInterface:r,getTemplate:b,collections:v,getCollection:F,getCollections:_,refreshCM:n}=C.useCollectionManager_deprecated(),{refresh:u}=C.useResourceActionContext(),h=C.useCompile(),{t:s}=Z(),a=C.useFieldInterfaceOptions(),{styles:l}=Qe();(y=(d=F(o.name))==null?void 0:d.options)!=null&&y.fields||o.fields;const{resource:i}=C.useResourceContext(),c=V.useCallback(()=>{const{availableFieldInterfaces:m}=b(o.template)||{},{exclude:g,include:x}=m||{},P=[];return a.forEach(S=>{var j;if(S.key==="systemInfo")P.push(W(k({},S),{children:S.children.filter(O=>O.hidden?!1:O.value==="tableoid"?x!=null&&x.length?x.includes(O.value):(f==null?void 0:f.dialect)==="postgres":typeof o[O.value]=="boolean"?o[O.value]:!0)}));else{let O=[];x!=null&&x.length?x.forEach(w=>{var E;const I=(E=S==null?void 0:S.children)==null?void 0:E.find(R=>[w,w.interface].includes(R.name));I&&O.push(W(k({},I),{targetScope:w==null?void 0:w.targetScope}))}):g!=null&&g.length?O=(j=S==null?void 0:S.children)==null?void 0:j.filter(w=>!g.includes(w.name)):O=S==null?void 0:S.children,O!=null&&O.length&&P.push(W(k({},S),{children:O}))}}),P},[b,o]),p=V.useMemo(()=>c().map(m=>{var g;return((g=m==null?void 0:m.children)==null?void 0:g.length)===0?null:o.template==="view"?{type:"group",label:h(m.label),title:h(m.label),key:m.label,children:m.children.filter(x=>["m2o","custom","m2m"].includes(x.name)).map(x=>({label:h(x.title),title:h(x.title),icon:x.icon,key:x.name,dataTargetScope:x.targetScope}))}:{type:"group",label:h(m.label),title:h(m.label),key:m.label,children:m==null?void 0:m.children.filter(x=>!["o2o","subTable","linkTo"].includes(x.name)).map(x=>({label:h(x.title),title:h(x.title),icon:x.icon,key:x.name,dataTargetScope:x.targetScope}))}}).filter(m=>{var g;return(g=m==null?void 0:m.children)==null?void 0:g.length}),[c]);return o.template!=="sql"&&D.jsx("div",{className:l.fieldsBlock,children:p.map((m,g)=>D.jsxs("div",{children:[D.jsx("p",{style:{fontWeight:400,fontSize:14},children:m.title}),D.jsx(oe.Row,{gutter:[8,8],style:{marginBottom:"20px",rowGap:"12px"},children:m.children.map((x,P)=>D.jsx(oe.Col,{span:12,style:{paddingLeft:"8px",paddingRight:"8px"},children:D.jsx(oe.Tooltip,{title:h(x.title),arrow:!1,overlayInnerStyle:{fontSize:12},children:D.jsxs(oe.Button,{className:"ant-btn-fields",variant:"filled",style:{alignItems:"center",justifyContent:"flex-start"},onClick:()=>ie(null,null,function*(){var K,te,Y,re;const S=r(x.key),j=W(k({name:`f_${A.uid()}`},se.cloneDeep(S.default)),{interface:S.name});j.uiSchema||(j.uiSchema={}),["oho","o2o","obo","o2m","m2m","m2o"].includes(j.interface)&&(j.target="__temp__",["oho","o2o"].includes(j.interface)||(j.targetKey="id")),j.uiSchema.title=x.title||h("Unnamed"),j.reverseField&&(j.reverseField.name=`f_${A.uid()}`),j.autoCreateReverseField||delete j.reverseField,delete j.autoCreateReverseField;const w=r(j.interface),I=F(j.target),E=(j==null?void 0:j.target)&&((K=F(j==null?void 0:j.target))==null?void 0:K.template)==="file",R=I,N=(te=j==null?void 0:j.uiSchema["x-component-props"])==null?void 0:te.fieldNames,L={type:"string",name:j.name,"x-toolbar":"EditableFormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":`${o.name}.${j.name}`,"x-component-props":E?{fieldNames:{label:"preview",value:"id"}}:R&&N?{fieldNames:W(k({},N),{label:(I==null?void 0:I.titleField)||N.label})}:{},"x-read-pretty":(Y=j==null?void 0:j.uiSchema)==null?void 0:Y["x-read-pretty"]};(re=w==null?void 0:w.schemaInitialize)==null||re.call(w,L,{field:j,block:"Form",readPretty:!1,action:A.action,targetCollection:I}),yield i.create({values:j}),u(),yield n(),t(L)}),children:[D.jsx(C.Icon,{type:x.icon||"EditOutlined",style:{fontSize:14}}),D.jsx("span",{style:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12},children:h(x.title)})]})})},x.key||P))})]},g))})};function ep(e){const t=A.uid(),o=A.uid(),f=A.uid();return{type:"void","x-component":"EditableGrid.Row",_isJSONSchemaObject:!0,version:"2.0","x-uid":t,"x-async":!1,"x-index":1,properties:{[o]:{type:"void","x-component":"EditableGrid.Col",_isJSONSchemaObject:!0,version:"2.0","x-uid":o,"x-async":!1,"x-index":1,properties:{[e.name]:W(k({},e),{_isJSONSchemaObject:!0,version:"2.0","x-uid":f,"x-async":!1,"x-index":1})}}}}}const tp={name:"fields",fields:[{type:"string",name:"type",interface:"input",uiSchema:{title:'{{ t("Storage type") }}',type:"string","x-component":"Select",enum:[{label:"String",value:"string"}],required:!0}},{type:"string",name:"interface",interface:"input",uiSchema:{title:'{{ t("Field interface") }}',type:"string","x-component":"Select",enum:"{{interfaces}}"}},{type:"string",name:"title",interface:"input",uiSchema:{title:'{{ t("Field display name") }}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"name",interface:"input",uiSchema:{title:'{{ t("Field name") }}',type:"string","x-component":"Input"}},{type:"string",name:"description",interface:"input",uiSchema:{title:'{{ t("Description") }}',type:"string","x-component":"Input.TextArea"}}]},rp=e=>{var h;const{name:t}=C.useCollection_deprecated(),{getInterface:o,getCollection:f,getCollectionFields:r}=C.useCollectionManager_deprecated(),b=r(t)||[],v=A.useForm(),{readPretty:F=v.readPretty,block:_="Form"}={},{fieldSchema:n}=C.useActionContext(),u=n==null?void 0:n["x-action"];return(h=b==null?void 0:b.filter(s=>(s==null?void 0:s.interface)&&!(s!=null&&s.isForeignKey)&&!(s!=null&&s.treeChildren)))==null?void 0:h.map(s=>{var m,g,x,P;const a=o(s.interface),l=f(s.target),i=(s==null?void 0:s.target)&&((m=f(s==null?void 0:s.target))==null?void 0:m.template)==="file",c=l,p=(g=s==null?void 0:s.uiSchema["x-component-props"])==null?void 0:g.fieldNames,d={type:"string",name:s.name,"x-toolbar":"EditableFormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":`${t}.${s.name}`,"x-component-props":i?{fieldNames:{label:"preview",value:"id"}}:c&&p?{fieldNames:W(k({},p),{label:(l==null?void 0:l.titleField)||p.label})}:{},"x-read-pretty":(x=s==null?void 0:s.uiSchema)==null?void 0:x["x-read-pretty"]},y={type:"item",name:s.name,icon:a.icon||"EditOutlined",title:((P=s==null?void 0:s.uiSchema)==null?void 0:P.title)||s.name,Component:"CollectionFieldInitializer",remove:C.removeGridFormItem,schemaInitialize:S=>{var j;(j=a==null?void 0:a.schemaInitialize)==null||j.call(a,S,{field:s,block:_,readPretty:F,action:u,targetCollection:l})},schema:d};return _==="Kanban"&&(y.find=(S,j,O)=>{const w=C.findSchemaUtils(S,"x-component",_);return C.findSchemaUtils(w,j,O)}),y})},op=e=>{const{name:t}=C.useCollection_deprecated(),{getInterface:o,getInheritCollections:f,getCollection:r,getParentCollectionFields:b}=C.useCollectionManager_deprecated(),v=f(t),{snapshot:F}=C.useActionContext(),_=A.useForm(),n=C.useCompile();return v==null?void 0:v.map(u=>{var c;const h=b(u,t),{readPretty:s=_.readPretty,block:a="Form",component:l="CollectionField"}={},i=r(u);return{title:n(i==null?void 0:i.title),children:(c=h==null?void 0:h.filter(p=>(p==null?void 0:p.interface)&&!(p!=null&&p.isForeignKey)))==null?void 0:c.map(p=>{var x,P,S,j,O;const d=o(p.interface),y=r(p.target),m={type:"string",name:p.name,title:((x=p==null?void 0:p.uiSchema)==null?void 0:x.title)||p.name,"x-toolbar":"EditableFormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-component":l,"x-decorator":"FormItem","x-collection-field":`${t}.${p.name}`,"x-component-props":{},"x-read-pretty":(P=p==null?void 0:p.uiSchema)==null?void 0:P["x-read-pretty"]};return(S=d==null?void 0:d.schemaInitialize)==null||S.call(d,m,{field:p,block:a,readPretty:s,targetCollection:y}),{name:((j=p==null?void 0:p.uiSchema)==null?void 0:j.title)||p.name,type:"item",title:((O=p==null?void 0:p.uiSchema)==null?void 0:O.title)||p.name,icon:d.icon||"EditOutlined",Component:"CollectionFieldInitializer",remove:C.removeGridFormItem,schemaInitialize:w=>{var I;(I=d==null?void 0:d.schemaInitialize)==null||I.call(d,w,{field:p,block:a,readPretty:s,targetCollection:y})},schema:m}})}})},np=e=>{const t=C.useExtendCollections(),o=A.useForm(),f=C.useCompile(),{getInterface:r,getCollection:b}=C.useCollectionManager_deprecated(),{fieldSchema:v}=C.useActionContext();return t?t.map(F=>{var h,s;const _=o.readPretty,n="Form",u=v==null?void 0:v["x-action"];return{type:"subMenu",title:f(F.title),children:(s=(h=F.fields)==null?void 0:h.filter(a=>(a==null?void 0:a.interface)&&!(a!=null&&a.isForeignKey)&&!(a!=null&&a.treeChildren)))==null?void 0:s.map(a=>{var g,x,P,S;const l=r(a.interface),i=b(a.target),c=(a==null?void 0:a.target)&&((g=b(a==null?void 0:a.target))==null?void 0:g.template)==="file",p=i,d=(x=a==null?void 0:a.uiSchema["x-component-props"])==null?void 0:x.fieldNames,y={type:"string",name:a.name,"x-toolbar":"EditableFormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":`${F.name}.${a.name}`,"x-component-props":c?{fieldNames:{label:"preview",value:"id"}}:p&&d?{fieldNames:W(k({},d),{label:(i==null?void 0:i.titleField)||d.label})}:{},"x-read-pretty":(P=a==null?void 0:a.uiSchema)==null?void 0:P["x-read-pretty"]};return{type:"item",name:a.name,title:((S=a==null?void 0:a.uiSchema)==null?void 0:S.title)||a.name,icon:l.icon||"EditOutlined",Component:"CollectionFieldInitializer",remove:C.removeGridFormItem,schemaInitialize:j=>{var O;(O=l==null?void 0:l.schemaInitialize)==null||O.call(l,j,{field:a,block:n,readPretty:_,action:u,targetCollection:i})},schema:y}})}}):null},sp=e=>{var h;const{name:t}=C.useCollection_deprecated(),{getInterface:o,getCollectionFields:f,getCollection:r}=C.useCollectionManager_deprecated(),b=f(t)||[],v=A.useForm(),{readPretty:F=v.readPretty,block:_="Form"}=e||{},n=_==="Form"?["m2o"]:["o2o","oho","obo","m2o"];return(h=b==null?void 0:b.filter(s=>n.includes(s.interface)))==null?void 0:h.map(s=>{var i,c,p;const a=f(s.target),l=(i=a==null?void 0:a.filter(d=>(d==null?void 0:d.interface)&&!["subTable"].includes(d==null?void 0:d.interface)&&!d.treeChildren))==null?void 0:i.map(d=>{var x,P,S;const y=o(d.interface),m=(s==null?void 0:s.target)&&((x=r(s==null?void 0:s.target))==null?void 0:x.template)==="file",g={type:"string",name:`${s.name}.${d.name}`,"x-toolbar":"EditableFormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-component":"CollectionField","x-read-pretty":F,"x-component-props":{"pattern-disable":_==="Form"&&F,fieldNames:m?{label:"preview",value:"id"}:void 0},"x-decorator":"FormItem","x-collection-field":`${t}.${s.name}.${d.name}`};return{name:((P=d==null?void 0:d.uiSchema)==null?void 0:P.title)||d.name,type:"item",icon:y.icon||"EditOutlined",title:((S=d==null?void 0:d.uiSchema)==null?void 0:S.title)||d.name,Component:"CollectionFieldInitializer",remove:C.removeGridFormItem,schemaInitialize:j=>{var O;(O=y==null?void 0:y.schemaInitialize)==null||O.call(y,j,{field:d,block:_,readPretty:F,targetCollection:r(s.target)})},schema:g}});return{type:"subMenu",name:(c=s.uiSchema)==null?void 0:c.title,title:(p=s.uiSchema)==null?void 0:p.title,children:l}})},ap=({onCancel:e,schema:t})=>{const{title:o,fields:f,name:r}=C.useCollection_deprecated(),{refreshCM:b}=C.useCollectionManager_deprecated(),{dn:v,refresh:F}=C.useDesignable(),_=C.useAPIClient(),{Header:n}=oe.Layout,u=C.useCompile(),{styles:h}=Qe(),[s,a]=V.useState(o),[l,i]=V.useState(!1),[c,p]=V.useState(!1),[d,y]=V.useState(s),{t:m}=Z(),{modal:g}=oe.App.useApp(),x=v.current,P=C.findSchemaUtils(x,"x-component","ActionBar"),S=V.useMemo(()=>C.createDesignable({t:m,api:_,refresh:F,current:P}),[m,_,F,P]),j=()=>ie(null,null,function*(){var E;for(const R of f||[])if(R.target==="__temp__"){const N=((E=R==null?void 0:R.uiSchema)==null?void 0:E.title)||R.name;oe.message.warning(m('The target collection for the association field "{{field}}" is not selected',{field:N}));return}s&&s!==o&&(yield _.resource("collections").update({filterByTk:r,values:{title:s}})),ip(t);const w=C.findSchemaUtils(t,"x-decorator","FormBlockProvider"),I=C.findSchemaUtils(w,"x-component","ActionBar");try{if(w.name===x.name){yield S.remove(null),I.properties=P.properties;const R=se.cloneDeep(w.toJSON());R.name=R["x-uid"],yield v.insertAdjacent("afterEnd",R),yield v.remove(null)}else v.insertAdjacent("beforeEnd",t.toJSON())}catch(R){console.error("dn error:",R),oe.message.error(m("Save failed due to schema update error"));return}yield b(),yield F(),yield e()}),O=()=>{a(d||o),i(!1)};return V.useEffect(()=>{S.loadAPIClientEvents()},[S]),D.jsxs(D.Fragment,{children:[D.jsxs(n,{className:h.header,children:[D.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[D.jsx(oe.Button,{icon:D.jsx(Me.LeftOutlined,{}),onClick:()=>g.confirm({title:m("Unsaved changes"),content:m("Are you sure you don't want to save?"),onOk:()=>{e()}}),type:"text",className:"ant-cancel-button"}),D.jsxs("span",{className:"ant-form-title",style:{display:"inline-flex",alignItems:"center",cursor:"pointer"},onClick:()=>{y(s),i(!0)},children:[u(s),D.jsx(Me.EditOutlined,{style:{marginLeft:4}})]})]}),D.jsxs("div",{className:"center-menu",style:{minWidth:200},children:[D.jsx(oe.Menu,{mode:"horizontal",overflowedIndicator:!1,selectedKeys:["formEdit"],style:{minWidth:100},items:[{key:"formEdit",label:D.jsx("span",{style:{fontSize:"large"},children:m("Edit form")})}]},"EditPageMenu"),D.jsx(oe.Tooltip,{title:m("Design the form by selecting fields, adjusting layout, and adding properties"),children:D.jsx(Me.QuestionCircleOutlined,{})})]}),D.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[D.jsx(oe.Button,{className:"ant-save-button",onClick:()=>{p(!0)},children:m("Preview")}),D.jsx(oe.Button,{type:"primary",className:"ant-save-button",onClick:j,children:m("Save")}),D.jsx(oe.Button,{type:"primary",danger:!0,className:"ant-save-button",onClick:e,children:m("Cancel")})]})]}),D.jsxs(oe.Modal,{title:m("Collection display name"),open:l,onCancel:()=>i(!1),onOk:O,children:[D.jsx(oe.Input,{value:u(d),onChange:w=>y(w.target.value),placeholder:m("Collection display name")}),D.jsx("span",{children:m("Caution: Changing this will directly modify the collection name")})]}),D.jsx(cp,{open:c,onClose:()=>p(!1),schema:t})]})};function ip(e){const t=o=>{if(!(!o||typeof o!="object")&&(o["x-toolbar"]==="EditableFormItemSchemaToolbar"&&(o["x-toolbar"]="FormItemSchemaToolbar"),(o["x-component"]==="CardItem"||o["x-toolbar"]==="EditableFormToolbar")&&(o["x-toolbar"]="BlockSchemaToolbar",o["x-settings"]="blockSettings:createForm"),o["x-component"]==="EditableGrid"&&(o["x-initializer"]="form:configureFields",o["x-component"]="Grid"),o["x-component"]==="EditableGrid.Col"&&(o["x-component"]="Grid.Col"),o["x-component"]==="EditableGrid.Row"&&(o["x-component"]="Grid.Row"),o["x-component"]==="ActionBar"&&!o["x-initializer"]&&(o["x-initializer"]="createForm:configureActions"),o.properties))for(const f of Object.keys(o.properties))t(o.properties[f])};t(e)}const cp=({open:e,onClose:t,schema:o})=>{const{styles:f}=Qe(),[r,b]=V.useState("PC"),v=[{label:D.jsx(Me.DesktopOutlined,{}),value:"PC"},{label:D.jsx(Me.MobileOutlined,{}),value:"Mobile"}];return D.jsx(oe.Drawer,{placement:"bottom",height:"90%",open:e,onClose:t,closeIcon:D.jsx(Me.LeftOutlined,{}),className:f.previewDrawer,extra:D.jsx("div",{children:D.jsx(oe.Radio.Group,{block:!0,options:v,value:r,onChange:F=>b(F.target.value),optionType:"button",buttonStyle:"solid"})}),children:D.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",paddingBottom:"5%"},children:r==="PC"?D.jsx(up,{schema:o}):D.jsx(lp,{schema:o})})})},up=({schema:e})=>{const t=C.useSchemaComponentContext();return D.jsx("div",{style:{width:"100%",maxWidth:"700px",height:"100%",marginTop:"10%",overflow:"auto",marginBottom:"5%"},children:D.jsx(C.SchemaComponentContext.Provider,{value:W(k({},t),{designable:!1}),children:D.jsx(C.SchemaComponent,{schema:e,components:{EditableGrid:Xe}})})})},lp=({schema:e})=>{const t=C.useSchemaComponentContext(),o=V.useMemo(()=>e.toJSON(),[e]),f=V.useMemo(()=>pp(o),[o]),r=new A.Schema(o),b=C.findSchemaUtils(r,"x-component","CardItem")||{};b["x-component-props"]={style:{boxShadow:"none"}};const v=C.findSchemaUtils(b,"x-component","FormV2")||{};return v.removeProperty("grid"),v.addProperty("grid",{type:"void","x-component":"EditableGrid","x-initializer":"form:configureFields",properties:k({},f)}),D.jsx("div",{style:{height:"90%",aspectRatio:"8 / 16",border:"5px solid rgb(177, 176, 176)",borderRadius:40,boxShadow:"0 0 10px rgba(208, 208, 208, 0.77)",backgroundColor:"white",overflow:"auto",position:"relative",scrollbarWidth:"none"},children:D.jsx(C.SchemaComponentContext.Provider,{value:W(k({},t),{designable:!1}),children:D.jsx(C.SchemaComponent,{schema:dc(b),components:{EditableGrid:Xe}})})})};function pp(e){const t=[],o=r=>{if(!(!r||typeof r!="object")&&(r["x-decorator"]==="FormItem"&&t.push(dc(r)),r.properties)){const b=Object.keys(r.properties);for(const v of b)o(r.properties[v])}};return o(e),t.reduce((r,b)=>(r[A.uid()]=b,r),{})}const dc=e=>({type:"void","x-component":"EditableGrid.Row",properties:{[A.uid()]:{type:"void","x-component":"EditableGrid.Col",properties:{[e.name||A.uid()]:e}}}}),Pn=({open:e,onCancel:t,options:o})=>{var i,c;const[f,r]=V.useState(()=>new A.Schema({})),[b,v]=V.useState(A.uid()),{refresh:F}=C.useDesignable(),_=C.useAPIClient(),{t:n}=C.useTranslation(),{styles:u}=Qe(),h=((i=o==null?void 0:o.item)==null?void 0:i.collectionName)||((c=o==null?void 0:o.item)==null?void 0:c.name)||null,a=C.useCollectionManager().getCollection(h),l=rt({t:n,api:_,refresh:F,current:f});return V.useEffect(()=>{o!=null&&o.schema&&r(o==null?void 0:o.schema)},[o]),D.jsx(oe.Modal,{open:e,footer:null,width:"100vw",closable:!1,className:u.editModel,children:D.jsx(Xc,{children:D.jsx(C.CollectionContext.Provider,{value:a,children:D.jsx(C.DndContext,{children:D.jsxs(oe.Layout,{style:{height:"100%"},children:[D.jsx(ap,{onCancel:t,schema:f}),D.jsxs(oe.Layout,{children:[D.jsx(Ql,{schema:f,setSchemakey:v,eddn:l}),D.jsx(bu,{schema:f},b),D.jsx(Jl,{schema:f,setSchemakey:v,eddn:l})]})]})})})})})};function mc(e){const{collectionName:t,association:o,dataSource:f,templateSchema:r,isCusomeizeCreate:b}=e,v=o||t;if(!f)throw new Error("dataSource are required");if(!v)throw new Error("association or collectionName is required");return{type:"void","x-acl-action-props":{skipScopeCheck:!0},"x-acl-action":`${v}:create`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useCreateFormBlockDecoratorProps","x-decorator-props":{dataSource:f,collection:t,association:o},"x-toolbar":"EditableFormToolbar","x-component":"CardItem",properties:{[A.uid()]:{type:"void","x-component":"FormV2","x-use-component-props":"useCreateFormBlockProps",properties:{[A.uid()]:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:24}}},grid:r||{type:"void","x-component":"EditableGrid",properties:{}}}}}}}const dp=()=>{const e=A.useFieldSchema(),t=A.useForm(),o=A.useField(),f=V.useContext(Ze.SchemaMarkupContext),r=V.useContext(Ze.SchemaExpressionScopeContext),b=V.useContext(Ze.SchemaComponentsContext),v=C.useFormBlockContext(),F=C.useSchemaOptionsContext(),{setEditableForm:_}=cc();return V.useEffect(()=>{_({field:o,fieldSchema:e,schemaMarkup:f,expressionScope:r,schemaComponents:b,schemaOptions:F,form:t,formBlockValue:v})},[]),null},mp=e=>D.jsx(fp,k({showBorder:!1,showBackground:!0},e)),fp=e=>{const{designable:t}=C.useDesignable();return t?D.jsx(hp,k({},e)):null},hp=e=>{const{title:t,initializer:o,settings:f,showBackground:r,showBorder:b=!0}=e,{designable:v}=C.useDesignable(),F=A.useFieldSchema(),_=A.useForm(),n=V.useContext(Ze.SchemaMarkupContext),u=V.useContext(A.SchemaExpressionScopeContext),h=V.useContext(A.SchemaComponentsContext),s=C.useFormBlockContext(),a=C.useSchemaOptionsContext(),{t:l}=Z(),i=A.useField(),{styles:c}=Qe(),{getAriaLabel:p}=C.useGetAriaLabelOfDesigner(),{setEditableField:d}=ac(),{removeActiveFieldName:y}=C.useFormActiveFields()||{},{dn:m}=pt(),{draggable:g}=V.useContext(C.SortableContext),x=V.useMemo(()=>g===!1?null:D.jsx(C.DragHandler,{children:D.jsx(Me.DragOutlined,{role:"button","aria-label":p("drag-handler")})}),[g,p]),P=V.useMemo(()=>D.jsx(oe.Popconfirm,{title:l("Delete field"),description:"",icon:null,okType:"danger",okText:l("Delete"),cancelText:l("Cancel"),onConfirm:()=>{const j={removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"EditableGrid"}};i!=null&&i.required&&(i.required=!1,F.required=!1),m.remove(null,j),delete _.values[F.name],y==null||y(F.name),i!=null&&i.setInitialValue&&(i!=null&&i.reset)&&(i.setInitialValue(null),i.reset())},children:D.jsx(Me.DeleteOutlined,{role:"button",style:{cursor:"pointer"}})}),[]),S=V.useRef(null);return V.useEffect(()=>{const j=S.current,O=j==null?void 0:j.parentElement;function w(){j&&(j.style.display="block")}function I(){j&&(j.style.display="none")}function E(R){const N=R.target;(j==null?void 0:j.contains(N))||d({field:i,fieldSchema:F,schemaMarkup:n,expressionScope:u,schemaComponents:h,schemaOptions:a,form:_,formBlockValue:s})}return O&&(window.getComputedStyle(O).position==="static"&&(O.style.position="relative"),O.addEventListener("mouseenter",w),O.addEventListener("mouseleave",I),O.addEventListener("click",E)),()=>{O&&(O.removeEventListener("mouseenter",w),O.removeEventListener("mouseleave",I),O.removeEventListener("click",E))}},[]),v?D.jsx("div",{ref:S,className:c.toolbar,style:{border:b?"auto":0,background:r?"auto":0},children:D.jsx("div",{className:c.toolbarIcons,children:D.jsxs(C.Space,{size:3,align:"center",children:[x,P]})})}):null},bp=e=>e.reduceProperties((t,o)=>{if(o["x-component"]==="FormV2"||o["x-component"]==="Details"){const f=o.reduceProperties((r,b)=>b["x-component"]==="Grid"||b["x-component"]==="BlockTemplate"?b:r,null);if(f)return f}return t},null),vp=e=>{const t=A.useFieldSchema(),o=C.findFormBlock(t)||t;return{templateData:se.cloneDeep(o==null?void 0:o["x-data-templates"])}},yp=new ye({name:"blockEditableSettings:createForm",items:[{name:"title",useSchema(){var f;const e=A.useField(),t=A.useFieldSchema(),{t:o}=Z();return{type:"string",title:'{{t("Edit block title")}}',default:(f=t==null?void 0:t["x-component-props"])==null?void 0:f.title,"x-decorator":"FormItem","x-component":"Input","x-component-props":{onChange(r){var F;const b=(F=r==null?void 0:r.target)==null?void 0:F.value,v=t["x-component-props"]||{};v.title=b,t["x-component-props"]=v,e.componentProps.title=b}}}}},{name:"linkageRules",useSchema(){const{name:e}=C.useCollection_deprecated(),t=A.useFieldSchema(),{form:o}=C.useFormBlockContext(),{t:f}=Z(),{getTemplateById:r}=C.useSchemaTemplateManager(),b=C.useVariables(),v=C.useLocalVariables(),F=C.useRecord(),{type:_}=C.useFormBlockType(),n=["Action","Action.Link"].includes(t["x-component"])?"button":"field",u=bp(t)||t;return{type:"object",title:f("Linkage rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:f("Linkage rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div"},properties:{fieldReaction:{"x-component":C.FormLinkageRules,"x-use-component-props":()=>({options:C.useLinkageCollectionFilterOptions(e),defaultValues:(u==null?void 0:u["x-linkage-rules"])||(t==null?void 0:t["x-linkage-rules"]),type:n,linkageOptions:C.useLinkageCollectionFieldOptions(e),collectionName:e,form:o,variables:b,localVariables:v,record:F,formBlockType:_})},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const h=A.useForm(),s=C.useActionContext();return{onClick(){return ie(this,null,function*(){var p,d;const l=[];let i=h.values.fieldReaction.rules;for(const y of i)l.push(se.pickBy(y,se.identity));const c=u["x-component"]==="BlockTemplate"&&((p=u["x-component-props"])==null?void 0:p.templateId);c&&r(c).uid||u["x-uid"],u["x-linkage-rules"]=l,(d=s==null?void 0:s.setVisible)==null||d.call(s,!1)})}}}}}}}}}}}},{name:"dataTemplates",useVisible(){const{action:e}=C.useFormBlockContext();return!e},useSchema(){const{name:e}=C.useCollection_deprecated(),t=V.useContext(C.SchemaComponentContext),o=A.useFieldSchema(),{t:f}=Z(),r=C.findFormBlock(o)||o,{templateData:b}=vp();return{type:"object",title:f("Form data templates"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:f("Form data templates"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div"},properties:{fieldReaction:{"x-decorator":v=>D.jsx(C.FlagProvider,W(k({},v),{isInFormDataTemplate:!0})),"x-component":C.FormDataTemplates,"x-use-component-props":()=>({defaultValues:b,collectionName:e}),"x-component-props":{designerCtx:t,formSchema:r}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const v=A.useForm(),F=C.useActionContext();return{onClick(){return ie(this,null,function*(){var h;let n=v.values.fieldReaction;const u=k(k({},r["x-data-templates"]),n);u.items.forEach(s=>{s.fields=Array.isArray(s.fields)?s.fields:s.fields.checked}),r["x-data-templates"]=u,(h=F==null?void 0:F.setVisible)==null||h.call(F,!1)})}}}}}}}}}}}}]}),_p=e=>{const t=Pp[e];return t==null?void 0:t()},On={"uiSchema.x-component-props.addonBefore":{type:"string",title:'{{t("Prefix")}}',"x-decorator":"FormItem","x-component":"Input"},"uiSchema.x-component-props.addonAfter":{type:"string",title:'{{t("Suffix")}}',"x-decorator":"FormItem","x-component":"Input"}},xp=[{dependencies:["dataType"],fulfill:{state:{display:'{{["double", "decimal"].includes($deps[0]) ? "visible" : "none"}}'}}}],fc=[{dependencies:["dataType"],fulfill:{state:{display:'{{$deps[0] === "date" ? "visible" : "none"}}'}}}];function gp(e){const t=C.useCompile(),{setValuesIn:o}=A.useForm(),f=he.ArrayTable.useIndex();return A.useFormEffects(()=>{A.onFieldValueChange(`patterns.${f}.type`,r=>{o(`patterns.${f}.options`,{})})}),D.jsx(oe.Select,W(k({popupMatchSelectWidth:!1},e),{children:Object.keys(Pt).map(r=>D.jsx(oe.Select.Option,{value:r,children:t(Pt[r].title)},r))}))}function Fp(){const e=C.useCompile(),{values:t}=A.useForm(),o=he.ArrayTable.useIndex(),{type:f,options:r}=t.patterns[o],b=Pt[f];return D.jsx("div",{className:C.css`
172
+ `})),Ju=({schema:e,setSchemakey:t,eddn:o})=>{const{Sider:f}=oe.Layout,{styles:r}=Xe(),{t:b}=Z();return D.jsx(f,{width:300,style:{background:"white",overflow:"auto"},children:D.jsx(oe.Tabs,{defaultActiveKey:"field",centered:!0,tabBarGutter:50,items:[{label:b("Field properties"),key:"field",children:D.jsx(Wu,{schema:e,setSchemakey:t})},{label:b("Form properties"),key:"form",children:D.jsx(Ku,{schema:e})}]})})},Wu=({schema:e,setSchemakey:t})=>{const o=Ct(),{t:f}=Z(),c=o,{setEditableField:r,fieldSchema:b}=c,v=jn(c,["setEditableField","fieldSchema"]),F=(b==null?void 0:b["x-uid"])||null,_=V.useMemo(()=>!e||!F?null:C.findSchemaUtils(e,"x-uid",F)||null,[e,F]);return e&&F&&(_==null?void 0:_.name)?D.jsx("div",{children:D.jsx(uc,W(T({fieldSchema:_},v),{children:D.jsx(C.CollectionFieldProvider,{name:_.name,children:D.jsx(Yu,{})})}))},F):D.jsx("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"#999",fontSize:"14px",marginTop:"20%"},children:f("Click a field to start customizing its properties")})},Yu=()=>{const e=C.useFieldComponentName(),{refreshKey:t}=It();return D.jsx("div",{children:D.jsx(qu,{fieldComponentName:e},e)},t)},uc=({children:e,form:t=null,field:o=null,fieldSchema:f=null,schemaMarkup:r=null,expressionScope:b=null,schemaComponents:v=null,schemaOptions:F=null,formBlockValue:_=null})=>{const n=C.useFormActiveFields(),c=C.useSchemaComponentContext(),{getField:h}=C.useCollection_deprecated(),s=h(f.name);return D.jsx(Qe.ContextCleaner,{children:D.jsx(A.FormContext.Provider,{value:t,children:D.jsx(A.FieldContext.Provider,{value:o,children:D.jsx(Qe.SchemaMarkupContext.Provider,{value:r,children:D.jsx(A.SchemaContext.Provider,{value:f,children:D.jsx(A.SchemaExpressionScopeContext.Provider,{value:b,children:D.jsx(A.SchemaComponentsContext.Provider,{value:v,children:D.jsx(A.SchemaOptionsContext.Provider,{value:F,children:D.jsx(C.FormBlockContext.Provider,{value:_,children:D.jsx(C.FormActiveFieldsProvider,{name:"form",getActiveFieldsName:n==null?void 0:n.getActiveFieldsName,children:D.jsx(C.SchemaComponentContext.Provider,{value:W(T({},c),{designable:!1}),children:D.jsx(C.RecordProvider,{record:s,children:e})})})})})})})})})})})})},qu=({fieldComponentName:e})=>{var h,s,a,u,i,l,p,d,y;const[t]=V.useState(()=>A.createForm()),o=An(),f=(a=(s=(h=o==null?void 0:o.get(`editableFieldSettings:component:${e}`))==null?void 0:h.options)==null?void 0:s.items)!=null?a:[],r=(l=(i=(u=o==null?void 0:o.get("editableFieldSettings:FormItem"))==null?void 0:u.options)==null?void 0:i.items)!=null?l:[],v=[...(y=(d=(p=o==null?void 0:o.get("editableFieldSettings:Fields:Infterface"))==null?void 0:p.options)==null?void 0:d.items)!=null?y:[],...r,...f],{handleUpdate:F,components:_,fullSchema:n,initialValues:c}=pc(v);return t.setValues(c),D.jsxs("div",{style:{padding:"10px"},children:[v.map((m,g)=>D.jsx(dc,{item:m,onUpdate:x=>F(m.name||g,x)},m.name||g)),D.jsx(C.SchemaComponent,{schema:n,components:T(T({},C.CMConfigurationComponents),_)})]})},pc=e=>{var c;const[t,o]=V.useState({}),f=V.useCallback((h,s)=>{o(a=>a[h]===s?a:W(T({},a),{[h]:s}))},[]),r=V.useMemo(()=>e.reduce((h,s)=>(s.components&&typeof s.components=="object"&&Object.assign(h,s.components),h),{}),[e]),b={},v={};for(const h in t){const s=t[h];!(s!=null&&s.isVisible)||!(s!=null&&s.schema)||(b[h]=W(T({},s.schema),{name:h,"x-component-props":T(T({},s.schema["x-component-props"]),s.props)}),((c=s.props)==null?void 0:c.value)!==void 0&&(v[h]=s.props.value))}const F=V.useMemo(()=>A.uid(),[]),_=V.useMemo(()=>A.createForm(),[]),n={type:"void",properties:{[F]:{type:"void","x-component":"FormV2","x-component-props":{form:_},properties:b}}};return{itemStates:t,handleUpdate:f,components:r,fieldSchemas:b,initialValues:v,fullSchema:n}},dc=({item:e,onUpdate:t})=>{var r,b;const o=e.useVisible?(r=e.useVisible())!=null?r:!1:!0,f=(b=e.useSchema)==null?void 0:b.call(e);return V.useEffect(()=>{t({name:e.name,isVisible:o,schema:f})},[e.name,o]),null},Ku=({schema:e})=>{const v=lc(),{setEditableForm:o,fieldSchema:f}=v,r=jn(v,["setEditableForm","fieldSchema"]);return e&&(f==null?void 0:f.name)?D.jsx("div",{children:D.jsx(uc,W(T({fieldSchema:f},r),{children:D.jsx(Zu,{})}))}):null},Zu=()=>{var F,_,n;const[e]=V.useState(()=>A.createForm()),t=An(),o=(n=(_=(F=t==null?void 0:t.get("blockEditableSettings:createForm"))==null?void 0:F.options)==null?void 0:_.items)!=null?n:[],{handleUpdate:f,components:r,fullSchema:b,initialValues:v}=pc(o);return e.setValues(v),D.jsxs("div",{style:{padding:"10px"},children:[o.map((c,h)=>D.jsx(dc,{item:c,onUpdate:s=>f(c.name||h,s)},c.name||h)),D.jsx(C.SchemaComponent,{schema:b,components:r})]})},Qu=({schema:e,setSchemakey:t,eddn:o})=>{const f=C.useCollection_deprecated(),{setEditableField:r}=Ct(),{Sider:b}=oe.Layout,{t:v}=Z(),F=C.findSchemaUtils(e,"x-component","EditableGrid")||{},_={fieldsOptions:rp(),fieldsParentOptions:op(),fieldsExtendOptions:np(),associatedFormFieldsOptions:sp({readPretty:!0,block:"Form"})},n=["id","updatedAt","updatedBy","createdAt","createdBy"],h=_.fieldsOptions.filter(p=>!n.includes(p.name)).length===0?"addNew":"existing",[s,a]=V.useState(h),u=p=>{const d=ep(p);let y=0,m=!1;F.mapProperties(g=>{const x=g["x-index"];typeof x=="number"&&(m=!0,x>y&&(y=x))}),d["x-index"]=m?y+1:1,F.addProperty(A.uid(),d),t(A.uid()),r({highLightField:p})},i=V.useMemo(()=>A.createForm(),[]),l={association:{sourceKey:"name",targetKey:"name"},collection:tp,request:{resource:"collections.fields",action:"list",params:{paginate:!1,filter:{$or:[{"interface.$not":null},{"options.source.$notEmpty":!0}]},sort:["sort"]}}};return V.useEffect(()=>{a(h)},[]),D.jsx(b,{width:250,style:{background:"white",overflow:"auto"},children:D.jsx(C.RecordProvider,{record:f,children:D.jsx(C.ResourceActionProvider,W(T({},l),{children:D.jsx(A.FormContext.Provider,{value:i,children:D.jsx(oe.Tabs,{onChange:p=>a(p),activeKey:s,centered:!0,tabBarGutter:50,items:[{label:v("Configure columns"),key:"existing",children:D.jsx(Xu,{schema:F,options:_,handleInsert:u})},{label:v("Add field"),key:"addNew",children:D.jsx($u,{schema:F,handleInsert:u})}]})})}))})})},Xu=({schema:e,options:t,handleInsert:o})=>{var u;const{fieldsOptions:f,fieldsParentOptions:r,fieldsExtendOptions:b,associatedFormFieldsOptions:v}=t,_=C.useApp().schemaInitializerManager.get("form:configureFields"),c=(((u=_==null?void 0:_.options)==null?void 0:u.items)||[]).filter(i=>!["displayFields","parentCollectionFields","extendCollectionFields","associationFields","divider"].includes(i.name)),h=C.useCompile(),{t:s}=Z(),{styles:a}=Xe();return D.jsxs("div",{className:a.fieldsBlock,children:[D.jsx("p",{style:{fontWeight:400},children:s("Display fields")}),D.jsx(ct,{schema:e,items:f,onInsert:o}),(r==null?void 0:r.length)>0&&D.jsxs(D.Fragment,{children:[D.jsx("p",{style:{fontWeight:400},children:s("Parent collection fields")}),D.jsx(oe.Collapse,{items:r.map((i,l)=>({key:String(l),label:h(i.title),children:D.jsx(ct,{schema:e,items:i.children,onInsert:o}),styles:{body:{padding:0}}})),bordered:!1,style:{background:"white"}})]}),(b==null?void 0:b.length)>0&&D.jsxs(D.Fragment,{children:[D.jsx("p",{style:{fontWeight:400},children:s("Extend collections")}),D.jsx(oe.Collapse,{items:b.map((i,l)=>({key:String(l),label:h(i.title),children:D.jsx(ct,{schema:e,items:i.children,onInsert:o}),styles:{body:{padding:0}}})),bordered:!1,style:{background:"white"}})]}),(v==null?void 0:v.length)>0&&D.jsxs(D.Fragment,{children:[D.jsx("p",{style:{fontWeight:400,marginBottom:0},children:s("Display association fields")}),D.jsx(oe.Collapse,{items:v.map((i,l)=>({key:String(l),label:h(i.title),children:D.jsx(ct,{schema:e,items:i.children,onInsert:o}),styles:{body:{padding:0}}})),bordered:!1,style:{background:"white"}})]}),D.jsx("p",{style:{fontWeight:400},children:s("Other fields")}),D.jsx(ct,{schema:e,items:c.map(i=>i.name==="addText"?W(T({},i),{schema:{type:"void",name:A.uid(),"x-editable":!1,"x-decorator":"FormItem","x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:markdown","x-component":"Markdown.Void","x-component-props":{content:'{{t("This is a demo text, **supports Markdown syntax**.")}}'}}}):i),onInsert:o,span:24})]})},ct=({schema:e,items:t,onInsert:o,span:f=12})=>{const r=C.useCompile();return D.jsx(oe.Row,{gutter:[8,8],style:{marginBottom:"20px",rowGap:"12px"},children:t.map((b,v)=>{const F=b.schema;let _=!1;return e&&(F!=null&&F.name)&&(_=!!C.findSchemaUtils(e,"name",String(F.name))),D.jsx(oe.Col,{span:f,style:{paddingLeft:"8px",paddingRight:"8px"},children:D.jsx(oe.Tooltip,{title:r(b.title),arrow:!1,overlayInnerStyle:{fontSize:12},children:D.jsxs(oe.Button,{className:"ant-btn-fields",variant:"filled",style:{alignItems:"center",justifyContent:"flex-start"},onClick:()=>{var n;_||((n=b==null?void 0:b.schemaInitialize)==null||n.call(b,F),o(F))},disabled:!!_,children:[D.jsx(C.Icon,{type:b.icon||"EditOutlined",style:{fontSize:14}}),D.jsx("span",{style:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12},children:r(b.title)})]})})},b.name||v)})})},$u=({schema:e,handleInsert:t})=>{var d,y;const{data:o}=V.useContext(C.CollectionRecordContext),{data:{database:f}}=C.useCurrentAppInfo(),{getInterface:r,getTemplate:b,collections:v,getCollection:F,getCollections:_,refreshCM:n}=C.useCollectionManager_deprecated(),{refresh:c}=C.useResourceActionContext(),h=C.useCompile(),{t:s}=Z(),a=C.useFieldInterfaceOptions(),{styles:u}=Xe();(y=(d=F(o.name))==null?void 0:d.options)!=null&&y.fields||o.fields;const{resource:i}=C.useResourceContext(),l=V.useCallback(()=>{const{availableFieldInterfaces:m}=b(o.template)||{},{exclude:g,include:x}=m||{},P=[];return a.forEach(S=>{var j;if(S.key==="systemInfo")P.push(W(T({},S),{children:S.children.filter(O=>O.hidden?!1:O.value==="tableoid"?x!=null&&x.length?x.includes(O.value):(f==null?void 0:f.dialect)==="postgres":typeof o[O.value]=="boolean"?o[O.value]:!0)}));else{let O=[];x!=null&&x.length?x.forEach(w=>{var E;const I=(E=S==null?void 0:S.children)==null?void 0:E.find(R=>[w,w.interface].includes(R.name));I&&O.push(W(T({},I),{targetScope:w==null?void 0:w.targetScope}))}):g!=null&&g.length?O=(j=S==null?void 0:S.children)==null?void 0:j.filter(w=>!g.includes(w.name)):O=S==null?void 0:S.children,O!=null&&O.length&&P.push(W(T({},S),{children:O}))}}),P},[b,o]),p=V.useMemo(()=>l().map(m=>{var g;return((g=m==null?void 0:m.children)==null?void 0:g.length)===0?null:o.template==="view"?{type:"group",label:h(m.label),title:h(m.label),key:m.label,children:m.children.filter(x=>["m2o","custom","m2m"].includes(x.name)).map(x=>({label:h(x.title),title:h(x.title),icon:x.icon,key:x.name,dataTargetScope:x.targetScope}))}:{type:"group",label:h(m.label),title:h(m.label),key:m.label,children:m==null?void 0:m.children.filter(x=>!["o2o","subTable","linkTo"].includes(x.name)).map(x=>({label:h(x.title),title:h(x.title),icon:x.icon,key:x.name,dataTargetScope:x.targetScope}))}}).filter(m=>{var g;return(g=m==null?void 0:m.children)==null?void 0:g.length}),[l]);return o.template!=="sql"&&D.jsx("div",{className:u.fieldsBlock,children:p.map((m,g)=>D.jsxs("div",{children:[D.jsx("p",{style:{fontWeight:400,fontSize:14},children:m.title}),D.jsx(oe.Row,{gutter:[8,8],style:{marginBottom:"20px",rowGap:"12px"},children:m.children.map((x,P)=>D.jsx(oe.Col,{span:12,style:{paddingLeft:"8px",paddingRight:"8px"},children:D.jsx(oe.Tooltip,{title:h(x.title),arrow:!1,overlayInnerStyle:{fontSize:12},children:D.jsxs(oe.Button,{className:"ant-btn-fields",variant:"filled",style:{alignItems:"center",justifyContent:"flex-start"},onClick:()=>ie(null,null,function*(){var q,te,Y,re;const S=r(x.key),j=W(T({name:`f_${A.uid()}`},se.cloneDeep(S.default)),{interface:S.name});j.uiSchema||(j.uiSchema={}),["oho","o2o","obo","o2m","m2m","m2o"].includes(j.interface)&&(j.target="__temp__",["oho","o2o"].includes(j.interface)||(j.targetKey="id")),j.uiSchema.title=x.title||h("Unnamed"),j.reverseField&&(j.reverseField.name=`f_${A.uid()}`),j.autoCreateReverseField||delete j.reverseField,delete j.autoCreateReverseField;const w=r(j.interface),I=F(j.target),E=(j==null?void 0:j.target)&&((q=F(j==null?void 0:j.target))==null?void 0:q.template)==="file",R=I,N=(te=j==null?void 0:j.uiSchema["x-component-props"])==null?void 0:te.fieldNames,L={type:"string",name:j.name,"x-toolbar":"EditableFormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":`${o.name}.${j.name}`,"x-component-props":E?{fieldNames:{label:"preview",value:"id"}}:R&&N?{fieldNames:W(T({},N),{label:(I==null?void 0:I.titleField)||N.label})}:{},"x-read-pretty":(Y=j==null?void 0:j.uiSchema)==null?void 0:Y["x-read-pretty"]};(re=w==null?void 0:w.schemaInitialize)==null||re.call(w,L,{field:j,block:"Form",readPretty:!1,action:A.action,targetCollection:I}),yield i.create({values:j}),c(),yield n(),t(L)}),children:[D.jsx(C.Icon,{type:x.icon||"EditOutlined",style:{fontSize:14}}),D.jsx("span",{style:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12},children:h(x.title)})]})})},x.key||P))})]},g))})};function ep(e){const t=A.uid(),o=A.uid(),f=A.uid();return{type:"void","x-component":"EditableGrid.Row",_isJSONSchemaObject:!0,version:"2.0","x-uid":t,"x-async":!1,"x-index":1,properties:{[o]:{type:"void","x-component":"EditableGrid.Col",_isJSONSchemaObject:!0,version:"2.0","x-uid":o,"x-async":!1,"x-index":1,properties:{[e.name]:W(T({},e),{_isJSONSchemaObject:!0,version:"2.0","x-uid":f,"x-async":!1,"x-index":1})}}}}}const tp={name:"fields",fields:[{type:"string",name:"type",interface:"input",uiSchema:{title:'{{ t("Storage type") }}',type:"string","x-component":"Select",enum:[{label:"String",value:"string"}],required:!0}},{type:"string",name:"interface",interface:"input",uiSchema:{title:'{{ t("Field interface") }}',type:"string","x-component":"Select",enum:"{{interfaces}}"}},{type:"string",name:"title",interface:"input",uiSchema:{title:'{{ t("Field display name") }}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"name",interface:"input",uiSchema:{title:'{{ t("Field name") }}',type:"string","x-component":"Input"}},{type:"string",name:"description",interface:"input",uiSchema:{title:'{{ t("Description") }}',type:"string","x-component":"Input.TextArea"}}]},rp=e=>{var h;const{name:t}=C.useCollection_deprecated(),{getInterface:o,getCollection:f,getCollectionFields:r}=C.useCollectionManager_deprecated(),b=r(t)||[],v=A.useForm(),{readPretty:F=v.readPretty,block:_="Form"}={},{fieldSchema:n}=C.useActionContext(),c=n==null?void 0:n["x-action"];return(h=b==null?void 0:b.filter(s=>(s==null?void 0:s.interface)&&!(s!=null&&s.isForeignKey)&&!(s!=null&&s.treeChildren)))==null?void 0:h.map(s=>{var m,g,x,P;const a=o(s.interface),u=f(s.target),i=(s==null?void 0:s.target)&&((m=f(s==null?void 0:s.target))==null?void 0:m.template)==="file",l=u,p=(g=s==null?void 0:s.uiSchema["x-component-props"])==null?void 0:g.fieldNames,d={type:"string",name:s.name,"x-toolbar":"EditableFormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":`${t}.${s.name}`,"x-component-props":i?{fieldNames:{label:"preview",value:"id"}}:l&&p?{fieldNames:W(T({},p),{label:(u==null?void 0:u.titleField)||p.label})}:{},"x-read-pretty":(x=s==null?void 0:s.uiSchema)==null?void 0:x["x-read-pretty"]},y={type:"item",name:s.name,icon:a.icon||"EditOutlined",title:((P=s==null?void 0:s.uiSchema)==null?void 0:P.title)||s.name,Component:"CollectionFieldInitializer",remove:C.removeGridFormItem,schemaInitialize:S=>{var j;(j=a==null?void 0:a.schemaInitialize)==null||j.call(a,S,{field:s,block:_,readPretty:F,action:c,targetCollection:u})},schema:d};return _==="Kanban"&&(y.find=(S,j,O)=>{const w=C.findSchemaUtils(S,"x-component",_);return C.findSchemaUtils(w,j,O)}),y})},op=e=>{const{name:t}=C.useCollection_deprecated(),{getInterface:o,getInheritCollections:f,getCollection:r,getParentCollectionFields:b}=C.useCollectionManager_deprecated(),v=f(t),{snapshot:F}=C.useActionContext(),_=A.useForm(),n=C.useCompile();return v==null?void 0:v.map(c=>{var l;const h=b(c,t),{readPretty:s=_.readPretty,block:a="Form",component:u="CollectionField"}={},i=r(c);return{title:n(i==null?void 0:i.title),children:(l=h==null?void 0:h.filter(p=>(p==null?void 0:p.interface)&&!(p!=null&&p.isForeignKey)))==null?void 0:l.map(p=>{var x,P,S,j,O;const d=o(p.interface),y=r(p.target),m={type:"string",name:p.name,title:((x=p==null?void 0:p.uiSchema)==null?void 0:x.title)||p.name,"x-toolbar":"EditableFormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-component":u,"x-decorator":"FormItem","x-collection-field":`${t}.${p.name}`,"x-component-props":{},"x-read-pretty":(P=p==null?void 0:p.uiSchema)==null?void 0:P["x-read-pretty"]};return(S=d==null?void 0:d.schemaInitialize)==null||S.call(d,m,{field:p,block:a,readPretty:s,targetCollection:y}),{name:((j=p==null?void 0:p.uiSchema)==null?void 0:j.title)||p.name,type:"item",title:((O=p==null?void 0:p.uiSchema)==null?void 0:O.title)||p.name,icon:d.icon||"EditOutlined",Component:"CollectionFieldInitializer",remove:C.removeGridFormItem,schemaInitialize:w=>{var I;(I=d==null?void 0:d.schemaInitialize)==null||I.call(d,w,{field:p,block:a,readPretty:s,targetCollection:y})},schema:m}})}})},np=e=>{const t=C.useExtendCollections(),o=A.useForm(),f=C.useCompile(),{getInterface:r,getCollection:b}=C.useCollectionManager_deprecated(),{fieldSchema:v}=C.useActionContext();return t?t.map(F=>{var h,s;const _=o.readPretty,n="Form",c=v==null?void 0:v["x-action"];return{type:"subMenu",title:f(F.title),children:(s=(h=F.fields)==null?void 0:h.filter(a=>(a==null?void 0:a.interface)&&!(a!=null&&a.isForeignKey)&&!(a!=null&&a.treeChildren)))==null?void 0:s.map(a=>{var g,x,P,S;const u=r(a.interface),i=b(a.target),l=(a==null?void 0:a.target)&&((g=b(a==null?void 0:a.target))==null?void 0:g.template)==="file",p=i,d=(x=a==null?void 0:a.uiSchema["x-component-props"])==null?void 0:x.fieldNames,y={type:"string",name:a.name,"x-toolbar":"EditableFormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":`${F.name}.${a.name}`,"x-component-props":l?{fieldNames:{label:"preview",value:"id"}}:p&&d?{fieldNames:W(T({},d),{label:(i==null?void 0:i.titleField)||d.label})}:{},"x-read-pretty":(P=a==null?void 0:a.uiSchema)==null?void 0:P["x-read-pretty"]};return{type:"item",name:a.name,title:((S=a==null?void 0:a.uiSchema)==null?void 0:S.title)||a.name,icon:u.icon||"EditOutlined",Component:"CollectionFieldInitializer",remove:C.removeGridFormItem,schemaInitialize:j=>{var O;(O=u==null?void 0:u.schemaInitialize)==null||O.call(u,j,{field:a,block:n,readPretty:_,action:c,targetCollection:i})},schema:y}})}}):null},sp=e=>{var h;const{name:t}=C.useCollection_deprecated(),{getInterface:o,getCollectionFields:f,getCollection:r}=C.useCollectionManager_deprecated(),b=f(t)||[],v=A.useForm(),{readPretty:F=v.readPretty,block:_="Form"}=e||{},n=_==="Form"?["m2o"]:["o2o","oho","obo","m2o"];return(h=b==null?void 0:b.filter(s=>n.includes(s.interface)))==null?void 0:h.map(s=>{var i,l,p;const a=f(s.target),u=(i=a==null?void 0:a.filter(d=>(d==null?void 0:d.interface)&&!["subTable"].includes(d==null?void 0:d.interface)&&!d.treeChildren))==null?void 0:i.map(d=>{var x,P,S;const y=o(d.interface),m=(s==null?void 0:s.target)&&((x=r(s==null?void 0:s.target))==null?void 0:x.template)==="file",g={type:"string",name:`${s.name}.${d.name}`,"x-toolbar":"EditableFormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-component":"CollectionField","x-read-pretty":F,"x-component-props":{"pattern-disable":_==="Form"&&F,fieldNames:m?{label:"preview",value:"id"}:void 0},"x-decorator":"FormItem","x-collection-field":`${t}.${s.name}.${d.name}`};return{name:((P=d==null?void 0:d.uiSchema)==null?void 0:P.title)||d.name,type:"item",icon:y.icon||"EditOutlined",title:((S=d==null?void 0:d.uiSchema)==null?void 0:S.title)||d.name,Component:"CollectionFieldInitializer",remove:C.removeGridFormItem,schemaInitialize:j=>{var O;(O=y==null?void 0:y.schemaInitialize)==null||O.call(y,j,{field:d,block:_,readPretty:F,targetCollection:r(s.target)})},schema:g}});return{type:"subMenu",name:(l=s.uiSchema)==null?void 0:l.title,title:(p=s.uiSchema)==null?void 0:p.title,children:u}})},ap=({onCancel:e,schema:t})=>{const{title:o,fields:f,name:r}=C.useCollection_deprecated(),{refreshCM:b}=C.useCollectionManager_deprecated(),{dn:v,refresh:F}=C.useDesignable(),_=C.useAPIClient(),{Header:n}=oe.Layout,c=C.useCompile(),{styles:h}=Xe(),[s,a]=V.useState(o),[u,i]=V.useState(!1),[l,p]=V.useState(!1),[d,y]=V.useState(s),{t:m}=Z(),{modal:g}=oe.App.useApp(),{setEditableField:x}=Ct(),P=v.current,S=C.findSchemaUtils(P,"x-component","ActionBar"),j=V.useMemo(()=>C.createDesignable({t:m,api:_,refresh:F,current:S}),[m,_,F,S]),O=()=>ie(null,null,function*(){var R;for(const N of f||[])if(N.target==="__temp__"){const L=((R=N==null?void 0:N.uiSchema)==null?void 0:R.title)||N.name;oe.message.warning(m('The target collection for the association field "{{field}}" is not selected',{field:L})),x({highLightField:N});return}s&&s!==o&&(yield _.resource("collections").update({filterByTk:r,values:{title:s}})),ip(t);const I=C.findSchemaUtils(t,"x-decorator","FormBlockProvider"),E=C.findSchemaUtils(I,"x-component","ActionBar");try{if(I.name===P.name){yield j.remove(null),E.properties=S.properties;const N=se.cloneDeep(I.toJSON());N.name=N["x-uid"],yield v.insertAdjacent("afterEnd",N),yield v.remove(null)}else v.insertAdjacent("beforeEnd",t.toJSON())}catch(N){console.error("dn error:",N),oe.message.error(m("Save failed due to schema update error"));return}yield b(),yield F(),yield e()}),w=()=>{a(d||o),i(!1)};return V.useEffect(()=>{j.loadAPIClientEvents()},[j]),D.jsxs(D.Fragment,{children:[D.jsxs(n,{className:h.header,children:[D.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[D.jsx(oe.Button,{icon:D.jsx(ke.LeftOutlined,{}),onClick:()=>g.confirm({title:m("Unsaved changes"),content:m("Are you sure you don't want to save?"),onOk:()=>{e()}}),type:"text",className:"ant-cancel-button"}),D.jsxs("span",{className:"ant-form-title",style:{display:"inline-flex",alignItems:"center",cursor:"pointer"},onClick:()=>{y(s),i(!0)},children:[c(s),D.jsx(ke.EditOutlined,{style:{marginLeft:4}})]})]}),D.jsxs("div",{className:"center-menu",style:{minWidth:200},children:[D.jsx(oe.Menu,{mode:"horizontal",overflowedIndicator:!1,selectedKeys:["formEdit"],style:{minWidth:100},items:[{key:"formEdit",label:D.jsx("span",{style:{fontSize:"large"},children:m("Edit form")})}]},"EditPageMenu"),D.jsx(oe.Tooltip,{title:m("Design the form by selecting fields, adjusting layout, and adding properties"),children:D.jsx(ke.QuestionCircleOutlined,{})})]}),D.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[D.jsx(oe.Button,{className:"ant-save-button",color:"primary",variant:"outlined",onClick:()=>{p(!0)},children:m("Preview")}),D.jsx(oe.Button,{type:"primary",className:"ant-save-button",onClick:O,children:m("Save")})]})]}),D.jsxs(oe.Modal,{title:m("Collection display name"),open:u,onCancel:()=>i(!1),onOk:w,children:[D.jsx(oe.Input,{value:c(d),onChange:I=>y(I.target.value),placeholder:m("Collection display name")}),D.jsx("span",{children:m("Caution: Changing this will directly modify the collection name")})]}),D.jsx(lp,{open:l,onClose:()=>p(!1),schema:t})]})};function ip(e){const t=o=>{if(!(!o||typeof o!="object")&&(o["x-toolbar"]==="EditableFormItemSchemaToolbar"&&(o["x-toolbar"]="FormItemSchemaToolbar"),(o["x-component"]==="CardItem"||o["x-toolbar"]==="EditableFormToolbar")&&(o["x-toolbar"]="BlockSchemaToolbar",o["x-settings"]="blockSettings:createForm"),o["x-component"]==="EditableGrid"&&(o["x-initializer"]="form:configureFields",o["x-component"]="Grid"),o["x-component"]==="EditableGrid.Col"&&(o["x-component"]="Grid.Col"),o["x-component"]==="EditableGrid.Row"&&(o["x-component"]="Grid.Row"),o["x-component"]==="ActionBar"&&!o["x-initializer"]&&(o["x-initializer"]="createForm:configureActions"),o.properties))for(const f of Object.keys(o.properties))t(o.properties[f])};t(e)}const cp=({device:e,onChange:t})=>{const o=["PC","Mobile"],f=o.indexOf(e),r=()=>{t(e==="PC"?"Mobile":"PC")};return D.jsxs("div",{style:{position:"relative",display:"flex",width:100,borderRadius:24,background:"#f0f0f0",cursor:"pointer",userSelect:"none",padding:2},onClick:r,children:[D.jsx("div",{style:{position:"absolute",top:2,left:f===0?2:"50%",width:"50%",height:"calc(100% - 4px)",background:"#1890ff",borderRadius:20,transition:"left 0.3s"}}),o.map((b,v)=>{const F=e===b;return D.jsx("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"center",zIndex:1,color:F?"#fff":"#000",transition:"color 0.3s",borderRadius:v===0?"20px 0 0 20px":"0 20px 20px 0",padding:"4px 0"},children:b==="PC"?D.jsx(ke.DesktopOutlined,{}):D.jsx(ke.MobileOutlined,{})},b)})]})},lp=({open:e,onClose:t,schema:o})=>{const{styles:f}=Xe(),[r,b]=V.useState("PC");return D.jsx(oe.Drawer,{placement:"bottom",height:"90%",open:e,onClose:t,closeIcon:D.jsx(ke.LeftOutlined,{}),className:f.previewDrawer,extra:D.jsx(cp,{device:r,onChange:v=>b(v)}),children:D.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",paddingBottom:"5%"},children:r==="PC"?D.jsx(up,{schema:o}):D.jsx(pp,{schema:o})})})},up=({schema:e})=>{const t=C.useSchemaComponentContext();return D.jsx("div",{style:{width:"100%",maxWidth:"700px",height:"100%",marginTop:"10%",overflow:"auto",marginBottom:"5%"},children:D.jsx(C.SchemaComponentContext.Provider,{value:W(T({},t),{designable:!1}),children:D.jsx(C.SchemaComponent,{schema:e,components:{EditableGrid:$e}})})})},pp=({schema:e})=>{const t=C.useSchemaComponentContext(),o=V.useMemo(()=>e.toJSON(),[e]),f=V.useMemo(()=>dp(o),[o]),r=new A.Schema(o),b=C.findSchemaUtils(r,"x-component","CardItem")||{};b["x-component-props"]={style:{boxShadow:"none"}};const v=C.findSchemaUtils(b,"x-component","FormV2")||{};return v.removeProperty("grid"),v.addProperty("grid",{type:"void","x-component":"EditableGrid","x-initializer":"form:configureFields",properties:T({},f)}),D.jsx("div",{style:{height:"90%",aspectRatio:"8 / 16",border:"5px solid rgb(177, 176, 176)",borderRadius:40,boxShadow:"0 0 10px rgba(208, 208, 208, 0.77)",backgroundColor:"white",overflow:"auto",position:"relative",scrollbarWidth:"none"},children:D.jsx(C.SchemaComponentContext.Provider,{value:W(T({},t),{designable:!1}),children:D.jsx(C.SchemaComponent,{schema:mc(b),components:{EditableGrid:$e}})})})};function dp(e){const t=[],o=r=>{if(!(!r||typeof r!="object")&&(r["x-decorator"]==="FormItem"&&t.push(mc(r)),r.properties)){const b=Object.keys(r.properties);for(const v of b)o(r.properties[v])}};return o(e),t.reduce((r,b)=>(r[A.uid()]=b,r),{})}const mc=e=>({type:"void","x-component":"EditableGrid.Row",properties:{[A.uid()]:{type:"void","x-component":"EditableGrid.Col",properties:{[e.name||A.uid()]:e}}}}),On=({open:e,onCancel:t,options:o})=>{var i,l;const[f,r]=V.useState(()=>new A.Schema({})),[b,v]=V.useState(A.uid()),{refresh:F}=C.useDesignable(),_=C.useAPIClient(),{t:n}=C.useTranslation(),{styles:c}=Xe(),h=((i=o==null?void 0:o.item)==null?void 0:i.collectionName)||((l=o==null?void 0:o.item)==null?void 0:l.name)||null,a=C.useCollectionManager().getCollection(h),u=ot({t:n,api:_,refresh:F,current:f});return V.useEffect(()=>{o!=null&&o.schema&&r(o==null?void 0:o.schema)},[o]),D.jsx(oe.Modal,{open:e,footer:null,width:"100vw",closable:!1,className:c.editModel,children:D.jsx($c,{children:D.jsx(C.CollectionContext.Provider,{value:a,children:D.jsx(C.DndContext,{children:D.jsxs(oe.Layout,{style:{height:"100%"},children:[D.jsx(ap,{onCancel:t,schema:f}),D.jsxs(oe.Layout,{children:[D.jsx(Qu,{schema:f,setSchemakey:v,eddn:u}),D.jsx(bl,{schema:f},b),D.jsx(Ju,{schema:f,setSchemakey:v,eddn:u})]})]})})})})})};function fc(e){const{collectionName:t,association:o,dataSource:f,templateSchema:r,isCusomeizeCreate:b}=e,v=o||t;if(!f)throw new Error("dataSource are required");if(!v)throw new Error("association or collectionName is required");return{type:"void","x-acl-action-props":{skipScopeCheck:!0},"x-acl-action":`${v}:create`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useCreateFormBlockDecoratorProps","x-decorator-props":{dataSource:f,collection:t,association:o},"x-toolbar":"EditableFormToolbar","x-component":"CardItem",properties:{[A.uid()]:{type:"void","x-component":"FormV2","x-use-component-props":"useCreateFormBlockProps",properties:{[A.uid()]:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:24}}},grid:r||{type:"void","x-component":"EditableGrid",properties:{}}}}}}}const mp=()=>{const e=A.useFieldSchema(),t=A.useForm(),o=A.useField(),f=V.useContext(Qe.SchemaMarkupContext),r=V.useContext(Qe.SchemaExpressionScopeContext),b=V.useContext(Qe.SchemaComponentsContext),v=C.useFormBlockContext(),F=C.useSchemaOptionsContext(),{setEditableForm:_}=lc();return V.useEffect(()=>{_({field:o,fieldSchema:e,schemaMarkup:f,expressionScope:r,schemaComponents:b,schemaOptions:F,form:t,formBlockValue:v})},[]),null},fp=e=>D.jsx(hp,T({showBorder:!1,showBackground:!0},e)),hp=e=>{const{designable:t}=C.useDesignable();return t?D.jsx(bp,T({},e)):null},bp=e=>{const{title:t,initializer:o,settings:f,showBackground:r,showBorder:b=!0}=e,{designable:v}=C.useDesignable(),F=A.useFieldSchema(),_=A.useForm(),n=V.useContext(Qe.SchemaMarkupContext),c=V.useContext(A.SchemaExpressionScopeContext),h=V.useContext(A.SchemaComponentsContext),s=C.useFormBlockContext(),a=C.useSchemaOptionsContext(),{t:u}=Z(),i=A.useField(),{styles:l}=Xe(),{getAriaLabel:p}=C.useGetAriaLabelOfDesigner(),{setEditableField:d,fieldSchema:y,highLightField:m}=Ct(),{removeActiveFieldName:g}=C.useFormActiveFields()||{},{dn:x}=dt(),{draggable:P}=V.useContext(C.SortableContext),S=V.useMemo(()=>P===!1?null:D.jsx(C.DragHandler,{children:D.jsx(ke.DragOutlined,{role:"button","aria-label":p("drag-handler")})}),[P,p]),j=V.useMemo(()=>D.jsx(oe.Popconfirm,{title:u("Delete field"),description:"",icon:null,okType:"danger",okText:u("Delete"),cancelText:u("Cancel"),onConfirm:()=>{const I={removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"EditableGrid"}};i!=null&&i.required&&(i.required=!1,F.required=!1),x.remove(null,I),delete _.values[F.name],g==null||g(F.name),i!=null&&i.setInitialValue&&(i!=null&&i.reset)&&(i.setInitialValue(null),i.reset())},children:D.jsx(ke.DeleteOutlined,{role:"button",style:{cursor:"pointer"}})}),[]),O=V.useRef(null);if(V.useEffect(()=>{var q;const I=O.current,E=(q=I==null?void 0:I.parentElement)==null?void 0:q.parentElement;function R(){I&&(I.style.display="block")}function N(){I&&(I.style.display="none")}function L(te){const Y=te.target;(I==null?void 0:I.contains(Y))||(O.current&&O.current.scrollIntoView({behavior:"smooth",block:"center"}),d({field:i,fieldSchema:F,schemaMarkup:n,expressionScope:c,schemaComponents:h,schemaOptions:a,form:_,formBlockValue:s}))}return E&&(window.getComputedStyle(E).position==="static"&&(E.style.position="relative"),E.addEventListener("mouseenter",R),E.addEventListener("mouseleave",N),E.addEventListener("click",L)),()=>{E&&(E.removeEventListener("mouseenter",R),E.removeEventListener("mouseleave",N),E.removeEventListener("click",L))}},[]),!v)return null;V.useEffect(()=>{(m==null?void 0:m.name)===F.name&&O.current&&(d({field:i,fieldSchema:F,schemaMarkup:n,expressionScope:c,schemaComponents:h,schemaOptions:a,form:_,formBlockValue:s,highLightField:null}),requestAnimationFrame(()=>{var I;(I=O.current)==null||I.scrollIntoView({behavior:"smooth",block:"center"})}))},[m]);const w=(y==null?void 0:y["x-uid"])===F["x-uid"]?"block":"none";return D.jsxs("div",{children:[D.jsx("div",{ref:O,className:l.toolbar,style:{border:b?"auto":0,background:r?"auto":0,borderRadius:"8px"},children:D.jsx("div",{className:l.toolbarIcons,children:D.jsxs(C.Space,{size:3,align:"center",children:[S,j]})})}),D.jsx("div",{className:l.currentbar,style:{display:w,borderRadius:"8px"}})]})},vp=e=>e.reduceProperties((t,o)=>{if(o["x-component"]==="FormV2"||o["x-component"]==="Details"){const f=o.reduceProperties((r,b)=>b["x-component"]==="Grid"||b["x-component"]==="BlockTemplate"?b:r,null);if(f)return f}return t},null),yp=e=>{const t=A.useFieldSchema(),o=C.findFormBlock(t)||t;return{templateData:se.cloneDeep(o==null?void 0:o["x-data-templates"])}},_p=new _e({name:"blockEditableSettings:createForm",items:[{name:"title",useSchema(){var f;const e=A.useField(),t=A.useFieldSchema(),{t:o}=Z();return{type:"string",title:'{{t("Edit block title")}}',default:(f=t==null?void 0:t["x-component-props"])==null?void 0:f.title,"x-decorator":"FormItem","x-component":"Input","x-component-props":{onChange(r){var F;const b=(F=r==null?void 0:r.target)==null?void 0:F.value,v=t["x-component-props"]||{};v.title=b,t["x-component-props"]=v,e.componentProps.title=b}}}}},{name:"linkageRules",useSchema(){const{name:e}=C.useCollection_deprecated(),t=A.useFieldSchema(),{form:o}=C.useFormBlockContext(),{t:f}=Z(),{getTemplateById:r}=C.useSchemaTemplateManager(),b=C.useVariables(),v=C.useLocalVariables(),F=C.useRecord(),{type:_}=C.useFormBlockType(),n=["Action","Action.Link"].includes(t["x-component"])?"button":"field",c=vp(t)||t;return{type:"object",title:f("Linkage rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:f("Linkage rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div"},properties:{fieldReaction:{"x-component":C.FormLinkageRules,"x-use-component-props":()=>({options:C.useLinkageCollectionFilterOptions(e),defaultValues:(c==null?void 0:c["x-linkage-rules"])||(t==null?void 0:t["x-linkage-rules"]),type:n,linkageOptions:C.useLinkageCollectionFieldOptions(e),collectionName:e,form:o,variables:b,localVariables:v,record:F,formBlockType:_})},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const h=A.useForm(),s=C.useActionContext();return{onClick(){return ie(this,null,function*(){var p,d;const u=[];let i=h.values.fieldReaction.rules;for(const y of i)u.push(se.pickBy(y,se.identity));const l=c["x-component"]==="BlockTemplate"&&((p=c["x-component-props"])==null?void 0:p.templateId);l&&r(l).uid||c["x-uid"],c["x-linkage-rules"]=u,(d=s==null?void 0:s.setVisible)==null||d.call(s,!1)})}}}}}}}}}}}},{name:"dataTemplates",useVisible(){const{action:e}=C.useFormBlockContext();return!e},useSchema(){const{name:e}=C.useCollection_deprecated(),t=V.useContext(C.SchemaComponentContext),o=A.useFieldSchema(),{t:f}=Z(),r=C.findFormBlock(o)||o,{templateData:b}=yp();return{type:"object",title:f("Form data templates"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:f("Form data templates"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div"},properties:{fieldReaction:{"x-decorator":v=>D.jsx(C.FlagProvider,W(T({},v),{isInFormDataTemplate:!0})),"x-component":C.FormDataTemplates,"x-use-component-props":()=>({defaultValues:b,collectionName:e}),"x-component-props":{designerCtx:t,formSchema:r}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const v=A.useForm(),F=C.useActionContext();return{onClick(){return ie(this,null,function*(){var h;let n=v.values.fieldReaction;const c=T(T({},r["x-data-templates"]),n);c.items.forEach(s=>{s.fields=Array.isArray(s.fields)?s.fields:s.fields.checked}),r["x-data-templates"]=c,(h=F==null?void 0:F.setVisible)==null||h.call(F,!1)})}}}}}}}}}}}}]}),xp=e=>{const t=Op[e];return t==null?void 0:t()},Cn={"uiSchema.x-component-props.addonBefore":{type:"string",title:'{{t("Prefix")}}',"x-decorator":"FormItem","x-component":"Input"},"uiSchema.x-component-props.addonAfter":{type:"string",title:'{{t("Suffix")}}',"x-decorator":"FormItem","x-component":"Input"}},gp=[{dependencies:["dataType"],fulfill:{state:{display:'{{["double", "decimal"].includes($deps[0]) ? "visible" : "none"}}'}}}],hc=[{dependencies:["dataType"],fulfill:{state:{display:'{{$deps[0] === "date" ? "visible" : "none"}}'}}}];function Fp(e){const t=C.useCompile(),{setValuesIn:o}=A.useForm(),f=he.ArrayTable.useIndex();return A.useFormEffects(()=>{A.onFieldValueChange(`patterns.${f}.type`,r=>{o(`patterns.${f}.options`,{})})}),D.jsx(oe.Select,W(T({popupMatchSelectWidth:!1},e),{children:Object.keys(wt).map(r=>D.jsx(oe.Select.Option,{value:r,children:t(wt[r].title)},r))}))}function Sp(){const e=C.useCompile(),{values:t}=A.useForm(),o=he.ArrayTable.useIndex(),{type:f,options:r}=t.patterns[o],b=wt[f];return D.jsx("div",{className:C.css`
173
173
  display: flex;
174
174
  gap: 1em;
175
175
  flex-wrap: wrap;
@@ -178,17 +178,17 @@
178
178
  padding: 0;
179
179
  `,children:[D.jsx("dt",{children:e(_)}),D.jsx("dd",{className:C.css`
180
180
  margin-bottom: 0;
181
- `,children:D.jsx(F,{value:r[v]},v)})]},v):null})})}const Pt={string:{title:'{{t("Fixed text")}}',optionRenders:{value(e={value:""}){return D.jsx("code",{children:e.value})}},fieldset:{value:{type:"string",title:'{{t("Text content")}}',"x-decorator":"FormItem","x-component":"Input"}}},integer:{title:'{{t("Autoincrement")}}',optionRenders:{digits:function({value:t}){return D.jsx("code",{children:t})},start:function({value:t}){return D.jsx("code",{children:t})}},fieldset:{digits:{type:"number",title:'{{t("Digits")}}',"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:1,max:10},required:!0,default:1,"x-reactions":{target:"start",fulfill:{schema:{"x-component-props.max":"{{ 10 ** $self.value - 1 }}"}}}},start:{type:"number",title:'{{t("Start from")}}',"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:0},required:!0,default:0},cycle:{type:"string",title:'{{t("Reset cycle")}}',"x-decorator":"FormItem","x-component"({value:e,onChange:t}){const o=[{label:"No reset",value:0},{label:"Daily",value:1,cron:"0 0 * * *"},{label:"Every Monday",value:2,cron:"0 0 * * 1"},{label:"Monthly",value:3,cron:"0 0 1 * *"},{label:"Yearly",value:4,cron:"0 0 1 1 *"},{label:"Customize",value:5,cron:"* * * * *"}],f=typeof e=="undefined"?o[0]:o.find(r=>r.cron===e)||o[5];return D.jsxs("fieldset",{children:[D.jsx(oe.Select,{value:f.value,onChange:r=>t(o[r].cron),children:o.map(r=>D.jsx(oe.Select.Option,{value:r.value,children:r.label},r.value))}),f.value===5?D.jsx(C.Cron,{value:e,onChange:t,clearButton:!1}):null]})},default:null}}},date:{title:'{{t("Date")}}',optionRenders:{format(e={value:"YYYYMMDD"}){return D.jsx("code",{children:e.value})}},fieldset:{format:{type:"string",title:'{{t("Date fomat")}}',"x-decorator":"FormItem","x-component":"Input",default:"YYYYMMDD"}}}};function Sp(){const{t:e}=Z(),t=C.useCompile(),o=V.useContext(A.SchemaOptionsContext),{values:f,setValuesIn:r}=A.useForm(),b=he.ArrayTable.useIndex(),{type:v,options:F}=f.patterns[b],_=Pt[v],{token:n}=C.useToken();return _!=null&&_.fieldset?D.jsx(oe.Button,{type:"link",onClick:()=>{he.FormDrawer({title:t(_.title),zIndex:n.zIndexPopupBase+1e3},()=>D.jsxs(he.FormLayout,{layout:"vertical",children:[D.jsx(C.SchemaComponentOptions,{scope:o.scope,components:o.components,children:D.jsx(C.SchemaComponent,{schema:{type:"object","x-component":"fieldset",properties:_.fieldset}})}),D.jsx(he.FormButtonGroup,{className:C.css`
181
+ `,children:D.jsx(F,{value:r[v]},v)})]},v):null})})}const wt={string:{title:'{{t("Fixed text")}}',optionRenders:{value(e={value:""}){return D.jsx("code",{children:e.value})}},fieldset:{value:{type:"string",title:'{{t("Text content")}}',"x-decorator":"FormItem","x-component":"Input"}}},integer:{title:'{{t("Autoincrement")}}',optionRenders:{digits:function({value:t}){return D.jsx("code",{children:t})},start:function({value:t}){return D.jsx("code",{children:t})}},fieldset:{digits:{type:"number",title:'{{t("Digits")}}',"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:1,max:10},required:!0,default:1,"x-reactions":{target:"start",fulfill:{schema:{"x-component-props.max":"{{ 10 ** $self.value - 1 }}"}}}},start:{type:"number",title:'{{t("Start from")}}',"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:0},required:!0,default:0},cycle:{type:"string",title:'{{t("Reset cycle")}}',"x-decorator":"FormItem","x-component"({value:e,onChange:t}){const o=[{label:"No reset",value:0},{label:"Daily",value:1,cron:"0 0 * * *"},{label:"Every Monday",value:2,cron:"0 0 * * 1"},{label:"Monthly",value:3,cron:"0 0 1 * *"},{label:"Yearly",value:4,cron:"0 0 1 1 *"},{label:"Customize",value:5,cron:"* * * * *"}],f=typeof e=="undefined"?o[0]:o.find(r=>r.cron===e)||o[5];return D.jsxs("fieldset",{children:[D.jsx(oe.Select,{value:f.value,onChange:r=>t(o[r].cron),children:o.map(r=>D.jsx(oe.Select.Option,{value:r.value,children:r.label},r.value))}),f.value===5?D.jsx(C.Cron,{value:e,onChange:t,clearButton:!1}):null]})},default:null}}},date:{title:'{{t("Date")}}',optionRenders:{format(e={value:"YYYYMMDD"}){return D.jsx("code",{children:e.value})}},fieldset:{format:{type:"string",title:'{{t("Date fomat")}}',"x-decorator":"FormItem","x-component":"Input",default:"YYYYMMDD"}}}};function Pp(){const{t:e}=Z(),t=C.useCompile(),o=V.useContext(A.SchemaOptionsContext),{values:f,setValuesIn:r}=A.useForm(),b=he.ArrayTable.useIndex(),{type:v,options:F}=f.patterns[b],_=wt[v],{token:n}=C.useToken();return _!=null&&_.fieldset?D.jsx(oe.Button,{type:"link",onClick:()=>{he.FormDrawer({title:t(_.title),zIndex:n.zIndexPopupBase+1e3},()=>D.jsxs(he.FormLayout,{layout:"vertical",children:[D.jsx(C.SchemaComponentOptions,{scope:o.scope,components:o.components,children:D.jsx(C.SchemaComponent,{schema:{type:"object","x-component":"fieldset",properties:_.fieldset}})}),D.jsx(he.FormButtonGroup,{className:C.css`
182
182
  justify-content: flex-end;
183
- `,children:D.jsx(he.Submit,{onSubmit:u=>u,children:e("Submit")})})]})).open({initialValues:F}).then(u=>{r(`patterns.${b}`,{type:v,options:k({},u)})}).catch(u=>{he.error(u)})},children:e("Configure")}):null}const Pp={oho:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"void",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{sourceKey:{type:"string",title:'{{t("Source key")}}',description:"{{t('Field values must be unique.')}}","x-decorator":"FormItem","x-component":"SourceKey"}}},col22:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key")}}',required:!0,description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}}}}}}}),obo:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"void",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key")}}',required:!0,default:'{{ useNewId("f_") }}',description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}},col22:{type:"void","x-component":"Grid.Col",properties:{targetKey:{type:"string",default:"id",title:'{{t("Target key")}}',description:"{{t('Field values must be unique.')}}","x-decorator":"FormItem","x-component":"TargetKey"}}}}}}}}),o2o:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"void",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{sourceKey:{type:"string",title:'{{t("Source key")}}',description:"{{t('Field values must be unique.')}}","x-decorator":"FormItem","x-component":"SourceKey"}}},col22:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key")}}',required:!0,default:'{{ useNewId("f_") }}',description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid"}}}}}}}}),o2m:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"void",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{sourceKey:{type:"string",title:'{{t("Source key")}}',description:"{{t('Field values must be unique.')}}",default:"id",enum:[{label:"ID",value:"id"}],"x-decorator":"FormItem","x-component":"SourceKey","x-disabled":!0}}},col22:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key")}}',required:!0,default:'{{ useNewId("f_") }}',description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}}}},row3:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{}},col22:{type:"void","x-component":"Grid.Col",properties:{targetKey:{type:"string",default:"id",title:'{{t("Target key")}}',"x-decorator":"FormItem","x-component":"TargetKey",description:"{{t('Field values must be unique.')}}"}}}}}}}}),m2o:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"void",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key")}}',required:!0,description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}},col22:{type:"void","x-component":"Grid.Col",properties:{targetKey:{type:"string",title:'{{t("Target key")}}',default:"id",description:"{{t('Field values must be unique.')}}","x-decorator":"FormItem","x-component":"TargetKey"}}}}}}}}),m2m:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"string",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{through:{type:"string",title:'{{t("Through collection")}}',description:'{{ t("Generated automatically if left blank") }}',"x-decorator":"FormItem","x-disabled":"{{ !createOnly }}","x-component":"ThroughCollection","x-component-props":{allowClear:!0}}}},col13:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{sourceKey:{type:"string",title:'{{t("Source key")}}',description:"{{t('Field values must be unique.')}}","x-decorator":"FormItem","x-component":"SourceKey","x-disabled":!0}}},col22:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key 1")}}',required:!0,default:'{{ useNewId("f_") }}',description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}},col23:{type:"void","x-component":"Grid.Col",properties:{}}}},row3:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{}},col22:{type:"void","x-component":"Grid.Col",properties:{otherKey:{type:"string",title:'{{t("Foreign key 2")}}',required:!0,default:'{{ useNewId("f_") }}',description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}},col23:{type:"void","x-component":"Grid.Col",properties:{targetKey:{type:"string",default:"id",title:'{{t("Target key")}}',"x-decorator":"FormItem","x-component":"TargetKey",description:"{{t('Field values must be unique.')}}"}}}}}}}}),number:()=>k({unique:C.unique,"uiSchema.x-component-props.step":{type:"string",title:'{{t("Precision")}}',"x-component":"Select","x-decorator":"FormItem",default:"1",enum:[{value:"1",label:"1"},{value:"0.1",label:"1.0"},{value:"0.01",label:"1.00"},{value:"0.001",label:"1.000"},{value:"0.0001",label:"1.0000"},{value:"0.00001",label:"1.00000"}]}},On),integer:()=>k({layout:{type:"void",title:'{{t("Index")}}',"x-component":"Space","x-decorator":"FormItem","x-decorator-props":{style:{marginBottom:"0px"}},properties:{primaryKey:C.primaryKey,unique:C.unique}},autoIncrement:C.autoIncrement},On),percent:()=>k({unique:C.unique,"uiSchema.x-component-props.step":{type:"string",title:'{{t("Precision")}}',"x-component":"Select","x-decorator":"FormItem",default:"1",enum:[{value:"1",label:"1%"},{value:"0.1",label:"1.0%"},{value:"0.01",label:"1.00%"},{value:"0.001",label:"1.000%"},{value:"0.0001",label:"1.0000%"},{value:"0.00001",label:"1.00000%"}]}},On),select:()=>({"uiSchema.enum":C.dataSource}),multipleSelect:()=>({"uiSchema.enum":C.dataSource}),checkbox:()=>({"uiSchema.x-component-props.showUnchecked":{type:"boolean",title:'{{t("Display X when unchecked")}}',default:!1,"x-decorator":"FormItem","x-component":"Checkbox"}}),checkboxGroup:()=>({"uiSchema.enum":C.dataSource}),radioGroup:()=>({"uiSchema.enum":C.dataSource}),attachment:()=>({"uiSchema.x-component-props.accept":{type:"string",title:'{{t("MIME type")}}',"x-component":"Input","x-decorator":"FormItem",description:"Example: image/png",default:"image/*"},"uiSchema.x-component-props.multiple":{type:"boolean","x-content":"{{t('Allow uploading multiple files')}}","x-decorator":"FormItem","x-component":"Checkbox",default:!0},storage:{type:"string",title:'{{t("Storage")}}',description:"{{t('Default storage will be used when not selected')}}","x-decorator":"FormItem","x-component":"RemoteSelect","x-component-props":{service:{resource:"storages",params:{}},manual:!1,fieldNames:{label:"title",value:"name"}}}}),datetime:()=>W(k({},C.dateTimeProps),{"uiSchema.x-component-props.gmt":{type:"boolean",title:'{{t("GMT")}}',"x-hidden":!0,"x-component":"Checkbox","x-content":'{{t("Use the same time zone (GMT) for all users")}}',"x-decorator":"FormItem",default:!1}}),unixTimestamp:()=>({"uiSchema.x-component-props.accuracy":{type:"string",title:'{{t("Accuracy")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"millisecond",enum:[{value:"millisecond",label:'{{t("Millisecond")}}'},{value:"second",label:'{{t("Second")}}'}]}}),time:()=>({"uiSchema.x-component-props.format":{type:"string",title:'{{t("Time format")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"HH:mm:ss",enum:[{label:'{{t("12 hour")}}',value:"hh:mm:ss a"},{label:'{{t("24 hour")}}',value:"HH:mm:ss"}]}}),nanoid:()=>({customAlphabet:{type:"string",title:'{{t("Alphabet")}}',default:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz","x-decorator":"FormItem","x-component":"Input"},size:{type:"number",title:'{{t("Length")}}',default:21,"x-decorator":"FormItem","x-component":"InputNumber"}}),sort:()=>({scopeKey:{type:"string",title:'{{t("Grouped sorting")}}',"x-disabled":"{{ !createOnly }}","x-decorator":"FormItem","x-component":"Select",enum:"{{scopeKeyOptions}}",description:"{{t('When a field is selected for grouping, it will be grouped first before sorting.')}}"}}),formula:()=>({dataType:{type:"string",title:'{{t("Storage type")}}',"x-decorator":"FormItem","x-component":"Select","x-disabled":"{{ !createOnly }}",enum:[{value:"boolean",label:"Boolean"},{value:"integer",label:"Integer"},{value:"bigInt",label:"Big integer"},{value:"double",label:"Double"},{value:"string",label:"String"},{value:"date",label:"Datetime"}],required:!0,default:"double"},"uiSchema.x-component-props.addonAfter":{type:"string",title:'{{t("Suffix")}}',"x-decorator":"FormItem","x-component":"Input"},"uiSchema.x-component-props.step":{type:"string",title:'{{t("Precision")}}',"x-component":"Select","x-decorator":"FormItem",required:!0,default:"0",enum:[{value:"0",label:"1"},{value:"0.1",label:"1.0"},{value:"0.01",label:"1.00"},{value:"0.001",label:"1.000"},{value:"0.0001",label:"1.0000"},{value:"0.00001",label:"1.00000"}],"x-reactions":xp},"uiSchema.x-component-props.dateFormat":W(k({},se.cloneDeep(C.dateTimeProps["uiSchema.x-component-props.dateFormat"])),{"x-reactions":fc}),"uiSchema.x-component-props.showTime":W(k({},se.cloneDeep(C.dateTimeProps["uiSchema.x-component-props.showTime"])),{"x-reactions":[...C.dateTimeProps["uiSchema.x-component-props.showTime"]["x-reactions"],...fc]}),"uiSchema.x-component-props.timeFormat":k({},se.cloneDeep(C.dateTimeProps["uiSchema.x-component-props.timeFormat"])),engine:{type:"string",title:'{{t("Calculation engine")}}',"x-decorator":"FormItem","x-component":"Radio.Group",enum:Array.from(he.evaluators.getEntities()).reduce((e,[t,o])=>e.concat(k({value:t},o)),[]),required:!0,default:"math.js"},expression:{type:"string",title:'{{t("Expression")}}',required:!0,"x-component":"Formula.Expression","x-decorator":"FormItem","x-component-props":{supports:["checkbox","number","percent","integer","number","percent","sequence","input","textarea","email","phone","datetime","createdAt","updatedAt","radioGroup","checkboxGroup","select","multipleSelect"],useCurrentFields:"{{ useCurrentFields }}"},"x-reactions":{dependencies:["engine"],fulfill:{schema:{description:"{{renderExpressionDescription($deps[0])}}"}}},"x-validator"(e,t,{form:o}){const{values:f}=o,{evaluate:r}=he.evaluators.get(f.engine),b=e.trim().replace(/{{\s*([^{}]+)\s*}}/g,"1");try{return r(b),""}catch(v){return C.i18n.t("Expression syntax error")}}}}),sequence:()=>({unique:C.unique,patterns:{type:"array",title:'{{t("Sequence rules")}}',required:!0,"x-decorator":"FormItem","x-component":"ArrayTable",items:{type:"object",properties:{sort:{type:"void","x-component":"ArrayTable.Column","x-component-props":{width:50,title:"",align:"center"},properties:{sort:{type:"void","x-component":"ArrayTable.SortHandle"}}},type:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Type")}}'},properties:{type:{type:"string",name:"type",required:!0,"x-decorator":"FormItem","x-component":gp}}},options:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Rule content")}}'},properties:{options:{type:"object",name:"options","x-component":Fp}}},operations:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Operations")}}',dataIndex:"operations",fixed:"right",className:C.css`
183
+ `,children:D.jsx(he.Submit,{onSubmit:c=>c,children:e("Submit")})})]})).open({initialValues:F}).then(c=>{r(`patterns.${b}`,{type:v,options:T({},c)})}).catch(c=>{he.error(c)})},children:e("Configure")}):null}const Op={oho:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"void",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{sourceKey:{type:"string",title:'{{t("Source key")}}',description:"{{t('Field values must be unique.')}}","x-decorator":"FormItem","x-component":"SourceKey"}}},col22:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key")}}',required:!0,description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}}}}}}}),obo:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"void",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key")}}',required:!0,default:'{{ useNewId("f_") }}',description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}},col22:{type:"void","x-component":"Grid.Col",properties:{targetKey:{type:"string",default:"id",title:'{{t("Target key")}}',description:"{{t('Field values must be unique.')}}","x-decorator":"FormItem","x-component":"TargetKey"}}}}}}}}),o2o:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"void",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{sourceKey:{type:"string",title:'{{t("Source key")}}',description:"{{t('Field values must be unique.')}}","x-decorator":"FormItem","x-component":"SourceKey"}}},col22:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key")}}',required:!0,default:'{{ useNewId("f_") }}',description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid"}}}}}}}}),o2m:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"void",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{sourceKey:{type:"string",title:'{{t("Source key")}}',description:"{{t('Field values must be unique.')}}",default:"id",enum:[{label:"ID",value:"id"}],"x-decorator":"FormItem","x-component":"SourceKey","x-disabled":!0}}},col22:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key")}}',required:!0,default:'{{ useNewId("f_") }}',description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}}}},row3:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{}},col22:{type:"void","x-component":"Grid.Col",properties:{targetKey:{type:"string",default:"id",title:'{{t("Target key")}}',"x-decorator":"FormItem","x-component":"TargetKey",description:"{{t('Field values must be unique.')}}"}}}}}}}}),m2o:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"void",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key")}}',required:!0,description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}},col22:{type:"void","x-component":"Grid.Col",properties:{targetKey:{type:"string",title:'{{t("Target key")}}',default:"id",description:"{{t('Field values must be unique.')}}","x-decorator":"FormItem","x-component":"TargetKey"}}}}}}}}),m2m:()=>({grid:{type:"void","x-component":"Grid",properties:{row1:{type:"void","x-component":"Grid.Row",properties:{col11:{type:"void","x-component":"Grid.Col",properties:{source:{type:"string",title:'{{t("Source collection")}}',"x-decorator":"FormItem","x-component":"SourceCollection","x-disabled":!0}}},col12:{type:"void","x-component":"Grid.Col",properties:{through:{type:"string",title:'{{t("Through collection")}}',description:'{{ t("Generated automatically if left blank") }}',"x-decorator":"FormItem","x-disabled":"{{ !createOnly }}","x-component":"ThroughCollection","x-component-props":{allowClear:!0}}}},col13:{type:"void","x-component":"Grid.Col",properties:{target:{type:"string",title:'{{t("Target collection")}}',required:!0,"x-decorator":"FormItem","x-component":"CollectionSelect"}}}}},row2:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{sourceKey:{type:"string",title:'{{t("Source key")}}',description:"{{t('Field values must be unique.')}}","x-decorator":"FormItem","x-component":"SourceKey","x-disabled":!0}}},col22:{type:"void","x-component":"Grid.Col",properties:{foreignKey:{type:"string",title:'{{t("Foreign key 1")}}',required:!0,default:'{{ useNewId("f_") }}',description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}},col23:{type:"void","x-component":"Grid.Col",properties:{}}}},row3:{type:"void","x-component":"Grid.Row",properties:{col21:{type:"void","x-component":"Grid.Col",properties:{}},col22:{type:"void","x-component":"Grid.Col",properties:{otherKey:{type:"string",title:'{{t("Foreign key 2")}}',required:!0,default:'{{ useNewId("f_") }}',description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}","x-decorator":"FormItem","x-component":"ForeignKey","x-validator":"uid","x-disabled":!0}}},col23:{type:"void","x-component":"Grid.Col",properties:{targetKey:{type:"string",default:"id",title:'{{t("Target key")}}',"x-decorator":"FormItem","x-component":"TargetKey",description:"{{t('Field values must be unique.')}}"}}}}}}}}),number:()=>T({unique:C.unique,"uiSchema.x-component-props.step":{type:"string",title:'{{t("Precision")}}',"x-component":"Select","x-decorator":"FormItem",default:"1",enum:[{value:"1",label:"1"},{value:"0.1",label:"1.0"},{value:"0.01",label:"1.00"},{value:"0.001",label:"1.000"},{value:"0.0001",label:"1.0000"},{value:"0.00001",label:"1.00000"}]}},Cn),integer:()=>T({layout:{type:"void",title:'{{t("Index")}}',"x-component":"Space","x-decorator":"FormItem","x-decorator-props":{style:{marginBottom:"0px"}},properties:{primaryKey:C.primaryKey,unique:C.unique}},autoIncrement:C.autoIncrement},Cn),percent:()=>T({unique:C.unique,"uiSchema.x-component-props.step":{type:"string",title:'{{t("Precision")}}',"x-component":"Select","x-decorator":"FormItem",default:"1",enum:[{value:"1",label:"1%"},{value:"0.1",label:"1.0%"},{value:"0.01",label:"1.00%"},{value:"0.001",label:"1.000%"},{value:"0.0001",label:"1.0000%"},{value:"0.00001",label:"1.00000%"}]}},Cn),select:()=>({"uiSchema.enum":C.dataSource}),multipleSelect:()=>({"uiSchema.enum":C.dataSource}),checkbox:()=>({"uiSchema.x-component-props.showUnchecked":{type:"boolean",title:'{{t("Display X when unchecked")}}',default:!1,"x-decorator":"FormItem","x-component":"Checkbox"}}),checkboxGroup:()=>({"uiSchema.enum":C.dataSource}),radioGroup:()=>({"uiSchema.enum":C.dataSource}),attachment:()=>({"uiSchema.x-component-props.accept":{type:"string",title:'{{t("MIME type")}}',"x-component":"Input","x-decorator":"FormItem",description:"Example: image/png",default:"image/*"},"uiSchema.x-component-props.multiple":{type:"boolean","x-content":"{{t('Allow uploading multiple files')}}","x-decorator":"FormItem","x-component":"Checkbox",default:!0},storage:{type:"string",title:'{{t("Storage")}}',description:"{{t('Default storage will be used when not selected')}}","x-decorator":"FormItem","x-component":"RemoteSelect","x-component-props":{service:{resource:"storages",params:{}},manual:!1,fieldNames:{label:"title",value:"name"}}}}),datetime:()=>W(T({},C.dateTimeProps),{"uiSchema.x-component-props.gmt":{type:"boolean",title:'{{t("GMT")}}',"x-hidden":!0,"x-component":"Checkbox","x-content":'{{t("Use the same time zone (GMT) for all users")}}',"x-decorator":"FormItem",default:!1}}),unixTimestamp:()=>({"uiSchema.x-component-props.accuracy":{type:"string",title:'{{t("Accuracy")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"millisecond",enum:[{value:"millisecond",label:'{{t("Millisecond")}}'},{value:"second",label:'{{t("Second")}}'}]}}),time:()=>({"uiSchema.x-component-props.format":{type:"string",title:'{{t("Time format")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"HH:mm:ss",enum:[{label:'{{t("12 hour")}}',value:"hh:mm:ss a"},{label:'{{t("24 hour")}}',value:"HH:mm:ss"}]}}),nanoid:()=>({customAlphabet:{type:"string",title:'{{t("Alphabet")}}',default:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz","x-decorator":"FormItem","x-component":"Input"},size:{type:"number",title:'{{t("Length")}}',default:21,"x-decorator":"FormItem","x-component":"InputNumber"}}),sort:()=>({scopeKey:{type:"string",title:'{{t("Grouped sorting")}}',"x-disabled":"{{ !createOnly }}","x-decorator":"FormItem","x-component":"Select",enum:"{{scopeKeyOptions}}",description:"{{t('When a field is selected for grouping, it will be grouped first before sorting.')}}"}}),formula:()=>({dataType:{type:"string",title:'{{t("Storage type")}}',"x-decorator":"FormItem","x-component":"Select","x-disabled":"{{ !createOnly }}",enum:[{value:"boolean",label:"Boolean"},{value:"integer",label:"Integer"},{value:"bigInt",label:"Big integer"},{value:"double",label:"Double"},{value:"string",label:"String"},{value:"date",label:"Datetime"}],required:!0,default:"double"},"uiSchema.x-component-props.addonAfter":{type:"string",title:'{{t("Suffix")}}',"x-decorator":"FormItem","x-component":"Input"},"uiSchema.x-component-props.step":{type:"string",title:'{{t("Precision")}}',"x-component":"Select","x-decorator":"FormItem",required:!0,default:"0",enum:[{value:"0",label:"1"},{value:"0.1",label:"1.0"},{value:"0.01",label:"1.00"},{value:"0.001",label:"1.000"},{value:"0.0001",label:"1.0000"},{value:"0.00001",label:"1.00000"}],"x-reactions":gp},"uiSchema.x-component-props.dateFormat":W(T({},se.cloneDeep(C.dateTimeProps["uiSchema.x-component-props.dateFormat"])),{"x-reactions":hc}),"uiSchema.x-component-props.showTime":W(T({},se.cloneDeep(C.dateTimeProps["uiSchema.x-component-props.showTime"])),{"x-reactions":[...C.dateTimeProps["uiSchema.x-component-props.showTime"]["x-reactions"],...hc]}),"uiSchema.x-component-props.timeFormat":T({},se.cloneDeep(C.dateTimeProps["uiSchema.x-component-props.timeFormat"])),engine:{type:"string",title:'{{t("Calculation engine")}}',"x-decorator":"FormItem","x-component":"Radio.Group",enum:Array.from(he.evaluators.getEntities()).reduce((e,[t,o])=>e.concat(T({value:t},o)),[]),required:!0,default:"math.js"},expression:{type:"string",title:'{{t("Expression")}}',required:!0,"x-component":"Formula.Expression","x-decorator":"FormItem","x-component-props":{supports:["checkbox","number","percent","integer","number","percent","sequence","input","textarea","email","phone","datetime","createdAt","updatedAt","radioGroup","checkboxGroup","select","multipleSelect"],useCurrentFields:"{{ useCurrentFields }}"},"x-reactions":{dependencies:["engine"],fulfill:{schema:{description:"{{renderExpressionDescription($deps[0])}}"}}},"x-validator"(e,t,{form:o}){const{values:f}=o,{evaluate:r}=he.evaluators.get(f.engine),b=e.trim().replace(/{{\s*([^{}]+)\s*}}/g,"1");try{return r(b),""}catch(v){return C.i18n.t("Expression syntax error")}}}}),sequence:()=>({unique:C.unique,patterns:{type:"array",title:'{{t("Sequence rules")}}',required:!0,"x-decorator":"FormItem","x-component":"ArrayTable",items:{type:"object",properties:{sort:{type:"void","x-component":"ArrayTable.Column","x-component-props":{width:50,title:"",align:"center"},properties:{sort:{type:"void","x-component":"ArrayTable.SortHandle"}}},type:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Type")}}'},properties:{type:{type:"string",name:"type",required:!0,"x-decorator":"FormItem","x-component":Fp}}},options:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Rule content")}}'},properties:{options:{type:"object",name:"options","x-component":Sp}}},operations:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Operations")}}',dataIndex:"operations",fixed:"right",className:C.css`
184
184
  > *:not(:last-child) {
185
185
  margin-right: 0.5em;
186
186
  }
187
187
  button {
188
188
  padding: 0;
189
189
  }
190
- `},properties:{config:{type:"void",properties:{options:{type:"object","x-component":Sp}}},remove:{type:"void","x-component":"ArrayTable.Remove"}}}}},properties:{add:{type:"void","x-component":"ArrayTable.Addition","x-component-props":{defaultValue:{type:"integer",options:{digits:1,start:0}}},title:'{{t("Add rule")}}'}}},inputable:{type:"boolean",title:'{{t("Inputable")}}',"x-decorator":"FormItem","x-component":"Checkbox"},match:{type:"boolean",title:'{{t("Match rules")}}',"x-decorator":"FormItem","x-component":"Checkbox","x-reactions":{dependencies:["inputable"],fulfill:{state:{value:"{{$deps[0] && $self.value}}",visible:"{{$deps[0] === true}}"}}}}}),collection:()=>({"uiSchema.enum":C.collectionDataSource})},Op=new ye({name:"editableFieldSettings:Fields:Infterface",items:[{name:"setCollectionField",useSchema(){const{t:e}=Z(),t=A.useFieldSchema(),o=C.useRecord(),f=A.useField();return{type:"object",title:e("Edit field"),"x-decorator":"FormItem","x-component":Cp,"x-component-props":{record:o,fieldSchema:t,field:f}}}}]}),Cp=e=>{const{record:t,fieldSchema:o,field:f}=e,{t:r}=Z(),{collections:b,getCollection:v,refreshCM:F}=C.useCollectionManager_deprecated(),{refresh:_}=wt(),[n,u]=V.useState({}),[h,s]=V.useState(!1),[a,l]=V.useState({}),{components:i}=V.useContext(A.SchemaOptionsContext),c=C.useAPIClient(),[p,d]=V.useState({}),{isDialect:y}=C.useDialect(),m=C.useCompile(),g=V.useMemo(()=>(t==null?void 0:t.fields)||v(t.collectionName).options.fields.filter(S=>S.interface==="select").map(S=>{var j;return{value:S.name,label:m((j=S.uiSchema)==null?void 0:j.title)}}),[t.name]),x=V.useMemo(()=>b.map(S=>({label:m(S.title),value:S.name})),[]),P=()=>{const S=C.useAPIClient(),j=A.useForm(),O=C.useActionContext(),{name:w}=C.useCollection_deprecated();return{run(){return ie(this,null,function*(){yield j.submit();const E=se.cloneDeep(j.values);E.autoCreateReverseField||delete E.reverseField,delete E.autoCreateReverseField;const R=["obo","oho","o2o","o2m","m2m","m2o","updatedBy","createdBy"].includes(t==null?void 0:t.interface),N={};if(R&&(N.foreignKey=`f_${A.uid()}`,t!=null&&t.otherKey&&(N.otherKey=`f_${A.uid()}`,N.through=`t_${A.uid()}`)),yield S.resource("collections.fields",w).update({filterByTk:t.name,values:k(k({},E),N)}),R){const L=E.targetKey||"id",K=v(E.target),te=(K==null?void 0:K.titleField)||L;o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].fieldNames={value:L,label:te},f.componentProps.fieldNames=o["x-component-props"].fieldNames}yield F(),_(),O.setVisible(!1),yield j.reset()})}}};return D.jsx(D.Fragment,{children:D.jsx(Ze.ContextCleaner,{children:D.jsx(C.RecordProvider,{record:t,children:D.jsxs(C.ActionContextProvider,{value:{visible:h,setVisible:s},children:[D.jsx(oe.Button,{style:{width:"100%"},disabled:!1,onClick:()=>ie(null,null,function*(){const{data:S}=yield c.resource("collections.fields",t.collectionName).get({filterByTk:t.name,appends:["reverseField"]});d(S==null?void 0:S.data);const j=se.cloneDeep(S==null?void 0:S.data)||{},O=Ep(j,t);O&&(u(O),s(!0))}),children:r("Set default properties")}),D.jsx(C.SchemaComponentProvider,{components:i,children:D.jsx(C.SchemaComponent,{schema:n,components:W(k({},i),{ArrayTable:he.ArrayTable}),scope:{useUpdateCollectionField:P,useCancelAction:C.useCancelAction,useCancelActionProps:C.useCancelActionProps,showReverseFieldConfig:!(p!=null&&p.reverseField),collections:x,isDialect:y,disabledJSONB:!0,scopeKeyOptions:g,targetScope:a,createMainOnly:!0,useAsyncDataSource:jp,loadCollections:Ip,useCurrentFields:wp}})})]})})})})},wp=()=>{const e=C.useRecord(),{getCollectionFields:t}=C.useCollectionManager_deprecated();return e.__parent&&e.__parent.interface==="subTable"?V.useContext(C.DataSourceContext_deprecated).dataSource:t(e.collectionName||e.name)},Ep=(e,t)=>{const o=_p(t.interface),f=A.createForm({initialValues:e});return{type:"object",properties:{[A.uid()]:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:'{{ t("Set default properties") }}',"x-decorator":"FormV2","x-decorator-props":{form:f},properties:W(k({"uiSchema.title":{type:"string",title:'{{t("Title")}}',description:'{{t("Caution: Changing this will directly modify the name in collection")}}',"x-decorator":"FormItem","x-component":"Input"}},o),{footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ useUpdateCollectionField }}"}}}}})}}}},jp=(e,t)=>(o,f)=>{o.loading=!0,e(o,f,t).then(A.action.bound(r=>{o.dataSource=r,o.loading=!1})).catch(console.error)},Ip=(e,t,o)=>ie(null,null,function*(){var _;const{targetScope:f}=t,r=C.useCompile(),{getCollections:b}=C.useCollectionManager_deprecated(),v=((_=e.props)==null?void 0:_.name)==="inherits";return b().filter(n=>{var a;if(o!=null&&o.includes(n.template)||n.autoCreate&&n.isThrough||v&&n.template==="view")return!1;const h=!(f!=null&&f.template)||f.template.includes(n.template),s=!(f!=null&&f[(a=e.props)==null?void 0:a.name])||f[e.props.name].includes(n.name);return h&&s}).map(n=>({label:r(n.title),value:n.name}))}),Ap=We.createStyles(({css:e})=>({defaultInput:e`
190
+ `},properties:{config:{type:"void",properties:{options:{type:"object","x-component":Pp}}},remove:{type:"void","x-component":"ArrayTable.Remove"}}}}},properties:{add:{type:"void","x-component":"ArrayTable.Addition","x-component-props":{defaultValue:{type:"integer",options:{digits:1,start:0}}},title:'{{t("Add rule")}}'}}},inputable:{type:"boolean",title:'{{t("Inputable")}}',"x-decorator":"FormItem","x-component":"Checkbox"},match:{type:"boolean",title:'{{t("Match rules")}}',"x-decorator":"FormItem","x-component":"Checkbox","x-reactions":{dependencies:["inputable"],fulfill:{state:{value:"{{$deps[0] && $self.value}}",visible:"{{$deps[0] === true}}"}}}}}),collection:()=>({"uiSchema.enum":C.collectionDataSource})},Cp=new _e({name:"editableFieldSettings:Fields:Infterface",items:[{name:"setCollectionField",useSchema(){const{t:e}=Z(),t=A.useFieldSchema(),o=C.useRecord(),f=A.useField();return{type:"object",title:e("Edit field"),"x-decorator":"FormItem","x-component":wp,"x-component-props":{record:o,fieldSchema:t,field:f}}}}]}),wp=e=>{const{record:t,fieldSchema:o,field:f}=e,{t:r}=Z(),{collections:b,getCollection:v,refreshCM:F}=C.useCollectionManager_deprecated(),{refresh:_}=It(),[n,c]=V.useState({}),[h,s]=V.useState(!1),[a,u]=V.useState({}),{components:i}=V.useContext(A.SchemaOptionsContext),l=C.useAPIClient(),[p,d]=V.useState({}),{isDialect:y}=C.useDialect(),m=C.useCompile(),g=V.useMemo(()=>(t==null?void 0:t.fields)||v(t.collectionName).options.fields.filter(S=>S.interface==="select").map(S=>{var j;return{value:S.name,label:m((j=S.uiSchema)==null?void 0:j.title)}}),[t.name]),x=V.useMemo(()=>b.map(S=>({label:m(S.title),value:S.name})),[]),P=()=>{const S=C.useAPIClient(),j=A.useForm(),O=C.useActionContext(),{name:w}=C.useCollection_deprecated();return{run(){return ie(this,null,function*(){yield j.submit();const E=se.cloneDeep(j.values);E.autoCreateReverseField||delete E.reverseField,delete E.autoCreateReverseField;const R=["obo","oho","o2o","o2m","m2m","m2o","updatedBy","createdBy"].includes(t==null?void 0:t.interface),N={};if(R&&(N.foreignKey=`f_${A.uid()}`,t!=null&&t.otherKey&&(N.otherKey=`f_${A.uid()}`,N.through=`t_${A.uid()}`)),yield S.resource("collections.fields",w).update({filterByTk:t.name,values:T(T({},E),N)}),R){const L=E.targetKey||"id",q=v(E.target),te=(q==null?void 0:q.titleField)||L;o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].fieldNames={value:L,label:te},f.componentProps.fieldNames=o["x-component-props"].fieldNames}yield F(),_(),O.setVisible(!1),yield j.reset()})}}};return D.jsx(D.Fragment,{children:D.jsx(Qe.ContextCleaner,{children:D.jsx(C.RecordProvider,{record:t,children:D.jsxs(C.ActionContextProvider,{value:{visible:h,setVisible:s},children:[D.jsx(oe.Button,{style:{width:"100%"},disabled:!1,onClick:()=>ie(null,null,function*(){const{data:S}=yield l.resource("collections.fields",t.collectionName).get({filterByTk:t.name,appends:["reverseField"]});d(S==null?void 0:S.data);const j=se.cloneDeep(S==null?void 0:S.data)||{},O=jp(j,t);O&&(c(O),s(!0))}),children:r("Set default properties")}),D.jsx(C.SchemaComponentProvider,{components:i,children:D.jsx(C.SchemaComponent,{schema:n,components:W(T({},i),{ArrayTable:he.ArrayTable}),scope:{useUpdateCollectionField:P,useCancelAction:C.useCancelAction,useCancelActionProps:C.useCancelActionProps,showReverseFieldConfig:!(p!=null&&p.reverseField),collections:x,isDialect:y,disabledJSONB:!0,scopeKeyOptions:g,targetScope:a,createMainOnly:!0,useAsyncDataSource:Ip,loadCollections:Ap,useCurrentFields:Ep}})})]})})})})},Ep=()=>{const e=C.useRecord(),{getCollectionFields:t}=C.useCollectionManager_deprecated();return e.__parent&&e.__parent.interface==="subTable"?V.useContext(C.DataSourceContext_deprecated).dataSource:t(e.collectionName||e.name)},jp=(e,t)=>{const o=xp(t.interface),f=A.createForm({initialValues:e});return{type:"object",properties:{[A.uid()]:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:'{{ t("Set default properties") }}',"x-decorator":"FormV2","x-decorator-props":{form:f},properties:W(T({"uiSchema.title":{type:"string",title:'{{t("Title")}}',description:'{{t("Caution: Changing this will directly modify the name in collection")}}',"x-decorator":"FormItem","x-component":"Input"}},o),{footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ useUpdateCollectionField }}"}}}}})}}}},Ip=(e,t)=>(o,f)=>{o.loading=!0,e(o,f,t).then(A.action.bound(r=>{o.dataSource=r,o.loading=!1})).catch(console.error)},Ap=(e,t,o)=>ie(null,null,function*(){var _;const{targetScope:f}=t,r=C.useCompile(),{getCollections:b}=C.useCollectionManager_deprecated(),v=((_=e.props)==null?void 0:_.name)==="inherits";return b().filter(n=>{var a;if(o!=null&&o.includes(n.template)||n.autoCreate&&n.isThrough||v&&n.template==="view")return!1;const h=!(f!=null&&f.template)||f.template.includes(n.template),s=!(f!=null&&f[(a=e.props)==null?void 0:a.name])||f[e.props.name].includes(n.name);return h&&s}).map(n=>({label:r(n.title),value:n.name}))}),Dp=Ye.createStyles(({css:e})=>({defaultInput:e`
191
191
  & > .tb-form-item {
192
192
  flex: 1;
193
193
  }
194
- `})),Dp=new ye({name:"editableFieldSettings:FormItem",items:[{name:"editFieldTitle",useSchema(){var v;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),{getCollectionJoinField:f}=C.useCollectionManager_deprecated(),{getField:r}=C.useCollection_deprecated(),b=r(o.name)||f(o["x-collection-field"]);return{type:"string",title:e("Edit field title"),default:t==null?void 0:t.title,description:`${e("Original field title: ")}${(v=b==null?void 0:b.uiSchema)==null?void 0:v.title}`,"x-decorator":"FormItem","x-component":"Input","x-component-props":{onChange(F){var n;const _=(n=F==null?void 0:F.target)==null?void 0:n.value;t.title=_,o.title=_}}}}},{name:"displayTitle",useSchema(){var f,r;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:(r=(f=o["x-decorator-props"])==null?void 0:f.showTitle)!=null?r:!0,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Display title")}}',"x-component-props":{onInput:b=>{var F,_;const v=(_=(F=b==null?void 0:b.target)==null?void 0:F.checked)!=null?_:!1;o["x-decorator-props"]=o["x-decorator-props"]||{},o["x-decorator-props"].showTitle=v,t.decoratorProps.showTitle=v}}}}},{name:"editDescription",useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"string",title:e("Edit description"),default:t==null?void 0:t.description,"x-decorator":"FormItem","x-component":"Input","x-component-props":{onChange(f){var b;const r=(b=f==null?void 0:f.target)==null?void 0:b.value;t.description=r,o.description=r}}}}},{name:"editTooltip",useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"string",title:e("Edit tooltip"),default:(f=o==null?void 0:o["x-decorator-props"])==null?void 0:f.tooltip,"x-decorator":"FormItem","x-component":"Input","x-component-props":{onChange(r){var v;const b=(v=r==null?void 0:r.target)==null?void 0:v.value;t.decoratorProps.tooltip=b,o["x-decorator-props"]=o["x-decorator-props"]||{},o["x-decorator-props"].tooltip=b}}}}},{name:"required",useVisible(){const e=A.useField(),t=A.useFieldSchema(),{required:o=!0}=C.useSchemaToolbar();return!e.readPretty&&t["x-component"]!=="FormField"&&o},useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:o.required,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Required")}}',"x-component-props":{onInput:f=>{var b,v;const r=(v=(b=f==null?void 0:f.target)==null?void 0:b.checked)!=null?v:!1;o["x-uid"],t.required=r,o.required=r}}}}},{name:"setDefaultValue",components:{ArrayCollapse:he.ArrayCollapse,FormLayout:he.FormLayout,VariableInput:e=>{const{isInSubForm:t,isInSubTable:o}=C.useFlag()||{};return D.jsx(C.FlagProvider,{isInSubForm:t,isInSubTable:o,isInSetDefaultValueDialog:!0,children:D.jsx(C.VariableInput,k({},e))})}},useSchema(){var j,O,w;const{styles:e}=Ap(),t=A.useFieldSchema(),o=A.useField(),{t:f}=Z(),r=C.useActionContext();let b;const{getField:v}=C.useCollection_deprecated(),{getCollectionJoinField:F,getCollectionFields:_,getAllCollectionsInheritChain:n}=C.useCollectionManager_deprecated(),u=C.useVariables(),h=C.useLocalVariables(),s=C.useCollection_deprecated(),a=C.useRecord(),{form:l}=C.useFormBlockContext(),{getFields:i}=C.useCollectionFilterOptionsV2(s),{name:c}=s,p=V.useMemo(()=>v(t.name)||F(t["x-collection-field"]),[t,F,v]),d=se.omit(t,"required");p!=null&&p.target&&(b=F(`${p.target}.${((O=(j=t["x-component-props"])==null?void 0:j.fieldNames)==null?void 0:O.label)||"id"}`));const y=(p==null?void 0:p.interface)==="m2o"&&C.findParentFieldSchema(t),m=y&&F(y==null?void 0:y["x-collection-field"]),g=C.useTableBlockContext(),x=((w=r==null?void 0:r.fieldSchema)==null?void 0:w["x-action"])==="customize:create"&&((p==null?void 0:p.interface)==="m2m"||(m==null?void 0:m.type)==="hasMany"&&(p==null?void 0:p.interface)==="m2o"),P=V.useCallback(I=>{const E=I.find(N=>N.value==="$nForm"),R=_(c);return!(R!=null&&R.length)&&E&&(E.children=C.formatVariableScop(i())),I},[i,c]),S=A.createForm({initialValues:{default:t==null?void 0:t.default}});return{type:"object",title:f("Set default value"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:f("Set default value"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:S},properties:{default:{"x-decorator":"FormItem","x-component":"VariableInput","x-component-props":W(k({},t==null?void 0:t["x-component-props"]),{collectionField:p,contextCollectionName:x&&g.collection,schema:p==null?void 0:p.uiSchema,targetFieldSchema:t,className:e.defaultInput,form:l,record:a,returnScope:P,shouldChange:C.getShouldChange({collectionField:p,variables:u,localVariables:h,getAllCollectionsInheritChain:n}),renderSchemaComponent:function(E){const R=se.cloneDeep(d)||{};R.title="",R.name="default",R["x-read-pretty"]=!1,R["x-disabled"]=!1;const N=t.default;p.target&&R["x-component-props"]&&(R["x-component-props"].mode="Select"),p!=null&&p.uiSchema.type&&(R.type=p.uiSchema.type),(p==null?void 0:p.uiSchema["x-component"])==="Checkbox"&&(se.set(R,"x-component-props.defaultChecked",N),R.type="void");const L=W(k({},R),{"x-decorator":"FormItem","x-component-props":W(k({},R["x-component-props"]),{collectionName:p==null?void 0:p.collectionName,targetField:b,onChange:E.onChange,defaultValue:C.isVariable(N)?"":N,style:{width:"100%",verticalAlign:"top",minWidth:"200px"}}),default:C.isVariable(N)?"":N});return D.jsx(C.FormProvider,{children:D.jsx(C.SchemaComponent,{schema:L})})}}),title:f("Default value")},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const I=A.useForm(),E=C.useActionContext();return{onClick(){return ie(this,null,function*(){var L;const N=I.values.default;t["x-uid"],o.value=N,t.default=N,!N&&N!==0&&(o.value=null),(L=E==null?void 0:E.setVisible)==null||L.call(E,!1)})}}}}}}}}}}}},{name:"layoutDirection",useSchema(){var b;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),{layoutDirection:f="column"}=C.useContextConfigSetting();return{type:"string",title:'{{t("Layout Direction")}}',default:((b=o["x-decorator-props"])==null?void 0:b.layoutDirection)||f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Row"),value:"row"},{label:e("Column"),value:"column"}],onChange(v="column"){var n;const F=(n=o["x-decorator-props"])==null?void 0:n.style,_=W(k({},F),{display:"flex",flexDirection:v,alignItems:`${v==="row"?"baseline":"unset"}`});o["x-decorator-props"]=W(k({},o["x-decorator-props"]),{style:_,layoutDirection:v}),se.set(t,"decoratorProps.style",_),se.set(t,"decoratorProps.layoutDirection",v)}}}}},{name:"pattern",useVisible(){const{form:e}=C.useFormBlockContext(),t=A.useFieldSchema();return e&&!(e!=null&&e.readPretty)&&!C.isPatternDisabled(t)},useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();let f="editable";return o["x-disabled"]===!0&&(f="readonly"),o["x-read-pretty"]===!0&&(f="read-pretty"),{type:"string",title:'{{t("Pattern")}}',default:f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Editable"),value:"editable"},{label:e("Readonly"),value:"readonly"},{label:e("Easy-reading"),value:"read-pretty"}],onChange(r){switch(o["x-uid"],r){case"readonly":{o["x-read-pretty"]=!1,o["x-disabled"]=!0,t.readPretty=!1,t.disabled=!0,se.set(t,"initStateOfLinkageRules.pattern",C.getTempFieldState(!0,C.ActionType.ReadOnly));break}case"read-pretty":{o["x-read-pretty"]=!0,o["x-disabled"]=!1,t.readPretty=!0,se.set(t,"initStateOfLinkageRules.pattern",C.getTempFieldState(!0,C.ActionType.ReadPretty));break}default:{o["x-read-pretty"]=!1,o["x-disabled"]=!1,t.readPretty=!1,t.disabled=!1,se.set(t,"initStateOfLinkageRules.pattern",C.getTempFieldState(!0,C.ActionType.Editable));break}}}}}}},{name:"setValidationRules",useVisible(){const{form:e}=C.useFormBlockContext(),t=C.useIsFormReadPretty(),o=C.useValidateSchema();return e&&!t&&!!Object.keys(o||{}).length},components:{ArrayCollapse:he.ArrayCollapse,FormLayout:he.FormLayout},useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useValidateSchema(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),{getField:b}=C.useCollection_deprecated(),v=b(o.name)||r(o["x-collection-field"]),F=A.createForm({initialValues:{rules:o==null?void 0:o["x-validator"]}});return{type:"object",title:e("Set validation rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Set validation rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:F},properties:{rules:{type:"array","x-component":"ArrayCollapse","x-decorator":"FormItem","x-component-props":{accordion:!0},maxItems:3,items:{type:"object","x-component":"ArrayCollapse.CollapsePanel","x-component-props":{header:'{{ t("Validation rule") }}'},properties:{index:{type:"void","x-component":"ArrayCollapse.Index"},layout:{type:"void","x-component":"FormLayout","x-component-props":{labelStyle:{marginTop:"6px"},labelCol:8,wrapperCol:16},properties:W(k({},f),{message:{type:"string",title:'{{ t("Error message") }}',"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{autoSize:{minRows:2,maxRows:2}}}})},remove:{type:"void","x-component":"ArrayCollapse.Remove"},moveUp:{type:"void","x-component":"ArrayCollapse.MoveUp"},moveDown:{type:"void","x-component":"ArrayCollapse.MoveDown"}}},properties:{add:{type:"void",title:'{{ t("Add validation rule") }}',"x-component":"ArrayCollapse.Addition","x-reactions":{dependencies:["rules"],fulfill:{state:{disabled:"{{$deps[0].length >= 3}}"}}}}}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const _=A.useForm(),n=C.useActionContext();return{onClick(){return ie(this,null,function*(){var l;const h=[];let s=_.values.rules;for(const i of s)h.push(se.pickBy(i,se.identity));if(o["x-uid"],["percent"].includes(v==null?void 0:v.interface))for(const i of h)(i.maxValue||i.minValue)&&(i.percentMode=!0),i.percentFormat&&(i.percentFormats=!0);const a=se.concat([],((l=v==null?void 0:v.uiSchema)==null?void 0:l["x-validator"])||[],h);t.validator=a,o["x-validator"]=h,n.setVisible(!1)})}}}}}}}}}}}}]}),Mp=e=>{const{collectionName:t}=e,{t:o}=Z(),[f,r]=V.useState(null),b=(f==null?void 0:f.schema["x-uid"])||null,[v,F]=V.useState(!1),_=()=>{F(!1),r(null)},n=A.useFieldSchema();return D.jsxs("div",{children:[D.jsx(C.SchemaSettingsItem,{title:o("Open editable page"),onClick:()=>{var a;const u=se.cloneDeep(n.toJSON());Rp(u);const h=Np(u),s=new A.Schema(h);r({schema:s,item:{name:((a=n["x-decorator-props"])==null?void 0:a.collection)||t}}),F(!0)}}),D.jsx(Sn,{children:D.jsx(Fn,{children:D.jsx(Pn,{open:v,onCancel:_,options:f},b)})})]})};function Rp(e){const t=o=>{if(!(!o||typeof o!="object")&&(o["x-uid"]&&(o["x-uid"]=A.uid()),o["x-toolbar"]==="FormItemSchemaToolbar"&&(o["x-toolbar"]="EditableFormItemSchemaToolbar"),o["x-component"]==="CardItem"&&o["x-toolbar"]==="BlockSchemaToolbar"&&(o["x-toolbar"]="EditableFormToolbar",o["x-settings"]=void 0),o["x-component"]==="Grid"&&(o["x-component"]="EditableGrid",o["x-initializer"]=void 0),o["x-component"]==="Grid.Col"&&(o["x-component"]="EditableGrid.Col"),o["x-component"]==="Grid.Row"&&(o["x-component"]="EditableGrid.Row"),o["x-component"]==="ActionBar"&&o["x-initializer"]==="createForm:configureActions"&&(o["x-initializer"]=void 0,o.properties=void 0),o.properties))for(const f of Object.keys(o.properties))t(o.properties[f])};t(e)}const Np=e=>({type:"void","x-component":"Grid.Row",properties:{[A.uid()]:{type:"void","x-component":"Grid.Col","x-component-props":{width:"100%"},properties:{[e.name||A.uid()]:e}}}}),Tp=e=>{var te;const{templateWrap:t,onCreateBlockSchema:o,componentType:f,icon:r=Me.TableOutlined,name:b,title:v,filter:F,onlyCurrentDataSource:_,hideSearch:n,showAssociationFields:u,hideChildrenIfSingleCollection:h,filterDataSource:s,items:a,fromOthersInPopup:l,hideOtherRecordsInPopup:i}=e,c=C.useAPIClient(),{getTemplate:p,templates:d,refreshCM:y}=C.useCollectionManager_deprecated(),{t:m}=Z(),{insert:g,setVisible:x}=C.useSchemaInitializer(),P=C.useCompile(),{getTemplateSchemaByMode:S}=C.useSchemaTemplateManager(),j=V.useCallback(re=>ie(null,[re],function*({item:Y}){if(Y.template){const ae=yield S(Y);g(t?t(ae,{item:Y,fromOthersInPopup:l}):ae)}else o&&o({item:Y,fromOthersInPopup:l});x(!1)}),[l,S,g,o,x,t]),O=a||C.useCollectionDataSourceItems({componentName:f,filter:F,filterDataSource:s,onlyCurrentDataSource:_,showAssociationFields:u,dataBlockInitializerProps:e,hideOtherRecordsInPopup:i}),w=C.useGetSchemaInitializerMenuItems(j),I=V.useMemo(()=>w(O,b),[w,O,b]),[E,R]=V.useState([]),N=C.useMenuSearch({data:I,openKeys:E,hideSearch:n}),L=V.useMemo(()=>{const Y=new Set(["sql","view","import","importXlsx"]);return d.filter(re=>!Y.has(re.name)&&!re.divider).map(re=>({label:P(re.title),key:re.name,onClick:ae=>ie(null,null,function*(){const z=p(ae.key),B=k({name:`t_${A.uid()}`,title:"{{t('Untitle collection')}}",template:z.name,autoGenId:!0,createdAt:!0,createdBy:!0,updatedAt:!0,updatedBy:!0,view:!1},(()=>{const U=se.cloneDeep(z.default)||{},J=Array.isArray(U.fields)?U.fields:[];return W(k({},U),{fields:[...J,...kp]})})());yield c.resource("collections").create({values:k({logging:!0},B)}),x(!1),yield y(),o&&o({item:{name:B.name,dataSource:"main",title:B.title},fromOthersInPopup:l})})}))},[d]),K=V.useMemo(()=>{let Y=N.filter(re=>re.key!=="search"&&re.key!=="empty");return h&&Y.length===1?Y=Y[0].children:Y=N,b==="formDesign"&&!_&&(Y=[{key:"create-collection",label:m("Create collection"),children:L},...Y]),[{key:b,label:P(v),icon:typeof r=="string"?D.jsx(Me,{type:r}):r,onClick:re=>{re.key===b&&j(W(k({},re),{item:e}))},children:Y}]},[N,h,b,P,v,r,j,e]);return I.length>1||I.length===1&&((te=I[0].children)==null?void 0:te.length)>0?D.jsx(C.SchemaInitializerMenu,{onOpenChange:Y=>{R(Y)},items:K}):D.jsx(C.SchemaInitializerItem,W(k({},e),{onClick:j}))},kp=[{name:"id",type:"bigInt",autoIncrement:!0,primaryKey:!0,allowNull:!1,uiSchema:{type:"number",title:'{{t("ID")}}',"x-component":"InputNumber","x-read-pretty":!0},interface:"integer"},{name:"createdAt",interface:"createdAt",type:"date",field:"createdAt",uiSchema:{type:"datetime",title:'{{t("Created at")}}',"x-component":"DatePicker","x-component-props":{},"x-read-pretty":!0}},{name:"createdBy",interface:"createdBy",type:"belongsTo",target:"users",foreignKey:"createdById",uiSchema:{type:"object",title:'{{t("Created by")}}',"x-component":"AssociationField","x-component-props":{fieldNames:{value:"id",label:"nickname"}},"x-read-pretty":!0}},{type:"date",field:"updatedAt",name:"updatedAt",interface:"updatedAt",uiSchema:{type:"string",title:'{{t("Last updated at")}}',"x-component":"DatePicker","x-component-props":{},"x-read-pretty":!0}},{type:"belongsTo",target:"users",foreignKey:"updatedById",name:"updatedBy",interface:"updatedBy",uiSchema:{type:"object",title:'{{t("Last updated by")}}',"x-component":"AssociationField","x-component-props":{fieldNames:{value:"id",label:"nickname"}},"x-read-pretty":!0}}],Vp=({filterCollections:e,onlyCurrentDataSource:t,hideSearch:o,createBlockSchema:f,componentType:r="FormItem",templateWrap:b,showAssociationFields:v,hideChildrenIfSingleCollection:F,hideOtherRecordsInPopup:_,currentText:n,otherText:u})=>{const[h,s]=V.useState(!1),[a,l]=V.useState(null),i=(a==null?void 0:a.schema["x-uid"])||null,c=C.useSchemaInitializerItem(),{templateWrap:p,createEditFormBlock:d}=Bp(),y=V.useCallback(g=>{if(f)return f(g);const x=new A.Schema(d(g));l(k({schema:x},g)),s(!0)},[]),m=()=>{s(!1),l(null)};return D.jsxs(D.Fragment,{children:[D.jsx(Tp,W(k({},c),{icon:D.jsx(Me.FormOutlined,{}),componentType:r,templateWrap:(g,x)=>b?b(g,x):p(g,x),onCreateBlockSchema:y,filter:e,onlyCurrentDataSource:t,hideSearch:o,showAssociationFields:v,hideChildrenIfSingleCollection:F,hideOtherRecordsInPopup:_,currentText:n,otherText:u})),D.jsx(Sn,{children:D.jsx(Fn,{children:D.jsx(Pn,{open:h,onCancel:m,options:a},i)})})]})},Bp=()=>{const e=C.useAssociationName(),{isCusomeizeCreate:t}=C.useSchemaInitializerItem();return{templateWrap:(r,{item:b})=>{const v=C.createCreateFormBlockUISchema({isCusomeizeCreate:t,dataSource:b.dataSource,templateSchema:r,collectionName:b.name,association:e});return b.template&&b.mode==="reference"&&(v["x-template-key"]=b.template.key),v},createEditFormBlock:({item:r,fromOthersInPopup:b})=>{const v=mc(b?{collectionName:r.collectionName||r.name,dataSource:r.dataSource,isCusomeizeCreate:!0}:e?{association:e,dataSource:r.dataSource,isCusomeizeCreate:t}:{collectionName:r.collectionName||r.name,dataSource:r.dataSource,isCusomeizeCreate:t});return Lp(v)}}},Lp=e=>({type:"void","x-component":"Grid.Row",properties:{[A.uid()]:{type:"void","x-component":"Grid.Col",properties:{[e.name||A.uid()]:e}}}}),hc={type:"subMenu",name:Oc,title:Cc("Form design"),icon:D.jsx(C.Icon,{type:"FormOutlined"}),Component:Vp},Up=V.createContext({visible:!1,setVisible:()=>{}}).Provider,Gp=e=>{const[t,o]=V.useState(!1),{children:f}=e,[r,b]=V.useState(null),v=(r==null?void 0:r.schema["x-uid"])||null,F=()=>{o(!1),b(null)};return D.jsxs(D.Fragment,{children:[D.jsx(Up,{value:{visible:t,setVisible:o},children:f}),Fc.createPortal(D.jsx(Sn,{children:D.jsx(Fn,{children:D.jsx(Pn,{open:t,onCancel:F,options:r},v)})}),document.body)]})},bc={name:"openEditablePage",Component:"SchemaSettingsEditablePage",useComponentProps(){const{name:e}=C.useCollection_deprecated();return{collectionName:e}}};class Hp extends C.Plugin{afterAdd(){return ie(this,null,function*(){this.editableSchemaSettingsManager=new Pc([],this.app)})}beforeLoad(){return ie(this,null,function*(){})}load(){return ie(this,null,function*(){this.app.addProvider(Sc,{editableSchemaSettingsManager:this.editableSchemaSettingsManager}),this.app.addProvider(Gp),this.app.schemaInitializerManager.addItem("page:addBlock","otherBlocks.formDesign",hc),this.app.addComponents({SchemaSettingsEditablePage:Mp}),this.app.schemaInitializerManager.addItem("popup:common:addBlock","otherBlocks.formDesign",hc),this.app.addComponents({EditableFormToolbar:dp,EditableFormItemSchemaToolbar:mp}),this.editableSchemaSettingsManager.add(Dp),this.editableSchemaSettingsManager.add(yp),this.editableSchemaSettingsManager.add(Op),this.editableSchemaSettingsManager.add(Hc),this.editableSchemaSettingsManager.add(Ic),this.editableSchemaSettingsManager.add(Tc),this.editableSchemaSettingsManager.add(qc),this.editableSchemaSettingsManager.add(Kc),this.editableSchemaSettingsManager.add(Lc),this.editableSchemaSettingsManager.add(Gc),this.editableSchemaSettingsManager.add(Uc),this.editableSchemaSettingsManager.add(Jc),this.editableSchemaSettingsManager.add(Zc),this.editableSchemaSettingsManager.add(Qc),this.editableSchemaSettingsManager.add(kc),this.editableSchemaSettingsManager.add(Ec),this.editableSchemaSettingsManager.add(Mc),this.editableSchemaSettingsManager.add(Vc),this.editableSchemaSettingsManager.add(Wc),this.editableSchemaSettingsManager.add(wc),this.app.schemaSettingsManager.addItemWithIndex({schemaSettingName:"blockSettings:createForm",itemName:bc.name,index:-2,data:bc}),yield Promise.resolve().then(()=>Wp)})}getEditableSchemaSettingsManager(){return this.editableSchemaSettingsManager}}const zp=e=>D.jsxs("svg",W(k({},e),{width:"219",height:"218",viewBox:"0 0 219 218",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[D.jsx("path",{d:"M4.2816 99.864L70.9877 71.8281H116.988L214.488 128.828C218.488 131.828 219.155 136.495 216.988 137.328L128.488 174.828C121.488 177.828 118.322 176.495 115.488 174.828L4.41681 111.709C2.81124 110.796 1.23888 109.66 0.531744 107.954C-0.30041 105.947 -0.0478721 104.171 0.551281 102.838C1.22657 101.335 2.76274 100.502 4.2816 99.864Z",fill:"#DEDEDE",fillOpacity:"0.2"}),D.jsx("path",{d:"M0.376681 65.9979L0.108494 60.0978C0.0519414 58.8536 1.13401 57.8609 2.36869 58.0243L216.461 86.3431C217.512 86.4822 218.272 87.4178 218.193 88.4754L217.725 94.7123C217.587 96.5574 216.44 98.1752 214.746 98.9179L128.5 136.711C122.5 139.511 118 137.878 116.5 136.711L2.84293 70.0844C1.38179 69.2278 0.453587 67.6899 0.376681 65.9979Z",fill:"#CBCCCE"}),D.jsx("path",{d:"M4.29332 52.7469L70.9995 24.7109H117L214.5 81.7109C218.5 84.7109 219.167 89.3776 217 90.2109L128.5 127.711C121.5 130.711 118.333 129.378 115.5 127.711L4.42853 64.5913C2.82296 63.6789 1.2506 62.5432 0.543462 60.8373C-0.288692 58.8297 -0.0361534 57.0538 0.563 55.7204C1.23829 54.2176 2.77446 53.3852 4.29332 52.7469Z",fill:"#EDEDED"}),D.jsx("line",{x1:"41.7357",y1:"64.8907",x2:"108.794",y2:"36.6564",stroke:"white",strokeOpacity:"0.6"}),D.jsx("path",{d:"M64.9704 77.8334L97.6662 63.8459",stroke:"white",strokeOpacity:"0.6"}),D.jsx("line",{x1:"94.5091",y1:"93.1251",x2:"161.568",y2:"64.8907",stroke:"white",strokeOpacity:"0.6"}),D.jsx("line",{x1:"117.744",y1:"106.07",x2:"158.33",y2:"89.0117",stroke:"white",strokeOpacity:"0.6"}),D.jsx("g",{filter:"url(#filter0_f_6664_1383)",children:D.jsx("path",{d:"M91.6152 49.8774C76.853 58.0786 75.8379 72.9399 89.3477 83.0723C102.858 93.2047 125.775 94.7702 140.537 86.5689C155.299 78.3677 156.315 63.5064 142.805 53.374C129.295 43.2416 106.377 41.6762 91.6152 49.8774ZM132.884 61.7904L120.733 68.5413L131.854 76.8817C133.084 77.8044 132.991 79.1547 131.647 79.9015C130.303 80.6483 128.221 80.506 126.991 79.5834L115.87 71.2429L103.724 77.9904C102.38 78.7372 100.298 78.595 99.0677 77.6723C97.8376 76.7497 97.9298 75.3994 99.274 74.6526L111.425 67.9018L100.31 59.5654C99.0801 58.6428 99.1724 57.2924 100.517 56.5457C101.861 55.7989 103.943 55.9411 105.173 56.8637L116.294 65.2042L128.445 58.4534C129.79 57.7066 131.872 57.8489 133.102 58.7715C134.321 59.6933 134.223 61.047 132.884 61.7904Z",fill:"#2662D3",fillOpacity:"0.1"})}),D.jsx("g",{filter:"url(#filter1_d_6664_1383)",children:D.jsx("path",{d:"M93.8252 10.683C83.2036 16.5839 82.4732 27.2768 92.1938 34.5672C101.914 41.8576 118.404 42.9839 129.025 37.083C139.647 31.1822 140.377 20.4893 130.657 13.1989C120.936 5.90851 104.447 4.78217 93.8252 10.683ZM123.519 19.2546L114.776 24.1119L122.777 30.113C123.662 30.7768 123.596 31.7484 122.629 32.2857C121.662 32.823 120.163 32.7207 119.278 32.0569L111.277 26.0558L102.538 30.9107C101.571 31.448 100.073 31.3457 99.1874 30.6818C98.3023 30.018 98.3687 29.0464 99.3358 28.5091L108.079 23.6518L100.081 17.6537C99.1963 16.9898 99.2627 16.0182 100.23 15.4809C101.197 14.9436 102.695 15.046 103.58 15.7098L111.582 21.7109L120.325 16.8536C121.292 16.3163 122.79 16.4186 123.676 17.0824C124.552 17.7457 124.482 18.7197 123.519 19.2546Z",fill:"#3279FE"})}),D.jsx("path",{d:"M99.8076 15.7742C101.003 14.6704 102.694 15.118 103.312 15.5003L111.58 21.7031L120.201 16.9102C121.322 16.2461 122.66 16.5388 123.26 16.7917C124.549 17.551 124.399 18.3625 124.042 18.8377C123.903 19.0238 123.7 19.1467 123.497 19.2601L114.805 24.119L122.627 29.9871C122.904 30.1954 123.184 30.4267 123.31 30.7498C123.667 31.6621 122.8 32.3149 122.219 32.5084C121.17 32.7852 120.229 32.6992 119.623 32.3477L111.279 26.0662L103.143 30.584C101.68 31.5994 100.522 31.4289 99.9247 31.1607C97.7101 30.1668 98.5893 28.9654 99.2677 28.5137L108.062 23.6955L99.7465 17.406C99.002 16.8084 99.5816 15.9238 99.8076 15.7742Z",fill:"white"}),D.jsx("path",{d:"M33.176 202.889H37.418C37.572 202.217 37.698 201.517 37.81 200.803L38.818 200.929C38.706 201.615 38.594 202.273 38.454 202.889H45.398V203.869H38.216C37.908 205.031 37.53 206.095 37.11 207.075H44.278V208.041H40.862V212.311H45.412V213.291H35.206V212.311H39.84V208.041H36.648C35.752 209.749 34.646 211.121 33.33 212.171L32.812 211.247C34.856 209.511 36.312 207.047 37.18 203.869H33.176V202.889ZM54.988 201.587V210.113H54.092V202.455H51.376V210.169H50.48V201.587H54.988ZM53.546 210.743C54.33 211.499 54.974 212.255 55.506 213.011L54.806 213.711C54.358 212.969 53.728 212.185 52.93 211.345L53.546 210.743ZM52.342 203.169H53.154V207.649C53.126 209.287 52.888 210.589 52.44 211.569C51.992 212.479 51.278 213.193 50.298 213.697L49.78 212.885C50.732 212.395 51.39 211.751 51.782 210.939C52.118 210.099 52.314 208.993 52.342 207.649V203.169ZM48.156 205.927C47.792 206.515 47.4 207.089 46.98 207.621L46.658 206.571C47.862 204.891 48.73 202.973 49.276 200.803L50.158 201.209C49.864 202.273 49.5 203.267 49.08 204.191V213.711H48.156V205.927ZM57.816 213.585H56.304L56.094 212.647C56.57 212.689 57.032 212.717 57.48 212.717C57.844 212.717 58.026 212.507 58.026 212.101V200.901H59.006V212.339C59.006 213.165 58.6 213.585 57.816 213.585ZM55.968 202.147H56.85V210.827H55.968V202.147ZM62.394 213.571H61.218L61.008 212.619C61.372 212.661 61.722 212.689 62.058 212.689C62.45 212.689 62.646 212.465 62.646 212.045V208.769C62.086 208.965 61.526 209.161 60.966 209.329L60.714 208.321C61.372 208.167 62.016 207.985 62.646 207.761V204.513H60.938V203.547H62.646V200.901H63.626V203.547H64.984V204.513H63.626V207.383C64.13 207.159 64.634 206.921 65.124 206.669V207.691C64.634 207.943 64.13 208.167 63.626 208.377V212.297C63.626 213.137 63.206 213.571 62.394 213.571ZM67.196 203.421C66.692 204.401 66.118 205.269 65.488 206.025L64.83 205.255C65.838 204.121 66.65 202.637 67.28 200.817L68.204 201.013C68.036 201.517 67.84 201.993 67.644 202.455H73.202V203.421H67.196ZM72.684 205.017C72.684 207.467 72.614 208.951 72.502 209.469C72.39 209.973 71.886 210.239 71.004 210.239H70.64L70.374 209.357C70.682 209.357 70.948 209.371 71.172 209.371C71.452 209.371 71.62 209.231 71.676 208.979C71.732 208.727 71.76 207.831 71.774 206.263L69.94 206.879V211.205H69.044V207.173L67.49 207.691V211.821C67.49 212.297 67.686 212.549 68.078 212.549H71.116C71.592 212.549 71.942 212.451 72.166 212.283C72.362 212.087 72.502 211.443 72.572 210.351L73.454 210.645C73.342 211.961 73.146 212.759 72.866 213.039C72.572 213.319 72.04 213.459 71.27 213.459H67.854C67 213.459 66.58 212.955 66.58 211.947V207.999L65.502 208.363V207.467L66.58 207.103V205.115H67.49V206.795L69.044 206.263V204.135H69.94V205.955L72.684 205.017ZM79.992 202.259H82.82V200.887H83.772V202.259H86.698V208.251H83.828C83.856 208.867 83.926 209.441 84.038 209.945L84.08 210.155C84.85 209.707 85.522 209.231 86.082 208.699L86.852 209.259C86.138 209.945 85.312 210.547 84.36 211.079C84.472 211.415 84.612 211.695 84.78 211.947C85.116 212.381 85.41 212.605 85.662 212.605C86.054 212.605 86.404 211.891 86.684 210.491L87.51 211.009C87.104 212.745 86.53 213.613 85.774 213.613C85.256 213.599 84.752 213.305 84.276 212.745C83.982 212.395 83.744 211.975 83.548 211.499C82.26 212.087 80.776 212.577 79.124 212.941L78.704 212.031C80.44 211.667 81.952 211.191 83.226 210.589C83.198 210.533 83.184 210.477 83.184 210.421C83.016 209.777 82.918 209.049 82.862 208.251H79.992V202.259ZM85.76 207.355V205.717H83.772V206.907C83.772 207.061 83.772 207.215 83.786 207.355H85.76ZM82.82 207.355V205.717H80.944V207.355H82.82ZM80.944 204.849H82.82V203.183H80.944V204.849ZM83.772 203.183V204.849H85.76V203.183H83.772ZM76.492 213.543H75.288L75.078 212.591C75.456 212.619 75.82 212.647 76.156 212.647C76.562 212.647 76.772 212.451 76.772 212.059V208.671C76.184 208.909 75.596 209.119 74.994 209.315L74.742 208.321C75.442 208.153 76.114 207.943 76.772 207.691V204.401H74.966V203.435H76.772V200.873H77.738V203.435H79.264V204.401H77.738V207.299C78.298 207.047 78.844 206.781 79.376 206.487V207.467C78.844 207.747 78.298 208.013 77.738 208.265V212.311C77.738 213.123 77.318 213.543 76.492 213.543ZM89.652 205.115H94.79V209.385H89.652V205.115ZM93.796 208.475V206.053H90.66V208.475H93.796ZM95.224 210.183V211.163C93.362 211.667 91.346 212.101 89.19 212.451L88.938 211.457C91.122 211.177 93.208 210.757 95.224 210.183ZM99.942 213.655C99.242 213.641 98.584 213.193 97.94 212.297C97.744 212.031 97.576 211.751 97.436 211.457C96.652 212.409 95.784 213.165 94.846 213.725L94.3 212.857C95.294 212.255 96.19 211.443 96.974 210.407C96.778 209.875 96.624 209.301 96.484 208.685C96.162 207.257 95.994 205.577 95.98 203.645H88.938V202.665H95.98V200.873H96.988V202.665H99.046C98.808 202.161 98.542 201.685 98.262 201.265L99.284 201.097C99.536 201.559 99.788 202.077 100.026 202.665H101.384V203.645H97.002C97.03 205.353 97.156 206.865 97.394 208.181C97.478 208.615 97.562 209.021 97.674 209.399C98.458 208.111 99.116 206.585 99.648 204.821L100.53 205.297C99.872 207.411 99.06 209.175 98.08 210.603C98.22 210.925 98.36 211.219 98.514 211.471C99.004 212.199 99.438 212.563 99.83 212.563C100.166 212.563 100.46 211.765 100.698 210.169L101.566 210.743C101.188 212.675 100.642 213.655 99.942 213.655ZM108.44 200.887H109.434V202.245H114.866V203.197H109.434V204.975H113.9V209.469H104.632V204.975H108.44V200.887ZM112.892 208.531V205.927H105.64V208.531H112.892ZM104.604 210.085L105.458 210.491C104.926 211.709 104.324 212.759 103.624 213.655L102.798 213.053C103.498 212.227 104.1 211.233 104.604 210.085ZM107.656 210.491C107.936 211.415 108.188 212.423 108.412 213.501L107.404 213.725C107.208 212.577 106.984 211.569 106.718 210.687L107.656 210.491ZM110.582 210.351C111.002 211.303 111.366 212.353 111.674 213.473L110.68 213.697C110.4 212.507 110.05 211.457 109.63 210.547L110.582 210.351ZM113.452 210.071C114.348 211.247 115.02 212.269 115.496 213.137L114.656 213.725C114.166 212.773 113.494 211.737 112.64 210.589L113.452 210.071ZM118.072 202.931H122.65V200.957H123.686V202.931H128.208V203.897H123.686V206.221H129.356V207.201H123.686V212.143H126.99V208.419H127.956V213.725H126.99V213.081H118.394V208.419H119.36V212.143H122.65V207.201H116.994V206.221H122.65V203.897H118.072V202.931ZM134.788 201.419H142.614V202.357H138.806C138.666 202.987 138.512 203.575 138.316 204.121H143.23V205.087H140.29C141.018 206.221 142.138 207.117 143.65 207.761L143.216 208.643C141.354 207.733 140.038 206.543 139.268 205.087H137.924C137.784 205.367 137.644 205.619 137.504 205.871C136.79 206.949 135.726 207.915 134.326 208.769L133.696 207.971C135.026 207.243 136.02 206.361 136.692 205.353C136.748 205.255 136.804 205.171 136.86 205.087H134.144V204.121H137.308C137.532 203.561 137.686 202.973 137.798 202.357H134.788V201.419ZM135.642 208.811L136.482 209.217C135.964 210.645 135.362 211.891 134.676 212.941L133.85 212.353C134.536 211.359 135.138 210.183 135.642 208.811ZM131.806 201.069C132.674 201.671 133.416 202.273 134.004 202.889L133.318 203.575C132.786 203.001 132.044 202.385 131.106 201.741L131.806 201.069ZM131.47 204.415C132.366 205.101 133.108 205.787 133.71 206.473L133.024 207.159C132.478 206.515 131.736 205.815 130.784 205.087L131.47 204.415ZM132.744 208.279L133.626 208.629C133.066 210.393 132.436 212.059 131.764 213.627L130.826 213.207C131.554 211.611 132.198 209.959 132.744 208.279ZM137.476 213.711H136.174L135.964 212.759C136.37 212.801 136.762 212.829 137.126 212.829C137.406 212.829 137.56 212.633 137.56 212.269V207.145H138.526V212.507C138.526 213.305 138.176 213.711 137.476 213.711ZM141.802 208.475C142.46 209.721 143.034 211.051 143.51 212.465L142.614 212.857C142.096 211.317 141.536 209.945 140.92 208.769L141.802 208.475ZM139.954 208.979C140.542 210.211 141.046 211.527 141.48 212.927L140.584 213.333C140.136 211.793 139.646 210.449 139.1 209.273L139.954 208.979ZM156.922 202.945V213.487H155.942V212.549H153.31V213.487H152.344V202.945H156.922ZM153.31 211.583H155.942V203.911H153.31V211.583ZM147.192 200.901H148.2V203.729H151.056C151.056 208.097 150.986 210.799 150.846 211.835C150.706 212.983 150.02 213.571 148.788 213.571C148.578 213.571 148.228 213.543 147.724 213.515L147.472 212.591C147.92 212.619 148.312 212.647 148.648 212.647C149.362 212.647 149.782 212.241 149.894 211.443C149.978 210.715 150.034 208.461 150.062 204.709H148.2C148.144 208.839 147.22 211.849 145.428 213.753L144.686 213.095C146.31 211.345 147.15 208.545 147.192 204.709H144.952V203.729H147.192V200.901ZM171.104 202.301V205.423H170.096V203.267H160.24V205.423H159.232V202.301H164.734C164.538 201.797 164.328 201.349 164.104 200.943L165.252 200.747C165.448 201.209 165.644 201.727 165.826 202.301H171.104ZM161.388 204.779H168.906V205.717C167.996 206.361 166.974 206.977 165.854 207.593V208.531H171.37V209.511H165.854V212.479C165.854 213.249 165.448 213.641 164.636 213.641H162.914L162.676 212.717C163.166 212.731 163.698 212.745 164.286 212.745C164.65 212.745 164.832 212.535 164.832 212.129V209.511H158.98V208.531H164.832V207.159C165.966 206.571 166.82 206.081 167.394 205.717H161.388V204.779ZM174.87 205.283V207.019H177.992V207.929H174.87V210.113C176.284 209.973 177.488 209.791 178.482 209.539V210.477C177.586 210.701 176.382 210.897 174.87 211.079V213.613H173.89V211.191L172.938 211.275L172.784 210.267C173.162 210.239 173.526 210.225 173.89 210.197V202.021C175.598 201.769 176.984 201.405 178.076 200.915L178.58 201.769C177.488 202.203 176.242 202.539 174.87 202.763V204.359H177.992V205.283H174.87ZM178.776 206.879H184.6V207.761C184.208 209.077 183.592 210.197 182.724 211.121C183.508 211.779 184.488 212.353 185.664 212.857L185.118 213.725C183.886 213.151 182.878 212.493 182.066 211.765C181.086 212.605 179.896 213.263 178.482 213.753L177.922 212.899C179.294 212.423 180.428 211.793 181.324 211.037C180.456 210.085 179.882 209.007 179.574 207.803H178.776V206.879ZM180.498 207.803C180.778 208.769 181.268 209.637 181.982 210.407C182.696 209.651 183.228 208.783 183.592 207.803H180.498ZM179.84 201.391H183.774V204.373C183.774 204.751 183.956 204.947 184.32 204.947H185.482V205.857H184.068C183.214 205.857 182.794 205.423 182.794 204.583V202.329H180.834V203.183C180.834 204.527 180.246 205.577 179.07 206.305L178.398 205.549C179.35 205.017 179.84 204.261 179.84 203.281V201.391Z",fill:"#767A7F"}),D.jsxs("defs",{children:[D.jsxs("filter",{id:"filter0_f_6664_1383",x:"69.8438",y:"34.6172",width:"92.4648",height:"67.2109",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[D.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),D.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),D.jsx("feGaussianBlur",{stdDeviation:"5",result:"effect1_foregroundBlur_6664_1383"})]}),D.jsxs("filter",{id:"filter1_d_6664_1383",x:"85.3555",y:"6.89844",width:"52.1387",height:"39.9688",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[D.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),D.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),D.jsx("feOffset",{dy:"6"}),D.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),D.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.14902 0 0 0 0 0.384314 0 0 0 0 0.827451 0 0 0 1 0"}),D.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_6664_1383"}),D.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_6664_1383",result:"shape"})]})]})]})),Jp=e=>D.jsx(C.Icon,k({component:zp},e));C.Icon.register({"add-fields":Jp});const Wp=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));ue.default=Hp,Object.defineProperties(ue,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
194
+ `})),Mp=new _e({name:"editableFieldSettings:FormItem",items:[{name:"editFieldTitle",useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),{getCollectionJoinField:f}=C.useCollectionManager_deprecated(),{getField:r}=C.useCollection_deprecated();return r(o.name)||f(o["x-collection-field"]),{type:"string",title:e("Edit field title"),default:t==null?void 0:t.title,"x-decorator":"FormItem","x-component":"Input","x-component-props":{onChange(b){var F;const v=(F=b==null?void 0:b.target)==null?void 0:F.value;t.title=v,o.title=v}}}}},{name:"displayTitle",useSchema(){var f,r;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:(r=(f=o["x-decorator-props"])==null?void 0:f.showTitle)!=null?r:!0,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Display title")}}',"x-component-props":{onInput:b=>{var F,_;const v=(_=(F=b==null?void 0:b.target)==null?void 0:F.checked)!=null?_:!1;o["x-decorator-props"]=o["x-decorator-props"]||{},o["x-decorator-props"].showTitle=v,t.decoratorProps.showTitle=v}}}}},{name:"editDescription",useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"string",title:e("Edit description"),default:t==null?void 0:t.description,"x-decorator":"FormItem","x-component":"Input","x-component-props":{onChange(f){var b;const r=(b=f==null?void 0:f.target)==null?void 0:b.value;t.description=r,o.description=r}}}}},{name:"editTooltip",useSchema(){var f;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"string",title:e("Edit tooltip"),default:(f=o==null?void 0:o["x-decorator-props"])==null?void 0:f.tooltip,"x-decorator":"FormItem","x-component":"Input","x-component-props":{onChange(r){var v;const b=(v=r==null?void 0:r.target)==null?void 0:v.value;t.decoratorProps.tooltip=b,o["x-decorator-props"]=o["x-decorator-props"]||{},o["x-decorator-props"].tooltip=b}}}}},{name:"required",useVisible(){const e=A.useField(),t=A.useFieldSchema(),{required:o=!0}=C.useSchemaToolbar();return!e.readPretty&&t["x-component"]!=="FormField"&&o},useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();return{type:"boolean",default:o.required,"x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Required")}}',"x-component-props":{onInput:f=>{var b,v;const r=(v=(b=f==null?void 0:f.target)==null?void 0:b.checked)!=null?v:!1;o["x-uid"],t.required=r,o.required=r}}}}},{name:"setDefaultValue",components:{ArrayCollapse:he.ArrayCollapse,FormLayout:he.FormLayout,VariableInput:e=>{const{isInSubForm:t,isInSubTable:o}=C.useFlag()||{};return D.jsx(C.FlagProvider,{isInSubForm:t,isInSubTable:o,isInSetDefaultValueDialog:!0,children:D.jsx(C.VariableInput,T({},e))})}},useSchema(){var j,O,w;const{styles:e}=Dp(),t=A.useFieldSchema(),o=A.useField(),{t:f}=Z(),r=C.useActionContext();let b;const{getField:v}=C.useCollection_deprecated(),{getCollectionJoinField:F,getCollectionFields:_,getAllCollectionsInheritChain:n}=C.useCollectionManager_deprecated(),c=C.useVariables(),h=C.useLocalVariables(),s=C.useCollection_deprecated(),a=C.useRecord(),{form:u}=C.useFormBlockContext(),{getFields:i}=C.useCollectionFilterOptionsV2(s),{name:l}=s,p=V.useMemo(()=>v(t.name)||F(t["x-collection-field"]),[t,F,v]),d=se.omit(t,"required");p!=null&&p.target&&(b=F(`${p.target}.${((O=(j=t["x-component-props"])==null?void 0:j.fieldNames)==null?void 0:O.label)||"id"}`));const y=(p==null?void 0:p.interface)==="m2o"&&C.findParentFieldSchema(t),m=y&&F(y==null?void 0:y["x-collection-field"]),g=C.useTableBlockContext(),x=((w=r==null?void 0:r.fieldSchema)==null?void 0:w["x-action"])==="customize:create"&&((p==null?void 0:p.interface)==="m2m"||(m==null?void 0:m.type)==="hasMany"&&(p==null?void 0:p.interface)==="m2o"),P=V.useCallback(I=>{const E=I.find(N=>N.value==="$nForm"),R=_(l);return!(R!=null&&R.length)&&E&&(E.children=C.formatVariableScop(i())),I},[i,l]),S=A.createForm({initialValues:{default:t==null?void 0:t.default}});return{type:"object",title:f("Set default value"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:f("Set default value"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:S},properties:{default:{"x-decorator":"FormItem","x-component":"VariableInput","x-component-props":W(T({},t==null?void 0:t["x-component-props"]),{collectionField:p,contextCollectionName:x&&g.collection,schema:p==null?void 0:p.uiSchema,targetFieldSchema:t,className:e.defaultInput,form:u,record:a,returnScope:P,shouldChange:C.getShouldChange({collectionField:p,variables:c,localVariables:h,getAllCollectionsInheritChain:n}),renderSchemaComponent:function(E){const R=se.cloneDeep(d)||{};R.title="",R.name="default",R["x-read-pretty"]=!1,R["x-disabled"]=!1;const N=t.default;p.target&&R["x-component-props"]&&(R["x-component-props"].mode="Select"),p!=null&&p.uiSchema.type&&(R.type=p.uiSchema.type),(p==null?void 0:p.uiSchema["x-component"])==="Checkbox"&&(se.set(R,"x-component-props.defaultChecked",N),R.type="void");const L=W(T({},R),{"x-decorator":"FormItem","x-component-props":W(T({},R["x-component-props"]),{collectionName:p==null?void 0:p.collectionName,targetField:b,onChange:E.onChange,defaultValue:C.isVariable(N)?"":N,style:{width:"100%",verticalAlign:"top",minWidth:"200px"}}),default:C.isVariable(N)?"":N});return D.jsx(C.FormProvider,{children:D.jsx(C.SchemaComponent,{schema:L})})}}),title:f("Default value")},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const I=A.useForm(),E=C.useActionContext();return{onClick(){return ie(this,null,function*(){var L;const N=I.values.default;t["x-uid"],o.value=N,t.default=N,!N&&N!==0&&(o.value=null),(L=E==null?void 0:E.setVisible)==null||L.call(E,!1)})}}}}}}}}}}}},{name:"layoutDirection",useSchema(){var b;const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),{layoutDirection:f="column"}=C.useContextConfigSetting();return{type:"string",title:'{{t("Layout Direction")}}',default:((b=o["x-decorator-props"])==null?void 0:b.layoutDirection)||f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Row"),value:"row"},{label:e("Column"),value:"column"}],onChange(v="column"){var n;const F=(n=o["x-decorator-props"])==null?void 0:n.style,_=W(T({},F),{display:"flex",flexDirection:v,alignItems:`${v==="row"?"baseline":"unset"}`});o["x-decorator-props"]=W(T({},o["x-decorator-props"]),{style:_,layoutDirection:v}),se.set(t,"decoratorProps.style",_),se.set(t,"decoratorProps.layoutDirection",v)}}}}},{name:"pattern",useVisible(){const{form:e}=C.useFormBlockContext(),t=A.useFieldSchema();return e&&!(e!=null&&e.readPretty)&&!C.isPatternDisabled(t)},useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema();let f="editable";return o["x-disabled"]===!0&&(f="readonly"),o["x-read-pretty"]===!0&&(f="read-pretty"),{type:"string",title:'{{t("Pattern")}}',default:f,"x-decorator":"FormItem","x-component":"Select","x-component-props":{allowClear:!1,showSearch:!1,options:[{label:e("Editable"),value:"editable"},{label:e("Readonly"),value:"readonly"},{label:e("Easy-reading"),value:"read-pretty"}],onChange(r){switch(o["x-uid"],r){case"readonly":{o["x-read-pretty"]=!1,o["x-disabled"]=!0,t.readPretty=!1,t.disabled=!0,se.set(t,"initStateOfLinkageRules.pattern",C.getTempFieldState(!0,C.ActionType.ReadOnly));break}case"read-pretty":{o["x-read-pretty"]=!0,o["x-disabled"]=!1,t.readPretty=!0,se.set(t,"initStateOfLinkageRules.pattern",C.getTempFieldState(!0,C.ActionType.ReadPretty));break}default:{o["x-read-pretty"]=!1,o["x-disabled"]=!1,t.readPretty=!1,t.disabled=!1,se.set(t,"initStateOfLinkageRules.pattern",C.getTempFieldState(!0,C.ActionType.Editable));break}}}}}}},{name:"setValidationRules",useVisible(){const{form:e}=C.useFormBlockContext(),t=C.useIsFormReadPretty(),o=C.useValidateSchema();return e&&!t&&!!Object.keys(o||{}).length},components:{ArrayCollapse:he.ArrayCollapse,FormLayout:he.FormLayout},useSchema(){const{t:e}=Z(),t=A.useField(),o=A.useFieldSchema(),f=C.useValidateSchema(),{getCollectionJoinField:r}=C.useCollectionManager_deprecated(),{getField:b}=C.useCollection_deprecated(),v=b(o.name)||r(o["x-collection-field"]),F=A.createForm({initialValues:{rules:o==null?void 0:o["x-validator"]}});return{type:"object",title:e("Set validation rules"),"x-decorator":"FormItem","x-component":"Action","x-component-props":{style:{width:"100%"}},properties:{modal:{type:"void","x-component":"Action.Modal","x-component-props":{fullScreenButton:!1},title:e("Set validation rules"),"x-decorator":"FormV2","x-decorator-props":{componentType:"div",form:F},properties:{rules:{type:"array","x-component":"ArrayCollapse","x-decorator":"FormItem","x-component-props":{accordion:!0},maxItems:3,items:{type:"object","x-component":"ArrayCollapse.CollapsePanel","x-component-props":{header:'{{ t("Validation rule") }}'},properties:{index:{type:"void","x-component":"ArrayCollapse.Index"},layout:{type:"void","x-component":"FormLayout","x-component-props":{labelStyle:{marginTop:"6px"},labelCol:8,wrapperCol:16},properties:W(T({},f),{message:{type:"string",title:'{{ t("Error message") }}',"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{autoSize:{minRows:2,maxRows:2}}}})},remove:{type:"void","x-component":"ArrayCollapse.Remove"},moveUp:{type:"void","x-component":"ArrayCollapse.MoveUp"},moveDown:{type:"void","x-component":"ArrayCollapse.MoveDown"}}},properties:{add:{type:"void",title:'{{ t("Add validation rule") }}',"x-component":"ArrayCollapse.Addition","x-reactions":{dependencies:["rules"],fulfill:{state:{disabled:"{{$deps[0].length >= 3}}"}}}}}},footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-use-component-props":()=>{const _=A.useForm(),n=C.useActionContext();return{onClick(){return ie(this,null,function*(){var u;const h=[];let s=_.values.rules;for(const i of s)h.push(se.pickBy(i,se.identity));if(o["x-uid"],["percent"].includes(v==null?void 0:v.interface))for(const i of h)(i.maxValue||i.minValue)&&(i.percentMode=!0),i.percentFormat&&(i.percentFormats=!0);const a=se.concat([],((u=v==null?void 0:v.uiSchema)==null?void 0:u["x-validator"])||[],h);t.validator=a,o["x-validator"]=h,n.setVisible(!1)})}}}}}}}}}}}}]}),Rp=e=>{const{collectionName:t}=e,{t:o}=Z(),[f,r]=V.useState(null),b=(f==null?void 0:f.schema["x-uid"])||null,[v,F]=V.useState(!1),_=()=>{F(!1),r(null)},n=A.useFieldSchema();return D.jsxs("div",{children:[D.jsx(C.SchemaSettingsItem,{title:o("Open editable page"),onClick:()=>{var a;const c=se.cloneDeep(n.toJSON());Np(c);const h=kp(c),s=new A.Schema(h);r({schema:s,item:{name:((a=n["x-decorator-props"])==null?void 0:a.collection)||t}}),F(!0)}}),D.jsx(Pn,{children:D.jsx(Sn,{children:D.jsx(On,{open:v,onCancel:_,options:f},b)})})]})};function Np(e){const t=o=>{if(!(!o||typeof o!="object")&&(o["x-uid"]&&(o["x-uid"]=A.uid()),o["x-toolbar"]==="FormItemSchemaToolbar"&&(o["x-toolbar"]="EditableFormItemSchemaToolbar"),o["x-component"]==="CardItem"&&o["x-toolbar"]==="BlockSchemaToolbar"&&(o["x-toolbar"]="EditableFormToolbar",o["x-settings"]=void 0),o["x-component"]==="Grid"&&(o["x-component"]="EditableGrid",o["x-initializer"]=void 0),o["x-component"]==="Grid.Col"&&(o["x-component"]="EditableGrid.Col"),o["x-component"]==="Grid.Row"&&(o["x-component"]="EditableGrid.Row"),o["x-component"]==="ActionBar"&&o["x-initializer"]==="createForm:configureActions"&&(o["x-initializer"]=void 0,o.properties=void 0),o.properties))for(const f of Object.keys(o.properties))t(o.properties[f])};t(e)}const kp=e=>({type:"void","x-component":"Grid.Row",properties:{[A.uid()]:{type:"void","x-component":"Grid.Col","x-component-props":{width:"100%"},properties:{[e.name||A.uid()]:e}}}}),Tp=e=>{var te;const{templateWrap:t,onCreateBlockSchema:o,componentType:f,icon:r=ke.TableOutlined,name:b,title:v,filter:F,onlyCurrentDataSource:_,hideSearch:n,showAssociationFields:c,hideChildrenIfSingleCollection:h,filterDataSource:s,items:a,fromOthersInPopup:u,hideOtherRecordsInPopup:i}=e,l=C.useAPIClient(),{getTemplate:p,templates:d,refreshCM:y}=C.useCollectionManager_deprecated(),{t:m}=Z(),{insert:g,setVisible:x}=C.useSchemaInitializer(),P=C.useCompile(),{getTemplateSchemaByMode:S}=C.useSchemaTemplateManager(),j=V.useCallback(re=>ie(null,[re],function*({item:Y}){if(Y.template){const ae=yield S(Y);g(t?t(ae,{item:Y,fromOthersInPopup:u}):ae)}else o&&o({item:Y,fromOthersInPopup:u});x(!1)}),[u,S,g,o,x,t]),O=a||C.useCollectionDataSourceItems({componentName:f,filter:F,filterDataSource:s,onlyCurrentDataSource:_,showAssociationFields:c,dataBlockInitializerProps:e,hideOtherRecordsInPopup:i}),w=C.useGetSchemaInitializerMenuItems(j),I=V.useMemo(()=>w(O,b),[w,O,b]),[E,R]=V.useState([]),N=C.useMenuSearch({data:I,openKeys:E,hideSearch:n}),L=V.useMemo(()=>{const Y=new Set(["sql","view","import","importXlsx"]);return d.filter(re=>!Y.has(re.name)&&!re.divider).map(re=>({label:P(re.title),key:re.name,onClick:ae=>ie(null,null,function*(){const z=p(ae.key),B=T({name:`t_${A.uid()}`,title:"{{t('Untitle collection')}}",template:z.name,autoGenId:!0,createdAt:!0,createdBy:!0,updatedAt:!0,updatedBy:!0,view:!1},(()=>{const U=se.cloneDeep(z.default)||{},J=Array.isArray(U.fields)?U.fields:[];return W(T({},U),{fields:[...J,...Vp]})})());yield l.resource("collections").create({values:T({logging:!0},B)}),x(!1),yield y(),o&&o({item:{name:B.name,dataSource:"main",title:B.title},fromOthersInPopup:u})})}))},[d]),q=V.useMemo(()=>{let Y=N.filter(re=>re.key!=="search"&&re.key!=="empty");return h&&Y.length===1?Y=Y[0].children:Y=N,b==="formDesign"&&!_&&(Y=[{key:"create-collection",label:m("Create collection"),children:L},...Y]),[{key:b,label:P(v),icon:typeof r=="string"?D.jsx(ke,{type:r}):r,onClick:re=>{re.key===b&&j(W(T({},re),{item:e}))},children:Y}]},[N,h,b,P,v,r,j,e]);return I.length>1||I.length===1&&((te=I[0].children)==null?void 0:te.length)>0?D.jsx(C.SchemaInitializerMenu,{onOpenChange:Y=>{R(Y)},items:q}):D.jsx(C.SchemaInitializerItem,W(T({},e),{onClick:j}))},Vp=[{name:"id",type:"bigInt",autoIncrement:!0,primaryKey:!0,allowNull:!1,uiSchema:{type:"number",title:'{{t("ID")}}',"x-component":"InputNumber","x-read-pretty":!0},interface:"integer"},{name:"createdAt",interface:"createdAt",type:"date",field:"createdAt",uiSchema:{type:"datetime",title:'{{t("Created at")}}',"x-component":"DatePicker","x-component-props":{},"x-read-pretty":!0}},{name:"createdBy",interface:"createdBy",type:"belongsTo",target:"users",foreignKey:"createdById",uiSchema:{type:"object",title:'{{t("Created by")}}',"x-component":"AssociationField","x-component-props":{fieldNames:{value:"id",label:"nickname"}},"x-read-pretty":!0}},{type:"date",field:"updatedAt",name:"updatedAt",interface:"updatedAt",uiSchema:{type:"string",title:'{{t("Last updated at")}}',"x-component":"DatePicker","x-component-props":{},"x-read-pretty":!0}},{type:"belongsTo",target:"users",foreignKey:"updatedById",name:"updatedBy",interface:"updatedBy",uiSchema:{type:"object",title:'{{t("Last updated by")}}',"x-component":"AssociationField","x-component-props":{fieldNames:{value:"id",label:"nickname"}},"x-read-pretty":!0}}],Bp=({filterCollections:e,onlyCurrentDataSource:t,hideSearch:o,createBlockSchema:f,componentType:r="FormItem",templateWrap:b,showAssociationFields:v,hideChildrenIfSingleCollection:F,hideOtherRecordsInPopup:_,currentText:n,otherText:c})=>{const[h,s]=V.useState(!1),[a,u]=V.useState(null),i=(a==null?void 0:a.schema["x-uid"])||null,l=C.useSchemaInitializerItem(),{templateWrap:p,createEditFormBlock:d}=Lp(),y=V.useCallback(g=>{if(f)return f(g);const x=new A.Schema(d(g));u(T({schema:x},g)),s(!0)},[]),m=()=>{s(!1),u(null)};return D.jsxs(D.Fragment,{children:[D.jsx(Tp,W(T({},l),{icon:D.jsx(ke.FormOutlined,{}),componentType:r,templateWrap:(g,x)=>b?b(g,x):p(g,x),onCreateBlockSchema:y,filter:e,onlyCurrentDataSource:t,hideSearch:o,showAssociationFields:v,hideChildrenIfSingleCollection:F,hideOtherRecordsInPopup:_,currentText:n,otherText:c})),D.jsx(Pn,{children:D.jsx(Sn,{children:D.jsx(On,{open:h,onCancel:m,options:a},i)})})]})},Lp=()=>{const e=C.useAssociationName(),{isCusomeizeCreate:t}=C.useSchemaInitializerItem();return{templateWrap:(r,{item:b})=>{const v=C.createCreateFormBlockUISchema({isCusomeizeCreate:t,dataSource:b.dataSource,templateSchema:r,collectionName:b.name,association:e});return b.template&&b.mode==="reference"&&(v["x-template-key"]=b.template.key),v},createEditFormBlock:({item:r,fromOthersInPopup:b})=>{const v=fc(b?{collectionName:r.collectionName||r.name,dataSource:r.dataSource,isCusomeizeCreate:!0}:e?{association:e,dataSource:r.dataSource,isCusomeizeCreate:t}:{collectionName:r.collectionName||r.name,dataSource:r.dataSource,isCusomeizeCreate:t});return Up(v)}}},Up=e=>({type:"void","x-component":"Grid.Row",properties:{[A.uid()]:{type:"void","x-component":"Grid.Col",properties:{[e.name||A.uid()]:e}}}}),bc={type:"subMenu",name:Cc,title:wc("Form design"),icon:D.jsx(C.Icon,{type:"FormOutlined"}),Component:Bp},Gp=V.createContext({visible:!1,setVisible:()=>{}}).Provider,Hp=e=>{const[t,o]=V.useState(!1),{children:f}=e,[r,b]=V.useState(null),v=(r==null?void 0:r.schema["x-uid"])||null,F=()=>{o(!1),b(null)};return D.jsxs(D.Fragment,{children:[D.jsx(Gp,{value:{visible:t,setVisible:o},children:f}),Sc.createPortal(D.jsx(Pn,{children:D.jsx(Sn,{children:D.jsx(On,{open:t,onCancel:F,options:r},v)})}),document.body)]})},vc={name:"openEditablePage",Component:"SchemaSettingsEditablePage",useComponentProps(){const{name:e}=C.useCollection_deprecated();return{collectionName:e}}};class zp extends C.Plugin{afterAdd(){return ie(this,null,function*(){this.editableSchemaSettingsManager=new Oc([],this.app)})}beforeLoad(){return ie(this,null,function*(){})}load(){return ie(this,null,function*(){this.app.addProvider(Pc,{editableSchemaSettingsManager:this.editableSchemaSettingsManager}),this.app.addProvider(Hp),this.app.schemaInitializerManager.addItem("page:addBlock","otherBlocks.formDesign",bc),this.app.addComponents({SchemaSettingsEditablePage:Rp}),this.app.schemaInitializerManager.addItem("popup:common:addBlock","otherBlocks.formDesign",bc),this.app.addComponents({EditableFormToolbar:mp,EditableFormItemSchemaToolbar:fp}),this.editableSchemaSettingsManager.add(Mp),this.editableSchemaSettingsManager.add(_p),this.editableSchemaSettingsManager.add(Cp),this.editableSchemaSettingsManager.add(zc),this.editableSchemaSettingsManager.add(Ac),this.editableSchemaSettingsManager.add(Tc),this.editableSchemaSettingsManager.add(Kc),this.editableSchemaSettingsManager.add(Zc),this.editableSchemaSettingsManager.add(Uc),this.editableSchemaSettingsManager.add(Hc),this.editableSchemaSettingsManager.add(Gc),this.editableSchemaSettingsManager.add(Wc),this.editableSchemaSettingsManager.add(Qc),this.editableSchemaSettingsManager.add(Xc),this.editableSchemaSettingsManager.add(Vc),this.editableSchemaSettingsManager.add(jc),this.editableSchemaSettingsManager.add(Rc),this.editableSchemaSettingsManager.add(Bc),this.editableSchemaSettingsManager.add(Yc),this.editableSchemaSettingsManager.add(Ec),this.app.schemaSettingsManager.addItemWithIndex({schemaSettingName:"blockSettings:createForm",itemName:vc.name,index:-2,data:vc}),yield Promise.resolve().then(()=>Yp)})}getEditableSchemaSettingsManager(){return this.editableSchemaSettingsManager}}const Jp=e=>D.jsxs("svg",W(T({},e),{width:"219",height:"218",viewBox:"0 0 219 218",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[D.jsx("path",{d:"M4.2816 99.864L70.9877 71.8281H116.988L214.488 128.828C218.488 131.828 219.155 136.495 216.988 137.328L128.488 174.828C121.488 177.828 118.322 176.495 115.488 174.828L4.41681 111.709C2.81124 110.796 1.23888 109.66 0.531744 107.954C-0.30041 105.947 -0.0478721 104.171 0.551281 102.838C1.22657 101.335 2.76274 100.502 4.2816 99.864Z",fill:"#DEDEDE",fillOpacity:"0.2"}),D.jsx("path",{d:"M0.376681 65.9979L0.108494 60.0978C0.0519414 58.8536 1.13401 57.8609 2.36869 58.0243L216.461 86.3431C217.512 86.4822 218.272 87.4178 218.193 88.4754L217.725 94.7123C217.587 96.5574 216.44 98.1752 214.746 98.9179L128.5 136.711C122.5 139.511 118 137.878 116.5 136.711L2.84293 70.0844C1.38179 69.2278 0.453587 67.6899 0.376681 65.9979Z",fill:"#CBCCCE"}),D.jsx("path",{d:"M4.29332 52.7469L70.9995 24.7109H117L214.5 81.7109C218.5 84.7109 219.167 89.3776 217 90.2109L128.5 127.711C121.5 130.711 118.333 129.378 115.5 127.711L4.42853 64.5913C2.82296 63.6789 1.2506 62.5432 0.543462 60.8373C-0.288692 58.8297 -0.0361534 57.0538 0.563 55.7204C1.23829 54.2176 2.77446 53.3852 4.29332 52.7469Z",fill:"#EDEDED"}),D.jsx("line",{x1:"41.7357",y1:"64.8907",x2:"108.794",y2:"36.6564",stroke:"white",strokeOpacity:"0.6"}),D.jsx("path",{d:"M64.9704 77.8334L97.6662 63.8459",stroke:"white",strokeOpacity:"0.6"}),D.jsx("line",{x1:"94.5091",y1:"93.1251",x2:"161.568",y2:"64.8907",stroke:"white",strokeOpacity:"0.6"}),D.jsx("line",{x1:"117.744",y1:"106.07",x2:"158.33",y2:"89.0117",stroke:"white",strokeOpacity:"0.6"}),D.jsx("g",{filter:"url(#filter0_f_6664_1383)",children:D.jsx("path",{d:"M91.6152 49.8774C76.853 58.0786 75.8379 72.9399 89.3477 83.0723C102.858 93.2047 125.775 94.7702 140.537 86.5689C155.299 78.3677 156.315 63.5064 142.805 53.374C129.295 43.2416 106.377 41.6762 91.6152 49.8774ZM132.884 61.7904L120.733 68.5413L131.854 76.8817C133.084 77.8044 132.991 79.1547 131.647 79.9015C130.303 80.6483 128.221 80.506 126.991 79.5834L115.87 71.2429L103.724 77.9904C102.38 78.7372 100.298 78.595 99.0677 77.6723C97.8376 76.7497 97.9298 75.3994 99.274 74.6526L111.425 67.9018L100.31 59.5654C99.0801 58.6428 99.1724 57.2924 100.517 56.5457C101.861 55.7989 103.943 55.9411 105.173 56.8637L116.294 65.2042L128.445 58.4534C129.79 57.7066 131.872 57.8489 133.102 58.7715C134.321 59.6933 134.223 61.047 132.884 61.7904Z",fill:"#2662D3",fillOpacity:"0.1"})}),D.jsx("g",{filter:"url(#filter1_d_6664_1383)",children:D.jsx("path",{d:"M93.8252 10.683C83.2036 16.5839 82.4732 27.2768 92.1938 34.5672C101.914 41.8576 118.404 42.9839 129.025 37.083C139.647 31.1822 140.377 20.4893 130.657 13.1989C120.936 5.90851 104.447 4.78217 93.8252 10.683ZM123.519 19.2546L114.776 24.1119L122.777 30.113C123.662 30.7768 123.596 31.7484 122.629 32.2857C121.662 32.823 120.163 32.7207 119.278 32.0569L111.277 26.0558L102.538 30.9107C101.571 31.448 100.073 31.3457 99.1874 30.6818C98.3023 30.018 98.3687 29.0464 99.3358 28.5091L108.079 23.6518L100.081 17.6537C99.1963 16.9898 99.2627 16.0182 100.23 15.4809C101.197 14.9436 102.695 15.046 103.58 15.7098L111.582 21.7109L120.325 16.8536C121.292 16.3163 122.79 16.4186 123.676 17.0824C124.552 17.7457 124.482 18.7197 123.519 19.2546Z",fill:"#3279FE"})}),D.jsx("path",{d:"M99.8076 15.7742C101.003 14.6704 102.694 15.118 103.312 15.5003L111.58 21.7031L120.201 16.9102C121.322 16.2461 122.66 16.5388 123.26 16.7917C124.549 17.551 124.399 18.3625 124.042 18.8377C123.903 19.0238 123.7 19.1467 123.497 19.2601L114.805 24.119L122.627 29.9871C122.904 30.1954 123.184 30.4267 123.31 30.7498C123.667 31.6621 122.8 32.3149 122.219 32.5084C121.17 32.7852 120.229 32.6992 119.623 32.3477L111.279 26.0662L103.143 30.584C101.68 31.5994 100.522 31.4289 99.9247 31.1607C97.7101 30.1668 98.5893 28.9654 99.2677 28.5137L108.062 23.6955L99.7465 17.406C99.002 16.8084 99.5816 15.9238 99.8076 15.7742Z",fill:"white"}),D.jsx("path",{d:"M33.176 202.889H37.418C37.572 202.217 37.698 201.517 37.81 200.803L38.818 200.929C38.706 201.615 38.594 202.273 38.454 202.889H45.398V203.869H38.216C37.908 205.031 37.53 206.095 37.11 207.075H44.278V208.041H40.862V212.311H45.412V213.291H35.206V212.311H39.84V208.041H36.648C35.752 209.749 34.646 211.121 33.33 212.171L32.812 211.247C34.856 209.511 36.312 207.047 37.18 203.869H33.176V202.889ZM54.988 201.587V210.113H54.092V202.455H51.376V210.169H50.48V201.587H54.988ZM53.546 210.743C54.33 211.499 54.974 212.255 55.506 213.011L54.806 213.711C54.358 212.969 53.728 212.185 52.93 211.345L53.546 210.743ZM52.342 203.169H53.154V207.649C53.126 209.287 52.888 210.589 52.44 211.569C51.992 212.479 51.278 213.193 50.298 213.697L49.78 212.885C50.732 212.395 51.39 211.751 51.782 210.939C52.118 210.099 52.314 208.993 52.342 207.649V203.169ZM48.156 205.927C47.792 206.515 47.4 207.089 46.98 207.621L46.658 206.571C47.862 204.891 48.73 202.973 49.276 200.803L50.158 201.209C49.864 202.273 49.5 203.267 49.08 204.191V213.711H48.156V205.927ZM57.816 213.585H56.304L56.094 212.647C56.57 212.689 57.032 212.717 57.48 212.717C57.844 212.717 58.026 212.507 58.026 212.101V200.901H59.006V212.339C59.006 213.165 58.6 213.585 57.816 213.585ZM55.968 202.147H56.85V210.827H55.968V202.147ZM62.394 213.571H61.218L61.008 212.619C61.372 212.661 61.722 212.689 62.058 212.689C62.45 212.689 62.646 212.465 62.646 212.045V208.769C62.086 208.965 61.526 209.161 60.966 209.329L60.714 208.321C61.372 208.167 62.016 207.985 62.646 207.761V204.513H60.938V203.547H62.646V200.901H63.626V203.547H64.984V204.513H63.626V207.383C64.13 207.159 64.634 206.921 65.124 206.669V207.691C64.634 207.943 64.13 208.167 63.626 208.377V212.297C63.626 213.137 63.206 213.571 62.394 213.571ZM67.196 203.421C66.692 204.401 66.118 205.269 65.488 206.025L64.83 205.255C65.838 204.121 66.65 202.637 67.28 200.817L68.204 201.013C68.036 201.517 67.84 201.993 67.644 202.455H73.202V203.421H67.196ZM72.684 205.017C72.684 207.467 72.614 208.951 72.502 209.469C72.39 209.973 71.886 210.239 71.004 210.239H70.64L70.374 209.357C70.682 209.357 70.948 209.371 71.172 209.371C71.452 209.371 71.62 209.231 71.676 208.979C71.732 208.727 71.76 207.831 71.774 206.263L69.94 206.879V211.205H69.044V207.173L67.49 207.691V211.821C67.49 212.297 67.686 212.549 68.078 212.549H71.116C71.592 212.549 71.942 212.451 72.166 212.283C72.362 212.087 72.502 211.443 72.572 210.351L73.454 210.645C73.342 211.961 73.146 212.759 72.866 213.039C72.572 213.319 72.04 213.459 71.27 213.459H67.854C67 213.459 66.58 212.955 66.58 211.947V207.999L65.502 208.363V207.467L66.58 207.103V205.115H67.49V206.795L69.044 206.263V204.135H69.94V205.955L72.684 205.017ZM79.992 202.259H82.82V200.887H83.772V202.259H86.698V208.251H83.828C83.856 208.867 83.926 209.441 84.038 209.945L84.08 210.155C84.85 209.707 85.522 209.231 86.082 208.699L86.852 209.259C86.138 209.945 85.312 210.547 84.36 211.079C84.472 211.415 84.612 211.695 84.78 211.947C85.116 212.381 85.41 212.605 85.662 212.605C86.054 212.605 86.404 211.891 86.684 210.491L87.51 211.009C87.104 212.745 86.53 213.613 85.774 213.613C85.256 213.599 84.752 213.305 84.276 212.745C83.982 212.395 83.744 211.975 83.548 211.499C82.26 212.087 80.776 212.577 79.124 212.941L78.704 212.031C80.44 211.667 81.952 211.191 83.226 210.589C83.198 210.533 83.184 210.477 83.184 210.421C83.016 209.777 82.918 209.049 82.862 208.251H79.992V202.259ZM85.76 207.355V205.717H83.772V206.907C83.772 207.061 83.772 207.215 83.786 207.355H85.76ZM82.82 207.355V205.717H80.944V207.355H82.82ZM80.944 204.849H82.82V203.183H80.944V204.849ZM83.772 203.183V204.849H85.76V203.183H83.772ZM76.492 213.543H75.288L75.078 212.591C75.456 212.619 75.82 212.647 76.156 212.647C76.562 212.647 76.772 212.451 76.772 212.059V208.671C76.184 208.909 75.596 209.119 74.994 209.315L74.742 208.321C75.442 208.153 76.114 207.943 76.772 207.691V204.401H74.966V203.435H76.772V200.873H77.738V203.435H79.264V204.401H77.738V207.299C78.298 207.047 78.844 206.781 79.376 206.487V207.467C78.844 207.747 78.298 208.013 77.738 208.265V212.311C77.738 213.123 77.318 213.543 76.492 213.543ZM89.652 205.115H94.79V209.385H89.652V205.115ZM93.796 208.475V206.053H90.66V208.475H93.796ZM95.224 210.183V211.163C93.362 211.667 91.346 212.101 89.19 212.451L88.938 211.457C91.122 211.177 93.208 210.757 95.224 210.183ZM99.942 213.655C99.242 213.641 98.584 213.193 97.94 212.297C97.744 212.031 97.576 211.751 97.436 211.457C96.652 212.409 95.784 213.165 94.846 213.725L94.3 212.857C95.294 212.255 96.19 211.443 96.974 210.407C96.778 209.875 96.624 209.301 96.484 208.685C96.162 207.257 95.994 205.577 95.98 203.645H88.938V202.665H95.98V200.873H96.988V202.665H99.046C98.808 202.161 98.542 201.685 98.262 201.265L99.284 201.097C99.536 201.559 99.788 202.077 100.026 202.665H101.384V203.645H97.002C97.03 205.353 97.156 206.865 97.394 208.181C97.478 208.615 97.562 209.021 97.674 209.399C98.458 208.111 99.116 206.585 99.648 204.821L100.53 205.297C99.872 207.411 99.06 209.175 98.08 210.603C98.22 210.925 98.36 211.219 98.514 211.471C99.004 212.199 99.438 212.563 99.83 212.563C100.166 212.563 100.46 211.765 100.698 210.169L101.566 210.743C101.188 212.675 100.642 213.655 99.942 213.655ZM108.44 200.887H109.434V202.245H114.866V203.197H109.434V204.975H113.9V209.469H104.632V204.975H108.44V200.887ZM112.892 208.531V205.927H105.64V208.531H112.892ZM104.604 210.085L105.458 210.491C104.926 211.709 104.324 212.759 103.624 213.655L102.798 213.053C103.498 212.227 104.1 211.233 104.604 210.085ZM107.656 210.491C107.936 211.415 108.188 212.423 108.412 213.501L107.404 213.725C107.208 212.577 106.984 211.569 106.718 210.687L107.656 210.491ZM110.582 210.351C111.002 211.303 111.366 212.353 111.674 213.473L110.68 213.697C110.4 212.507 110.05 211.457 109.63 210.547L110.582 210.351ZM113.452 210.071C114.348 211.247 115.02 212.269 115.496 213.137L114.656 213.725C114.166 212.773 113.494 211.737 112.64 210.589L113.452 210.071ZM118.072 202.931H122.65V200.957H123.686V202.931H128.208V203.897H123.686V206.221H129.356V207.201H123.686V212.143H126.99V208.419H127.956V213.725H126.99V213.081H118.394V208.419H119.36V212.143H122.65V207.201H116.994V206.221H122.65V203.897H118.072V202.931ZM134.788 201.419H142.614V202.357H138.806C138.666 202.987 138.512 203.575 138.316 204.121H143.23V205.087H140.29C141.018 206.221 142.138 207.117 143.65 207.761L143.216 208.643C141.354 207.733 140.038 206.543 139.268 205.087H137.924C137.784 205.367 137.644 205.619 137.504 205.871C136.79 206.949 135.726 207.915 134.326 208.769L133.696 207.971C135.026 207.243 136.02 206.361 136.692 205.353C136.748 205.255 136.804 205.171 136.86 205.087H134.144V204.121H137.308C137.532 203.561 137.686 202.973 137.798 202.357H134.788V201.419ZM135.642 208.811L136.482 209.217C135.964 210.645 135.362 211.891 134.676 212.941L133.85 212.353C134.536 211.359 135.138 210.183 135.642 208.811ZM131.806 201.069C132.674 201.671 133.416 202.273 134.004 202.889L133.318 203.575C132.786 203.001 132.044 202.385 131.106 201.741L131.806 201.069ZM131.47 204.415C132.366 205.101 133.108 205.787 133.71 206.473L133.024 207.159C132.478 206.515 131.736 205.815 130.784 205.087L131.47 204.415ZM132.744 208.279L133.626 208.629C133.066 210.393 132.436 212.059 131.764 213.627L130.826 213.207C131.554 211.611 132.198 209.959 132.744 208.279ZM137.476 213.711H136.174L135.964 212.759C136.37 212.801 136.762 212.829 137.126 212.829C137.406 212.829 137.56 212.633 137.56 212.269V207.145H138.526V212.507C138.526 213.305 138.176 213.711 137.476 213.711ZM141.802 208.475C142.46 209.721 143.034 211.051 143.51 212.465L142.614 212.857C142.096 211.317 141.536 209.945 140.92 208.769L141.802 208.475ZM139.954 208.979C140.542 210.211 141.046 211.527 141.48 212.927L140.584 213.333C140.136 211.793 139.646 210.449 139.1 209.273L139.954 208.979ZM156.922 202.945V213.487H155.942V212.549H153.31V213.487H152.344V202.945H156.922ZM153.31 211.583H155.942V203.911H153.31V211.583ZM147.192 200.901H148.2V203.729H151.056C151.056 208.097 150.986 210.799 150.846 211.835C150.706 212.983 150.02 213.571 148.788 213.571C148.578 213.571 148.228 213.543 147.724 213.515L147.472 212.591C147.92 212.619 148.312 212.647 148.648 212.647C149.362 212.647 149.782 212.241 149.894 211.443C149.978 210.715 150.034 208.461 150.062 204.709H148.2C148.144 208.839 147.22 211.849 145.428 213.753L144.686 213.095C146.31 211.345 147.15 208.545 147.192 204.709H144.952V203.729H147.192V200.901ZM171.104 202.301V205.423H170.096V203.267H160.24V205.423H159.232V202.301H164.734C164.538 201.797 164.328 201.349 164.104 200.943L165.252 200.747C165.448 201.209 165.644 201.727 165.826 202.301H171.104ZM161.388 204.779H168.906V205.717C167.996 206.361 166.974 206.977 165.854 207.593V208.531H171.37V209.511H165.854V212.479C165.854 213.249 165.448 213.641 164.636 213.641H162.914L162.676 212.717C163.166 212.731 163.698 212.745 164.286 212.745C164.65 212.745 164.832 212.535 164.832 212.129V209.511H158.98V208.531H164.832V207.159C165.966 206.571 166.82 206.081 167.394 205.717H161.388V204.779ZM174.87 205.283V207.019H177.992V207.929H174.87V210.113C176.284 209.973 177.488 209.791 178.482 209.539V210.477C177.586 210.701 176.382 210.897 174.87 211.079V213.613H173.89V211.191L172.938 211.275L172.784 210.267C173.162 210.239 173.526 210.225 173.89 210.197V202.021C175.598 201.769 176.984 201.405 178.076 200.915L178.58 201.769C177.488 202.203 176.242 202.539 174.87 202.763V204.359H177.992V205.283H174.87ZM178.776 206.879H184.6V207.761C184.208 209.077 183.592 210.197 182.724 211.121C183.508 211.779 184.488 212.353 185.664 212.857L185.118 213.725C183.886 213.151 182.878 212.493 182.066 211.765C181.086 212.605 179.896 213.263 178.482 213.753L177.922 212.899C179.294 212.423 180.428 211.793 181.324 211.037C180.456 210.085 179.882 209.007 179.574 207.803H178.776V206.879ZM180.498 207.803C180.778 208.769 181.268 209.637 181.982 210.407C182.696 209.651 183.228 208.783 183.592 207.803H180.498ZM179.84 201.391H183.774V204.373C183.774 204.751 183.956 204.947 184.32 204.947H185.482V205.857H184.068C183.214 205.857 182.794 205.423 182.794 204.583V202.329H180.834V203.183C180.834 204.527 180.246 205.577 179.07 206.305L178.398 205.549C179.35 205.017 179.84 204.261 179.84 203.281V201.391Z",fill:"#767A7F"}),D.jsxs("defs",{children:[D.jsxs("filter",{id:"filter0_f_6664_1383",x:"69.8438",y:"34.6172",width:"92.4648",height:"67.2109",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[D.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),D.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),D.jsx("feGaussianBlur",{stdDeviation:"5",result:"effect1_foregroundBlur_6664_1383"})]}),D.jsxs("filter",{id:"filter1_d_6664_1383",x:"85.3555",y:"6.89844",width:"52.1387",height:"39.9688",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[D.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),D.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),D.jsx("feOffset",{dy:"6"}),D.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),D.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.14902 0 0 0 0 0.384314 0 0 0 0 0.827451 0 0 0 1 0"}),D.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_6664_1383"}),D.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_6664_1383",result:"shape"})]})]})]})),Wp=e=>D.jsx(C.Icon,T({component:Jp},e));C.Icon.register({"add-fields":Wp});const Yp=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));le.default=zp,Object.defineProperties(le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});