@nocobase/app 1.2.17-alpha → 1.2.19-alpha

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.
@@ -21,6 +21,6 @@
21
21
  </head>
22
22
  <body>
23
23
  <div id="root"></div>
24
- <script src="/umi.da40fb2f.js"></script>
24
+ <script src="/umi.6151edb1.js"></script>
25
25
 
26
26
  </body></html>
@@ -21,6 +21,6 @@
21
21
  </head>
22
22
  <body>
23
23
  <div id="root"></div>
24
- <script src="/umi.da40fb2f.js"></script>
24
+ <script src="/umi.6151edb1.js"></script>
25
25
 
26
26
  </body></html>
@@ -647,7 +647,7 @@ https://requirejs.org/docs/errors.html#`+ze);return l.requireType=ze,l.requireMo
647
647
  padding: 2px 7px;
648
648
  border-radius: 10px;
649
649
  }
650
- `]))))}));return(0,se.jsx)(oe.BQs,{ellipsis:!0,popoverContent:Kt,children:Kt})};var an=(0,l.createContext)([]);an.displayName="VariableScopeContext";function An(At){var Dn=At.scope,_t=Dn===void 0?[]:Dn,hn=At.children;return(0,se.jsx)(an.Provider,{value:_t,children:hn})}function fn(){return(0,l.useContext)(an)}function En(){return null}En.Input=(0,L.connect)(Ae),En.TextArea=(0,L.connect)(st,(0,L.mapReadPretty)(st.ReadPretty)),En.RawTextArea=(0,L.connect)(Pe),En.JSON=(0,L.connect)(Ue);var er=null},88969:function(ze,te,e){"use strict";e.d(te,{m:function(){return m}});var L=e(15009),l=e.n(L),N=e(19632),v=e.n(N),D=e(99289),x=e.n(D),W=e(5574),r=e.n(W),j=e(97133),h=e(38089),O=e(67294),g=e(26793),T=e(60094),t=e(9783),o=e.n(t),c=(0,T.l6)("nb-variable-select",function(R){var F=R.componentCls;return o()({},F,{position:"relative",".ant-select.ant-cascader":{position:"absolute",top:"-1px",right:"-1px",minWidth:"auto",width:"calc(100% + 2px)",height:"calc(100% + 2px)",overflow:"hidden",opacity:0},".variable-btn":{fontStyle:"italic",fontFamily:"'New York', 'Times New Roman', Times, serif"},".Cascader-popupClassName":{".ant-cascader-menu":{marginBottom:0}}})}),B=c,b=e(2876),P=e(85893);function m(R){var F=R.options,z=R.setOptions,M=R.onInsert,S=R.changeOnSelect,C=S===void 0?!1:S,a=R.fieldNames,A=a===void 0?{}:a,i=R.className,p=(0,g.$)(),u=p.t,d=(0,O.useState)([]),f=r()(d,2),I=f[0],n=f[1],U=B(),k=U.wrapSSR,H=U.componentCls,$=U.hashId,V=(0,T.dQ)(),w=V.token;function Z(ae){return se.apply(this,arguments)}function se(){return se=x()(l()().mark(function ae(de){var ne,re;return l()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(re=de[de.length-1],!(!((ne=re.children)!==null&&ne!==void 0&&ne.length)&&!re.isLeaf&&re.loadChildren)){ge.next=5;break}return ge.next=4,re.loadChildren(re);case 4:z(function(ce){return v()(ce)});case 5:case"end":return ge.stop()}},ae)})),se.apply(this,arguments)}return k((0,P.jsx)(b.R,{className:(0,j.cx)("x-button",H,$,i),children:(0,P.jsx)(h.Z,{placeholder:u("Select a variable"),value:[],options:F,fieldNames:A,loadData:Z,onChange:function(){var de,ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(n(ne),!!ne.length){var K=re[re.length-1];(!(K!=null&&(de=K.children)!==null&&de!==void 0&&de.length)&&!(K!=null&&K.loadChildren)||K!=null&&K.isLeaf)&&M(ne)}},changeOnSelect:C,onClick:function(de){if(!(de.detail!==2||!C))for(var ne=de.target;ne&&ne!==de.currentTarget;ne=ne.parentNode){var re;Array.from((re=ne.classList)!==null&&re!==void 0?re:[]).includes("ant-cascader-menu-item")&&M(I)}},popupClassName:"Cascader-popupClassName",dropdownRender:C?function(ae){return(0,P.jsxs)(P.Fragment,{children:[ae,(0,P.jsx)("div",{style:{padding:"0.5em",borderTop:"1px solid ".concat(w.colorBorder),color:w.colorTextDescription},children:u("Double click to choose entire object")})]})}:null})}))}},2876:function(ze,te,e){"use strict";e.d(te,{R:function(){return x}});var L=e(97857),l=e.n(L),N=e(15867),v=e(67294),D=e(85893),x=(0,v.forwardRef)(function(W,r){var j=(0,v.useMemo)(function(){return{fontStyle:"italic",fontFamily:"New York, Times New Roman, Times, serif"}},[]);return(0,D.jsxs)(N.ZP,l()(l()({"aria-label":"variable-button",ref:r,style:j},W),{},{children:["x",W.children]}))});x.displayName="XButton"},72724:function(ze,te,e){"use strict";e.d(te,{L:function(){return T}});var L=e(97857),l=e.n(L),N=e(5574),v=e.n(N),D=e(94697),x=e(94350),W=e(67294),r=e(26793),j=e(21143),h=e(84577),O=e(85893),g=function(o){var c=(0,h.ng)(),B=c.refresh,b=(0,j.useAPIClient)(),P=(0,r.$)(),m=P.t;return(0,W.useCallback)(function(R){var F,z,M,S,C,a,A,i,p=R.active,u=R.over,d=p==null||(F=p.data)===null||F===void 0||(F=F.current)===null||F===void 0?void 0:F.schema,f=u==null||(z=u.data)===null||z===void 0||(z=z.current)===null||z===void 0?void 0:z.schema,I=u==null||(M=u.data)===null||M===void 0||(M=M.current)===null||M===void 0?void 0:M.insertAdjacent,n=u==null||(S=u.data)===null||S===void 0||(S=S.current)===null||S===void 0?void 0:S.breakRemoveOn,U=u==null||(C=u.data)===null||C===void 0||(C=C.current)===null||C===void 0?void 0:C.wrapSchema,k=u==null||(a=u.data)===null||a===void 0||(a=a.current)===null||a===void 0?void 0:a.onSuccess,H=(A=u==null||(i=u.data)===null||i===void 0||(i=i.current)===null||i===void 0?void 0:i.removeParentsIfNoChildren)!==null&&A!==void 0?A:!0;if(!d||!f){o==null||o(R);return}if(d===f){o==null||o(R);return}if(d.parent===f&&I==="beforeEnd"){o==null||o(R);return}var $=(0,h.Pl)({t:m,api:b,refresh:B,current:f});if($.loadAPIClientEvents(),d.parent===f.parent){$.insertBeforeBeginOrAfterEnd(d),o==null||o(R);return}if(I){$.insertAdjacent(I,d,{wrap:U,breakRemoveOn:n,removeParentsIfNoChildren:H,onSuccess:k}),o==null||o(R);return}},[o])},T=(0,x.observer)(function(t){var o=(0,r.$)(),c=o.t,B=(0,W.useState)(!0),b=v()(B,2),P=b[0],m=b[1],R=(0,W.useCallback)(function(z){var M,S=z.active,C=S==null||(M=S.data)===null||M===void 0||(M=M.current)===null||M===void 0?void 0:M.schema;if(m(!!C),t!=null&&t.onDragStart){var a;t==null||(a=t.onDragStart)===null||a===void 0||a.call(t,z)}},[t==null?void 0:t.onDragStart]),F=g(t==null?void 0:t.onDragEnd);return(0,O.jsxs)(D.DndContext,l()(l()({collisionDetection:D.rectIntersection},t),{},{onDragStart:R,onDragEnd:F,children:[(0,O.jsx)(D.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:P&&(0,O.jsx)("span",{style:{whiteSpace:"nowrap"},children:c("Dragging")})}),t.children]}))},{displayName:"DndContext"})},14896:function(ze,te,e){"use strict";e.r(te),e.d(te,{DndContext:function(){return L.L},DragHandler:function(){return l.IW},DraggableContext:function(){return l.LC},ShowFormData:function(){return x},Sortable:function(){return l.bt},SortableContext:function(){return l.Fo},SortableItem:function(){return l.TR},SortableProvider:function(){return l.OR}});var L=e(72724),l=e(20493),N=e(67294),v=e(94350),D=e(85893),x=(0,v.observer)(function(W){var r=W.children,j=(0,v.useForm)();return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("pre",{style:{marginBottom:20},"data-testid":"form-data",children:JSON.stringify(j.values,null,2)}),r]})})},20493:function(ze,te,e){"use strict";e.d(te,{IW:function(){return R},LC:function(){return t},bt:function(){return B},Fo:function(){return o},TR:function(){return m},OR:function(){return c}});var L=e(97857),l=e.n(L),N=e(13769),v=e.n(N),D=e(10274),x=e(94697),W=e(97133),r=e(94350),j=e(67294),h=e(60094),O=e(85893),g=["component","overStyle","style","children","openMode"],T=["schema","id","eid","removeParentsIfNoChildren"],t=(0,j.createContext)(null);t.displayName="DraggableContext";var o=(0,j.createContext)(null);o.displayName="SortableContext";var c=function(z){var M=z.id,S=z.data,C=z.children,a=(0,x.useDraggable)({id:M,data:S}),A=(0,x.useDroppable)({id:M,data:S});return(0,O.jsx)(o.Provider,{value:{draggable:a,droppable:A},children:C})},B=function(z){var M,S,C=z.component,a=z.overStyle,A=z.style,i=z.children,p=z.openMode,u=v()(z,g),d=(0,h.dQ)(),f=d.token,I=(0,j.useContext)(o),n=I.draggable,U=I.droppable,k=U.isOver,H=U.setNodeRef,$=l()({},A);return k&&(n==null||(M=n.active)===null||M===void 0?void 0:M.id)!==(U==null||(S=U.over)===null||S===void 0?void 0:S.id)&&($[C==="a"?"color":"background"]=new D.C(f.colorSettings).setAlpha(.15).toHex8String(),Object.assign($,a)),j.createElement(C||"div",l()(l()({role:"none"},u),{},{className:(0,W.cx)("nb-sortable-designer",z.className),ref:H,style:$}),i)},b=function(z){var M=P(z),S=(0,r.useFieldSchema)();return z.schema?l()(l()({},z),{},{id:M}):l()(l()({},z),{},{id:M,schema:S})},P=function(z){var M=(0,r.useField)();return z.id?z.id:M.address.toString()},m=(0,r.observer)(function(F){var z=b(F),M=z.schema,S=z.id,C=z.eid,a=z.removeParentsIfNoChildren,A=v()(z,T),i=(0,j.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:M,removeParentsIfNoChildren:a!=null?a:!0}},[M,a]);return(0,O.jsx)(c,{id:S,data:i,children:(0,O.jsx)(B,l()(l()({id:C},A),{},{children:F.children}))})},{displayName:"SortableItem"}),R=function(z){var M=(0,j.useContext)(o),S=M.draggable,C=S.attributes,a=S.listeners,A=S.setNodeRef;return(0,O.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,O.jsx)("div",l()(l()(l()({ref:A,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},a),C),{},{role:"none",children:(0,O.jsx)("span",{style:{cursor:"move",fontSize:14},children:z.children})}))})}},34588:function(ze,te,e){"use strict";e.d(te,{jC:function(){return F},od:function(){return P},Rq:function(){return m},e7:function(){return b}});var L=e(15009),l=e.n(L),N=e(9783),v=e.n(N),D=e(5574),x=e.n(D),W=e(99289),r=e.n(W),j=e(52677),h=e.n(j),O=e(96486),g=e.n(O),T=e(76690),t=e(65565),o=e(27484),c=e.n(o);function B(){"use strict";Array.isArray||(Array.isArray=function(A){return Object.prototype.toString.call(A)==="[object Array]"});function M(A){for(var i=[],p=0,u=A.length;p<u;p++)i.indexOf(A[p])===-1&&i.push(A[p]);return i}function S(A,i){return JSON.stringify(A)===JSON.stringify(i)}var C={},a={$is:function(i,p){return i===p},$match:function(i,p){return Array.isArray(i)&&Array.isArray(p)&&i.some(function(u){return Array.isArray(u)})?i.some(function(u){return(u==null?void 0:u.length)===p.length&&(u==null?void 0:u.every(function(d,f){return d===p[f]}))}):JSON.stringify(i)===JSON.stringify(p)},$eq:function(i,p){return Array.isArray(i)&&Array.isArray(p)?S(i,p):Array.isArray(i)?i.includes(p):i===p},$ne:function(i,p){return i!=p},"!==":function(i,p){return i!==p},$gt:function(i,p){return Array.isArray(i)?i.some(function(u){return u>p}):i>p},$gte:function(i,p){return i>=p},$lt:function(i,p,u){return Array.isArray(i)?i.some(function(d){return d<p}):u===void 0?i<p:i<p&&p<u},$lte:function(i,p,u){return u===void 0?i<=p:i<=p&&p<=u},$exists:function(i){return C.truthy(i)},$notEmpty:function(i){return C.truthy(i)},$empty:function(i){return Array.isArray(i)?i.some(function(p){return!C.truthy(p)}):!C.truthy(i)},$notExists:function(i){return!C.truthy(i)},"%":function(i,p){return i%p},log:function(i){return console.log(i),i},$in:function(i,p){return!p||typeof p.indexOf=="undefined"?!1:Array.isArray(i)&&Array.isArray(p)?p.some(function(u){return i.includes(u)}):p.indexOf(i)!==-1},$notIn:function(i,p){return!p||typeof p.indexOf=="undefined"?!1:p.indexOf(i)===-1},$includes:function(i,p){return!i||typeof i.indexOf=="undefined"?!1:Array.isArray(i)?i.some(function(u){return u==null?void 0:u.includes(p)}):i.indexOf(p)!==-1},$notIncludes:function(i,p){return!i||typeof i.indexOf=="undefined"?!1:Array.isArray(i)?!i.some(function(u){return u.includes(p)}):i.indexOf(p)===-1},$anyOf:function(i,p){return i.length===0?!1:Array.isArray(i)&&Array.isArray(p)&&i.some(function(u){return Array.isArray(u)})?i.some(function(u){return u.some(function(d){return p.includes(d)})}):i.some(function(u){return p.includes(u)})},$noneOf:function(i,p){return!i||(i==null?void 0:i.length)===0?!0:Array.isArray(i)&&Array.isArray(p)&&i.some(function(u){return Array.isArray(u)})?i.some(function(u){return u.every(function(d){return!p.some(function(f){return d.includes(f)})})}):p.some(function(u){return!i.includes(u)})},$notMatch:function(i,p){if(i.length!==p.length)return!0;for(var u=0;u<i.length;u++)if(i[u]!==p[u])return!0;return!1},$dateOn:function(i,p){return!i||!p?!1:(Array.isArray(i)||(i=[i,i]),Array.isArray(p)||(p=[p,p]),i=i.map(function(u){return c()(u)}),p=p.map(function(u){return c()(u)}),i[0].isBetween(p[0],p[1],null,"[]")&&i[1].isBetween(p[0],p[1],null,"[]"))},$dateBefore:function(i,p){return!i||!p?!1:(Array.isArray(i)||(i=[i,i]),Array.isArray(p)||(p=[p,p]),i=i.map(function(u){return c()(u)}),p=p.map(function(u){return c()(u)}),i[0].isBefore(p[0])&&i[1].isBefore(p[0]))},$dateNotBefore:function(i,p){return!a.$dateBefore(i,p)},$dateAfter:function(i,p){return!i||!p?!1:(Array.isArray(i)||(i=[i,i]),Array.isArray(p)||(p=[p,p]),i=i.map(function(u){return c()(u)}),p=p.map(function(u){return c()(u)}),i[0].isAfter(p[1])&&i[1].isAfter(p[1]))},$dateNotAfter:function(i,p){return!a.$dateAfter(i,p)},$dateBetween:function(i,p){return a.$dateOn(i,p)},$dateNotOn:function(i,p){return!a.$dateOn(i,p)},$isTruly:function(i){return Array.isArray(i)?i.some(function(p){return p===!0||p===1}):i===!0||i===1},$isFalsy:function(i){return Array.isArray(i)?i.some(function(p){return!C.truthy(p)}):!C.truthy(i)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(i,p,u){if(u<0){var d=String(i).substr(p);return d.substr(0,d.length+u)}return String(i).substr(p,u)},"+":function(){return Array.prototype.reduce.call(arguments,function(i,p){return parseFloat(i,10)+parseFloat(p,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(i,p){return parseFloat(i,10)*parseFloat(p,10)})},"-":function(i,p){return p===void 0?-i:i-p},"/":function(i,p){return i/p},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(i,p){return i.concat(p)},[])},var:function(i,p){var u=p===void 0?null:p,d=this;if(typeof i=="undefined"||i===""||i===null)return d;for(var f=String(i).split("."),I=0;I<f.length;I++)if(d==null||(d=d[f[I]],d===void 0))return u;return d},missing:function(){for(var i=[],p=Array.isArray(arguments[0])?arguments[0]:arguments,u=0;u<p.length;u++){var d=p[u],f=C.apply({var:d},this);(f===null||f==="")&&i.push(d)}return i},missing_some:function(i,p){var u=C.apply({missing:p},this);return p.length-u.length>=i?[]:u}};return C.is_logic=function(A){return h()(A)==="object"&&A!==null&&!Array.isArray(A)&&Object.keys(A).length===1},C.truthy=function(A){return Array.isArray(A)&&A.length===0?!1:!!A},C.get_operator=function(A){return Object.keys(A)[0]},C.get_values=function(A){return A[C.get_operator(A)]},C.apply=function(A,i){if(Array.isArray(A))return A.map(function($){return C.apply($,i)});if(!C.is_logic(A))return A;var p=C.get_operator(A),u=A[p],d,f,I,n,U;if(Array.isArray(u)||(u=[u]),p==="if"||p=="?:"){for(d=0;d<u.length-1;d+=2)if(C.truthy(C.apply(u[d],i)))return C.apply(u[d+1],i);return u.length===d+1?C.apply(u[d],i):null}else if(p==="$and"){for(d=0;d<u.length;d+=1)if(f=C.apply(u[d],i),!C.truthy(f))return f;return f}else if(p==="or"){for(d=0;d<u.length;d+=1)if(f=C.apply(u[d],i),C.truthy(f))return f;return f}else{if(p==="filter")return n=C.apply(u[0],i),I=u[1],Array.isArray(n)?n.filter(function($){return C.truthy(C.apply(I,$))}):[];if(p==="map")return n=C.apply(u[0],i),I=u[1],Array.isArray(n)?n.map(function($){return C.apply(I,$)}):[];if(p==="reduce")return n=C.apply(u[0],i),I=u[1],U=typeof u[2]!="undefined"?u[2]:null,Array.isArray(n)?n.reduce(function($,V){return C.apply(I,{current:V,accumulator:$})},U):U;if(p==="all"){if(n=C.apply(u[0],i),I=u[1],!Array.isArray(n)||!n.length)return!1;for(d=0;d<n.length;d+=1)if(!C.truthy(C.apply(I,n[d])))return!1;return!0}else if(p==="none"){if(n=C.apply(u[0],i),I=u[1],!Array.isArray(n)||!n.length)return!0;for(d=0;d<n.length;d+=1)if(C.truthy(C.apply(I,n[d])))return!1;return!0}else if(p==="some"){if(n=C.apply(u[0],i),I=u[1],!Array.isArray(n)||!n.length)return!1;for(d=0;d<n.length;d+=1)if(C.truthy(C.apply(I,n[d])))return!0;return!1}}if(u=u.map(function($){return C.apply($,i)}),a.hasOwnProperty(p)&&typeof a[p]=="function")return a[p].apply(i,u);if(p.indexOf(".")>0){var k=String(p).split("."),H=a;for(d=0;d<k.length;d++){if(!H.hasOwnProperty(k[d]))throw new Error("Unrecognized operation "+p+" (failed at "+k.slice(0,d+1).join(".")+")");H=H[k[d]]}return H.apply(i,u)}throw new Error("Unrecognized operation "+p)},C.uses_data=function(A){var i=[];if(C.is_logic(A)){var p=C.get_operator(A),u=A[p];Array.isArray(u)||(u=[u]),p==="var"?i.push(u[0]):u.forEach(function(d){i.push.apply(i,C.uses_data(d))})}return M(i)},C.add_operation=function(A,i){a[A]=i},C.rm_operation=function(A){delete a[A]},C.rule_like=function(A,i){if(i===A||i==="@")return!0;if(i==="number")return typeof A=="number";if(i==="string")return typeof A=="string";if(i==="array")return Array.isArray(A)&&!C.is_logic(A);if(C.is_logic(i)){if(C.is_logic(A)){var p=C.get_operator(i),u=C.get_operator(A);if(p==="@"||p===u)return C.rule_like(C.get_values(A,!1),C.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(A)){if(i.length!==A.length)return!1;for(var d=0;d<i.length;d+=1)if(!C.rule_like(A[d],i[d]))return!1;return!0}else return!1;return!1},C}var b=function(S,C){var a,A=/{{(.*?)}}/,i=S==null||(a=S.match)===null||a===void 0?void 0:a.call(S,A);if(i){var p=g().get(C,i[1]);return g().isFunction(p)?p():p}else return S};function P(M){if(h()(M)!=="object"||M===null)return null;for(var S in M)if(Object.prototype.hasOwnProperty.call(M,S))return Object.prototype.toString.call(M[S])==="[object Object]"&&M[S]!==null?P(M[S]):{key:S,value:M[S]};return null}var m=function(S){var C=R(S),a=(0,O.findIndex)(C,function(i,p,u){if(i.includes("$")&&p>0)return!0}),A=C.slice(0,a);return A};function R(M){var S=[];function C(a){Object.keys(a).sort().forEach(function(A){S.push(A),a[A]&&h()(a[A])==="object"&&C(a[A])})}return C(M),S}var F=function(){var M=r()(l()().mark(function S(C){var a,A,i,p,u,d;return l()().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return a=C.ruleGroup,A=C.variables,i=C.localVariables,p=Object.keys(a)[0]||"$and",u=a[p],d=u.map(function(){var n=r()(l()().mark(function U(k){var H,$,V,w,Z,se,ae,de,ne,re,K;return l()().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:if(!("$and"in k||"$or"in k)){ce.next=4;break}return ce.next=3,F({ruleGroup:k,variables:A,localVariables:i});case 3:return ce.abrupt("return",ce.sent);case 4:if(H=P(k),$=H==null?void 0:H.key,$){ce.next=8;break}return ce.abrupt("return",!0);case 8:return V=z(m(k)),w=A.parseVariable(V,i),Z=(0,T.cG)(H==null?void 0:H.value)?[A.parseVariable(H==null?void 0:H.value,i),w]:[H==null?void 0:H.value,w],ce.prev=11,se=B(),ce.next=15,Promise.all(Z);case 15:return ae=ce.sent,de=x()(ae,2),ne=de[0],re=de[1],ce.next=21,A.getCollectionField(V,i);case 21:return K=ce.sent,ce.abrupt("return",se.apply(v()({},$,[(0,t.J)(re,{targetCollectionField:K}),(0,t.J)(ne,{targetCollectionField:K})])));case 25:throw ce.prev=25,ce.t0=ce.catch(11),ce.t0;case 28:case"end":return ce.stop()}},U,null,[[11,25]])}));return function(U){return n.apply(this,arguments)}}()),I.next=6,Promise.all(d);case 6:if(d=I.sent,p!=="$and"){I.next=11;break}return I.abrupt("return",(0,O.every)(d,function(n){return n}));case 11:return I.abrupt("return",(0,O.some)(d,function(n){return n}));case 12:case"end":return I.stop()}},S)}));return function(C){return M.apply(this,arguments)}}();function z(M){return"{{ $nForm.".concat(M.join(".")," }}")}},61736:function(ze,te,e){"use strict";e.d(te,{D:function(){return l}});var L=e(67294),l=(0,L.createContext)({});l.displayName="SchemaComponentContext.Provider"},44245:function(ze,te,e){"use strict";e.d(te,{R:function(){return t}});var L=e(97857),l=e.n(L),N=e(13769),v=e.n(N),D=e(86201),x=e(94350),W=e(67294),r=e(47844),j=e(85893),h=["children","form"],O=["children"],g=function(c){var B=c.children,b=c.form,P=v()(c,h),m=(0,W.useContext)(x.SchemaOptionsContext),R=(0,W.useContext)(x.SchemaExpressionScopeContext),F=l()(l()({},m==null?void 0:m.scope),R),z=l()({},m==null?void 0:m.components);return(0,j.jsx)(x.FormProvider,l()(l()({},P),{},{form:b,children:(0,j.jsx)(r.G,{components:z,scope:F,children:B})}))},T=function(c){var B=c.children,b=v()(c,O),P=(0,W.useContext)(x.SchemaOptionsContext),m=(0,W.useContext)(x.SchemaExpressionScopeContext),R=l()(l()({},P==null?void 0:P.scope),m),F=l()({},P==null?void 0:P.components),z=(0,W.useMemo)(function(){return(0,D.createForm)()},[]);return(0,j.jsx)(x.FormProvider,l()(l()({},b),{},{form:z,children:(0,j.jsx)(r.G,{components:F,scope:R,children:B})}))},t=function(c){return c.form?(0,j.jsx)(g,l()({},c)):(0,j.jsx)(T,l()({},c))}},59480:function(ze,te,e){"use strict";e.d(te,{m:function(){return T}});var L=e(97857),l=e.n(L),N=e(86201),v=e(57953),D=e(67294),x=e(12174),W=e(84577),r=e(44245),j=e(93323),h=e(85893),O=function(o){return o},g=function(o){var c=o.noForm,B=o.onlyRenderProperties,b=o.hidden,P=o.scope,m=o.uid,R=o.components,F=o.onSuccess,z=o.schemaTransform,M=z===void 0?O:z,S=(0,W.Dm)(),C=S.reset,a={url:"/uiSchemas:".concat(B?"getProperties":"getJsonSchema","/").concat(m)},A=(0,D.useMemo)(function(){return(0,N.createForm)()},[m]),i=(0,x.QT)(a,{refreshDeps:[m],onSuccess:function(f){F&&F(f),C&&C()}}),p=i.data,u=i.loading;return u?(0,h.jsx)(v.Z,{}):b?(0,h.jsx)(v.Z,{}):c?(0,h.jsx)(j.n,{components:R,scope:P,schema:M((p==null?void 0:p.data)||{})}):(0,h.jsx)(r.R,{form:A,children:(0,h.jsx)(j.n,{components:R,scope:P,schema:M((p==null?void 0:p.data)||{})})})},T=function(o){return o.uid?(0,h.jsx)(g,l()({},o)):null}},93323:function(ze,te,e){"use strict";e.d(te,{n:function(){return m}});var L=e(97857),l=e.n(L),N=e(13769),v=e.n(N),D=e(9783),x=e.n(D),W=e(94350),r=e(90105),j=e(67294),h=e(61736),O=e(47844),g=e(85893),T=["components","scope","schema","distributed"],t=["schema"],o=["memoized"];function c(R){return W.Schema.isSchemaInstance(R)?R:R!=null&&R.name?new W.Schema({type:"object",properties:x()({},R.name,R)}):new W.Schema(R)}var B=function(F){return(0,j.useMemo)(function(){return c(F)},[])},b=function(F){var z=F.components,M=F.scope,S=F.schema,C=F.distributed,a=v()(F,T),A=(0,j.useContext)(h.D),i=(0,j.useMemo)(function(){return c(S)},[S]),p=(0,r.Z)();return(0,g.jsx)(h.D.Provider,{value:l()(l()({},A),{},{distributed:A.distributed==!1?!1:C,refresh:function(){var d;if(p(),A.distributed===!1||C===!1){var f;(f=A.refresh)===null||f===void 0||f.call(A)}(d=F.onChange)===null||d===void 0||d.call(F,i)}}),children:(0,g.jsx)(O.G,{inherit:!0,components:z,scope:M,children:(0,g.jsx)(W.RecursionField,l()(l()({},a),{},{schema:i}))})})},P=function(F){var z=F.schema,M=v()(F,t),S=B(z);return(0,g.jsx)(b,l()(l()({},M),{},{schema:S}))},m=function(F){var z=F.memoized,M=v()(F,o);return z?(0,g.jsx)(P,l()({},M)):(0,g.jsx)(b,l()({},M))}},47844:function(ze,te,e){"use strict";e.d(te,{B:function(){return x},G:function(){return W}});var L=e(97857),l=e.n(L),N=e(94350),v=e(67294),D=e(85893),x=function(){var j=(0,v.useContext)(N.SchemaOptionsContext);return j||{}},W=(0,v.memo)(function(r){var j=r.children,h=x(),O=(0,v.useMemo)(function(){return l()(l()({},h.components),r.components)},[h.components,r.components]),g=(0,v.useMemo)(function(){return l()(l()({},h.scope),r.scope)},[h.scope,r.scope]),T=(0,v.useMemo)(function(){return{scope:g,components:O}},[g,O]);return(0,D.jsx)(N.SchemaOptionsContext.Provider,{value:T,children:(0,D.jsx)(N.SchemaComponentsContext.Provider,{value:O,children:(0,D.jsx)(N.ExpressionScope,{value:g,children:j})})})});W.displayName="SchemaComponentOptions"},70993:function(ze,te,e){"use strict";e.d(te,{_b:function(){return F},RV:function(){return z.R},m1:function(){return M.m},n6:function(){return S.n},G0:function(){return C.G},a$:function(){return w},Tz:function(){return $},Bs:function(){return C.B}});var L=e(15009),l=e.n(L),N=e(99289),v=e.n(N),D=e(12444),x=e.n(D),W=e(72004),r=e.n(W),j=e(31996),h=e.n(j),O=e(26037),g=e.n(O),T=e(51947),t=e(83062),o=e(15867),c=e(67294),B=e(49218),b=e(26793),P=e(42677),m=e(68230),R=e(85893),F=function(){var ae=(0,P.ngQ)(),de=ae.designable,ne=ae.setDesignable,re=(0,b.$)(),K=re.t,ge=(0,m.d)(),ce=ge.token,ee={};return de&&(ee.backgroundColor="var(--colorSettings)"),(0,B.y1)("Ctrl+Shift+U",function(){return ne(!de)},[de]),(0,R.jsx)(t.Z,{title:K("UI Editor"),children:(0,R.jsx)(o.ZP,{"data-testid":"ui-editor-button",icon:(0,R.jsx)(T.Z,{style:{color:ce.colorTextHeaderMenu}}),title:K("UI Editor"),style:ee,onClick:function(){ne(!de)}})})},z=e(44245),M=e(59480),S=e(93323),C=e(47844),a=e(97857),A=e.n(a),i=e(5574),p=e.n(i),u=e(86201),d=e(94350),f=e(73773),I=e(90105),n=e(61736),U=function(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(ae).concat((0,f.uid)())};d.Schema.silent(!0);var k={},H={silent:!0,compile:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=function(){if(H.silent)try{return new Function("$root","with($root) { return (".concat(ae,"); }"))(de)}catch(K){return"{{".concat(ae,"}}")}else return new Function("$root","with($root) { return (".concat(ae,"); }"))(de)};return k[ae]?k[ae]:ae.trim().startsWith("t(")?(k[ae]=ne(),k[ae]):ne()}};d.Schema.registerCompiler(H.compile);var $=function(ae){var de=ae.designable,ne=ae.onDesignableChange,re=ae.components,K=ae.children,ge=(0,c.useContext)(n.D),ce=(0,C.B)(),ee=(0,I.Z)(),xe=(0,c.useState)((0,f.uid)()),Se=p()(xe,2),Ae=Se[0],Ee=Se[1],he=(0,c.useMemo)(function(){return ae.form||(0,u.createForm)()},[Ae]),pe=(0,b.$)(),X=pe.t,Q=(0,c.useMemo)(function(){return A()(A()({},ae.scope),{},{t:X,randomString:U})},[ae.scope,X,ce==null?void 0:ce.scope]),ue=(0,c.useState)(de),be=p()(ue,2),fe=be[0],Pe=be[1],Ie=(0,c.useMemo)(function(){return typeof de=="boolean"?de:fe},[de,fe,ge.designable]),Ue=(0,c.useMemo)(function(){return function(Me){typeof Ie!="boolean"&&Pe(Me),ne==null||ne(Me)}},[Ie,ne]),$e=(0,c.useCallback)(function(){Ee((0,f.uid)())},[]);return(0,R.jsx)(n.D.Provider,{value:{scope:Q,components:re,reset:$e,refresh:ee,designable:Ie,setDesignable:Ue},children:(0,R.jsx)(d.FormProvider,{form:he,children:(0,R.jsx)(C.G,{inherit:!0,scope:Q,components:re,children:K})})})};$.displayName="SchemaComponentProvider";var V=e(31601),w=function(se){h()(de,se);var ae=g()(de);function de(){return x()(this,de),ae.apply(this,arguments)}return r()(de,[{key:"load",value:function(){var ne=v()(l()().mark(function K(){return l()().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:this.addComponents();case 1:case"end":return ce.stop()}},K,this)}));function re(){return ne.apply(this,arguments)}return re}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:F})}}]),de}(V.S),Z=null},84577:function(ze,te,e){"use strict";e.d(te,{zz:function(){return W.zz},Pl:function(){return W.Pl},oB:function(){return W.oB},lI:function(){return l},hi:function(){return P.hi},eJ:function(){return N.e},Co:function(){return x},aZ:function(){return P.aZ},ng:function(){return W.ng},et:function(){return r.e},cL:function(){return c},fd:function(){return m},Cl:function(){return O},vH:function(){return B},sR:function(){return W.sR},wN:function(){return b.w},Dm:function(){return T},fM:function(){return P.fM}});var L=e(67294),l=function(F){var z=(0,L.useRef)(null);return(0,L.useEffect)(function(){return z.current&&F!==z.current&&z.current.onUnmount(),z.current=F,F.onMount(),function(){F.onUnmount()}},[F]),F},N=e(96365),v=e(94350),D=e(96486),x=function(F,z){var M=(0,L.useContext)(v.SchemaOptionsContext),S=M.components;return F?typeof F!="string"?F:(0,D.get)(S,F)||z:z},W=e(94516),r=e(98146),j=e(97857),h=e.n(j),O=function(F){var z=(0,L.useContext)(v.SchemaOptionsContext),M=(0,L.useContext)(v.SchemaExpressionScopeContext),S=(0,L.useRef)();return S.current=M,F.toFieldProps(h()(h()({},z),{},{get scope(){return h()(h()({},z.scope),S.current)}}))},g=e(61736);function T(){return(0,L.useContext)(g.D)}var t=e(26793),o=e(6145),c=function(){var F,z=(0,o.useCollectionManager_deprecated)(),M=z.getCollectionJoinField,S=z.getCollection,C=(0,v.useFieldSchema)(),a=(0,o.useCollection_deprecated)(),A=a.getField,i=A(C.name)||M(C["x-collection-field"]),p=(0,t.$)(),u=p.t,d=((F=C["x-component-props"])===null||F===void 0?void 0:F.fieldNames)||{},f=d.label,I=(0,L.useMemo)(function(){if(!(!i||!(i!=null&&i.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(i.interface)){var n=S(i.target);if((n==null?void 0:n.template)==="file")return[{label:u("Record picker"),value:"CollectionField"},{label:u("Select"),value:"AssociationSelect"}];switch(i.interface){case"o2m":return[{label:u("Record picker"),value:"CollectionField"},{label:u("Subtable"),value:"TableField"},{label:u("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:u("Record picker"),value:"CollectionField"},{label:u("Select"),value:"AssociationSelect"}];default:return[{label:u("Record picker"),value:"CollectionField"},{label:u("Subform"),value:"FormField"},{label:u("Select"),value:"AssociationSelect"}]}}},[u,i==null?void 0:i.interface,f]);return I},B=function(){var F,z=(0,v.useField)(),M=(0,v.useFieldSchema)(),S=(0,o.useCollection_deprecated)(),C=S.getField,a=(0,o.useCollectionManager_deprecated)(),A=a.getCollectionJoinField,i=C(M.name)||A(M["x-collection-field"]),p=(0,N.e)();(0,L.useEffect)(function(){if(!(z!=null&&z.title)){var u;z.title=p(i==null||(u=i.uiSchema)===null||u===void 0?void 0:u.title)}},[i==null||(F=i.uiSchema)===null||F===void 0?void 0:F.title])},b=e(9780),P=e(18686),m=function(F){var z,M=(0,t.$)(),S=M.t,C=(0,o.useCollectionManager_deprecated)(),a=C.getCollectionJoinField,A=C.getCollection,i=(0,v.useFieldSchema)(),p=(F==null?void 0:F.fieldSchema)||i,u=(0,v.useField)(),d=(0,v.useForm)(),f=(p==null?void 0:p["x-read-pretty"])||u.readPretty||d.readPretty,I=F==null?void 0:F.fieldSchema,n=(0,o.useCollection_deprecated)(),U=n.getField,k=(F==null?void 0:F.collectionField)||U(p.name)||a(p["x-collection-field"]),H=((z=p["x-component-props"])===null||z===void 0?void 0:z.fieldNames)||{},$=H.label,V=(0,L.useMemo)(function(){if(!(!k||!(k!=null&&k.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m","updatedBy","createdBy"].includes(k.interface)){var w=A(k.target);if((w==null?void 0:w.template)==="file")return f?[{label:S("Title"),value:"Select"},{label:S("File manager"),value:"FileManager"},{label:S("Tag"),value:"Tag"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},{label:S("File manager"),value:"FileManager"}];if((w==null?void 0:w.template)==="tree"&&["m2m","o2m","m2o"].includes(k.interface))return f?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!I&&{label:S("Sub-details"),value:"Nester"},!I&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!I&&["m2m","o2m"].includes(k.interface)&&{label:S("Sub-table"),value:"SubTable"},!I&&{label:S("Cascade Select"),value:"CascadeSelect"},!I&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];switch(k.interface){case"o2m":return f?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!I&&{label:S("Sub-table"),value:"SubTable"},!I&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!I&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"},!I&&{label:S("Sub-table"),value:"SubTable"}];case"m2m":return f?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!I&&{label:S("Sub-details"),value:"Nester"},!I&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!I&&{label:S("Sub-table"),value:"SubTable"},!I&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return f?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!I&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!I&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];default:return f?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!I&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!I&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}]}}},[S,k==null?void 0:k.interface,$]);return(V||[]).filter(Boolean)}},18686:function(ze,te,e){"use strict";e.d(te,{aZ:function(){return R},fM:function(){return z},hi:function(){return F}});var L=e(5574),l=e.n(L),N=e(97857),v=e.n(N),D=e(94350),x=e(83204),W=e(9361),r=e(96486),j=e.n(r),h=e(67294),O=e(42677),g=e(21143),T=e(28561),t=e(10097),o=function(C,a,A,i){return C?i.paddingContentHorizontalLG:A?a?i.controlPaddingHorizontal+3*i.controlPaddingHorizontalSM+22+i.paddingContentHorizontalLG:i.paddingContentHorizontalLG+12:a?i.paddingSM+i.controlHeight+i.marginXS+2*i.controlPaddingHorizontalSM+22+i.paddingContentHorizontalLG:i.controlHeight+i.marginXS+(i.paddingXXS+2)*2+i.paddingContentHorizontalLG},c=function(C){var a=W.Z.useToken(),A=a.token,i=(0,O.ngQ)(),p=i.designable,u=(0,t.useBlockHeightProps)(),d=u.heightProps,f=C||d||{},I=f.disablePageHeader,n=f.enablePageTabs,U=f.hidePageTitle,k=A.sizeXXL-2,H=p?A.controlHeight+2*A.paddingContentHorizontalLG:1*A.paddingContentHorizontalLG,$=o(I,n,U,A);return k+$+H},B=function(){var C=W.Z.useToken(),a=C.token,A=(0,O.ngQ)(),i=A.designable,p=a.paddingContentVerticalLG+a.margin+2*a.paddingContentVertical+24,u=i?a.controlHeight+2*a.paddingContentHorizontalLG:1*a.paddingContentHorizontalLG;return p+u},b=function(C){var a=(0,D.useFieldSchema)(),A=M(a),i=c(C),p=B();return A?p:i},P=["users_jobs","approvals","approvalRecords"],m=function(){var C,a,A=W.Z.useToken(),i=A.token,p=(0,t.useBlockHeightProps)(),u=p.heightProps,d=(0,g.useTableBlockContext)(),f=d.heightProps,I=(0,O.ngQ)(),n=I.designable,U=(0,D.useFieldSchema)(),k=f||u,H=b(k),$=(C=(0,g.useDataBlockRequest)())!==null&&C!==void 0?C:{},V=$.data,w=(0,g.useCollection)(),Z=w.name,se=(V==null?void 0:V.meta)||{},ae=se.count,de=se.pageSize,ne=ae>de,re=k.heightMode,K=k.height,ge=k.title;if(!(!(k!=null&&k.heightMode)||re===T.j.DEFAULT)){var ce=Object.keys(((a=U.parent.properties.actions)===null||a===void 0?void 0:a.properties)||{}).length>0,ee=ne?i.controlHeight+i.padding+i.marginLG:i.marginLG,xe=ce||n?i.controlHeight+2*i.marginLG:i.marginLG,Se=(n&&!P.includes(Z)?i.controlHeight:22)+2*i.padding+1,Ae=ge?i.fontSizeLG*i.lineHeightLG+i.padding*2-1:0;return re===T.j.FULL_HEIGHT?window.innerHeight-H-Ae-Se-xe-ee:K-Ae-xe-Se-ee}},R=function(C){var a=(0,t.useBlockHeightProps)(),A=a.heightProps,i=b(),p=W.Z.useToken(),u=p.token,d=A||{},f=d.heightMode,I=d.height,n=d.title,U=n?u.fontSizeLG*u.lineHeightLG+u.padding*2-1:0;if(!(!(A!=null&&A.heightMode)||f===T.j.DEFAULT)){if(f===T.j.FULL_HEIGHT){var k=window.innerHeight-i;return C!=null&&C.removeBlockHeaderHeight&&(k=k-U),C!=null&&C.innerExtraHeight&&(k=k-C.innerExtraHeight),k}return I}},F=function(){var C=(0,D.useFieldSchema)(),a=(0,h.useMemo)(function(){return(0,t.getPageSchema)(C)},[]),A=(a==null?void 0:a["x-component-props"])||{},i=A.disablePageHeader,p=A.enablePageTabs,u=A.hidePageTitle,d=v()(v()({},C==null?void 0:C["x-component-props"]),{},{disablePageHeader:i,enablePageTabs:p,hidePageTitle:u}),f=b(d),I=d||{},n=I.heightMode,U=I.height;if(!(!(d!=null&&d.heightMode)||n===T.j.DEFAULT))return n===T.j.FULL_HEIGHT?window.innerHeight-f:U},z=function(){var C=(0,h.useState)(),a=l()(C,2),A=a[0],i=a[1],p=(0,h.useRef)(null),u=m(),d=(0,h.useCallback)((0,r.debounce)(function(){var I;if(p.current){var n=p.current.getBoundingClientRect(),U=(I=p.current.querySelector(".ant-table"))===null||I===void 0?void 0:I.getBoundingClientRect();U&&i(n.width)}},100),[u]),f=(0,h.useCallback)(function(I){p.current=I&&I.children?I.children[0]:null,d()},[d]);return(0,x.Z)("resize",d),{height:u,width:A,tableSizeRefCallback:f}},M=function S(C){return C?C["x-component"]==="Action.Container"?!0:S(C.parent):null}},96365:function(ze,te,e){"use strict";e.d(te,{e:function(){return r}});var L=e(97857),l=e.n(L),N=e(52677),v=e.n(N),D=e(94350),x=e(67294),W={},r=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},O=h.noCache,g=(0,x.useContext)(D.SchemaOptionsContext),T=(0,x.useContext)(D.SchemaExpressionScopeContext);return function(t,o){var c=!1,B;if(typeof t=="string"&&t.startsWith("{{")&&(c=!0,B=t),t&&v()(t)==="object"&&!(0,x.isValidElement)(t)&&(c=!0,B=JSON.stringify(t)),Array.isArray(t)&&(c=!0),c){var b=l()(l()(l()({},g.scope),T),o);if(!B)return D.Schema.compile(t,b);try{return O?D.Schema.compile(t,b):(W[B]=W[B]||D.Schema.compile(t,b),W[B])}catch(P){return console.log("useCompile error",t,P),D.Schema.compile(t,b)}}return t}}},94516:function(ze,te,e){"use strict";e.d(te,{zz:function(){return $},Pl:function(){return f},oB:function(){return k},ng:function(){return w},sR:function(){return V}});var L=e(5574),l=e.n(L),N=e(19632),v=e.n(N),D=e(15009),x=e.n(D),W=e(99289),r=e.n(W),j=e(12444),h=e.n(j),O=e(72004),g=e.n(O),T=e(9783),t=e.n(T),o=e(97857),c=e.n(o),B=e(94350),b=e(73773),P=e(45360),m=e(50361),R=e.n(m),F=e(27361),z=e.n(F),M=e(36968),S=e.n(M),C=e(67294),a=e(26793),A=e(12174),i=e(61736);function p(Z,se){if(Z)return Z["x-app-version"]||(Z["x-app-version"]=se),Object.keys(Z.properties||{}).forEach(function(ae){var de;p((de=Z.properties)===null||de===void 0?void 0:de[ae],se)}),Z}var u=JSON.parse('{"i8":"1.2.17-alpha"}'),d=e(85893);function f(Z){return new $(Z)}var I=function Z(se){se&&(se["x-uid"]||(se["x-uid"]=(0,b.uid)()),Object.keys(se.properties||{}).forEach(function(ae){Z(se.properties[ae])}))},n=function(se){return se},U=function(se,ae){if(!(!se||!ae)){for(var de in ae)if(Object.prototype.hasOwnProperty.call(ae,de)){var ne=ae[de];if(ne!==(se==null?void 0:se[de]))return!1}return!0}},k=function(se,ae){if(se["x-uid"]&&se["x-uid"]===ae["x-uid"])return[null,se.toJSON()];var de=se.toJSON(),ne=c()(c()({},de),{},{properties:{}}),re=null,K=function ge(ce,ee){Object.keys(ce||{}).forEach(function(xe){var Se=ce[xe];if(Se["x-uid"]===ae["x-uid"]){re=ce[xe];return}else ee.properties[xe]=c()(c()({},Se),{},{properties:{}}),ge(Se==null?void 0:Se.properties,ee.properties[xe])})};return K(de.properties,ne),[ne,re]},H=function(se){return se},$=function(){function Z(se){h()(this,Z),t()(this,"current",void 0),t()(this,"options",void 0),t()(this,"appVersion",void 0),t()(this,"events",{}),this.options=se,this.current=se.current,this.appVersion=se.appVersion}return g()(Z,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var ae=this,de=this.options,ne=de.api,re=de.t,K=re===void 0?H:re;if(ne){var ge=function(ee){if(!ee)return[];var xe=Object.values(ee.properties).length,Se=[];return ee.mapProperties(function(Ae){Ae["x-component-props"]=Ae["x-component-props"]||{},Ae["x-component-props"].width=100/xe,Ae["x-uid"]&&Se.push({"x-uid":Ae["x-uid"],"x-component-props":Ae["x-component-props"]})}),ee["x-uid"]&&Se.length?Se:[]};this.on("insertAdjacent",function(){var ce=r()(x()().mark(function ee(xe){var Se,Ae,Ee,he,pe,X,Q,ue,be,fe;return x()().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(Ae=xe.onSuccess,Ee=xe.current,he=xe.position,pe=xe.schema,X=xe.wrap,Q=xe.wrapped,ue=xe.removed,be=[],(Q==null?void 0:Q["x-component"])==="Grid.Col"&&(be=be.concat(ge(Q.parent))),(ue==null?void 0:ue["x-component"])==="Grid.Col"&&(be=be.concat(ge(ue.parent))),ae.refresh(),Ee["x-uid"]){Ie.next=7;break}return Ie.abrupt("return");case 7:return Ie.next=9,ne.request({url:"/uiSchemas:insertAdjacent/".concat(Ee["x-uid"],"?position=").concat(he),method:"post",data:{schema:p(pe,ae.appVersion),wrap:X}});case 9:if(fe=Ie.sent,!be.length){Ie.next=13;break}return Ie.next=13,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:be});case 13:if(!(ue!=null&&ue["x-uid"])){Ie.next=16;break}return Ie.next=16,ne.request({url:"/uiSchemas:remove/".concat(ue["x-uid"]),method:"post"});case 16:Ae==null||Ae(fe==null||(Se=fe.data)===null||Se===void 0?void 0:Se.data),P.ZP.success(K("Saved successfully"),.2);case 18:case"end":return Ie.stop()}},ee)}));return function(ee){return ce.apply(this,arguments)}}()),this.on("patch",function(){var ce=r()(x()().mark(function ee(xe){var Se;return x()().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(Se=xe.schema,ae.refresh(),Se!=null&&Se["x-uid"]){Ee.next=4;break}return Ee.abrupt("return");case 4:return Ee.next=6,ne.request({url:"/uiSchemas:patch",method:"post",data:c()({},Se)});case 6:P.ZP.success(K("Saved successfully"),.2);case 7:case"end":return Ee.stop()}},ee)}));return function(ee){return ce.apply(this,arguments)}}()),this.on("batchPatch",function(){var ce=r()(x()().mark(function ee(xe){var Se;return x()().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Se=xe.schemas,ae.refresh(),Ee.next=4,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:Se});case 4:P.ZP.success(K("Saved successfully"),.2);case 5:case"end":return Ee.stop()}},ee)}));return function(ee){return ce.apply(this,arguments)}}()),this.on("remove",function(){var ce=r()(x()().mark(function ee(xe){var Se,Ae;return x()().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(Se=xe.removed,Ae=[],(Se==null?void 0:Se["x-component"])==="Grid.Col"&&(Ae=ge(Se.parent)),ae.refresh(),Se!=null&&Se["x-uid"]){he.next=6;break}return he.abrupt("return");case 6:return he.next=8,ne.request({url:"/uiSchemas:remove/".concat(Se["x-uid"]),method:"post"});case 8:if(!Ae.length){he.next=11;break}return he.next=11,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:Ae});case 11:P.ZP.success(K("Saved successfully"),.2);case 12:case"end":return he.stop()}},ee)}));return function(ee){return ce.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(ae){ae.type||(ae.type="void"),ae.name||(ae.name=(0,b.uid)()),this.current["x-uid"]&&I(ae)}},{key:"on",value:function(ae,de){this.events[ae]||(this.events[ae]=[]),this.events[ae].push(de)}},{key:"emit",value:function(){var se=r()(x()().mark(function de(ne){var re=this,K,ge,ce,ee,xe,Se=arguments;return x()().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(this.events[ne]){Ee.next=2;break}return Ee.abrupt("return");case 2:for(K=Se.length,ge=new Array(K>1?K-1:0),ce=1;ce<K;ce++)ge[ce-1]=Se[ce];return ee=ge[0],xe=ge.slice(1),Ee.abrupt("return",Promise.all(this.events[ne].map(function(he){return he.bind(re).apply(void 0,[c()({current:re.current},ee)].concat(v()(xe)))})));case 5:case"end":return Ee.stop()}},de,this)}));function ae(de){return se.apply(this,arguments)}return ae}()},{key:"parentsIn",value:function(ae){if(!ae||!B.Schema.isSchemaInstance(ae))return!1;for(var de=this.current;(ne=de)!==null&&ne!==void 0&&ne.parent;){var ne;if(de.parent===ae)return!0;de=de.parent}return!1}},{key:"refresh",value:function(){var ae=this.options.refresh;return ae==null?void 0:ae()}},{key:"deepMerge",value:function(ae){var de=this,ne={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"},re={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(ae).forEach(function(K){ne[K]?(de.current[K]=ae[K],de.updateModel(ne[K],ae[K])):re[K]?Object.keys(ae[K]).forEach(function(ge){S()(de.current,[K,ge],ae[K][ge]),de.updateModel([re[K],ge],ae[K][ge])}):de.current[K]=ae[K]}),this.emit("patch",{schema:ae})}},{key:"getSchemaAttribute",value:function(ae,de){return z()(this.current,ae,de)}},{key:"shallowMerge",value:function(ae){var de=this,ne={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(ae).forEach(function(re){de.current[re]=ae[re],ne[re]&&de.updateModel(ne[re],ae[re])}),this.emit("patch",{schema:ae})}},{key:"updateModel",value:function(ae,de){var ne=function(K){S()(K,ae,de)};this.model&&ne(this.model),this.query&&this.query.take(ne)}},{key:"insertAdjacent",value:function(ae,de){var ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(ae){case"beforeBegin":return this.insertBeforeBegin(de,ne);case"afterBegin":return this.insertAfterBegin(de,ne);case"beforeEnd":return this.insertBeforeEnd(de,ne);case"afterEnd":return this.insertAfterEnd(de,ne)}}},{key:"recursiveRemoveIfNoChildren",value:function(ae,de){if(ae){for(var ne=ae,re,K=de==null?void 0:de.breakRemoveOn;ne;){if(typeof K=="function"){if(K(ne))break}else if(U(ne,K))break;var ge=Object.keys(ne.properties||{}).length;if(ge>0)break;ne.parent&&(re=ne.parent.removeProperty(ne.name)),ne=ne.parent}return re}}},{key:"remove",value:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=de.breakRemoveOn,re=de.removeParentsIfNoChildren,K=ae||this.current,ge=K.parent.removeProperty(K.name);if(re){var ce=this.recursiveRemoveIfNoChildren(K.parent,{breakRemoveOn:ne});ce&&(ge=ce)}return this.emit("remove",{removed:ge})}},{key:"removeWithoutEmit",value:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=de.breakRemoveOn,re=de.removeParentsIfNoChildren,K=ae||this.current,ge=K.parent.removeProperty(K.name);if(re){var ce=this.recursiveRemoveIfNoChildren(K.parent,{breakRemoveOn:ne});ce&&(ge=ce)}return ge}},{key:"insertBeforeBeginOrAfterEnd",value:function(ae){var de=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)&&B.Schema.isSchemaInstance(ae)&&this.current.parent===ae.parent){var re=0,K=0;return this.current.parent.mapProperties(function(ge,ce,ee){de.current.name===ce&&(K=ee),ae.name===ce&&(re=ee)}),re>K?this.insertBeforeBegin(ae,ne):this.insertAfterEnd(ae,ne)}}},{key:"insertBeforeBegin",value:function(ae){var de=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var re={onSuccess:ne.onSuccess},K=ne.wrap,ge=K===void 0?n:K,ce=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(ae)){if(this.parentsIn(ae)){this.emit("error",{code:"parent_is_not_allowed",schema:ae});return}ae.parent.removeProperty(ae.name),ee&&(re.removed=this.recursiveRemoveIfNoChildren(ae.parent,{breakRemoveOn:ce}))}else ae&&(ae=R()(ae));var xe={},Se=!1,Ae=0,Ee=0;this.current.parent.mapProperties(function(fe,Pe){Pe===de.current.name&&(Ee=Ae,Se=!0,++Ae),fe["x-index"]=Ae,++Ae,Se&&(xe[Pe]=fe,de.current.parent.removeProperty(Pe))}),this.prepareProperty(ae);var he=ge(ae),pe=this.current.parent.addProperty(he.name||(0,b.uid)(),he);pe["x-index"]=Ee,pe.parent=this.current.parent,this.current.parent.setProperties(xe);var X=k(pe,ae),Q=l()(X,2),ue=Q[0],be=Q[1];this.emit("insertAdjacent",c()({position:"beforeBegin",schema:be,wrapped:he,wrap:ue},re))}}},{key:"insertAfterBegin",value:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var ne={onSuccess:de.onSuccess},re=de.wrap,K=re===void 0?n:re,ge=de.breakRemoveOn,ce=de.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(ae)){if(this.parentsIn(ae)){this.emit("error",{code:"parent_is_not_allowed",schema:ae});return}ae.parent.removeProperty(ae.name),ce&&(ne.removed=this.recursiveRemoveIfNoChildren(ae.parent,{breakRemoveOn:ge}))}else ae&&(ae=R()(ae));var ee={},xe=1;this.current.mapProperties(function(Q,ue){Q["x-index"]=xe,++xe,ee[ue]=Q}),this.current.properties={},this.prepareProperty(ae);var Se=K(ae),Ae=this.current.addProperty(Se.name||(0,b.uid)(),Se);Ae["x-index"]=0,Ae.parent=this.current,this.current.setProperties(ee);var Ee=k(Ae,ae),he=l()(Ee,2),pe=he[0],X=he[1];this.emit("insertAdjacent",c()({position:"afterBegin",schema:X,wrap:pe,wrapped:Se},ne))}}},{key:"insertBeforeEnd",value:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){delete ae["x-index"];var ne={onSuccess:de.onSuccess},re=de.wrap,K=re===void 0?n:re,ge=de.breakRemoveOn,ce=de.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(ae)){if(this.parentsIn(ae)){this.emit("error",{code:"parent_is_not_allowed",schema:ae});return}ae.parent.removeProperty(ae.name),ce&&(ne.removed=this.recursiveRemoveIfNoChildren(ae.parent,{breakRemoveOn:ge}))}else ae&&(ae=R()(ae));this.prepareProperty(ae);var ee=K(ae),xe=this.current.addProperty(ee.name||(0,b.uid)(),ee);xe.parent=this.current;var Se=k(xe,ae),Ae=l()(Se,2),Ee=Ae[0],he=Ae[1];return this.emit("insertAdjacent",c()({position:"beforeEnd",schema:he,wrap:Ee,wrapped:ee},ne))}}},{key:"insertAfterEnd",value:function(ae){var de=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var re={onSuccess:ne==null?void 0:ne.onSuccess},K=ne.wrap,ge=K===void 0?n:K,ce=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren,xe=0,Se=0,Ae=!1,Ee={};if(this.current.parent.mapProperties(function(fe,Pe){fe["x-index"]=xe,Pe===de.current.name&&(++xe,Se=xe,Ae=!0),++xe,Ae&&Pe!==de.current.name&&(Ee[Pe]=fe,de.current.parent.removeProperty(Pe))}),B.Schema.isSchemaInstance(ae)){if(this.parentsIn(ae)){this.emit("error",{code:"parent_is_not_allowed",schema:ae});return}ae.parent.removeProperty(ae.name),ee&&(re.removed=this.recursiveRemoveIfNoChildren(ae.parent,{breakRemoveOn:ce})),ae.parent=null}else ae&&(ae=R()(ae));this.prepareProperty(ae);var he=ge(ae),pe=this.current.parent.addProperty(he.name||(0,b.uid)(),he);pe.parent=this.current.parent,pe["x-index"]=Se,this.current.parent.setProperties(Ee);var X=k(pe,ae),Q=l()(X,2),ue=Q[0],be=Q[1];this.emit("insertAdjacent",c()({position:"afterEnd",schema:be,wrap:ue,wrapped:he},re))}}}]),Z}();function V(){var Z=(0,C.useContext)(B.SchemaOptionsContext),se=(0,C.useMemo)(function(){return(Z==null?void 0:Z.components)||{}},[Z]),ae=function(ne){if(!ne)return null;if(typeof ne!="string")return ne;var re=z()(se,ne);return re||console.error('[nocobase]: Component "'.concat(ne,'" not found')),re};return ae}function w(){var Z=(0,C.useContext)(i.D),se=Z.designable,ae=Z.setDesignable,de=Z.refresh,ne=Z.reset,re=(0,C.useContext)(B.SchemaOptionsContext),K=(0,C.useMemo)(function(){return(re==null?void 0:re.components)||{}},[re]),ge=(0,C.useMemo)(function(){return function(){return(0,d.jsx)(d.Fragment,{})}},[]),ce=(0,B.useField)(),ee=(0,B.useFieldSchema)(),xe=(0,A.LY)(),Se=(0,a.$)(),Ae=Se.t,Ee=(0,C.useMemo)(function(){return f({t:Ae,api:xe,refresh:de,current:ee,model:ce,appVersion:u.i8})},[Ae,xe,de,ee,ce]);return(0,C.useEffect)(function(){Ee.loadAPIClientEvents()},[Ee]),{dn:Ee,designable:se,reset:ne,refresh:de,setDesignable:ae,DesignableBar:ge,findComponent:(0,C.useCallback)(function(he){return he?typeof he!="string"?he:z()(K,he):null},[z()]),on:Ee.on.bind(Ee),patch:(0,C.useCallback)(function(he,pe){var X=function(be){Object.keys(be).forEach(function(fe){var Pe=be[fe];fe==="title"&&(ce.title=Pe,ee.title=Pe),fe==="x-decorator-props"&&(ce.decoratorProps||(ce.decoratorProps={}),ee["x-decorator-props"]||(ee["x-decorator-props"]={}),Object.keys(Pe).forEach(function(Ie){ce.decoratorProps[Ie]=Pe[Ie],ee["x-decorator-props"][Ie]=Pe[Ie]})),fe==="x-component-props"&&(ce.componentProps||(ce.componentProps={}),ee["x-component-props"]||(ee["x-component-props"]={}),Object.keys(Pe).forEach(function(Ie){ce.componentProps[Ie]=Pe[Ie],ee["x-component-props"][Ie]=Pe[Ie]}))})};if(typeof he=="string"){var Q={};return S()(Q,he,pe),X(Q)}X(he),de()},[Ee]),shallowMerge:(0,C.useCallback)(function(he){Ee.shallowMerge(he)},[Ee]),deepMerge:(0,C.useCallback)(function(he){Ee.deepMerge(he)},[Ee]),remove:(0,C.useCallback)(function(he,pe){Ee.remove(he,pe)},[Ee]),insertAdjacent:(0,C.useCallback)(function(he,pe,X){Ee.insertAdjacent(he,pe,X)},[Ee]),insertBeforeBegin:(0,C.useCallback)(function(he){Ee.insertBeforeBegin(he)},[Ee]),insertAfterBegin:(0,C.useCallback)(function(he){Ee.insertAfterBegin(he)},[Ee]),insertBeforeEnd:(0,C.useCallback)(function(he){Ee.insertBeforeEnd(he)},[Ee]),insertAfterEnd:(0,C.useCallback)(function(he){Ee.insertAfterEnd(he)},[Ee])}}},98146:function(ze,te,e){"use strict";e.d(te,{e:function(){return x}});var L=e(94350),l=e(84577),N=e(67294),v=e(74538),D=function(){return null},x=function(){var r=(0,l.ng)(),j=r.designable,h=(0,L.useFieldSchema)(),O=(0,N.useMemo)(function(){return h["x-designer"]||h["x-toolbar"]?h["x-designer"]||h["x-toolbar"]:h["x-settings"]?v.Mf:D},[h]),g=(0,l.Co)(O);return j&&g||D}},9780:function(ze,te,e){"use strict";e.d(te,{w:function(){return W}});var L=e(97857),l=e.n(L),N=e(13769),v=e.n(N),D=["useProps"],x=function(){return{}},W=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=j.useProps,O=h===void 0?x:h,g=v()(j,D),T=O;typeof O!="function"&&(T=x);var t=T();return l()(l()({},g),t)}},42677:function(ze,te,e){"use strict";e.d(te,{aUM:function(){return F.aU},olz:function(){return F.ol},N0i:function(){return F.N0},fWn:function(){return F.fW},EIK:function(){return F.EI},$Lt:function(){return F.$L},$b8:function(){return F.$b},HTy:function(){return Lo},lkv:function(){return Fo},rDu:function(){return ea},eYL:function(){return F.eY},Rat:function(){return ra},$SD:function(){return fi},fUi:function(){return Go.fU},QcG:function(){return Bl},gOu:function(){return cs},jYG:function(){return Ka.j},C1I:function(){return F.C1},Ssf:function(){return Ul},vTp:function(){return Nl},XZJ:function(){return ua},Tt2:function(){return wl},zH8:function(){return Xl},Q5L:function(){return Ql},Pok:function(){return hi},Vm0:function(){return ns},xI_:function(){return Hl},Lip:function(){return Gl},Mtg:function(){return Pa},iNu:function(){return as},zzt:function(){return _t.zz},_bl:function(){return P._b},POi:function(){return is},AOY:function(){return ee},LBT:function(){return b.DndContext},IWB:function(){return b.DragHandler},LCt:function(){return b.DraggableContext},FyH:function(){return K.Fy},Nir:function(){return K.Ni},q8U:function(){return K.q8},HGA:function(){return K.HG},QTe:function(){return K.QT},JEX:function(){return K.JE},fAH:function(){return il},$w$:function(){return K.$w},nBj:function(){return K.nB},Oct:function(){return K.Oc},zdw:function(){return K.zd},CXR:function(){return ol},BQs:function(){return Io.BQ},Hj5:function(){return St.H},M0b:function(){return _i},wn$:function(){return Ir.wn},GzZ:function(){return Ir.Gz},tJZ:function(){return Ir.tJ},fox:function(){return Ir.fo},VTd:function(){return Ir.VT},XsZ:function(){return Ir.Xs},AsW:function(){return ur},cLM:function(){return Po},m__:function(){return In},l09:function(){return de},D_t:function(){return wi.D},WiK:function(){return Wt},xJW:function(){return K.xJ},RVL:function(){return P.RV},Bc8:function(){return xr},hG9:function(){return xi},DCh:function(){return Ci},rjZ:function(){return ca.rj},Cqo:function(){return $a},jg7:function(){return ca.jg},gsn:function(){return Io.gs},$18:function(){return Cs},IIB:function(){return Io.II},RnZ:function(){return Zi},mX2:function(){return Io.mX},zDC:function(){return xo.zD},Phs:function(){return Io.Ph},aVo:function(){return Va},UGj:function(){return Yi},yq5:function(){return Qi},v2r:function(){return ga},HIW:function(){return hu},T3C:function(){return co},tlE:function(){return Ks},rop:function(){return Ns},gGi:function(){return $s},MBS:function(){return Vs.M},pGO:function(){return ks},Y8K:function(){return Ei},iVT:function(){return Io.iV},ODP:function(){return xo.OD},lbb:function(){return xo.lb},b7w:function(){return xo.b7},sUk:function(){return xo.sU},x1j:function(){return F.x1},m1v:function(){return P.m1},glM:function(){return Pt},xZD:function(){return F.xZ},IuH:function(){return Ir.Iu},MkN:function(){return F.Mk},Hof:function(){return Gs},n6:function(){return P.n6},DDd:function(){return Gm.D},G0E:function(){return P.G0},a$w:function(){return P.a$},TzZ:function(){return P.Tz},y00:function(){return F.y0},PhF:function(){return Et},Cqv:function(){return b.ShowFormData},cof:function(){return F.co},bts:function(){return b.Sortable},Fop:function(){return b.SortableContext},TRI:function(){return b.SortableItem},ORg:function(){return b.SortableProvider},TaI:function(){return Hs},qHe:function(){return dr.q},iA_:function(){return ko},gvM:function(){return ru},SnY:function(){return ll},ASv:function(){return au},bwk:function(){return oa},mQc:function(){return Mi},c__:function(){return lu},QZ3:function(){return Be},L39:function(){return Ka.L},jII:function(){return ul},mPs:function(){return vu},tgM:function(){return fu},gqx:function(){return Go.gq},Qm7:function(){return Go.Qm},_wD:function(){return Ma._w},rjl:function(){return Ma.rj},Fjw:function(){return F.Fj},SLL:function(){return F.SL},sBv:function(){return F.sB},iTm:function(){return K.iT},Pls:function(){return _t.Pl},Oxq:function(){return gt},WLi:function(){return je},$9M:function(){return K.$9},nCn:function(){return za},iNG:function(){return Sa},tD8:function(){return bi},pg9:function(){return zr},Ofb:function(){return K.Of},ibf:function(){return po},WyG:function(){return re},l6$:function(){return Ut.l6},WGR:function(){return Vt},C$H:function(){return xo.C$},cNQ:function(){return xo.cN},ZZb:function(){return K.ZZ},elO:function(){return xo.el},_Ko:function(){return so},Mev:function(){return oo},i2K:function(){return yo},WmO:function(){return Ir.Wm},oBi:function(){return _t.oB},igR:function(){return F.ig},DU1:function(){return F.DU},XCj:function(){return F.XC},lIL:function(){return _t.lI},hi9:function(){return _t.hi},p27:function(){return F.p2},z9d:function(){return al.z},eJW:function(){return _t.eJ},Cor:function(){return _t.Co},aZq:function(){return _t.aZ},P1D:function(){return gi},ngQ:function(){return _t.ng},ett:function(){return _t.et},ySm:function(){return St.y},Zd$:function(){return K.Zd},cLh:function(){return _t.cL},baz:function(){return K.b},fde:function(){return _t.fd},Xdt:function(){return xo.Xd},Cld:function(){return _t.Cl},vH8:function(){return _t.vH},PLH:function(){return Ir.PL},V8t:function(){return Ir.V8},tMk:function(){return Ir.tM},xQm:function(){return Ir.xQ},sRe:function(){return _t.sR},frb:function(){return qn},$N2:function(){return Ln},U1u:function(){return et},HS$:function(){return F.HS},vBu:function(){return F.vB},QYZ:function(){return F.QY},t9d:function(){return F.t9},Kgy:function(){return Ir.Kg},aJ2:function(){return Ir.aJ},n14:function(){return ca.n1},DiB:function(){return ca.Di},l1O:function(){return K.l1},w5o:function(){return K.w5},p3Q:function(){return K.p3},G5e:function(){return K.G5},xj2:function(){return K.xj},rxY:function(){return K.rx},Ils:function(){return xo.Il},zCB:function(){return F.zC},wNf:function(){return _t.wN},Dmu:function(){return _t.Dm},Bsl:function(){return P.Bs},yKv:function(){return Us.y},fMB:function(){return _t.fM},gCg:function(){return sl},eT6:function(){return K.eT},q4O:function(){return K.q4},ymE:function(){return Ma.ym}});var L={};e.r(L),e.d(L,{Action:function(){return F.aU},ActionBar:function(){return F.ol},ActionBarProvider:function(){return F.N0},ActionContext:function(){return F.fW},ActionContextProvider:function(){return F.EI},ActionDesigner:function(){return F.$L},AfterSuccess:function(){return F.$b},AntdSchemaComponentPlugin:function(){return Lo},AntdSchemaComponentProvider:function(){return Fo},AppendsTreeSelect:function(){return ea},AssignedFieldValues:function(){return F.eY},AssociationField:function(){return ra},AssociationSelect:function(){return fi},AttachmentList:function(){return Go.fU},AutoComplete:function(){return Bl},Block:function(){return cs},BlockItem:function(){return Ka.j},ButtonEditor:function(){return F.C1},CardItem:function(){return Ul},Cascader:function(){return Nl},Checkbox:function(){return ua},CollectionSelect:function(){return wl},ColorPicker:function(){return Xl},ColorSelect:function(){return Ql},Cron:function(){return hi},CronSet:function(){return ns},DataSourceCollectionCascader:function(){return Hl},DataSourceSelect:function(){return Gl},DatePicker:function(){return Pa},DatePickerProvider:function(){return as},Details:function(){return is},DetailsDesigner:function(){return ee},EditComponent:function(){return K.Fy},EditDefaultValue:function(){return K.Ni},EditDescription:function(){return K.q8},EditOperator:function(){return K.HG},EditPattern:function(){return K.QT},EditRequired:function(){return K.JE},EditSortField:function(){return il},EditTitle:function(){return K.$w},EditTitleField:function(){return K.nB},EditTooltip:function(){return K.Oc},EditValidationRules:function(){return K.zd},Editable:function(){return ol},EllipsisWithTooltip:function(){return Io.BQ},ErrorFallback:function(){return St.H},Expand:function(){return _i},Filter:function(){return Ir.wn},FilterAction:function(){return Ir.Gz},FilterActionContext:function(){return Ir.tJ},FilterContext:function(){return Ir.fo},FilterDynamicComponent:function(){return Ir.VT},FilterLogicContext:function(){return Ir.Xs},FixedBlock:function(){return ur},FixedBlockDesignerItem:function(){return Po},FixedBlockWrapper:function(){return In},Form:function(){return de},FormDialog:function(){return wi.D},FormField:function(){return Wt},FormItem:function(){return K.xJ},FormV2:function(){return xr},G2Plot:function(){return xi},G2PlotRenderer:function(){return Ci},Grid:function(){return ca.rj},GridCard:function(){return $a},GridRowContext:function(){return ca.jg},HTMLEncode:function(){return Io.gs},IconPicker:function(){return Cs},Input:function(){return Io.II},InputNumber:function(){return Zi},InputReadPretty:function(){return Io.mX},InputRecordPicker:function(){return xo.zD},Json:function(){return Io.Ph},List:function(){return Va},Markdown:function(){return Yi},MarkdownReadPretty:function(){return Qi},Menu:function(){return ga},NanoIDInput:function(){return hu},Page:function(){return co},Pagination:function(){return Ks},Password:function(){return Ns},Percent:function(){return $s},Preview:function(){return Vs.M},QuickEdit:function(){return ks},Radio:function(){return Ei},ReadPretty:function(){return Io.iV},ReadPrettyRecordPicker:function(){return xo.OD},RecordPicker:function(){return xo.lb},RecordPickerContext:function(){return xo.b7},RecordPickerProvider:function(){return xo.sU},RefreshDataBlockRequest:function(){return F.x1},RemoteSelect:function(){return Pt},RemoveButton:function(){return F.xZ},RemoveConditionContext:function(){return Ir.Iu},RequestSettings:function(){return F.Mk},RichText:function(){return Gs},SecondConFirm:function(){return F.y0},Select:function(){return Et},SkipValidation:function(){return F.co},Space:function(){return Hs},StablePopover:function(){return dr.q},Table:function(){return ko},TableBlockDesigner:function(){return ru},TableField:function(){return ll},TableSelectorDesigner:function(){return au},TableV2:function(){return oa},Tabs:function(){return Mi},TabsContextProvider:function(){return lu},Templates:function(){return Be},TestDesigner:function(){return Ka.L},TimePicker:function(){return ul},TreeSelect:function(){return vu},UnixTimestamp:function(){return fu},Upload:function(){return Go.gq},Uploader:function(){return Go.Qm},Variable:function(){return Ma._w},VariableScopeProvider:function(){return Ma.rj},WorkflowConfig:function(){return F.Fj},actionSettings:function(){return F.SL},actionSettingsItems:function(){return F.sB},allowAddNew:function(){return K.iT},defaultFieldNames:function(){return gt},fetchTemplateData:function(){return je},filterFormItemSettings:function(){return K.$9},findByUid:function(){return za},findKeysByUid:function(){return Sa},findMenuItem:function(){return bi},formDetailsSettings:function(){return zr},formItemSettings:function(){return K.Of},formSettings:function(){return po},formV1Settings:function(){return re},genStyleHook:function(){return Ut.l6},getCurrentOptions:function(){return Vt},getDatePickerLabels:function(){return xo.C$},getLabelFormatValue:function(){return xo.cN},isFileCollection:function(){return K.ZZ},isShowFilePicker:function(){return xo.el},pageSettings:function(){return so},pageTabSettings:function(){return oo},readPrettyFormSettings:function(){return yo},removeNullCondition:function(){return Ir.Wm},useA:function(){return F.ig},useActionBarContext:function(){return F.DU},useActionContext:function(){return F.XC},useCloseAction:function(){return F.p2},useColumnSchema:function(){return al.z},useDatePickerContext:function(){return gi},useDownloadLogs:function(){return St.y},useEnsureOperatorsValid:function(){return K.Zd},useFieldMode:function(){return K.b},useFieldNames:function(){return xo.Xd},useFilterActionProps:function(){return Ir.PL},useFilterFieldOptions:function(){return Ir.V8},useFilterFieldProps:function(){return Ir.tM},useFilterOptions:function(){return Ir.xQ},useFixedBlock:function(){return qn},useFixedSchema:function(){return Ln},useFormDataTemplates:function(){return et},useGetAriaLabelOfAction:function(){return F.HS},useGetAriaLabelOfDrawer:function(){return F.vB},useGetAriaLabelOfModal:function(){return F.QY},useGetAriaLabelOfPopover:function(){return F.t9},useGetFilterFieldOptions:function(){return Ir.Kg},useGetFilterOptions:function(){return Ir.aJ},useGridContext:function(){return ca.n1},useGridRowContext:function(){return ca.Di},useIsAddNewForm:function(){return K.l1},useIsAssociationField:function(){return K.w5},useIsFieldReadPretty:function(){return K.p3},useIsFileField:function(){return K.G5},useIsFormReadPretty:function(){return K.xj},useIsSelectFieldMode:function(){return K.rx},useLabelUiSchema:function(){return xo.Il},useLinkageAction:function(){return F.zC},useStyles:function(){return Us.y},useTabsContext:function(){return sl},useTitleFieldOptions:function(){return K.eT},useValidateSchema:function(){return K.q4},useVariableScope:function(){return Ma.ym}});var l=e(15009),N=e.n(l),v=e(99289),D=e.n(v),x=e(12444),W=e.n(x),r=e(72004),j=e.n(r),h=e(31996),O=e.n(h),g=e(26037),T=e.n(g),t=e(97857),o=e.n(t),c=e(67294),B=e(31601),b=e(14896),P=e(70993),m=e(89127),R=function(E){return D()(N()().mark(function J(){var q,ie;return N()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return ye.prev=0,ye.next=3,this.api.request(E);case 3:return ie=ye.sent,ye.abrupt("return",ie==null||(q=ie.data)===null||q===void 0?void 0:q.data);case 7:return ye.prev=7,ye.t0=ye.catch(0),ye.abrupt("return",[]);case 10:case"end":return ye.stop()}},J,this,[[0,7]])}))},F=e(76157),z=e(13769),M=e.n(z),S=e(57134),C=e(86201),a=e(94350),A=e(28459),i=e(57953),p=e(12174),u=e(6145),d=e(74538),f=e(64016),I=e(95354),n=e(85893),U=["form","children"],k=["form","children","disabled"],H=["request","effects","initialValue","useValues"],$=function(E){var J=E.form,q=E.children,ie=M()(E,U),_e=(0,a.useField)(),ye=(0,a.useFieldSchema)(),Fe=(0,_t.lI)(J.createVoidField(o()(o()({},_e.props),{},{basePath:""})));return(0,n.jsx)(a.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(a.FormContext.Provider,{value:J,children:(0,n.jsx)(S.FormLayout,o()(o()({layout:"vertical"},ie),{},{children:(0,n.jsx)(a.RecursionField,{basePath:Fe.address,schema:ye,onlyRenderProperties:!0})}))})})},V=function(E){return E.children},w=function(E){var J=E.form,q=E.children,ie=E.disabled,_e=M()(E,k),ye=(0,a.useField)(),Fe=(0,a.useFieldSchema)(),Ke=(0,_t.lI)(J.createVoidField(o()(o()({},ye.props),{},{basePath:""}))),Ve=(0,_t.Co)(Fe["x-component"],V);return(0,c.useEffect)(function(){J.disabled=ie||ye.disabled},[ie,ye.disabled]),(0,n.jsx)(A.ZP,{componentDisabled:ie,children:(0,n.jsx)(a.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(a.FormContext.Provider,{value:J,children:(0,n.jsx)(S.FormLayout,o()(o()({layout:"vertical"},_e),{},{children:(0,n.jsx)(a.FieldContext.Provider,{value:Ke,children:(0,n.jsx)(Ve,o()(o()({},ye.componentProps),{},{children:(0,n.jsx)(a.RecursionField,{basePath:Ke.address,schema:Fe,onlyRenderProperties:!0})}))})}))})})})},Z=function(E){var J=E.request,q=E.initialValue;return J||function(){return Promise.resolve({data:q})}},se=function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,p.QT)(Z(J),E)},ae=(0,c.createContext)(null);ae.displayName="FormBlockContext";var de=(0,a.observer)(function(G){var E=G.request,J=G.effects,q=G.initialValue,ie=G.useValues,_e=ie===void 0?se:ie,ye=M()(G,H),Fe=(0,a.useFieldSchema)(),Ke=(0,a.useField)(),Ve=(0,c.useMemo)(function(){return(0,C.createForm)({effects:J})},[]),Ye=_e({uid:Fe["x-uid"],onSuccess:function(nt){return D()(N()().mark(function ut(){return N()().wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return dt.next=2,Ve.reset();case 2:Ve.setValues(nt==null?void 0:nt.data),Ve.setInitialValues(nt==null?void 0:nt.data);case 4:case"end":return dt.stop()}},ut)}))()}},G),Qe=(0,c.useContext)(ae);return(0,n.jsx)(ae.Provider,{value:{parent:Qe,form:Ve,result:Ye,field:Ke,fieldSchema:Fe},children:(0,n.jsx)(i.Z,{spinning:(Ye==null?void 0:Ye.loading)||!1,children:Fe["x-decorator"]==="Form"?(0,n.jsx)(w,o()({form:Ve},ye)):(0,n.jsx)($,o()({form:Ve},ye))})})},{displayName:"Form"});de.Designer=function(){var E=(0,u.useCollection_deprecated)(),J=E.name,q=E.title,ie=(0,I.zy)();return(0,n.jsxs)(d.aN,{template:ie,title:q||J,children:[(0,n.jsx)(f.G,{componentName:"Form",collectionName:J}),(0,n.jsx)(d.Z5,{}),(0,n.jsx)(d.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var ne=e(5537),re=new ne.F5({name:"FormV1Settings",items:[{name:"template",Component:f.G,useComponentProps:function(){var E=(0,u.useCollection_deprecated)(),J=E.name;return{componentName:"Form",collectionName:J}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),K=e(54801),ge=function(){var E=(0,u.useCollection_deprecated)(),J=E.name,q=E.title,ie=(0,I.zy)();return(0,n.jsx)(d.aN,{schemaSettings:"FormSettings",template:ie,title:q||J})},ce=function(){var E=(0,u.useCollection_deprecated)(),J=E.name,q=E.title,ie=(0,I.zy)();return(0,n.jsx)(d.aN,{schemaSettings:"ReadPrettyFormSettings",template:ie,title:q||J})},ee=function(){var E=(0,u.useCollection_deprecated)(),J=E.name,q=E.title,ie=(0,I.zy)();return(0,n.jsx)(d.aN,{schemaSettings:"FormDetailsSettings",template:ie,title:q||J})},xe=function(){var E=(0,u.useCollection_deprecated)(),J=E.name,q=E.title,ie=(0,I.zy)();return(0,n.jsx)(d.aN,{schemaSettings:"blockSettings:filterForm",template:ie,title:q||J})},Se=e(7340),Ae=e(15503),Ee=e(68230),he=e(9783),pe=e.n(he),X=e(68400),Q=e.n(X),ue=e(97133),be=e(85667),fe=e(73773),Pe=e(68433),Ie=e(9361),Ue=e(96486),$e=e.n(Ue),Me=e(31019),ve=e(4595),Ce=e(86406),oe=e(90615),y=e(44256),Y=e(76690),me=e(34588),le=e(9780),Le=e(18686),qe=e(72594),We=e(5574),ke=e.n(We),rt=e(42075),Re=e(34041),Ge=e(26793),st=e(32268),Ut=e(60094),qt=e(52677),an=e.n(qt),An=e(50888),fn=e(66309),En=e(96074),er=e(27484),At=e.n(er),Dn=e(87714),_t=e(84577),hn=e(4340),Pn=e(97937),en=e(32983),kt=e(58812),ln=e(96695),_n=e.n(ln),mn=e(19632),Ot=e.n(mn),gt={label:"label",value:"value",color:"color",options:"children"};function Mt(G,E){var J=[];if(!Array.isArray(G))return J;for(var q=0;q<G.length;q++){var ie=G[q][E.options];Array.isArray(ie)&&J.push.apply(J,Ot()(Mt(ie,E))),J.push(o()({},G[q]))}return J}function Vt(G,E,J){var q=Mt(E,J),ie=(0,Ue.castArray)(G).filter(function(ye){return ye!=null}).map(function(ye){return(0,Pe.isPlainObject)(ye)?ye[J.value]:ye});function _e(ye){if(!ye)return[];var Fe=[],Ke=_n()(ie),Ve;try{var Ye=function(){var ht=Ve.value,nt=ye.find(function(ut){return ut[J.value]==ht})||{value:ht,label:ht&&ht.toString()};Fe.push(nt)};for(Ke.s();!(Ve=Ke.n()).done;)Ye()}catch(Qe){Ke.e(Qe)}finally{Ke.f()}return Fe}return _e(q)}var Kt=e(67668),xt=(0,a.observer)(function(G){var E,J=o()(o()({},gt),G.fieldNames),q=(0,a.useField)();if(!(0,fe.isValid)(G.value))return(0,n.jsx)("div",{});if((0,C.isArrayField)(q)&&(q==null||(E=q.value)===null||E===void 0?void 0:E.length)===0)return(0,n.jsx)("div",{});var ie=(0,Kt.Hy)(),_e=q.dataSource||G.options||(ie==null?void 0:ie.uiSchema.enum)||[],ye=Vt(q.value,_e,J);return(0,n.jsx)("div",{children:(0,n.jsx)(kt.B,{ellipsis:G.ellipsis,children:ye.map(function(Fe,Ke){return(0,n.jsx)(fn.Z,{color:Fe[J.color],icon:Fe.icon,children:Fe[J.label]},Ke)})})})},{displayName:"ReadPretty"}),un=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],nn=["objectValue","loading","value","rawOptions","defaultValue"],jn=function(E){return!(0,fe.isValid)(E)||an()(E)==="object"&&Object.keys(E).length===0},Cn=function(E){var J=E.value,q=E.options,ie=E.onChange,_e=E.fieldNames,ye=E.mode,Fe=E.loading,Ke=E.rawOptions,Ve=E.defaultValue,Ye=M()(E,un),Qe=function(nt){var ut;if(!jn(nt)){var lt=(0,fe.toArr)(nt).filter(function(yt){return yt}).map(function(yt){return(0,Pe.isPlainObject)(yt)?yt[_e.value]:yt}),dt=(ut=Vt(lt,q,_e))===null||ut===void 0?void 0:ut.map(function(yt){return{label:yt[_e.label],value:yt[_e.value]}});return["tags","multiple"].includes(ye)||E.multiple?dt:dt.shift()}};return(0,n.jsx)(Re.default,o()({role:"button","data-testid":"select-object-".concat(ye||"single"),value:Qe(J),defaultValue:Qe(Ve),allowClear:{clearIcon:(0,n.jsx)(hn.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Fe?(0,n.jsx)(i.Z,{}):(0,n.jsx)(en.Z,{image:en.Z.PRESENTED_IMAGE_SIMPLE}),options:q,fieldNames:_e,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(nt,ut){var lt;return((lt=ut==null?void 0:ut[_e.label||"label"])!==null&&lt!==void 0?lt:"").includes(nt)},filterSort:function(nt,ut){var lt,dt;return((lt=nt==null?void 0:nt[_e.label||"label"])!==null&&lt!==void 0?lt:"").toLowerCase().localeCompare(((dt=ut==null?void 0:ut[_e.label||"label"])!==null&&dt!==void 0?dt:"").toLowerCase())},onChange:function(nt){var ut=Vt((0,fe.toArr)(nt).map(function(lt){return lt.value}),Ke||q,_e);["tags","multiple"].includes(ye)||E.multiple?ie==null||ie(ut):ie==null||ie(ut.shift()||null)},mode:ye,tagRender:function(nt){return(0,n.jsx)(fn.Z,o()(o()({role:"button","aria-label":nt.label,closeIcon:(0,n.jsx)(Pn.Z,{role:"button","aria-label":"icon-close-tag"})},nt),{},{children:nt.label}))}},Ye))},Dt=function(E,J){var q;return((q=J==null?void 0:J.label)!==null&&q!==void 0?q:"").toLowerCase().includes((E||"").toLowerCase())},$t=(0,a.connect)(function(G){var E=G.objectValue,J=G.loading,q=G.value,ie=G.rawOptions,_e=G.defaultValue,ye=M()(G,nn),Fe=G.multiple?"multiple":G.mode;if(Fe&&!["multiple","tags"].includes(Fe)&&(Fe=void 0),E)return(0,n.jsx)(Cn,o()(o()({rawOptions:ie},ye),{},{defaultValue:_e,value:q,mode:Fe,loading:J}));var Ke=function(Ye){return["tags","multiple"].includes(G.mode)||G.multiple?Ye?(0,fe.toArr)(Ye):void 0:Ye};return(0,n.jsx)(Re.default,o()(o()({role:"button","data-testid":"select-".concat(Fe||"single"),showSearch:!0,filterOption:Dt,allowClear:{clearIcon:(0,n.jsx)(hn.Z,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:J?(0,n.jsx)(i.Z,{}):(0,n.jsx)(en.Z,{image:en.Z.PRESENTED_IMAGE_SIMPLE}),value:Ke(q),defaultValue:Ke(_e),tagRender:function(Ye){return(0,n.jsx)(fn.Z,o()(o()({role:"button","aria-label":Ye.label,closeIcon:(0,n.jsx)(Pn.Z,{role:"button","aria-label":"icon-close-tag"})},Ye),{},{children:Ye.label}))}},ye),{},{onChange:function(Ye){var Qe;(Qe=G.onChange)===null||Qe===void 0||Qe.call(G,Ye===void 0?null:Ye)},mode:Fe}))},(0,a.mapProps)({dataSource:"options"},function(G,E){return o()(o()({},G),{},{fieldNames:o()(o()({},gt),G.fieldNames),suffixIcon:E!=null&&E.loading||E!=null&&E.validating?(0,n.jsx)(An.Z,{}):G.suffixIcon})}),(0,a.mapReadPretty)(xt)),Et=$t;Et.ReadPretty=xt;var xn=Et,Zt=e(36586),on=function(E,J){return(0,Ue.castArray)(E).filter(function(q){return q!=null}).map(function(q){return an()(q)==="object"?q[J.value]:q})},rn=(0,a.observer)(function(G){var E=o()(o()({},gt),G.fieldNames),J=(0,a.useField)(),q=(0,a.useFieldSchema)(),ie=(0,Zt.a)(),_e=(0,F.XC)(),ye=_e.snapshot,Fe=(0,p.QT)(ye?D()(N()().mark(function Ve(){return N()().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.abrupt("return",{data:ie[q.name]});case 1:case"end":return Qe.stop()}},Ve)})):o()(o()({action:"list"},G.service),{},{params:{paginate:!1,filter:pe()({},E.value,{$in:on(J.value,E)})}}),{refreshDeps:[G.service,J.value]}),Ke=Fe.data;return(0,n.jsx)(Et.ReadPretty,o()(o()({},G),{},{options:Ke==null?void 0:Ke.data}))},{displayName:"ReadPretty"}),Un=e(8341),On=e(44990),Fn=["fieldNames","service","wait","value","defaultValue","objectValue","manual","mapOptions","targetField","CustomDropdownRender","optionFilter","dataSource"],Ct="N/A",Je=(0,a.connect)(function(G){var E,J,q=G.fieldNames,ie=q===void 0?{}:q,_e=G.service,ye=_e===void 0?{}:_e,Fe=G.wait,Ke=Fe===void 0?300:Fe,Ve=G.value,Ye=G.defaultValue,Qe=G.objectValue,ht=G.manual,nt=ht===void 0?!0:ht,ut=G.mapOptions,lt=G.targetField,dt=G.CustomDropdownRender,yt=G.optionFilter,bt=G.dataSource,Yt=M()(G,Fn),Gt=(0,On.FC)(),$n=(0,Un.FE)(bt||Gt),vn=(0,c.useState)(!1),Nt=ke()(vn,2),pn=Nt[0],Vn=Nt[1],Hn=(0,c.useRef)(!1),Qn=(0,a.useFieldSchema)(),Mn=((E=Qn["x-component-props"])===null||E===void 0?void 0:E.addMode)==="quickAdd",lr=(0,u.useCollection_deprecated)(),Sn=lr.getField,Er=(0,c.useRef)(null),Tr=(0,u.useCollectionManager_deprecated)(),Or=Tr.getCollectionJoinField,or=Tr.getInterface,cr=Qn["x-collection-field"]||Qn.name,Jn=Sn(cr)||Or(cr),Bn=lt||(Jn==null?void 0:Jn.target)&&(ie==null?void 0:ie.label)&&Or("".concat(Jn.target,".").concat(ie.label)),Xn=(0,c.useMemo)(function(){if(Bn!=null&&Bn.interface){var Yr;return((Yr=or(Bn.interface))===null||Yr===void 0||(Yr=Yr.filterable)===null||Yr===void 0?void 0:Yr.operators[0].value)||"$includes"}return"$includes"},[Bn]),nr=(0,_t.eJ)(),yn=(0,c.useCallback)(function(Yr){try{return Yr.filter(function(eo){return["number","string"].includes(an()(eo[ie.value]))}).map(function(eo){var So,jo,Ao=nr(eo[ie.label]);if(Bn!=null&&(So=Bn.uiSchema)!==null&&So!==void 0&&So.enum)if(Array.isArray(Ao))Ao=Ao.map(function(aa,cl){var ia=Bn.uiSchema.enum.find(function(Ai){return Ai.value===aa});return ia?(0,n.jsx)(fn.Z,{role:"button",color:ia.color,style:{marginRight:3},children:(ia==null?void 0:ia.label)||aa},cl):(0,n.jsx)(fn.Z,{role:"button",children:aa},aa)}).reverse();else{var wo=Bn.uiSchema.enum.find(function(aa){return aa.value===Ao});wo&&(Ao=(0,n.jsx)(fn.Z,{role:"button",color:wo.color,children:wo.label}))}if((Bn==null?void 0:Bn.type)==="date"&&(Ao=At()(Ao).format("YYYY-MM-DD")),ut){var Vo;return ut((Vo={},pe()(Vo,ie.label,Ao||Ct),pe()(Vo,ie.value,eo[ie.value]),Vo))}return o()(o()({},eo),{},(jo={},pe()(jo,ie.label,Ao||Ct),pe()(jo,ie.value,eo[ie.value]),jo))}).filter(Boolean)}catch(eo){return console.error(eo),Yr}},[Bn==null?void 0:Bn.uiSchema,ie]),wn=(0,p.QT)(o()(o()({action:"list"},ye),{},{headers:$n,params:o()(o()({pageSize:200},ye==null?void 0:ye.params),{},{filter:ye==null||(J=ye.params)===null||J===void 0?void 0:J.filter})}),{manual:nt,debounceWait:Ke}),sr=wn.data,br=wn.run,hr=wn.loading,Rr=(0,c.useMemo)(function(){return JSON.stringify({service:ye,fieldNames:ie})},[ye,ie]),pr=(0,c.useCallback)(function(){return Er.current&&dt?(0,n.jsx)(dt,{search:Er.current,callBack:function(){Er.current=null,Vn(!1)}}):null},[Er.current]);(0,c.useEffect)(function(){Hn.current&&br()},[Rr]);var wr=function(){var Yr=D()(N()().mark(function eo(So){var jo;return N()().wrap(function(wo){for(;;)switch(wo.prev=wo.next){case 0:br({filter:(0,Dn.EO)([So?pe()({},ie.label,pe()({},Xn,So)):{},ye==null||(jo=ye.params)===null||jo===void 0?void 0:jo.filter])}),Er.current=So;case 2:case"end":return wo.stop()}},eo)}));return function(So){return Yr.apply(this,arguments)}}(),io=(0,c.useMemo)(function(){var Yr,eo=Ve||Ye;if(!(sr!=null&&(Yr=sr.data)!==null&&Yr!==void 0&&Yr.length))return eo!=null?Array.isArray(eo)?eo:[eo]:[];var So=eo!=null&&(Array.isArray(eo)?eo:[o()(o()({},eo),{},pe()({},ie.value,eo[ie.value]||eo))])||[],jo=typeof yt=="function"?sr.data.filter(yt):sr.data;return(0,Ue.uniqBy)(jo.concat(So!=null?So:[]),ie.value)},[Ve,Ye,sr==null?void 0:sr.data,ie.value,yt]),Xr=function(eo){Vn(eo),Er.current=null,eo&&br(),Hn.current=!0};return(0,n.jsx)(Et,o()(o()({open:pn,popupMatchSelectWidth:!1,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:ie,onSearch:wr,onDropdownVisibleChange:Xr,objectValue:Qe,value:Ve,defaultValue:Ye},Yt),{},{loading:sr?hr:!0,options:yn(io),rawOptions:io,dropdownRender:function(eo){var So=io.some(function(jo){return jo[ie.label]===Er.current});return(0,n.jsx)(n.Fragment,{children:Mn?(0,n.jsxs)(n.Fragment,{children:[!((sr==null?void 0:sr.data.length)===0&&Er!==null&&Er!==void 0&&Er.current)&&eo,(sr==null?void 0:sr.data.length)>0&&(Er==null?void 0:Er.current)&&!So&&(0,n.jsx)(En.Z,{style:{margin:0}}),!So&&(0,n.jsx)(pr,{})]}):eo})}}))},(0,a.mapProps)({dataSource:"options"},function(G,E){var J,q=(0,a.useFieldSchema)();return o()(o()({},G),{},{fieldNames:o()(o()(o()(o()({},gt),G.fieldNames),E.componentProps.fieldNames),(J=q["x-component-props"])===null||J===void 0?void 0:J.fieldNames),suffixIcon:E!=null&&E.loading||E!=null&&E.validating?(0,n.jsx)(An.Z,{}):G.suffixIcon})}),(0,a.mapReadPretty)(rn)),Pt=Je;Pt.ReadPretty=rn;var Tt=null,et=function(){var E=(0,a.useFieldSchema)(),J=(0,Ge.$)(),q=J.t,ie=(0,Se.bz)(),_e=ie.duplicateData,ye=(0,u.useCollectionManager_deprecated)(),Fe=ye.getCollectionJoinField;if(_e)return _e;var Ke=tt(E),Ve=Ke.items,Ye=Ve===void 0?[]:Ve,Qe=Ke.display,ht=Qe===void 0?!0:Qe;Ye.forEach(function(lt){try{var dt;lt.fields=(dt=lt.fields)===null||dt===void 0?void 0:dt.map(function(yt){var bt=Fe("".concat(lt.collection,".").concat(yt));return bt?yt:""}).filter(Boolean)}catch(yt){(0,Pe.error)(yt),lt.fields=[]}});var nt=[{key:"none",title:q("None")}].concat(Ye.map(function(lt,dt){return o()(o()({key:dt},lt),{},{isLeaf:lt.dataId!==null&&lt.dataId!==void 0,titleCollectionField:(lt==null?void 0:lt.titleField)&&Fe("".concat(lt.collection,".").concat(lt.titleField))})})),ut=Ye.find(function(lt){return lt.default});return{templates:nt,display:ht,defaultTemplate:ut,enabled:Ye.length>0&&Ye.every(function(lt){return lt.dataId||lt.dataScope})}},Be=function(E){var J=E.style,q=J===void 0?{}:J,ie=E.form,_e=(0,Ut.dQ)(),ye=_e.token,Fe=et(),Ke=Fe.templates,Ve=Fe.display,Ye=Fe.enabled,Qe=Fe.defaultTemplate,ht=(0,u.useCollectionManager_deprecated)(),nt=ht.getCollectionJoinField,ut=(0,st.ss)(Ke),lt=(0,c.useState)((Qe==null?void 0:Qe.key)||"none"),dt=ke()(lt,2),yt=dt[0],bt=dt[1],Yt=(0,c.useState)(null),Gt=ke()(Yt,2),$n=Gt[0],vn=Gt[1],Nt=(0,p.LY)(),pn=(0,Ge.$)(),Vn=pn.t;(0,c.useEffect)(function(){Ye&&Qe&&ie&&(ie.__template=!0,Qe.key==="duplicate"&&lr(Qe.dataId,Qe))},[]),(0,c.useEffect)(function(){ut!=null&&ut.some(function(Er){return Er.key===yt})||Mn("none")},[ut]);var Hn=(0,c.useMemo)(function(){return o()({display:"flex",alignItems:"center",backgroundColor:ye.colorFillAlter,padding:ye.padding},q)},[q,ye.colorFillAlter]),Qn=(0,c.useMemo)(function(){return{fontSize:ye.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:ye.marginXS}},[ye.fontSize,ye.marginXS]),Mn=(0,c.useCallback)(function(){var Er=D()(N()().mark(function Tr(Or){return N()().wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:bt(Or),vn(null),ie==null||ie.reset();case 3:case"end":return cr.stop()}},Tr)}));return function(Tr){return Er.apply(this,arguments)}}(),[]),lr=(0,c.useCallback)(function(){var Er=D()(N()().mark(function Tr(Or,or){var cr;return N()().wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:cr=o()(o()({},or),{},{dataId:Or}),vn(or),je(Nt,cr,Vn).then(function(Xn){return ie&&Xn&&(ie.reset(),ie.__template=!0,(0,Pe.forEach)(Xn,function(nr,yn){if(nr){var wn;ie.values[yn]=nr,ie==null||(wn=ie.setInitialValuesIn)===null||wn===void 0||wn.call(ie,yn,nr)}})),Xn}).catch(function(Xn){console.error(Xn)});case 3:case"end":return Bn.stop()}},Tr)}));return function(Tr,Or){return Er.apply(this,arguments)}}(),[]);if(!Ye||!Ve)return null;var Sn=ut==null?void 0:ut.find(function(Er){return Er.key===yt});return(0,n.jsx)("div",{style:Hn,children:(0,n.jsxs)(rt.Z,{wrap:!0,children:[(0,n.jsxs)("label",{style:Qn,children:[Vn("Data template"),": "]}),(0,n.jsx)(Re.default,{role:"button","data-testid":"select-form-data-template",popupMatchSelectWidth:!1,options:ut,fieldNames:{label:"title",value:"key"},value:yt,onChange:Mn}),yt!=="none"&&Sn&&(0,n.jsx)(Pt,{style:{width:220},fieldNames:{label:Sn==null?void 0:Sn.titleField,value:"id"},target:Sn==null?void 0:Sn.collection,value:$n,objectValue:!0,service:{resource:Sn==null?void 0:Sn.collection,params:{filter:Sn==null?void 0:Sn.dataScope}},onChange:function(Tr){return lr(Tr==null?void 0:Tr.id,o()(o()({},Tr),Sn))},targetField:nt("".concat(Sn==null?void 0:Sn.collection,".").concat(Sn.titleField))})]})})};function tt(G){var E=(0,Se.Fi)(G);return E?$e().cloneDeep(E["x-data-templates"])||{}:{}}function je(G,E,J){return Te.apply(this,arguments)}function Te(){return Te=D()(N()().mark(function G(E,J,q){return N()().wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(!(J.fields.length===0||!J.dataId)){_e.next=2;break}return _e.abrupt("return");case 2:return _e.abrupt("return",E.resource(J.collection).get({filterByTk:J.dataId,fields:J.fields,isTemplate:!0}).then(function(ye){var Fe;return(Fe=ye.data)===null||Fe===void 0?void 0:Fe.data}));case 3:case"end":return _e.stop()}},G)})),Te.apply(this,arguments)}var De=e(3192),Xe=function(){var E,J,q=(0,Le.aZ)(),ie=(0,a.useFieldSchema)(),_e=Ie.Z.useToken(),ye=_e.token,Fe=(0,_t.ng)(),Ke=Fe.designable,Ve=(0,De.g)()||{},Ye=Ve.heightProps,Qe=Ye||{},ht=Qe.title,nt=et(),ut=nt.display,lt=nt.enabled,dt=ie.reduceProperties(function(lr,Sn){return Sn["x-component"]==="ActionBar"?Sn:lr}),yt=Object.keys((dt==null?void 0:dt.properties)||{}).length>0,bt=ie==null||(E=ie.parent)===null||E===void 0||(E=E["x-decorator"])===null||E===void 0||(J=E.includes)===null||J===void 0?void 0:J.call(E,"FormBlockProvider"),Yt=yt||Ke?ye.controlHeight+(bt?1:2)*ye.marginLG:ye.marginLG,Gt=ht?ye.fontSizeLG*ye.lineHeightLG+ye.padding*2-1:0,$n=(0,qe.hS)()||{},vn=$n.data,Nt=(vn==null?void 0:vn.meta)||{},pn=Nt.count,Vn=Nt.pageSize,Hn=pn>Vn,Qn=Hn?ye.controlHeightSM+1*ye.paddingLG:0,Mn=ut&&lt?ye.controlHeight+2*ye.padding+ye.margin:0;return q-Yt-ye.paddingLG-Gt-Qn-Mn},Ze=e(25324),He,ct,at=["form","children"],ft=["form","children","disabled"],Lt=["form","disabled"],Jt=function(E){var J=E.form,q=E.children,ie=M()(E,at),_e=(0,a.useField)(),ye=(0,a.useFieldSchema)(),Fe=(0,_t.lI)(J.createVoidField(o()(o()({},_e.props),{},{basePath:""}))),Ke=Xe(),Ve=Ie.Z.useToken(),Ye=Ve.token,Qe=(0,_t.ng)(),ht=Qe.designable;return(0,n.jsx)(a.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(a.FormContext.Provider,{value:J,children:(0,n.jsx)(S.FormLayout,o()(o()({layout:"vertical"},ie),{},{children:(0,n.jsx)("div",{className:(0,ue.css)(He||(He=Q()([`
650
+ `]))))}));return(0,se.jsx)(oe.BQs,{ellipsis:!0,popoverContent:Kt,children:Kt})};var an=(0,l.createContext)([]);an.displayName="VariableScopeContext";function An(At){var Dn=At.scope,_t=Dn===void 0?[]:Dn,hn=At.children;return(0,se.jsx)(an.Provider,{value:_t,children:hn})}function fn(){return(0,l.useContext)(an)}function En(){return null}En.Input=(0,L.connect)(Ae),En.TextArea=(0,L.connect)(st,(0,L.mapReadPretty)(st.ReadPretty)),En.RawTextArea=(0,L.connect)(Pe),En.JSON=(0,L.connect)(Ue);var er=null},88969:function(ze,te,e){"use strict";e.d(te,{m:function(){return m}});var L=e(15009),l=e.n(L),N=e(19632),v=e.n(N),D=e(99289),x=e.n(D),W=e(5574),r=e.n(W),j=e(97133),h=e(38089),O=e(67294),g=e(26793),T=e(60094),t=e(9783),o=e.n(t),c=(0,T.l6)("nb-variable-select",function(R){var F=R.componentCls;return o()({},F,{position:"relative",".ant-select.ant-cascader":{position:"absolute",top:"-1px",right:"-1px",minWidth:"auto",width:"calc(100% + 2px)",height:"calc(100% + 2px)",overflow:"hidden",opacity:0},".variable-btn":{fontStyle:"italic",fontFamily:"'New York', 'Times New Roman', Times, serif"},".Cascader-popupClassName":{".ant-cascader-menu":{marginBottom:0}}})}),B=c,b=e(2876),P=e(85893);function m(R){var F=R.options,z=R.setOptions,M=R.onInsert,S=R.changeOnSelect,C=S===void 0?!1:S,a=R.fieldNames,A=a===void 0?{}:a,i=R.className,p=(0,g.$)(),u=p.t,d=(0,O.useState)([]),f=r()(d,2),I=f[0],n=f[1],U=B(),k=U.wrapSSR,H=U.componentCls,$=U.hashId,V=(0,T.dQ)(),w=V.token;function Z(ae){return se.apply(this,arguments)}function se(){return se=x()(l()().mark(function ae(de){var ne,re;return l()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(re=de[de.length-1],!(!((ne=re.children)!==null&&ne!==void 0&&ne.length)&&!re.isLeaf&&re.loadChildren)){ge.next=5;break}return ge.next=4,re.loadChildren(re);case 4:z(function(ce){return v()(ce)});case 5:case"end":return ge.stop()}},ae)})),se.apply(this,arguments)}return k((0,P.jsx)(b.R,{className:(0,j.cx)("x-button",H,$,i),children:(0,P.jsx)(h.Z,{placeholder:u("Select a variable"),value:[],options:F,fieldNames:A,loadData:Z,onChange:function(){var de,ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(n(ne),!!ne.length){var K=re[re.length-1];(!(K!=null&&(de=K.children)!==null&&de!==void 0&&de.length)&&!(K!=null&&K.loadChildren)||K!=null&&K.isLeaf)&&M(ne)}},changeOnSelect:C,onClick:function(de){if(!(de.detail!==2||!C))for(var ne=de.target;ne&&ne!==de.currentTarget;ne=ne.parentNode){var re;Array.from((re=ne.classList)!==null&&re!==void 0?re:[]).includes("ant-cascader-menu-item")&&M(I)}},popupClassName:"Cascader-popupClassName",dropdownRender:C?function(ae){return(0,P.jsxs)(P.Fragment,{children:[ae,(0,P.jsx)("div",{style:{padding:"0.5em",borderTop:"1px solid ".concat(w.colorBorder),color:w.colorTextDescription},children:u("Double click to choose entire object")})]})}:null})}))}},2876:function(ze,te,e){"use strict";e.d(te,{R:function(){return x}});var L=e(97857),l=e.n(L),N=e(15867),v=e(67294),D=e(85893),x=(0,v.forwardRef)(function(W,r){var j=(0,v.useMemo)(function(){return{fontStyle:"italic",fontFamily:"New York, Times New Roman, Times, serif"}},[]);return(0,D.jsxs)(N.ZP,l()(l()({"aria-label":"variable-button",ref:r,style:j},W),{},{children:["x",W.children]}))});x.displayName="XButton"},72724:function(ze,te,e){"use strict";e.d(te,{L:function(){return T}});var L=e(97857),l=e.n(L),N=e(5574),v=e.n(N),D=e(94697),x=e(94350),W=e(67294),r=e(26793),j=e(21143),h=e(84577),O=e(85893),g=function(o){var c=(0,h.ng)(),B=c.refresh,b=(0,j.useAPIClient)(),P=(0,r.$)(),m=P.t;return(0,W.useCallback)(function(R){var F,z,M,S,C,a,A,i,p=R.active,u=R.over,d=p==null||(F=p.data)===null||F===void 0||(F=F.current)===null||F===void 0?void 0:F.schema,f=u==null||(z=u.data)===null||z===void 0||(z=z.current)===null||z===void 0?void 0:z.schema,I=u==null||(M=u.data)===null||M===void 0||(M=M.current)===null||M===void 0?void 0:M.insertAdjacent,n=u==null||(S=u.data)===null||S===void 0||(S=S.current)===null||S===void 0?void 0:S.breakRemoveOn,U=u==null||(C=u.data)===null||C===void 0||(C=C.current)===null||C===void 0?void 0:C.wrapSchema,k=u==null||(a=u.data)===null||a===void 0||(a=a.current)===null||a===void 0?void 0:a.onSuccess,H=(A=u==null||(i=u.data)===null||i===void 0||(i=i.current)===null||i===void 0?void 0:i.removeParentsIfNoChildren)!==null&&A!==void 0?A:!0;if(!d||!f){o==null||o(R);return}if(d===f){o==null||o(R);return}if(d.parent===f&&I==="beforeEnd"){o==null||o(R);return}var $=(0,h.Pl)({t:m,api:b,refresh:B,current:f});if($.loadAPIClientEvents(),d.parent===f.parent){$.insertBeforeBeginOrAfterEnd(d),o==null||o(R);return}if(I){$.insertAdjacent(I,d,{wrap:U,breakRemoveOn:n,removeParentsIfNoChildren:H,onSuccess:k}),o==null||o(R);return}},[o])},T=(0,x.observer)(function(t){var o=(0,r.$)(),c=o.t,B=(0,W.useState)(!0),b=v()(B,2),P=b[0],m=b[1],R=(0,W.useCallback)(function(z){var M,S=z.active,C=S==null||(M=S.data)===null||M===void 0||(M=M.current)===null||M===void 0?void 0:M.schema;if(m(!!C),t!=null&&t.onDragStart){var a;t==null||(a=t.onDragStart)===null||a===void 0||a.call(t,z)}},[t==null?void 0:t.onDragStart]),F=g(t==null?void 0:t.onDragEnd);return(0,O.jsxs)(D.DndContext,l()(l()({collisionDetection:D.rectIntersection},t),{},{onDragStart:R,onDragEnd:F,children:[(0,O.jsx)(D.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:P&&(0,O.jsx)("span",{style:{whiteSpace:"nowrap"},children:c("Dragging")})}),t.children]}))},{displayName:"DndContext"})},14896:function(ze,te,e){"use strict";e.r(te),e.d(te,{DndContext:function(){return L.L},DragHandler:function(){return l.IW},DraggableContext:function(){return l.LC},ShowFormData:function(){return x},Sortable:function(){return l.bt},SortableContext:function(){return l.Fo},SortableItem:function(){return l.TR},SortableProvider:function(){return l.OR}});var L=e(72724),l=e(20493),N=e(67294),v=e(94350),D=e(85893),x=(0,v.observer)(function(W){var r=W.children,j=(0,v.useForm)();return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("pre",{style:{marginBottom:20},"data-testid":"form-data",children:JSON.stringify(j.values,null,2)}),r]})})},20493:function(ze,te,e){"use strict";e.d(te,{IW:function(){return R},LC:function(){return t},bt:function(){return B},Fo:function(){return o},TR:function(){return m},OR:function(){return c}});var L=e(97857),l=e.n(L),N=e(13769),v=e.n(N),D=e(10274),x=e(94697),W=e(97133),r=e(94350),j=e(67294),h=e(60094),O=e(85893),g=["component","overStyle","style","children","openMode"],T=["schema","id","eid","removeParentsIfNoChildren"],t=(0,j.createContext)(null);t.displayName="DraggableContext";var o=(0,j.createContext)(null);o.displayName="SortableContext";var c=function(z){var M=z.id,S=z.data,C=z.children,a=(0,x.useDraggable)({id:M,data:S}),A=(0,x.useDroppable)({id:M,data:S});return(0,O.jsx)(o.Provider,{value:{draggable:a,droppable:A},children:C})},B=function(z){var M,S,C=z.component,a=z.overStyle,A=z.style,i=z.children,p=z.openMode,u=v()(z,g),d=(0,h.dQ)(),f=d.token,I=(0,j.useContext)(o),n=I.draggable,U=I.droppable,k=U.isOver,H=U.setNodeRef,$=l()({},A);return k&&(n==null||(M=n.active)===null||M===void 0?void 0:M.id)!==(U==null||(S=U.over)===null||S===void 0?void 0:S.id)&&($[C==="a"?"color":"background"]=new D.C(f.colorSettings).setAlpha(.15).toHex8String(),Object.assign($,a)),j.createElement(C||"div",l()(l()({role:"none"},u),{},{className:(0,W.cx)("nb-sortable-designer",z.className),ref:H,style:$}),i)},b=function(z){var M=P(z),S=(0,r.useFieldSchema)();return z.schema?l()(l()({},z),{},{id:M}):l()(l()({},z),{},{id:M,schema:S})},P=function(z){var M=(0,r.useField)();return z.id?z.id:M.address.toString()},m=(0,r.observer)(function(F){var z=b(F),M=z.schema,S=z.id,C=z.eid,a=z.removeParentsIfNoChildren,A=v()(z,T),i=(0,j.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:M,removeParentsIfNoChildren:a!=null?a:!0}},[M,a]);return(0,O.jsx)(c,{id:S,data:i,children:(0,O.jsx)(B,l()(l()({id:C},A),{},{children:F.children}))})},{displayName:"SortableItem"}),R=function(z){var M=(0,j.useContext)(o),S=M.draggable,C=S.attributes,a=S.listeners,A=S.setNodeRef;return(0,O.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,O.jsx)("div",l()(l()(l()({ref:A,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},a),C),{},{role:"none",children:(0,O.jsx)("span",{style:{cursor:"move",fontSize:14},children:z.children})}))})}},34588:function(ze,te,e){"use strict";e.d(te,{jC:function(){return F},od:function(){return P},Rq:function(){return m},e7:function(){return b}});var L=e(15009),l=e.n(L),N=e(9783),v=e.n(N),D=e(5574),x=e.n(D),W=e(99289),r=e.n(W),j=e(52677),h=e.n(j),O=e(96486),g=e.n(O),T=e(76690),t=e(65565),o=e(27484),c=e.n(o);function B(){"use strict";Array.isArray||(Array.isArray=function(A){return Object.prototype.toString.call(A)==="[object Array]"});function M(A){for(var i=[],p=0,u=A.length;p<u;p++)i.indexOf(A[p])===-1&&i.push(A[p]);return i}function S(A,i){return JSON.stringify(A)===JSON.stringify(i)}var C={},a={$is:function(i,p){return i===p},$match:function(i,p){return Array.isArray(i)&&Array.isArray(p)&&i.some(function(u){return Array.isArray(u)})?i.some(function(u){return(u==null?void 0:u.length)===p.length&&(u==null?void 0:u.every(function(d,f){return d===p[f]}))}):JSON.stringify(i)===JSON.stringify(p)},$eq:function(i,p){return Array.isArray(i)&&Array.isArray(p)?S(i,p):Array.isArray(i)?i.includes(p):i===p},$ne:function(i,p){return i!=p},"!==":function(i,p){return i!==p},$gt:function(i,p){return Array.isArray(i)?i.some(function(u){return u>p}):i>p},$gte:function(i,p){return i>=p},$lt:function(i,p,u){return Array.isArray(i)?i.some(function(d){return d<p}):u===void 0?i<p:i<p&&p<u},$lte:function(i,p,u){return u===void 0?i<=p:i<=p&&p<=u},$exists:function(i){return C.truthy(i)},$notEmpty:function(i){return C.truthy(i)},$empty:function(i){return Array.isArray(i)?i.some(function(p){return!C.truthy(p)}):!C.truthy(i)},$notExists:function(i){return!C.truthy(i)},"%":function(i,p){return i%p},log:function(i){return console.log(i),i},$in:function(i,p){return!p||typeof p.indexOf=="undefined"?!1:Array.isArray(i)&&Array.isArray(p)?p.some(function(u){return i.includes(u)}):p.indexOf(i)!==-1},$notIn:function(i,p){return!p||typeof p.indexOf=="undefined"?!1:p.indexOf(i)===-1},$includes:function(i,p){return!i||typeof i.indexOf=="undefined"?!1:Array.isArray(i)?i.some(function(u){return u==null?void 0:u.includes(p)}):i.indexOf(p)!==-1},$notIncludes:function(i,p){return!i||typeof i.indexOf=="undefined"?!1:Array.isArray(i)?!i.some(function(u){return u.includes(p)}):i.indexOf(p)===-1},$anyOf:function(i,p){return i.length===0?!1:Array.isArray(i)&&Array.isArray(p)&&i.some(function(u){return Array.isArray(u)})?i.some(function(u){return u.some(function(d){return p.includes(d)})}):i.some(function(u){return p.includes(u)})},$noneOf:function(i,p){return!i||(i==null?void 0:i.length)===0?!0:Array.isArray(i)&&Array.isArray(p)&&i.some(function(u){return Array.isArray(u)})?i.some(function(u){return u.every(function(d){return!p.some(function(f){return d.includes(f)})})}):p.some(function(u){return!i.includes(u)})},$notMatch:function(i,p){if(i.length!==p.length)return!0;for(var u=0;u<i.length;u++)if(i[u]!==p[u])return!0;return!1},$dateOn:function(i,p){return!i||!p?!1:(Array.isArray(i)||(i=[i,i]),Array.isArray(p)||(p=[p,p]),i=i.map(function(u){return c()(u)}),p=p.map(function(u){return c()(u)}),i[0].isBetween(p[0],p[1],null,"[]")&&i[1].isBetween(p[0],p[1],null,"[]"))},$dateBefore:function(i,p){return!i||!p?!1:(Array.isArray(i)||(i=[i,i]),Array.isArray(p)||(p=[p,p]),i=i.map(function(u){return c()(u)}),p=p.map(function(u){return c()(u)}),i[0].isBefore(p[0])&&i[1].isBefore(p[0]))},$dateNotBefore:function(i,p){return!a.$dateBefore(i,p)},$dateAfter:function(i,p){return!i||!p?!1:(Array.isArray(i)||(i=[i,i]),Array.isArray(p)||(p=[p,p]),i=i.map(function(u){return c()(u)}),p=p.map(function(u){return c()(u)}),i[0].isAfter(p[1])&&i[1].isAfter(p[1]))},$dateNotAfter:function(i,p){return!a.$dateAfter(i,p)},$dateBetween:function(i,p){return a.$dateOn(i,p)},$dateNotOn:function(i,p){return!a.$dateOn(i,p)},$isTruly:function(i){return Array.isArray(i)?i.some(function(p){return p===!0||p===1}):i===!0||i===1},$isFalsy:function(i){return Array.isArray(i)?i.some(function(p){return!C.truthy(p)}):!C.truthy(i)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(i,p,u){if(u<0){var d=String(i).substr(p);return d.substr(0,d.length+u)}return String(i).substr(p,u)},"+":function(){return Array.prototype.reduce.call(arguments,function(i,p){return parseFloat(i,10)+parseFloat(p,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(i,p){return parseFloat(i,10)*parseFloat(p,10)})},"-":function(i,p){return p===void 0?-i:i-p},"/":function(i,p){return i/p},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(i,p){return i.concat(p)},[])},var:function(i,p){var u=p===void 0?null:p,d=this;if(typeof i=="undefined"||i===""||i===null)return d;for(var f=String(i).split("."),I=0;I<f.length;I++)if(d==null||(d=d[f[I]],d===void 0))return u;return d},missing:function(){for(var i=[],p=Array.isArray(arguments[0])?arguments[0]:arguments,u=0;u<p.length;u++){var d=p[u],f=C.apply({var:d},this);(f===null||f==="")&&i.push(d)}return i},missing_some:function(i,p){var u=C.apply({missing:p},this);return p.length-u.length>=i?[]:u}};return C.is_logic=function(A){return h()(A)==="object"&&A!==null&&!Array.isArray(A)&&Object.keys(A).length===1},C.truthy=function(A){return Array.isArray(A)&&A.length===0?!1:!!A},C.get_operator=function(A){return Object.keys(A)[0]},C.get_values=function(A){return A[C.get_operator(A)]},C.apply=function(A,i){if(Array.isArray(A))return A.map(function($){return C.apply($,i)});if(!C.is_logic(A))return A;var p=C.get_operator(A),u=A[p],d,f,I,n,U;if(Array.isArray(u)||(u=[u]),p==="if"||p=="?:"){for(d=0;d<u.length-1;d+=2)if(C.truthy(C.apply(u[d],i)))return C.apply(u[d+1],i);return u.length===d+1?C.apply(u[d],i):null}else if(p==="$and"){for(d=0;d<u.length;d+=1)if(f=C.apply(u[d],i),!C.truthy(f))return f;return f}else if(p==="or"){for(d=0;d<u.length;d+=1)if(f=C.apply(u[d],i),C.truthy(f))return f;return f}else{if(p==="filter")return n=C.apply(u[0],i),I=u[1],Array.isArray(n)?n.filter(function($){return C.truthy(C.apply(I,$))}):[];if(p==="map")return n=C.apply(u[0],i),I=u[1],Array.isArray(n)?n.map(function($){return C.apply(I,$)}):[];if(p==="reduce")return n=C.apply(u[0],i),I=u[1],U=typeof u[2]!="undefined"?u[2]:null,Array.isArray(n)?n.reduce(function($,V){return C.apply(I,{current:V,accumulator:$})},U):U;if(p==="all"){if(n=C.apply(u[0],i),I=u[1],!Array.isArray(n)||!n.length)return!1;for(d=0;d<n.length;d+=1)if(!C.truthy(C.apply(I,n[d])))return!1;return!0}else if(p==="none"){if(n=C.apply(u[0],i),I=u[1],!Array.isArray(n)||!n.length)return!0;for(d=0;d<n.length;d+=1)if(C.truthy(C.apply(I,n[d])))return!1;return!0}else if(p==="some"){if(n=C.apply(u[0],i),I=u[1],!Array.isArray(n)||!n.length)return!1;for(d=0;d<n.length;d+=1)if(C.truthy(C.apply(I,n[d])))return!0;return!1}}if(u=u.map(function($){return C.apply($,i)}),a.hasOwnProperty(p)&&typeof a[p]=="function")return a[p].apply(i,u);if(p.indexOf(".")>0){var k=String(p).split("."),H=a;for(d=0;d<k.length;d++){if(!H.hasOwnProperty(k[d]))throw new Error("Unrecognized operation "+p+" (failed at "+k.slice(0,d+1).join(".")+")");H=H[k[d]]}return H.apply(i,u)}throw new Error("Unrecognized operation "+p)},C.uses_data=function(A){var i=[];if(C.is_logic(A)){var p=C.get_operator(A),u=A[p];Array.isArray(u)||(u=[u]),p==="var"?i.push(u[0]):u.forEach(function(d){i.push.apply(i,C.uses_data(d))})}return M(i)},C.add_operation=function(A,i){a[A]=i},C.rm_operation=function(A){delete a[A]},C.rule_like=function(A,i){if(i===A||i==="@")return!0;if(i==="number")return typeof A=="number";if(i==="string")return typeof A=="string";if(i==="array")return Array.isArray(A)&&!C.is_logic(A);if(C.is_logic(i)){if(C.is_logic(A)){var p=C.get_operator(i),u=C.get_operator(A);if(p==="@"||p===u)return C.rule_like(C.get_values(A,!1),C.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(A)){if(i.length!==A.length)return!1;for(var d=0;d<i.length;d+=1)if(!C.rule_like(A[d],i[d]))return!1;return!0}else return!1;return!1},C}var b=function(S,C){var a,A=/{{(.*?)}}/,i=S==null||(a=S.match)===null||a===void 0?void 0:a.call(S,A);if(i){var p=g().get(C,i[1]);return g().isFunction(p)?p():p}else return S};function P(M){if(h()(M)!=="object"||M===null)return null;for(var S in M)if(Object.prototype.hasOwnProperty.call(M,S))return Object.prototype.toString.call(M[S])==="[object Object]"&&M[S]!==null?P(M[S]):{key:S,value:M[S]};return null}var m=function(S){var C=R(S),a=(0,O.findIndex)(C,function(i,p,u){if(i.includes("$")&&p>0)return!0}),A=C.slice(0,a);return A};function R(M){var S=[];function C(a){Object.keys(a).sort().forEach(function(A){S.push(A),a[A]&&h()(a[A])==="object"&&C(a[A])})}return C(M),S}var F=function(){var M=r()(l()().mark(function S(C){var a,A,i,p,u,d;return l()().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return a=C.ruleGroup,A=C.variables,i=C.localVariables,p=Object.keys(a)[0]||"$and",u=a[p],d=u.map(function(){var n=r()(l()().mark(function U(k){var H,$,V,w,Z,se,ae,de,ne,re,K;return l()().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:if(!("$and"in k||"$or"in k)){ce.next=4;break}return ce.next=3,F({ruleGroup:k,variables:A,localVariables:i});case 3:return ce.abrupt("return",ce.sent);case 4:if(H=P(k),$=H==null?void 0:H.key,$){ce.next=8;break}return ce.abrupt("return",!0);case 8:return V=z(m(k)),w=A.parseVariable(V,i),Z=(0,T.cG)(H==null?void 0:H.value)?[A.parseVariable(H==null?void 0:H.value,i),w]:[H==null?void 0:H.value,w],ce.prev=11,se=B(),ce.next=15,Promise.all(Z);case 15:return ae=ce.sent,de=x()(ae,2),ne=de[0],re=de[1],ce.next=21,A.getCollectionField(V,i);case 21:return K=ce.sent,ce.abrupt("return",se.apply(v()({},$,[(0,t.J)(re,{targetCollectionField:K}),(0,t.J)(ne,{targetCollectionField:K})])));case 25:throw ce.prev=25,ce.t0=ce.catch(11),ce.t0;case 28:case"end":return ce.stop()}},U,null,[[11,25]])}));return function(U){return n.apply(this,arguments)}}()),I.next=6,Promise.all(d);case 6:if(d=I.sent,p!=="$and"){I.next=11;break}return I.abrupt("return",(0,O.every)(d,function(n){return n}));case 11:return I.abrupt("return",(0,O.some)(d,function(n){return n}));case 12:case"end":return I.stop()}},S)}));return function(C){return M.apply(this,arguments)}}();function z(M){return"{{ $nForm.".concat(M.join(".")," }}")}},61736:function(ze,te,e){"use strict";e.d(te,{D:function(){return l}});var L=e(67294),l=(0,L.createContext)({});l.displayName="SchemaComponentContext.Provider"},44245:function(ze,te,e){"use strict";e.d(te,{R:function(){return t}});var L=e(97857),l=e.n(L),N=e(13769),v=e.n(N),D=e(86201),x=e(94350),W=e(67294),r=e(47844),j=e(85893),h=["children","form"],O=["children"],g=function(c){var B=c.children,b=c.form,P=v()(c,h),m=(0,W.useContext)(x.SchemaOptionsContext),R=(0,W.useContext)(x.SchemaExpressionScopeContext),F=l()(l()({},m==null?void 0:m.scope),R),z=l()({},m==null?void 0:m.components);return(0,j.jsx)(x.FormProvider,l()(l()({},P),{},{form:b,children:(0,j.jsx)(r.G,{components:z,scope:F,children:B})}))},T=function(c){var B=c.children,b=v()(c,O),P=(0,W.useContext)(x.SchemaOptionsContext),m=(0,W.useContext)(x.SchemaExpressionScopeContext),R=l()(l()({},P==null?void 0:P.scope),m),F=l()({},P==null?void 0:P.components),z=(0,W.useMemo)(function(){return(0,D.createForm)()},[]);return(0,j.jsx)(x.FormProvider,l()(l()({},b),{},{form:z,children:(0,j.jsx)(r.G,{components:F,scope:R,children:B})}))},t=function(c){return c.form?(0,j.jsx)(g,l()({},c)):(0,j.jsx)(T,l()({},c))}},59480:function(ze,te,e){"use strict";e.d(te,{m:function(){return T}});var L=e(97857),l=e.n(L),N=e(86201),v=e(57953),D=e(67294),x=e(12174),W=e(84577),r=e(44245),j=e(93323),h=e(85893),O=function(o){return o},g=function(o){var c=o.noForm,B=o.onlyRenderProperties,b=o.hidden,P=o.scope,m=o.uid,R=o.components,F=o.onSuccess,z=o.schemaTransform,M=z===void 0?O:z,S=(0,W.Dm)(),C=S.reset,a={url:"/uiSchemas:".concat(B?"getProperties":"getJsonSchema","/").concat(m)},A=(0,D.useMemo)(function(){return(0,N.createForm)()},[m]),i=(0,x.QT)(a,{refreshDeps:[m],onSuccess:function(f){F&&F(f),C&&C()}}),p=i.data,u=i.loading;return u?(0,h.jsx)(v.Z,{}):b?(0,h.jsx)(v.Z,{}):c?(0,h.jsx)(j.n,{components:R,scope:P,schema:M((p==null?void 0:p.data)||{})}):(0,h.jsx)(r.R,{form:A,children:(0,h.jsx)(j.n,{components:R,scope:P,schema:M((p==null?void 0:p.data)||{})})})},T=function(o){return o.uid?(0,h.jsx)(g,l()({},o)):null}},93323:function(ze,te,e){"use strict";e.d(te,{n:function(){return m}});var L=e(97857),l=e.n(L),N=e(13769),v=e.n(N),D=e(9783),x=e.n(D),W=e(94350),r=e(90105),j=e(67294),h=e(61736),O=e(47844),g=e(85893),T=["components","scope","schema","distributed"],t=["schema"],o=["memoized"];function c(R){return W.Schema.isSchemaInstance(R)?R:R!=null&&R.name?new W.Schema({type:"object",properties:x()({},R.name,R)}):new W.Schema(R)}var B=function(F){return(0,j.useMemo)(function(){return c(F)},[])},b=function(F){var z=F.components,M=F.scope,S=F.schema,C=F.distributed,a=v()(F,T),A=(0,j.useContext)(h.D),i=(0,j.useMemo)(function(){return c(S)},[S]),p=(0,r.Z)();return(0,g.jsx)(h.D.Provider,{value:l()(l()({},A),{},{distributed:A.distributed==!1?!1:C,refresh:function(){var d;if(p(),A.distributed===!1||C===!1){var f;(f=A.refresh)===null||f===void 0||f.call(A)}(d=F.onChange)===null||d===void 0||d.call(F,i)}}),children:(0,g.jsx)(O.G,{inherit:!0,components:z,scope:M,children:(0,g.jsx)(W.RecursionField,l()(l()({},a),{},{schema:i}))})})},P=function(F){var z=F.schema,M=v()(F,t),S=B(z);return(0,g.jsx)(b,l()(l()({},M),{},{schema:S}))},m=function(F){var z=F.memoized,M=v()(F,o);return z?(0,g.jsx)(P,l()({},M)):(0,g.jsx)(b,l()({},M))}},47844:function(ze,te,e){"use strict";e.d(te,{B:function(){return x},G:function(){return W}});var L=e(97857),l=e.n(L),N=e(94350),v=e(67294),D=e(85893),x=function(){var j=(0,v.useContext)(N.SchemaOptionsContext);return j||{}},W=(0,v.memo)(function(r){var j=r.children,h=x(),O=(0,v.useMemo)(function(){return l()(l()({},h.components),r.components)},[h.components,r.components]),g=(0,v.useMemo)(function(){return l()(l()({},h.scope),r.scope)},[h.scope,r.scope]),T=(0,v.useMemo)(function(){return{scope:g,components:O}},[g,O]);return(0,D.jsx)(N.SchemaOptionsContext.Provider,{value:T,children:(0,D.jsx)(N.SchemaComponentsContext.Provider,{value:O,children:(0,D.jsx)(N.ExpressionScope,{value:g,children:j})})})});W.displayName="SchemaComponentOptions"},70993:function(ze,te,e){"use strict";e.d(te,{_b:function(){return F},RV:function(){return z.R},m1:function(){return M.m},n6:function(){return S.n},G0:function(){return C.G},a$:function(){return w},Tz:function(){return $},Bs:function(){return C.B}});var L=e(15009),l=e.n(L),N=e(99289),v=e.n(N),D=e(12444),x=e.n(D),W=e(72004),r=e.n(W),j=e(31996),h=e.n(j),O=e(26037),g=e.n(O),T=e(51947),t=e(83062),o=e(15867),c=e(67294),B=e(49218),b=e(26793),P=e(42677),m=e(68230),R=e(85893),F=function(){var ae=(0,P.ngQ)(),de=ae.designable,ne=ae.setDesignable,re=(0,b.$)(),K=re.t,ge=(0,m.d)(),ce=ge.token,ee={};return de&&(ee.backgroundColor="var(--colorSettings)"),(0,B.y1)("Ctrl+Shift+U",function(){return ne(!de)},[de]),(0,R.jsx)(t.Z,{title:K("UI Editor"),children:(0,R.jsx)(o.ZP,{"data-testid":"ui-editor-button",icon:(0,R.jsx)(T.Z,{style:{color:ce.colorTextHeaderMenu}}),title:K("UI Editor"),style:ee,onClick:function(){ne(!de)}})})},z=e(44245),M=e(59480),S=e(93323),C=e(47844),a=e(97857),A=e.n(a),i=e(5574),p=e.n(i),u=e(86201),d=e(94350),f=e(73773),I=e(90105),n=e(61736),U=function(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(ae).concat((0,f.uid)())};d.Schema.silent(!0);var k={},H={silent:!0,compile:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=function(){if(H.silent)try{return new Function("$root","with($root) { return (".concat(ae,"); }"))(de)}catch(K){return"{{".concat(ae,"}}")}else return new Function("$root","with($root) { return (".concat(ae,"); }"))(de)};return k[ae]?k[ae]:ae.trim().startsWith("t(")?(k[ae]=ne(),k[ae]):ne()}};d.Schema.registerCompiler(H.compile);var $=function(ae){var de=ae.designable,ne=ae.onDesignableChange,re=ae.components,K=ae.children,ge=(0,c.useContext)(n.D),ce=(0,C.B)(),ee=(0,I.Z)(),xe=(0,c.useState)((0,f.uid)()),Se=p()(xe,2),Ae=Se[0],Ee=Se[1],he=(0,c.useMemo)(function(){return ae.form||(0,u.createForm)()},[Ae]),pe=(0,b.$)(),X=pe.t,Q=(0,c.useMemo)(function(){return A()(A()({},ae.scope),{},{t:X,randomString:U})},[ae.scope,X,ce==null?void 0:ce.scope]),ue=(0,c.useState)(de),be=p()(ue,2),fe=be[0],Pe=be[1],Ie=(0,c.useMemo)(function(){return typeof de=="boolean"?de:fe},[de,fe,ge.designable]),Ue=(0,c.useMemo)(function(){return function(Me){typeof Ie!="boolean"&&Pe(Me),ne==null||ne(Me)}},[Ie,ne]),$e=(0,c.useCallback)(function(){Ee((0,f.uid)())},[]);return(0,R.jsx)(n.D.Provider,{value:{scope:Q,components:re,reset:$e,refresh:ee,designable:Ie,setDesignable:Ue},children:(0,R.jsx)(d.FormProvider,{form:he,children:(0,R.jsx)(C.G,{inherit:!0,scope:Q,components:re,children:K})})})};$.displayName="SchemaComponentProvider";var V=e(31601),w=function(se){h()(de,se);var ae=g()(de);function de(){return x()(this,de),ae.apply(this,arguments)}return r()(de,[{key:"load",value:function(){var ne=v()(l()().mark(function K(){return l()().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:this.addComponents();case 1:case"end":return ce.stop()}},K,this)}));function re(){return ne.apply(this,arguments)}return re}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:F})}}]),de}(V.S),Z=null},84577:function(ze,te,e){"use strict";e.d(te,{zz:function(){return W.zz},Pl:function(){return W.Pl},oB:function(){return W.oB},lI:function(){return l},hi:function(){return P.hi},eJ:function(){return N.e},Co:function(){return x},aZ:function(){return P.aZ},ng:function(){return W.ng},et:function(){return r.e},cL:function(){return c},fd:function(){return m},Cl:function(){return O},vH:function(){return B},sR:function(){return W.sR},wN:function(){return b.w},Dm:function(){return T},fM:function(){return P.fM}});var L=e(67294),l=function(F){var z=(0,L.useRef)(null);return(0,L.useEffect)(function(){return z.current&&F!==z.current&&z.current.onUnmount(),z.current=F,F.onMount(),function(){F.onUnmount()}},[F]),F},N=e(96365),v=e(94350),D=e(96486),x=function(F,z){var M=(0,L.useContext)(v.SchemaOptionsContext),S=M.components;return F?typeof F!="string"?F:(0,D.get)(S,F)||z:z},W=e(94516),r=e(98146),j=e(97857),h=e.n(j),O=function(F){var z=(0,L.useContext)(v.SchemaOptionsContext),M=(0,L.useContext)(v.SchemaExpressionScopeContext),S=(0,L.useRef)();return S.current=M,F.toFieldProps(h()(h()({},z),{},{get scope(){return h()(h()({},z.scope),S.current)}}))},g=e(61736);function T(){return(0,L.useContext)(g.D)}var t=e(26793),o=e(6145),c=function(){var F,z=(0,o.useCollectionManager_deprecated)(),M=z.getCollectionJoinField,S=z.getCollection,C=(0,v.useFieldSchema)(),a=(0,o.useCollection_deprecated)(),A=a.getField,i=A(C.name)||M(C["x-collection-field"]),p=(0,t.$)(),u=p.t,d=((F=C["x-component-props"])===null||F===void 0?void 0:F.fieldNames)||{},f=d.label,I=(0,L.useMemo)(function(){if(!(!i||!(i!=null&&i.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(i.interface)){var n=S(i.target);if((n==null?void 0:n.template)==="file")return[{label:u("Record picker"),value:"CollectionField"},{label:u("Select"),value:"AssociationSelect"}];switch(i.interface){case"o2m":return[{label:u("Record picker"),value:"CollectionField"},{label:u("Subtable"),value:"TableField"},{label:u("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:u("Record picker"),value:"CollectionField"},{label:u("Select"),value:"AssociationSelect"}];default:return[{label:u("Record picker"),value:"CollectionField"},{label:u("Subform"),value:"FormField"},{label:u("Select"),value:"AssociationSelect"}]}}},[u,i==null?void 0:i.interface,f]);return I},B=function(){var F,z=(0,v.useField)(),M=(0,v.useFieldSchema)(),S=(0,o.useCollection_deprecated)(),C=S.getField,a=(0,o.useCollectionManager_deprecated)(),A=a.getCollectionJoinField,i=C(M.name)||A(M["x-collection-field"]),p=(0,N.e)();(0,L.useEffect)(function(){if(!(z!=null&&z.title)){var u;z.title=p(i==null||(u=i.uiSchema)===null||u===void 0?void 0:u.title)}},[i==null||(F=i.uiSchema)===null||F===void 0?void 0:F.title])},b=e(9780),P=e(18686),m=function(F){var z,M=(0,t.$)(),S=M.t,C=(0,o.useCollectionManager_deprecated)(),a=C.getCollectionJoinField,A=C.getCollection,i=(0,v.useFieldSchema)(),p=(F==null?void 0:F.fieldSchema)||i,u=(0,v.useField)(),d=(0,v.useForm)(),f=(p==null?void 0:p["x-read-pretty"])||u.readPretty||d.readPretty,I=F==null?void 0:F.fieldSchema,n=(0,o.useCollection_deprecated)(),U=n.getField,k=(F==null?void 0:F.collectionField)||U(p.name)||a(p["x-collection-field"]),H=((z=p["x-component-props"])===null||z===void 0?void 0:z.fieldNames)||{},$=H.label,V=(0,L.useMemo)(function(){if(!(!k||!(k!=null&&k.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m","updatedBy","createdBy"].includes(k.interface)){var w=A(k.target);if((w==null?void 0:w.template)==="file")return f?[{label:S("Title"),value:"Select"},{label:S("File manager"),value:"FileManager"},{label:S("Tag"),value:"Tag"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},{label:S("File manager"),value:"FileManager"}];if((w==null?void 0:w.template)==="tree"&&["m2m","o2m","m2o"].includes(k.interface))return f?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!I&&{label:S("Sub-details"),value:"Nester"},!I&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!I&&["m2m","o2m"].includes(k.interface)&&{label:S("Sub-table"),value:"SubTable"},!I&&{label:S("Cascade Select"),value:"CascadeSelect"},!I&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];switch(k.interface){case"o2m":return f?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!I&&{label:S("Sub-table"),value:"SubTable"},!I&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!I&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"},!I&&{label:S("Sub-table"),value:"SubTable"}];case"m2m":return f?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!I&&{label:S("Sub-details"),value:"Nester"},!I&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!I&&{label:S("Sub-table"),value:"SubTable"},!I&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return f?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!I&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!I&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];default:return f?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!I&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!I&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}]}}},[S,k==null?void 0:k.interface,$]);return(V||[]).filter(Boolean)}},18686:function(ze,te,e){"use strict";e.d(te,{aZ:function(){return R},fM:function(){return z},hi:function(){return F}});var L=e(5574),l=e.n(L),N=e(97857),v=e.n(N),D=e(94350),x=e(83204),W=e(9361),r=e(96486),j=e.n(r),h=e(67294),O=e(42677),g=e(21143),T=e(28561),t=e(10097),o=function(C,a,A,i){return C?i.paddingContentHorizontalLG:A?a?i.controlPaddingHorizontal+3*i.controlPaddingHorizontalSM+22+i.paddingContentHorizontalLG:i.paddingContentHorizontalLG+12:a?i.paddingSM+i.controlHeight+i.marginXS+2*i.controlPaddingHorizontalSM+22+i.paddingContentHorizontalLG:i.controlHeight+i.marginXS+(i.paddingXXS+2)*2+i.paddingContentHorizontalLG},c=function(C){var a=W.Z.useToken(),A=a.token,i=(0,O.ngQ)(),p=i.designable,u=(0,t.useBlockHeightProps)(),d=u.heightProps,f=C||d||{},I=f.disablePageHeader,n=f.enablePageTabs,U=f.hidePageTitle,k=A.sizeXXL-2,H=p?A.controlHeight+2*A.paddingContentHorizontalLG:1*A.paddingContentHorizontalLG,$=o(I,n,U,A);return k+$+H},B=function(){var C=W.Z.useToken(),a=C.token,A=(0,O.ngQ)(),i=A.designable,p=a.paddingContentVerticalLG+a.margin+2*a.paddingContentVertical+24,u=i?a.controlHeight+2*a.paddingContentHorizontalLG:1*a.paddingContentHorizontalLG;return p+u},b=function(C){var a=(0,D.useFieldSchema)(),A=M(a),i=c(C),p=B();return A?p:i},P=["users_jobs","approvals","approvalRecords"],m=function(){var C,a,A=W.Z.useToken(),i=A.token,p=(0,t.useBlockHeightProps)(),u=p.heightProps,d=(0,g.useTableBlockContext)(),f=d.heightProps,I=(0,O.ngQ)(),n=I.designable,U=(0,D.useFieldSchema)(),k=f||u,H=b(k),$=(C=(0,g.useDataBlockRequest)())!==null&&C!==void 0?C:{},V=$.data,w=(0,g.useCollection)(),Z=w.name,se=(V==null?void 0:V.meta)||{},ae=se.count,de=se.pageSize,ne=ae>de,re=k.heightMode,K=k.height,ge=k.title;if(!(!(k!=null&&k.heightMode)||re===T.j.DEFAULT)){var ce=Object.keys(((a=U.parent.properties.actions)===null||a===void 0?void 0:a.properties)||{}).length>0,ee=ne?i.controlHeight+i.padding+i.marginLG:i.marginLG,xe=ce||n?i.controlHeight+2*i.marginLG:i.marginLG,Se=(n&&!P.includes(Z)?i.controlHeight:22)+2*i.padding+1,Ae=ge?i.fontSizeLG*i.lineHeightLG+i.padding*2-1:0;return re===T.j.FULL_HEIGHT?window.innerHeight-H-Ae-Se-xe-ee:K-Ae-xe-Se-ee}},R=function(C){var a=(0,t.useBlockHeightProps)(),A=a.heightProps,i=b(),p=W.Z.useToken(),u=p.token,d=A||{},f=d.heightMode,I=d.height,n=d.title,U=n?u.fontSizeLG*u.lineHeightLG+u.padding*2-1:0;if(!(!(A!=null&&A.heightMode)||f===T.j.DEFAULT)){if(f===T.j.FULL_HEIGHT){var k=window.innerHeight-i;return C!=null&&C.removeBlockHeaderHeight&&(k=k-U),C!=null&&C.innerExtraHeight&&(k=k-C.innerExtraHeight),k}return I}},F=function(){var C=(0,D.useFieldSchema)(),a=(0,h.useMemo)(function(){return(0,t.getPageSchema)(C)},[]),A=(a==null?void 0:a["x-component-props"])||{},i=A.disablePageHeader,p=A.enablePageTabs,u=A.hidePageTitle,d=v()(v()({},C==null?void 0:C["x-component-props"]),{},{disablePageHeader:i,enablePageTabs:p,hidePageTitle:u}),f=b(d),I=d||{},n=I.heightMode,U=I.height;if(!(!(d!=null&&d.heightMode)||n===T.j.DEFAULT))return n===T.j.FULL_HEIGHT?window.innerHeight-f:U},z=function(){var C=(0,h.useState)(),a=l()(C,2),A=a[0],i=a[1],p=(0,h.useRef)(null),u=m(),d=(0,h.useCallback)((0,r.debounce)(function(){var I;if(p.current){var n=p.current.getBoundingClientRect(),U=(I=p.current.querySelector(".ant-table"))===null||I===void 0?void 0:I.getBoundingClientRect();U&&i(n.width)}},100),[u]),f=(0,h.useCallback)(function(I){p.current=I&&I.children?I.children[0]:null,d()},[d]);return(0,x.Z)("resize",d),{height:u,width:A,tableSizeRefCallback:f}},M=function S(C){return C?C["x-component"]==="Action.Container"?!0:S(C.parent):null}},96365:function(ze,te,e){"use strict";e.d(te,{e:function(){return r}});var L=e(97857),l=e.n(L),N=e(52677),v=e.n(N),D=e(94350),x=e(67294),W={},r=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},O=h.noCache,g=(0,x.useContext)(D.SchemaOptionsContext),T=(0,x.useContext)(D.SchemaExpressionScopeContext);return function(t,o){var c=!1,B;if(typeof t=="string"&&t.startsWith("{{")&&(c=!0,B=t),t&&v()(t)==="object"&&!(0,x.isValidElement)(t)&&(c=!0,B=JSON.stringify(t)),Array.isArray(t)&&(c=!0),c){var b=l()(l()(l()({},g.scope),T),o);if(!B)return D.Schema.compile(t,b);try{return O?D.Schema.compile(t,b):(W[B]=W[B]||D.Schema.compile(t,b),W[B])}catch(P){return console.log("useCompile error",t,P),D.Schema.compile(t,b)}}return t}}},94516:function(ze,te,e){"use strict";e.d(te,{zz:function(){return $},Pl:function(){return f},oB:function(){return k},ng:function(){return w},sR:function(){return V}});var L=e(5574),l=e.n(L),N=e(19632),v=e.n(N),D=e(15009),x=e.n(D),W=e(99289),r=e.n(W),j=e(12444),h=e.n(j),O=e(72004),g=e.n(O),T=e(9783),t=e.n(T),o=e(97857),c=e.n(o),B=e(94350),b=e(73773),P=e(45360),m=e(50361),R=e.n(m),F=e(27361),z=e.n(F),M=e(36968),S=e.n(M),C=e(67294),a=e(26793),A=e(12174),i=e(61736);function p(Z,se){if(Z)return Z["x-app-version"]||(Z["x-app-version"]=se),Object.keys(Z.properties||{}).forEach(function(ae){var de;p((de=Z.properties)===null||de===void 0?void 0:de[ae],se)}),Z}var u=JSON.parse('{"i8":"1.2.19-alpha"}'),d=e(85893);function f(Z){return new $(Z)}var I=function Z(se){se&&(se["x-uid"]||(se["x-uid"]=(0,b.uid)()),Object.keys(se.properties||{}).forEach(function(ae){Z(se.properties[ae])}))},n=function(se){return se},U=function(se,ae){if(!(!se||!ae)){for(var de in ae)if(Object.prototype.hasOwnProperty.call(ae,de)){var ne=ae[de];if(ne!==(se==null?void 0:se[de]))return!1}return!0}},k=function(se,ae){if(se["x-uid"]&&se["x-uid"]===ae["x-uid"])return[null,se.toJSON()];var de=se.toJSON(),ne=c()(c()({},de),{},{properties:{}}),re=null,K=function ge(ce,ee){Object.keys(ce||{}).forEach(function(xe){var Se=ce[xe];if(Se["x-uid"]===ae["x-uid"]){re=ce[xe];return}else ee.properties[xe]=c()(c()({},Se),{},{properties:{}}),ge(Se==null?void 0:Se.properties,ee.properties[xe])})};return K(de.properties,ne),[ne,re]},H=function(se){return se},$=function(){function Z(se){h()(this,Z),t()(this,"current",void 0),t()(this,"options",void 0),t()(this,"appVersion",void 0),t()(this,"events",{}),this.options=se,this.current=se.current,this.appVersion=se.appVersion}return g()(Z,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var ae=this,de=this.options,ne=de.api,re=de.t,K=re===void 0?H:re;if(ne){var ge=function(ee){if(!ee)return[];var xe=Object.values(ee.properties).length,Se=[];return ee.mapProperties(function(Ae){Ae["x-component-props"]=Ae["x-component-props"]||{},Ae["x-component-props"].width=100/xe,Ae["x-uid"]&&Se.push({"x-uid":Ae["x-uid"],"x-component-props":Ae["x-component-props"]})}),ee["x-uid"]&&Se.length?Se:[]};this.on("insertAdjacent",function(){var ce=r()(x()().mark(function ee(xe){var Se,Ae,Ee,he,pe,X,Q,ue,be,fe;return x()().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(Ae=xe.onSuccess,Ee=xe.current,he=xe.position,pe=xe.schema,X=xe.wrap,Q=xe.wrapped,ue=xe.removed,be=[],(Q==null?void 0:Q["x-component"])==="Grid.Col"&&(be=be.concat(ge(Q.parent))),(ue==null?void 0:ue["x-component"])==="Grid.Col"&&(be=be.concat(ge(ue.parent))),ae.refresh(),Ee["x-uid"]){Ie.next=7;break}return Ie.abrupt("return");case 7:return Ie.next=9,ne.request({url:"/uiSchemas:insertAdjacent/".concat(Ee["x-uid"],"?position=").concat(he),method:"post",data:{schema:p(pe,ae.appVersion),wrap:X}});case 9:if(fe=Ie.sent,!be.length){Ie.next=13;break}return Ie.next=13,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:be});case 13:if(!(ue!=null&&ue["x-uid"])){Ie.next=16;break}return Ie.next=16,ne.request({url:"/uiSchemas:remove/".concat(ue["x-uid"]),method:"post"});case 16:Ae==null||Ae(fe==null||(Se=fe.data)===null||Se===void 0?void 0:Se.data),P.ZP.success(K("Saved successfully"),.2);case 18:case"end":return Ie.stop()}},ee)}));return function(ee){return ce.apply(this,arguments)}}()),this.on("patch",function(){var ce=r()(x()().mark(function ee(xe){var Se;return x()().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(Se=xe.schema,ae.refresh(),Se!=null&&Se["x-uid"]){Ee.next=4;break}return Ee.abrupt("return");case 4:return Ee.next=6,ne.request({url:"/uiSchemas:patch",method:"post",data:c()({},Se)});case 6:P.ZP.success(K("Saved successfully"),.2);case 7:case"end":return Ee.stop()}},ee)}));return function(ee){return ce.apply(this,arguments)}}()),this.on("batchPatch",function(){var ce=r()(x()().mark(function ee(xe){var Se;return x()().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Se=xe.schemas,ae.refresh(),Ee.next=4,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:Se});case 4:P.ZP.success(K("Saved successfully"),.2);case 5:case"end":return Ee.stop()}},ee)}));return function(ee){return ce.apply(this,arguments)}}()),this.on("remove",function(){var ce=r()(x()().mark(function ee(xe){var Se,Ae;return x()().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(Se=xe.removed,Ae=[],(Se==null?void 0:Se["x-component"])==="Grid.Col"&&(Ae=ge(Se.parent)),ae.refresh(),Se!=null&&Se["x-uid"]){he.next=6;break}return he.abrupt("return");case 6:return he.next=8,ne.request({url:"/uiSchemas:remove/".concat(Se["x-uid"]),method:"post"});case 8:if(!Ae.length){he.next=11;break}return he.next=11,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:Ae});case 11:P.ZP.success(K("Saved successfully"),.2);case 12:case"end":return he.stop()}},ee)}));return function(ee){return ce.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(ae){ae.type||(ae.type="void"),ae.name||(ae.name=(0,b.uid)()),this.current["x-uid"]&&I(ae)}},{key:"on",value:function(ae,de){this.events[ae]||(this.events[ae]=[]),this.events[ae].push(de)}},{key:"emit",value:function(){var se=r()(x()().mark(function de(ne){var re=this,K,ge,ce,ee,xe,Se=arguments;return x()().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(this.events[ne]){Ee.next=2;break}return Ee.abrupt("return");case 2:for(K=Se.length,ge=new Array(K>1?K-1:0),ce=1;ce<K;ce++)ge[ce-1]=Se[ce];return ee=ge[0],xe=ge.slice(1),Ee.abrupt("return",Promise.all(this.events[ne].map(function(he){return he.bind(re).apply(void 0,[c()({current:re.current},ee)].concat(v()(xe)))})));case 5:case"end":return Ee.stop()}},de,this)}));function ae(de){return se.apply(this,arguments)}return ae}()},{key:"parentsIn",value:function(ae){if(!ae||!B.Schema.isSchemaInstance(ae))return!1;for(var de=this.current;(ne=de)!==null&&ne!==void 0&&ne.parent;){var ne;if(de.parent===ae)return!0;de=de.parent}return!1}},{key:"refresh",value:function(){var ae=this.options.refresh;return ae==null?void 0:ae()}},{key:"deepMerge",value:function(ae){var de=this,ne={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"},re={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(ae).forEach(function(K){ne[K]?(de.current[K]=ae[K],de.updateModel(ne[K],ae[K])):re[K]?Object.keys(ae[K]).forEach(function(ge){S()(de.current,[K,ge],ae[K][ge]),de.updateModel([re[K],ge],ae[K][ge])}):de.current[K]=ae[K]}),this.emit("patch",{schema:ae})}},{key:"getSchemaAttribute",value:function(ae,de){return z()(this.current,ae,de)}},{key:"shallowMerge",value:function(ae){var de=this,ne={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(ae).forEach(function(re){de.current[re]=ae[re],ne[re]&&de.updateModel(ne[re],ae[re])}),this.emit("patch",{schema:ae})}},{key:"updateModel",value:function(ae,de){var ne=function(K){S()(K,ae,de)};this.model&&ne(this.model),this.query&&this.query.take(ne)}},{key:"insertAdjacent",value:function(ae,de){var ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(ae){case"beforeBegin":return this.insertBeforeBegin(de,ne);case"afterBegin":return this.insertAfterBegin(de,ne);case"beforeEnd":return this.insertBeforeEnd(de,ne);case"afterEnd":return this.insertAfterEnd(de,ne)}}},{key:"recursiveRemoveIfNoChildren",value:function(ae,de){if(ae){for(var ne=ae,re,K=de==null?void 0:de.breakRemoveOn;ne;){if(typeof K=="function"){if(K(ne))break}else if(U(ne,K))break;var ge=Object.keys(ne.properties||{}).length;if(ge>0)break;ne.parent&&(re=ne.parent.removeProperty(ne.name)),ne=ne.parent}return re}}},{key:"remove",value:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=de.breakRemoveOn,re=de.removeParentsIfNoChildren,K=ae||this.current,ge=K.parent.removeProperty(K.name);if(re){var ce=this.recursiveRemoveIfNoChildren(K.parent,{breakRemoveOn:ne});ce&&(ge=ce)}return this.emit("remove",{removed:ge})}},{key:"removeWithoutEmit",value:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=de.breakRemoveOn,re=de.removeParentsIfNoChildren,K=ae||this.current,ge=K.parent.removeProperty(K.name);if(re){var ce=this.recursiveRemoveIfNoChildren(K.parent,{breakRemoveOn:ne});ce&&(ge=ce)}return ge}},{key:"insertBeforeBeginOrAfterEnd",value:function(ae){var de=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)&&B.Schema.isSchemaInstance(ae)&&this.current.parent===ae.parent){var re=0,K=0;return this.current.parent.mapProperties(function(ge,ce,ee){de.current.name===ce&&(K=ee),ae.name===ce&&(re=ee)}),re>K?this.insertBeforeBegin(ae,ne):this.insertAfterEnd(ae,ne)}}},{key:"insertBeforeBegin",value:function(ae){var de=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var re={onSuccess:ne.onSuccess},K=ne.wrap,ge=K===void 0?n:K,ce=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(ae)){if(this.parentsIn(ae)){this.emit("error",{code:"parent_is_not_allowed",schema:ae});return}ae.parent.removeProperty(ae.name),ee&&(re.removed=this.recursiveRemoveIfNoChildren(ae.parent,{breakRemoveOn:ce}))}else ae&&(ae=R()(ae));var xe={},Se=!1,Ae=0,Ee=0;this.current.parent.mapProperties(function(fe,Pe){Pe===de.current.name&&(Ee=Ae,Se=!0,++Ae),fe["x-index"]=Ae,++Ae,Se&&(xe[Pe]=fe,de.current.parent.removeProperty(Pe))}),this.prepareProperty(ae);var he=ge(ae),pe=this.current.parent.addProperty(he.name||(0,b.uid)(),he);pe["x-index"]=Ee,pe.parent=this.current.parent,this.current.parent.setProperties(xe);var X=k(pe,ae),Q=l()(X,2),ue=Q[0],be=Q[1];this.emit("insertAdjacent",c()({position:"beforeBegin",schema:be,wrapped:he,wrap:ue},re))}}},{key:"insertAfterBegin",value:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var ne={onSuccess:de.onSuccess},re=de.wrap,K=re===void 0?n:re,ge=de.breakRemoveOn,ce=de.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(ae)){if(this.parentsIn(ae)){this.emit("error",{code:"parent_is_not_allowed",schema:ae});return}ae.parent.removeProperty(ae.name),ce&&(ne.removed=this.recursiveRemoveIfNoChildren(ae.parent,{breakRemoveOn:ge}))}else ae&&(ae=R()(ae));var ee={},xe=1;this.current.mapProperties(function(Q,ue){Q["x-index"]=xe,++xe,ee[ue]=Q}),this.current.properties={},this.prepareProperty(ae);var Se=K(ae),Ae=this.current.addProperty(Se.name||(0,b.uid)(),Se);Ae["x-index"]=0,Ae.parent=this.current,this.current.setProperties(ee);var Ee=k(Ae,ae),he=l()(Ee,2),pe=he[0],X=he[1];this.emit("insertAdjacent",c()({position:"afterBegin",schema:X,wrap:pe,wrapped:Se},ne))}}},{key:"insertBeforeEnd",value:function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){delete ae["x-index"];var ne={onSuccess:de.onSuccess},re=de.wrap,K=re===void 0?n:re,ge=de.breakRemoveOn,ce=de.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(ae)){if(this.parentsIn(ae)){this.emit("error",{code:"parent_is_not_allowed",schema:ae});return}ae.parent.removeProperty(ae.name),ce&&(ne.removed=this.recursiveRemoveIfNoChildren(ae.parent,{breakRemoveOn:ge}))}else ae&&(ae=R()(ae));this.prepareProperty(ae);var ee=K(ae),xe=this.current.addProperty(ee.name||(0,b.uid)(),ee);xe.parent=this.current;var Se=k(xe,ae),Ae=l()(Se,2),Ee=Ae[0],he=Ae[1];return this.emit("insertAdjacent",c()({position:"beforeEnd",schema:he,wrap:Ee,wrapped:ee},ne))}}},{key:"insertAfterEnd",value:function(ae){var de=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var re={onSuccess:ne==null?void 0:ne.onSuccess},K=ne.wrap,ge=K===void 0?n:K,ce=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren,xe=0,Se=0,Ae=!1,Ee={};if(this.current.parent.mapProperties(function(fe,Pe){fe["x-index"]=xe,Pe===de.current.name&&(++xe,Se=xe,Ae=!0),++xe,Ae&&Pe!==de.current.name&&(Ee[Pe]=fe,de.current.parent.removeProperty(Pe))}),B.Schema.isSchemaInstance(ae)){if(this.parentsIn(ae)){this.emit("error",{code:"parent_is_not_allowed",schema:ae});return}ae.parent.removeProperty(ae.name),ee&&(re.removed=this.recursiveRemoveIfNoChildren(ae.parent,{breakRemoveOn:ce})),ae.parent=null}else ae&&(ae=R()(ae));this.prepareProperty(ae);var he=ge(ae),pe=this.current.parent.addProperty(he.name||(0,b.uid)(),he);pe.parent=this.current.parent,pe["x-index"]=Se,this.current.parent.setProperties(Ee);var X=k(pe,ae),Q=l()(X,2),ue=Q[0],be=Q[1];this.emit("insertAdjacent",c()({position:"afterEnd",schema:be,wrap:ue,wrapped:he},re))}}}]),Z}();function V(){var Z=(0,C.useContext)(B.SchemaOptionsContext),se=(0,C.useMemo)(function(){return(Z==null?void 0:Z.components)||{}},[Z]),ae=function(ne){if(!ne)return null;if(typeof ne!="string")return ne;var re=z()(se,ne);return re||console.error('[nocobase]: Component "'.concat(ne,'" not found')),re};return ae}function w(){var Z=(0,C.useContext)(i.D),se=Z.designable,ae=Z.setDesignable,de=Z.refresh,ne=Z.reset,re=(0,C.useContext)(B.SchemaOptionsContext),K=(0,C.useMemo)(function(){return(re==null?void 0:re.components)||{}},[re]),ge=(0,C.useMemo)(function(){return function(){return(0,d.jsx)(d.Fragment,{})}},[]),ce=(0,B.useField)(),ee=(0,B.useFieldSchema)(),xe=(0,A.LY)(),Se=(0,a.$)(),Ae=Se.t,Ee=(0,C.useMemo)(function(){return f({t:Ae,api:xe,refresh:de,current:ee,model:ce,appVersion:u.i8})},[Ae,xe,de,ee,ce]);return(0,C.useEffect)(function(){Ee.loadAPIClientEvents()},[Ee]),{dn:Ee,designable:se,reset:ne,refresh:de,setDesignable:ae,DesignableBar:ge,findComponent:(0,C.useCallback)(function(he){return he?typeof he!="string"?he:z()(K,he):null},[z()]),on:Ee.on.bind(Ee),patch:(0,C.useCallback)(function(he,pe){var X=function(be){Object.keys(be).forEach(function(fe){var Pe=be[fe];fe==="title"&&(ce.title=Pe,ee.title=Pe),fe==="x-decorator-props"&&(ce.decoratorProps||(ce.decoratorProps={}),ee["x-decorator-props"]||(ee["x-decorator-props"]={}),Object.keys(Pe).forEach(function(Ie){ce.decoratorProps[Ie]=Pe[Ie],ee["x-decorator-props"][Ie]=Pe[Ie]})),fe==="x-component-props"&&(ce.componentProps||(ce.componentProps={}),ee["x-component-props"]||(ee["x-component-props"]={}),Object.keys(Pe).forEach(function(Ie){ce.componentProps[Ie]=Pe[Ie],ee["x-component-props"][Ie]=Pe[Ie]}))})};if(typeof he=="string"){var Q={};return S()(Q,he,pe),X(Q)}X(he),de()},[Ee]),shallowMerge:(0,C.useCallback)(function(he){Ee.shallowMerge(he)},[Ee]),deepMerge:(0,C.useCallback)(function(he){Ee.deepMerge(he)},[Ee]),remove:(0,C.useCallback)(function(he,pe){Ee.remove(he,pe)},[Ee]),insertAdjacent:(0,C.useCallback)(function(he,pe,X){Ee.insertAdjacent(he,pe,X)},[Ee]),insertBeforeBegin:(0,C.useCallback)(function(he){Ee.insertBeforeBegin(he)},[Ee]),insertAfterBegin:(0,C.useCallback)(function(he){Ee.insertAfterBegin(he)},[Ee]),insertBeforeEnd:(0,C.useCallback)(function(he){Ee.insertBeforeEnd(he)},[Ee]),insertAfterEnd:(0,C.useCallback)(function(he){Ee.insertAfterEnd(he)},[Ee])}}},98146:function(ze,te,e){"use strict";e.d(te,{e:function(){return x}});var L=e(94350),l=e(84577),N=e(67294),v=e(74538),D=function(){return null},x=function(){var r=(0,l.ng)(),j=r.designable,h=(0,L.useFieldSchema)(),O=(0,N.useMemo)(function(){return h["x-designer"]||h["x-toolbar"]?h["x-designer"]||h["x-toolbar"]:h["x-settings"]?v.Mf:D},[h]),g=(0,l.Co)(O);return j&&g||D}},9780:function(ze,te,e){"use strict";e.d(te,{w:function(){return W}});var L=e(97857),l=e.n(L),N=e(13769),v=e.n(N),D=["useProps"],x=function(){return{}},W=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=j.useProps,O=h===void 0?x:h,g=v()(j,D),T=O;typeof O!="function"&&(T=x);var t=T();return l()(l()({},g),t)}},42677:function(ze,te,e){"use strict";e.d(te,{aUM:function(){return F.aU},olz:function(){return F.ol},N0i:function(){return F.N0},fWn:function(){return F.fW},EIK:function(){return F.EI},$Lt:function(){return F.$L},$b8:function(){return F.$b},HTy:function(){return Lo},lkv:function(){return Fo},rDu:function(){return ea},eYL:function(){return F.eY},Rat:function(){return ra},$SD:function(){return fi},fUi:function(){return Go.fU},QcG:function(){return Bl},gOu:function(){return cs},jYG:function(){return Ka.j},C1I:function(){return F.C1},Ssf:function(){return Ul},vTp:function(){return Nl},XZJ:function(){return ua},Tt2:function(){return wl},zH8:function(){return Xl},Q5L:function(){return Ql},Pok:function(){return hi},Vm0:function(){return ns},xI_:function(){return Hl},Lip:function(){return Gl},Mtg:function(){return Pa},iNu:function(){return as},zzt:function(){return _t.zz},_bl:function(){return P._b},POi:function(){return is},AOY:function(){return ee},LBT:function(){return b.DndContext},IWB:function(){return b.DragHandler},LCt:function(){return b.DraggableContext},FyH:function(){return K.Fy},Nir:function(){return K.Ni},q8U:function(){return K.q8},HGA:function(){return K.HG},QTe:function(){return K.QT},JEX:function(){return K.JE},fAH:function(){return il},$w$:function(){return K.$w},nBj:function(){return K.nB},Oct:function(){return K.Oc},zdw:function(){return K.zd},CXR:function(){return ol},BQs:function(){return Io.BQ},Hj5:function(){return St.H},M0b:function(){return _i},wn$:function(){return Ir.wn},GzZ:function(){return Ir.Gz},tJZ:function(){return Ir.tJ},fox:function(){return Ir.fo},VTd:function(){return Ir.VT},XsZ:function(){return Ir.Xs},AsW:function(){return ur},cLM:function(){return Po},m__:function(){return In},l09:function(){return de},D_t:function(){return wi.D},WiK:function(){return Wt},xJW:function(){return K.xJ},RVL:function(){return P.RV},Bc8:function(){return xr},hG9:function(){return xi},DCh:function(){return Ci},rjZ:function(){return ca.rj},Cqo:function(){return $a},jg7:function(){return ca.jg},gsn:function(){return Io.gs},$18:function(){return Cs},IIB:function(){return Io.II},RnZ:function(){return Zi},mX2:function(){return Io.mX},zDC:function(){return xo.zD},Phs:function(){return Io.Ph},aVo:function(){return Va},UGj:function(){return Yi},yq5:function(){return Qi},v2r:function(){return ga},HIW:function(){return hu},T3C:function(){return co},tlE:function(){return Ks},rop:function(){return Ns},gGi:function(){return $s},MBS:function(){return Vs.M},pGO:function(){return ks},Y8K:function(){return Ei},iVT:function(){return Io.iV},ODP:function(){return xo.OD},lbb:function(){return xo.lb},b7w:function(){return xo.b7},sUk:function(){return xo.sU},x1j:function(){return F.x1},m1v:function(){return P.m1},glM:function(){return Pt},xZD:function(){return F.xZ},IuH:function(){return Ir.Iu},MkN:function(){return F.Mk},Hof:function(){return Gs},n6:function(){return P.n6},DDd:function(){return Gm.D},G0E:function(){return P.G0},a$w:function(){return P.a$},TzZ:function(){return P.Tz},y00:function(){return F.y0},PhF:function(){return Et},Cqv:function(){return b.ShowFormData},cof:function(){return F.co},bts:function(){return b.Sortable},Fop:function(){return b.SortableContext},TRI:function(){return b.SortableItem},ORg:function(){return b.SortableProvider},TaI:function(){return Hs},qHe:function(){return dr.q},iA_:function(){return ko},gvM:function(){return ru},SnY:function(){return ll},ASv:function(){return au},bwk:function(){return oa},mQc:function(){return Mi},c__:function(){return lu},QZ3:function(){return Be},L39:function(){return Ka.L},jII:function(){return ul},mPs:function(){return vu},tgM:function(){return fu},gqx:function(){return Go.gq},Qm7:function(){return Go.Qm},_wD:function(){return Ma._w},rjl:function(){return Ma.rj},Fjw:function(){return F.Fj},SLL:function(){return F.SL},sBv:function(){return F.sB},iTm:function(){return K.iT},Pls:function(){return _t.Pl},Oxq:function(){return gt},WLi:function(){return je},$9M:function(){return K.$9},nCn:function(){return za},iNG:function(){return Sa},tD8:function(){return bi},pg9:function(){return zr},Ofb:function(){return K.Of},ibf:function(){return po},WyG:function(){return re},l6$:function(){return Ut.l6},WGR:function(){return Vt},C$H:function(){return xo.C$},cNQ:function(){return xo.cN},ZZb:function(){return K.ZZ},elO:function(){return xo.el},_Ko:function(){return so},Mev:function(){return oo},i2K:function(){return yo},WmO:function(){return Ir.Wm},oBi:function(){return _t.oB},igR:function(){return F.ig},DU1:function(){return F.DU},XCj:function(){return F.XC},lIL:function(){return _t.lI},hi9:function(){return _t.hi},p27:function(){return F.p2},z9d:function(){return al.z},eJW:function(){return _t.eJ},Cor:function(){return _t.Co},aZq:function(){return _t.aZ},P1D:function(){return gi},ngQ:function(){return _t.ng},ett:function(){return _t.et},ySm:function(){return St.y},Zd$:function(){return K.Zd},cLh:function(){return _t.cL},baz:function(){return K.b},fde:function(){return _t.fd},Xdt:function(){return xo.Xd},Cld:function(){return _t.Cl},vH8:function(){return _t.vH},PLH:function(){return Ir.PL},V8t:function(){return Ir.V8},tMk:function(){return Ir.tM},xQm:function(){return Ir.xQ},sRe:function(){return _t.sR},frb:function(){return qn},$N2:function(){return Ln},U1u:function(){return et},HS$:function(){return F.HS},vBu:function(){return F.vB},QYZ:function(){return F.QY},t9d:function(){return F.t9},Kgy:function(){return Ir.Kg},aJ2:function(){return Ir.aJ},n14:function(){return ca.n1},DiB:function(){return ca.Di},l1O:function(){return K.l1},w5o:function(){return K.w5},p3Q:function(){return K.p3},G5e:function(){return K.G5},xj2:function(){return K.xj},rxY:function(){return K.rx},Ils:function(){return xo.Il},zCB:function(){return F.zC},wNf:function(){return _t.wN},Dmu:function(){return _t.Dm},Bsl:function(){return P.Bs},yKv:function(){return Us.y},fMB:function(){return _t.fM},gCg:function(){return sl},eT6:function(){return K.eT},q4O:function(){return K.q4},ymE:function(){return Ma.ym}});var L={};e.r(L),e.d(L,{Action:function(){return F.aU},ActionBar:function(){return F.ol},ActionBarProvider:function(){return F.N0},ActionContext:function(){return F.fW},ActionContextProvider:function(){return F.EI},ActionDesigner:function(){return F.$L},AfterSuccess:function(){return F.$b},AntdSchemaComponentPlugin:function(){return Lo},AntdSchemaComponentProvider:function(){return Fo},AppendsTreeSelect:function(){return ea},AssignedFieldValues:function(){return F.eY},AssociationField:function(){return ra},AssociationSelect:function(){return fi},AttachmentList:function(){return Go.fU},AutoComplete:function(){return Bl},Block:function(){return cs},BlockItem:function(){return Ka.j},ButtonEditor:function(){return F.C1},CardItem:function(){return Ul},Cascader:function(){return Nl},Checkbox:function(){return ua},CollectionSelect:function(){return wl},ColorPicker:function(){return Xl},ColorSelect:function(){return Ql},Cron:function(){return hi},CronSet:function(){return ns},DataSourceCollectionCascader:function(){return Hl},DataSourceSelect:function(){return Gl},DatePicker:function(){return Pa},DatePickerProvider:function(){return as},Details:function(){return is},DetailsDesigner:function(){return ee},EditComponent:function(){return K.Fy},EditDefaultValue:function(){return K.Ni},EditDescription:function(){return K.q8},EditOperator:function(){return K.HG},EditPattern:function(){return K.QT},EditRequired:function(){return K.JE},EditSortField:function(){return il},EditTitle:function(){return K.$w},EditTitleField:function(){return K.nB},EditTooltip:function(){return K.Oc},EditValidationRules:function(){return K.zd},Editable:function(){return ol},EllipsisWithTooltip:function(){return Io.BQ},ErrorFallback:function(){return St.H},Expand:function(){return _i},Filter:function(){return Ir.wn},FilterAction:function(){return Ir.Gz},FilterActionContext:function(){return Ir.tJ},FilterContext:function(){return Ir.fo},FilterDynamicComponent:function(){return Ir.VT},FilterLogicContext:function(){return Ir.Xs},FixedBlock:function(){return ur},FixedBlockDesignerItem:function(){return Po},FixedBlockWrapper:function(){return In},Form:function(){return de},FormDialog:function(){return wi.D},FormField:function(){return Wt},FormItem:function(){return K.xJ},FormV2:function(){return xr},G2Plot:function(){return xi},G2PlotRenderer:function(){return Ci},Grid:function(){return ca.rj},GridCard:function(){return $a},GridRowContext:function(){return ca.jg},HTMLEncode:function(){return Io.gs},IconPicker:function(){return Cs},Input:function(){return Io.II},InputNumber:function(){return Zi},InputReadPretty:function(){return Io.mX},InputRecordPicker:function(){return xo.zD},Json:function(){return Io.Ph},List:function(){return Va},Markdown:function(){return Yi},MarkdownReadPretty:function(){return Qi},Menu:function(){return ga},NanoIDInput:function(){return hu},Page:function(){return co},Pagination:function(){return Ks},Password:function(){return Ns},Percent:function(){return $s},Preview:function(){return Vs.M},QuickEdit:function(){return ks},Radio:function(){return Ei},ReadPretty:function(){return Io.iV},ReadPrettyRecordPicker:function(){return xo.OD},RecordPicker:function(){return xo.lb},RecordPickerContext:function(){return xo.b7},RecordPickerProvider:function(){return xo.sU},RefreshDataBlockRequest:function(){return F.x1},RemoteSelect:function(){return Pt},RemoveButton:function(){return F.xZ},RemoveConditionContext:function(){return Ir.Iu},RequestSettings:function(){return F.Mk},RichText:function(){return Gs},SecondConFirm:function(){return F.y0},Select:function(){return Et},SkipValidation:function(){return F.co},Space:function(){return Hs},StablePopover:function(){return dr.q},Table:function(){return ko},TableBlockDesigner:function(){return ru},TableField:function(){return ll},TableSelectorDesigner:function(){return au},TableV2:function(){return oa},Tabs:function(){return Mi},TabsContextProvider:function(){return lu},Templates:function(){return Be},TestDesigner:function(){return Ka.L},TimePicker:function(){return ul},TreeSelect:function(){return vu},UnixTimestamp:function(){return fu},Upload:function(){return Go.gq},Uploader:function(){return Go.Qm},Variable:function(){return Ma._w},VariableScopeProvider:function(){return Ma.rj},WorkflowConfig:function(){return F.Fj},actionSettings:function(){return F.SL},actionSettingsItems:function(){return F.sB},allowAddNew:function(){return K.iT},defaultFieldNames:function(){return gt},fetchTemplateData:function(){return je},filterFormItemSettings:function(){return K.$9},findByUid:function(){return za},findKeysByUid:function(){return Sa},findMenuItem:function(){return bi},formDetailsSettings:function(){return zr},formItemSettings:function(){return K.Of},formSettings:function(){return po},formV1Settings:function(){return re},genStyleHook:function(){return Ut.l6},getCurrentOptions:function(){return Vt},getDatePickerLabels:function(){return xo.C$},getLabelFormatValue:function(){return xo.cN},isFileCollection:function(){return K.ZZ},isShowFilePicker:function(){return xo.el},pageSettings:function(){return so},pageTabSettings:function(){return oo},readPrettyFormSettings:function(){return yo},removeNullCondition:function(){return Ir.Wm},useA:function(){return F.ig},useActionBarContext:function(){return F.DU},useActionContext:function(){return F.XC},useCloseAction:function(){return F.p2},useColumnSchema:function(){return al.z},useDatePickerContext:function(){return gi},useDownloadLogs:function(){return St.y},useEnsureOperatorsValid:function(){return K.Zd},useFieldMode:function(){return K.b},useFieldNames:function(){return xo.Xd},useFilterActionProps:function(){return Ir.PL},useFilterFieldOptions:function(){return Ir.V8},useFilterFieldProps:function(){return Ir.tM},useFilterOptions:function(){return Ir.xQ},useFixedBlock:function(){return qn},useFixedSchema:function(){return Ln},useFormDataTemplates:function(){return et},useGetAriaLabelOfAction:function(){return F.HS},useGetAriaLabelOfDrawer:function(){return F.vB},useGetAriaLabelOfModal:function(){return F.QY},useGetAriaLabelOfPopover:function(){return F.t9},useGetFilterFieldOptions:function(){return Ir.Kg},useGetFilterOptions:function(){return Ir.aJ},useGridContext:function(){return ca.n1},useGridRowContext:function(){return ca.Di},useIsAddNewForm:function(){return K.l1},useIsAssociationField:function(){return K.w5},useIsFieldReadPretty:function(){return K.p3},useIsFileField:function(){return K.G5},useIsFormReadPretty:function(){return K.xj},useIsSelectFieldMode:function(){return K.rx},useLabelUiSchema:function(){return xo.Il},useLinkageAction:function(){return F.zC},useStyles:function(){return Us.y},useTabsContext:function(){return sl},useTitleFieldOptions:function(){return K.eT},useValidateSchema:function(){return K.q4},useVariableScope:function(){return Ma.ym}});var l=e(15009),N=e.n(l),v=e(99289),D=e.n(v),x=e(12444),W=e.n(x),r=e(72004),j=e.n(r),h=e(31996),O=e.n(h),g=e(26037),T=e.n(g),t=e(97857),o=e.n(t),c=e(67294),B=e(31601),b=e(14896),P=e(70993),m=e(89127),R=function(E){return D()(N()().mark(function J(){var q,ie;return N()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return ye.prev=0,ye.next=3,this.api.request(E);case 3:return ie=ye.sent,ye.abrupt("return",ie==null||(q=ie.data)===null||q===void 0?void 0:q.data);case 7:return ye.prev=7,ye.t0=ye.catch(0),ye.abrupt("return",[]);case 10:case"end":return ye.stop()}},J,this,[[0,7]])}))},F=e(76157),z=e(13769),M=e.n(z),S=e(57134),C=e(86201),a=e(94350),A=e(28459),i=e(57953),p=e(12174),u=e(6145),d=e(74538),f=e(64016),I=e(95354),n=e(85893),U=["form","children"],k=["form","children","disabled"],H=["request","effects","initialValue","useValues"],$=function(E){var J=E.form,q=E.children,ie=M()(E,U),_e=(0,a.useField)(),ye=(0,a.useFieldSchema)(),Fe=(0,_t.lI)(J.createVoidField(o()(o()({},_e.props),{},{basePath:""})));return(0,n.jsx)(a.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(a.FormContext.Provider,{value:J,children:(0,n.jsx)(S.FormLayout,o()(o()({layout:"vertical"},ie),{},{children:(0,n.jsx)(a.RecursionField,{basePath:Fe.address,schema:ye,onlyRenderProperties:!0})}))})})},V=function(E){return E.children},w=function(E){var J=E.form,q=E.children,ie=E.disabled,_e=M()(E,k),ye=(0,a.useField)(),Fe=(0,a.useFieldSchema)(),Ke=(0,_t.lI)(J.createVoidField(o()(o()({},ye.props),{},{basePath:""}))),Ve=(0,_t.Co)(Fe["x-component"],V);return(0,c.useEffect)(function(){J.disabled=ie||ye.disabled},[ie,ye.disabled]),(0,n.jsx)(A.ZP,{componentDisabled:ie,children:(0,n.jsx)(a.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(a.FormContext.Provider,{value:J,children:(0,n.jsx)(S.FormLayout,o()(o()({layout:"vertical"},_e),{},{children:(0,n.jsx)(a.FieldContext.Provider,{value:Ke,children:(0,n.jsx)(Ve,o()(o()({},ye.componentProps),{},{children:(0,n.jsx)(a.RecursionField,{basePath:Ke.address,schema:Fe,onlyRenderProperties:!0})}))})}))})})})},Z=function(E){var J=E.request,q=E.initialValue;return J||function(){return Promise.resolve({data:q})}},se=function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,p.QT)(Z(J),E)},ae=(0,c.createContext)(null);ae.displayName="FormBlockContext";var de=(0,a.observer)(function(G){var E=G.request,J=G.effects,q=G.initialValue,ie=G.useValues,_e=ie===void 0?se:ie,ye=M()(G,H),Fe=(0,a.useFieldSchema)(),Ke=(0,a.useField)(),Ve=(0,c.useMemo)(function(){return(0,C.createForm)({effects:J})},[]),Ye=_e({uid:Fe["x-uid"],onSuccess:function(nt){return D()(N()().mark(function ut(){return N()().wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return dt.next=2,Ve.reset();case 2:Ve.setValues(nt==null?void 0:nt.data),Ve.setInitialValues(nt==null?void 0:nt.data);case 4:case"end":return dt.stop()}},ut)}))()}},G),Qe=(0,c.useContext)(ae);return(0,n.jsx)(ae.Provider,{value:{parent:Qe,form:Ve,result:Ye,field:Ke,fieldSchema:Fe},children:(0,n.jsx)(i.Z,{spinning:(Ye==null?void 0:Ye.loading)||!1,children:Fe["x-decorator"]==="Form"?(0,n.jsx)(w,o()({form:Ve},ye)):(0,n.jsx)($,o()({form:Ve},ye))})})},{displayName:"Form"});de.Designer=function(){var E=(0,u.useCollection_deprecated)(),J=E.name,q=E.title,ie=(0,I.zy)();return(0,n.jsxs)(d.aN,{template:ie,title:q||J,children:[(0,n.jsx)(f.G,{componentName:"Form",collectionName:J}),(0,n.jsx)(d.Z5,{}),(0,n.jsx)(d.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var ne=e(5537),re=new ne.F5({name:"FormV1Settings",items:[{name:"template",Component:f.G,useComponentProps:function(){var E=(0,u.useCollection_deprecated)(),J=E.name;return{componentName:"Form",collectionName:J}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),K=e(54801),ge=function(){var E=(0,u.useCollection_deprecated)(),J=E.name,q=E.title,ie=(0,I.zy)();return(0,n.jsx)(d.aN,{schemaSettings:"FormSettings",template:ie,title:q||J})},ce=function(){var E=(0,u.useCollection_deprecated)(),J=E.name,q=E.title,ie=(0,I.zy)();return(0,n.jsx)(d.aN,{schemaSettings:"ReadPrettyFormSettings",template:ie,title:q||J})},ee=function(){var E=(0,u.useCollection_deprecated)(),J=E.name,q=E.title,ie=(0,I.zy)();return(0,n.jsx)(d.aN,{schemaSettings:"FormDetailsSettings",template:ie,title:q||J})},xe=function(){var E=(0,u.useCollection_deprecated)(),J=E.name,q=E.title,ie=(0,I.zy)();return(0,n.jsx)(d.aN,{schemaSettings:"blockSettings:filterForm",template:ie,title:q||J})},Se=e(7340),Ae=e(15503),Ee=e(68230),he=e(9783),pe=e.n(he),X=e(68400),Q=e.n(X),ue=e(97133),be=e(85667),fe=e(73773),Pe=e(68433),Ie=e(9361),Ue=e(96486),$e=e.n(Ue),Me=e(31019),ve=e(4595),Ce=e(86406),oe=e(90615),y=e(44256),Y=e(76690),me=e(34588),le=e(9780),Le=e(18686),qe=e(72594),We=e(5574),ke=e.n(We),rt=e(42075),Re=e(34041),Ge=e(26793),st=e(32268),Ut=e(60094),qt=e(52677),an=e.n(qt),An=e(50888),fn=e(66309),En=e(96074),er=e(27484),At=e.n(er),Dn=e(87714),_t=e(84577),hn=e(4340),Pn=e(97937),en=e(32983),kt=e(58812),ln=e(96695),_n=e.n(ln),mn=e(19632),Ot=e.n(mn),gt={label:"label",value:"value",color:"color",options:"children"};function Mt(G,E){var J=[];if(!Array.isArray(G))return J;for(var q=0;q<G.length;q++){var ie=G[q][E.options];Array.isArray(ie)&&J.push.apply(J,Ot()(Mt(ie,E))),J.push(o()({},G[q]))}return J}function Vt(G,E,J){var q=Mt(E,J),ie=(0,Ue.castArray)(G).filter(function(ye){return ye!=null}).map(function(ye){return(0,Pe.isPlainObject)(ye)?ye[J.value]:ye});function _e(ye){if(!ye)return[];var Fe=[],Ke=_n()(ie),Ve;try{var Ye=function(){var ht=Ve.value,nt=ye.find(function(ut){return ut[J.value]==ht})||{value:ht,label:ht&&ht.toString()};Fe.push(nt)};for(Ke.s();!(Ve=Ke.n()).done;)Ye()}catch(Qe){Ke.e(Qe)}finally{Ke.f()}return Fe}return _e(q)}var Kt=e(67668),xt=(0,a.observer)(function(G){var E,J=o()(o()({},gt),G.fieldNames),q=(0,a.useField)();if(!(0,fe.isValid)(G.value))return(0,n.jsx)("div",{});if((0,C.isArrayField)(q)&&(q==null||(E=q.value)===null||E===void 0?void 0:E.length)===0)return(0,n.jsx)("div",{});var ie=(0,Kt.Hy)(),_e=q.dataSource||G.options||(ie==null?void 0:ie.uiSchema.enum)||[],ye=Vt(q.value,_e,J);return(0,n.jsx)("div",{children:(0,n.jsx)(kt.B,{ellipsis:G.ellipsis,children:ye.map(function(Fe,Ke){return(0,n.jsx)(fn.Z,{color:Fe[J.color],icon:Fe.icon,children:Fe[J.label]},Ke)})})})},{displayName:"ReadPretty"}),un=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],nn=["objectValue","loading","value","rawOptions","defaultValue"],jn=function(E){return!(0,fe.isValid)(E)||an()(E)==="object"&&Object.keys(E).length===0},Cn=function(E){var J=E.value,q=E.options,ie=E.onChange,_e=E.fieldNames,ye=E.mode,Fe=E.loading,Ke=E.rawOptions,Ve=E.defaultValue,Ye=M()(E,un),Qe=function(nt){var ut;if(!jn(nt)){var lt=(0,fe.toArr)(nt).filter(function(yt){return yt}).map(function(yt){return(0,Pe.isPlainObject)(yt)?yt[_e.value]:yt}),dt=(ut=Vt(lt,q,_e))===null||ut===void 0?void 0:ut.map(function(yt){return{label:yt[_e.label],value:yt[_e.value]}});return["tags","multiple"].includes(ye)||E.multiple?dt:dt.shift()}};return(0,n.jsx)(Re.default,o()({role:"button","data-testid":"select-object-".concat(ye||"single"),value:Qe(J),defaultValue:Qe(Ve),allowClear:{clearIcon:(0,n.jsx)(hn.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Fe?(0,n.jsx)(i.Z,{}):(0,n.jsx)(en.Z,{image:en.Z.PRESENTED_IMAGE_SIMPLE}),options:q,fieldNames:_e,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(nt,ut){var lt;return((lt=ut==null?void 0:ut[_e.label||"label"])!==null&&lt!==void 0?lt:"").includes(nt)},filterSort:function(nt,ut){var lt,dt;return((lt=nt==null?void 0:nt[_e.label||"label"])!==null&&lt!==void 0?lt:"").toLowerCase().localeCompare(((dt=ut==null?void 0:ut[_e.label||"label"])!==null&&dt!==void 0?dt:"").toLowerCase())},onChange:function(nt){var ut=Vt((0,fe.toArr)(nt).map(function(lt){return lt.value}),Ke||q,_e);["tags","multiple"].includes(ye)||E.multiple?ie==null||ie(ut):ie==null||ie(ut.shift()||null)},mode:ye,tagRender:function(nt){return(0,n.jsx)(fn.Z,o()(o()({role:"button","aria-label":nt.label,closeIcon:(0,n.jsx)(Pn.Z,{role:"button","aria-label":"icon-close-tag"})},nt),{},{children:nt.label}))}},Ye))},Dt=function(E,J){var q;return((q=J==null?void 0:J.label)!==null&&q!==void 0?q:"").toLowerCase().includes((E||"").toLowerCase())},$t=(0,a.connect)(function(G){var E=G.objectValue,J=G.loading,q=G.value,ie=G.rawOptions,_e=G.defaultValue,ye=M()(G,nn),Fe=G.multiple?"multiple":G.mode;if(Fe&&!["multiple","tags"].includes(Fe)&&(Fe=void 0),E)return(0,n.jsx)(Cn,o()(o()({rawOptions:ie},ye),{},{defaultValue:_e,value:q,mode:Fe,loading:J}));var Ke=function(Ye){return["tags","multiple"].includes(G.mode)||G.multiple?Ye?(0,fe.toArr)(Ye):void 0:Ye};return(0,n.jsx)(Re.default,o()(o()({role:"button","data-testid":"select-".concat(Fe||"single"),showSearch:!0,filterOption:Dt,allowClear:{clearIcon:(0,n.jsx)(hn.Z,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:J?(0,n.jsx)(i.Z,{}):(0,n.jsx)(en.Z,{image:en.Z.PRESENTED_IMAGE_SIMPLE}),value:Ke(q),defaultValue:Ke(_e),tagRender:function(Ye){return(0,n.jsx)(fn.Z,o()(o()({role:"button","aria-label":Ye.label,closeIcon:(0,n.jsx)(Pn.Z,{role:"button","aria-label":"icon-close-tag"})},Ye),{},{children:Ye.label}))}},ye),{},{onChange:function(Ye){var Qe;(Qe=G.onChange)===null||Qe===void 0||Qe.call(G,Ye===void 0?null:Ye)},mode:Fe}))},(0,a.mapProps)({dataSource:"options"},function(G,E){return o()(o()({},G),{},{fieldNames:o()(o()({},gt),G.fieldNames),suffixIcon:E!=null&&E.loading||E!=null&&E.validating?(0,n.jsx)(An.Z,{}):G.suffixIcon})}),(0,a.mapReadPretty)(xt)),Et=$t;Et.ReadPretty=xt;var xn=Et,Zt=e(36586),on=function(E,J){return(0,Ue.castArray)(E).filter(function(q){return q!=null}).map(function(q){return an()(q)==="object"?q[J.value]:q})},rn=(0,a.observer)(function(G){var E=o()(o()({},gt),G.fieldNames),J=(0,a.useField)(),q=(0,a.useFieldSchema)(),ie=(0,Zt.a)(),_e=(0,F.XC)(),ye=_e.snapshot,Fe=(0,p.QT)(ye?D()(N()().mark(function Ve(){return N()().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.abrupt("return",{data:ie[q.name]});case 1:case"end":return Qe.stop()}},Ve)})):o()(o()({action:"list"},G.service),{},{params:{paginate:!1,filter:pe()({},E.value,{$in:on(J.value,E)})}}),{refreshDeps:[G.service,J.value]}),Ke=Fe.data;return(0,n.jsx)(Et.ReadPretty,o()(o()({},G),{},{options:Ke==null?void 0:Ke.data}))},{displayName:"ReadPretty"}),Un=e(8341),On=e(44990),Fn=["fieldNames","service","wait","value","defaultValue","objectValue","manual","mapOptions","targetField","CustomDropdownRender","optionFilter","dataSource"],Ct="N/A",Je=(0,a.connect)(function(G){var E,J,q=G.fieldNames,ie=q===void 0?{}:q,_e=G.service,ye=_e===void 0?{}:_e,Fe=G.wait,Ke=Fe===void 0?300:Fe,Ve=G.value,Ye=G.defaultValue,Qe=G.objectValue,ht=G.manual,nt=ht===void 0?!0:ht,ut=G.mapOptions,lt=G.targetField,dt=G.CustomDropdownRender,yt=G.optionFilter,bt=G.dataSource,Yt=M()(G,Fn),Gt=(0,On.FC)(),$n=(0,Un.FE)(bt||Gt),vn=(0,c.useState)(!1),Nt=ke()(vn,2),pn=Nt[0],Vn=Nt[1],Hn=(0,c.useRef)(!1),Qn=(0,a.useFieldSchema)(),Mn=((E=Qn["x-component-props"])===null||E===void 0?void 0:E.addMode)==="quickAdd",lr=(0,u.useCollection_deprecated)(),Sn=lr.getField,Er=(0,c.useRef)(null),Tr=(0,u.useCollectionManager_deprecated)(),Or=Tr.getCollectionJoinField,or=Tr.getInterface,cr=Qn["x-collection-field"]||Qn.name,Jn=Sn(cr)||Or(cr),Bn=lt||(Jn==null?void 0:Jn.target)&&(ie==null?void 0:ie.label)&&Or("".concat(Jn.target,".").concat(ie.label)),Xn=(0,c.useMemo)(function(){if(Bn!=null&&Bn.interface){var Yr;return((Yr=or(Bn.interface))===null||Yr===void 0||(Yr=Yr.filterable)===null||Yr===void 0?void 0:Yr.operators[0].value)||"$includes"}return"$includes"},[Bn]),nr=(0,_t.eJ)(),yn=(0,c.useCallback)(function(Yr){try{return Yr.filter(function(eo){return["number","string"].includes(an()(eo[ie.value]))}).map(function(eo){var So,jo,Ao=nr(eo[ie.label]);if(Bn!=null&&(So=Bn.uiSchema)!==null&&So!==void 0&&So.enum)if(Array.isArray(Ao))Ao=Ao.map(function(aa,cl){var ia=Bn.uiSchema.enum.find(function(Ai){return Ai.value===aa});return ia?(0,n.jsx)(fn.Z,{role:"button",color:ia.color,style:{marginRight:3},children:(ia==null?void 0:ia.label)||aa},cl):(0,n.jsx)(fn.Z,{role:"button",children:aa},aa)}).reverse();else{var wo=Bn.uiSchema.enum.find(function(aa){return aa.value===Ao});wo&&(Ao=(0,n.jsx)(fn.Z,{role:"button",color:wo.color,children:wo.label}))}if((Bn==null?void 0:Bn.type)==="date"&&(Ao=At()(Ao).format("YYYY-MM-DD")),ut){var Vo;return ut((Vo={},pe()(Vo,ie.label,Ao||Ct),pe()(Vo,ie.value,eo[ie.value]),Vo))}return o()(o()({},eo),{},(jo={},pe()(jo,ie.label,Ao||Ct),pe()(jo,ie.value,eo[ie.value]),jo))}).filter(Boolean)}catch(eo){return console.error(eo),Yr}},[Bn==null?void 0:Bn.uiSchema,ie]),wn=(0,p.QT)(o()(o()({action:"list"},ye),{},{headers:$n,params:o()(o()({pageSize:200},ye==null?void 0:ye.params),{},{filter:ye==null||(J=ye.params)===null||J===void 0?void 0:J.filter})}),{manual:nt,debounceWait:Ke}),sr=wn.data,br=wn.run,hr=wn.loading,Rr=(0,c.useMemo)(function(){return JSON.stringify({service:ye,fieldNames:ie})},[ye,ie]),pr=(0,c.useCallback)(function(){return Er.current&&dt?(0,n.jsx)(dt,{search:Er.current,callBack:function(){Er.current=null,Vn(!1)}}):null},[Er.current]);(0,c.useEffect)(function(){Hn.current&&br()},[Rr]);var wr=function(){var Yr=D()(N()().mark(function eo(So){var jo;return N()().wrap(function(wo){for(;;)switch(wo.prev=wo.next){case 0:br({filter:(0,Dn.EO)([So?pe()({},ie.label,pe()({},Xn,So)):{},ye==null||(jo=ye.params)===null||jo===void 0?void 0:jo.filter])}),Er.current=So;case 2:case"end":return wo.stop()}},eo)}));return function(So){return Yr.apply(this,arguments)}}(),io=(0,c.useMemo)(function(){var Yr,eo=Ve||Ye;if(!(sr!=null&&(Yr=sr.data)!==null&&Yr!==void 0&&Yr.length))return eo!=null?Array.isArray(eo)?eo:[eo]:[];var So=eo!=null&&(Array.isArray(eo)?eo:[o()(o()({},eo),{},pe()({},ie.value,eo[ie.value]||eo))])||[],jo=typeof yt=="function"?sr.data.filter(yt):sr.data;return(0,Ue.uniqBy)(jo.concat(So!=null?So:[]),ie.value)},[Ve,Ye,sr==null?void 0:sr.data,ie.value,yt]),Xr=function(eo){Vn(eo),Er.current=null,eo&&br(),Hn.current=!0};return(0,n.jsx)(Et,o()(o()({open:pn,popupMatchSelectWidth:!1,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:ie,onSearch:wr,onDropdownVisibleChange:Xr,objectValue:Qe,value:Ve,defaultValue:Ye},Yt),{},{loading:sr?hr:!0,options:yn(io),rawOptions:io,dropdownRender:function(eo){var So=io.some(function(jo){return jo[ie.label]===Er.current});return(0,n.jsx)(n.Fragment,{children:Mn?(0,n.jsxs)(n.Fragment,{children:[!((sr==null?void 0:sr.data.length)===0&&Er!==null&&Er!==void 0&&Er.current)&&eo,(sr==null?void 0:sr.data.length)>0&&(Er==null?void 0:Er.current)&&!So&&(0,n.jsx)(En.Z,{style:{margin:0}}),!So&&(0,n.jsx)(pr,{})]}):eo})}}))},(0,a.mapProps)({dataSource:"options"},function(G,E){var J,q=(0,a.useFieldSchema)();return o()(o()({},G),{},{fieldNames:o()(o()(o()(o()({},gt),G.fieldNames),E.componentProps.fieldNames),(J=q["x-component-props"])===null||J===void 0?void 0:J.fieldNames),suffixIcon:E!=null&&E.loading||E!=null&&E.validating?(0,n.jsx)(An.Z,{}):G.suffixIcon})}),(0,a.mapReadPretty)(rn)),Pt=Je;Pt.ReadPretty=rn;var Tt=null,et=function(){var E=(0,a.useFieldSchema)(),J=(0,Ge.$)(),q=J.t,ie=(0,Se.bz)(),_e=ie.duplicateData,ye=(0,u.useCollectionManager_deprecated)(),Fe=ye.getCollectionJoinField;if(_e)return _e;var Ke=tt(E),Ve=Ke.items,Ye=Ve===void 0?[]:Ve,Qe=Ke.display,ht=Qe===void 0?!0:Qe;Ye.forEach(function(lt){try{var dt;lt.fields=(dt=lt.fields)===null||dt===void 0?void 0:dt.map(function(yt){var bt=Fe("".concat(lt.collection,".").concat(yt));return bt?yt:""}).filter(Boolean)}catch(yt){(0,Pe.error)(yt),lt.fields=[]}});var nt=[{key:"none",title:q("None")}].concat(Ye.map(function(lt,dt){return o()(o()({key:dt},lt),{},{isLeaf:lt.dataId!==null&&lt.dataId!==void 0,titleCollectionField:(lt==null?void 0:lt.titleField)&&Fe("".concat(lt.collection,".").concat(lt.titleField))})})),ut=Ye.find(function(lt){return lt.default});return{templates:nt,display:ht,defaultTemplate:ut,enabled:Ye.length>0&&Ye.every(function(lt){return lt.dataId||lt.dataScope})}},Be=function(E){var J=E.style,q=J===void 0?{}:J,ie=E.form,_e=(0,Ut.dQ)(),ye=_e.token,Fe=et(),Ke=Fe.templates,Ve=Fe.display,Ye=Fe.enabled,Qe=Fe.defaultTemplate,ht=(0,u.useCollectionManager_deprecated)(),nt=ht.getCollectionJoinField,ut=(0,st.ss)(Ke),lt=(0,c.useState)((Qe==null?void 0:Qe.key)||"none"),dt=ke()(lt,2),yt=dt[0],bt=dt[1],Yt=(0,c.useState)(null),Gt=ke()(Yt,2),$n=Gt[0],vn=Gt[1],Nt=(0,p.LY)(),pn=(0,Ge.$)(),Vn=pn.t;(0,c.useEffect)(function(){Ye&&Qe&&ie&&(ie.__template=!0,Qe.key==="duplicate"&&lr(Qe.dataId,Qe))},[]),(0,c.useEffect)(function(){ut!=null&&ut.some(function(Er){return Er.key===yt})||Mn("none")},[ut]);var Hn=(0,c.useMemo)(function(){return o()({display:"flex",alignItems:"center",backgroundColor:ye.colorFillAlter,padding:ye.padding},q)},[q,ye.colorFillAlter]),Qn=(0,c.useMemo)(function(){return{fontSize:ye.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:ye.marginXS}},[ye.fontSize,ye.marginXS]),Mn=(0,c.useCallback)(function(){var Er=D()(N()().mark(function Tr(Or){return N()().wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:bt(Or),vn(null),ie==null||ie.reset();case 3:case"end":return cr.stop()}},Tr)}));return function(Tr){return Er.apply(this,arguments)}}(),[]),lr=(0,c.useCallback)(function(){var Er=D()(N()().mark(function Tr(Or,or){var cr;return N()().wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:cr=o()(o()({},or),{},{dataId:Or}),vn(or),je(Nt,cr,Vn).then(function(Xn){return ie&&Xn&&(ie.reset(),ie.__template=!0,(0,Pe.forEach)(Xn,function(nr,yn){if(nr){var wn;ie.values[yn]=nr,ie==null||(wn=ie.setInitialValuesIn)===null||wn===void 0||wn.call(ie,yn,nr)}})),Xn}).catch(function(Xn){console.error(Xn)});case 3:case"end":return Bn.stop()}},Tr)}));return function(Tr,Or){return Er.apply(this,arguments)}}(),[]);if(!Ye||!Ve)return null;var Sn=ut==null?void 0:ut.find(function(Er){return Er.key===yt});return(0,n.jsx)("div",{style:Hn,children:(0,n.jsxs)(rt.Z,{wrap:!0,children:[(0,n.jsxs)("label",{style:Qn,children:[Vn("Data template"),": "]}),(0,n.jsx)(Re.default,{role:"button","data-testid":"select-form-data-template",popupMatchSelectWidth:!1,options:ut,fieldNames:{label:"title",value:"key"},value:yt,onChange:Mn}),yt!=="none"&&Sn&&(0,n.jsx)(Pt,{style:{width:220},fieldNames:{label:Sn==null?void 0:Sn.titleField,value:"id"},target:Sn==null?void 0:Sn.collection,value:$n,objectValue:!0,service:{resource:Sn==null?void 0:Sn.collection,params:{filter:Sn==null?void 0:Sn.dataScope}},onChange:function(Tr){return lr(Tr==null?void 0:Tr.id,o()(o()({},Tr),Sn))},targetField:nt("".concat(Sn==null?void 0:Sn.collection,".").concat(Sn.titleField))})]})})};function tt(G){var E=(0,Se.Fi)(G);return E?$e().cloneDeep(E["x-data-templates"])||{}:{}}function je(G,E,J){return Te.apply(this,arguments)}function Te(){return Te=D()(N()().mark(function G(E,J,q){return N()().wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(!(J.fields.length===0||!J.dataId)){_e.next=2;break}return _e.abrupt("return");case 2:return _e.abrupt("return",E.resource(J.collection).get({filterByTk:J.dataId,fields:J.fields,isTemplate:!0}).then(function(ye){var Fe;return(Fe=ye.data)===null||Fe===void 0?void 0:Fe.data}));case 3:case"end":return _e.stop()}},G)})),Te.apply(this,arguments)}var De=e(3192),Xe=function(){var E,J,q=(0,Le.aZ)(),ie=(0,a.useFieldSchema)(),_e=Ie.Z.useToken(),ye=_e.token,Fe=(0,_t.ng)(),Ke=Fe.designable,Ve=(0,De.g)()||{},Ye=Ve.heightProps,Qe=Ye||{},ht=Qe.title,nt=et(),ut=nt.display,lt=nt.enabled,dt=ie.reduceProperties(function(lr,Sn){return Sn["x-component"]==="ActionBar"?Sn:lr}),yt=Object.keys((dt==null?void 0:dt.properties)||{}).length>0,bt=ie==null||(E=ie.parent)===null||E===void 0||(E=E["x-decorator"])===null||E===void 0||(J=E.includes)===null||J===void 0?void 0:J.call(E,"FormBlockProvider"),Yt=yt||Ke?ye.controlHeight+(bt?1:2)*ye.marginLG:ye.marginLG,Gt=ht?ye.fontSizeLG*ye.lineHeightLG+ye.padding*2-1:0,$n=(0,qe.hS)()||{},vn=$n.data,Nt=(vn==null?void 0:vn.meta)||{},pn=Nt.count,Vn=Nt.pageSize,Hn=pn>Vn,Qn=Hn?ye.controlHeightSM+1*ye.paddingLG:0,Mn=ut&&lt?ye.controlHeight+2*ye.padding+ye.margin:0;return q-Yt-ye.paddingLG-Gt-Qn-Mn},Ze=e(25324),He,ct,at=["form","children"],ft=["form","children","disabled"],Lt=["form","disabled"],Jt=function(E){var J=E.form,q=E.children,ie=M()(E,at),_e=(0,a.useField)(),ye=(0,a.useFieldSchema)(),Fe=(0,_t.lI)(J.createVoidField(o()(o()({},_e.props),{},{basePath:""}))),Ke=Xe(),Ve=Ie.Z.useToken(),Ye=Ve.token,Qe=(0,_t.ng)(),ht=Qe.designable;return(0,n.jsx)(a.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(a.FormContext.Provider,{value:J,children:(0,n.jsx)(S.FormLayout,o()(o()({layout:"vertical"},ie),{},{children:(0,n.jsx)("div",{className:(0,ue.css)(He||(He=Q()([`
651
651
  .nb-grid-container {
652
652
  height: `,`;
653
653
  overflow-y: auto;