@nocobase/app 2.0.0-alpha.10 → 2.0.0-alpha.11
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.
|
@@ -1048,7 +1048,7 @@ ctx.element.innerHTML = \`
|
|
|
1048
1048
|
&:hover {
|
|
1049
1049
|
background-color: `,`;
|
|
1050
1050
|
}
|
|
1051
|
-
`])),t.colorFillSecondary);return(0,P.jsxs)("div",{style:{maxHeight:300,overflowY:"auto"},children:[ee.map(function(L){return(0,P.jsx)("div",{role:"option",onClick:function(){return V(L.value)},className:W,children:C(L.label)},L.value)}),(0,P.jsx)(u.Z,{style:{margin:"4px 0"}}),Q.map(function(L){return(0,P.jsx)("div",{role:"option",className:W,onClick:function(){return V(L.value)},title:C(L.label),children:C(L.label)},L.value)})]})};return(0,P.jsxs)(r.Z.Compact,{style:g()(g()({},c.style),{},{width:"100%"}),children:[(0,P.jsx)(A.default,g()(g()({options:$,open:G,onDropdownVisibleChange:k},c),{},{allowClear:!0,style:{width:"100%",minWidth:100,maxWidth:["past","next","exact",void 0].includes(d==null?void 0:d.type)?100:null},value:(d==null?void 0:d.type)||"exact",onChange:V,dropdownRender:J})),["past","next"].includes(d==null?void 0:d.type)&&[(0,P.jsx)(y.Z,{value:d==null?void 0:d.number,onChange:function(ee){var Q=g()(g()({},d),{},{number:ee});p(Q)}},"number"),(0,P.jsx)(A.default,{value:d==null?void 0:d.unit,style:{minWidth:130,maxWidth:140},onChange:function(ee){var Q=g()(g()({},d),{},{unit:ee});p(Q)},options:[{value:"day",label:E("Day")},{value:"week",label:E("Calendar week")},{value:"month",label:E("Calendar Month")},{value:"year",label:E("Calendar Year")}],popupMatchSelectWidth:!0},"unit")],((d==null?void 0:d.type)==="exact"||!(d!=null&&d.type))&&(0,P.jsx)(i,g()({},c))]})}},20493:function(_t,ve,e){"use strict";e.d(ve,{IW:function(){return v},LC:function(){return r},bt:function(){return R},Fo:function(){return A},TR:function(){return F},OR:function(){return y}});var q=e(97857),a=e.n(q),X=e(13769),l=e.n(X),P=e(10274),m=e(60887),z=e(97133),o=e(94350),N=e(96486),b=e.n(N),j=e(67294),f=e(46917),g=e(84577),n=e(85893),M=["component","overStyle","style","children","openMode"],T=["schema","id","eid","removeParentsIfNoChildren"],u=["component"],r=(0,j.createContext)(null);r.displayName="DraggableContext";var A=(0,j.createContext)(null);A.displayName="SortableContext";var y=function(I){var O=I.id,c=I.data,d=I.children,p=(0,m.useDraggable)({id:O,data:c}),C=(0,m.useDroppable)({id:O,data:c}),h=(0,j.useMemo)(function(){return{draggable:p,droppable:C}},[p,C]);return(0,n.jsx)(A.Provider,{value:h,children:d})},K=function(I){return new P.C(I).setAlpha(.15).toHex8String()},R=function(I){var O,c,d=I.component,p=I.overStyle,C=I.style,h=I.children,E=I.openMode,S=l()(I,M),t=(0,f.dQ)(),D=t.token,U=(0,j.useContext)(A),G=U.draggable,k=U.droppable,$=k.isOver,V=k.setNodeRef,J=a()({},C),ne=(0,o.useFieldSchema)(),ee=(ne==null?void 0:ne["x-component"])==="Action.Link"||d==="a";return $&&(G==null||(O=G.active)===null||O===void 0?void 0:O.id)!==(k==null||(c=k.over)===null||c===void 0?void 0:c.id)&&(J[ee?"color":"background"]=K(D.colorSettings),Object.assign(J,p)),j.createElement(d||"div",a()(a()({role:"none"},S),{},{className:(0,z.cx)("nb-sortable-designer",I.className),ref:V,style:J}),h)},Y=function(I){var O=x(I),c=(0,o.useFieldSchema)();return I.schema?a()(a()({},I),{},{id:O}):a()(a()({},I),{},{id:O,schema:c})},x=function(I){var O,c=(0,o.useField)();return I.id?I.id:(O=c.address)===null||O===void 0?void 0:O.toString()},B=(0,o.observer)(function(i){var I=Y(i),O=I.schema,c=I.id,d=I.eid,p=I.removeParentsIfNoChildren,C=l()(I,T),h=(0,j.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:O,removeParentsIfNoChildren:p??!0}},[O,p]);return(0,n.jsx)(y,{id:c,data:h,children:(0,n.jsx)(R,a()(a()({id:d},C),{},{children:i.children}))})},{displayName:"InternalSortableItem"}),F=j.memo(function(i){var I=i.component,O=l()(i,u),c=(0,g.ng)(),d=c.designable;return d?(0,n.jsx)(B,a()({},i)):j.createElement(I||"div",b().omit(O,["children","schema","overStyle","openMode","id","eid","removeParentsIfNoChildren"]),i.children)});F.displayName="SortableItem";var v=function(I){var O=(0,j.useContext)(A)||{},c=O.draggable;if(!c)return null;var d=c.attributes,p=c.listeners,C=c.setNodeRef;return(0,n.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,n.jsx)("div",a()(a()(a()({ref:C,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},p),d),{},{role:"none",children:(0,n.jsx)("span",{style:{cursor:"move",fontSize:14},children:I.children})}))})}},7840:function(_t,ve,e){"use strict";e.d(ve,{I9:function(){return p},Rq:function(){return Y},e7:function(){return K},jC:function(){return F},od:function(){return R}});var q=e(97857),a=e.n(q),X=e(9783),l=e.n(X),P=e(15009),m=e.n(P),z=e(5574),o=e.n(z),N=e(99289),b=e.n(N),j=e(52677),f=e.n(j),g=e(20301),n=e(96486),M=e.n(n),T=e(10097),u=e(76690),r=e(65565),A=e(61341),y=e(63179),K=function(E,S){var t,D=/{{(.*?)}}/,U=E==null||(t=E.match)===null||t===void 0?void 0:t.call(E,D);if(U){var G=M().get(S,U[1]);return M().isFunction(G)?G():G}else return E};function R(h){if(f()(h)!=="object"||h===null)return null;for(var E in h)if(Object.prototype.hasOwnProperty.call(h,E))return Object.prototype.toString.call(h[E])==="[object Object]"&&h[E]!==null?R(h[E]):{key:E,value:h[E]};return null}var Y=function(E){var S=x(E),t=(0,n.findIndex)(S,function(U,G,k){if(U.includes("$")&&G>0)return!0}),D=S.slice(0,t);return D};function x(h){var E=[];function S(t){Object.keys(t).sort().forEach(function(D){E.push(D),t[D]&&f()(t[D])==="object"&&S(t[D])})}return S(h),E}var B=function(){var h=b()(m()().mark(function E(S,t,D){var U,G,k,$;return m()().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return U=(0,u.cG)(S)?[t.parseVariable(S,D).then(function(ne){var ee=ne.value;return ee})]:[S],J.prev=1,J.next=4,Promise.all(U);case 4:return G=J.sent,k=o()(G,1),$=k[0],J.abrupt("return",$);case 10:throw J.prev=10,J.t0=J.catch(1),console.error("Error in parseVariableValue:",J.t0),J.t0;case 14:case"end":return J.stop()}},E,null,[[1,10]])}));return function(S,t,D){return h.apply(this,arguments)}}(),F=function(){var h=b()(m()().mark(function E(S,t){var D,U,G,k,$,V,J,ne;return m()().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return D=S.ruleGroup,U=S.variables,G=S.localVariables,k=S.variableNameOfLeftCondition,$=S.conditionType,V=Object.keys(D)[0]||"$and",J=D[V],Q.next=5,Promise.all(J.map(function(W){return v(W,U,G,k,$,t)}));case 5:if(ne=Q.sent,V!=="$and"){Q.next=10;break}return Q.abrupt("return",(0,n.every)(ne,function(W){return W}));case 10:if(!ne.length){Q.next=12;break}return Q.abrupt("return",(0,n.some)(ne,function(W){return W}));case 12:return Q.abrupt("return",!0);case 13:case"end":return Q.stop()}},E)}));return function(S,t){return h.apply(this,arguments)}}(),v=function(){var h=b()(m()().mark(function E(S,t,D,U,G,k){return m()().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(!("$and"in S||"$or"in S)){V.next=4;break}return V.next=3,F({ruleGroup:S,variables:t,localVariables:D,conditionType:G},k);case 3:return V.abrupt("return",V.sent);case 4:return V.abrupt("return",G==="advanced"?i(S,t,D,k):I(S,t,D,U,k));case 5:case"end":return V.stop()}},E)}));return function(S,t,D,U,G,k){return h.apply(this,arguments)}}(),i=function(){var h=b()(m()().mark(function E(S,t,D,U){var G,k,$;return m()().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return G=S.op,J.next=3,B(S.rightVar,t,D);case 3:return k=J.sent,J.next=6,B(S.leftVar,t,D);case 6:if($=J.sent,!G){J.next=9;break}return J.abrupt("return",U.apply(l()({},G,[$,k])));case 9:return J.abrupt("return",!0);case 10:case"end":return J.stop()}},E)}));return function(S,t,D,U){return h.apply(this,arguments)}}(),I=function(){var h=b()(m()().mark(function E(S,t,D,U,G){var k,$,V,J,ne,ee,Q,W,L,w,Z,te,oe,fe;return m()().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(k=R(S),$=k==null?void 0:k.key,$){he.next=4;break}return he.abrupt("return",!0);case 4:return V=O(Y(S),U),J=t.parseVariable(V,D,{doNotRequest:!0}).then(function(ie){var le=ie.value;return le}),ne=(0,u.cG)(k==null?void 0:k.value)?[t.parseVariable(k==null?void 0:k.value,D).then(function(ie){var le=ie.value;return le}),J]:[k==null?void 0:k.value,J],he.prev=7,he.next=10,Promise.all(ne);case 10:return ee=he.sent,Q=o()(ee,2),W=Q[0],L=Q[1],he.next=16,t.getCollectionField(V,D);case 16:return w=he.sent,Z=(0,r.J)(L,{targetCollectionField:w}),te=(0,r.J)(W,{targetCollectionField:w}),w!=null&&w.type&&["datetime","date","datetimeNoTz","dateOnly","unixTimestamp"].includes(w.type)&&Z&&(oe=(0,A.CE)(te),fe=(0,g.getPickerFormat)(oe),Z=(0,g.dayjs)(Z).format(fe)),he.abrupt("return",G.apply(l()({},$,[Z,te])));case 23:throw he.prev=23,he.t0=he.catch(7),he.t0;case 26:case"end":return he.stop()}},E,null,[[7,23]])}));return function(S,t,D,U,G){return h.apply(this,arguments)}}();function O(h){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(E,".").concat(h.join(".")," }}")}var c=function(E){var S={};return E.map(function(t){S[t.name]=t.ctx}),S};function d(h){return h.replace(/{{\s*}}/g,'{{"{{}}"}}')}function p(h,E,S,t,D,U){return C.apply(this,arguments)}function C(){return C=b()(m()().mark(function h(E,S,t,D,U,G){var k,$,V,J,ne,ee,Q,W,L,w;return m()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(!(S&&E==="handlebars")){te.next=23;break}return g.Handlebars.registerHelper("t",function(oe){if(typeof oe=="string")return G(oe,{ns:y.g})}),te.prev=2,V=d(S),J=g.Handlebars.compile(V),ne=c(D),ee=(t==null||(k=t.ctxRef)===null||k===void 0?void 0:k.current)||{},Q=ee.$nDate,W={},Object.keys(Q||{}).map(function(oe){W[oe]=Q[oe]()}),L=J(a()(a()(a()({},t==null||($=t.ctxRef)===null||$===void 0?void 0:$.current),ne),{},{$nDate:W})),console.log(L),te.next=13,U(L);case 13:return te.abrupt("return",te.sent);case 16:return te.prev=16,te.t0=te.catch(2),/VariablesProvider: .* is not found/.test(te.t0.message)||console.log(te.t0),console.log(S),te.abrupt("return",S);case 21:te.next=36;break;case 23:return te.prev=23,te.next=26,(0,T.replaceVariableValue)(S,t,D);case 26:return w=te.sent,te.next=29,U(w);case 29:return te.abrupt("return",te.sent);case 32:return te.prev=32,te.t1=te.catch(23),/VariablesProvider: .* is not found/.test(te.t1.message)||console.log(te.t1),te.abrupt("return",S);case 36:case"end":return te.stop()}},h,null,[[2,16],[23,32]])})),C.apply(this,arguments)}},25145:function(_t,ve,e){"use strict";e.d(ve,{u:function(){return R}});var q=e(5574),a=e.n(q),X=e(97857),l=e.n(X),P=e(13769),m=e.n(P),z=e(94350),o=e(96486),N=e(67294),b=e(49488),j=e(75585),f=e(22891),g={type:"void","x-component":"Action.Container","x-action":"view",title:'{{ t("View record") }}',"x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab",properties:{tab1:{type:"void",title:'{{t("Details")}}',"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:common:addBlock",properties:{}}}}}}}},n=e(94804),M=e(57105),T=e(68304),u=e(85893),r=["WrappedComponent"],A=function(){var x=(0,z.useFieldSchema)(),B=(0,b.useDesignable)(),F=B.insertAfterBegin,v=(0,N.useCallback)(function(i){var I=x.reduceProperties(function(O,c){return c["x-component"]==="Action.Container"?c:O},null);I||F((0,o.cloneDeep)(i))},[x,F]);return v},y=function(x){return x["x-component"]==="Action.Container"},K=function(x){var B=x.WrappedComponent,F=m()(x,r),v=(0,z.useFieldSchema)(),i=(0,f.ES)(),I=i.openPopup,O=(0,N.useRef)(!1),c=A(),d=(0,N.useRef)(v);d.current=v;var p=(0,N.useRef)(c);p.current=c;var C=(0,N.useRef)(I);C.current=I;var h=(0,N.useCallback)(function(){return d.current},[]),E=(0,N.useCallback)(function(){d.current.properties||(p.current(g),O.current=!0),O.current?(setTimeout(function(){C.current({customActionSchema:h()})}),O.current=!1):d.current.properties&&C.current()},[h]),S=(0,N.useMemo)(function(){return(0,o.debounce)(E,600,{leading:!0,trailing:!1})},[E]);return(0,N.useEffect)(function(){return function(){S.cancel()}},[S]),(0,u.jsx)("a",{onClick:S,children:(0,u.jsx)(B,l()({},F))})};function R(Y){return function(x){var B=(0,N.useState)(!1),F=a()(B,2),v=F[0],i=F[1],I=(0,N.useState)(!1),O=a()(I,2),c=O[0],d=O[1],p=(0,n.Kx)(),C=(0,b.useActionContext)(),h=(0,z.useField)(),E=(0,z.useFieldSchema)(),S=(E==null?void 0:E["x-component-props"])||{},t=S.enableLink,D=S.openMode,U=S.openSize,G=(0,f.ES)(),k=G.visibleWithURL,$=G.setVisibleWithURL,V=(0,N.useCallback)(function(ee){i==null||i(ee),$==null||$(ee)},[$]),J=(0,N.useRef)(E);J.current=E;var ne=C.setSubmitted;return t?(0,u.jsx)(j.OA,{visible:!1,children:(0,u.jsxs)(b.ActionContextProvider,{button:(0,u.jsx)(Y,l()({},x)),visible:v||k,setVisible:V,formValueChanged:c,setFormValueChanged:d,openMode:D,openSize:U,containerRefKey:"field-popup",fieldSchema:E,setSubmitted:ne,children:[(0,u.jsx)(n.YQ,{name:p.name,children:(0,u.jsx)(b.SchemaComponentOptions,{children:(0,u.jsx)(T.Rm,{children:(0,u.jsx)(M.sq,{onlyRenderProperties:!0,basePath:h==null?void 0:h.address,schema:E,filterProperties:y})})})}),(0,u.jsx)(K,l()(l()({},x),{},{WrappedComponent:Y}))]})}):(0,u.jsx)(Y,l()({},x))}}},61736:function(_t,ve,e){"use strict";e.d(ve,{D:function(){return a}});var q=e(67294),a=(0,q.createContext)({});a.displayName="SchemaComponentContext.Provider"},44245:function(_t,ve,e){"use strict";e.d(ve,{R:function(){return n}});var q=e(97857),a=e.n(q),X=e(13769),l=e.n(X),P=e(86201),m=e(94350),z=e(67294),o=e(47844),N=e(85893),b=["children","form"],j=["children"],f=function(T){var u=T.children,r=T.form,A=l()(T,b),y=(0,z.useContext)(m.SchemaOptionsContext),K=(0,z.useContext)(m.SchemaExpressionScopeContext),R=a()(a()({},y==null?void 0:y.scope),K),Y=a()({},y==null?void 0:y.components);return(0,N.jsx)(m.FormProvider,a()(a()({},A),{},{form:r,children:(0,N.jsx)(o.G,{components:Y,scope:R,children:u})}))},g=function(T){var u=T.children,r=l()(T,j),A=(0,z.useContext)(m.SchemaOptionsContext),y=(0,z.useContext)(m.SchemaExpressionScopeContext),K=a()(a()({},A==null?void 0:A.scope),y),R=a()({},A==null?void 0:A.components),Y=(0,z.useMemo)(function(){return(0,P.createForm)()},[]);return(0,N.jsx)(m.FormProvider,a()(a()({},r),{},{form:Y,children:(0,N.jsx)(o.G,{components:R,scope:K,children:u})}))},n=function(T){return T.form?(0,N.jsx)(f,a()({},T)):(0,N.jsx)(g,a()({},T))}},93587:function(_t,ve,e){"use strict";e.d(ve,{m:function(){return u}});var q=e(97857),a=e.n(q),X=e(86201),l=e(94350),P=e(74330),m=e(67294),z=e(54195),o=e(21044),N=e(84577),b=e(44245),j=e(93323),f=e(12174),g=function(A){var y=A.uid,K=A.type,R=K===void 0?"getJsonSchema":K,Y=A.onSuccess,x={url:"/uiSchemas:".concat(R,"/").concat(y)},B=(0,f.QT)(x,{refreshDeps:[y],onSuccess:function(I){Y&&Y(I)}}),F=B.data,v=B.loading;return{schema:F==null?void 0:F.data,loading:v}},n=e(85893),M=function(A){return A},T=function(A){var y=A.noForm,K=A.onlyRenderProperties,R=A.hidden,Y=A.scope,x=A.uid,B=A.components,F=A.onSuccess,v=A.NotFoundPage,i=A.schemaTransform,I=i===void 0?M:i,O=A.onPageNotFind,c=K?"getProperties":"getJsonSchema",d=(0,m.useMemo)(function(){return(0,X.createForm)()},[x]),p=g({uid:x,type:c,onSuccess:function(G){F&&F(G)}}),C=p.schema,h=p.loading,E=(0,N.Co)(v),S=(0,z.Kk)(),t=(0,l.useFieldSchema)(),D=(0,m.useMemo)(function(){return I(C||{})},[C,I]);return S||h||R?(0,n.jsx)(P.Z,{style:{width:"100%",marginTop:20},delay:o.fw}):!C||Object.keys(C).length===0?(O&&O(),E?(0,n.jsx)(E,{}):null):y?(0,n.jsx)(j.n,{components:B,scope:Y,schema:D,parentSchema:t}):(0,n.jsx)(b.R,{form:d,children:(0,n.jsx)(j.n,{components:B,scope:Y,schema:D,parentSchema:t})})},u=(0,m.memo)(function(r){return r.uid?(0,n.jsx)(T,a()({},r)):null});u.displayName="RemoteSchemaComponent"},93323:function(_t,ve,e){"use strict";e.d(ve,{A:function(){return y},n:function(){return Y}});var q=e(97857),a=e.n(q),X=e(13769),l=e.n(X),P=e(9783),m=e.n(P),z=e(94350),o=e(96486),N=e.n(o),b=e(67294),j=e(57105),f=e(61736),g=e(47844),n=e(85893),M=["components","scope","schema","distributed","onChange","parentSchema"],T=["schema","parentSchema"],u=["memoized"];function r(x){return z.Schema.isSchemaInstance(x)?x:x!=null&&x.name?new z.Schema({type:"object",properties:m()({},x.name,x),name:"p_".concat(x.name)}):new z.Schema(x)}var A=function(B){return(0,b.useMemo)(function(){return r(B)},[])},y=(0,b.createContext)({onChange:N().noop}),K=(0,b.memo)(function(x){var B=x.components,F=x.scope,v=x.schema,i=x.distributed,I=x.onChange,O=x.parentSchema,c=l()(x,M),d=(0,b.useContext)(f.D),p=(0,b.useMemo)(function(){return r(v)},[v]),C=(0,b.useMemo)(function(){return a()(a()({},d),{},{distributed:d.distributed==!1?!1:i,refresh:d.refresh||N().noop})},[d,i]),h=(0,b.useContext)(y),E=h.onChange,S=(0,b.useMemo)(function(){return{onChange:function(){I==null||I(p),E==null||E()}}},[I,E,p]);return(0,n.jsx)(y.Provider,{value:S,children:(0,n.jsx)(f.D.Provider,{value:C,children:(0,n.jsx)(g.G,{inherit:!0,components:B,scope:F,children:(0,n.jsx)(j.sq,a()(a()({},c),{},{schema:p,isUseFormilyField:!0,parentSchema:O}))})})})});K.displayName="RecursionSchemaComponent";var R=(0,b.memo)(function(x){var B=x.schema,F=x.parentSchema,v=l()(x,T),i=A(B);return(0,n.jsx)(K,a()(a()({},v),{},{schema:i,parentSchema:F}))});R.displayName="MemoizedSchemaComponent";var Y=(0,b.memo)(function(x){var B=x.memoized,F=l()(x,u);return B?(0,n.jsx)(R,a()({},F)):(0,n.jsx)(K,a()({},F))});Y.displayName="SchemaComponent"},47844:function(_t,ve,e){"use strict";e.d(ve,{B:function(){return m},G:function(){return z}});var q=e(97857),a=e.n(q),X=e(94350),l=e(67294),P=e(85893),m=function(){var N=(0,l.useContext)(X.SchemaOptionsContext);return N||{}},z=(0,l.memo)(function(o){var N=o.children,b=m(),j=(0,l.useMemo)(function(){return a()(a()({},b.components),o.components)},[b.components,o.components]),f=(0,l.useMemo)(function(){return a()(a()({},b.scope),o.scope)},[b.scope,o.scope]),g=(0,l.useMemo)(function(){return{scope:f,components:j}},[f,j]);return(0,P.jsx)(X.SchemaOptionsContext.Provider,{value:g,children:(0,P.jsx)(X.SchemaComponentsContext.Provider,{value:j,children:(0,P.jsx)(X.ExpressionScope,{value:f,children:N})})})});z.displayName="SchemaComponentOptions"},70993:function(_t,ve,e){"use strict";e.d(ve,{_b:function(){return v},RV:function(){return i.R},m1:function(){return I.m},n6:function(){return O.n},AT:function(){return O.A},G0:function(){return c.G},a$:function(){return ne},Tz:function(){return V},Bs:function(){return c.B}});var q=e(15009),a=e.n(q),X=e(99289),l=e.n(X),P=e(12444),m=e.n(P),z=e(72004),o=e.n(z),N=e(31996),b=e.n(N),j=e(26037),f=e.n(j),g=e(97857),n=e.n(g),M=e(18205),T=e(83062),u=e(83622),r=e(67294),A=e(49218),y=e(26793),K=e(49488),R=e(68230),Y=e(80940),x=e(85893),B={backgroundColor:"var(--colorSettings) !important"},F={backgroundColor:"transparent"},v=function(W){var L=(0,K.useDesignable)(),w=L.designable,Z=L.setDesignable,te=(0,y.$)(),oe=te.t,fe=(0,R.d)(),xe=fe.token,he=w?B:F,ie=(0,Y.wd)(),le=ie.isMobileLayout;return(0,A.y1)("Ctrl+Shift+U",function(){return Z(!w)},[w]),le?null:(0,x.jsx)(T.Z,{title:oe("UI Editor"),children:(0,x.jsx)(u.ZP,{"data-testid":"ui-editor-button",icon:(0,x.jsx)(M.Z,{style:{color:xe.colorTextHeaderMenu}}),title:oe("UI Editor"),style:n()(n()({},he),W.style),onClick:function(){Z(!w)}})})},i=e(44245),I=e(93587),O=e(93323),c=e(47844),d=e(5574),p=e.n(d),C=e(86201),h=e(94350),E=e(84327),S=e(96486),t=e.n(S),D=e(61736),U=e(81327),G=function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(W).concat((0,E.uid)())};h.Schema.silent(!0);var k={},$={silent:!0,compile:function(W){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=function(){if($.silent)try{return new Function("$root","with($root) { return (".concat(W,"); }"))(L)}catch{return"{{".concat(W,"}}")}else return new Function("$root","with($root) { return (".concat(W,"); }"))(L)};return k[W]?k[W]:W.trim().startsWith("t(")?(k[W]=w(),k[W]):w()}};h.Schema.registerCompiler($.compile);var V=function(W){var L=W.designable,w=W.onDesignableChange,Z=W.components,te=W.children,oe=(0,r.useContext)(D.D),fe=(0,c.B)(),xe=(0,r.useState)(function(){return(0,E.uid)()}),he=p()(xe,2),ie=he[0],le=he[1],ue=(0,r.useMemo)(function(){return W.form||(0,C.createForm)()},[ie]),me=(0,y.$)(),se=me.t,ae=(0,U.qD)(),Ee=(0,r.useMemo)(function(){return n()(n()({},W.scope),{},{t:se,randomString:G})},[W.scope,se,fe==null?void 0:fe.scope]),Pe=(0,r.useState)(L),De=p()(Pe,2),Fe=De[0],ye=De[1],be=(0,r.useMemo)(function(){return typeof L=="boolean"?L:Fe},[L,Fe,oe.designable]),ce=(0,r.useMemo)(function(){return function(ge){typeof be!="boolean"&&ye(ge),w==null||w(ge)}},[be,w]);(0,r.useEffect)(function(){var ge,de;be?(ge=ae.flowEngine)===null||ge===void 0||(ge=ge.flowSettings)===null||ge===void 0||ge.enable():(de=ae.flowEngine)===null||de===void 0||(de=de.flowSettings)===null||de===void 0||de.disable()},[ae,be]);var pe=(0,r.useCallback)(function(){le((0,E.uid)())},[]),H=(0,r.useMemo)(function(){return{scope:Ee,components:Z,reset:pe,refresh:t().noop,designable:be,setDesignable:ce}},[Z,be,pe,Ee,ce]);return(0,x.jsx)(D.D.Provider,{value:H,children:(0,x.jsx)(h.FormProvider,{form:ue,children:(0,x.jsx)(c.G,{inherit:!0,scope:Ee,components:Z,children:te})})})};V.displayName="SchemaComponentProvider";var J=e(31601),ne=function(Q){b()(L,Q);var W=f()(L);function L(){return m()(this,L),W.apply(this,arguments)}return o()(L,[{key:"load",value:function(){var w=l()(a()().mark(function te(){return a()().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:this.addComponents();case 1:case"end":return fe.stop()}},te,this)}));function Z(){return w.apply(this,arguments)}return Z}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:v})}}]),L}(J.S),ee=null},84577:function(_t,ve,e){"use strict";e.d(ve,{zz:function(){return z.zz},Pl:function(){return z.Pl},oB:function(){return z.oB},lI:function(){return a},hi:function(){return K.hi},eJ:function(){return X.e},Co:function(){return m},aZ:function(){return K.aZ},ng:function(){return z.ng},et:function(){return o.e},cL:function(){return T},fd:function(){return R},Cl:function(){return j},vH:function(){return A},sR:function(){return z.sR},wN:function(){return y.w},Dm:function(){return g},fM:function(){return K.fM}});var q=e(67294),a=function(x){var B=(0,q.useRef)(null);return(0,q.useEffect)(function(){return B.current&&x!==B.current&&B.current.onUnmount(),B.current=x,x.onMount(),function(){x.onUnmount()}},[x]),x},X=e(96365),l=e(94350),P=e(96486),m=function(x,B){var F=(0,q.useContext)(l.SchemaOptionsContext),v=F.components;return x?typeof x!="string"?x:(0,P.get)(v,x)||B:B},z=e(94516),o=e(98146),N=e(97857),b=e.n(N),j=function(x){var B=(0,q.useContext)(l.SchemaOptionsContext),F=(0,q.useContext)(l.SchemaExpressionScopeContext),v=(0,q.useRef)();return v.current=F,x.toFieldProps(b()(b()({},B),{},{get scope(){return b()(b()({},B.scope),v.current)}}))},f=e(61736);function g(){return(0,q.useContext)(f.D)}var n=e(26793),M=e(6145),T=function(){var x,B=(0,M.useCollectionManager_deprecated)(),F=B.getCollectionJoinField,v=B.getCollection,i=(0,l.useFieldSchema)(),I=(0,M.useCollection_deprecated)(),O=I.getField,c=O(i.name)||F(i["x-collection-field"]),d=(0,n.$)(),p=d.t,C=((x=i["x-component-props"])===null||x===void 0?void 0:x.fieldNames)||{},h=C.label,E=(0,q.useMemo)(function(){if(!(!c||!(c!=null&&c.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(c.interface)){var S=v(c.target);if((S==null?void 0:S.template)==="file")return[{label:p("Record picker"),value:"CollectionField"},{label:p("Select"),value:"AssociationSelect"}];switch(c.interface){case"o2m":return[{label:p("Record picker"),value:"CollectionField"},{label:p("Subtable"),value:"TableField"},{label:p("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:p("Record picker"),value:"CollectionField"},{label:p("Select"),value:"AssociationSelect"}];default:return[{label:p("Record picker"),value:"CollectionField"},{label:p("Subform"),value:"FormField"},{label:p("Select"),value:"AssociationSelect"}]}}},[p,c==null?void 0:c.interface,h]);return E},u=e(35746),r=e(58837),A=function(){var x,B=(0,l.useField)(),F=(0,l.useFieldSchema)(),v=(0,r.Kx)(),i=(0,u.d9)(),I=(v==null?void 0:v.getField(F.name))||(i==null?void 0:i.getCollectionField(F["x-collection-field"])),O=(0,X.e)();(0,q.useEffect)(function(){if(!(B!=null&&B.title)){var c;B.title=O(I==null||(c=I.uiSchema)===null||c===void 0?void 0:c.title)}},[I==null||(x=I.uiSchema)===null||x===void 0?void 0:x.title])},y=e(9780),K=e(18686),R=function(x){var B,F=(0,n.$)(),v=F.t,i=(0,M.useCollectionManager_deprecated)(),I=i.getCollectionJoinField,O=i.getCollection,c=(0,l.useFieldSchema)(),d=(x==null?void 0:x.fieldSchema)||c,p=(0,l.useField)(),C=(0,l.useForm)(),h=(d==null?void 0:d["x-read-pretty"])||p.readPretty||C.readPretty,E=x==null?void 0:x.fieldSchema,S=(0,M.useCollection_deprecated)(),t=S.getField,D=(x==null?void 0:x.collectionField)||t(d.name)||I(d["x-collection-field"]),U=((B=d["x-component-props"])===null||B===void 0?void 0:B.fieldNames)||{},G=U.label,k=(0,q.useMemo)(function(){if(!(!D||!(D!=null&&D.interface))&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(D.type)){var $=O(D.target);if(($==null?void 0:$.template)==="file")return h?[{label:v("Title"),value:"Select"},{label:v("File manager"),value:"FileManager"},{label:v("Tag"),value:"Tag"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},{label:v("File manager"),value:"FileManager"}];if(($==null?void 0:$.template)==="tree"&&["m2m","o2m","m2o"].includes(D.interface))return h?[{label:v("Title"),value:"Select"},{label:v("Tag"),value:"Tag"},!E&&{label:v("Sub-details"),value:"Nester"},!E&&{label:v("Sub-table"),value:"SubTable"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},!E&&["m2m","o2m"].includes(D.interface)&&{label:v("Sub-table"),value:"SubTable"},!E&&{label:v("Cascade Select"),value:"CascadeSelect"},!E&&{label:v("Sub-form"),value:"Nester"},{label:v("Sub-form(Popover)"),value:"PopoverNester"}];switch(D.interface){case"o2m":return h?[{label:v("Title"),value:"Select"},{label:v("Tag"),value:"Tag"},!E&&{label:v("Sub-table"),value:"SubTable"},!E&&{label:v("Sub-details"),value:"Nester"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},!E&&{label:v("Sub-form"),value:"Nester"},{label:v("Sub-form(Popover)"),value:"PopoverNester"},!E&&{label:v("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return h?[{label:v("Title"),value:"Select"},{label:v("Tag"),value:"Tag"},!E&&{label:v("Sub-details"),value:"Nester"},!E&&{label:v("Sub-table"),value:"SubTable"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},!E&&{label:v("Sub-table"),value:"SubTable"},!E&&{label:v("Sub-form"),value:"Nester"},{label:v("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return h?[{label:v("Title"),value:"Select"},{label:v("Tag"),value:"Tag"},!E&&{label:v("Sub-details"),value:"Nester"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},!E&&{label:v("Sub-form"),value:"Nester"},{label:v("Sub-form(Popover)"),value:"PopoverNester"}];default:return h?[{label:v("Title"),value:"Select"},{label:v("Tag"),value:"Tag"},!E&&{label:v("Sub-details"),value:"Nester"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},!E&&{label:v("Sub-form"),value:"Nester"},{label:v("Sub-form(Popover)"),value:"PopoverNester"}]}}},[v,D==null?void 0:D.interface,G]);return(k||[]).filter(Boolean)}},18686:function(_t,ve,e){"use strict";e.d(ve,{aZ:function(){return Y},fM:function(){return B},hi:function(){return x}});var q=e(5574),a=e.n(q),X=e(97857),l=e.n(X),P=e(94350),m=e(83204),z=e(9361),o=e(96486),N=e.n(o),b=e(67294),j=e(89250),f=e(49488),g=e(21143),n=e(10097),M=e(1892),T=e(28561),u=function(i,I,O,c,d){return d.includes("/popups/")?2*c.paddingContentVertical+22+c.paddingPageVertical:i?c.paddingContentHorizontalLG:O?I?c.controlPaddingHorizontal+3*c.controlPaddingHorizontalSM+22+c.paddingContentHorizontalLG:c.paddingContentHorizontalLG+12:I?c.paddingSM+c.controlHeight+c.marginXS+2*c.controlPaddingHorizontalSM+22+c.paddingContentHorizontalLG:c.controlHeight+c.marginXS+(c.paddingContentVertical+2)*2+c.paddingContentHorizontalLG},r=function(i){var I=z.Z.useToken(),O=I.token,c=(0,f.useDesignable)(),d=c.designable,p=(0,n.useBlockHeightProps)(),C=p.heightProps,h=(0,j.useLocation)(),E=i||C||{},S=E.disablePageHeader,t=E.enablePageTabs,D=E.hidePageTitle,U=O.sizeXXL-2,G=d?O.controlHeight+2*O.paddingContentHorizontalLG:1*O.paddingContentHorizontalLG,k=u(S,t,D,O,h.pathname);return U+k+G},A=function(){var i=z.Z.useToken(),I=i.token,O=(0,f.useDesignable)(),c=O.designable,d=I.paddingContentVerticalLG+I.margin+2*I.paddingContentVertical+24,p=c?I.controlHeight+2*I.paddingContentHorizontalLG:1*I.paddingContentHorizontalLG;return d+p},y=function(i){var I=(0,P.useFieldSchema)(),O=F(I),c=r(i),d=A();return O?d:c},K=["workflowManualTasks","approvals","approvalRecords"],R=function(){var i,I=z.Z.useToken(),O=I.token,c=(0,n.useBlockHeightProps)(),d=c.heightProps,p=(0,M.Si)(),C=p.heightProps,h=(0,f.useDesignable)(),E=h.designable,S=(0,P.useFieldSchema)(),t=C||d,D=d.titleHeight,U=y(t),G=(0,g.useCollection)(),k=G.name,$=t.heightMode,V=t.height,J=t.title;if(!(!(t!=null&&t.heightMode)||$===T.j.DEFAULT)){var ne=Object.keys(((i=S.parent.properties.actions)===null||i===void 0?void 0:i.properties)||{}).length>0,ee=O.controlHeight+O.padding+O.marginLG,Q=ne||E?O.controlHeight+2*O.marginLG:O.marginLG,W=(E&&!K.includes(k)?O.controlHeight:22)+2*O.padding+1,L=J?D:0;return $===T.j.FULL_HEIGHT?window.innerHeight-U-L-W-Q-ee:V-L-Q-W-ee}},Y=function(i){var I=(0,n.useBlockHeightProps)(),O=I.heightProps,c=y(),d=O||{},p=d.heightMode,C=d.height,h=d.title,E=d.titleHeight,S=h?E:0;if(!(!(O!=null&&O.heightMode)||p===T.j.DEFAULT)){if(p===T.j.FULL_HEIGHT){var t=window.innerHeight-c;return i!=null&&i.removeBlockHeaderHeight&&(t=t-S),i!=null&&i.innerExtraHeight&&(t=t-i.innerExtraHeight),t}return C}},x=function(){var i=(0,P.useFieldSchema)(),I=(0,b.useMemo)(function(){return(0,n.getPageSchema)(i)},[]),O=(I==null?void 0:I["x-component-props"])||{},c=O.disablePageHeader,d=O.enablePageTabs,p=O.hidePageTitle,C=l()(l()({},i==null?void 0:i["x-component-props"]),{},{disablePageHeader:c,enablePageTabs:d,hidePageTitle:p}),h=y(C),E=C||{},S=E.heightMode,t=E.height;if(!(!(C!=null&&C.heightMode)||S===T.j.DEFAULT))return S===T.j.FULL_HEIGHT?window.innerHeight-h:t},B=function(){var i=(0,b.useState)(),I=a()(i,2),O=I[0],c=I[1],d=(0,b.useRef)(null),p=R(),C=(0,b.useCallback)((0,o.debounce)(function(){var E;if(d.current){var S=d.current.getBoundingClientRect(),t=(E=d.current.querySelector(".ant-table"))===null||E===void 0?void 0:E.getBoundingClientRect();t&&c(S.width)}},100),[p]),h=(0,b.useCallback)(function(E){d.current=E&&E.children?E.children[0]:null,C()},[C]);return(0,m.Z)("resize",C),{height:p,width:O,tableSizeRefCallback:h}},F=function v(i){if(!i)return null;if(i["x-component"]==="Action.Container"){var I;return(i==null||(I=i.parent)===null||I===void 0||(I=I["x-component-props"])===null||I===void 0?void 0:I.openMode)!=="page"}return v(i.parent)}},96365:function(_t,ve,e){"use strict";e.d(ve,{e:function(){return N}});var q=e(97857),a=e.n(q),X=e(52677),l=e.n(X),P=e(94350),m=e(67294),z={},o=function(j){var f=/{{.*?}}/g;return f.test(j)},N=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},f=j.noCache,g=(0,m.useContext)(P.SchemaOptionsContext),n=(0,m.useContext)(P.SchemaExpressionScopeContext);return function(M,T){var u=!1,r;if(typeof M=="string"&&M.startsWith("{{")&&(u=!0,r=M),M&&l()(M)==="object"&&!(0,m.isValidElement)(M)){try{r=JSON.stringify(M)}catch(y){return console.warn("Failed to stringify:",y),M}if(z[r])return z[r];u=o(r)}if(Array.isArray(M)){try{r=JSON.stringify(M)}catch(y){return console.warn("Failed to stringify:",y),M}if(z[r])return z[r];u=o(r)}if(u){var A=a()(a()(a()({},g==null?void 0:g.scope),n),T);if(!r)return P.Schema.compile(M,A);try{return f?P.Schema.compile(M,A):(z[r]=z[r]||P.Schema.compile(M,A),z[r])}catch(y){return console.log("useCompile error",M,y),P.Schema.compile(M,A)}}return M}}},94516:function(_t,ve,e){"use strict";e.d(ve,{zz:function(){return $},Pl:function(){return S},oB:function(){return G},ng:function(){return J},sR:function(){return V}});var q=e(5574),a=e.n(q),X=e(19632),l=e.n(X),P=e(15009),m=e.n(P),z=e(99289),o=e.n(z),N=e(12444),b=e.n(N),j=e(72004),f=e.n(j),g=e(9783),n=e.n(g),M=e(97857),T=e.n(M),u=e(94350),r=e(84327),A=e(90105),y=e(45360),K=e(50361),R=e.n(K),Y=e(27361),x=e.n(Y),B=e(36968),F=e.n(B),v=e(67294),i=e(26793),I=e(12174),O=e(57105),c=e(98902),d=e(61736);function p(ne,ee){if(ne)return ne["x-app-version"]||(ne["x-app-version"]=ee),Object.keys(ne.properties||{}).forEach(function(Q){var W;p((W=ne.properties)===null||W===void 0?void 0:W[Q],ee)}),ne}var C=JSON.parse('{"i8":"2.0.0-alpha.10"}'),h=e(80940),E=e(85893);function S(ne){return new $(ne)}var t=function ne(ee){ee&&(ee["x-uid"]||(ee["x-uid"]=(0,r.uid)()),Object.keys(ee.properties||{}).forEach(function(Q){ne(ee.properties[Q])}))},D=function(ee){return ee},U=function(ee,Q){if(!(!ee||!Q)){for(var W in Q)if(Object.prototype.hasOwnProperty.call(Q,W)){var L=Q[W];if(L!==(ee==null?void 0:ee[W]))return!1}return!0}},G=function(ee,Q){if(ee["x-uid"]&&ee["x-uid"]===Q["x-uid"])return[null,ee.toJSON()];var W=ee.toJSON(),L=T()(T()({},W),{},{properties:{}}),w=null,Z=function te(oe,fe){Object.keys(oe||{}).forEach(function(xe){var he=oe[xe];if(he["x-uid"]===Q["x-uid"]){w=oe[xe];return}else fe.properties[xe]=T()(T()({},he),{},{properties:{}}),te(he==null?void 0:he.properties,fe.properties[xe])})};return Z(W.properties,L),[L,w]},k=function(ee){return ee},$=function(){function ne(ee){b()(this,ne),n()(this,"current",void 0),n()(this,"options",void 0),n()(this,"appVersion",void 0),n()(this,"events",{}),this.options=ee,this.current=ee.current,this.appVersion=ee.appVersion}return f()(ne,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var Q=this,W=this.options,L=W.api,w=W.t,Z=w===void 0?k:w;if(L){var te=function(fe){if(!fe)return[];var xe=Object.values(fe.properties).length,he=[];return fe.mapProperties(function(ie){ie["x-component-props"]=ie["x-component-props"]||{},ie["x-component-props"].width=100/xe,ie["x-uid"]&&he.push({"x-uid":ie["x-uid"],"x-component-props":ie["x-component-props"]})}),fe["x-uid"]&&he.length?he:[]};this.on("insertAdjacent",function(){var oe=o()(m()().mark(function fe(xe){var he,ie,le,ue,me,se,ae,Ee,Pe,De;return m()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(ie=xe.onSuccess,le=xe.current,ue=xe.position,me=xe.schema,se=xe.wrap,ae=xe.wrapped,Ee=xe.removed,Pe=[],(ae==null?void 0:ae["x-component"])==="Grid.Col"&&(Pe=Pe.concat(te(ae.parent))),(Ee==null?void 0:Ee["x-component"])==="Grid.Col"&&(Pe=Pe.concat(te(Ee.parent))),Q.refresh(),le["x-uid"]){ye.next=7;break}return ye.abrupt("return");case 7:return ye.next=9,L.request({url:"/uiSchemas:insertAdjacent/".concat(le["x-uid"],"?position=").concat(ue),method:"post",data:{schema:p(me,Q.appVersion),wrap:se}});case 9:if(De=ye.sent,!Pe.length){ye.next=13;break}return ye.next=13,L.request({url:"/uiSchemas:batchPatch",method:"post",data:Pe});case 13:if(!(Ee!=null&&Ee["x-uid"])){ye.next=16;break}return ye.next=16,L.request({url:"/uiSchemas:remove/".concat(Ee["x-uid"]),method:"post"});case 16:ie==null||ie(De==null||(he=De.data)===null||he===void 0?void 0:he.data),y.ZP.success(Z("Saved successfully"),.2);case 18:case"end":return ye.stop()}},fe)}));return function(fe){return oe.apply(this,arguments)}}()),this.on("patch",function(){var oe=o()(m()().mark(function fe(xe){var he;return m()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(he=xe.schema,Q.refresh(),he!=null&&he["x-uid"]){le.next=4;break}return le.abrupt("return");case 4:return le.next=6,L.request({url:"/uiSchemas:patch",method:"post",data:T()({},he)});case 6:y.ZP.success(Z("Saved successfully"),.2);case 7:case"end":return le.stop()}},fe)}));return function(fe){return oe.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var oe=o()(m()().mark(function fe(xe){var he;return m()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(he=xe.schema,he!=null&&he["x-uid"]){le.next=3;break}return le.abrupt("return");case 3:return le.next=5,L.request({url:"/uiSchemas:initializeActionContext",method:"post",data:T()({},he)});case 5:case"end":return le.stop()}},fe)}));return function(fe){return oe.apply(this,arguments)}}()),this.on("batchPatch",function(){var oe=o()(m()().mark(function fe(xe){var he;return m()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return he=xe.schemas,Q.refresh(),le.next=4,L.request({url:"/uiSchemas:batchPatch",method:"post",data:he});case 4:y.ZP.success(Z("Saved successfully"),.2);case 5:case"end":return le.stop()}},fe)}));return function(fe){return oe.apply(this,arguments)}}()),this.on("remove",function(){var oe=o()(m()().mark(function fe(xe){var he,ie;return m()().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(he=xe.removed,ie=[],(he==null?void 0:he["x-component"])==="Grid.Col"&&(ie=te(he.parent)),Q.refresh(),he!=null&&he["x-uid"]){ue.next=6;break}return ue.abrupt("return");case 6:return ue.next=8,L.request({url:"/uiSchemas:remove/".concat(he["x-uid"]),method:"post"});case 8:if(!ie.length){ue.next=11;break}return ue.next=11,L.request({url:"/uiSchemas:batchPatch",method:"post",data:ie});case 11:y.ZP.success(Z("Saved successfully"),.2);case 12:case"end":return ue.stop()}},fe)}));return function(fe){return oe.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(Q){Q.type||(Q.type="void"),Q.name||(Q.name=(0,r.uid)()),this.current["x-uid"]&&t(Q)}},{key:"on",value:function(Q,W){this.events[Q]||(this.events[Q]=[]),this.events[Q].push(W)}},{key:"emit",value:function(){var ee=o()(m()().mark(function W(L){var w=this,Z,te,oe,fe,xe,he=arguments;return m()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(this.events[L]){le.next=2;break}return le.abrupt("return");case 2:for(Z=he.length,te=new Array(Z>1?Z-1:0),oe=1;oe<Z;oe++)te[oe-1]=he[oe];return fe=te[0],xe=te.slice(1),le.abrupt("return",Promise.all(this.events[L].map(function(ue){return ue.bind(w).apply(void 0,[T()({current:w.current},fe)].concat(l()(xe)))})));case 5:case"end":return le.stop()}},W,this)}));function Q(W){return ee.apply(this,arguments)}return Q}()},{key:"parentsIn",value:function(Q){if(!Q||!u.Schema.isSchemaInstance(Q))return!1;for(var W=this.current;(L=W)!==null&&L!==void 0&&L.parent;){var L;if(W.parent===Q)return!0;W=W.parent}return!1}},{key:"refresh",value:function(Q){var W=this.options.refresh;return W==null?void 0:W(Q)}},{key:"deepMerge",value:function(Q){var W=this,L={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"},w={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Q).forEach(function(Z){L[Z]?(W.current[Z]=Q[Z],W.updateModel(L[Z],Q[Z])):w[Z]?Object.keys(Q[Z]).forEach(function(te){F()(W.current,[Z,te],Q[Z][te]),W.updateModel([w[Z],te],Q[Z][te])}):W.current[Z]=Q[Z]}),this.emit("patch",{schema:Q})}},{key:"getSchemaAttribute",value:function(Q,W){return x()(this.current,Q,W)}},{key:"shallowMerge",value:function(Q){var W=this,L={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(Q).forEach(function(w){W.current[w]=Q[w],L[w]&&W.updateModel(L[w],Q[w])}),this.emit("patch",{schema:Q})}},{key:"updateModel",value:function(Q,W){var L=function(Z){F()(Z,Q,W)};this.model&&L(this.model),this.query&&this.query.take(L)}},{key:"insertAdjacent",value:function(Q,W){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(Q){case"beforeBegin":return this.insertBeforeBegin(W,L);case"afterBegin":return this.insertAfterBegin(W,L);case"beforeEnd":return this.insertBeforeEnd(W,L);case"afterEnd":return this.insertAfterEnd(W,L)}}},{key:"recursiveRemoveIfNoChildren",value:function(Q,W){if(Q){for(var L=Q,w,Z=W==null?void 0:W.breakRemoveOn;L;){if(typeof Z=="function"){if(Z(L))break}else if(U(L,Z))break;var te=Object.keys(L.properties||{}).length;if(te>0)break;L.parent&&(w=L.parent.removeProperty(L.name)),L=L.parent}return w}}},{key:"remove",value:function(Q){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=W.breakRemoveOn,w=W.removeParentsIfNoChildren,Z=Q||this.current,te=Z.parent.removeProperty(Z.name);if(w){var oe=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:L});oe&&(te=oe)}return this.emit("remove",{removed:te})}},{key:"removeWithoutEmit",value:function(Q){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=W.breakRemoveOn,w=W.removeParentsIfNoChildren,Z=Q||this.current,te=Z.parent.removeProperty(Z.name);if(w){var oe=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:L});oe&&(te=oe)}return te}},{key:"insertBeforeBeginOrAfterEnd",value:function(Q){var W=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u.Schema.isSchemaInstance(this.current)&&u.Schema.isSchemaInstance(Q)&&this.current.parent===Q.parent){var w=0,Z=0;return this.current.parent.mapProperties(function(te,oe,fe){W.current.name===oe&&(Z=fe),Q.name===oe&&(w=fe)}),w>Z?this.insertBeforeBegin(Q,L):this.insertAfterEnd(Q,L)}}},{key:"insertBeforeBegin",value:function(Q){var W=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u.Schema.isSchemaInstance(this.current)){var w={onSuccess:L.onSuccess},Z=L.wrap,te=Z===void 0?D:Z,oe=L.breakRemoveOn,fe=L.removeParentsIfNoChildren;if(u.Schema.isSchemaInstance(Q)){if(this.parentsIn(Q)){this.emit("error",{code:"parent_is_not_allowed",schema:Q});return}Q.parent.removeProperty(Q.name),fe&&(w.removed=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:oe}))}else Q&&(Q=R()(Q));var xe={},he=!1,ie=0,le=0;this.current.parent.mapProperties(function(De,Fe){Fe===W.current.name&&(le=ie,he=!0,++ie),De["x-index"]=ie,++ie,he&&(xe[Fe]=De,W.current.parent.removeProperty(Fe))}),this.prepareProperty(Q);var ue=te(Q),me=this.current.parent.addProperty(ue.name||(0,r.uid)(),ue);me["x-index"]=le,me.parent=this.current.parent,this.current.parent.setProperties(xe);var se=G(me,Q),ae=a()(se,2),Ee=ae[0],Pe=ae[1];this.emit("insertAdjacent",T()({position:"beforeBegin",schema:Pe,wrapped:ue,wrap:Ee},w))}}},{key:"insertAfterBegin",value:function(Q){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u.Schema.isSchemaInstance(this.current)){var L={onSuccess:W.onSuccess},w=W.wrap,Z=w===void 0?D:w,te=W.breakRemoveOn,oe=W.removeParentsIfNoChildren;if(u.Schema.isSchemaInstance(Q)){if(this.parentsIn(Q)){this.emit("error",{code:"parent_is_not_allowed",schema:Q});return}Q.parent.removeProperty(Q.name),oe&&(L.removed=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:te}))}else Q&&(Q=R()(Q));var fe={},xe=1;this.current.mapProperties(function(ae,Ee){ae["x-index"]=xe,++xe,fe[Ee]=ae}),this.current.properties={},this.prepareProperty(Q);var he=Z(Q),ie=this.current.addProperty(he.name||(0,r.uid)(),he);ie["x-index"]=0,ie.parent=this.current,this.current.setProperties(fe);var le=G(ie,Q),ue=a()(le,2),me=ue[0],se=ue[1];this.emit("insertAdjacent",T()({position:"afterBegin",schema:se,wrap:me,wrapped:he},L))}}},{key:"insertBeforeEnd",value:function(Q){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u.Schema.isSchemaInstance(this.current)){delete Q["x-index"];var L={onSuccess:W.onSuccess},w=W.wrap,Z=w===void 0?D:w,te=W.breakRemoveOn,oe=W.removeParentsIfNoChildren;if(u.Schema.isSchemaInstance(Q)){if(this.parentsIn(Q)){this.emit("error",{code:"parent_is_not_allowed",schema:Q});return}Q.parent.removeProperty(Q.name),oe&&(L.removed=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:te}))}else Q&&(Q=R()(Q));this.prepareProperty(Q);var fe=Z(Q),xe=this.current.addProperty(fe.name||(0,r.uid)(),fe);xe.parent=this.current;var he=G(xe,Q),ie=a()(he,2),le=ie[0],ue=ie[1];return this.emit("insertAdjacent",T()({position:"beforeEnd",schema:ue,wrap:le,wrapped:fe},L))}}},{key:"insertAfterEnd",value:function(Q){var W=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u.Schema.isSchemaInstance(this.current)){var w={onSuccess:L==null?void 0:L.onSuccess},Z=L.wrap,te=Z===void 0?D:Z,oe=L.breakRemoveOn,fe=L.removeParentsIfNoChildren,xe=0,he=0,ie=!1,le={};if(this.current.parent.mapProperties(function(De,Fe){De["x-index"]=xe,Fe===W.current.name&&(++xe,he=xe,ie=!0),++xe,ie&&Fe!==W.current.name&&(le[Fe]=De,W.current.parent.removeProperty(Fe))}),u.Schema.isSchemaInstance(Q)){if(this.parentsIn(Q)){this.emit("error",{code:"parent_is_not_allowed",schema:Q});return}Q.parent.removeProperty(Q.name),fe&&(w.removed=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:oe})),Q.parent=null}else Q&&(Q=R()(Q));this.prepareProperty(Q);var ue=te(Q),me=this.current.parent.addProperty(ue.name||(0,r.uid)(),ue);me.parent=this.current.parent,me["x-index"]=he,this.current.parent.setProperties(le);var se=G(me,Q),ae=a()(se,2),Ee=ae[0],Pe=ae[1];this.emit("insertAdjacent",T()({position:"afterEnd",schema:Pe,wrap:Ee,wrapped:ue},w))}}}]),ne}();function V(){var ne=(0,v.useContext)(u.SchemaOptionsContext),ee=(0,v.useMemo)(function(){return(ne==null?void 0:ne.components)||{}},[ne]),Q=function(L){if(!L)return null;if(typeof L!="string")return L;var w=x()(ee,L);return w||console.error('[nocobase]: Component "'.concat(L,'" not found')),w};return Q}function J(){var ne=(0,v.useContext)(d.D),ee=ne.designable,Q=ne.setDesignable,W=ne.refresh,L=ne.reset,w=(0,v.useContext)(u.SchemaOptionsContext),Z=(0,v.useMemo)(function(){return(w==null?void 0:w.components)||{}},[w]),te=(0,v.useMemo)(function(){return function(){return(0,E.jsx)(E.Fragment,{})}},[]),oe=(0,A.Z)(),fe=(0,O.gR)(),xe=(0,O.QJ)(),he=(0,v.useCallback)(function(De){W==null||W(),oe(),fe==null||fe(De),xe==null||xe()},[W,oe,fe,xe]),ie=(0,u.useField)(),le=(0,u.useFieldSchema)(),ue=(0,I.LY)(),me=(0,i.$)(),se=me.t,ae=(0,v.useMemo)(function(){return S({t:se,api:ue,refresh:he,current:le,model:ie,appVersion:C.i8})},[se,ue,he,le,ie]);(0,v.useEffect)(function(){ae.loadAPIClientEvents()},[ae]);var Ee=(0,h.wd)(),Pe=Ee.isMobileLayout;return{dn:ae,designable:Pe?!1:ee,reset:L,refresh:he,setDesignable:Q,DesignableBar:te,findComponent:(0,v.useCallback)(function(De){var Fe;if(!De)return null;if(typeof De!="string")return De;var ye=x()(Z,De);return(Fe=ye==null?void 0:ye[c.XI])!==null&&Fe!==void 0?Fe:ye},[x()]),on:ae.on.bind(ae),patch:(0,v.useCallback)(function(De,Fe){var ye=function(pe){Object.keys(pe).forEach(function(H){var ge=pe[H];H==="title"&&(ie.title=ge,le.title=ge),H==="x-decorator-props"&&(ie.decoratorProps||(ie.decoratorProps={}),le["x-decorator-props"]||(le["x-decorator-props"]={}),Object.keys(ge).forEach(function(de){ie.decoratorProps[de]=ge[de],le["x-decorator-props"][de]=ge[de]})),H==="x-component-props"&&(ie.componentProps||(ie.componentProps={}),le["x-component-props"]||(le["x-component-props"]={}),Object.keys(ge).forEach(function(de){ie.componentProps[de]=ge[de],le["x-component-props"][de]=ge[de]}))})};if(typeof De=="string"){var be={};return F()(be,De,Fe),ye(be)}ye(De),he()},[ae]),shallowMerge:(0,v.useCallback)(function(De){ae.shallowMerge(De)},[ae]),deepMerge:(0,v.useCallback)(function(De){ae.deepMerge(De)},[ae]),remove:(0,v.useCallback)(function(De,Fe){ae.remove(De,Fe)},[ae]),insertAdjacent:(0,v.useCallback)(function(De,Fe,ye){ae.insertAdjacent(De,Fe,ye)},[ae]),insertBeforeBegin:(0,v.useCallback)(function(De){ae.insertBeforeBegin(De)},[ae]),insertAfterBegin:(0,v.useCallback)(function(De){ae.insertAfterBegin(De)},[ae]),insertBeforeEnd:(0,v.useCallback)(function(De){ae.insertBeforeEnd(De)},[ae]),insertAfterEnd:(0,v.useCallback)(function(De){ae.insertAfterEnd(De)},[ae])}}},98146:function(_t,ve,e){"use strict";e.d(ve,{e:function(){return m}});var q=e(94350),a=e(84577),X=e(67294),l=e(97970),P=function(){return null};P.isNullComponent=!0;var m=function(){var o=(0,a.ng)(),N=o.designable,b=(0,q.useFieldSchema)(),j=(0,X.useMemo)(function(){return b["x-designer"]||b["x-toolbar"]?b["x-designer"]||b["x-toolbar"]:b["x-settings"]?l.Mf:P},[b]),f=(0,a.Co)(j);return N&&f||P}},9780:function(_t,ve,e){"use strict";e.d(ve,{w:function(){return z}});var q=e(97857),a=e.n(q),X=e(13769),l=e.n(X),P=["useProps"],m=function(){return{}},z=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},b=N.useProps,j=b===void 0?m:b,f=l()(N,P),g=j;typeof j!="function"&&(g=m);var n=g();return a()(a()({},f),n)}},49488:function(_t,ve,e){"use strict";e.r(ve),e.d(ve,{Action:function(){return X.aU},ActionBar:function(){return X.ol},ActionBarProvider:function(){return X.N0},ActionContext:function(){return X.fW},ActionContextNoRerender:function(){return X.ml},ActionContextProvider:function(){return X.EI},ActionDesigner:function(){return X.$L},AfterSuccess:function(){return X.$b},AllDataBlocksContext:function(){return aa.s8},AllDataBlocksProvider:function(){return aa.Nm},AntdSchemaComponentPlugin:function(){return Cn},AntdSchemaComponentProvider:function(){return zn},AppendsTreeSelect:function(){return Vr},AssignedFieldValues:function(){return X.eY},AssociationField:function(){return fi},AssociationFieldMode:function(){return as},AssociationFieldModeProvider:function(){return ls},AssociationSelect:function(){return Xi},AttachmentList:function(){return Yo.fU},AutoComplete:function(){return Ws},BackButtonUsedInSubPage:function(){return nr.M},Block:function(){return zu},BlockItem:function(){return Di.jY},BlockItemCard:function(){return Di.Pu},BlockItemCardContext:function(){return Di.sm},BlocksSelector:function(){return X.mx},ButtonEditor:function(){return X.C1},CardItem:function(){return $s},Cascader:function(){return Gs},Checkbox:function(){return bi},CollectionSelect:function(){return Ys},ColorPicker:function(){return eu},ColorSelect:function(){return nu},Cron:function(){return qi},CronSet:function(){return iu},DataSourceCollectionCascader:function(){return Qs},DataSourceSelect:function(){return Js},DateFilterDynamicComponent:function(){return y.DateFilterDynamicComponent},DateFormatCom:function(){return ol.W},DatePicker:function(){return Na.Mt},DatePickerProvider:function(){return Na.iN},Designable:function(){return Be.zz},DesignableSwitch:function(){return K._b},Details:function(){return lu},DetailsDesigner:function(){return oe},Divider:function(){return su},DndContext:function(){return y.DndContext},DragHandler:function(){return y.DragHandler},DraggableContext:function(){return y.DraggableContext},EditComponent:function(){return w.Fy},EditDefaultValue:function(){return w.Ni},EditDescription:function(){return w.q8},EditOperator:function(){return w.HG},EditPattern:function(){return w.QT},EditRequired:function(){return w.JE},EditSortField:function(){return Wl},EditTable:function(){return Fl},EditTableAction:function(){return nl},EditTableActionContext:function(){return tl},EditTitle:function(){return w.$w},EditTitleField:function(){return w.nB},EditTooltip:function(){return w.Oc},EditValidationRules:function(){return w.zd},Editable:function(){return Ul},EllipsisWithTooltip:function(){return Qa.BQ},ErrorFallback:function(){return va.H},Expand:function(){return rl},ExpiresRadio:function(){return ol.D},FieldsTreeSelect:function(){return Nr},Fieldset:function(){return $u},Filter:function(){return wt.wn},FilterAction:function(){return wt.Gz},FilterActionContext:function(){return wt.tJ},FilterContext:function(){return wt.fo},FilterDynamicComponent:function(){return wt.VT},FilterLogicContext:function(){return wt.Xs},Form:function(){return Q},FormDialog:function(){return Tl.D},FormDrawer:function(){return Vi},FormField:function(){return Xn},FormItem:function(){return w.xJ},FormProvider:function(){return K.RV},FormV2:function(){return sr},G2Plot:function(){return il},G2PlotRenderer:function(){return al},Grid:function(){return Mi.rj},GridCard:function(){return Ni},GridRowContext:function(){return Mi.jg},HTMLEncode:function(){return Qa.gs},ICON_POPUP_Z_INDEX:function(){return Ai.z},IconPicker:function(){return qu.$},Input:function(){return Qa.II},InputNumber:function(){return Rl},InputReadPretty:function(){return Qa.mX},InputRecordPicker:function(){return Ra.zD},Json:function(){return Qa.Ph},LinkageFilter:function(){return Hc},List:function(){return $i},Markdown:function(){return ul.U},MarkdownReadPretty:function(){return ul.y},Menu:function(){return ko},NanoIDInput:function(){return uc},Page:function(){return Ia},PagePopups:function(){return ro.d9},PageTabs:function(){return ca},Pagination:function(){return cc},ParentRouteContext:function(){return Kn},Password:function(){return kl},Percent:function(){return mc},PopupSettingsProvider:function(){return Fn.D},Preview:function(){return vc.M},QuickEdit:function(){return pc},Radio:function(){return Li},ReadPretty:function(){return Qa.iV},ReadPrettyRecordPicker:function(){return Ra.OD},RecordPicker:function(){return Ra.lb},RecordPickerContext:function(){return Ra.b7},RecordPickerProvider:function(){return Ra.sU},RefreshDataBlockRequest:function(){return X.x1},RemoteSchemaComponent:function(){return K.m1},RemoteSelect:function(){return Kt},RemoveButton:function(){return X.xZ},RemoveConditionContext:function(){return wt.Iu},RequestSettings:function(){return X.Mk},RichText:function(){return gc},SchemaComponent:function(){return K.n6},SchemaComponentContext:function(){return Zc.D},SchemaComponentOnChangeContext:function(){return K.AT},SchemaComponentOptions:function(){return K.G0},SchemaComponentPlugin:function(){return K.a$},SchemaComponentProvider:function(){return K.Tz},SecondConFirm:function(){return X.y0},Select:function(){return on},ShowFormData:function(){return y.ShowFormData},SkipValidation:function(){return X.co},Sortable:function(){return y.Sortable},SortableContext:function(){return y.SortableContext},SortableItem:function(){return y.SortableItem},SortableProvider:function(){return y.SortableProvider},Space:function(){return _c},StablePopover:function(){return Ai.q},Table:function(){return ci},TableBlockDesigner:function(){return Tc},TableField:function(){return Nl},TableSelectorDesigner:function(){return Ic},TableV2:function(){return Pi},Tabs:function(){return Bi},TabsContextProvider:function(){return Ri.c},Templates:function(){return Dn},TestDesigner:function(){return Di.L3},TextAreaWithGlobalScope:function(){return Kc},TimePicker:function(){return fl},TreeSelect:function(){return kc},UnixTimestamp:function(){return wc},Upload:function(){return Yo.gq},Uploader:function(){return Yo.Qm},Variable:function(){return pi._w},VariableScopeProvider:function(){return pi.rj},VariableSelect:function(){return Uc.m},actionSettings:function(){return X.SL},actionSettingsItems:function(){return X.sB},allowAddNew:function(){return w.iT},attachmentFileTypes:function(){return Yo.BD},createDesignable:function(){return Be.Pl},defaultFieldNames:function(){return it},fetchTemplateData:function(){return xn},filterFormItemSettings:function(){return w.$9},findByUid:function(){return kt},findKeysByUid:function(){return On},findMenuItem:function(){return Jt},formDetailsSettings:function(){return or},formItemSettings:function(){return w.Of},formSettings:function(){return In},formV1Settings:function(){return L},genStyleHook:function(){return a.l6},getCurrentOptions:function(){return Ve},getDateExact:function(){return Na.tl},getDatePickerLabels:function(){return Ra.C$},getDateRanges:function(){return Na.SE},getLabelFormatValue:function(){return Ra.cN},getPopupPathFromParams:function(){return fr.NC},getRenderContent:function(){return y.getRenderContent},getStoredPopupContext:function(){return fr.XQ},getTabSchema:function(){return ar},getZIndex:function(){return X.KK},handleDateChangeOnForm:function(){return Na.MD},inferPickerType:function(){return Na.CE},isBulkEditAction:function(){return X.vU},isFileCollection:function(){return w.ZZ},isMobile:function(){return Na.tq},isShowFilePicker:function(){return Ra.el},isTabPage:function(){return Jn},isWriteEmailAction:function(){return X.VP},mapDatePicker:function(){return Na.LP},mapRangePicker:function(){return Na.fY},mapTimeFormat:function(){return vl},matchMimetype:function(){return Yo.tP},moment2str:function(){return Na.w_},navigateToTab:function(){return er},pageSettings:function(){return $r},pageTabSettings:function(){return sn},readPrettyFormSettings:function(){return kn},removeNullCondition:function(){return wt.Wm},splitWrapSchema:function(){return Be.oB},storePopupContext:function(){return fr.hK},useActionBarContext:function(){return X.DU},useActionContext:function(){return X.XC},useAfterSuccessOptions:function(){return X.EM},useAllDataBlocks:function(){return aa.kR},useAssociationFieldContext:function(){return wo.Ky},useAssociationFieldModeContext:function(){return Ji},useAttach:function(){return Be.lI},useBackButton:function(){return nr.K},useBlockHeight:function(){return Be.hi},useCloseAction:function(){return X.p2},useColumnSchema:function(){return Kl.z9},useColumnSettings:function(){return ku.x},useCompile:function(){return Be.eJ},useComponent:function(){return Be.Co},useCurrentPopupContext:function(){return ro.Zm},useDataBlockHeight:function(){return Be.aZ},useDatePickerContext:function(){return Na.P1},useDesignable:function(){return Be.ng},useDesigner:function(){return Be.et},useDownloadLogs:function(){return va.y},useEnsureOperatorsValid:function(){return w.Zd},useFieldComponentOptions:function(){return Be.cL},useFieldMode:function(){return w.b},useFieldModeOptions:function(){return Be.fd},useFieldNames:function(){return Ra.Xd},useFieldProps:function(){return Be.Cl},useFieldTitle:function(){return Be.vH},useFilterActionProps:function(){return wt.PL},useFilterFieldOptions:function(){return wt.V8},useFilterFieldProps:function(){return wt.tM},useFilterOptions:function(){return wt.xQ},useFindComponent:function(){return Be.sR},useFormDataTemplates:function(){return Yt},useGetAriaLabelOfAction:function(){return X.HS},useGetAriaLabelOfDrawer:function(){return X.vB},useGetAriaLabelOfModal:function(){return X.QY},useGetAriaLabelOfPopover:function(){return X.t9},useGetFilterFieldOptions:function(){return wt.Kg},useGetFilterOptions:function(){return wt.aJ},useGridContext:function(){return Mi.n1},useGridRowContext:function(){return Mi.Di},useIsAddNewForm:function(){return w.l1},useIsAssociationField:function(){return w.w5},useIsFieldReadPretty:function(){return w.p3},useIsFileField:function(){return w.G5},useIsFormReadPretty:function(){return w.xj},useIsSelectFieldMode:function(){return w.rx},useLabelUiSchema:function(){return Ra.Il},useLinkageAction:function(){return X.zC},useListBlockContext:function(){return Bl},useMenuDragEnd:function(){return No},useMenuTranslation:function(){return Aa.v},useNocoBaseRoutes:function(){return xr},useParentRoute:function(){return Hn},usePopupSettings:function(){return Fn.a},useProps:function(){return Be.wN},useSchemaComponentContext:function(){return Be.Dm},useSchemaOptionsContext:function(){return K.Bs},useStyles:function(){return Mr.y},useTableColumnIntegration:function(){return wu.p},useTableSize:function(){return Be.fM},useTabsContext:function(){return Ri.g},useTitleFieldOptions:function(){return w.eT},useUploadStyles:function(){return Yo.$S},useValidateSchema:function(){return w.q4},useVariableScope:function(){return pi.ym},useZIndexContext:function(){return X.uq},withSearchParams:function(){return fr.Q3},zIndexContext:function(){return X.K5}});var q={};e.r(q),e.d(q,{Action:function(){return X.aU},ActionBar:function(){return X.ol},ActionBarProvider:function(){return X.N0},ActionContext:function(){return X.fW},ActionContextNoRerender:function(){return X.ml},ActionContextProvider:function(){return X.EI},ActionDesigner:function(){return X.$L},AfterSuccess:function(){return X.$b},AllDataBlocksContext:function(){return aa.s8},AllDataBlocksProvider:function(){return aa.Nm},AntdSchemaComponentPlugin:function(){return Cn},AntdSchemaComponentProvider:function(){return zn},AppendsTreeSelect:function(){return Vr},AssignedFieldValues:function(){return X.eY},AssociationField:function(){return fi},AssociationFieldMode:function(){return as},AssociationFieldModeProvider:function(){return ls},AssociationSelect:function(){return Xi},AttachmentList:function(){return Yo.fU},AutoComplete:function(){return Ws},BackButtonUsedInSubPage:function(){return nr.M},Block:function(){return zu},BlockItem:function(){return Di.jY},BlockItemCard:function(){return Di.Pu},BlockItemCardContext:function(){return Di.sm},BlocksSelector:function(){return X.mx},ButtonEditor:function(){return X.C1},CardItem:function(){return $s},Cascader:function(){return Gs},Checkbox:function(){return bi},CollectionSelect:function(){return Ys},ColorPicker:function(){return eu},ColorSelect:function(){return nu},Cron:function(){return qi},CronSet:function(){return iu},DataSourceCollectionCascader:function(){return Qs},DataSourceSelect:function(){return Js},DateFormatCom:function(){return ol.W},DatePicker:function(){return Na.Mt},DatePickerProvider:function(){return Na.iN},Details:function(){return lu},DetailsDesigner:function(){return oe},Divider:function(){return su},EditComponent:function(){return w.Fy},EditDefaultValue:function(){return w.Ni},EditDescription:function(){return w.q8},EditOperator:function(){return w.HG},EditPattern:function(){return w.QT},EditRequired:function(){return w.JE},EditSortField:function(){return Wl},EditTable:function(){return Fl},EditTableAction:function(){return nl},EditTableActionContext:function(){return tl},EditTitle:function(){return w.$w},EditTitleField:function(){return w.nB},EditTooltip:function(){return w.Oc},EditValidationRules:function(){return w.zd},Editable:function(){return Ul},EllipsisWithTooltip:function(){return Qa.BQ},ErrorFallback:function(){return va.H},Expand:function(){return rl},ExpiresRadio:function(){return ol.D},FieldsTreeSelect:function(){return Nr},Fieldset:function(){return $u},Filter:function(){return wt.wn},FilterAction:function(){return wt.Gz},FilterActionContext:function(){return wt.tJ},FilterContext:function(){return wt.fo},FilterDynamicComponent:function(){return wt.VT},FilterLogicContext:function(){return wt.Xs},Form:function(){return Q},FormDialog:function(){return Tl.D},FormDrawer:function(){return Vi},FormField:function(){return Xn},FormItem:function(){return w.xJ},FormV2:function(){return sr},G2Plot:function(){return il},G2PlotRenderer:function(){return al},Grid:function(){return Mi.rj},GridCard:function(){return Ni},GridRowContext:function(){return Mi.jg},HTMLEncode:function(){return Qa.gs},ICON_POPUP_Z_INDEX:function(){return Ai.z},IconPicker:function(){return qu.$},Input:function(){return Qa.II},InputNumber:function(){return Rl},InputReadPretty:function(){return Qa.mX},InputRecordPicker:function(){return Ra.zD},Json:function(){return Qa.Ph},LinkageFilter:function(){return Hc},List:function(){return $i},Markdown:function(){return ul.U},MarkdownReadPretty:function(){return ul.y},Menu:function(){return ko},NanoIDInput:function(){return uc},Page:function(){return Ia},PagePopups:function(){return ro.d9},PageTabs:function(){return ca},Pagination:function(){return cc},ParentRouteContext:function(){return Kn},Password:function(){return kl},Percent:function(){return mc},PopupSettingsProvider:function(){return Fn.D},Preview:function(){return vc.M},QuickEdit:function(){return pc},Radio:function(){return Li},ReadPretty:function(){return Qa.iV},ReadPrettyRecordPicker:function(){return Ra.OD},RecordPicker:function(){return Ra.lb},RecordPickerContext:function(){return Ra.b7},RecordPickerProvider:function(){return Ra.sU},RefreshDataBlockRequest:function(){return X.x1},RemoteSelect:function(){return Kt},RemoveButton:function(){return X.xZ},RemoveConditionContext:function(){return wt.Iu},RequestSettings:function(){return X.Mk},RichText:function(){return gc},SecondConFirm:function(){return X.y0},Select:function(){return on},SkipValidation:function(){return X.co},Space:function(){return _c},StablePopover:function(){return Ai.q},Table:function(){return ci},TableBlockDesigner:function(){return Tc},TableField:function(){return Nl},TableSelectorDesigner:function(){return Ic},TableV2:function(){return Pi},Tabs:function(){return Bi},TabsContextProvider:function(){return Ri.c},Templates:function(){return Dn},TestDesigner:function(){return Di.L3},TextAreaWithGlobalScope:function(){return Kc},TimePicker:function(){return fl},TreeSelect:function(){return kc},UnixTimestamp:function(){return wc},Upload:function(){return Yo.gq},Uploader:function(){return Yo.Qm},Variable:function(){return pi._w},VariableScopeProvider:function(){return pi.rj},VariableSelect:function(){return Uc.m},actionSettings:function(){return X.SL},actionSettingsItems:function(){return X.sB},allowAddNew:function(){return w.iT},attachmentFileTypes:function(){return Yo.BD},defaultFieldNames:function(){return it},fetchTemplateData:function(){return xn},filterFormItemSettings:function(){return w.$9},findByUid:function(){return kt},findKeysByUid:function(){return On},findMenuItem:function(){return Jt},formDetailsSettings:function(){return or},formItemSettings:function(){return w.Of},formSettings:function(){return In},formV1Settings:function(){return L},genStyleHook:function(){return a.l6},getCurrentOptions:function(){return Ve},getDateExact:function(){return Na.tl},getDatePickerLabels:function(){return Ra.C$},getDateRanges:function(){return Na.SE},getLabelFormatValue:function(){return Ra.cN},getPopupPathFromParams:function(){return fr.NC},getStoredPopupContext:function(){return fr.XQ},getTabSchema:function(){return ar},getZIndex:function(){return X.KK},handleDateChangeOnForm:function(){return Na.MD},inferPickerType:function(){return Na.CE},isBulkEditAction:function(){return X.vU},isFileCollection:function(){return w.ZZ},isMobile:function(){return Na.tq},isShowFilePicker:function(){return Ra.el},isTabPage:function(){return Jn},isWriteEmailAction:function(){return X.VP},mapDatePicker:function(){return Na.LP},mapRangePicker:function(){return Na.fY},mapTimeFormat:function(){return vl},matchMimetype:function(){return Yo.tP},moment2str:function(){return Na.w_},navigateToTab:function(){return er},pageSettings:function(){return $r},pageTabSettings:function(){return sn},readPrettyFormSettings:function(){return kn},removeNullCondition:function(){return wt.Wm},storePopupContext:function(){return fr.hK},useActionBarContext:function(){return X.DU},useActionContext:function(){return X.XC},useAfterSuccessOptions:function(){return X.EM},useAllDataBlocks:function(){return aa.kR},useAssociationFieldContext:function(){return wo.Ky},useAssociationFieldModeContext:function(){return Ji},useBackButton:function(){return nr.K},useCloseAction:function(){return X.p2},useColumnSchema:function(){return Kl.z9},useColumnSettings:function(){return ku.x},useCurrentPopupContext:function(){return ro.Zm},useDatePickerContext:function(){return Na.P1},useDownloadLogs:function(){return va.y},useEnsureOperatorsValid:function(){return w.Zd},useFieldMode:function(){return w.b},useFieldNames:function(){return Ra.Xd},useFilterActionProps:function(){return wt.PL},useFilterFieldOptions:function(){return wt.V8},useFilterFieldProps:function(){return wt.tM},useFilterOptions:function(){return wt.xQ},useFormDataTemplates:function(){return Yt},useGetAriaLabelOfAction:function(){return X.HS},useGetAriaLabelOfDrawer:function(){return X.vB},useGetAriaLabelOfModal:function(){return X.QY},useGetAriaLabelOfPopover:function(){return X.t9},useGetFilterFieldOptions:function(){return wt.Kg},useGetFilterOptions:function(){return wt.aJ},useGridContext:function(){return Mi.n1},useGridRowContext:function(){return Mi.Di},useIsAddNewForm:function(){return w.l1},useIsAssociationField:function(){return w.w5},useIsFieldReadPretty:function(){return w.p3},useIsFileField:function(){return w.G5},useIsFormReadPretty:function(){return w.xj},useIsSelectFieldMode:function(){return w.rx},useLabelUiSchema:function(){return Ra.Il},useLinkageAction:function(){return X.zC},useListBlockContext:function(){return Bl},useMenuDragEnd:function(){return No},useMenuTranslation:function(){return Aa.v},useNocoBaseRoutes:function(){return xr},useParentRoute:function(){return Hn},usePopupSettings:function(){return Fn.a},useStyles:function(){return Mr.y},useTableColumnIntegration:function(){return wu.p},useTabsContext:function(){return Ri.g},useTitleFieldOptions:function(){return w.eT},useUploadStyles:function(){return Yo.$S},useValidateSchema:function(){return w.q4},useVariableScope:function(){return pi.ym},useZIndexContext:function(){return X.uq},withSearchParams:function(){return fr.Q3},zIndexContext:function(){return X.K5}});var a=e(46917),X=e(76157),l=e(15009),P=e.n(l),m=e(99289),z=e.n(m),o=e(12444),N=e.n(o),b=e(72004),j=e.n(b),f=e(31996),g=e.n(f),n=e(26037),M=e.n(n),T=e(97857),u=e.n(T),r=e(67294),A=e(31601),y=e(99687),K=e(70993),R=e(89127),Y=function(re){return z()(P()().mark(function Me(){var Re,ke;return P()().wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.prev=0,Ke.next=3,this.api.request(re);case 3:return ke=Ke.sent,Ke.abrupt("return",ke==null||(Re=ke.data)===null||Re===void 0?void 0:Re.data);case 7:return Ke.prev=7,Ke.t0=Ke.catch(0),Ke.abrupt("return",[]);case 10:case"end":return Ke.stop()}},Me,this,[[0,7]])}))},x=e(13769),B=e.n(x),F=e(5552),v=e(86201),i=e(94350),I=e(31282),O=e(74330),c=e(12174),d=e(6145),p=e(57105),C=e(97970),h=e(64016),E=e(15195),S=e(23911),t=e(85893),D=["form","children"],U=["form","children","disabled"],G=["request","effects","initialValue","useValues"],k=function(re){var Me=re.form,Re=re.children,ke=B()(re,D),He=(0,i.useField)(),Ke=(0,i.useFieldSchema)(),Dt=(0,Be.lI)(Me.createVoidField(u()(u()({},He.props),{},{basePath:""})));return(0,t.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(i.FormContext.Provider,{value:Me,children:(0,t.jsx)(F.FormLayout,u()(u()({layout:"vertical"},ke),{},{children:(0,t.jsx)(p.sq,{basePath:Dt.address,schema:Ke,onlyRenderProperties:!0})}))})})},$=function(re){return re.children},V=function(re){var Me=re.form,Re=re.children,ke=re.disabled,He=B()(re,U),Ke=(0,i.useField)(),Dt=(0,i.useFieldSchema)(),It=(0,Be.lI)(Me.createVoidField(u()(u()({},Ke.props),{},{basePath:""}))),jt=(0,Be.Co)(Dt["x-component"],$);return(0,r.useEffect)(function(){Me.disabled=ke||Ke.disabled},[ke,Ke.disabled]),(0,t.jsx)(I.ZP,{componentDisabled:ke,children:(0,t.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(i.FormContext.Provider,{value:Me,children:(0,t.jsx)(F.FormLayout,u()(u()({layout:"vertical"},He),{},{children:(0,t.jsx)(i.FieldContext.Provider,{value:It,children:(0,t.jsx)(jt,u()(u()({},Ke.componentProps),{},{children:(0,t.jsx)(p.sq,{basePath:It.address,schema:Dt,onlyRenderProperties:!0})}))})}))})})})},J=function(re){var Me=re.request,Re=re.initialValue;return Me||function(){return Promise.resolve({data:Re})}},ne=function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,c.QT)(J(Me),re)},ee=(0,r.createContext)(null);ee.displayName="FormBlockContext";var Q=(0,i.observer)(function(_e){var re=_e.request,Me=_e.effects,Re=_e.initialValue,ke=_e.useValues,He=ke===void 0?ne:ke,Ke=B()(_e,G),Dt=(0,i.useFieldSchema)(),It=(0,i.useField)(),jt=(0,r.useMemo)(function(){return(0,v.createForm)({effects:Me})},[]),Lt=He({uid:Dt["x-uid"],onSuccess:function(Bt){return z()(P()().mark(function un(){return P()().wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,jt.reset();case 2:jt.setValues(Bt==null?void 0:Bt.data),jt.setInitialValues(Bt==null?void 0:Bt.data);case 4:case"end":return dn.stop()}},un)}))()}},_e),Nt=(0,r.useContext)(ee);return(0,t.jsx)(ee.Provider,{value:{parent:Nt,form:jt,result:Lt,field:It,fieldSchema:Dt},children:(0,t.jsx)(O.Z,{spinning:(Lt==null?void 0:Lt.loading)||!1,children:Dt["x-decorator"]==="Form"?(0,t.jsx)(V,u()({form:jt},Ke)):(0,t.jsx)(k,u()({form:jt},Ke))})})},{displayName:"Form"});Q.Designer=function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=re.title,ke=(0,E.zy)(),He=(0,S.rE)(),Ke=He.componentNamePrefix;return(0,t.jsxs)(C.aN,{template:ke,title:Re||Me,children:[(0,t.jsx)(h.G,{componentName:"".concat(Ke,"Form"),collectionName:Me}),(0,t.jsx)(C.Z5,{}),(0,t.jsx)(C.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var W=e(5537),L=new W.F5({name:"FormV1Settings",items:[{name:"template",Component:h.G,useComponentProps:function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=(0,S.rE)(),ke=Re.componentNamePrefix;return{componentName:"".concat(ke,"Form"),collectionName:Me}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),w=e(54801),Z=function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=re.title,ke=(0,E.zy)();return(0,t.jsx)(C.aN,{schemaSettings:"FormSettings",template:ke,title:Re||Me})},te=function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=re.title,ke=(0,E.zy)();return(0,t.jsx)(C.aN,{schemaSettings:"ReadPrettyFormSettings",template:ke,title:Re||Me})},oe=function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=re.title,ke=(0,E.zy)();return(0,t.jsx)(C.aN,{schemaSettings:"FormDetailsSettings",template:ke,title:Re||Me})},fe=function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=re.title,ke=(0,E.zy)();return(0,t.jsx)(C.aN,{schemaSettings:"blockSettings:filterForm",template:ke,title:Re||Me})},xe=e(7340),he=e(15503),ie=e(83335),le=e(68230),ue=e(68400),me=e.n(ue),se=e(97133),ae=e(84327),Ee=e(9361),Pe=e(96486),De=e.n(Pe),Fe=e(81327),ye=e(415),be=e(31019),ce=e(94804),pe=e(39742),H=e(7686),ge=e(22229),de=e(43321),Ce=e(3078),we=e(9780),$e=e(3192),Je=e(18686),rt=e(5574),je=e.n(rt),Ge=e(20301),Ue=e(42075),Oe=e(34041),qe=e(26793),ze=e(53285),Xe=e(32268),Ye=e(9783),Ie=e.n(Ye),vt=e(52677),ot=e.n(vt),Pt=e(3407),yt=e(66309),At=e(96074),tn=e(27484),bn=e.n(tn),Ht=e(44990),gt=e(8341),We=e(87714),Be=e(84577),at=e(16646),Ne=e(73475),st=e(32983),Mt=e(85518),Gt=e(67668),Wt=e(58812),nn=e(96695),Zt=e.n(nn),bt=e(19632),Qe=e.n(bt),it={label:"label",value:"value",color:"color",options:"children"};function tt(_e,re){var Me=[];if(!Array.isArray(_e))return Me;for(var Re=0;Re<_e.length;Re++){var ke=_e[Re][re.options];Array.isArray(ke)&&Me.push.apply(Me,Qe()(tt(ke,re))),Me.push(u()({},_e[Re]))}return Me}function et(_e,re,Me){if(!_e)return[];var Re=[],ke=Zt()(Me),He;try{var Ke=function(){var It=He.value,jt=_e.find(function(Lt){return Lt[re.value]==It})||{value:It,label:It&&It.toString()};Re.push(jt)};for(ke.s();!(He=ke.n()).done;)Ke()}catch(Dt){ke.e(Dt)}finally{ke.f()}return Re}function Ve(_e,re,Me){var Re=tt(re,Me),ke=(0,Pe.castArray)(_e).map(function(He){return(0,Ge.isPlainObject)(He)?He[Me.value]:He});return et(Re,Me,ke)}var Ze=e(25145),ct=e(61933),ut=(0,i.observer)(function(_e){var re=(0,r.useState)(!0),Me=je()(re,2),Re=Me[0],ke=Me[1],He=(0,r.useState)([]),Ke=je()(He,2),Dt=Ke[0],It=Ke[1],jt=(0,i.useField)(),Lt=(0,Gt.Hy)();return(0,r.useEffect)(function(){var Nt,hn=u()(u()({},it),_e.fieldNames),Bt=jt.dataSource||_e.options||(Lt==null?void 0:Lt.uiSchema.enum)||[],un=Ve(jt.value,Bt,hn);if(!(!(0,ae.isValid)(_e.value)&&!un.length)&&!((0,v.isArrayField)(jt)&&(jt==null||(Nt=jt.value)===null||Nt===void 0?void 0:Nt.length)===0)){var an=jt.value!==null&&un.map(function(dn,gn){return(0,t.jsx)(yt.Z,{color:dn[hn.color],icon:typeof dn.icon=="string"?(0,t.jsx)(ct.JO,{type:dn.icon}):dn.icon,children:dn[hn.label]},gn)});It(an),ke(!1)}},[Lt==null?void 0:Lt.uiSchema.enum,jt,jt.dataSource,jt.value,_e.fieldNames,_e.options,_e.value]),Re?null:(0,t.jsx)(Wt.B,{ellipsis:_e.ellipsis,children:Dt})},{displayName:"SelectReadPretty"}),ht=(0,Ze.u)(ut),Vt,Ot=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],en=["objectValue","loading","value","rawOptions","defaultValue"],cn=function(re){return!(0,ae.isValid)(re)||ot()(re)==="object"&&Object.keys(re).length===0},mn=function(re){var Me=re.value,Re=re.options,ke=re.onChange,He=re.fieldNames,Ke=re.mode,Dt=re.loading,It=re.rawOptions,jt=re.defaultValue,Lt=B()(re,Ot),Nt=Mt.nI?"":Xt,hn=Mt.nI?void 0:"topLeft",Bt=function(an){var dn;if(!cn(an)){var gn=(0,ae.toArr)(an).filter(function(ur){return ur}).map(function(ur){return(0,Ge.isPlainObject)(ur)?ur[He.value]:ur}),Sn=(dn=Ve(gn,Re,He))===null||dn===void 0?void 0:dn.map(function(ur){return{label:ur[He.label],value:ur[He.value]}});return["tags","multiple"].includes(Ke)||re.multiple?Sn:Sn.shift()}};return(0,t.jsx)(Oe.default,u()({rootClassName:Nt,placement:hn,role:"button","data-testid":"select-object-".concat(Ke||"single"),value:Bt(Me),defaultValue:Bt(jt),allowClear:{clearIcon:(0,t.jsx)(at.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Dt?(0,t.jsx)(O.Z,{}):(0,t.jsx)(st.Z,{image:st.Z.PRESENTED_IMAGE_SIMPLE}),options:Re,fieldNames:He,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(an,dn){var gn;return((gn=dn==null?void 0:dn[He.label||"label"])!==null&&gn!==void 0?gn:"").includes(an)},filterSort:function(an,dn){var gn,Sn;return((gn=an==null?void 0:an[He.label||"label"])!==null&&gn!==void 0?gn:"").toLowerCase().localeCompare(((Sn=dn==null?void 0:dn[He.label||"label"])!==null&&Sn!==void 0?Sn:"").toLowerCase())},onChange:function(an){var dn=Ve((0,ae.toArr)(an).map(function(gn){return gn.value}),It||Re,He);["tags","multiple"].includes(Ke)||re.multiple?ke==null||ke(dn):ke==null||ke(dn.shift()||null)},mode:Ke,tagRender:function(an){return(0,t.jsx)(yt.Z,u()(u()({role:"button","aria-label":an.label,closeIcon:(0,t.jsx)(Ne.Z,{role:"button","aria-label":"icon-close-tag"})},an),{},{children:an.label}))},maxTagCount:"responsive"},Lt))},fn=function(re,Me){var Re;return((Re=Me==null?void 0:Me.label)!==null&&Re!==void 0?Re:"").toLowerCase().includes((re||"").toLowerCase())},Xt=(0,se.css)(Vt||(Vt=me()([`
|
|
1051
|
+
`])),t.colorFillSecondary);return(0,P.jsxs)("div",{style:{maxHeight:300,overflowY:"auto"},children:[ee.map(function(L){return(0,P.jsx)("div",{role:"option",onClick:function(){return V(L.value)},className:W,children:C(L.label)},L.value)}),(0,P.jsx)(u.Z,{style:{margin:"4px 0"}}),Q.map(function(L){return(0,P.jsx)("div",{role:"option",className:W,onClick:function(){return V(L.value)},title:C(L.label),children:C(L.label)},L.value)})]})};return(0,P.jsxs)(r.Z.Compact,{style:g()(g()({},c.style),{},{width:"100%"}),children:[(0,P.jsx)(A.default,g()(g()({options:$,open:G,onDropdownVisibleChange:k},c),{},{allowClear:!0,style:{width:"100%",minWidth:100,maxWidth:["past","next","exact",void 0].includes(d==null?void 0:d.type)?100:null},value:(d==null?void 0:d.type)||"exact",onChange:V,dropdownRender:J})),["past","next"].includes(d==null?void 0:d.type)&&[(0,P.jsx)(y.Z,{value:d==null?void 0:d.number,onChange:function(ee){var Q=g()(g()({},d),{},{number:ee});p(Q)}},"number"),(0,P.jsx)(A.default,{value:d==null?void 0:d.unit,style:{minWidth:130,maxWidth:140},onChange:function(ee){var Q=g()(g()({},d),{},{unit:ee});p(Q)},options:[{value:"day",label:E("Day")},{value:"week",label:E("Calendar week")},{value:"month",label:E("Calendar Month")},{value:"year",label:E("Calendar Year")}],popupMatchSelectWidth:!0},"unit")],((d==null?void 0:d.type)==="exact"||!(d!=null&&d.type))&&(0,P.jsx)(i,g()({},c))]})}},20493:function(_t,ve,e){"use strict";e.d(ve,{IW:function(){return v},LC:function(){return r},bt:function(){return R},Fo:function(){return A},TR:function(){return F},OR:function(){return y}});var q=e(97857),a=e.n(q),X=e(13769),l=e.n(X),P=e(10274),m=e(60887),z=e(97133),o=e(94350),N=e(96486),b=e.n(N),j=e(67294),f=e(46917),g=e(84577),n=e(85893),M=["component","overStyle","style","children","openMode"],T=["schema","id","eid","removeParentsIfNoChildren"],u=["component"],r=(0,j.createContext)(null);r.displayName="DraggableContext";var A=(0,j.createContext)(null);A.displayName="SortableContext";var y=function(I){var O=I.id,c=I.data,d=I.children,p=(0,m.useDraggable)({id:O,data:c}),C=(0,m.useDroppable)({id:O,data:c}),h=(0,j.useMemo)(function(){return{draggable:p,droppable:C}},[p,C]);return(0,n.jsx)(A.Provider,{value:h,children:d})},K=function(I){return new P.C(I).setAlpha(.15).toHex8String()},R=function(I){var O,c,d=I.component,p=I.overStyle,C=I.style,h=I.children,E=I.openMode,S=l()(I,M),t=(0,f.dQ)(),D=t.token,U=(0,j.useContext)(A),G=U.draggable,k=U.droppable,$=k.isOver,V=k.setNodeRef,J=a()({},C),ne=(0,o.useFieldSchema)(),ee=(ne==null?void 0:ne["x-component"])==="Action.Link"||d==="a";return $&&(G==null||(O=G.active)===null||O===void 0?void 0:O.id)!==(k==null||(c=k.over)===null||c===void 0?void 0:c.id)&&(J[ee?"color":"background"]=K(D.colorSettings),Object.assign(J,p)),j.createElement(d||"div",a()(a()({role:"none"},S),{},{className:(0,z.cx)("nb-sortable-designer",I.className),ref:V,style:J}),h)},Y=function(I){var O=x(I),c=(0,o.useFieldSchema)();return I.schema?a()(a()({},I),{},{id:O}):a()(a()({},I),{},{id:O,schema:c})},x=function(I){var O,c=(0,o.useField)();return I.id?I.id:(O=c.address)===null||O===void 0?void 0:O.toString()},B=(0,o.observer)(function(i){var I=Y(i),O=I.schema,c=I.id,d=I.eid,p=I.removeParentsIfNoChildren,C=l()(I,T),h=(0,j.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:O,removeParentsIfNoChildren:p??!0}},[O,p]);return(0,n.jsx)(y,{id:c,data:h,children:(0,n.jsx)(R,a()(a()({id:d},C),{},{children:i.children}))})},{displayName:"InternalSortableItem"}),F=j.memo(function(i){var I=i.component,O=l()(i,u),c=(0,g.ng)(),d=c.designable;return d?(0,n.jsx)(B,a()({},i)):j.createElement(I||"div",b().omit(O,["children","schema","overStyle","openMode","id","eid","removeParentsIfNoChildren"]),i.children)});F.displayName="SortableItem";var v=function(I){var O=(0,j.useContext)(A)||{},c=O.draggable;if(!c)return null;var d=c.attributes,p=c.listeners,C=c.setNodeRef;return(0,n.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,n.jsx)("div",a()(a()(a()({ref:C,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},p),d),{},{role:"none",children:(0,n.jsx)("span",{style:{cursor:"move",fontSize:14},children:I.children})}))})}},7840:function(_t,ve,e){"use strict";e.d(ve,{I9:function(){return p},Rq:function(){return Y},e7:function(){return K},jC:function(){return F},od:function(){return R}});var q=e(97857),a=e.n(q),X=e(9783),l=e.n(X),P=e(15009),m=e.n(P),z=e(5574),o=e.n(z),N=e(99289),b=e.n(N),j=e(52677),f=e.n(j),g=e(20301),n=e(96486),M=e.n(n),T=e(10097),u=e(76690),r=e(65565),A=e(61341),y=e(63179),K=function(E,S){var t,D=/{{(.*?)}}/,U=E==null||(t=E.match)===null||t===void 0?void 0:t.call(E,D);if(U){var G=M().get(S,U[1]);return M().isFunction(G)?G():G}else return E};function R(h){if(f()(h)!=="object"||h===null)return null;for(var E in h)if(Object.prototype.hasOwnProperty.call(h,E))return Object.prototype.toString.call(h[E])==="[object Object]"&&h[E]!==null?R(h[E]):{key:E,value:h[E]};return null}var Y=function(E){var S=x(E),t=(0,n.findIndex)(S,function(U,G,k){if(U.includes("$")&&G>0)return!0}),D=S.slice(0,t);return D};function x(h){var E=[];function S(t){Object.keys(t).sort().forEach(function(D){E.push(D),t[D]&&f()(t[D])==="object"&&S(t[D])})}return S(h),E}var B=function(){var h=b()(m()().mark(function E(S,t,D){var U,G,k,$;return m()().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return U=(0,u.cG)(S)?[t.parseVariable(S,D).then(function(ne){var ee=ne.value;return ee})]:[S],J.prev=1,J.next=4,Promise.all(U);case 4:return G=J.sent,k=o()(G,1),$=k[0],J.abrupt("return",$);case 10:throw J.prev=10,J.t0=J.catch(1),console.error("Error in parseVariableValue:",J.t0),J.t0;case 14:case"end":return J.stop()}},E,null,[[1,10]])}));return function(S,t,D){return h.apply(this,arguments)}}(),F=function(){var h=b()(m()().mark(function E(S,t){var D,U,G,k,$,V,J,ne;return m()().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return D=S.ruleGroup,U=S.variables,G=S.localVariables,k=S.variableNameOfLeftCondition,$=S.conditionType,V=Object.keys(D)[0]||"$and",J=D[V],Q.next=5,Promise.all(J.map(function(W){return v(W,U,G,k,$,t)}));case 5:if(ne=Q.sent,V!=="$and"){Q.next=10;break}return Q.abrupt("return",(0,n.every)(ne,function(W){return W}));case 10:if(!ne.length){Q.next=12;break}return Q.abrupt("return",(0,n.some)(ne,function(W){return W}));case 12:return Q.abrupt("return",!0);case 13:case"end":return Q.stop()}},E)}));return function(S,t){return h.apply(this,arguments)}}(),v=function(){var h=b()(m()().mark(function E(S,t,D,U,G,k){return m()().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(!("$and"in S||"$or"in S)){V.next=4;break}return V.next=3,F({ruleGroup:S,variables:t,localVariables:D,conditionType:G},k);case 3:return V.abrupt("return",V.sent);case 4:return V.abrupt("return",G==="advanced"?i(S,t,D,k):I(S,t,D,U,k));case 5:case"end":return V.stop()}},E)}));return function(S,t,D,U,G,k){return h.apply(this,arguments)}}(),i=function(){var h=b()(m()().mark(function E(S,t,D,U){var G,k,$;return m()().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return G=S.op,J.next=3,B(S.rightVar,t,D);case 3:return k=J.sent,J.next=6,B(S.leftVar,t,D);case 6:if($=J.sent,!G){J.next=9;break}return J.abrupt("return",U.apply(l()({},G,[$,k])));case 9:return J.abrupt("return",!0);case 10:case"end":return J.stop()}},E)}));return function(S,t,D,U){return h.apply(this,arguments)}}(),I=function(){var h=b()(m()().mark(function E(S,t,D,U,G){var k,$,V,J,ne,ee,Q,W,L,w,Z,te,oe,fe;return m()().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(k=R(S),$=k==null?void 0:k.key,$){he.next=4;break}return he.abrupt("return",!0);case 4:return V=O(Y(S),U),J=t.parseVariable(V,D,{doNotRequest:!0}).then(function(ie){var le=ie.value;return le}),ne=(0,u.cG)(k==null?void 0:k.value)?[t.parseVariable(k==null?void 0:k.value,D).then(function(ie){var le=ie.value;return le}),J]:[k==null?void 0:k.value,J],he.prev=7,he.next=10,Promise.all(ne);case 10:return ee=he.sent,Q=o()(ee,2),W=Q[0],L=Q[1],he.next=16,t.getCollectionField(V,D);case 16:return w=he.sent,Z=(0,r.J)(L,{targetCollectionField:w}),te=(0,r.J)(W,{targetCollectionField:w}),w!=null&&w.type&&["datetime","date","datetimeNoTz","dateOnly","unixTimestamp"].includes(w.type)&&Z&&(oe=(0,A.CE)(te),fe=(0,g.getPickerFormat)(oe),Z=(0,g.dayjs)(Z).format(fe)),he.abrupt("return",G.apply(l()({},$,[Z,te])));case 23:throw he.prev=23,he.t0=he.catch(7),he.t0;case 26:case"end":return he.stop()}},E,null,[[7,23]])}));return function(S,t,D,U,G){return h.apply(this,arguments)}}();function O(h){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(E,".").concat(h.join(".")," }}")}var c=function(E){var S={};return E.map(function(t){S[t.name]=t.ctx}),S};function d(h){return h.replace(/{{\s*}}/g,'{{"{{}}"}}')}function p(h,E,S,t,D,U){return C.apply(this,arguments)}function C(){return C=b()(m()().mark(function h(E,S,t,D,U,G){var k,$,V,J,ne,ee,Q,W,L,w;return m()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(!(S&&E==="handlebars")){te.next=23;break}return g.Handlebars.registerHelper("t",function(oe){if(typeof oe=="string")return G(oe,{ns:y.g})}),te.prev=2,V=d(S),J=g.Handlebars.compile(V),ne=c(D),ee=(t==null||(k=t.ctxRef)===null||k===void 0?void 0:k.current)||{},Q=ee.$nDate,W={},Object.keys(Q||{}).map(function(oe){W[oe]=Q[oe]()}),L=J(a()(a()(a()({},t==null||($=t.ctxRef)===null||$===void 0?void 0:$.current),ne),{},{$nDate:W})),console.log(L),te.next=13,U(L);case 13:return te.abrupt("return",te.sent);case 16:return te.prev=16,te.t0=te.catch(2),/VariablesProvider: .* is not found/.test(te.t0.message)||console.log(te.t0),console.log(S),te.abrupt("return",S);case 21:te.next=36;break;case 23:return te.prev=23,te.next=26,(0,T.replaceVariableValue)(S,t,D);case 26:return w=te.sent,te.next=29,U(w);case 29:return te.abrupt("return",te.sent);case 32:return te.prev=32,te.t1=te.catch(23),/VariablesProvider: .* is not found/.test(te.t1.message)||console.log(te.t1),te.abrupt("return",S);case 36:case"end":return te.stop()}},h,null,[[2,16],[23,32]])})),C.apply(this,arguments)}},25145:function(_t,ve,e){"use strict";e.d(ve,{u:function(){return R}});var q=e(5574),a=e.n(q),X=e(97857),l=e.n(X),P=e(13769),m=e.n(P),z=e(94350),o=e(96486),N=e(67294),b=e(49488),j=e(75585),f=e(22891),g={type:"void","x-component":"Action.Container","x-action":"view",title:'{{ t("View record") }}',"x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab",properties:{tab1:{type:"void",title:'{{t("Details")}}',"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:common:addBlock",properties:{}}}}}}}},n=e(94804),M=e(57105),T=e(68304),u=e(85893),r=["WrappedComponent"],A=function(){var x=(0,z.useFieldSchema)(),B=(0,b.useDesignable)(),F=B.insertAfterBegin,v=(0,N.useCallback)(function(i){var I=x.reduceProperties(function(O,c){return c["x-component"]==="Action.Container"?c:O},null);I||F((0,o.cloneDeep)(i))},[x,F]);return v},y=function(x){return x["x-component"]==="Action.Container"},K=function(x){var B=x.WrappedComponent,F=m()(x,r),v=(0,z.useFieldSchema)(),i=(0,f.ES)(),I=i.openPopup,O=(0,N.useRef)(!1),c=A(),d=(0,N.useRef)(v);d.current=v;var p=(0,N.useRef)(c);p.current=c;var C=(0,N.useRef)(I);C.current=I;var h=(0,N.useCallback)(function(){return d.current},[]),E=(0,N.useCallback)(function(){d.current.properties||(p.current(g),O.current=!0),O.current?(setTimeout(function(){C.current({customActionSchema:h()})}),O.current=!1):d.current.properties&&C.current()},[h]),S=(0,N.useMemo)(function(){return(0,o.debounce)(E,600,{leading:!0,trailing:!1})},[E]);return(0,N.useEffect)(function(){return function(){S.cancel()}},[S]),(0,u.jsx)("a",{onClick:S,children:(0,u.jsx)(B,l()({},F))})};function R(Y){return function(x){var B=(0,N.useState)(!1),F=a()(B,2),v=F[0],i=F[1],I=(0,N.useState)(!1),O=a()(I,2),c=O[0],d=O[1],p=(0,n.Kx)(),C=(0,b.useActionContext)(),h=(0,z.useField)(),E=(0,z.useFieldSchema)(),S=(E==null?void 0:E["x-component-props"])||{},t=S.enableLink,D=S.openMode,U=S.openSize,G=(0,f.ES)(),k=G.visibleWithURL,$=G.setVisibleWithURL,V=(0,N.useCallback)(function(ee){i==null||i(ee),$==null||$(ee)},[$]),J=(0,N.useRef)(E);J.current=E;var ne=C.setSubmitted;return t?(0,u.jsx)(j.OA,{visible:!1,children:(0,u.jsxs)(b.ActionContextProvider,{button:(0,u.jsx)(Y,l()({},x)),visible:v||k,setVisible:V,formValueChanged:c,setFormValueChanged:d,openMode:D,openSize:U,containerRefKey:"field-popup",fieldSchema:E,setSubmitted:ne,children:[(0,u.jsx)(n.YQ,{name:p.name,children:(0,u.jsx)(b.SchemaComponentOptions,{children:(0,u.jsx)(T.Rm,{children:(0,u.jsx)(M.sq,{onlyRenderProperties:!0,basePath:h==null?void 0:h.address,schema:E,filterProperties:y})})})}),(0,u.jsx)(K,l()(l()({},x),{},{WrappedComponent:Y}))]})}):(0,u.jsx)(Y,l()({},x))}}},61736:function(_t,ve,e){"use strict";e.d(ve,{D:function(){return a}});var q=e(67294),a=(0,q.createContext)({});a.displayName="SchemaComponentContext.Provider"},44245:function(_t,ve,e){"use strict";e.d(ve,{R:function(){return n}});var q=e(97857),a=e.n(q),X=e(13769),l=e.n(X),P=e(86201),m=e(94350),z=e(67294),o=e(47844),N=e(85893),b=["children","form"],j=["children"],f=function(T){var u=T.children,r=T.form,A=l()(T,b),y=(0,z.useContext)(m.SchemaOptionsContext),K=(0,z.useContext)(m.SchemaExpressionScopeContext),R=a()(a()({},y==null?void 0:y.scope),K),Y=a()({},y==null?void 0:y.components);return(0,N.jsx)(m.FormProvider,a()(a()({},A),{},{form:r,children:(0,N.jsx)(o.G,{components:Y,scope:R,children:u})}))},g=function(T){var u=T.children,r=l()(T,j),A=(0,z.useContext)(m.SchemaOptionsContext),y=(0,z.useContext)(m.SchemaExpressionScopeContext),K=a()(a()({},A==null?void 0:A.scope),y),R=a()({},A==null?void 0:A.components),Y=(0,z.useMemo)(function(){return(0,P.createForm)()},[]);return(0,N.jsx)(m.FormProvider,a()(a()({},r),{},{form:Y,children:(0,N.jsx)(o.G,{components:R,scope:K,children:u})}))},n=function(T){return T.form?(0,N.jsx)(f,a()({},T)):(0,N.jsx)(g,a()({},T))}},93587:function(_t,ve,e){"use strict";e.d(ve,{m:function(){return u}});var q=e(97857),a=e.n(q),X=e(86201),l=e(94350),P=e(74330),m=e(67294),z=e(54195),o=e(21044),N=e(84577),b=e(44245),j=e(93323),f=e(12174),g=function(A){var y=A.uid,K=A.type,R=K===void 0?"getJsonSchema":K,Y=A.onSuccess,x={url:"/uiSchemas:".concat(R,"/").concat(y)},B=(0,f.QT)(x,{refreshDeps:[y],onSuccess:function(I){Y&&Y(I)}}),F=B.data,v=B.loading;return{schema:F==null?void 0:F.data,loading:v}},n=e(85893),M=function(A){return A},T=function(A){var y=A.noForm,K=A.onlyRenderProperties,R=A.hidden,Y=A.scope,x=A.uid,B=A.components,F=A.onSuccess,v=A.NotFoundPage,i=A.schemaTransform,I=i===void 0?M:i,O=A.onPageNotFind,c=K?"getProperties":"getJsonSchema",d=(0,m.useMemo)(function(){return(0,X.createForm)()},[x]),p=g({uid:x,type:c,onSuccess:function(G){F&&F(G)}}),C=p.schema,h=p.loading,E=(0,N.Co)(v),S=(0,z.Kk)(),t=(0,l.useFieldSchema)(),D=(0,m.useMemo)(function(){return I(C||{})},[C,I]);return S||h||R?(0,n.jsx)(P.Z,{style:{width:"100%",marginTop:20},delay:o.fw}):!C||Object.keys(C).length===0?(O&&O(),E?(0,n.jsx)(E,{}):null):y?(0,n.jsx)(j.n,{components:B,scope:Y,schema:D,parentSchema:t}):(0,n.jsx)(b.R,{form:d,children:(0,n.jsx)(j.n,{components:B,scope:Y,schema:D,parentSchema:t})})},u=(0,m.memo)(function(r){return r.uid?(0,n.jsx)(T,a()({},r)):null});u.displayName="RemoteSchemaComponent"},93323:function(_t,ve,e){"use strict";e.d(ve,{A:function(){return y},n:function(){return Y}});var q=e(97857),a=e.n(q),X=e(13769),l=e.n(X),P=e(9783),m=e.n(P),z=e(94350),o=e(96486),N=e.n(o),b=e(67294),j=e(57105),f=e(61736),g=e(47844),n=e(85893),M=["components","scope","schema","distributed","onChange","parentSchema"],T=["schema","parentSchema"],u=["memoized"];function r(x){return z.Schema.isSchemaInstance(x)?x:x!=null&&x.name?new z.Schema({type:"object",properties:m()({},x.name,x),name:"p_".concat(x.name)}):new z.Schema(x)}var A=function(B){return(0,b.useMemo)(function(){return r(B)},[])},y=(0,b.createContext)({onChange:N().noop}),K=(0,b.memo)(function(x){var B=x.components,F=x.scope,v=x.schema,i=x.distributed,I=x.onChange,O=x.parentSchema,c=l()(x,M),d=(0,b.useContext)(f.D),p=(0,b.useMemo)(function(){return r(v)},[v]),C=(0,b.useMemo)(function(){return a()(a()({},d),{},{distributed:d.distributed==!1?!1:i,refresh:d.refresh||N().noop})},[d,i]),h=(0,b.useContext)(y),E=h.onChange,S=(0,b.useMemo)(function(){return{onChange:function(){I==null||I(p),E==null||E()}}},[I,E,p]);return(0,n.jsx)(y.Provider,{value:S,children:(0,n.jsx)(f.D.Provider,{value:C,children:(0,n.jsx)(g.G,{inherit:!0,components:B,scope:F,children:(0,n.jsx)(j.sq,a()(a()({},c),{},{schema:p,isUseFormilyField:!0,parentSchema:O}))})})})});K.displayName="RecursionSchemaComponent";var R=(0,b.memo)(function(x){var B=x.schema,F=x.parentSchema,v=l()(x,T),i=A(B);return(0,n.jsx)(K,a()(a()({},v),{},{schema:i,parentSchema:F}))});R.displayName="MemoizedSchemaComponent";var Y=(0,b.memo)(function(x){var B=x.memoized,F=l()(x,u);return B?(0,n.jsx)(R,a()({},F)):(0,n.jsx)(K,a()({},F))});Y.displayName="SchemaComponent"},47844:function(_t,ve,e){"use strict";e.d(ve,{B:function(){return m},G:function(){return z}});var q=e(97857),a=e.n(q),X=e(94350),l=e(67294),P=e(85893),m=function(){var N=(0,l.useContext)(X.SchemaOptionsContext);return N||{}},z=(0,l.memo)(function(o){var N=o.children,b=m(),j=(0,l.useMemo)(function(){return a()(a()({},b.components),o.components)},[b.components,o.components]),f=(0,l.useMemo)(function(){return a()(a()({},b.scope),o.scope)},[b.scope,o.scope]),g=(0,l.useMemo)(function(){return{scope:f,components:j}},[f,j]);return(0,P.jsx)(X.SchemaOptionsContext.Provider,{value:g,children:(0,P.jsx)(X.SchemaComponentsContext.Provider,{value:j,children:(0,P.jsx)(X.ExpressionScope,{value:f,children:N})})})});z.displayName="SchemaComponentOptions"},70993:function(_t,ve,e){"use strict";e.d(ve,{_b:function(){return v},RV:function(){return i.R},m1:function(){return I.m},n6:function(){return O.n},AT:function(){return O.A},G0:function(){return c.G},a$:function(){return ne},Tz:function(){return V},Bs:function(){return c.B}});var q=e(15009),a=e.n(q),X=e(99289),l=e.n(X),P=e(12444),m=e.n(P),z=e(72004),o=e.n(z),N=e(31996),b=e.n(N),j=e(26037),f=e.n(j),g=e(97857),n=e.n(g),M=e(18205),T=e(83062),u=e(83622),r=e(67294),A=e(49218),y=e(26793),K=e(49488),R=e(68230),Y=e(80940),x=e(85893),B={backgroundColor:"var(--colorSettings) !important"},F={backgroundColor:"transparent"},v=function(W){var L=(0,K.useDesignable)(),w=L.designable,Z=L.setDesignable,te=(0,y.$)(),oe=te.t,fe=(0,R.d)(),xe=fe.token,he=w?B:F,ie=(0,Y.wd)(),le=ie.isMobileLayout;return(0,A.y1)("Ctrl+Shift+U",function(){return Z(!w)},[w]),le?null:(0,x.jsx)(T.Z,{title:oe("UI Editor"),children:(0,x.jsx)(u.ZP,{"data-testid":"ui-editor-button",icon:(0,x.jsx)(M.Z,{style:{color:xe.colorTextHeaderMenu}}),title:oe("UI Editor"),style:n()(n()({},he),W.style),onClick:function(){Z(!w)}})})},i=e(44245),I=e(93587),O=e(93323),c=e(47844),d=e(5574),p=e.n(d),C=e(86201),h=e(94350),E=e(84327),S=e(96486),t=e.n(S),D=e(61736),U=e(81327),G=function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(W).concat((0,E.uid)())};h.Schema.silent(!0);var k={},$={silent:!0,compile:function(W){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=function(){if($.silent)try{return new Function("$root","with($root) { return (".concat(W,"); }"))(L)}catch{return"{{".concat(W,"}}")}else return new Function("$root","with($root) { return (".concat(W,"); }"))(L)};return k[W]?k[W]:W.trim().startsWith("t(")?(k[W]=w(),k[W]):w()}};h.Schema.registerCompiler($.compile);var V=function(W){var L=W.designable,w=W.onDesignableChange,Z=W.components,te=W.children,oe=(0,r.useContext)(D.D),fe=(0,c.B)(),xe=(0,r.useState)(function(){return(0,E.uid)()}),he=p()(xe,2),ie=he[0],le=he[1],ue=(0,r.useMemo)(function(){return W.form||(0,C.createForm)()},[ie]),me=(0,y.$)(),se=me.t,ae=(0,U.qD)(),Ee=(0,r.useMemo)(function(){return n()(n()({},W.scope),{},{t:se,randomString:G})},[W.scope,se,fe==null?void 0:fe.scope]),Pe=(0,r.useState)(L),De=p()(Pe,2),Fe=De[0],ye=De[1],be=(0,r.useMemo)(function(){return typeof L=="boolean"?L:Fe},[L,Fe,oe.designable]),ce=(0,r.useMemo)(function(){return function(ge){typeof be!="boolean"&&ye(ge),w==null||w(ge)}},[be,w]);(0,r.useEffect)(function(){var ge,de;be?(ge=ae.flowEngine)===null||ge===void 0||(ge=ge.flowSettings)===null||ge===void 0||ge.enable():(de=ae.flowEngine)===null||de===void 0||(de=de.flowSettings)===null||de===void 0||de.disable()},[ae,be]);var pe=(0,r.useCallback)(function(){le((0,E.uid)())},[]),H=(0,r.useMemo)(function(){return{scope:Ee,components:Z,reset:pe,refresh:t().noop,designable:be,setDesignable:ce}},[Z,be,pe,Ee,ce]);return(0,x.jsx)(D.D.Provider,{value:H,children:(0,x.jsx)(h.FormProvider,{form:ue,children:(0,x.jsx)(c.G,{inherit:!0,scope:Ee,components:Z,children:te})})})};V.displayName="SchemaComponentProvider";var J=e(31601),ne=function(Q){b()(L,Q);var W=f()(L);function L(){return m()(this,L),W.apply(this,arguments)}return o()(L,[{key:"load",value:function(){var w=l()(a()().mark(function te(){return a()().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:this.addComponents();case 1:case"end":return fe.stop()}},te,this)}));function Z(){return w.apply(this,arguments)}return Z}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:v})}}]),L}(J.S),ee=null},84577:function(_t,ve,e){"use strict";e.d(ve,{zz:function(){return z.zz},Pl:function(){return z.Pl},oB:function(){return z.oB},lI:function(){return a},hi:function(){return K.hi},eJ:function(){return X.e},Co:function(){return m},aZ:function(){return K.aZ},ng:function(){return z.ng},et:function(){return o.e},cL:function(){return T},fd:function(){return R},Cl:function(){return j},vH:function(){return A},sR:function(){return z.sR},wN:function(){return y.w},Dm:function(){return g},fM:function(){return K.fM}});var q=e(67294),a=function(x){var B=(0,q.useRef)(null);return(0,q.useEffect)(function(){return B.current&&x!==B.current&&B.current.onUnmount(),B.current=x,x.onMount(),function(){x.onUnmount()}},[x]),x},X=e(96365),l=e(94350),P=e(96486),m=function(x,B){var F=(0,q.useContext)(l.SchemaOptionsContext),v=F.components;return x?typeof x!="string"?x:(0,P.get)(v,x)||B:B},z=e(94516),o=e(98146),N=e(97857),b=e.n(N),j=function(x){var B=(0,q.useContext)(l.SchemaOptionsContext),F=(0,q.useContext)(l.SchemaExpressionScopeContext),v=(0,q.useRef)();return v.current=F,x.toFieldProps(b()(b()({},B),{},{get scope(){return b()(b()({},B.scope),v.current)}}))},f=e(61736);function g(){return(0,q.useContext)(f.D)}var n=e(26793),M=e(6145),T=function(){var x,B=(0,M.useCollectionManager_deprecated)(),F=B.getCollectionJoinField,v=B.getCollection,i=(0,l.useFieldSchema)(),I=(0,M.useCollection_deprecated)(),O=I.getField,c=O(i.name)||F(i["x-collection-field"]),d=(0,n.$)(),p=d.t,C=((x=i["x-component-props"])===null||x===void 0?void 0:x.fieldNames)||{},h=C.label,E=(0,q.useMemo)(function(){if(!(!c||!(c!=null&&c.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(c.interface)){var S=v(c.target);if((S==null?void 0:S.template)==="file")return[{label:p("Record picker"),value:"CollectionField"},{label:p("Select"),value:"AssociationSelect"}];switch(c.interface){case"o2m":return[{label:p("Record picker"),value:"CollectionField"},{label:p("Subtable"),value:"TableField"},{label:p("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:p("Record picker"),value:"CollectionField"},{label:p("Select"),value:"AssociationSelect"}];default:return[{label:p("Record picker"),value:"CollectionField"},{label:p("Subform"),value:"FormField"},{label:p("Select"),value:"AssociationSelect"}]}}},[p,c==null?void 0:c.interface,h]);return E},u=e(35746),r=e(58837),A=function(){var x,B=(0,l.useField)(),F=(0,l.useFieldSchema)(),v=(0,r.Kx)(),i=(0,u.d9)(),I=(v==null?void 0:v.getField(F.name))||(i==null?void 0:i.getCollectionField(F["x-collection-field"])),O=(0,X.e)();(0,q.useEffect)(function(){if(!(B!=null&&B.title)){var c;B.title=O(I==null||(c=I.uiSchema)===null||c===void 0?void 0:c.title)}},[I==null||(x=I.uiSchema)===null||x===void 0?void 0:x.title])},y=e(9780),K=e(18686),R=function(x){var B,F=(0,n.$)(),v=F.t,i=(0,M.useCollectionManager_deprecated)(),I=i.getCollectionJoinField,O=i.getCollection,c=(0,l.useFieldSchema)(),d=(x==null?void 0:x.fieldSchema)||c,p=(0,l.useField)(),C=(0,l.useForm)(),h=(d==null?void 0:d["x-read-pretty"])||p.readPretty||C.readPretty,E=x==null?void 0:x.fieldSchema,S=(0,M.useCollection_deprecated)(),t=S.getField,D=(x==null?void 0:x.collectionField)||t(d.name)||I(d["x-collection-field"]),U=((B=d["x-component-props"])===null||B===void 0?void 0:B.fieldNames)||{},G=U.label,k=(0,q.useMemo)(function(){if(!(!D||!(D!=null&&D.interface))&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(D.type)){var $=O(D.target);if(($==null?void 0:$.template)==="file")return h?[{label:v("Title"),value:"Select"},{label:v("File manager"),value:"FileManager"},{label:v("Tag"),value:"Tag"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},{label:v("File manager"),value:"FileManager"}];if(($==null?void 0:$.template)==="tree"&&["m2m","o2m","m2o"].includes(D.interface))return h?[{label:v("Title"),value:"Select"},{label:v("Tag"),value:"Tag"},!E&&{label:v("Sub-details"),value:"Nester"},!E&&{label:v("Sub-table"),value:"SubTable"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},!E&&["m2m","o2m"].includes(D.interface)&&{label:v("Sub-table"),value:"SubTable"},!E&&{label:v("Cascade Select"),value:"CascadeSelect"},!E&&{label:v("Sub-form"),value:"Nester"},{label:v("Sub-form(Popover)"),value:"PopoverNester"}];switch(D.interface){case"o2m":return h?[{label:v("Title"),value:"Select"},{label:v("Tag"),value:"Tag"},!E&&{label:v("Sub-table"),value:"SubTable"},!E&&{label:v("Sub-details"),value:"Nester"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},!E&&{label:v("Sub-form"),value:"Nester"},{label:v("Sub-form(Popover)"),value:"PopoverNester"},!E&&{label:v("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return h?[{label:v("Title"),value:"Select"},{label:v("Tag"),value:"Tag"},!E&&{label:v("Sub-details"),value:"Nester"},!E&&{label:v("Sub-table"),value:"SubTable"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},!E&&{label:v("Sub-table"),value:"SubTable"},!E&&{label:v("Sub-form"),value:"Nester"},{label:v("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return h?[{label:v("Title"),value:"Select"},{label:v("Tag"),value:"Tag"},!E&&{label:v("Sub-details"),value:"Nester"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},!E&&{label:v("Sub-form"),value:"Nester"},{label:v("Sub-form(Popover)"),value:"PopoverNester"}];default:return h?[{label:v("Title"),value:"Select"},{label:v("Tag"),value:"Tag"},!E&&{label:v("Sub-details"),value:"Nester"}]:[{label:v("Select"),value:"Select"},{label:v("Record picker"),value:"Picker"},!E&&{label:v("Sub-form"),value:"Nester"},{label:v("Sub-form(Popover)"),value:"PopoverNester"}]}}},[v,D==null?void 0:D.interface,G]);return(k||[]).filter(Boolean)}},18686:function(_t,ve,e){"use strict";e.d(ve,{aZ:function(){return Y},fM:function(){return B},hi:function(){return x}});var q=e(5574),a=e.n(q),X=e(97857),l=e.n(X),P=e(94350),m=e(83204),z=e(9361),o=e(96486),N=e.n(o),b=e(67294),j=e(89250),f=e(49488),g=e(21143),n=e(10097),M=e(1892),T=e(28561),u=function(i,I,O,c,d){return d.includes("/popups/")?2*c.paddingContentVertical+22+c.paddingPageVertical:i?c.paddingContentHorizontalLG:O?I?c.controlPaddingHorizontal+3*c.controlPaddingHorizontalSM+22+c.paddingContentHorizontalLG:c.paddingContentHorizontalLG+12:I?c.paddingSM+c.controlHeight+c.marginXS+2*c.controlPaddingHorizontalSM+22+c.paddingContentHorizontalLG:c.controlHeight+c.marginXS+(c.paddingContentVertical+2)*2+c.paddingContentHorizontalLG},r=function(i){var I=z.Z.useToken(),O=I.token,c=(0,f.useDesignable)(),d=c.designable,p=(0,n.useBlockHeightProps)(),C=p.heightProps,h=(0,j.useLocation)(),E=i||C||{},S=E.disablePageHeader,t=E.enablePageTabs,D=E.hidePageTitle,U=O.sizeXXL-2,G=d?O.controlHeight+2*O.paddingContentHorizontalLG:1*O.paddingContentHorizontalLG,k=u(S,t,D,O,h.pathname);return U+k+G},A=function(){var i=z.Z.useToken(),I=i.token,O=(0,f.useDesignable)(),c=O.designable,d=I.paddingContentVerticalLG+I.margin+2*I.paddingContentVertical+24,p=c?I.controlHeight+2*I.paddingContentHorizontalLG:1*I.paddingContentHorizontalLG;return d+p},y=function(i){var I=(0,P.useFieldSchema)(),O=F(I),c=r(i),d=A();return O?d:c},K=["workflowManualTasks","approvals","approvalRecords"],R=function(){var i,I=z.Z.useToken(),O=I.token,c=(0,n.useBlockHeightProps)(),d=c.heightProps,p=(0,M.Si)(),C=p.heightProps,h=(0,f.useDesignable)(),E=h.designable,S=(0,P.useFieldSchema)(),t=C||d,D=d.titleHeight,U=y(t),G=(0,g.useCollection)(),k=G.name,$=t.heightMode,V=t.height,J=t.title;if(!(!(t!=null&&t.heightMode)||$===T.j.DEFAULT)){var ne=Object.keys(((i=S.parent.properties.actions)===null||i===void 0?void 0:i.properties)||{}).length>0,ee=O.controlHeight+O.padding+O.marginLG,Q=ne||E?O.controlHeight+2*O.marginLG:O.marginLG,W=(E&&!K.includes(k)?O.controlHeight:22)+2*O.padding+1,L=J?D:0;return $===T.j.FULL_HEIGHT?window.innerHeight-U-L-W-Q-ee:V-L-Q-W-ee}},Y=function(i){var I=(0,n.useBlockHeightProps)(),O=I.heightProps,c=y(),d=O||{},p=d.heightMode,C=d.height,h=d.title,E=d.titleHeight,S=h?E:0;if(!(!(O!=null&&O.heightMode)||p===T.j.DEFAULT)){if(p===T.j.FULL_HEIGHT){var t=window.innerHeight-c;return i!=null&&i.removeBlockHeaderHeight&&(t=t-S),i!=null&&i.innerExtraHeight&&(t=t-i.innerExtraHeight),t}return C}},x=function(){var i=(0,P.useFieldSchema)(),I=(0,b.useMemo)(function(){return(0,n.getPageSchema)(i)},[]),O=(I==null?void 0:I["x-component-props"])||{},c=O.disablePageHeader,d=O.enablePageTabs,p=O.hidePageTitle,C=l()(l()({},i==null?void 0:i["x-component-props"]),{},{disablePageHeader:c,enablePageTabs:d,hidePageTitle:p}),h=y(C),E=C||{},S=E.heightMode,t=E.height;if(!(!(C!=null&&C.heightMode)||S===T.j.DEFAULT))return S===T.j.FULL_HEIGHT?window.innerHeight-h:t},B=function(){var i=(0,b.useState)(),I=a()(i,2),O=I[0],c=I[1],d=(0,b.useRef)(null),p=R(),C=(0,b.useCallback)((0,o.debounce)(function(){var E;if(d.current){var S=d.current.getBoundingClientRect(),t=(E=d.current.querySelector(".ant-table"))===null||E===void 0?void 0:E.getBoundingClientRect();t&&c(S.width)}},100),[p]),h=(0,b.useCallback)(function(E){d.current=E&&E.children?E.children[0]:null,C()},[C]);return(0,m.Z)("resize",C),{height:p,width:O,tableSizeRefCallback:h}},F=function v(i){if(!i)return null;if(i["x-component"]==="Action.Container"){var I;return(i==null||(I=i.parent)===null||I===void 0||(I=I["x-component-props"])===null||I===void 0?void 0:I.openMode)!=="page"}return v(i.parent)}},96365:function(_t,ve,e){"use strict";e.d(ve,{e:function(){return N}});var q=e(97857),a=e.n(q),X=e(52677),l=e.n(X),P=e(94350),m=e(67294),z={},o=function(j){var f=/{{.*?}}/g;return f.test(j)},N=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},f=j.noCache,g=(0,m.useContext)(P.SchemaOptionsContext),n=(0,m.useContext)(P.SchemaExpressionScopeContext);return function(M,T){var u=!1,r;if(typeof M=="string"&&M.startsWith("{{")&&(u=!0,r=M),M&&l()(M)==="object"&&!(0,m.isValidElement)(M)){try{r=JSON.stringify(M)}catch(y){return console.warn("Failed to stringify:",y),M}if(z[r])return z[r];u=o(r)}if(Array.isArray(M)){try{r=JSON.stringify(M)}catch(y){return console.warn("Failed to stringify:",y),M}if(z[r])return z[r];u=o(r)}if(u){var A=a()(a()(a()({},g==null?void 0:g.scope),n),T);if(!r)return P.Schema.compile(M,A);try{return f?P.Schema.compile(M,A):(z[r]=z[r]||P.Schema.compile(M,A),z[r])}catch(y){return console.log("useCompile error",M,y),P.Schema.compile(M,A)}}return M}}},94516:function(_t,ve,e){"use strict";e.d(ve,{zz:function(){return $},Pl:function(){return S},oB:function(){return G},ng:function(){return J},sR:function(){return V}});var q=e(5574),a=e.n(q),X=e(19632),l=e.n(X),P=e(15009),m=e.n(P),z=e(99289),o=e.n(z),N=e(12444),b=e.n(N),j=e(72004),f=e.n(j),g=e(9783),n=e.n(g),M=e(97857),T=e.n(M),u=e(94350),r=e(84327),A=e(90105),y=e(45360),K=e(50361),R=e.n(K),Y=e(27361),x=e.n(Y),B=e(36968),F=e.n(B),v=e(67294),i=e(26793),I=e(12174),O=e(57105),c=e(98902),d=e(61736);function p(ne,ee){if(ne)return ne["x-app-version"]||(ne["x-app-version"]=ee),Object.keys(ne.properties||{}).forEach(function(Q){var W;p((W=ne.properties)===null||W===void 0?void 0:W[Q],ee)}),ne}var C=JSON.parse('{"i8":"2.0.0-alpha.11"}'),h=e(80940),E=e(85893);function S(ne){return new $(ne)}var t=function ne(ee){ee&&(ee["x-uid"]||(ee["x-uid"]=(0,r.uid)()),Object.keys(ee.properties||{}).forEach(function(Q){ne(ee.properties[Q])}))},D=function(ee){return ee},U=function(ee,Q){if(!(!ee||!Q)){for(var W in Q)if(Object.prototype.hasOwnProperty.call(Q,W)){var L=Q[W];if(L!==(ee==null?void 0:ee[W]))return!1}return!0}},G=function(ee,Q){if(ee["x-uid"]&&ee["x-uid"]===Q["x-uid"])return[null,ee.toJSON()];var W=ee.toJSON(),L=T()(T()({},W),{},{properties:{}}),w=null,Z=function te(oe,fe){Object.keys(oe||{}).forEach(function(xe){var he=oe[xe];if(he["x-uid"]===Q["x-uid"]){w=oe[xe];return}else fe.properties[xe]=T()(T()({},he),{},{properties:{}}),te(he==null?void 0:he.properties,fe.properties[xe])})};return Z(W.properties,L),[L,w]},k=function(ee){return ee},$=function(){function ne(ee){b()(this,ne),n()(this,"current",void 0),n()(this,"options",void 0),n()(this,"appVersion",void 0),n()(this,"events",{}),this.options=ee,this.current=ee.current,this.appVersion=ee.appVersion}return f()(ne,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var Q=this,W=this.options,L=W.api,w=W.t,Z=w===void 0?k:w;if(L){var te=function(fe){if(!fe)return[];var xe=Object.values(fe.properties).length,he=[];return fe.mapProperties(function(ie){ie["x-component-props"]=ie["x-component-props"]||{},ie["x-component-props"].width=100/xe,ie["x-uid"]&&he.push({"x-uid":ie["x-uid"],"x-component-props":ie["x-component-props"]})}),fe["x-uid"]&&he.length?he:[]};this.on("insertAdjacent",function(){var oe=o()(m()().mark(function fe(xe){var he,ie,le,ue,me,se,ae,Ee,Pe,De;return m()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(ie=xe.onSuccess,le=xe.current,ue=xe.position,me=xe.schema,se=xe.wrap,ae=xe.wrapped,Ee=xe.removed,Pe=[],(ae==null?void 0:ae["x-component"])==="Grid.Col"&&(Pe=Pe.concat(te(ae.parent))),(Ee==null?void 0:Ee["x-component"])==="Grid.Col"&&(Pe=Pe.concat(te(Ee.parent))),Q.refresh(),le["x-uid"]){ye.next=7;break}return ye.abrupt("return");case 7:return ye.next=9,L.request({url:"/uiSchemas:insertAdjacent/".concat(le["x-uid"],"?position=").concat(ue),method:"post",data:{schema:p(me,Q.appVersion),wrap:se}});case 9:if(De=ye.sent,!Pe.length){ye.next=13;break}return ye.next=13,L.request({url:"/uiSchemas:batchPatch",method:"post",data:Pe});case 13:if(!(Ee!=null&&Ee["x-uid"])){ye.next=16;break}return ye.next=16,L.request({url:"/uiSchemas:remove/".concat(Ee["x-uid"]),method:"post"});case 16:ie==null||ie(De==null||(he=De.data)===null||he===void 0?void 0:he.data),y.ZP.success(Z("Saved successfully"),.2);case 18:case"end":return ye.stop()}},fe)}));return function(fe){return oe.apply(this,arguments)}}()),this.on("patch",function(){var oe=o()(m()().mark(function fe(xe){var he;return m()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(he=xe.schema,Q.refresh(),he!=null&&he["x-uid"]){le.next=4;break}return le.abrupt("return");case 4:return le.next=6,L.request({url:"/uiSchemas:patch",method:"post",data:T()({},he)});case 6:y.ZP.success(Z("Saved successfully"),.2);case 7:case"end":return le.stop()}},fe)}));return function(fe){return oe.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var oe=o()(m()().mark(function fe(xe){var he;return m()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(he=xe.schema,he!=null&&he["x-uid"]){le.next=3;break}return le.abrupt("return");case 3:return le.next=5,L.request({url:"/uiSchemas:initializeActionContext",method:"post",data:T()({},he)});case 5:case"end":return le.stop()}},fe)}));return function(fe){return oe.apply(this,arguments)}}()),this.on("batchPatch",function(){var oe=o()(m()().mark(function fe(xe){var he;return m()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return he=xe.schemas,Q.refresh(),le.next=4,L.request({url:"/uiSchemas:batchPatch",method:"post",data:he});case 4:y.ZP.success(Z("Saved successfully"),.2);case 5:case"end":return le.stop()}},fe)}));return function(fe){return oe.apply(this,arguments)}}()),this.on("remove",function(){var oe=o()(m()().mark(function fe(xe){var he,ie;return m()().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(he=xe.removed,ie=[],(he==null?void 0:he["x-component"])==="Grid.Col"&&(ie=te(he.parent)),Q.refresh(),he!=null&&he["x-uid"]){ue.next=6;break}return ue.abrupt("return");case 6:return ue.next=8,L.request({url:"/uiSchemas:remove/".concat(he["x-uid"]),method:"post"});case 8:if(!ie.length){ue.next=11;break}return ue.next=11,L.request({url:"/uiSchemas:batchPatch",method:"post",data:ie});case 11:y.ZP.success(Z("Saved successfully"),.2);case 12:case"end":return ue.stop()}},fe)}));return function(fe){return oe.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(Q){Q.type||(Q.type="void"),Q.name||(Q.name=(0,r.uid)()),this.current["x-uid"]&&t(Q)}},{key:"on",value:function(Q,W){this.events[Q]||(this.events[Q]=[]),this.events[Q].push(W)}},{key:"emit",value:function(){var ee=o()(m()().mark(function W(L){var w=this,Z,te,oe,fe,xe,he=arguments;return m()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(this.events[L]){le.next=2;break}return le.abrupt("return");case 2:for(Z=he.length,te=new Array(Z>1?Z-1:0),oe=1;oe<Z;oe++)te[oe-1]=he[oe];return fe=te[0],xe=te.slice(1),le.abrupt("return",Promise.all(this.events[L].map(function(ue){return ue.bind(w).apply(void 0,[T()({current:w.current},fe)].concat(l()(xe)))})));case 5:case"end":return le.stop()}},W,this)}));function Q(W){return ee.apply(this,arguments)}return Q}()},{key:"parentsIn",value:function(Q){if(!Q||!u.Schema.isSchemaInstance(Q))return!1;for(var W=this.current;(L=W)!==null&&L!==void 0&&L.parent;){var L;if(W.parent===Q)return!0;W=W.parent}return!1}},{key:"refresh",value:function(Q){var W=this.options.refresh;return W==null?void 0:W(Q)}},{key:"deepMerge",value:function(Q){var W=this,L={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"},w={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Q).forEach(function(Z){L[Z]?(W.current[Z]=Q[Z],W.updateModel(L[Z],Q[Z])):w[Z]?Object.keys(Q[Z]).forEach(function(te){F()(W.current,[Z,te],Q[Z][te]),W.updateModel([w[Z],te],Q[Z][te])}):W.current[Z]=Q[Z]}),this.emit("patch",{schema:Q})}},{key:"getSchemaAttribute",value:function(Q,W){return x()(this.current,Q,W)}},{key:"shallowMerge",value:function(Q){var W=this,L={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(Q).forEach(function(w){W.current[w]=Q[w],L[w]&&W.updateModel(L[w],Q[w])}),this.emit("patch",{schema:Q})}},{key:"updateModel",value:function(Q,W){var L=function(Z){F()(Z,Q,W)};this.model&&L(this.model),this.query&&this.query.take(L)}},{key:"insertAdjacent",value:function(Q,W){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(Q){case"beforeBegin":return this.insertBeforeBegin(W,L);case"afterBegin":return this.insertAfterBegin(W,L);case"beforeEnd":return this.insertBeforeEnd(W,L);case"afterEnd":return this.insertAfterEnd(W,L)}}},{key:"recursiveRemoveIfNoChildren",value:function(Q,W){if(Q){for(var L=Q,w,Z=W==null?void 0:W.breakRemoveOn;L;){if(typeof Z=="function"){if(Z(L))break}else if(U(L,Z))break;var te=Object.keys(L.properties||{}).length;if(te>0)break;L.parent&&(w=L.parent.removeProperty(L.name)),L=L.parent}return w}}},{key:"remove",value:function(Q){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=W.breakRemoveOn,w=W.removeParentsIfNoChildren,Z=Q||this.current,te=Z.parent.removeProperty(Z.name);if(w){var oe=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:L});oe&&(te=oe)}return this.emit("remove",{removed:te})}},{key:"removeWithoutEmit",value:function(Q){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=W.breakRemoveOn,w=W.removeParentsIfNoChildren,Z=Q||this.current,te=Z.parent.removeProperty(Z.name);if(w){var oe=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:L});oe&&(te=oe)}return te}},{key:"insertBeforeBeginOrAfterEnd",value:function(Q){var W=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u.Schema.isSchemaInstance(this.current)&&u.Schema.isSchemaInstance(Q)&&this.current.parent===Q.parent){var w=0,Z=0;return this.current.parent.mapProperties(function(te,oe,fe){W.current.name===oe&&(Z=fe),Q.name===oe&&(w=fe)}),w>Z?this.insertBeforeBegin(Q,L):this.insertAfterEnd(Q,L)}}},{key:"insertBeforeBegin",value:function(Q){var W=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u.Schema.isSchemaInstance(this.current)){var w={onSuccess:L.onSuccess},Z=L.wrap,te=Z===void 0?D:Z,oe=L.breakRemoveOn,fe=L.removeParentsIfNoChildren;if(u.Schema.isSchemaInstance(Q)){if(this.parentsIn(Q)){this.emit("error",{code:"parent_is_not_allowed",schema:Q});return}Q.parent.removeProperty(Q.name),fe&&(w.removed=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:oe}))}else Q&&(Q=R()(Q));var xe={},he=!1,ie=0,le=0;this.current.parent.mapProperties(function(De,Fe){Fe===W.current.name&&(le=ie,he=!0,++ie),De["x-index"]=ie,++ie,he&&(xe[Fe]=De,W.current.parent.removeProperty(Fe))}),this.prepareProperty(Q);var ue=te(Q),me=this.current.parent.addProperty(ue.name||(0,r.uid)(),ue);me["x-index"]=le,me.parent=this.current.parent,this.current.parent.setProperties(xe);var se=G(me,Q),ae=a()(se,2),Ee=ae[0],Pe=ae[1];this.emit("insertAdjacent",T()({position:"beforeBegin",schema:Pe,wrapped:ue,wrap:Ee},w))}}},{key:"insertAfterBegin",value:function(Q){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u.Schema.isSchemaInstance(this.current)){var L={onSuccess:W.onSuccess},w=W.wrap,Z=w===void 0?D:w,te=W.breakRemoveOn,oe=W.removeParentsIfNoChildren;if(u.Schema.isSchemaInstance(Q)){if(this.parentsIn(Q)){this.emit("error",{code:"parent_is_not_allowed",schema:Q});return}Q.parent.removeProperty(Q.name),oe&&(L.removed=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:te}))}else Q&&(Q=R()(Q));var fe={},xe=1;this.current.mapProperties(function(ae,Ee){ae["x-index"]=xe,++xe,fe[Ee]=ae}),this.current.properties={},this.prepareProperty(Q);var he=Z(Q),ie=this.current.addProperty(he.name||(0,r.uid)(),he);ie["x-index"]=0,ie.parent=this.current,this.current.setProperties(fe);var le=G(ie,Q),ue=a()(le,2),me=ue[0],se=ue[1];this.emit("insertAdjacent",T()({position:"afterBegin",schema:se,wrap:me,wrapped:he},L))}}},{key:"insertBeforeEnd",value:function(Q){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u.Schema.isSchemaInstance(this.current)){delete Q["x-index"];var L={onSuccess:W.onSuccess},w=W.wrap,Z=w===void 0?D:w,te=W.breakRemoveOn,oe=W.removeParentsIfNoChildren;if(u.Schema.isSchemaInstance(Q)){if(this.parentsIn(Q)){this.emit("error",{code:"parent_is_not_allowed",schema:Q});return}Q.parent.removeProperty(Q.name),oe&&(L.removed=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:te}))}else Q&&(Q=R()(Q));this.prepareProperty(Q);var fe=Z(Q),xe=this.current.addProperty(fe.name||(0,r.uid)(),fe);xe.parent=this.current;var he=G(xe,Q),ie=a()(he,2),le=ie[0],ue=ie[1];return this.emit("insertAdjacent",T()({position:"beforeEnd",schema:ue,wrap:le,wrapped:fe},L))}}},{key:"insertAfterEnd",value:function(Q){var W=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(u.Schema.isSchemaInstance(this.current)){var w={onSuccess:L==null?void 0:L.onSuccess},Z=L.wrap,te=Z===void 0?D:Z,oe=L.breakRemoveOn,fe=L.removeParentsIfNoChildren,xe=0,he=0,ie=!1,le={};if(this.current.parent.mapProperties(function(De,Fe){De["x-index"]=xe,Fe===W.current.name&&(++xe,he=xe,ie=!0),++xe,ie&&Fe!==W.current.name&&(le[Fe]=De,W.current.parent.removeProperty(Fe))}),u.Schema.isSchemaInstance(Q)){if(this.parentsIn(Q)){this.emit("error",{code:"parent_is_not_allowed",schema:Q});return}Q.parent.removeProperty(Q.name),fe&&(w.removed=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:oe})),Q.parent=null}else Q&&(Q=R()(Q));this.prepareProperty(Q);var ue=te(Q),me=this.current.parent.addProperty(ue.name||(0,r.uid)(),ue);me.parent=this.current.parent,me["x-index"]=he,this.current.parent.setProperties(le);var se=G(me,Q),ae=a()(se,2),Ee=ae[0],Pe=ae[1];this.emit("insertAdjacent",T()({position:"afterEnd",schema:Pe,wrap:Ee,wrapped:ue},w))}}}]),ne}();function V(){var ne=(0,v.useContext)(u.SchemaOptionsContext),ee=(0,v.useMemo)(function(){return(ne==null?void 0:ne.components)||{}},[ne]),Q=function(L){if(!L)return null;if(typeof L!="string")return L;var w=x()(ee,L);return w||console.error('[nocobase]: Component "'.concat(L,'" not found')),w};return Q}function J(){var ne=(0,v.useContext)(d.D),ee=ne.designable,Q=ne.setDesignable,W=ne.refresh,L=ne.reset,w=(0,v.useContext)(u.SchemaOptionsContext),Z=(0,v.useMemo)(function(){return(w==null?void 0:w.components)||{}},[w]),te=(0,v.useMemo)(function(){return function(){return(0,E.jsx)(E.Fragment,{})}},[]),oe=(0,A.Z)(),fe=(0,O.gR)(),xe=(0,O.QJ)(),he=(0,v.useCallback)(function(De){W==null||W(),oe(),fe==null||fe(De),xe==null||xe()},[W,oe,fe,xe]),ie=(0,u.useField)(),le=(0,u.useFieldSchema)(),ue=(0,I.LY)(),me=(0,i.$)(),se=me.t,ae=(0,v.useMemo)(function(){return S({t:se,api:ue,refresh:he,current:le,model:ie,appVersion:C.i8})},[se,ue,he,le,ie]);(0,v.useEffect)(function(){ae.loadAPIClientEvents()},[ae]);var Ee=(0,h.wd)(),Pe=Ee.isMobileLayout;return{dn:ae,designable:Pe?!1:ee,reset:L,refresh:he,setDesignable:Q,DesignableBar:te,findComponent:(0,v.useCallback)(function(De){var Fe;if(!De)return null;if(typeof De!="string")return De;var ye=x()(Z,De);return(Fe=ye==null?void 0:ye[c.XI])!==null&&Fe!==void 0?Fe:ye},[x()]),on:ae.on.bind(ae),patch:(0,v.useCallback)(function(De,Fe){var ye=function(pe){Object.keys(pe).forEach(function(H){var ge=pe[H];H==="title"&&(ie.title=ge,le.title=ge),H==="x-decorator-props"&&(ie.decoratorProps||(ie.decoratorProps={}),le["x-decorator-props"]||(le["x-decorator-props"]={}),Object.keys(ge).forEach(function(de){ie.decoratorProps[de]=ge[de],le["x-decorator-props"][de]=ge[de]})),H==="x-component-props"&&(ie.componentProps||(ie.componentProps={}),le["x-component-props"]||(le["x-component-props"]={}),Object.keys(ge).forEach(function(de){ie.componentProps[de]=ge[de],le["x-component-props"][de]=ge[de]}))})};if(typeof De=="string"){var be={};return F()(be,De,Fe),ye(be)}ye(De),he()},[ae]),shallowMerge:(0,v.useCallback)(function(De){ae.shallowMerge(De)},[ae]),deepMerge:(0,v.useCallback)(function(De){ae.deepMerge(De)},[ae]),remove:(0,v.useCallback)(function(De,Fe){ae.remove(De,Fe)},[ae]),insertAdjacent:(0,v.useCallback)(function(De,Fe,ye){ae.insertAdjacent(De,Fe,ye)},[ae]),insertBeforeBegin:(0,v.useCallback)(function(De){ae.insertBeforeBegin(De)},[ae]),insertAfterBegin:(0,v.useCallback)(function(De){ae.insertAfterBegin(De)},[ae]),insertBeforeEnd:(0,v.useCallback)(function(De){ae.insertBeforeEnd(De)},[ae]),insertAfterEnd:(0,v.useCallback)(function(De){ae.insertAfterEnd(De)},[ae])}}},98146:function(_t,ve,e){"use strict";e.d(ve,{e:function(){return m}});var q=e(94350),a=e(84577),X=e(67294),l=e(97970),P=function(){return null};P.isNullComponent=!0;var m=function(){var o=(0,a.ng)(),N=o.designable,b=(0,q.useFieldSchema)(),j=(0,X.useMemo)(function(){return b["x-designer"]||b["x-toolbar"]?b["x-designer"]||b["x-toolbar"]:b["x-settings"]?l.Mf:P},[b]),f=(0,a.Co)(j);return N&&f||P}},9780:function(_t,ve,e){"use strict";e.d(ve,{w:function(){return z}});var q=e(97857),a=e.n(q),X=e(13769),l=e.n(X),P=["useProps"],m=function(){return{}},z=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},b=N.useProps,j=b===void 0?m:b,f=l()(N,P),g=j;typeof j!="function"&&(g=m);var n=g();return a()(a()({},f),n)}},49488:function(_t,ve,e){"use strict";e.r(ve),e.d(ve,{Action:function(){return X.aU},ActionBar:function(){return X.ol},ActionBarProvider:function(){return X.N0},ActionContext:function(){return X.fW},ActionContextNoRerender:function(){return X.ml},ActionContextProvider:function(){return X.EI},ActionDesigner:function(){return X.$L},AfterSuccess:function(){return X.$b},AllDataBlocksContext:function(){return aa.s8},AllDataBlocksProvider:function(){return aa.Nm},AntdSchemaComponentPlugin:function(){return Cn},AntdSchemaComponentProvider:function(){return zn},AppendsTreeSelect:function(){return Vr},AssignedFieldValues:function(){return X.eY},AssociationField:function(){return fi},AssociationFieldMode:function(){return as},AssociationFieldModeProvider:function(){return ls},AssociationSelect:function(){return Xi},AttachmentList:function(){return Yo.fU},AutoComplete:function(){return Ws},BackButtonUsedInSubPage:function(){return nr.M},Block:function(){return zu},BlockItem:function(){return Di.jY},BlockItemCard:function(){return Di.Pu},BlockItemCardContext:function(){return Di.sm},BlocksSelector:function(){return X.mx},ButtonEditor:function(){return X.C1},CardItem:function(){return $s},Cascader:function(){return Gs},Checkbox:function(){return bi},CollectionSelect:function(){return Ys},ColorPicker:function(){return eu},ColorSelect:function(){return nu},Cron:function(){return qi},CronSet:function(){return iu},DataSourceCollectionCascader:function(){return Qs},DataSourceSelect:function(){return Js},DateFilterDynamicComponent:function(){return y.DateFilterDynamicComponent},DateFormatCom:function(){return ol.W},DatePicker:function(){return Na.Mt},DatePickerProvider:function(){return Na.iN},Designable:function(){return Be.zz},DesignableSwitch:function(){return K._b},Details:function(){return lu},DetailsDesigner:function(){return oe},Divider:function(){return su},DndContext:function(){return y.DndContext},DragHandler:function(){return y.DragHandler},DraggableContext:function(){return y.DraggableContext},EditComponent:function(){return w.Fy},EditDefaultValue:function(){return w.Ni},EditDescription:function(){return w.q8},EditOperator:function(){return w.HG},EditPattern:function(){return w.QT},EditRequired:function(){return w.JE},EditSortField:function(){return Wl},EditTable:function(){return Fl},EditTableAction:function(){return nl},EditTableActionContext:function(){return tl},EditTitle:function(){return w.$w},EditTitleField:function(){return w.nB},EditTooltip:function(){return w.Oc},EditValidationRules:function(){return w.zd},Editable:function(){return Ul},EllipsisWithTooltip:function(){return Qa.BQ},ErrorFallback:function(){return va.H},Expand:function(){return rl},ExpiresRadio:function(){return ol.D},FieldsTreeSelect:function(){return Nr},Fieldset:function(){return $u},Filter:function(){return wt.wn},FilterAction:function(){return wt.Gz},FilterActionContext:function(){return wt.tJ},FilterContext:function(){return wt.fo},FilterDynamicComponent:function(){return wt.VT},FilterLogicContext:function(){return wt.Xs},Form:function(){return Q},FormDialog:function(){return Tl.D},FormDrawer:function(){return Vi},FormField:function(){return Xn},FormItem:function(){return w.xJ},FormProvider:function(){return K.RV},FormV2:function(){return sr},G2Plot:function(){return il},G2PlotRenderer:function(){return al},Grid:function(){return Mi.rj},GridCard:function(){return Ni},GridRowContext:function(){return Mi.jg},HTMLEncode:function(){return Qa.gs},ICON_POPUP_Z_INDEX:function(){return Ai.z},IconPicker:function(){return qu.$},Input:function(){return Qa.II},InputNumber:function(){return Rl},InputReadPretty:function(){return Qa.mX},InputRecordPicker:function(){return Ra.zD},Json:function(){return Qa.Ph},LinkageFilter:function(){return Hc},List:function(){return $i},Markdown:function(){return ul.U},MarkdownReadPretty:function(){return ul.y},Menu:function(){return ko},NanoIDInput:function(){return uc},Page:function(){return Ia},PagePopups:function(){return ro.d9},PageTabs:function(){return ca},Pagination:function(){return cc},ParentRouteContext:function(){return Kn},Password:function(){return kl},Percent:function(){return mc},PopupSettingsProvider:function(){return Fn.D},Preview:function(){return vc.M},QuickEdit:function(){return pc},Radio:function(){return Li},ReadPretty:function(){return Qa.iV},ReadPrettyRecordPicker:function(){return Ra.OD},RecordPicker:function(){return Ra.lb},RecordPickerContext:function(){return Ra.b7},RecordPickerProvider:function(){return Ra.sU},RefreshDataBlockRequest:function(){return X.x1},RemoteSchemaComponent:function(){return K.m1},RemoteSelect:function(){return Kt},RemoveButton:function(){return X.xZ},RemoveConditionContext:function(){return wt.Iu},RequestSettings:function(){return X.Mk},RichText:function(){return gc},SchemaComponent:function(){return K.n6},SchemaComponentContext:function(){return Zc.D},SchemaComponentOnChangeContext:function(){return K.AT},SchemaComponentOptions:function(){return K.G0},SchemaComponentPlugin:function(){return K.a$},SchemaComponentProvider:function(){return K.Tz},SecondConFirm:function(){return X.y0},Select:function(){return on},ShowFormData:function(){return y.ShowFormData},SkipValidation:function(){return X.co},Sortable:function(){return y.Sortable},SortableContext:function(){return y.SortableContext},SortableItem:function(){return y.SortableItem},SortableProvider:function(){return y.SortableProvider},Space:function(){return _c},StablePopover:function(){return Ai.q},Table:function(){return ci},TableBlockDesigner:function(){return Tc},TableField:function(){return Nl},TableSelectorDesigner:function(){return Ic},TableV2:function(){return Pi},Tabs:function(){return Bi},TabsContextProvider:function(){return Ri.c},Templates:function(){return Dn},TestDesigner:function(){return Di.L3},TextAreaWithGlobalScope:function(){return Kc},TimePicker:function(){return fl},TreeSelect:function(){return kc},UnixTimestamp:function(){return wc},Upload:function(){return Yo.gq},Uploader:function(){return Yo.Qm},Variable:function(){return pi._w},VariableScopeProvider:function(){return pi.rj},VariableSelect:function(){return Uc.m},actionSettings:function(){return X.SL},actionSettingsItems:function(){return X.sB},allowAddNew:function(){return w.iT},attachmentFileTypes:function(){return Yo.BD},createDesignable:function(){return Be.Pl},defaultFieldNames:function(){return it},fetchTemplateData:function(){return xn},filterFormItemSettings:function(){return w.$9},findByUid:function(){return kt},findKeysByUid:function(){return On},findMenuItem:function(){return Jt},formDetailsSettings:function(){return or},formItemSettings:function(){return w.Of},formSettings:function(){return In},formV1Settings:function(){return L},genStyleHook:function(){return a.l6},getCurrentOptions:function(){return Ve},getDateExact:function(){return Na.tl},getDatePickerLabels:function(){return Ra.C$},getDateRanges:function(){return Na.SE},getLabelFormatValue:function(){return Ra.cN},getPopupPathFromParams:function(){return fr.NC},getRenderContent:function(){return y.getRenderContent},getStoredPopupContext:function(){return fr.XQ},getTabSchema:function(){return ar},getZIndex:function(){return X.KK},handleDateChangeOnForm:function(){return Na.MD},inferPickerType:function(){return Na.CE},isBulkEditAction:function(){return X.vU},isFileCollection:function(){return w.ZZ},isMobile:function(){return Na.tq},isShowFilePicker:function(){return Ra.el},isTabPage:function(){return Jn},isWriteEmailAction:function(){return X.VP},mapDatePicker:function(){return Na.LP},mapRangePicker:function(){return Na.fY},mapTimeFormat:function(){return vl},matchMimetype:function(){return Yo.tP},moment2str:function(){return Na.w_},navigateToTab:function(){return er},pageSettings:function(){return $r},pageTabSettings:function(){return sn},readPrettyFormSettings:function(){return kn},removeNullCondition:function(){return wt.Wm},splitWrapSchema:function(){return Be.oB},storePopupContext:function(){return fr.hK},useActionBarContext:function(){return X.DU},useActionContext:function(){return X.XC},useAfterSuccessOptions:function(){return X.EM},useAllDataBlocks:function(){return aa.kR},useAssociationFieldContext:function(){return wo.Ky},useAssociationFieldModeContext:function(){return Ji},useAttach:function(){return Be.lI},useBackButton:function(){return nr.K},useBlockHeight:function(){return Be.hi},useCloseAction:function(){return X.p2},useColumnSchema:function(){return Kl.z9},useColumnSettings:function(){return ku.x},useCompile:function(){return Be.eJ},useComponent:function(){return Be.Co},useCurrentPopupContext:function(){return ro.Zm},useDataBlockHeight:function(){return Be.aZ},useDatePickerContext:function(){return Na.P1},useDesignable:function(){return Be.ng},useDesigner:function(){return Be.et},useDownloadLogs:function(){return va.y},useEnsureOperatorsValid:function(){return w.Zd},useFieldComponentOptions:function(){return Be.cL},useFieldMode:function(){return w.b},useFieldModeOptions:function(){return Be.fd},useFieldNames:function(){return Ra.Xd},useFieldProps:function(){return Be.Cl},useFieldTitle:function(){return Be.vH},useFilterActionProps:function(){return wt.PL},useFilterFieldOptions:function(){return wt.V8},useFilterFieldProps:function(){return wt.tM},useFilterOptions:function(){return wt.xQ},useFindComponent:function(){return Be.sR},useFormDataTemplates:function(){return Yt},useGetAriaLabelOfAction:function(){return X.HS},useGetAriaLabelOfDrawer:function(){return X.vB},useGetAriaLabelOfModal:function(){return X.QY},useGetAriaLabelOfPopover:function(){return X.t9},useGetFilterFieldOptions:function(){return wt.Kg},useGetFilterOptions:function(){return wt.aJ},useGridContext:function(){return Mi.n1},useGridRowContext:function(){return Mi.Di},useIsAddNewForm:function(){return w.l1},useIsAssociationField:function(){return w.w5},useIsFieldReadPretty:function(){return w.p3},useIsFileField:function(){return w.G5},useIsFormReadPretty:function(){return w.xj},useIsSelectFieldMode:function(){return w.rx},useLabelUiSchema:function(){return Ra.Il},useLinkageAction:function(){return X.zC},useListBlockContext:function(){return Bl},useMenuDragEnd:function(){return No},useMenuTranslation:function(){return Aa.v},useNocoBaseRoutes:function(){return xr},useParentRoute:function(){return Hn},usePopupSettings:function(){return Fn.a},useProps:function(){return Be.wN},useSchemaComponentContext:function(){return Be.Dm},useSchemaOptionsContext:function(){return K.Bs},useStyles:function(){return Mr.y},useTableColumnIntegration:function(){return wu.p},useTableSize:function(){return Be.fM},useTabsContext:function(){return Ri.g},useTitleFieldOptions:function(){return w.eT},useUploadStyles:function(){return Yo.$S},useValidateSchema:function(){return w.q4},useVariableScope:function(){return pi.ym},useZIndexContext:function(){return X.uq},withSearchParams:function(){return fr.Q3},zIndexContext:function(){return X.K5}});var q={};e.r(q),e.d(q,{Action:function(){return X.aU},ActionBar:function(){return X.ol},ActionBarProvider:function(){return X.N0},ActionContext:function(){return X.fW},ActionContextNoRerender:function(){return X.ml},ActionContextProvider:function(){return X.EI},ActionDesigner:function(){return X.$L},AfterSuccess:function(){return X.$b},AllDataBlocksContext:function(){return aa.s8},AllDataBlocksProvider:function(){return aa.Nm},AntdSchemaComponentPlugin:function(){return Cn},AntdSchemaComponentProvider:function(){return zn},AppendsTreeSelect:function(){return Vr},AssignedFieldValues:function(){return X.eY},AssociationField:function(){return fi},AssociationFieldMode:function(){return as},AssociationFieldModeProvider:function(){return ls},AssociationSelect:function(){return Xi},AttachmentList:function(){return Yo.fU},AutoComplete:function(){return Ws},BackButtonUsedInSubPage:function(){return nr.M},Block:function(){return zu},BlockItem:function(){return Di.jY},BlockItemCard:function(){return Di.Pu},BlockItemCardContext:function(){return Di.sm},BlocksSelector:function(){return X.mx},ButtonEditor:function(){return X.C1},CardItem:function(){return $s},Cascader:function(){return Gs},Checkbox:function(){return bi},CollectionSelect:function(){return Ys},ColorPicker:function(){return eu},ColorSelect:function(){return nu},Cron:function(){return qi},CronSet:function(){return iu},DataSourceCollectionCascader:function(){return Qs},DataSourceSelect:function(){return Js},DateFormatCom:function(){return ol.W},DatePicker:function(){return Na.Mt},DatePickerProvider:function(){return Na.iN},Details:function(){return lu},DetailsDesigner:function(){return oe},Divider:function(){return su},EditComponent:function(){return w.Fy},EditDefaultValue:function(){return w.Ni},EditDescription:function(){return w.q8},EditOperator:function(){return w.HG},EditPattern:function(){return w.QT},EditRequired:function(){return w.JE},EditSortField:function(){return Wl},EditTable:function(){return Fl},EditTableAction:function(){return nl},EditTableActionContext:function(){return tl},EditTitle:function(){return w.$w},EditTitleField:function(){return w.nB},EditTooltip:function(){return w.Oc},EditValidationRules:function(){return w.zd},Editable:function(){return Ul},EllipsisWithTooltip:function(){return Qa.BQ},ErrorFallback:function(){return va.H},Expand:function(){return rl},ExpiresRadio:function(){return ol.D},FieldsTreeSelect:function(){return Nr},Fieldset:function(){return $u},Filter:function(){return wt.wn},FilterAction:function(){return wt.Gz},FilterActionContext:function(){return wt.tJ},FilterContext:function(){return wt.fo},FilterDynamicComponent:function(){return wt.VT},FilterLogicContext:function(){return wt.Xs},Form:function(){return Q},FormDialog:function(){return Tl.D},FormDrawer:function(){return Vi},FormField:function(){return Xn},FormItem:function(){return w.xJ},FormV2:function(){return sr},G2Plot:function(){return il},G2PlotRenderer:function(){return al},Grid:function(){return Mi.rj},GridCard:function(){return Ni},GridRowContext:function(){return Mi.jg},HTMLEncode:function(){return Qa.gs},ICON_POPUP_Z_INDEX:function(){return Ai.z},IconPicker:function(){return qu.$},Input:function(){return Qa.II},InputNumber:function(){return Rl},InputReadPretty:function(){return Qa.mX},InputRecordPicker:function(){return Ra.zD},Json:function(){return Qa.Ph},LinkageFilter:function(){return Hc},List:function(){return $i},Markdown:function(){return ul.U},MarkdownReadPretty:function(){return ul.y},Menu:function(){return ko},NanoIDInput:function(){return uc},Page:function(){return Ia},PagePopups:function(){return ro.d9},PageTabs:function(){return ca},Pagination:function(){return cc},ParentRouteContext:function(){return Kn},Password:function(){return kl},Percent:function(){return mc},PopupSettingsProvider:function(){return Fn.D},Preview:function(){return vc.M},QuickEdit:function(){return pc},Radio:function(){return Li},ReadPretty:function(){return Qa.iV},ReadPrettyRecordPicker:function(){return Ra.OD},RecordPicker:function(){return Ra.lb},RecordPickerContext:function(){return Ra.b7},RecordPickerProvider:function(){return Ra.sU},RefreshDataBlockRequest:function(){return X.x1},RemoteSelect:function(){return Kt},RemoveButton:function(){return X.xZ},RemoveConditionContext:function(){return wt.Iu},RequestSettings:function(){return X.Mk},RichText:function(){return gc},SecondConFirm:function(){return X.y0},Select:function(){return on},SkipValidation:function(){return X.co},Space:function(){return _c},StablePopover:function(){return Ai.q},Table:function(){return ci},TableBlockDesigner:function(){return Tc},TableField:function(){return Nl},TableSelectorDesigner:function(){return Ic},TableV2:function(){return Pi},Tabs:function(){return Bi},TabsContextProvider:function(){return Ri.c},Templates:function(){return Dn},TestDesigner:function(){return Di.L3},TextAreaWithGlobalScope:function(){return Kc},TimePicker:function(){return fl},TreeSelect:function(){return kc},UnixTimestamp:function(){return wc},Upload:function(){return Yo.gq},Uploader:function(){return Yo.Qm},Variable:function(){return pi._w},VariableScopeProvider:function(){return pi.rj},VariableSelect:function(){return Uc.m},actionSettings:function(){return X.SL},actionSettingsItems:function(){return X.sB},allowAddNew:function(){return w.iT},attachmentFileTypes:function(){return Yo.BD},defaultFieldNames:function(){return it},fetchTemplateData:function(){return xn},filterFormItemSettings:function(){return w.$9},findByUid:function(){return kt},findKeysByUid:function(){return On},findMenuItem:function(){return Jt},formDetailsSettings:function(){return or},formItemSettings:function(){return w.Of},formSettings:function(){return In},formV1Settings:function(){return L},genStyleHook:function(){return a.l6},getCurrentOptions:function(){return Ve},getDateExact:function(){return Na.tl},getDatePickerLabels:function(){return Ra.C$},getDateRanges:function(){return Na.SE},getLabelFormatValue:function(){return Ra.cN},getPopupPathFromParams:function(){return fr.NC},getStoredPopupContext:function(){return fr.XQ},getTabSchema:function(){return ar},getZIndex:function(){return X.KK},handleDateChangeOnForm:function(){return Na.MD},inferPickerType:function(){return Na.CE},isBulkEditAction:function(){return X.vU},isFileCollection:function(){return w.ZZ},isMobile:function(){return Na.tq},isShowFilePicker:function(){return Ra.el},isTabPage:function(){return Jn},isWriteEmailAction:function(){return X.VP},mapDatePicker:function(){return Na.LP},mapRangePicker:function(){return Na.fY},mapTimeFormat:function(){return vl},matchMimetype:function(){return Yo.tP},moment2str:function(){return Na.w_},navigateToTab:function(){return er},pageSettings:function(){return $r},pageTabSettings:function(){return sn},readPrettyFormSettings:function(){return kn},removeNullCondition:function(){return wt.Wm},storePopupContext:function(){return fr.hK},useActionBarContext:function(){return X.DU},useActionContext:function(){return X.XC},useAfterSuccessOptions:function(){return X.EM},useAllDataBlocks:function(){return aa.kR},useAssociationFieldContext:function(){return wo.Ky},useAssociationFieldModeContext:function(){return Ji},useBackButton:function(){return nr.K},useCloseAction:function(){return X.p2},useColumnSchema:function(){return Kl.z9},useColumnSettings:function(){return ku.x},useCurrentPopupContext:function(){return ro.Zm},useDatePickerContext:function(){return Na.P1},useDownloadLogs:function(){return va.y},useEnsureOperatorsValid:function(){return w.Zd},useFieldMode:function(){return w.b},useFieldNames:function(){return Ra.Xd},useFilterActionProps:function(){return wt.PL},useFilterFieldOptions:function(){return wt.V8},useFilterFieldProps:function(){return wt.tM},useFilterOptions:function(){return wt.xQ},useFormDataTemplates:function(){return Yt},useGetAriaLabelOfAction:function(){return X.HS},useGetAriaLabelOfDrawer:function(){return X.vB},useGetAriaLabelOfModal:function(){return X.QY},useGetAriaLabelOfPopover:function(){return X.t9},useGetFilterFieldOptions:function(){return wt.Kg},useGetFilterOptions:function(){return wt.aJ},useGridContext:function(){return Mi.n1},useGridRowContext:function(){return Mi.Di},useIsAddNewForm:function(){return w.l1},useIsAssociationField:function(){return w.w5},useIsFieldReadPretty:function(){return w.p3},useIsFileField:function(){return w.G5},useIsFormReadPretty:function(){return w.xj},useIsSelectFieldMode:function(){return w.rx},useLabelUiSchema:function(){return Ra.Il},useLinkageAction:function(){return X.zC},useListBlockContext:function(){return Bl},useMenuDragEnd:function(){return No},useMenuTranslation:function(){return Aa.v},useNocoBaseRoutes:function(){return xr},useParentRoute:function(){return Hn},usePopupSettings:function(){return Fn.a},useStyles:function(){return Mr.y},useTableColumnIntegration:function(){return wu.p},useTabsContext:function(){return Ri.g},useTitleFieldOptions:function(){return w.eT},useUploadStyles:function(){return Yo.$S},useValidateSchema:function(){return w.q4},useVariableScope:function(){return pi.ym},useZIndexContext:function(){return X.uq},withSearchParams:function(){return fr.Q3},zIndexContext:function(){return X.K5}});var a=e(46917),X=e(76157),l=e(15009),P=e.n(l),m=e(99289),z=e.n(m),o=e(12444),N=e.n(o),b=e(72004),j=e.n(b),f=e(31996),g=e.n(f),n=e(26037),M=e.n(n),T=e(97857),u=e.n(T),r=e(67294),A=e(31601),y=e(99687),K=e(70993),R=e(89127),Y=function(re){return z()(P()().mark(function Me(){var Re,ke;return P()().wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.prev=0,Ke.next=3,this.api.request(re);case 3:return ke=Ke.sent,Ke.abrupt("return",ke==null||(Re=ke.data)===null||Re===void 0?void 0:Re.data);case 7:return Ke.prev=7,Ke.t0=Ke.catch(0),Ke.abrupt("return",[]);case 10:case"end":return Ke.stop()}},Me,this,[[0,7]])}))},x=e(13769),B=e.n(x),F=e(5552),v=e(86201),i=e(94350),I=e(31282),O=e(74330),c=e(12174),d=e(6145),p=e(57105),C=e(97970),h=e(64016),E=e(15195),S=e(23911),t=e(85893),D=["form","children"],U=["form","children","disabled"],G=["request","effects","initialValue","useValues"],k=function(re){var Me=re.form,Re=re.children,ke=B()(re,D),He=(0,i.useField)(),Ke=(0,i.useFieldSchema)(),Dt=(0,Be.lI)(Me.createVoidField(u()(u()({},He.props),{},{basePath:""})));return(0,t.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(i.FormContext.Provider,{value:Me,children:(0,t.jsx)(F.FormLayout,u()(u()({layout:"vertical"},ke),{},{children:(0,t.jsx)(p.sq,{basePath:Dt.address,schema:Ke,onlyRenderProperties:!0})}))})})},$=function(re){return re.children},V=function(re){var Me=re.form,Re=re.children,ke=re.disabled,He=B()(re,U),Ke=(0,i.useField)(),Dt=(0,i.useFieldSchema)(),It=(0,Be.lI)(Me.createVoidField(u()(u()({},Ke.props),{},{basePath:""}))),jt=(0,Be.Co)(Dt["x-component"],$);return(0,r.useEffect)(function(){Me.disabled=ke||Ke.disabled},[ke,Ke.disabled]),(0,t.jsx)(I.ZP,{componentDisabled:ke,children:(0,t.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(i.FormContext.Provider,{value:Me,children:(0,t.jsx)(F.FormLayout,u()(u()({layout:"vertical"},He),{},{children:(0,t.jsx)(i.FieldContext.Provider,{value:It,children:(0,t.jsx)(jt,u()(u()({},Ke.componentProps),{},{children:(0,t.jsx)(p.sq,{basePath:It.address,schema:Dt,onlyRenderProperties:!0})}))})}))})})})},J=function(re){var Me=re.request,Re=re.initialValue;return Me||function(){return Promise.resolve({data:Re})}},ne=function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,c.QT)(J(Me),re)},ee=(0,r.createContext)(null);ee.displayName="FormBlockContext";var Q=(0,i.observer)(function(_e){var re=_e.request,Me=_e.effects,Re=_e.initialValue,ke=_e.useValues,He=ke===void 0?ne:ke,Ke=B()(_e,G),Dt=(0,i.useFieldSchema)(),It=(0,i.useField)(),jt=(0,r.useMemo)(function(){return(0,v.createForm)({effects:Me})},[]),Lt=He({uid:Dt["x-uid"],onSuccess:function(Bt){return z()(P()().mark(function un(){return P()().wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,jt.reset();case 2:jt.setValues(Bt==null?void 0:Bt.data),jt.setInitialValues(Bt==null?void 0:Bt.data);case 4:case"end":return dn.stop()}},un)}))()}},_e),Nt=(0,r.useContext)(ee);return(0,t.jsx)(ee.Provider,{value:{parent:Nt,form:jt,result:Lt,field:It,fieldSchema:Dt},children:(0,t.jsx)(O.Z,{spinning:(Lt==null?void 0:Lt.loading)||!1,children:Dt["x-decorator"]==="Form"?(0,t.jsx)(V,u()({form:jt},Ke)):(0,t.jsx)(k,u()({form:jt},Ke))})})},{displayName:"Form"});Q.Designer=function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=re.title,ke=(0,E.zy)(),He=(0,S.rE)(),Ke=He.componentNamePrefix;return(0,t.jsxs)(C.aN,{template:ke,title:Re||Me,children:[(0,t.jsx)(h.G,{componentName:"".concat(Ke,"Form"),collectionName:Me}),(0,t.jsx)(C.Z5,{}),(0,t.jsx)(C.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var W=e(5537),L=new W.F5({name:"FormV1Settings",items:[{name:"template",Component:h.G,useComponentProps:function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=(0,S.rE)(),ke=Re.componentNamePrefix;return{componentName:"".concat(ke,"Form"),collectionName:Me}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),w=e(54801),Z=function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=re.title,ke=(0,E.zy)();return(0,t.jsx)(C.aN,{schemaSettings:"FormSettings",template:ke,title:Re||Me})},te=function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=re.title,ke=(0,E.zy)();return(0,t.jsx)(C.aN,{schemaSettings:"ReadPrettyFormSettings",template:ke,title:Re||Me})},oe=function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=re.title,ke=(0,E.zy)();return(0,t.jsx)(C.aN,{schemaSettings:"FormDetailsSettings",template:ke,title:Re||Me})},fe=function(){var re=(0,d.useCollection_deprecated)(),Me=re.name,Re=re.title,ke=(0,E.zy)();return(0,t.jsx)(C.aN,{schemaSettings:"blockSettings:filterForm",template:ke,title:Re||Me})},xe=e(7340),he=e(15503),ie=e(83335),le=e(68230),ue=e(68400),me=e.n(ue),se=e(97133),ae=e(84327),Ee=e(9361),Pe=e(96486),De=e.n(Pe),Fe=e(81327),ye=e(415),be=e(31019),ce=e(94804),pe=e(39742),H=e(7686),ge=e(22229),de=e(43321),Ce=e(3078),we=e(9780),$e=e(3192),Je=e(18686),rt=e(5574),je=e.n(rt),Ge=e(20301),Ue=e(42075),Oe=e(34041),qe=e(26793),ze=e(53285),Xe=e(32268),Ye=e(9783),Ie=e.n(Ye),vt=e(52677),ot=e.n(vt),Pt=e(3407),yt=e(66309),At=e(96074),tn=e(27484),bn=e.n(tn),Ht=e(44990),gt=e(8341),We=e(87714),Be=e(84577),at=e(16646),Ne=e(73475),st=e(32983),Mt=e(85518),Gt=e(67668),Wt=e(58812),nn=e(96695),Zt=e.n(nn),bt=e(19632),Qe=e.n(bt),it={label:"label",value:"value",color:"color",options:"children"};function tt(_e,re){var Me=[];if(!Array.isArray(_e))return Me;for(var Re=0;Re<_e.length;Re++){var ke=_e[Re][re.options];Array.isArray(ke)&&Me.push.apply(Me,Qe()(tt(ke,re))),Me.push(u()({},_e[Re]))}return Me}function et(_e,re,Me){if(!_e)return[];var Re=[],ke=Zt()(Me),He;try{var Ke=function(){var It=He.value,jt=_e.find(function(Lt){return Lt[re.value]==It})||{value:It,label:It&&It.toString()};Re.push(jt)};for(ke.s();!(He=ke.n()).done;)Ke()}catch(Dt){ke.e(Dt)}finally{ke.f()}return Re}function Ve(_e,re,Me){var Re=tt(re,Me),ke=(0,Pe.castArray)(_e).map(function(He){return(0,Ge.isPlainObject)(He)?He[Me.value]:He});return et(Re,Me,ke)}var Ze=e(25145),ct=e(61933),ut=(0,i.observer)(function(_e){var re=(0,r.useState)(!0),Me=je()(re,2),Re=Me[0],ke=Me[1],He=(0,r.useState)([]),Ke=je()(He,2),Dt=Ke[0],It=Ke[1],jt=(0,i.useField)(),Lt=(0,Gt.Hy)();return(0,r.useEffect)(function(){var Nt,hn=u()(u()({},it),_e.fieldNames),Bt=jt.dataSource||_e.options||(Lt==null?void 0:Lt.uiSchema.enum)||[],un=Ve(jt.value,Bt,hn);if(!(!(0,ae.isValid)(_e.value)&&!un.length)&&!((0,v.isArrayField)(jt)&&(jt==null||(Nt=jt.value)===null||Nt===void 0?void 0:Nt.length)===0)){var an=jt.value!==null&&un.map(function(dn,gn){return(0,t.jsx)(yt.Z,{color:dn[hn.color],icon:typeof dn.icon=="string"?(0,t.jsx)(ct.JO,{type:dn.icon}):dn.icon,children:dn[hn.label]},gn)});It(an),ke(!1)}},[Lt==null?void 0:Lt.uiSchema.enum,jt,jt.dataSource,jt.value,_e.fieldNames,_e.options,_e.value]),Re?null:(0,t.jsx)(Wt.B,{ellipsis:_e.ellipsis,children:Dt})},{displayName:"SelectReadPretty"}),ht=(0,Ze.u)(ut),Vt,Ot=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],en=["objectValue","loading","value","rawOptions","defaultValue"],cn=function(re){return!(0,ae.isValid)(re)||ot()(re)==="object"&&Object.keys(re).length===0},mn=function(re){var Me=re.value,Re=re.options,ke=re.onChange,He=re.fieldNames,Ke=re.mode,Dt=re.loading,It=re.rawOptions,jt=re.defaultValue,Lt=B()(re,Ot),Nt=Mt.nI?"":Xt,hn=Mt.nI?void 0:"topLeft",Bt=function(an){var dn;if(!cn(an)){var gn=(0,ae.toArr)(an).filter(function(ur){return ur}).map(function(ur){return(0,Ge.isPlainObject)(ur)?ur[He.value]:ur}),Sn=(dn=Ve(gn,Re,He))===null||dn===void 0?void 0:dn.map(function(ur){return{label:ur[He.label],value:ur[He.value]}});return["tags","multiple"].includes(Ke)||re.multiple?Sn:Sn.shift()}};return(0,t.jsx)(Oe.default,u()({rootClassName:Nt,placement:hn,role:"button","data-testid":"select-object-".concat(Ke||"single"),value:Bt(Me),defaultValue:Bt(jt),allowClear:{clearIcon:(0,t.jsx)(at.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Dt?(0,t.jsx)(O.Z,{}):(0,t.jsx)(st.Z,{image:st.Z.PRESENTED_IMAGE_SIMPLE}),options:Re,fieldNames:He,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(an,dn){var gn;return((gn=dn==null?void 0:dn[He.label||"label"])!==null&&gn!==void 0?gn:"").includes(an)},filterSort:function(an,dn){var gn,Sn;return((gn=an==null?void 0:an[He.label||"label"])!==null&&gn!==void 0?gn:"").toLowerCase().localeCompare(((Sn=dn==null?void 0:dn[He.label||"label"])!==null&&Sn!==void 0?Sn:"").toLowerCase())},onChange:function(an){var dn=Ve((0,ae.toArr)(an).map(function(gn){return gn.value}),It||Re,He);["tags","multiple"].includes(Ke)||re.multiple?ke==null||ke(dn):ke==null||ke(dn.shift()||null)},mode:Ke,tagRender:function(an){return(0,t.jsx)(yt.Z,u()(u()({role:"button","aria-label":an.label,closeIcon:(0,t.jsx)(Ne.Z,{role:"button","aria-label":"icon-close-tag"})},an),{},{children:an.label}))},maxTagCount:"responsive"},Lt))},fn=function(re,Me){var Re;return((Re=Me==null?void 0:Me.label)!==null&&Re!==void 0?Re:"").toLowerCase().includes((re||"").toLowerCase())},Xt=(0,se.css)(Vt||(Vt=me()([`
|
|
1052
1052
|
& .ant-select-selection-search-input {
|
|
1053
1053
|
opacity: 0.1 !important;
|
|
1054
1054
|
}
|
|
@@ -2215,7 +2215,7 @@ ctx.element.innerHTML = \`
|
|
|
2215
2215
|
}
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
|
-
`])),$t?"var(--colorBgSettingsHover)":"",Bn?"2px solid var(--colorBorderSettingsHover)":"",wn.themeToken.borderRadiusLG,er==="above"?"0px":"2px",er==="above"?"transform: translateY(-100%);":"",er==="above"?"padding-bottom: 2px;":"",er==="above"?"margin-bottom: -2px;":"")},Xt=function(pt){return"uid"in pt&&"modelClassName"in pt&&!!pt.uid&&!!pt.modelClassName},Zn=(0,nn.observer)(function(ln){var pt,$t=(0,z.Zr)();return(pt=$t.flowSettings)!==null&&pt!==void 0&&pt.enabled?Xt(ln)?(0,n.jsx)(jn,j()({},ln)):(0,n.jsx)(Mn,j()({},ln)):(0,n.jsx)(n.Fragment,{children:ln.children})}),on=function(pt){var $t=(0,g.useRef)(!1),Bn=(0,g.useRef)(null),wn=(0,g.useRef)({x:0,y:0}),er=pt.onDragStart,Jn=pt.onDragEnd,ar=(0,g.useCallback)(function(Or){if(!(!$t.current||!Bn.current)){var $r=Or.clientX-wn.current.x,ro=Or.clientY-wn.current.y,fr=0;switch(Bn.current){case"left":fr=-$r,pt.model.parent.emitter.emit("onResizeLeft",{resizeDistance:fr,model:pt.model});break;case"right":fr=$r,pt.model.parent.emitter.emit("onResizeRight",{resizeDistance:fr,model:pt.model});break;case"bottom":fr=ro,pt.model.parent.emitter.emit("onResizeBottom",{resizeDistance:fr,model:pt.model});break;case"corner":{var An=$r,Et=ro;pt.model.parent.emitter.emit("onResizeCorner",{widthDelta:An,heightDelta:Et,model:pt.model});break}}}},[pt.model]),lr=(0,g.useCallback)(function(){$t.current=!1,Bn.current=null,wn.current={x:0,y:0},document.removeEventListener("mousemove",ar),document.removeEventListener("mouseup",lr),pt.model.parent.emitter.emit("onResizeEnd"),Jn==null||Jn()},[ar,pt.model,Jn]),dr=(0,g.useCallback)(function(Or,$r){Or.preventDefault(),Or.stopPropagation(),$t.current=!0,Bn.current=$r,wn.current={x:Or.clientX,y:Or.clientY},document.addEventListener("mousemove",ar),document.addEventListener("mouseup",lr),er==null||er()},[ar,lr,er]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"resize-handle resize-handle-left",title:"\u62D6\u62FD\u8C03\u8282\u5BBD\u5EA6",onMouseDown:function($r){return dr($r,"left")}}),(0,n.jsx)("div",{className:"resize-handle resize-handle-right",title:"\u62D6\u62FD\u8C03\u8282\u5BBD\u5EA6",onMouseDown:function($r){return dr($r,"right")}})]})},Mn=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.children,Bn=ln.enabled,wn=Bn===void 0?!0:Bn,er=ln.showDeleteButton,Jn=er===void 0?!0:er,ar=ln.showCopyUidButton,lr=ar===void 0?!0:ar,dr=ln.containerStyle,Or=ln.className,$r=ln.showBackground,ro=$r===void 0?!0:$r,fr=ln.showBorder,An=fr===void 0?!0:fr,Et=ln.showTitle,sn=Et===void 0?!1:Et,Fn=ln.showDragHandle,zn=Fn===void 0?!1:Fn,Cn=ln.settingsMenuLevel,qn=ln.extraToolbarItems,tr=ln.toolbarStyle,pr=ln.toolbarPosition,Rr=pr===void 0?"inside":pr,Br=(0,g.useState)(!1),Ar=A()(Br,2),gr=Ar[0],kr=Ar[1],Nr=(0,g.useState)(!1),Vr=A()(Nr,2),io=Vr[0],ao=Vr[1],Yr=(0,g.useRef)(null),Fo=(0,z.Zr)(),Oo=(0,g.useState)({}),Ro=A()(Oo,2),wo=Ro[0],jo=Ro[1],Go=(0,g.useRef)(null),Qo=(0,g.useMemo)(function(){return j()(j()({},tr),wo)},[wo,tr]);(0,g.useEffect)(function(){if(Yr.current){var na=cn(Yr.current);ao(na)}},[$t]),(0,g.useEffect)(function(){if(Yr.current){var na=new MutationObserver(function(){if(Yr.current){var qo=cn(Yr.current);ao(qo)}});return na.observe(Yr.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","role"]}),function(){na.disconnect()}}},[]);var ho=(0,g.useCallback)(function(na){var qo=na.target,Ho=qo.closest("[data-has-float-menu]");Ho&&Ho!==Yr.current?kr(!0):kr(!1)},[]);if(!pt){var Bo=(0,a.xG)(pt||{});return(0,n.jsx)(bt.Z,{message:Bo("Invalid model provided"),type:"error"})}return!wn||!$t?(0,n.jsx)(n.Fragment,{children:$t}):(0,n.jsxs)("div",{ref:Yr,className:"".concat(fn({showBackground:ro,showBorder:An,ctx:pt.context,toolbarPosition:Rr})," ").concat(gr?"hide-parent-menu":""," ").concat(io?"has-button-child":""," ").concat(Or||""),style:dr,"data-has-float-menu":"true",onMouseMove:ho,children:[$t,(0,n.jsxs)("div",{ref:Go,className:"nb-toolbar-container",style:Qo,children:[sn&&pt.title&&(0,n.jsx)("div",{className:"nb-toolbar-container-title",children:(0,n.jsx)("span",{className:"title-tag",children:pt.title})}),(0,n.jsx)("div",{className:"nb-toolbar-container-icons",children:(0,n.jsx)(Vt.Z,{size:3,align:"center",children:mn(pt,Jn,lr,Fo,Cn,qn)})}),zn&&(0,n.jsx)(on,{model:pt,onDragStart:function(){return jo({opacity:1})},onDragEnd:function(){return jo({})}})]})]})},{displayName:"FlowsFloatContextMenuWithModel"}),jn=(0,nn.observer)(function(ln){var pt=ln.uid,$t=ln.modelClassName,Bn=ln.children,wn=ln.enabled,er=wn===void 0?!0:wn,Jn=ln.showDeleteButton,ar=Jn===void 0?!0:Jn,lr=ln.showCopyUidButton,dr=lr===void 0?!0:lr,Or=ln.containerStyle,$r=ln.className,ro=ln.showTitle,fr=ro===void 0?!1:ro,An=ln.settingsMenuLevel,Et=ln.extraToolbarItems,sn=ln.toolbarPosition,Fn=(0,P.ql)(pt,$t),zn=(0,z.Zr)();return Fn?(0,n.jsx)(Mn,{model:Fn,enabled:er,showDeleteButton:ar,showCopyUidButton:dr,containerStyle:Or,className:$r,showTitle:fr,settingsMenuLevel:An,extraToolbarItems:Et,toolbarPosition:sn,children:Bn}):(0,n.jsx)(bt.Z,{message:zn.translate("Model with ID {{uid}} not found",{uid:pt}),type:"error"})},{displayName:"FlowsFloatContextMenuWithModelById"}),Ln=(0,N.observer)(function(ln){var pt=ln.model,$t=ln.showFlowSettings,Bn=ln.flowSettingsVariant,wn=ln.hideRemoveInSettings,er=ln.showTitle,Jn=ln.inputArgs,ar=ln.showErrorFallback,lr=ln.settingsMenuLevel,dr=ln.extraToolbarItems,Or=ln.fallback,$r=(0,P.Vy)(pt,Jn,{throwOnError:!1}),ro=$r.loading,fr=$r.error;return(0,a.Qs)(pt,fr||null),ro?(0,n.jsx)(n.Fragment,{children:Or}):(0,n.jsx)(P.Bu,{model:pt,children:(0,n.jsx)(Tn,{model:pt,showFlowSettings:$t,flowSettingsVariant:Bn,hideRemoveInSettings:wn,showTitle:er,showErrorFallback:ar,settingsMenuLevel:lr,extraToolbarItems:dr})})}),Tn=(0,N.observer)(function(ln){var pt=ln.model,$t=ln.showFlowSettings,Bn=ln.flowSettingsVariant,wn=ln.hideRemoveInSettings,er=ln.showTitle,Jn=ln.showErrorFallback,ar=ln.settingsMenuLevel,lr=ln.extraToolbarItems,dr=function(ro){return Jn?(0,n.jsx)(st.SV,{FallbackComponent:Be,children:ro}):ro},Or=function(){var ro=(0,a.Zx)(pt);if(ro)throw ro;var fr=pt.render();return typeof fr=="function"?g.createElement(fr):(0,n.jsx)(n.Fragment,{children:fr})};if(!$t)return dr((0,n.jsx)(Or,{}));switch(Bn){case"dropdown":return(0,n.jsx)(Zn,{showTitle:er,model:pt,showDeleteButton:!wn,showBackground:d().isObject($t)?$t.showBackground:void 0,showBorder:d().isObject($t)?$t.showBorder:void 0,showDragHandle:d().isObject($t)?$t.showDragHandle:void 0,settingsMenuLevel:ar,extraToolbarItems:lr,toolbarStyle:d().isObject($t)?$t.style:void 0,toolbarPosition:d().isObject($t)?$t.toolbarPosition:void 0,children:dr((0,n.jsx)(Or,{}))});case"contextMenu":return(0,n.jsx)(Ve,{model:pt,showDeleteButton:!wn,children:dr((0,n.jsx)(Or,{}))});case"modal":return console.warn("FlowModelRenderer: modal variant is not implemented yet"),dr((0,n.jsx)(Or,{}));case"drawer":return console.warn("FlowModelRenderer: drawer variant is not implemented yet"),dr((0,n.jsx)(Or,{}));default:return console.warn("FlowModelRenderer: Unknown flowSettingsVariant '".concat(Bn,"', falling back to dropdown")),(0,n.jsx)(Zn,{showTitle:er,model:pt,showDeleteButton:!wn,showBackground:d().isObject($t)?$t.showBackground:void 0,showBorder:d().isObject($t)?$t.showBorder:void 0,showDragHandle:d().isObject($t)?$t.showDragHandle:void 0,settingsMenuLevel:ar,extraToolbarItems:lr,toolbarStyle:d().isObject($t)?$t.style:void 0,toolbarPosition:d().isObject($t)?$t.toolbarPosition:void 0,children:dr((0,n.jsx)(Or,{}))})}},{displayName:"FlowModelRendererCore"}),Gn=(0,N.observer)(function(ln){var pt=ln.model,$t=ln.fallback,Bn=$t===void 0?(0,n.jsx)(Ne.Z.Button,{size:"small"}):$t,wn=ln.showFlowSettings,er=wn===void 0?!1:wn,Jn=ln.flowSettingsVariant,ar=Jn===void 0?"dropdown":Jn,lr=ln.hideRemoveInSettings,dr=lr===void 0?!1:lr,Or=ln.showTitle,$r=Or===void 0?!1:Or,ro=ln.inputArgs,fr=ln.showErrorFallback,An=fr===void 0?!0:fr,Et=ln.settingsMenuLevel,sn=ln.extraToolbarItems;if(!pt||typeof pt.render!="function")return console.warn("FlowModelRenderer: Invalid model or render method not found.",pt),null;var Fn=(0,n.jsx)(Ln,{model:pt,showFlowSettings:er,flowSettingsVariant:ar,hideRemoveInSettings:dr,showTitle:$r,inputArgs:ro,showErrorFallback:An,settingsMenuLevel:Et,extraToolbarItems:sn,fallback:Bn});return An?(0,n.jsx)(P.Bu,{model:pt,children:(0,n.jsx)(st.SV,{FallbackComponent:Be,children:Fn})}):Fn}),Yn=g.memo(Gn);Yn.displayName="MemoFlowModelRenderer";var _n=e(22150),Kt=["children","showLabel","labelWidth"],zt=["colon","dependencies","extra","getValueFromEvent","getValueProps","hasFeedback","help","htmlFor","initialValue","label","labelAlign","labelCol","messageVariables","name","normalize","noStyle","preserve","rules","tooltip","trigger","validateStatus","validateTrigger","valuePropName","wrapperCol","labelWidth","labelWrap","layout","required","showLabel"],Yt=function(pt){var $t=pt.children,Bn=pt.showLabel,wn=Bn===void 0?!0:Bn,er=pt.labelWidth,Jn=K()(pt,Kt),ar=Object.fromEntries(Object.entries(Jn).filter(function(sn){var Fn=A()(sn,1),zn=Fn[0];return!zt.includes(zn)})),lr=typeof $t=="function"?$t:g.Children.map($t,function(sn){return g.isValidElement(sn)?g.cloneElement(sn,j()({},ar)):sn}),dr=Jn.label,Or=Jn.labelWrap,$r=Jn.colon,ro=$r===void 0?!0:$r,fr=Jn.layout,An=!fr||fr==="vertical"?!0:Or,Et=function(){return wn?An?(0,n.jsxs)("div",{style:{width:"100%",whiteSpace:"normal",wordBreak:"break-word",display:"flex",alignItems:"center",justifyContent:"flex-start",fontWeight:600},children:[(0,n.jsx)("span",{style:{flex:1},children:dr}),ro&&(0,n.jsx)("span",{style:{marginLeft:4,flexShrink:0},children:":"})]}):(0,n.jsx)(ge.Z,{title:dr,children:(0,n.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",maxWidth:(typeof er=="number"?er:120)-20,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"middle",fontWeight:600},children:[(0,n.jsx)("span",{style:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis"},children:dr}),ro&&(0,n.jsx)("span",{style:{marginLeft:4,flexShrink:0},children:":"})]})}):null};return(0,n.jsx)(_n.Z.Item,j()(j()({},Jn),{},{labelCol:{style:{width:er}},layout:fr,label:Et(),colon:!1,extra:Jn.extra&&(0,n.jsx)("span",{style:{whiteSpace:"pre-wrap"},children:Jn.extra}),tooltip:{title:Jn.tooltip,overlayInnerStyle:{whiteSpace:"pre-line"}},children:lr}))},Dn=e(42922),yn=["uid","modelClassName"],xn=["model"],En=function(pt){return"uid"in pt&&"modelClassName"in pt&&!!pt.uid&&!!pt.modelClassName},Pn=function(pt){if(En(pt)){var $t=pt.uid,Bn=pt.modelClassName,wn=K()(pt,yn);return(0,n.jsx)(vr,j()({uid:$t,modelClassName:Bn},wn))}else{var er=pt.model,Jn=K()(pt,xn);return(0,n.jsx)(Wn,j()({model:er},Jn))}},Wn=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.text,Bn=$t===void 0?"\u6D41\u7A0B\u914D\u7F6E":$t,wn=ln.icon,er=wn===void 0?(0,n.jsx)(Gt.Z,{}):wn,Jn=ln.size,ar=Jn===void 0?"middle":Jn,lr=ln.type,dr=lr===void 0?"default":lr,Or=ln.disabled,$r=Or===void 0?!1:Or,ro=ln.showDropdownIcon,fr=ro===void 0?!0:ro,An=ln.onClick,Et=ln.style,sn=ln.className,Fn=function(){An==null||An()},zn=(0,g.useCallback)(function(Br){var Ar=Br.key,gr=Ar.split(":"),kr=A()(gr,2),Nr=kr[0],Vr=kr[1];try{pt.openFlowSettings({flowKey:Nr,stepKey:Vr})}catch(io){console.log("\u914D\u7F6E\u5F39\u7A97\u5DF2\u53D6\u6D88\u6216\u51FA\u9519:",io)}},[pt]);if(!pt)return(0,n.jsx)(bt.Z,{message:"\u63D0\u4F9B\u7684\u6A21\u578B\u65E0\u6548",type:"error"});var Cn=(0,g.useCallback)(function(){try{var Br=pt.getFlows(),Ar=Array.from(Br.values());return Ar.map(function(gr){var kr=Object.entries(gr.steps).map(function(Nr){var Vr=A()(Nr,2),io=Vr[0],ao=Vr[1],Yr=ao;if(Yr.hideInSettings)return null;var Fo=Yr.uiSchema||{},Oo={};if(Yr.use){var Ro,wo,jo=(Ro=pt.flowEngine)===null||Ro===void 0||(wo=Ro.getAction)===null||wo===void 0?void 0:wo.call(Ro,Yr.use);jo&&jo.uiSchema&&(Oo=jo.uiSchema)}var Go=j()({},Oo);return Object.entries(Fo).forEach(function(Qo){var ho=A()(Qo,2),Bo=ho[0],na=ho[1];Go[Bo]?Go[Bo]=j()(j()({},Go[Bo]),na):Go[Bo]=na}),Object.keys(Go).length===0?null:{stepKey:io,step:Yr,uiSchema:Go,title:Yr.title||io}}).filter(Boolean);return kr.length>0?{flow:gr,steps:kr}:null}).filter(Boolean)}catch(gr){return console.warn("[FlowsDropdownButton] \u83B7\u53D6\u53EF\u914D\u7F6Eflows\u5931\u8D25:",gr),[]}},[pt]),qn=Cn(),tr=function(){var Ar=[];return qn.forEach(function(gr){var kr=gr.flow,Nr=gr.steps;Ar.push({key:"flow-group-".concat(kr.key),label:kr.title||kr.key,type:"group"}),Nr.forEach(function(Vr){Ar.push({key:"".concat(kr.key,":").concat(Vr.stepKey),icon:(0,n.jsx)(Gt.Z,{}),label:Vr.title})})}),Ar},pr=tr(),Rr=(0,n.jsx)(f.ZP,{type:dr,size:ar,disabled:$r,icon:er,onClick:Fn,style:Et,className:sn,children:(0,n.jsxs)(Vt.Z,{children:[Bn,fr&&(0,n.jsx)(Dn.Z,{})]})});return qn.length===0?Rr:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Qe.Z,{menu:{items:pr,onClick:zn},trigger:["click"],placement:"bottomRight",children:Rr})})}),vr=(0,nn.observer)(function(ln){var pt=ln.uid,$t=ln.modelClassName,Bn=ln.text,wn=Bn===void 0?"\u6D41\u7A0B\u914D\u7F6E":Bn,er=ln.icon,Jn=er===void 0?(0,n.jsx)(Gt.Z,{}):er,ar=ln.size,lr=ar===void 0?"middle":ar,dr=ln.type,Or=dr===void 0?"default":dr,$r=ln.disabled,ro=$r===void 0?!1:$r,fr=ln.showDropdownIcon,An=fr===void 0?!0:fr,Et=ln.onClick,sn=ln.style,Fn=ln.className,zn=(0,P.ql)(pt,$t);return zn?(0,n.jsx)(Wn,{model:zn,text:wn,icon:Jn,size:lr,type:Or,disabled:ro,showDropdownIcon:An,onClick:Et,style:sn,className:Fn}):(0,n.jsx)(bt.Z,{message:"\u672A\u627E\u5230ID\u4E3A ".concat(pt," \u7684\u6A21\u578B"),type:"error"})}),pn=e(52677),Rt=e.n(pn),Ae=e(34041),mt=e(37720),ft=e(59637),nt=e(25278),lt=_n.Z.Item,Ut=function(pt){return"uid"in pt&&"modelClassName"in pt&&!!pt.uid&&!!pt.modelClassName},vn=function(pt){return Ut(pt)?(0,n.jsx)(Nn,j()({},pt)):(0,n.jsx)(qt,j()({},pt))},qt=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.flowKey;return pt?(0,n.jsx)($n,{model:pt,flowKey:$t}):(0,n.jsx)(bt.Z,{message:"\u63D0\u4F9B\u7684\u6A21\u578B\u65E0\u6548",type:"error"})}),Nn=(0,nn.observer)(function(ln){var pt=ln.uid,$t=ln.flowKey,Bn=ln.modelClassName,wn=(0,P.ql)(pt,Bn);return wn?(0,n.jsx)($n,{model:wn,flowKey:$t}):(0,n.jsx)(bt.Z,{message:"\u672A\u627E\u5230ID\u4E3A ".concat(pt," \u7684\u6A21\u578B"),type:"error"})}),$n=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.flowKey,Bn=_n.Z.useForm(),wn=A()(Bn,1),er=wn[0],Jn=pt.getFlows(),ar=Jn.get($t),lr=Object.entries((ar==null?void 0:ar.steps)||{}).map(function(ro){var fr=A()(ro,2),An=fr[0],Et=fr[1];if(Et.hideInSettings)return null;var sn=Et.uiSchema||{},Fn={};if(Et.use){var zn,Cn,qn=(zn=pt.flowEngine)===null||zn===void 0||(Cn=zn.getAction)===null||Cn===void 0?void 0:Cn.call(zn,Et.use);qn&&qn.uiSchema&&(Fn=qn.uiSchema)}var tr=j()({},Fn);return Object.entries(sn).forEach(function(pr){var Rr=A()(pr,2),Br=Rr[0],Ar=Rr[1];tr[Br]?tr[Br]=j()(j()({},tr[Br]),Ar):tr[Br]=Ar}),Object.keys(tr).length===0?null:{stepKey:An,step:Et,uiSchema:tr}}).filter(Boolean),dr=(0,g.useCallback)(H()(ce()().mark(function ro(){var fr,An,Et,sn,Fn,zn,Cn,qn,tr,pr,Rr;return ce()().wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:fr={},An=$e()(lr),Ar.prev=2,An.s();case 4:if((Et=An.n()).done){Ar.next=17;break}return sn=Et.value,Fn=sn.stepKey,zn=sn.step,Cn=pt.getStepParams($t,Fn)||{},qn=new it.P$(pt,$t,"settings"),tr=pt.getFlow($t),(0,a.ZQ)(qn,(tr==null?void 0:tr.steps)||{},pt,$t),Ar.next=12,(0,a.nw)(zn.defaultParams,qn);case 12:pr=Ar.sent,Rr=j()(j()({},pr),Cn),Object.keys(Rr).length>0&&(fr[Fn]=Rr);case 15:Ar.next=4;break;case 17:Ar.next=22;break;case 19:Ar.prev=19,Ar.t0=Ar.catch(2),An.e(Ar.t0);case 22:return Ar.prev=22,An.f(),Ar.finish(22);case 25:return Ar.abrupt("return",fr);case 26:case"end":return Ar.stop()}},ro,null,[[2,19,22,25]])})),[pt,$t,lr]);(0,g.useEffect)(function(){var ro=function(){var fr=H()(ce()().mark(function An(){var Et;return ce()().wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Fn.prev=0,Fn.next=3,dr();case 3:Et=Fn.sent,er.setFieldsValue(Et),Fn.next=10;break;case 7:Fn.prev=7,Fn.t0=Fn.catch(0),console.error("Error loading default params:",Fn.t0);case 10:case"end":return Fn.stop()}},An,null,[[0,7]])}));return function(){return fr.apply(this,arguments)}}();ro()},[$t,er,dr]);var Or=(0,g.useCallback)(function(ro,fr){Object.entries(fr).forEach(function(An){var Et=A()(An,2),sn=Et[0],Fn=Et[1];Fn&&Rt()(Fn)==="object"&&pt.setStepParams($t,sn,Fn)})},[pt,$t]);if(!ar)return(0,n.jsx)(bt.Z,{message:"\u672A\u627E\u5230Key\u4E3A ".concat($t," \u7684\u6D41\u7A0B"),type:"error"});if(lr.length===0)return(0,n.jsx)(bt.Z,{message:"\u6B64\u6D41\u7A0B\u6CA1\u6709\u53EF\u914D\u7F6E\u7684\u53C2\u6570",type:"info"});var $r=function(){return lr.map(function(fr){var An=fr.stepKey,Et=fr.uiSchema;return Object.entries(Et).map(function(sn){var Fn=A()(sn,2),zn=Fn[0],Cn=Fn[1],qn="".concat(An,".").concat(zn),tr=function(){var Rr,Br,Ar,gr;switch(Cn["x-component"]){case"Select":return(0,n.jsx)(Ae.default,j()({placeholder:((Rr=Cn["x-component-props"])===null||Rr===void 0?void 0:Rr.placeholder)||"\u8BF7\u9009\u62E9".concat(Cn.title),options:Cn.enum||[]},Cn["x-component-props"]||{}));case"InputNumber":return(0,n.jsx)(mt.Z,j()({placeholder:((Br=Cn["x-component-props"])===null||Br===void 0?void 0:Br.placeholder)||"\u8BF7\u8F93\u5165".concat(Cn.title)},Cn["x-component-props"]||{}));case"Switch":return(0,n.jsx)(ft.Z,j()({},Cn["x-component-props"]||{}));case"Input.TextArea":return(0,n.jsx)(nt.Z.TextArea,j()({placeholder:((Ar=Cn["x-component-props"])===null||Ar===void 0?void 0:Ar.placeholder)||"\u8BF7\u8F93\u5165".concat(Cn.title)},Cn["x-component-props"]||{}));default:return(0,n.jsx)(nt.Z,j()({placeholder:((gr=Cn["x-component-props"])===null||gr===void 0?void 0:gr.placeholder)||"\u8BF7\u8F93\u5165".concat(Cn.title)},Cn["x-component-props"]||{}))}};return(0,n.jsx)(_n.Z.Item,{name:[An,zn],label:Cn.title||zn,rules:Cn.required?[{required:!0,message:"\u8BF7\u8F93\u5165".concat(Cn.title||zn)}]:[],children:tr()},qn)})})};return(0,n.jsx)(_n.Z,{form:er,layout:"vertical",onValuesChange:Or,children:$r()})}),sr=e(69234),Qt=e(32983),Ft=e(4393),Te=sr.Z.Panel,Se=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.expandAll,Bn=$t===void 0?!1:$t,wn=pt.getFlows(),er=Array.from(wn.values()).filter(function(lr){var dr=Object.entries(lr.steps).map(function(Or){var $r=A()(Or,2),ro=$r[0],fr=$r[1];if(fr.hideInSettings)return null;var An=fr.uiSchema||{},Et={};if(fr.use){var sn,Fn,zn=(sn=pt.flowEngine)===null||sn===void 0||(Fn=sn.getAction)===null||Fn===void 0?void 0:Fn.call(sn,fr.use);zn&&zn.uiSchema&&(Et=zn.uiSchema)}var Cn=j()({},Et);return Object.entries(An).forEach(function(qn){var tr=A()(qn,2),pr=tr[0],Rr=tr[1];Cn[pr]?Cn[pr]=j()(j()({},Cn[pr]),Rr):Cn[pr]=Rr}),Object.keys(Cn).length===0?null:{stepKey:ro,step:fr,uiSchema:Cn}}).filter(Boolean);return dr.length>0}),Jn=er.map(function(lr){return lr.key});if(Jn.length===0)return(0,n.jsx)(Qt.Z,{description:"\u6CA1\u6709\u53EF\u7528\u7684\u6D41\u7A0B"});var ar=Bn?Jn:void 0;return(0,n.jsx)(Ft.Z,{title:"Flows\u8BBE\u7F6E",children:(0,n.jsx)(sr.Z,{defaultActiveKey:ar,children:Jn.map(function(lr){var dr;return(0,n.jsx)(Te,{header:((dr=wn.get(lr))===null||dr===void 0?void 0:dr.title)||lr,children:(0,n.jsx)(vn,{model:pt,flowKey:lr})},lr)})})})}),Le=Se,dt=function(pt){return"uid"in pt&&"modelClassName"in pt&&!!pt.uid&&!!pt.modelClassName},xt=function(pt){return dt(pt)?(0,n.jsx)(wt,j()({},pt)):(0,n.jsx)(St,j()({},pt))},St=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.expandAll,Bn=$t===void 0?!1:$t,wn=ln.children;if(!pt)return(0,n.jsx)(bt.Z,{message:"\u63D0\u4F9B\u7684\u6A21\u578B\u65E0\u6548",type:"error"});var er=(0,n.jsx)(Le,{model:pt,expandAll:Bn});return wn?(0,n.jsxs)("div",{children:[er,wn]}):er}),wt=(0,nn.observer)(function(ln){var pt=ln.uid,$t=ln.modelClassName,Bn=ln.expandAll,wn=Bn===void 0?!1:Bn,er=ln.children,Jn=(0,P.ql)(pt,$t);if(!Jn)return(0,n.jsx)(bt.Z,{message:"\u672A\u627E\u5230ID\u4E3A ".concat(pt," \u7684\u6A21\u578B"),type:"error"});var ar=(0,n.jsx)(Le,{model:Jn,expandAll:wn});return er?(0,n.jsxs)("div",{children:[ar,er]}):ar}),In=["drawerWidth","drawerTitle","cleanup"],kn=function(){var ln=H()(ce()().mark(function pt($t){var Bn,wn,er,Jn;return ce()().wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return Bn=$t.drawerWidth,wn=$t.drawerTitle,er=$t.cleanup,Jn=K()($t,In),lr.abrupt("return",(0,tt.d)(j()(j()({},Jn),{},{mode:"drawer",dialogWidth:Bn,dialogTitle:wn,cleanup:er})));case 2:case"end":return lr.stop()}},pt)}));return function($t){return ln.apply(this,arguments)}}(),or=e(45360),Xn=function(){var ln=H()(ce()().mark(function pt($t){var Bn,wn,er,Jn,ar,lr,dr,Or,$r,ro,fr,An,Et,sn,Fn,zn;return ce()().wrap(function(qn){for(;;)switch(qn.prev=qn.next){case 0:if(wn=$t.model,er=$t.flowKey,Jn=$t.stepKey,ar=$t.width,lr=ar===void 0?600:ar,dr=$t.title,Or=(0,a.xG)(wn),$r=wn.getFlow(er),ro=$r==null||(Bn=$r.steps)===null||Bn===void 0?void 0:Bn[Jn],$r){qn.next=7;break}throw or.ZP.error(Or("Flow with key {{flowKey}} not found",{flowKey:er})),new Error(Or("Flow with key {{flowKey}} not found",{flowKey:er}));case 7:if(ro){qn.next=10;break}throw or.ZP.error(Or("Step with key {{stepKey}} not found",{stepKey:Jn})),new Error(Or("Step with key {{stepKey}} not found",{stepKey:Jn}));case 10:return fr=new it.P$(wn,er,"settings"),(0,a.ZQ)(fr,$r.steps,wn,er),fr.defineProperty("currentStep",{value:ro}),qn.next=15,(0,a.hj)(ro.uiMode,fr);case 15:if(An=qn.sent,sn={},typeof An=="string"?Et=An:Rt()(An)==="object"?(Et=An.type||"dialog",sn=(0,o.model)(An.props||{}),zn=(0,o.autorun)(function(){(0,a.hj)(ro.uiMode,fr).then(function(tr){Rt()(tr)==="object"&&Object.assign(sn,tr.props||{})}).catch(function(tr){console.warn("Error resolving uiMode:",tr)})}),Fn=function(){zn()}):Et="dialog",Et!=="drawer"){qn.next=22;break}return qn.abrupt("return",kn({model:wn,flowKey:er,stepKey:Jn,drawerWidth:lr,drawerTitle:dr,ctx:fr,uiModeProps:sn,cleanup:Fn}));case 22:return qn.abrupt("return",(0,tt.d)({model:wn,flowKey:er,stepKey:Jn,dialogWidth:lr,dialogTitle:dr,ctx:fr,uiModeProps:sn,cleanup:Fn}));case 23:case"end":return qn.stop()}},pt)}));return function($t){return ln.apply(this,arguments)}}(),nr=e(3277),Er=e(74330),Fr,Ur=["visible"],br=["menu"],Jr=["items","keepDropdownOpen","persistKey","stateVersion","refreshKeys"],mr=function(){return(0,g.useMemo)(function(){var pt=Math.min(window.innerHeight*.6,400);return pt},[])},Wr=function(pt,$t,Bn,wn,er){var Jn=(0,g.useState)({}),ar=A()(Jn,2),lr=ar[0],dr=ar[1],Or=(0,g.useState)(new Set),$r=A()(Or,2),ro=$r[0],fr=$r[1],An=(0,g.useRef)(null),Et=(0,g.useCallback)(function(){var Fn=H()(ce()().mark(function zn(Cn,qn){var tr,pr,Rr,Br=arguments;return ce()().wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:if(tr=Br.length>2&&Br[2]!==void 0?Br[2]:!1,!ro.has(Cn)){gr.next=3;break}return gr.abrupt("return");case 3:if(!(!tr&&lr[Cn])){gr.next=5;break}return gr.abrupt("return");case 5:if(fr(function(kr){return new Set(kr).add(Cn)}),gr.prev=6,pr=qn(),!(pr instanceof Promise)){gr.next=14;break}return gr.next=11,pr;case 11:gr.t0=gr.sent,gr.next=15;break;case 14:gr.t0=pr;case 15:Rr=gr.t0,dr(function(kr){return j()(j()({},kr),{},v()({},Cn,Rr))}),gr.next=22;break;case 19:gr.prev=19,gr.t1=gr.catch(6),console.error("Failed to load children for ".concat(Cn),gr.t1);case 22:return gr.prev=22,fr(function(kr){var Nr=new Set(kr);return Nr.delete(Cn),Nr}),gr.finish(22);case 25:case"end":return gr.stop()}},zn,null,[[6,19,22,25]])}));return function(zn,Cn){return Fn.apply(this,arguments)}}(),[lr,ro]),sn=function(zn,Cn){var qn=[],tr=function kr(Nr){var Vr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],io=$e()(Nr),ao;try{for(io.s();!(ao=io.n()).done;){var Yr=ao.value,Fo=zr(Vr,Yr.key);typeof Yr.children=="function"&&qn.push([Fo,Yr.children]),Array.isArray(Yr.children)&&kr(Yr.children,[].concat(I()(Vr),[Yr.key]))}}catch(Oo){io.e(Oo)}finally{io.f()}};tr(zn,[]);for(var pr=0,Rr=Object.keys(Cn);pr<Rr.length;pr++){var Br=Rr[pr],Ar=Cn[Br]||[],gr=Br?Br.split("/"):[];tr(Ar,gr)}return qn};return(0,g.useEffect)(function(){if(pt&&An.current!==Bn){An.current=Bn;var Fn=new Map,zn=$e()(sn($t,lr)),Cn;try{for(zn.s();!(Cn=zn.n()).done;){var qn=A()(Cn.value,2),tr=qn[0],pr=qn[1];Fn.set(tr,pr)}}catch(jo){zn.e(jo)}finally{zn.f()}var Rr=wn?Array.from(wn):[],Br=[],Ar=Array.from(new Set(I()(er||[]).filter(Boolean)));if(Ar.length>0){var gr=$e()(Ar),kr;try{for(gr.s();!(kr=gr.n()).done;)for(var Nr=kr.value,Vr=Nr.split("/").filter(Boolean),io=1;io<=Vr.length;io++){var ao=Vr.slice(0,io).join("/");!Br.includes(ao)&&lr[ao]&&Br.push(ao)}}catch(jo){gr.e(jo)}finally{gr.f()}}else Br=Object.keys(lr).filter(function(jo){return Rr.some(function(Go){return jo===Go||jo.startsWith(Go+"/")})});Br.length===0&&(Br=Object.keys(lr).filter(function(jo){return jo.indexOf("/")===-1}));var Yr=new Set,Fo=$e()(Br),Oo;try{for(Fo.s();!(Oo=Fo.n()).done;){var Ro=Oo.value,wo=Fn.get(Ro);if(wo)try{Yr.has(Ro)||(Yr.add(Ro),Et(Ro,wo,!0))}catch{}}}catch(jo){Fo.e(jo)}finally{Fo.f()}}},[pt,Bn,$t,Et,lr,wn,er]),{loadedChildren:lr,loadingKeys:ro,handleLoadChildren:Et}},Lr=function(){var pt=(0,g.useRef)(!1),$t=(0,g.useState)(!1),Bn=A()($t,2),wn=Bn[0],er=Bn[1],Jn=(0,g.useRef)(null),ar=(0,g.useCallback)(function(){pt.current=!0,er(!0),Jn.current&&clearTimeout(Jn.current),Jn.current=setTimeout(function(){pt.current=!1,er(!1),Jn.current=null},250)},[]);(0,g.useEffect)(function(){return function(){return Jn.current&&clearTimeout(Jn.current)}},[]);var lr=(0,g.useCallback)(function(){return pt.current||wn},[wn]);return{requestKeepOpen:ar,shouldPreventClose:lr}},eo=function(){var pt=(0,g.useState)({}),$t=A()(pt,2),Bn=$t[0],wn=$t[1],er=(0,g.useState)(!1),Jn=A()(er,2),ar=Jn[0],lr=Jn[1],dr=(0,g.useRef)(null),Or=function(ro,fr){lr(!0),wn(function(An){return j()(j()({},An),{},v()({},ro,fr))}),dr.current&&clearTimeout(dr.current),dr.current=setTimeout(function(){return lr(!1)},300)};return(0,g.useEffect)(function(){return function(){dr.current&&clearTimeout(dr.current)}},[]),{searchValues:Bn,isSearching:ar,updateSearchValue:Or}},fo=function(pt,$t){(0,g.useEffect)(function(){if(!(!pt||$t<=0)){var Bn=new MutationObserver(function(er){er.forEach(function(Jn){Jn.addedNodes.forEach(function(ar){if(ar.nodeType===Node.ELEMENT_NODE){var lr,dr=ar;(lr=dr.classList)!==null&&lr!==void 0&&lr.contains("ant-dropdown-menu-submenu-popup")&&requestAnimationFrame(function(){var Or=dr.querySelector(".ant-dropdown-menu");if(Or){var $r=Or;$r.style.maxHeight="".concat($t,"px"),$r.style.overflowY="auto"}})}})})});Bn.observe(document.body,{childList:!0,subtree:!1});var wn=setInterval(function(){var er=document.querySelectorAll(".ant-dropdown-menu-submenu-popup .ant-dropdown-menu");er.forEach(function(Jn){var ar=Jn,lr=ar.getBoundingClientRect();lr.width>0&&lr.height>0&&(ar.style.maxHeight="".concat($t,"px"),ar.style.overflowY="auto")})},200);return function(){Bn.disconnect(),clearInterval(wn)}}},[pt,$t])},Lo=function(pt){var $t=(0,g.useRef)(null),Bn=pt.visible,wn=K()(pt,Ur);return(0,g.useEffect)(function(){if($t.current&&Bn){var er,Jn=$t.current.input||((er=$t.current.resizableTextArea)===null||er===void 0?void 0:er.textArea)||$t.current;try{var ar;Jn==null||(ar=Jn.focus)===null||ar===void 0||ar.call(Jn,{preventScroll:!0})}catch{var lr;Jn==null||(lr=Jn.focus)===null||lr===void 0||lr.call(Jn)}}},[Bn]),(0,n.jsx)(nt.Z,j()({ref:$t},wn))},zr=function(pt,$t){return[].concat(I()(pt),[$t]).join("/")},Ao=function(pt,$t,Bn,wn,er,Jn){return{key:"".concat($t,"-search"),type:"group",label:(0,n.jsx)("div",{children:(0,n.jsx)(Lo,{visible:wn,variant:"borderless",allowClear:!0,placeholder:er(pt.searchPlaceholder||"Search"),value:Bn,onChange:function(lr){lr.stopPropagation(),Jn($t,lr.target.value)},onClick:function(lr){return lr.stopPropagation()},onMouseDown:function(lr){lr.stopPropagation()},size:"small",style:{width:"100%",paddingLeft:0,paddingRight:0}})})}},vo=function(pt,$t){return{key:"".concat(pt,"-empty"),label:(0,n.jsx)("div",{style:{padding:"16px",textAlign:"center"},children:(0,n.jsx)(Qt.Z,{image:Qt.Z.PRESENTED_IMAGE_SIMPLE,description:$t("No data"),style:{margin:0}})}),disabled:!0}},lo=350,Do=new Map,Zo=function(pt){var $t=pt.menu,Bn=K()(pt,br),wn=(0,z.Zr)(),er=(0,g.useState)(!1),Jn=A()(er,2),ar=Jn[0],lr=Jn[1],dr=(0,g.useState)(new Set),Or=A()(dr,2),$r=Or[0],ro=Or[1],fr=(0,g.useState)([]),An=A()(fr,2),Et=An[0],sn=An[1],Fn=(0,g.useState)(!1),zn=A()(Fn,2),Cn=zn[0],qn=zn[1],tr=mr(),pr=wn.translate.bind(wn),Rr=$t.items,Br=$t.keepDropdownOpen,Ar=$t.persistKey,gr=$t.stateVersion,kr=$t.refreshKeys,Nr=K()($t,Jr),Vr=Wr(ar,Et,gr,$r,kr),io=Vr.loadedChildren,ao=Vr.loadingKeys,Yr=Vr.handleLoadChildren,Fo=eo(),Oo=Fo.searchValues,Ro=Fo.isSearching,wo=Fo.updateSearchValue,jo=Lr(),Go=jo.requestKeepOpen,Qo=jo.shouldPreventClose;fo(ar,tr),(0,g.useEffect)(function(){if(Ar){var qo=Do.get(Ar)||0;qo>Date.now()&&lr(!0)}},[Ar]),(0,g.useEffect)(function(){return function(){if(Ar&&ar){var qo=Date.now()+lo;Do.set(Ar,qo),setTimeout(function(){var Ho=Do.get(Ar)||0;Ho<=Date.now()&&Do.delete(Ar)},lo+100)}}},[Ar,ar]),(0,g.useEffect)(function(){var qo=function(){var Ho=H()(ce()().mark(function ha(){var la,Yo;return ce()().wrap(function(ma){for(;;)switch(ma.prev=ma.next){case 0:if(typeof Rr!="function"){ma.next=17;break}if(qn(!0),ma.prev=2,Yo=Rr(),!(Yo instanceof Promise)){ma.next=10;break}return ma.next=7,Yo;case 7:ma.t0=ma.sent,ma.next=11;break;case 10:ma.t0=Yo;case 11:la=ma.t0;case 12:return ma.prev=12,qn(!1),ma.finish(12);case 15:ma.next=18;break;case 17:la=Rr;case 18:sn(la);case 19:case"end":return ma.stop()}},ha,null,[[2,,12,15]])}));return function(){return Ho.apply(this,arguments)}}();ar&&qo()},[ar,gr,Rr]);function ho(qo,Ho,ha,la,Yo,Ea){var ma=ha,Fa=Oo[ma]||"",ai=Fa?function Ja(Ha){var qa=Fa.toLowerCase(),Oa=function(ii){return ii?typeof ii=="string"?ii:String(ii):""};return Ha.map(function(Ya){var ii=Oa(Ya.label).toLowerCase(),_i=ii.includes(qa)||Ya.key&&String(Ya.key).toLowerCase().includes(qa);if(Ya.type==="group"&&Array.isArray(Ya.children)){var Fi=Ja(Ya.children);return _i||Fi.length>0?j()(j()({},Ya),{},{children:Fi}):null}return _i?Ya:null}).filter(Boolean)}(qo):qo,Ta=Ea(ai,[].concat(I()(la),[Ho.key])),wa=Ao(Ho,ma,Fa,Yo,pr,wo),ui={key:"".concat(ha,"-search-divider"),type:"divider"};return Fa&&Ta.length===0?[wa,ui,vo(ha,pr)]:[wa,ui].concat(I()(Ta))}var Bo=function qo(Ho){var ha=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Ho.map(function(la){var Yo=zr(ha,la.key),Ea=la.type==="group",ma=typeof la.children=="function",Fa=ao.has(Yo),ai=io[Yo],Ta=!Ea&&ar&&$r.has(Yo)&&ma&&!ai&&!Fa;Ta&&Yr(Yo,la.children);var wa;if(ma?wa=ai??[]:Array.isArray(la.children)&&(wa=la.children),ma&&!ai&&(wa=[{key:"".concat(Yo,"-loading"),label:(0,n.jsx)(Er.Z,{size:"small"}),disabled:!0}]),Ea){ma&&!ai&&ar&&Yr(Yo,la.children);var ui=wa?qo(wa,[].concat(I()(ha),[la.key])):[];return la.searchable&&wa&&(ui=ho(wa,la,Yo,ha,ar,qo)),{type:"group",key:Yo,label:typeof la.label=="string"?pr(la.label):la.label,children:ui}}return la.type==="divider"?{type:"divider",key:Yo}:la.searchable&&wa?{key:la.key,label:typeof la.label=="string"?pr(la.label):la.label,onClick:function(Ha){},onMouseEnter:function(){ro(function(Ha){if(Ha.has(Yo))return Ha;var qa=new Set(Ha);return qa.add(Yo),qa})},children:ho(wa,la,Yo,ha,ar,qo)}:{key:Yo,label:typeof la.label=="string"?pr(la.label):la.label,onClick:function(Ha){var qa,Oa,Ya;if(!wa){var ii=(qa=(Oa=la.keepDropdownOpen)!==null&&Oa!==void 0?Oa:Br)!==null&&qa!==void 0?qa:!1;ii&&Go();var _i=j()(j()({},Ha),{},{item:Ha.item||la,originalItem:la,keepDropdownOpen:ii});(Ya=$t.onClick)===null||Ya===void 0||Ya.call($t,_i)}},onMouseEnter:function(){ro(function(Ha){if(Ha.has(Yo))return Ha;var qa=new Set(Ha);return qa.add(Yo),qa})},children:wa&&wa.length>0?qo(wa,[].concat(I()(ha),[la.key])):wa&&wa.length===0?[vo(Yo,pr)]:void 0}})},na=(0,g.useMemo)(function(){return(0,Ot.css)(Fr||(Fr=ht()([`
|
|
2218
|
+
`])),$t?"var(--colorBgSettingsHover)":"",Bn?"2px solid var(--colorBorderSettingsHover)":"",wn.themeToken.borderRadiusLG,er==="above"?"0px":"2px",er==="above"?"transform: translateY(-100%);":"",er==="above"?"padding-bottom: 2px;":"",er==="above"?"margin-bottom: -2px;":"")},Xt=function(pt){return"uid"in pt&&"modelClassName"in pt&&!!pt.uid&&!!pt.modelClassName},Zn=(0,nn.observer)(function(ln){var pt,$t=(0,z.Zr)();return(pt=$t.flowSettings)!==null&&pt!==void 0&&pt.enabled?Xt(ln)?(0,n.jsx)(jn,j()({},ln)):(0,n.jsx)(Mn,j()({},ln)):(0,n.jsx)(n.Fragment,{children:ln.children})}),on=function(pt){var $t=(0,g.useRef)(!1),Bn=(0,g.useRef)(null),wn=(0,g.useRef)({x:0,y:0}),er=pt.onDragStart,Jn=pt.onDragEnd,ar=(0,g.useCallback)(function(Or){if(!(!$t.current||!Bn.current)){var $r=Or.clientX-wn.current.x,ro=Or.clientY-wn.current.y,fr=0;switch(Bn.current){case"left":fr=-$r,pt.model.parent.emitter.emit("onResizeLeft",{resizeDistance:fr,model:pt.model});break;case"right":fr=$r,pt.model.parent.emitter.emit("onResizeRight",{resizeDistance:fr,model:pt.model});break;case"bottom":fr=ro,pt.model.parent.emitter.emit("onResizeBottom",{resizeDistance:fr,model:pt.model});break;case"corner":{var An=$r,Et=ro;pt.model.parent.emitter.emit("onResizeCorner",{widthDelta:An,heightDelta:Et,model:pt.model});break}}}},[pt.model]),lr=(0,g.useCallback)(function(){$t.current=!1,Bn.current=null,wn.current={x:0,y:0},document.removeEventListener("mousemove",ar),document.removeEventListener("mouseup",lr),pt.model.parent.emitter.emit("onResizeEnd"),Jn==null||Jn()},[ar,pt.model,Jn]),dr=(0,g.useCallback)(function(Or,$r){Or.preventDefault(),Or.stopPropagation(),$t.current=!0,Bn.current=$r,wn.current={x:Or.clientX,y:Or.clientY},document.addEventListener("mousemove",ar),document.addEventListener("mouseup",lr),er==null||er()},[ar,lr,er]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"resize-handle resize-handle-left",title:"\u62D6\u62FD\u8C03\u8282\u5BBD\u5EA6",onMouseDown:function($r){return dr($r,"left")}}),(0,n.jsx)("div",{className:"resize-handle resize-handle-right",title:"\u62D6\u62FD\u8C03\u8282\u5BBD\u5EA6",onMouseDown:function($r){return dr($r,"right")}})]})},Mn=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.children,Bn=ln.enabled,wn=Bn===void 0?!0:Bn,er=ln.showDeleteButton,Jn=er===void 0?!0:er,ar=ln.showCopyUidButton,lr=ar===void 0?!0:ar,dr=ln.containerStyle,Or=ln.className,$r=ln.showBackground,ro=$r===void 0?!0:$r,fr=ln.showBorder,An=fr===void 0?!0:fr,Et=ln.showTitle,sn=Et===void 0?!1:Et,Fn=ln.showDragHandle,zn=Fn===void 0?!1:Fn,Cn=ln.settingsMenuLevel,qn=ln.extraToolbarItems,tr=ln.toolbarStyle,pr=ln.toolbarPosition,Rr=pr===void 0?"inside":pr,Br=(0,g.useState)(!1),Ar=A()(Br,2),gr=Ar[0],kr=Ar[1],Nr=(0,g.useState)(!1),Vr=A()(Nr,2),io=Vr[0],ao=Vr[1],Yr=(0,g.useRef)(null),Fo=(0,z.Zr)(),Oo=(0,g.useState)({}),Ro=A()(Oo,2),wo=Ro[0],jo=Ro[1],Go=(0,g.useRef)(null),Qo=(0,g.useMemo)(function(){return j()(j()({},tr),wo)},[wo,tr]);(0,g.useEffect)(function(){if(Yr.current){var na=cn(Yr.current);ao(na)}},[$t]),(0,g.useEffect)(function(){if(Yr.current){var na=new MutationObserver(function(){if(Yr.current){var qo=cn(Yr.current);ao(qo)}});return na.observe(Yr.current,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","role"]}),function(){na.disconnect()}}},[]);var ho=(0,g.useCallback)(function(na){var qo=na.target,Ho=qo.closest("[data-has-float-menu]");Ho&&Ho!==Yr.current?kr(!0):kr(!1)},[]);if(!pt){var Bo=(0,a.xG)(pt||{});return(0,n.jsx)(bt.Z,{message:Bo("Invalid model provided"),type:"error"})}return!wn||!$t?(0,n.jsx)(n.Fragment,{children:$t}):(0,n.jsxs)("div",{ref:Yr,className:"".concat(fn({showBackground:ro,showBorder:An,ctx:pt.context,toolbarPosition:Rr})," ").concat(gr?"hide-parent-menu":""," ").concat(io?"has-button-child":""," ").concat(Or||""),style:dr,"data-has-float-menu":"true",onMouseMove:ho,children:[$t,(0,n.jsxs)("div",{ref:Go,className:"nb-toolbar-container",style:Qo,children:[sn&&pt.title&&(0,n.jsx)("div",{className:"nb-toolbar-container-title",children:(0,n.jsx)("span",{className:"title-tag",children:pt.title})}),(0,n.jsx)("div",{className:"nb-toolbar-container-icons",children:(0,n.jsx)(Vt.Z,{size:3,align:"center",children:mn(pt,Jn,lr,Fo,Cn,qn)})}),zn&&(0,n.jsx)(on,{model:pt,onDragStart:function(){return jo({opacity:1})},onDragEnd:function(){return jo({})}})]})]})},{displayName:"FlowsFloatContextMenuWithModel"}),jn=(0,nn.observer)(function(ln){var pt=ln.uid,$t=ln.modelClassName,Bn=ln.children,wn=ln.enabled,er=wn===void 0?!0:wn,Jn=ln.showDeleteButton,ar=Jn===void 0?!0:Jn,lr=ln.showCopyUidButton,dr=lr===void 0?!0:lr,Or=ln.containerStyle,$r=ln.className,ro=ln.showTitle,fr=ro===void 0?!1:ro,An=ln.settingsMenuLevel,Et=ln.extraToolbarItems,sn=ln.toolbarPosition,Fn=(0,P.ql)(pt,$t),zn=(0,z.Zr)();return Fn?(0,n.jsx)(Mn,{model:Fn,enabled:er,showDeleteButton:ar,showCopyUidButton:dr,containerStyle:Or,className:$r,showTitle:fr,settingsMenuLevel:An,extraToolbarItems:Et,toolbarPosition:sn,children:Bn}):(0,n.jsx)(bt.Z,{message:zn.translate("Model with ID {{uid}} not found",{uid:pt}),type:"error"})},{displayName:"FlowsFloatContextMenuWithModelById"}),Ln=(0,N.observer)(function(ln){var pt=ln.model,$t=ln.showFlowSettings,Bn=ln.flowSettingsVariant,wn=ln.hideRemoveInSettings,er=ln.showTitle,Jn=ln.inputArgs,ar=ln.showErrorFallback,lr=ln.settingsMenuLevel,dr=ln.extraToolbarItems,Or=ln.fallback,$r=(0,P.Vy)(pt,Jn,{throwOnError:!1}),ro=$r.loading,fr=$r.error;return(0,a.Qs)(pt,fr||null),ro?(0,n.jsx)(n.Fragment,{children:Or}):(0,n.jsx)(P.Bu,{model:pt,children:(0,n.jsx)(Tn,{model:pt,showFlowSettings:$t,flowSettingsVariant:Bn,hideRemoveInSettings:wn,showTitle:er,showErrorFallback:ar,settingsMenuLevel:lr,extraToolbarItems:dr})})}),Tn=(0,N.observer)(function(ln){var pt=ln.model,$t=ln.showFlowSettings,Bn=ln.flowSettingsVariant,wn=ln.hideRemoveInSettings,er=ln.showTitle,Jn=ln.showErrorFallback,ar=ln.settingsMenuLevel,lr=ln.extraToolbarItems,dr=function(ro){return Jn?(0,n.jsx)(st.SV,{FallbackComponent:Be,children:ro}):ro},Or=function(){var ro=(0,a.Zx)(pt);if(ro)throw ro;var fr=pt.render();return typeof fr=="function"?g.createElement(fr):(0,n.jsx)(n.Fragment,{children:fr})};if(!$t)return dr((0,n.jsx)(Or,{}));switch(Bn){case"dropdown":return(0,n.jsx)(Zn,{showTitle:er,model:pt,showDeleteButton:!wn,showBackground:d().isObject($t)?$t.showBackground:void 0,showBorder:d().isObject($t)?$t.showBorder:void 0,showDragHandle:d().isObject($t)?$t.showDragHandle:void 0,settingsMenuLevel:ar,extraToolbarItems:lr,toolbarStyle:d().isObject($t)?$t.style:void 0,toolbarPosition:d().isObject($t)?$t.toolbarPosition:void 0,children:dr((0,n.jsx)(Or,{}))});case"contextMenu":return(0,n.jsx)(Ve,{model:pt,showDeleteButton:!wn,children:dr((0,n.jsx)(Or,{}))});case"modal":return console.warn("FlowModelRenderer: modal variant is not implemented yet"),dr((0,n.jsx)(Or,{}));case"drawer":return console.warn("FlowModelRenderer: drawer variant is not implemented yet"),dr((0,n.jsx)(Or,{}));default:return console.warn("FlowModelRenderer: Unknown flowSettingsVariant '".concat(Bn,"', falling back to dropdown")),(0,n.jsx)(Zn,{showTitle:er,model:pt,showDeleteButton:!wn,showBackground:d().isObject($t)?$t.showBackground:void 0,showBorder:d().isObject($t)?$t.showBorder:void 0,showDragHandle:d().isObject($t)?$t.showDragHandle:void 0,settingsMenuLevel:ar,extraToolbarItems:lr,toolbarStyle:d().isObject($t)?$t.style:void 0,toolbarPosition:d().isObject($t)?$t.toolbarPosition:void 0,children:dr((0,n.jsx)(Or,{}))})}},{displayName:"FlowModelRendererCore"}),Gn=(0,N.observer)(function(ln){var pt=ln.model,$t=ln.fallback,Bn=$t===void 0?(0,n.jsx)(Ne.Z.Button,{size:"small"}):$t,wn=ln.showFlowSettings,er=wn===void 0?!1:wn,Jn=ln.flowSettingsVariant,ar=Jn===void 0?"dropdown":Jn,lr=ln.hideRemoveInSettings,dr=lr===void 0?!1:lr,Or=ln.showTitle,$r=Or===void 0?!1:Or,ro=ln.inputArgs,fr=ln.showErrorFallback,An=fr===void 0?!0:fr,Et=ln.settingsMenuLevel,sn=ln.extraToolbarItems;if(!pt||typeof pt.render!="function")return console.warn("FlowModelRenderer: Invalid model or render method not found.",pt),null;var Fn=(0,n.jsx)(Ln,{model:pt,showFlowSettings:er,flowSettingsVariant:ar,hideRemoveInSettings:dr,showTitle:$r,inputArgs:ro,showErrorFallback:An,settingsMenuLevel:Et,extraToolbarItems:sn,fallback:Bn});return An?(0,n.jsx)(P.Bu,{model:pt,children:(0,n.jsx)(st.SV,{FallbackComponent:Be,children:Fn})}):Fn}),Yn=g.memo(Gn);Yn.displayName="MemoFlowModelRenderer";var _n=e(22150),Kt=["children","showLabel","labelWidth"],zt=["colon","dependencies","extra","getValueFromEvent","getValueProps","hasFeedback","help","htmlFor","initialValue","label","labelAlign","labelCol","messageVariables","name","normalize","noStyle","preserve","rules","tooltip","trigger","validateStatus","validateTrigger","valuePropName","wrapperCol","labelWidth","labelWrap","layout","required","showLabel"],Yt=function(pt){var $t=pt.children,Bn=pt.showLabel,wn=Bn===void 0?!0:Bn,er=pt.labelWidth,Jn=K()(pt,Kt),ar=Object.fromEntries(Object.entries(Jn).filter(function(sn){var Fn=A()(sn,1),zn=Fn[0];return!zt.includes(zn)})),lr=typeof $t=="function"?$t:g.Children.map($t,function(sn){return g.isValidElement(sn)?g.cloneElement(sn,j()({},ar)):sn}),dr=Jn.label,Or=Jn.labelWrap,$r=Jn.colon,ro=$r===void 0?!0:$r,fr=Jn.layout,An=!fr||fr==="vertical"?!0:Or,Et=function(){return wn?An?(0,n.jsxs)("div",{style:{width:"100%",whiteSpace:"normal",wordBreak:"break-word",display:"flex",alignItems:"center",justifyContent:"flex-start",fontWeight:600},children:[(0,n.jsx)("span",{style:{flex:1},children:dr}),ro&&(0,n.jsx)("span",{style:{marginLeft:4,flexShrink:0},children:":"})]}):(0,n.jsx)(ge.Z,{title:dr,children:(0,n.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",maxWidth:(typeof er=="number"?er:120)-20,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"middle",fontWeight:600},children:[(0,n.jsx)("span",{style:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis"},children:dr}),ro&&(0,n.jsx)("span",{style:{marginLeft:4,flexShrink:0},children:":"})]})}):null};return(0,n.jsx)(_n.Z.Item,j()(j()({},Jn),{},{labelCol:{style:{width:er}},layout:fr,label:Et(),colon:!1,extra:Jn.extra&&(0,n.jsx)("span",{style:{whiteSpace:"pre-wrap"},children:Jn.extra}),tooltip:Jn.tooltip&&{title:Jn.tooltip,overlayInnerStyle:{whiteSpace:"pre-line"}},children:lr}))},Dn=e(42922),yn=["uid","modelClassName"],xn=["model"],En=function(pt){return"uid"in pt&&"modelClassName"in pt&&!!pt.uid&&!!pt.modelClassName},Pn=function(pt){if(En(pt)){var $t=pt.uid,Bn=pt.modelClassName,wn=K()(pt,yn);return(0,n.jsx)(vr,j()({uid:$t,modelClassName:Bn},wn))}else{var er=pt.model,Jn=K()(pt,xn);return(0,n.jsx)(Wn,j()({model:er},Jn))}},Wn=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.text,Bn=$t===void 0?"\u6D41\u7A0B\u914D\u7F6E":$t,wn=ln.icon,er=wn===void 0?(0,n.jsx)(Gt.Z,{}):wn,Jn=ln.size,ar=Jn===void 0?"middle":Jn,lr=ln.type,dr=lr===void 0?"default":lr,Or=ln.disabled,$r=Or===void 0?!1:Or,ro=ln.showDropdownIcon,fr=ro===void 0?!0:ro,An=ln.onClick,Et=ln.style,sn=ln.className,Fn=function(){An==null||An()},zn=(0,g.useCallback)(function(Br){var Ar=Br.key,gr=Ar.split(":"),kr=A()(gr,2),Nr=kr[0],Vr=kr[1];try{pt.openFlowSettings({flowKey:Nr,stepKey:Vr})}catch(io){console.log("\u914D\u7F6E\u5F39\u7A97\u5DF2\u53D6\u6D88\u6216\u51FA\u9519:",io)}},[pt]);if(!pt)return(0,n.jsx)(bt.Z,{message:"\u63D0\u4F9B\u7684\u6A21\u578B\u65E0\u6548",type:"error"});var Cn=(0,g.useCallback)(function(){try{var Br=pt.getFlows(),Ar=Array.from(Br.values());return Ar.map(function(gr){var kr=Object.entries(gr.steps).map(function(Nr){var Vr=A()(Nr,2),io=Vr[0],ao=Vr[1],Yr=ao;if(Yr.hideInSettings)return null;var Fo=Yr.uiSchema||{},Oo={};if(Yr.use){var Ro,wo,jo=(Ro=pt.flowEngine)===null||Ro===void 0||(wo=Ro.getAction)===null||wo===void 0?void 0:wo.call(Ro,Yr.use);jo&&jo.uiSchema&&(Oo=jo.uiSchema)}var Go=j()({},Oo);return Object.entries(Fo).forEach(function(Qo){var ho=A()(Qo,2),Bo=ho[0],na=ho[1];Go[Bo]?Go[Bo]=j()(j()({},Go[Bo]),na):Go[Bo]=na}),Object.keys(Go).length===0?null:{stepKey:io,step:Yr,uiSchema:Go,title:Yr.title||io}}).filter(Boolean);return kr.length>0?{flow:gr,steps:kr}:null}).filter(Boolean)}catch(gr){return console.warn("[FlowsDropdownButton] \u83B7\u53D6\u53EF\u914D\u7F6Eflows\u5931\u8D25:",gr),[]}},[pt]),qn=Cn(),tr=function(){var Ar=[];return qn.forEach(function(gr){var kr=gr.flow,Nr=gr.steps;Ar.push({key:"flow-group-".concat(kr.key),label:kr.title||kr.key,type:"group"}),Nr.forEach(function(Vr){Ar.push({key:"".concat(kr.key,":").concat(Vr.stepKey),icon:(0,n.jsx)(Gt.Z,{}),label:Vr.title})})}),Ar},pr=tr(),Rr=(0,n.jsx)(f.ZP,{type:dr,size:ar,disabled:$r,icon:er,onClick:Fn,style:Et,className:sn,children:(0,n.jsxs)(Vt.Z,{children:[Bn,fr&&(0,n.jsx)(Dn.Z,{})]})});return qn.length===0?Rr:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Qe.Z,{menu:{items:pr,onClick:zn},trigger:["click"],placement:"bottomRight",children:Rr})})}),vr=(0,nn.observer)(function(ln){var pt=ln.uid,$t=ln.modelClassName,Bn=ln.text,wn=Bn===void 0?"\u6D41\u7A0B\u914D\u7F6E":Bn,er=ln.icon,Jn=er===void 0?(0,n.jsx)(Gt.Z,{}):er,ar=ln.size,lr=ar===void 0?"middle":ar,dr=ln.type,Or=dr===void 0?"default":dr,$r=ln.disabled,ro=$r===void 0?!1:$r,fr=ln.showDropdownIcon,An=fr===void 0?!0:fr,Et=ln.onClick,sn=ln.style,Fn=ln.className,zn=(0,P.ql)(pt,$t);return zn?(0,n.jsx)(Wn,{model:zn,text:wn,icon:Jn,size:lr,type:Or,disabled:ro,showDropdownIcon:An,onClick:Et,style:sn,className:Fn}):(0,n.jsx)(bt.Z,{message:"\u672A\u627E\u5230ID\u4E3A ".concat(pt," \u7684\u6A21\u578B"),type:"error"})}),pn=e(52677),Rt=e.n(pn),Ae=e(34041),mt=e(37720),ft=e(59637),nt=e(25278),lt=_n.Z.Item,Ut=function(pt){return"uid"in pt&&"modelClassName"in pt&&!!pt.uid&&!!pt.modelClassName},vn=function(pt){return Ut(pt)?(0,n.jsx)(Nn,j()({},pt)):(0,n.jsx)(qt,j()({},pt))},qt=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.flowKey;return pt?(0,n.jsx)($n,{model:pt,flowKey:$t}):(0,n.jsx)(bt.Z,{message:"\u63D0\u4F9B\u7684\u6A21\u578B\u65E0\u6548",type:"error"})}),Nn=(0,nn.observer)(function(ln){var pt=ln.uid,$t=ln.flowKey,Bn=ln.modelClassName,wn=(0,P.ql)(pt,Bn);return wn?(0,n.jsx)($n,{model:wn,flowKey:$t}):(0,n.jsx)(bt.Z,{message:"\u672A\u627E\u5230ID\u4E3A ".concat(pt," \u7684\u6A21\u578B"),type:"error"})}),$n=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.flowKey,Bn=_n.Z.useForm(),wn=A()(Bn,1),er=wn[0],Jn=pt.getFlows(),ar=Jn.get($t),lr=Object.entries((ar==null?void 0:ar.steps)||{}).map(function(ro){var fr=A()(ro,2),An=fr[0],Et=fr[1];if(Et.hideInSettings)return null;var sn=Et.uiSchema||{},Fn={};if(Et.use){var zn,Cn,qn=(zn=pt.flowEngine)===null||zn===void 0||(Cn=zn.getAction)===null||Cn===void 0?void 0:Cn.call(zn,Et.use);qn&&qn.uiSchema&&(Fn=qn.uiSchema)}var tr=j()({},Fn);return Object.entries(sn).forEach(function(pr){var Rr=A()(pr,2),Br=Rr[0],Ar=Rr[1];tr[Br]?tr[Br]=j()(j()({},tr[Br]),Ar):tr[Br]=Ar}),Object.keys(tr).length===0?null:{stepKey:An,step:Et,uiSchema:tr}}).filter(Boolean),dr=(0,g.useCallback)(H()(ce()().mark(function ro(){var fr,An,Et,sn,Fn,zn,Cn,qn,tr,pr,Rr;return ce()().wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:fr={},An=$e()(lr),Ar.prev=2,An.s();case 4:if((Et=An.n()).done){Ar.next=17;break}return sn=Et.value,Fn=sn.stepKey,zn=sn.step,Cn=pt.getStepParams($t,Fn)||{},qn=new it.P$(pt,$t,"settings"),tr=pt.getFlow($t),(0,a.ZQ)(qn,(tr==null?void 0:tr.steps)||{},pt,$t),Ar.next=12,(0,a.nw)(zn.defaultParams,qn);case 12:pr=Ar.sent,Rr=j()(j()({},pr),Cn),Object.keys(Rr).length>0&&(fr[Fn]=Rr);case 15:Ar.next=4;break;case 17:Ar.next=22;break;case 19:Ar.prev=19,Ar.t0=Ar.catch(2),An.e(Ar.t0);case 22:return Ar.prev=22,An.f(),Ar.finish(22);case 25:return Ar.abrupt("return",fr);case 26:case"end":return Ar.stop()}},ro,null,[[2,19,22,25]])})),[pt,$t,lr]);(0,g.useEffect)(function(){var ro=function(){var fr=H()(ce()().mark(function An(){var Et;return ce()().wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Fn.prev=0,Fn.next=3,dr();case 3:Et=Fn.sent,er.setFieldsValue(Et),Fn.next=10;break;case 7:Fn.prev=7,Fn.t0=Fn.catch(0),console.error("Error loading default params:",Fn.t0);case 10:case"end":return Fn.stop()}},An,null,[[0,7]])}));return function(){return fr.apply(this,arguments)}}();ro()},[$t,er,dr]);var Or=(0,g.useCallback)(function(ro,fr){Object.entries(fr).forEach(function(An){var Et=A()(An,2),sn=Et[0],Fn=Et[1];Fn&&Rt()(Fn)==="object"&&pt.setStepParams($t,sn,Fn)})},[pt,$t]);if(!ar)return(0,n.jsx)(bt.Z,{message:"\u672A\u627E\u5230Key\u4E3A ".concat($t," \u7684\u6D41\u7A0B"),type:"error"});if(lr.length===0)return(0,n.jsx)(bt.Z,{message:"\u6B64\u6D41\u7A0B\u6CA1\u6709\u53EF\u914D\u7F6E\u7684\u53C2\u6570",type:"info"});var $r=function(){return lr.map(function(fr){var An=fr.stepKey,Et=fr.uiSchema;return Object.entries(Et).map(function(sn){var Fn=A()(sn,2),zn=Fn[0],Cn=Fn[1],qn="".concat(An,".").concat(zn),tr=function(){var Rr,Br,Ar,gr;switch(Cn["x-component"]){case"Select":return(0,n.jsx)(Ae.default,j()({placeholder:((Rr=Cn["x-component-props"])===null||Rr===void 0?void 0:Rr.placeholder)||"\u8BF7\u9009\u62E9".concat(Cn.title),options:Cn.enum||[]},Cn["x-component-props"]||{}));case"InputNumber":return(0,n.jsx)(mt.Z,j()({placeholder:((Br=Cn["x-component-props"])===null||Br===void 0?void 0:Br.placeholder)||"\u8BF7\u8F93\u5165".concat(Cn.title)},Cn["x-component-props"]||{}));case"Switch":return(0,n.jsx)(ft.Z,j()({},Cn["x-component-props"]||{}));case"Input.TextArea":return(0,n.jsx)(nt.Z.TextArea,j()({placeholder:((Ar=Cn["x-component-props"])===null||Ar===void 0?void 0:Ar.placeholder)||"\u8BF7\u8F93\u5165".concat(Cn.title)},Cn["x-component-props"]||{}));default:return(0,n.jsx)(nt.Z,j()({placeholder:((gr=Cn["x-component-props"])===null||gr===void 0?void 0:gr.placeholder)||"\u8BF7\u8F93\u5165".concat(Cn.title)},Cn["x-component-props"]||{}))}};return(0,n.jsx)(_n.Z.Item,{name:[An,zn],label:Cn.title||zn,rules:Cn.required?[{required:!0,message:"\u8BF7\u8F93\u5165".concat(Cn.title||zn)}]:[],children:tr()},qn)})})};return(0,n.jsx)(_n.Z,{form:er,layout:"vertical",onValuesChange:Or,children:$r()})}),sr=e(69234),Qt=e(32983),Ft=e(4393),Te=sr.Z.Panel,Se=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.expandAll,Bn=$t===void 0?!1:$t,wn=pt.getFlows(),er=Array.from(wn.values()).filter(function(lr){var dr=Object.entries(lr.steps).map(function(Or){var $r=A()(Or,2),ro=$r[0],fr=$r[1];if(fr.hideInSettings)return null;var An=fr.uiSchema||{},Et={};if(fr.use){var sn,Fn,zn=(sn=pt.flowEngine)===null||sn===void 0||(Fn=sn.getAction)===null||Fn===void 0?void 0:Fn.call(sn,fr.use);zn&&zn.uiSchema&&(Et=zn.uiSchema)}var Cn=j()({},Et);return Object.entries(An).forEach(function(qn){var tr=A()(qn,2),pr=tr[0],Rr=tr[1];Cn[pr]?Cn[pr]=j()(j()({},Cn[pr]),Rr):Cn[pr]=Rr}),Object.keys(Cn).length===0?null:{stepKey:ro,step:fr,uiSchema:Cn}}).filter(Boolean);return dr.length>0}),Jn=er.map(function(lr){return lr.key});if(Jn.length===0)return(0,n.jsx)(Qt.Z,{description:"\u6CA1\u6709\u53EF\u7528\u7684\u6D41\u7A0B"});var ar=Bn?Jn:void 0;return(0,n.jsx)(Ft.Z,{title:"Flows\u8BBE\u7F6E",children:(0,n.jsx)(sr.Z,{defaultActiveKey:ar,children:Jn.map(function(lr){var dr;return(0,n.jsx)(Te,{header:((dr=wn.get(lr))===null||dr===void 0?void 0:dr.title)||lr,children:(0,n.jsx)(vn,{model:pt,flowKey:lr})},lr)})})})}),Le=Se,dt=function(pt){return"uid"in pt&&"modelClassName"in pt&&!!pt.uid&&!!pt.modelClassName},xt=function(pt){return dt(pt)?(0,n.jsx)(wt,j()({},pt)):(0,n.jsx)(St,j()({},pt))},St=(0,nn.observer)(function(ln){var pt=ln.model,$t=ln.expandAll,Bn=$t===void 0?!1:$t,wn=ln.children;if(!pt)return(0,n.jsx)(bt.Z,{message:"\u63D0\u4F9B\u7684\u6A21\u578B\u65E0\u6548",type:"error"});var er=(0,n.jsx)(Le,{model:pt,expandAll:Bn});return wn?(0,n.jsxs)("div",{children:[er,wn]}):er}),wt=(0,nn.observer)(function(ln){var pt=ln.uid,$t=ln.modelClassName,Bn=ln.expandAll,wn=Bn===void 0?!1:Bn,er=ln.children,Jn=(0,P.ql)(pt,$t);if(!Jn)return(0,n.jsx)(bt.Z,{message:"\u672A\u627E\u5230ID\u4E3A ".concat(pt," \u7684\u6A21\u578B"),type:"error"});var ar=(0,n.jsx)(Le,{model:Jn,expandAll:wn});return er?(0,n.jsxs)("div",{children:[ar,er]}):ar}),In=["drawerWidth","drawerTitle","cleanup"],kn=function(){var ln=H()(ce()().mark(function pt($t){var Bn,wn,er,Jn;return ce()().wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return Bn=$t.drawerWidth,wn=$t.drawerTitle,er=$t.cleanup,Jn=K()($t,In),lr.abrupt("return",(0,tt.d)(j()(j()({},Jn),{},{mode:"drawer",dialogWidth:Bn,dialogTitle:wn,cleanup:er})));case 2:case"end":return lr.stop()}},pt)}));return function($t){return ln.apply(this,arguments)}}(),or=e(45360),Xn=function(){var ln=H()(ce()().mark(function pt($t){var Bn,wn,er,Jn,ar,lr,dr,Or,$r,ro,fr,An,Et,sn,Fn,zn;return ce()().wrap(function(qn){for(;;)switch(qn.prev=qn.next){case 0:if(wn=$t.model,er=$t.flowKey,Jn=$t.stepKey,ar=$t.width,lr=ar===void 0?600:ar,dr=$t.title,Or=(0,a.xG)(wn),$r=wn.getFlow(er),ro=$r==null||(Bn=$r.steps)===null||Bn===void 0?void 0:Bn[Jn],$r){qn.next=7;break}throw or.ZP.error(Or("Flow with key {{flowKey}} not found",{flowKey:er})),new Error(Or("Flow with key {{flowKey}} not found",{flowKey:er}));case 7:if(ro){qn.next=10;break}throw or.ZP.error(Or("Step with key {{stepKey}} not found",{stepKey:Jn})),new Error(Or("Step with key {{stepKey}} not found",{stepKey:Jn}));case 10:return fr=new it.P$(wn,er,"settings"),(0,a.ZQ)(fr,$r.steps,wn,er),fr.defineProperty("currentStep",{value:ro}),qn.next=15,(0,a.hj)(ro.uiMode,fr);case 15:if(An=qn.sent,sn={},typeof An=="string"?Et=An:Rt()(An)==="object"?(Et=An.type||"dialog",sn=(0,o.model)(An.props||{}),zn=(0,o.autorun)(function(){(0,a.hj)(ro.uiMode,fr).then(function(tr){Rt()(tr)==="object"&&Object.assign(sn,tr.props||{})}).catch(function(tr){console.warn("Error resolving uiMode:",tr)})}),Fn=function(){zn()}):Et="dialog",Et!=="drawer"){qn.next=22;break}return qn.abrupt("return",kn({model:wn,flowKey:er,stepKey:Jn,drawerWidth:lr,drawerTitle:dr,ctx:fr,uiModeProps:sn,cleanup:Fn}));case 22:return qn.abrupt("return",(0,tt.d)({model:wn,flowKey:er,stepKey:Jn,dialogWidth:lr,dialogTitle:dr,ctx:fr,uiModeProps:sn,cleanup:Fn}));case 23:case"end":return qn.stop()}},pt)}));return function($t){return ln.apply(this,arguments)}}(),nr=e(3277),Er=e(74330),Fr,Ur=["visible"],br=["menu"],Jr=["items","keepDropdownOpen","persistKey","stateVersion","refreshKeys"],mr=function(){return(0,g.useMemo)(function(){var pt=Math.min(window.innerHeight*.6,400);return pt},[])},Wr=function(pt,$t,Bn,wn,er){var Jn=(0,g.useState)({}),ar=A()(Jn,2),lr=ar[0],dr=ar[1],Or=(0,g.useState)(new Set),$r=A()(Or,2),ro=$r[0],fr=$r[1],An=(0,g.useRef)(null),Et=(0,g.useCallback)(function(){var Fn=H()(ce()().mark(function zn(Cn,qn){var tr,pr,Rr,Br=arguments;return ce()().wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:if(tr=Br.length>2&&Br[2]!==void 0?Br[2]:!1,!ro.has(Cn)){gr.next=3;break}return gr.abrupt("return");case 3:if(!(!tr&&lr[Cn])){gr.next=5;break}return gr.abrupt("return");case 5:if(fr(function(kr){return new Set(kr).add(Cn)}),gr.prev=6,pr=qn(),!(pr instanceof Promise)){gr.next=14;break}return gr.next=11,pr;case 11:gr.t0=gr.sent,gr.next=15;break;case 14:gr.t0=pr;case 15:Rr=gr.t0,dr(function(kr){return j()(j()({},kr),{},v()({},Cn,Rr))}),gr.next=22;break;case 19:gr.prev=19,gr.t1=gr.catch(6),console.error("Failed to load children for ".concat(Cn),gr.t1);case 22:return gr.prev=22,fr(function(kr){var Nr=new Set(kr);return Nr.delete(Cn),Nr}),gr.finish(22);case 25:case"end":return gr.stop()}},zn,null,[[6,19,22,25]])}));return function(zn,Cn){return Fn.apply(this,arguments)}}(),[lr,ro]),sn=function(zn,Cn){var qn=[],tr=function kr(Nr){var Vr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],io=$e()(Nr),ao;try{for(io.s();!(ao=io.n()).done;){var Yr=ao.value,Fo=zr(Vr,Yr.key);typeof Yr.children=="function"&&qn.push([Fo,Yr.children]),Array.isArray(Yr.children)&&kr(Yr.children,[].concat(I()(Vr),[Yr.key]))}}catch(Oo){io.e(Oo)}finally{io.f()}};tr(zn,[]);for(var pr=0,Rr=Object.keys(Cn);pr<Rr.length;pr++){var Br=Rr[pr],Ar=Cn[Br]||[],gr=Br?Br.split("/"):[];tr(Ar,gr)}return qn};return(0,g.useEffect)(function(){if(pt&&An.current!==Bn){An.current=Bn;var Fn=new Map,zn=$e()(sn($t,lr)),Cn;try{for(zn.s();!(Cn=zn.n()).done;){var qn=A()(Cn.value,2),tr=qn[0],pr=qn[1];Fn.set(tr,pr)}}catch(jo){zn.e(jo)}finally{zn.f()}var Rr=wn?Array.from(wn):[],Br=[],Ar=Array.from(new Set(I()(er||[]).filter(Boolean)));if(Ar.length>0){var gr=$e()(Ar),kr;try{for(gr.s();!(kr=gr.n()).done;)for(var Nr=kr.value,Vr=Nr.split("/").filter(Boolean),io=1;io<=Vr.length;io++){var ao=Vr.slice(0,io).join("/");!Br.includes(ao)&&lr[ao]&&Br.push(ao)}}catch(jo){gr.e(jo)}finally{gr.f()}}else Br=Object.keys(lr).filter(function(jo){return Rr.some(function(Go){return jo===Go||jo.startsWith(Go+"/")})});Br.length===0&&(Br=Object.keys(lr).filter(function(jo){return jo.indexOf("/")===-1}));var Yr=new Set,Fo=$e()(Br),Oo;try{for(Fo.s();!(Oo=Fo.n()).done;){var Ro=Oo.value,wo=Fn.get(Ro);if(wo)try{Yr.has(Ro)||(Yr.add(Ro),Et(Ro,wo,!0))}catch{}}}catch(jo){Fo.e(jo)}finally{Fo.f()}}},[pt,Bn,$t,Et,lr,wn,er]),{loadedChildren:lr,loadingKeys:ro,handleLoadChildren:Et}},Lr=function(){var pt=(0,g.useRef)(!1),$t=(0,g.useState)(!1),Bn=A()($t,2),wn=Bn[0],er=Bn[1],Jn=(0,g.useRef)(null),ar=(0,g.useCallback)(function(){pt.current=!0,er(!0),Jn.current&&clearTimeout(Jn.current),Jn.current=setTimeout(function(){pt.current=!1,er(!1),Jn.current=null},250)},[]);(0,g.useEffect)(function(){return function(){return Jn.current&&clearTimeout(Jn.current)}},[]);var lr=(0,g.useCallback)(function(){return pt.current||wn},[wn]);return{requestKeepOpen:ar,shouldPreventClose:lr}},eo=function(){var pt=(0,g.useState)({}),$t=A()(pt,2),Bn=$t[0],wn=$t[1],er=(0,g.useState)(!1),Jn=A()(er,2),ar=Jn[0],lr=Jn[1],dr=(0,g.useRef)(null),Or=function(ro,fr){lr(!0),wn(function(An){return j()(j()({},An),{},v()({},ro,fr))}),dr.current&&clearTimeout(dr.current),dr.current=setTimeout(function(){return lr(!1)},300)};return(0,g.useEffect)(function(){return function(){dr.current&&clearTimeout(dr.current)}},[]),{searchValues:Bn,isSearching:ar,updateSearchValue:Or}},fo=function(pt,$t){(0,g.useEffect)(function(){if(!(!pt||$t<=0)){var Bn=new MutationObserver(function(er){er.forEach(function(Jn){Jn.addedNodes.forEach(function(ar){if(ar.nodeType===Node.ELEMENT_NODE){var lr,dr=ar;(lr=dr.classList)!==null&&lr!==void 0&&lr.contains("ant-dropdown-menu-submenu-popup")&&requestAnimationFrame(function(){var Or=dr.querySelector(".ant-dropdown-menu");if(Or){var $r=Or;$r.style.maxHeight="".concat($t,"px"),$r.style.overflowY="auto"}})}})})});Bn.observe(document.body,{childList:!0,subtree:!1});var wn=setInterval(function(){var er=document.querySelectorAll(".ant-dropdown-menu-submenu-popup .ant-dropdown-menu");er.forEach(function(Jn){var ar=Jn,lr=ar.getBoundingClientRect();lr.width>0&&lr.height>0&&(ar.style.maxHeight="".concat($t,"px"),ar.style.overflowY="auto")})},200);return function(){Bn.disconnect(),clearInterval(wn)}}},[pt,$t])},Lo=function(pt){var $t=(0,g.useRef)(null),Bn=pt.visible,wn=K()(pt,Ur);return(0,g.useEffect)(function(){if($t.current&&Bn){var er,Jn=$t.current.input||((er=$t.current.resizableTextArea)===null||er===void 0?void 0:er.textArea)||$t.current;try{var ar;Jn==null||(ar=Jn.focus)===null||ar===void 0||ar.call(Jn,{preventScroll:!0})}catch{var lr;Jn==null||(lr=Jn.focus)===null||lr===void 0||lr.call(Jn)}}},[Bn]),(0,n.jsx)(nt.Z,j()({ref:$t},wn))},zr=function(pt,$t){return[].concat(I()(pt),[$t]).join("/")},Ao=function(pt,$t,Bn,wn,er,Jn){return{key:"".concat($t,"-search"),type:"group",label:(0,n.jsx)("div",{children:(0,n.jsx)(Lo,{visible:wn,variant:"borderless",allowClear:!0,placeholder:er(pt.searchPlaceholder||"Search"),value:Bn,onChange:function(lr){lr.stopPropagation(),Jn($t,lr.target.value)},onClick:function(lr){return lr.stopPropagation()},onMouseDown:function(lr){lr.stopPropagation()},size:"small",style:{width:"100%",paddingLeft:0,paddingRight:0}})})}},vo=function(pt,$t){return{key:"".concat(pt,"-empty"),label:(0,n.jsx)("div",{style:{padding:"16px",textAlign:"center"},children:(0,n.jsx)(Qt.Z,{image:Qt.Z.PRESENTED_IMAGE_SIMPLE,description:$t("No data"),style:{margin:0}})}),disabled:!0}},lo=350,Do=new Map,Zo=function(pt){var $t=pt.menu,Bn=K()(pt,br),wn=(0,z.Zr)(),er=(0,g.useState)(!1),Jn=A()(er,2),ar=Jn[0],lr=Jn[1],dr=(0,g.useState)(new Set),Or=A()(dr,2),$r=Or[0],ro=Or[1],fr=(0,g.useState)([]),An=A()(fr,2),Et=An[0],sn=An[1],Fn=(0,g.useState)(!1),zn=A()(Fn,2),Cn=zn[0],qn=zn[1],tr=mr(),pr=wn.translate.bind(wn),Rr=$t.items,Br=$t.keepDropdownOpen,Ar=$t.persistKey,gr=$t.stateVersion,kr=$t.refreshKeys,Nr=K()($t,Jr),Vr=Wr(ar,Et,gr,$r,kr),io=Vr.loadedChildren,ao=Vr.loadingKeys,Yr=Vr.handleLoadChildren,Fo=eo(),Oo=Fo.searchValues,Ro=Fo.isSearching,wo=Fo.updateSearchValue,jo=Lr(),Go=jo.requestKeepOpen,Qo=jo.shouldPreventClose;fo(ar,tr),(0,g.useEffect)(function(){if(Ar){var qo=Do.get(Ar)||0;qo>Date.now()&&lr(!0)}},[Ar]),(0,g.useEffect)(function(){return function(){if(Ar&&ar){var qo=Date.now()+lo;Do.set(Ar,qo),setTimeout(function(){var Ho=Do.get(Ar)||0;Ho<=Date.now()&&Do.delete(Ar)},lo+100)}}},[Ar,ar]),(0,g.useEffect)(function(){var qo=function(){var Ho=H()(ce()().mark(function ha(){var la,Yo;return ce()().wrap(function(ma){for(;;)switch(ma.prev=ma.next){case 0:if(typeof Rr!="function"){ma.next=17;break}if(qn(!0),ma.prev=2,Yo=Rr(),!(Yo instanceof Promise)){ma.next=10;break}return ma.next=7,Yo;case 7:ma.t0=ma.sent,ma.next=11;break;case 10:ma.t0=Yo;case 11:la=ma.t0;case 12:return ma.prev=12,qn(!1),ma.finish(12);case 15:ma.next=18;break;case 17:la=Rr;case 18:sn(la);case 19:case"end":return ma.stop()}},ha,null,[[2,,12,15]])}));return function(){return Ho.apply(this,arguments)}}();ar&&qo()},[ar,gr,Rr]);function ho(qo,Ho,ha,la,Yo,Ea){var ma=ha,Fa=Oo[ma]||"",ai=Fa?function Ja(Ha){var qa=Fa.toLowerCase(),Oa=function(ii){return ii?typeof ii=="string"?ii:String(ii):""};return Ha.map(function(Ya){var ii=Oa(Ya.label).toLowerCase(),_i=ii.includes(qa)||Ya.key&&String(Ya.key).toLowerCase().includes(qa);if(Ya.type==="group"&&Array.isArray(Ya.children)){var Fi=Ja(Ya.children);return _i||Fi.length>0?j()(j()({},Ya),{},{children:Fi}):null}return _i?Ya:null}).filter(Boolean)}(qo):qo,Ta=Ea(ai,[].concat(I()(la),[Ho.key])),wa=Ao(Ho,ma,Fa,Yo,pr,wo),ui={key:"".concat(ha,"-search-divider"),type:"divider"};return Fa&&Ta.length===0?[wa,ui,vo(ha,pr)]:[wa,ui].concat(I()(Ta))}var Bo=function qo(Ho){var ha=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Ho.map(function(la){var Yo=zr(ha,la.key),Ea=la.type==="group",ma=typeof la.children=="function",Fa=ao.has(Yo),ai=io[Yo],Ta=!Ea&&ar&&$r.has(Yo)&&ma&&!ai&&!Fa;Ta&&Yr(Yo,la.children);var wa;if(ma?wa=ai??[]:Array.isArray(la.children)&&(wa=la.children),ma&&!ai&&(wa=[{key:"".concat(Yo,"-loading"),label:(0,n.jsx)(Er.Z,{size:"small"}),disabled:!0}]),Ea){ma&&!ai&&ar&&Yr(Yo,la.children);var ui=wa?qo(wa,[].concat(I()(ha),[la.key])):[];return la.searchable&&wa&&(ui=ho(wa,la,Yo,ha,ar,qo)),{type:"group",key:Yo,label:typeof la.label=="string"?pr(la.label):la.label,children:ui}}return la.type==="divider"?{type:"divider",key:Yo}:la.searchable&&wa?{key:la.key,label:typeof la.label=="string"?pr(la.label):la.label,onClick:function(Ha){},onMouseEnter:function(){ro(function(Ha){if(Ha.has(Yo))return Ha;var qa=new Set(Ha);return qa.add(Yo),qa})},children:ho(wa,la,Yo,ha,ar,qo)}:{key:Yo,label:typeof la.label=="string"?pr(la.label):la.label,onClick:function(Ha){var qa,Oa,Ya;if(!wa){var ii=(qa=(Oa=la.keepDropdownOpen)!==null&&Oa!==void 0?Oa:Br)!==null&&qa!==void 0?qa:!1;ii&&Go();var _i=j()(j()({},Ha),{},{item:Ha.item||la,originalItem:la,keepDropdownOpen:ii});(Ya=$t.onClick)===null||Ya===void 0||Ya.call($t,_i)}},onMouseEnter:function(){ro(function(Ha){if(Ha.has(Yo))return Ha;var qa=new Set(Ha);return qa.add(Yo),qa})},children:wa&&wa.length>0?qo(wa,[].concat(I()(ha),[la.key])):wa&&wa.length===0?[vo(Yo,pr)]:void 0}})},na=(0,g.useMemo)(function(){return(0,Ot.css)(Fr||(Fr=ht()([`
|
|
2219
2219
|
.ant-dropdown-menu {
|
|
2220
2220
|
max-height: `,`px;
|
|
2221
2221
|
overflow-y: auto;
|
|
@@ -2269,4 +2269,4 @@ ctx.element.innerHTML = \`
|
|
|
2269
2269
|
Examples:
|
|
2270
2270
|
- Modal with params: await ctx.openView("user-detail", { params: { id: 123 }, mode: "modal", title: "User Details", width: 800 })
|
|
2271
2271
|
- Drawer (default): await ctx.openView("settings-page")
|
|
2272
|
-
- Page navigation: await ctx.openView("dashboard", { mode: "page" })`,detail:"Promise<void>",completion:{insertText:"await ctx.openView('view-id', { mode: 'drawer', params: {} })"}}}}),o.Uo.define({label:"RunJS \u57FA\u7840",properties:{logger:'Pino \u65E5\u5FD7\u5B9E\u4F8B\uFF08\u7ED3\u6784\u5316\u65E5\u5FD7\uFF09\u3002\u793A\u4F8B\uFF1A`ctx.logger.info({ foo: 1 }, "message")`',message:'Ant Design \u5168\u5C40\u6D88\u606F API\uFF0C\u7528\u4E8E\u663E\u793A\u4E34\u65F6\u63D0\u793A\u3002\u793A\u4F8B\uFF1A`ctx.message.success("\u64CD\u4F5C\u6210\u529F")`',notification:'Ant Design \u901A\u77E5 API\uFF0C\u7528\u4E8E\u663E\u793A\u901A\u77E5\u6846\u3002\u793A\u4F8B\uFF1A`ctx.notification.open({ message: "\u6807\u9898", description: "\u5185\u5BB9" })`',resource:"\u57FA\u4E8E\u5F53\u524D\u7528\u6237\u6743\u9650\u53EF\u8BBF\u95EE\u7684\u6570\u636E\u8D44\u6E90",urlSearchParams:"\u5F53\u524D URL \u7684\u67E5\u8BE2\u53C2\u6570\uFF08URLSearchParams \u5BF9\u8C61\uFF09",token:"\u5F53\u524D\u4F1A\u8BDD\u7684 API \u8BA4\u8BC1 token",role:"\u5F53\u524D\u7528\u6237\u89D2\u8272\u4FE1\u606F",auth:"\u8BA4\u8BC1\u4E0A\u4E0B\u6587\uFF0C\u5305\u542B locale\u3001role\u3001user\u3001token \u7B49\u4FE1\u606F",api:{description:"\u7528\u4E8E\u53D1\u8D77 HTTP \u8BF7\u6C42\u7684 APIClient \u5B9E\u4F8B",detail:"APIClient",properties:{request:{description:"\u901A\u8FC7 ctx.api.request \u53D1\u8D77 HTTP \u8BF7\u6C42\uFF0C\u5165\u53C2\u4E3A RequestOptions\uFF0C\u8FD4\u56DE Promise\u3002",detail:"Promise<any>",completion:{insertText:"await ctx.api.request({ url: '', method: 'get', params: {} })"}}}},i18n:{description:"i18next \u5B9E\u4F8B\uFF0C\u53EF\u7528\u4E8E\u7BA1\u7406\u56FD\u9645\u5316",detail:"i18next",properties:{language:"\u5F53\u524D\u6FC0\u6D3B\u7684\u8BED\u8A00\u4EE3\u7801"}},React:"React \u547D\u540D\u7A7A\u95F4\uFF0C\u63D0\u4F9B React \u51FD\u6570\u4E0E hooks\uFF08RunJS \u73AF\u5883\u4E2D\u53EF\u7528\uFF09",ReactDOM:"ReactDOM \u5BA2\u6237\u7AEF API\uFF0C\u542B createRoot \u7B49\u6E32\u67D3\u65B9\u6CD5",antd:"Ant Design \u7EC4\u4EF6\u5E93\uFF08RunJS \u73AF\u5883\u4E2D\u53EF\u7528\uFF09"},methods:{t:'\u56FD\u9645\u5316\u51FD\u6570\uFF0C\u7528\u4E8E\u7FFB\u8BD1\u6587\u6848\u3002\u53C2\u6570\uFF1A(key: string, variables?: object) => string\u3002\u793A\u4F8B\uFF1A`ctx.t("\u4F60\u597D {name}", { name: "\u4E16\u754C" })`',requireAsync:'\u6309 URL \u5F02\u6B65\u52A0\u8F7D\u5916\u90E8\u5E93\u3002\u53C2\u6570\uFF1A(url: string) => Promise<any>\u3002\u793A\u4F8B\uFF1A`const lodash = await ctx.requireAsync("https://cdn.jsdelivr.net/npm/lodash")`',importAsync:'\u6309 URL \u52A8\u6001\u5BFC\u5165 ESM \u6A21\u5757\uFF08\u5F00\u53D1/\u751F\u4EA7\u5747\u53EF\u7528\uFF09\u3002\u53C2\u6570\uFF1A(url: string) => Promise<Module>\u3002\u793A\u4F8B\uFF1A`const mod = await ctx.importAsync("https://cdn.jsdelivr.net/npm/lit-html@2/+esm")`',resolveJsonTemplate:"\u89E3\u6790\u542B {{ }} \u53D8\u91CF\u8868\u8FBE\u5F0F\u7684 JSON \u6A21\u677F\u3002\u53C2\u6570\uFF1A(template: any, context?: object) => any",runAction:{description:'\u5BF9\u5F53\u524D\u8D44\u6E90\u6267\u884C\u6570\u636E\u52A8\u4F5C\u3002\u53C2\u6570\uFF1A(actionName: string, params: object) => Promise<any>\u3002\u793A\u4F8B\uFF1A`await ctx.runAction("create", { values: { name: "test" } })`',detail:"Promise<any>",completion:{insertText:"await ctx.runAction('create', { values: {} })"}},openView:{description:"\u6839\u636E\u552F\u4E00\u6807\u8BC6\u6253\u5F00\u89C6\u56FE\uFF08\u9875\u9762/\u5F39\u7A97/\u62BD\u5C49\uFF09\u3002\u53C2\u6570\uFF1A(viewId: string, options?: OpenViewOptions) => Promise<void>`\uFF0C\u5E38\u7528\u9009\u9879\uFF1Aparams\u3001mode\u3001title\u3001width\u3001navigation\u3001preventClose\u3001viewUid\u3001isMobileLayout\u3002",detail:"Promise<void>",completion:{insertText:"await ctx.openView('view-id', { mode: 'drawer', params: {} })"}}}},{locale:"zh-CN"})}var b=e(57930),j=!1;function f(){return g.apply(this,arguments)}function g(){return g=m()(a()().mark(function n(){var M,T,u,r,A,y,K,R,Y,x;return a()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(!j){F.next=2;break}return F.abrupt("return");case 2:return N(),F.next=5,Promise.all([b("imported_1c9ja9j_component",e.e(95).then(e.bind(e,10095))),b("imported_13i6jpv_component",e.e(113).then(e.bind(e,40113))),b("imported_-11lme08_component",e.e(1442).then(e.bind(e,41442))),b("imported_-omm1q9_component",e.e(4727).then(e.bind(e,64727))),b("imported_-1v4l8a_component",e.e(7087).then(e.bind(e,67087))),b("imported_ng0n4j_component",e.e(5013).then(e.bind(e,55013))),b("imported_8ja8bj_component",e.e(689).then(e.bind(e,689)))]);case 5:M=F.sent,T=l()(M,7),u=T[0].JSBlockRunJSContext,r=T[1].JSFieldRunJSContext,A=T[2].JSItemRunJSContext,y=T[3].JSColumnRunJSContext,K=T[4].FormJSFieldItemRunJSContext,R=T[5].JSRecordActionRunJSContext,Y=T[6].JSCollectionActionRunJSContext,x="v1",z.e.register(x,"*",o.Uo),z.e.register(x,"JSBlockModel",u,{scenes:["block"]}),z.e.register(x,"JSFieldModel",r,{scenes:["detail"]}),z.e.register(x,"JSItemModel",A,{scenes:["form"]}),z.e.register(x,"JSColumnModel",y,{scenes:["table"]}),z.e.register(x,"FormJSFieldItemModel",K,{scenes:["form"]}),z.e.register(x,"JSRecordActionModel",R,{scenes:["table"]}),z.e.register(x,"JSCollectionActionModel",Y,{scenes:["table"]}),j=!0;case 24:case"end":return F.stop()}},n)})),g.apply(this,arguments)}},81886:function(_t,ve,e){"use strict";e.d(ve,{L:function(){return f}});var q=e(15009),a=e.n(q),X=e(99289),l=e.n(X),P=e(97857),m=e.n(P),z=["belongsTo","hasOne","hasMany","belongsToMany","belongsToArray"],o=["integer","float","double","decimal"];function N(g){var n=j(g);if(g.isAssociationField()){var M=g.targetCollection;return M?m()(m()({type:"object"},n),{},{properties:function(){var T=l()(a()().mark(function r(){var A;return a()().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return A={},M.fields.forEach(function(R){A[R.name]=N(R)}),K.abrupt("return",A);case 3:case"end":return K.stop()}},r)}));function u(){return T.apply(this,arguments)}return u}()}):m()({type:"object"},n)}return m()({type:b(g)},n)}function b(g){var n=g.type;if(z.includes(n))return"object";if(o.includes(n))return"number";switch(n){case"boolean":return"boolean";case"json":return"object";case"array":return"array";default:return"string"}}function j(g){return{title:g.title||g.name,interface:g.interface,uiSchema:g.uiSchema||{}}}function f(g,n){var M=function(){var T=l()(a()().mark(function u(){var r;return a()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(r=typeof g=="function"?g():g,r){y.next=3;break}return y.abrupt("return",null);case 3:return y.abrupt("return",{type:"object",title:n||r.title||r.name,properties:function(){var K=l()(a()().mark(function Y(){var x;return a()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return x={},r.fields.forEach(function(v){x[v.name]=N(v)}),F.abrupt("return",x);case 3:case"end":return F.stop()}},Y)}));function R(){return K.apply(this,arguments)}return R}()});case 4:case"end":return y.stop()}},u)}));return function(){return T.apply(this,arguments)}}();return M.title=n,M}},27482:function(_t,ve,e){"use strict";e.d(ve,{N:function(){return T},i:function(){return M}});var q=e(72004),a=e.n(q),X=e(12444),l=e.n(X),P=e(25098),m=e.n(P),z=e(31996),o=e.n(z),N=e(26037),b=e.n(N),j=e(12665),f=e.n(j),g=e(9783),n=e.n(g),M=function(u){o()(A,u);var r=b()(A);function A(y,K,R){var Y;return l()(this,A),Y=r.call(this,R||"Flow '".concat(y,"' on model '").concat(K,"' exited via ctx.exit().")),n()(m()(Y),"flowKey",void 0),n()(m()(Y),"modelUid",void 0),Y.name="FlowExitException",Y.flowKey=y,Y.modelUid=K,Y}return a()(A)}(f()(Error)),T=function(u){o()(A,u);var r=b()(A);function A(y,K,R){var Y;return l()(this,A),Y=r.call(this,R||"Flow '".concat(y,"' on model '").concat(K,"' exited via ctx.exitAll().")),n()(m()(Y),"flowKey",void 0),n()(m()(Y),"modelUid",void 0),Y.name="FlowExitAllException",Y.flowKey=y,Y.modelUid=K,Y}return a()(A)}(f()(Error))},65247:function(_t,ve,e){"use strict";e.d(ve,{vy:function(){return X},$W:function(){return a},Np:function(){return q},ie:function(){return b.i},Ix:function(){return P},Yp:function(){return d.Yp},E2:function(){return D},N3:function(){return d.N3},QS:function(){return i},LR:function(){return c.L},RB:function(){return d.RB},a9:function(){return d.a9},uh:function(){return k},T:function(){return G},bU:function(){return j},xv:function(){return N},v9:function(){return p},_6:function(){return d._6},gn:function(){return d.gn},sy:function(){return C},Zx:function(){return t},xG:function(){return o},sg:function(){return d.sg},tv:function(){return f},n9:function(){return h},wH:function(){return U},cO:function(){return g.cO},nw:function(){return g.nw},HA:function(){return g.HA},ME:function(){return I},hj:function(){return B},Qs:function(){return S},ZQ:function(){return R.Z},KL:function(){return N}});var q="flow-engine",a={DATA:"dataBlocks",FILTER:"filterBlocks",OTHER:"otherBlocks"},X={data:{key:a.DATA,label:"Data blocks",type:"group",hasCurrentFlowContext:!0},filter:{key:a.FILTER,label:"Filter blocks",type:"group",hasCurrentFlowContext:!1},other:{key:a.OTHER,label:"Other blocks",type:"group",hasCurrentFlowContext:!1}},l=null,P={CURRENT_RECORD:"currentRecord",ASSOCIATION_RECORDS:"associationRecords",OTHER_RECORDS:"otherRecords",OTHER_COLLECTIONS:"otherCollections",CURRENT_COLLECTIONS:"currentCollections"},m=e(97857),z=e.n(m);function o($){var V;return(V=$.flowEngine)!==null&&V!==void 0&&V.translate?function(J,ne){return $.flowEngine.translate(J,z()({ns:[q,"client"],nsMode:"fallback"},ne))}:function(J){return J}}function N($,V){return V?"{{t(".concat(JSON.stringify($),", ").concat(JSON.stringify(V),")}}"):"{{t(".concat(JSON.stringify($),")}}")}var b=e(27482);function j($){return $}function f($,V){if($===V)return!1;if($.prototype instanceof V)return!0;for(var J=Object.getPrototypeOf($.prototype);J&&J!==Object.prototype;){if(J.constructor===V)return!0;J=Object.getPrototypeOf(J)}return!1}var g=e(26233),n=e(15009),M=e.n(n),T=e(52677),u=e.n(T),r=e(99289),A=e.n(r),y=e(33833),K=e(1772),R=e(2991);function Y($,V){return x.apply(this,arguments)}function x(){return x=A()(M()().mark(function $(V,J){var ne;return M()().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(V){Q.next=2;break}return Q.abrupt("return",{});case 2:if(typeof V!="function"){Q.next=14;break}return Q.prev=3,Q.next=6,V(J);case 6:return ne=Q.sent,Q.abrupt("return",ne||{});case 10:return Q.prev=10,Q.t0=Q.catch(3),console.error("Error resolving uiSchema function:",Q.t0),Q.abrupt("return",{});case 14:return Q.abrupt("return",V);case 15:case"end":return Q.stop()}},$,null,[[3,10]])})),x.apply(this,arguments)}function B($,V){return F.apply(this,arguments)}function F(){return F=A()(M()().mark(function $(V,J){var ne;return M()().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(V){Q.next=2;break}return Q.abrupt("return","dialog");case 2:if(typeof V!="function"){Q.next=14;break}return Q.prev=3,Q.next=6,V(J);case 6:return ne=Q.sent,Q.abrupt("return",ne||"dialog");case 10:return Q.prev=10,Q.t0=Q.catch(3),console.error("Error resolving uiMode function:",Q.t0),Q.abrupt("return","dialog");case 14:return Q.abrupt("return",V);case 15:case"end":return Q.stop()}},$,null,[[3,10]])})),F.apply(this,arguments)}var v={};function i($,V){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ne=J.noCache,ee=ne===void 0?!1:ne,Q=function(w){var Z=/\{\{.*?\}\}/g;return Z.test(w)},W=function(w){var Z=!1,te;if(typeof w=="string"&&w.startsWith("{{")&&(Z=!0,te=w),w&&u()(w)==="object"&&!Array.isArray(w)){try{te=JSON.stringify(w)}catch(oe){return console.warn("Failed to stringify:",oe),w}if(v[te])return v[te];Z=Q(te)}if(Array.isArray(w)){try{te=JSON.stringify(w)}catch(oe){return console.warn("Failed to stringify:",oe),w}if(v[te])return v[te];Z=Q(te)}if(Z){if(!te)try{return y.Schema.compile(w,$)}catch(oe){return console.warn("Failed to compile with Formily Schema.compile:",oe),w}try{return ee?y.Schema.compile(w,$):(v[te]=v[te]||y.Schema.compile(w,$),v[te])}catch(oe){console.log("compileUiSchema error",w,oe);try{return y.Schema.compile(w,$)}catch{return w}}}return w};return W(V)}function I($,V,J){return O.apply(this,arguments)}function O(){return O=A()(M()().mark(function $(V,J,ne){var ee,Q,W,L,w,Z;return M()().wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(ee=new K.P$(V,J.key,"settings"),(0,R.Z)(ee,J.steps,V,J.key),ee.defineProperty("currentStep",{value:ne}),Q=ne.uiSchema,ne.use)try{w=(W=V.flowEngine)===null||W===void 0||(L=W.getAction)===null||L===void 0?void 0:L.call(W,ne.use),w&&w.uiSchema&&(Q=Q||w.uiSchema)}catch(fe){console.warn("Failed to get action ".concat(ne.use,":"),fe)}return oe.next=7,Y(Q||{},ee);case 7:if(Z=oe.sent,Object.keys(Z).length!==0){oe.next=10;break}return oe.abrupt("return",null);case 10:return oe.abrupt("return",Z);case 11:case"end":return oe.stop()}},$)})),O.apply(this,arguments)}var c=e(81886),d=e(16184);function p($){if(typeof $!="string")return null;var V=$.trim(),J=/^\{\{\s*ctx(?:\.(.+?))?\s*\}\}$/,ne=V.match(J);if(!ne)return null;var ee=ne[1];return ee?ee.split(".").map(function(Q){return Q.trim()}).filter(function(Q){return Q.length>0}):[]}function C($){return $.length===0?"{{ ctx }}":"{{ ctx.".concat($.join(".")," }}")}function h($){if(typeof $!="string")return!1;var V=$.trim(),J=/^\{\{\s*ctx(?:\..+?)?\s*\}\}$/;return J.test(V)}var E=new WeakMap;function S($,V){E.set($,V??null)}function t($){var V;return(V=E.get($))!==null&&V!==void 0?V:null}function D($){E.delete($)}var U=function(V){if(!V||V==="/")return[];var J=V.replace(/^\/+/,"").split("/").filter(Boolean);if(J.length<2)return[];for(var ne=[],ee=null,Q=0;Q<J.length;){var W=J[Q];if(W==="admin"||W==="view")if(ee&&ne.push(ee),Q+1<J.length)ee={viewUid:J[Q+1]},Q+=2;else break;else if(ee&&Q+1<J.length){var L=J[Q+1];switch(W){case"tab":ee.tabUid=L;break;case"filterbytk":ee.filterByTk=L;break;case"sourceid":ee.sourceId=L;break;default:break}Q+=2}else Q++}return ee&&ne.push(ee),ne};function G($){var V=function(){return"".concat(window.location.origin).concat(window.location.pathname)},J=function(L,w,Z){var te=function(le){try{var ue=new URL(le,V()),me=ue.protocol.toLowerCase();return me==="about:"?ue.href==="about:blank":me==="http:"||me==="https:"}catch{return!1}};if(!te(L))throw new Error("Unsafe URL: window.open only allows http/https/about:blank.");var oe="_blank",fe=function(le){var ue=new Set;return le&&le.split(",").map(function(me){return me.trim()}).filter(Boolean).forEach(function(me){var se=me.split("=")[0].trim().toLowerCase();se!=="noopener"&&se!=="noreferrer"&&ue.add(me)}),ue.add("noopener"),ue.add("noreferrer"),Array.from(ue).join(",")},xe=fe(Z),he=window.open.call(window,L,oe,xe);if(he&&"opener"in he)try{he.opener=null}catch{}return he},ne=function(L,w){var Z=new URL(L,V()),te=Z.protocol.toLowerCase(),oe=te==="about:"&&Z.href==="about:blank",fe=te==="http:"||te==="https:";if(!fe&&!oe)throw new Error("Unsafe URL: only http/https/about:blank are allowed.");if(oe)return w!=null&&w.replace?window.location.replace("about:blank"):window.location.assign("about:blank");var xe=Z.protocol===window.location.protocol&&Z.hostname===window.location.hostname&&Z.port===window.location.port;if(xe)return w!=null&&w.replace?window.location.replace(Z.href):window.location.assign(Z.href);var he=J(Z.href);if(!he)throw new Error("Popup blocked: cross-origin navigation is opened in a new tab.")},ee=new Proxy({},{get:function(L,w){switch(w){case"origin":return window.location.origin;case"protocol":return window.location.protocol;case"host":return window.location.host;case"hostname":return window.location.hostname;case"port":return window.location.port;case"pathname":return window.location.pathname;case"assign":return function(Z){return ne(Z,{replace:!1})};case"replace":return function(Z){return ne(Z,{replace:!0})};case"reload":throw new Error("Access to location.reload is not allowed.");case"href":throw new Error("Reading location.href is not allowed.");default:throw new Error('Access to location property "'.concat(w,'" is not allowed.'))}},set:function(L,w,Z){if(w==="href")return ne(String(Z),{replace:!1}),!0;throw new Error("Mutation on location is not allowed.")}}),Q=z()({setTimeout:window.setTimeout.bind(window),clearTimeout:window.clearTimeout.bind(window),setInterval:window.setInterval.bind(window),clearInterval:window.clearInterval.bind(window),console,Math,Date,addEventListener:addEventListener.bind(window),open:J,location:ee},$||{});return new Proxy({},{get:function(L,w){if(w in Q)return Q[w];throw new Error('Access to global property "'.concat(w,'" is not allowed.'))}})}function k($){var V=z()({createElement:document.createElement.bind(document),querySelector:document.querySelector.bind(document),querySelectorAll:document.querySelectorAll.bind(document)},$||{});return new Proxy({},{get:function(ne,ee){if(ee in V)return V[ee];throw new Error('Access to document property "'.concat(ee,'" is not allowed.'))}})}},26233:function(_t,ve,e){"use strict";e.d(ve,{HA:function(){return B},cO:function(){return r},nw:function(){return T},rz:function(){return x}});var q=e(19632),a=e.n(q),X=e(52677),l=e.n(X),P=e(15009),m=e.n(P),z=e(96695),o=e.n(z),N=e(5574),b=e.n(N),j=e(99289),f=e.n(j),g=e(96486),n=e.n(g),M=e(20301);function T(p,C){return u.apply(this,arguments)}function u(){return u=f()(m()().mark(function p(C,h){var E;return m()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(C){t.next=2;break}return t.abrupt("return",{});case 2:if(typeof C!="function"){t.next=14;break}return t.prev=3,t.next=6,C(h);case 6:return E=t.sent,t.abrupt("return",E||{});case 10:return t.prev=10,t.t0=t.catch(3),console.error("Error resolving defaultParams function:",t.t0),t.abrupt("return",{});case 14:return t.abrupt("return",C);case 15:case"end":return t.stop()}},p,null,[[3,10]])})),u.apply(this,arguments)}function r(p,C,h){return A.apply(this,arguments)}function A(){return A=f()(m()().mark(function p(C,h,E){var S;return m()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(C){D.next=2;break}return D.abrupt("return",{});case 2:if(typeof C!="function"){D.next=14;break}return D.prev=3,D.next=6,C(h,E);case 6:return S=D.sent,D.abrupt("return",S||{});case 10:return D.prev=10,D.t0=D.catch(3),console.error("Error resolving createModelOptions function:",D.t0),D.abrupt("return",{});case 14:return D.abrupt("return",C);case 15:case"end":return D.stop()}},p,null,[[3,10]])})),A.apply(this,arguments)}var y={queue:[],timer:null,inflightByRun:new Map},K=10;function R(p){if(Array.isArray(p))return p.map(R);if(n().isPlainObject(p)){var C=Object.entries(p).map(function(E){var S=b()(E,2),t=S[0],D=S[1];return[t,R(D)]}),h=n().sortBy(C,function(E){var S=b()(E,1),t=S[0];return t});return Object.fromEntries(h)}return p}function Y(p){try{return JSON.stringify(R(p))}catch{try{return JSON.stringify(p)}catch{return String(p)}}}function x(p,C){var h=y,E=p.runId||"GLOBAL",S=Y(C),t=h.inflightByRun.get(E);t||(t=new Map,h.inflightByRun.set(E,t));var D=t.get(S);if(D)return D;var U,G,k=new Promise(function(ne,ee){U=ne,G=ee});t.set(S,k);var $="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)),V={id:$,ctx:p,payload:C,resolve:U,reject:G,runId:E,dedupKey:S};h.queue.push(V);var J=function(){var ne=f()(m()().mark(function ee(){var Q,W,L,w,Z,te,oe,fe,xe,he,ie,le,ue,me,se,ae,Ee,Pe,De,Fe,ye,be,ce,pe,H,ge,de,Ce,we,$e,Je,rt,je;return m()().wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(W=h.queue.splice(0,h.queue.length),h.timer=null,W.length){Ue.next=4;break}return Ue.abrupt("return");case 4:if(L=(Q=W[0].ctx)===null||Q===void 0?void 0:Q.api,L){Ue.next=9;break}w=o()(W);try{for(w.s();!(Z=w.n()).done;){te=Z.value;try{te.resolve(te.payload.template)}catch(Oe){te.reject(Oe)}finally{(oe=h.inflightByRun.get(te.runId))===null||oe===void 0||oe.delete(te.dedupKey)}}}catch(Oe){w.e(Oe)}finally{w.f()}return Ue.abrupt("return");case 9:return Ue.prev=9,he=W.map(function(Oe){return{id:Oe.id,template:Oe.payload.template,contextParams:Oe.payload.contextParams||{}}}),Ue.next=13,L.request({method:"POST",url:"variables:resolve",data:{values:{batch:he}}});case 13:ie=Ue.sent,le=(fe=ie.data)!==null&&fe!==void 0?fe:ie,ue=(xe=le.data)!==null&&xe!==void 0?xe:le,me=ue==null?void 0:ue.results,se=Array.isArray(me)?me:Array.isArray(ue)?ue:[],ae=new Map,Ee=o()(se);try{for(Ee.s();!(Pe=Ee.n()).done;)De=Pe.value,Fe=(De==null?void 0:De.id)!=null?String(De.id):"",Fe&&ae.set(Fe,De==null?void 0:De.data)}catch(Oe){Ee.e(Oe)}finally{Ee.f()}ye=o()(W);try{for(ye.s();!(be=ye.n()).done;){ce=be.value;try{pe=String(ce.id),H=ae.has(pe)?ae.get(pe):ce.payload.template,ce.resolve(H)}catch(Oe){ce.reject(Oe)}finally{(ge=h.inflightByRun.get(ce.runId))===null||ge===void 0||ge.delete(ce.dedupKey)}}}catch(Oe){ye.e(Oe)}finally{ye.f()}Ue.next=29;break;case 25:Ue.prev=25,Ue.t0=Ue.catch(9),de=o()(W);try{for(de.s();!(Ce=de.n()).done;){we=Ce.value;try{p==null||($e=p.logger)===null||$e===void 0||(Je=(rt=$e).warn)===null||Je===void 0||Je.call(rt,{err:Ue.t0},"variables:resolve(batch) failed, fallback"),we.resolve(we.payload.template)}catch(Oe){we.reject(Oe)}finally{(je=h.inflightByRun.get(we.runId))===null||je===void 0||je.delete(we.dedupKey)}}}catch(Oe){de.e(Oe)}finally{de.f()}case 29:case"end":return Ue.stop()}},ee,null,[[9,25]])}));return function(){return ne.apply(this,arguments)}}();return h.timer||(h.timer=setTimeout(J,K)),k}function B(p,C){return F.apply(this,arguments)}function F(){return F=f()(m()().mark(function p(C,h){var E;return m()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return E=function(){var D=f()(m()().mark(function U(G){var k,$,V,J,ne,ee;return m()().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(!(typeof G=="string"&&/\{\{.*?\}\}/.test(G))){W.next=4;break}return W.next=3,c(G,h);case 3:return W.abrupt("return",W.sent);case 4:if(!Array.isArray(G)){W.next=6;break}return W.abrupt("return",Promise.all(G.map(E)));case 6:if(!(G&&l()(G)==="object")){W.next=18;break}k={},$=0,V=Object.entries(G);case 9:if(!($<V.length)){W.next=17;break}return J=b()(V[$],2),ne=J[0],ee=J[1],W.next=13,E(ee);case 13:k[ne]=W.sent;case 14:$++,W.next=9;break;case 17:return W.abrupt("return",k);case 18:return W.abrupt("return",G);case 19:case"end":return W.stop()}},U)}));return function(G){return D.apply(this,arguments)}}(),t.abrupt("return",E(C));case 2:case"end":return t.stop()}},p)})),F.apply(this,arguments)}function v(p,C){return i.apply(this,arguments)}function i(){return i=f()(m()().mark(function p(C,h){var E,S;return m()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,I(C.trim(),h);case 2:return E=D.sent,D.next=5,h.runjs("return ".concat(E),{t:h.t});case 5:return S=D.sent,D.abrupt("return",S!=null&&S.success?S.value:void 0);case 7:case"end":return D.stop()}},p)})),i.apply(this,arguments)}function I(p,C){return O.apply(this,arguments)}function O(){return O=f()(m()().mark(function p(C,h){var E,S,t,D,U,G,k,$,V,J,ne,ee,Q,W,L,w,Z,te,oe,fe,xe,he,ie,le,ue,me;return m()().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:for(E=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*(?:(?:\.[a-zA-Z_$][a-zA-Z0-9_$]*)|(?:\[[^\]]+\]))*)(?!\s*\()/g,S=[],t=new Set;(D=E.exec(C))!==null;)U=D[0],G=D[1],k=G.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)/),k&&($=k[1],V=G.substring($.length),S.push({fullPath:U,firstKey:$,restPath:V}),t.add($));if(S.length!==0){ae.next=6;break}return ae.abrupt("return",C);case 6:J=new Map,ne=o()(t),ae.prev=8,ne.s();case 10:if((ee=ne.n()).done){ae.next=25;break}return Q=ee.value,ae.prev=12,ae.next=15,h[Q];case 15:W=ae.sent,L=W&&W.__isRecordProxy__===!0,J.set(Q,L),ae.next=23;break;case 20:ae.prev=20,ae.t0=ae.catch(12),J.set(Q,!1);case 23:ae.next=10;break;case 25:ae.next=30;break;case 27:ae.prev=27,ae.t1=ae.catch(8),ne.e(ae.t1);case 30:return ae.prev=30,ne.f(),ae.finish(30);case 33:for(S.sort(function(Ee,Pe){return Pe.fullPath.length-Ee.fullPath.length}),w=C,Z=0,te=S;Z<te.length;Z++)oe=te[Z],fe=oe.fullPath,xe=oe.firstKey,he=oe.restPath,ie=J.get(xe)||!1,le=void 0,he===""?le="await ctx.".concat(xe):le=ie?"await (await ctx.".concat(xe,")").concat(he):"(await ctx.".concat(xe,")").concat(he),ue=fe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),me=new RegExp("\\b".concat(ue,"\\b"),"g"),w=w.replace(me,le);return ae.abrupt("return",w);case 37:case"end":return ae.stop()}},p,null,[[8,27,30,33],[12,20]])})),O.apply(this,arguments)}function c(p,C){return d.apply(this,arguments)}function d(){return d=f()(m()().mark(function p(C,h){var E,S,t,D,U,G,k,$,V,J,ne,ee,Q,W,L;return m()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(E=function(oe){var fe=oe.trim().match(/^ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*(?:\.[a-zA-Z_$][a-zA-Z0-9_$]*)*)$/);return fe?fe[1]:null},S=function(){var te=f()(m()().mark(function oe(fe){var xe,he,ie;return m()().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(xe=fe.split("."),he=xe.shift(),he){ue.next=4;break}return ue.abrupt("return",void 0);case 4:return ue.next=6,h[he];case 6:if(ie=ue.sent,xe.length!==0){ue.next=9;break}return ue.abrupt("return",ie);case 9:return ue.abrupt("return",(0,M.getValuesByPath)(ie,xe.join(".")));case 10:case"end":return ue.stop()}},oe)}));return function(fe){return te.apply(this,arguments)}}(),t=C.match(/^\{\{\s*(.+)\s*\}\}$/),!t){Z.next=13;break}if(D=t[1],U=E(D),!U){Z.next=10;break}return Z.next=9,S(U);case 9:return Z.abrupt("return",Z.sent);case 10:return Z.next=12,v(D,h);case 12:return Z.abrupt("return",Z.sent);case 13:G=a()(C.matchAll(/\{\{\s*(.+?)\s*\}\}/g)),k=C,$=o()(G),Z.prev=16,$.s();case 18:if((V=$.n()).done){Z.next=34;break}if(J=b()(V.value,2),ne=J[0],ee=J[1],Q=E(ee),!Q){Z.next=27;break}return Z.next=24,S(Q);case 24:Z.t0=Z.sent,Z.next=30;break;case 27:return Z.next=29,v(ee,h);case 29:Z.t0=Z.sent;case 30:W=Z.t0,W!==void 0&&(L=l()(W)==="object"&&W!==null?JSON.stringify(W):String(W),k=k.replace(ne,L));case 32:Z.next=18;break;case 34:Z.next=39;break;case 36:Z.prev=36,Z.t1=Z.catch(16),$.e(Z.t1);case 39:return Z.prev=39,$.f(),Z.finish(39);case 42:return Z.abrupt("return",k);case 43:case"end":return Z.stop()}},p,null,[[16,36,39,42]])})),d.apply(this,arguments)}},19433:function(_t,ve,e){"use strict";e.d(ve,{A:function(){return b}});var q=e(19632),a=e.n(q),X=e(52677),l=e.n(X),P=e(5574),m=e.n(P);function z(j){var f={};return Object.entries(j||{}).forEach(function(g){var n=m()(g,2),M=n[0],T=n[1];typeof T<"u"&&T!==null&&(f[M]=T)}),f}function o(j,f,g){try{var n,M,T,u,r,A=(n=j.dataSourceManager)===null||n===void 0||(M=n.getDataSource)===null||M===void 0?void 0:M.call(n,f||"main"),y=A==null||(T=A.collectionManager)===null||T===void 0||(u=T.getCollection)===null||u===void 0?void 0:u.call(T,g),K=y==null||(r=y.getPrimaryKey)===null||r===void 0?void 0:r.call(y);return K||"id"}catch{return"id"}}function N(j,f){var g,n;if(f){var M=f.dataSourceKey||"main",T=f.collection||((g=f.record)===null||g===void 0?void 0:g.__collectionName);if(T){var u=o(j,M,T)||"id",r=typeof f.filterByTk<"u"?f.filterByTk:typeof f.id<"u"?f.id:(n=f.record)===null||n===void 0?void 0:n[u];if(!(typeof r>"u"))return z({collection:T,filterByTk:r,dataSourceKey:M,fields:f.fields,appends:f.appends})}}}function b(j){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=function(u){return!u||l()(u)!=="object"?!1:typeof u.collection=="string"&&(typeof u.filterByTk<"u"||typeof u.id<"u"||u.record)},n={},M=function T(u,r){if(g(u)){var A=N(j,u);if(A){var y=r.join(".");n[y]=A}return}if(Array.isArray(u)){for(var K=0;K<u.length;K++)T(u[K],[].concat(a()(r),[String(K)]));return}if(u&&l()(u)==="object"){for(var R=0,Y=Object.entries(u);R<Y.length;R++){var x=m()(Y[R],2),B=x[0],F=x[1];T(F,[].concat(a()(r),[B]))}return}};return M(f,[]),Object.keys(n).length?n:void 0}},2991:function(_t,ve,e){"use strict";e.d(ve,{Z:function(){return P}});var q=e(5574),a=e.n(q),X=e(52677),l=e.n(X);function P(m,z,o,N){var b={},j={},f=function(M){if(Object.prototype.hasOwnProperty.call(z,M)){var T=z[M],u={};if(T.uiSchema&&l()(T.uiSchema)==="object")for(var r=0,A=Object.entries(T.uiSchema);r<A.length;r++){var y=a()(A[r],2),K=y[0],R=y[1];if(R&&l()(R)==="object"){var Y,x=R;u[K]={type:x.type||"any",title:x.title||((Y=x["x-decorator-props"])===null||Y===void 0?void 0:Y.label)||K,interface:x["x-component"],uiSchema:x}}}var B=Object.keys(u).length>0;j[M]={type:"object",title:m.t(T.title)||M,display:B?"default":"none",properties:B?{params:{type:"object",title:"Parameters",display:"flatten",properties:u}}:void 0},b[M]={get params(){return o.getStepParams(N,M)||{}},get uiSchema(){return T.uiSchema},result:void 0}}};for(var g in z)f(g);m.defineProperty("steps",{get:function(){return b}})}},16184:function(_t,ve,e){"use strict";e.d(ve,{N3:function(){return x},RB:function(){return K},Yp:function(){return r},_6:function(){return R},a9:function(){return y},gn:function(){return Y},p7:function(){return T},sg:function(){return M}});var q=e(97857),a=e.n(q),X=e(15009),l=e.n(X),P=e(99289),m=e.n(P),z=e(52677),o=e.n(z),N=e(81886),b=e(19433),j=e(20301);function f(F){return o()(F)==="object"&&F!==null}function g(F){var v=F.resource;return f(v)?v:void 0}function n(F){var v=F.collection;if(f(v)){var i=v;return{name:i.name,dataSourceKey:i.dataSourceKey}}}function M(F){var v,i,I,O=g(F),c=n(F),d=(c==null?void 0:c.name)||(O==null||(v=O.getResourceName)===null||v===void 0?void 0:v.call(O)),p=(c==null?void 0:c.dataSourceKey)||(O==null||(i=O.getDataSourceKey)===null||i===void 0?void 0:i.call(O)),C=O==null||(I=O.getFilterByTk)===null||I===void 0?void 0:I.call(O);if(!(!d||typeof C>"u"||C===null)){var h=String(d).split("."),E=h[h.length-1];return{collection:E,dataSourceKey:p,filterByTk:C}}}function T(F){var v,i,I,O=F.view;if(O){var c=(O==null?void 0:O.inputArgs)||{},d=(c==null?void 0:c.collectionName)||(O==null||(v=O.record)===null||v===void 0?void 0:v.collection),p=(c==null?void 0:c.dataSourceKey)||(O==null||(i=O.record)===null||i===void 0?void 0:i.dataSourceKey)||"main",C=(c==null?void 0:c.filterByTk)||(O==null||(I=O.record)===null||I===void 0?void 0:I.filterByTk),h=c==null?void 0:c.sourceId;if(!(!d||typeof C>"u"||C===null))return{collection:d,dataSourceKey:p,filterByTk:C,sourceId:h}}}function u(F){var v,i,I,O,c=g(F),d=((v=n(F))===null||v===void 0?void 0:v.dataSourceKey)||(c==null||(i=c.getDataSourceKey)===null||i===void 0?void 0:i.call(c)),p=c==null||(I=c.getResourceName)===null||I===void 0?void 0:I.call(c),C=c==null||(O=c.getSourceId)===null||O===void 0?void 0:O.call(c);if(!(!p||typeof C>"u"||C===null)){var h=String(p).split(".");if(!(h.length<2))return{collection:h[0],dataSourceKey:d,filterByTk:C}}}function r(F,v,i){return A.apply(this,arguments)}function A(){return A=m()(l()().mark(function F(v,i,I){var O;return l()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,N.L)(v,i)();case 2:if(O=d.sent,O){d.next=5;break}return d.abrupt("return",null);case 5:return d.abrupt("return",a()(a()({},O),{},{buildVariablesParams:function(C){return I?I(C):M(C)}}));case 6:case"end":return d.stop()}},F)})),A.apply(this,arguments)}function y(F,v,i){var I=function(){var O=m()(l()().mark(function c(){return l()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",r(F,v,i));case 1:case"end":return p.stop()}},c)}));return function(){return O.apply(this,arguments)}}();return I.title=v,I}function K(F,v){var i,I=((i=F.t)===null||i===void 0?void 0:i.call(F,"Current record"))||"Current record";return y(v,I,function(O){return M(O)})}var R=j.extractUsedVariableNames,Y=j.extractUsedVariablePaths;function x(F,v){return B.apply(this,arguments)}function B(){return B=m()(l()().mark(function F(v,i){var I,O,c,d,p,C,h,E,S,t,D,U;return l()().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if(I=(0,j.extractUsedVariablePaths)(i)||{},O=Object.keys(I),O.length){k.next=4;break}return k.abrupt("return",void 0);case 4:c={},d=0,p=O;case 6:if(!(d<p.length)){k.next=37;break}if(h=p[d],E=(C=v.getPropertyOptions)===null||C===void 0?void 0:C.call(v,h),S=E==null?void 0:E.meta,S){k.next=12;break}return k.abrupt("continue",34);case 12:if(t=void 0,k.prev=13,typeof S!="function"){k.next=20;break}return k.next=17,S();case 17:k.t0=k.sent,k.next=21;break;case 20:k.t0=S;case 21:if(D=k.t0,U=D==null?void 0:D.buildVariablesParams,typeof U!="function"){k.next=27;break}return k.next=26,U(v);case 26:t=k.sent;case 27:k.next=33;break;case 29:return k.prev=29,k.t1=k.catch(13),k.t1,k.abrupt("continue",34);case 33:t&&(c[h]=t);case 34:d++,k.next=6;break;case 37:return k.abrupt("return",(0,b.A)(v,c));case 38:case"end":return k.stop()}},F,null,[[13,29]])})),B.apply(this,arguments)}},15827:function(_t,ve,e){"use strict";e.d(ve,{k9:function(){return Pe},I7:function(){return A},Rh:function(){return t},yT:function(){return $},qt:function(){return w},Sv:function(){return he}});var q=e(5574),a=e.n(q),X=e(97857),l=e.n(X),P=e(67294),m=e(22424),z=e(21662),o=e(1772),N=e(43992),b=e(15009),j=e.n(b),f=e(99289),g=e.n(f),n=e(52677),M=e.n(n),T=e(16184);function u(De){if(De===null||M()(De)!=="object")return!1;var Fe=Object.getPrototypeOf(De);return Fe===Object.prototype||Fe===null}function r(De,Fe,ye){var be=M()(De);return De==null?{type:"any",title:Fe}:Array.isArray(De)?{type:"array",title:Fe,properties:function(){var ce=g()(j()().mark(function H(){var ge,de,Ce,we;return j()().wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:for(ge=Math.min(De.length||0,10),de={},Ce=ye??new WeakSet,we=0;we<ge;we++)de[String(we)]=r(De[we],"#".concat(we),Ce);return Je.abrupt("return",de);case 5:case"end":return Je.stop()}},H)}));function pe(){return ce.apply(this,arguments)}return pe}()}:be==="string"?{type:"string",title:Fe}:be==="number"?{type:"number",title:Fe}:be==="boolean"?{type:"boolean",title:Fe}:be==="object"&&u(De)?{type:"object",title:Fe,properties:function(){var ce=g()(j()().mark(function H(){var ge,de;return j()().wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(ge=ye??new WeakSet,!ge.has(De)){we.next=3;break}return we.abrupt("return",{});case 3:return ge.add(De),de={},Object.keys(De||{}).forEach(function($e){de[$e]=r(De[$e],$e,ge)}),we.abrupt("return",de);case 7:case"end":return we.stop()}},H)}));function pe(){return ce.apply(this,arguments)}return pe}()}:{type:"any",title:Fe}}function A(De){var Fe=De.t("\u5F53\u524D\u89C6\u56FE"),ye=function(){var be=g()(j()().mark(function ce(){var pe;return j()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return pe=De.view,ge.abrupt("return",{type:"object",title:De.t("\u5F53\u524D\u89C6\u56FE"),buildVariablesParams:function(Ce){var we=(0,T.p7)(Ce);if(we)return{record:we}},properties:function(){var de=g()(j()().mark(function we(){var $e,Je,rt,je,Ge,Ue;return j()().wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return je={},Ge=(0,T.p7)(De),Ge&&Ge.collection&&(Ue=function(){var ze=g()(j()().mark(function Xe(){var Ye,Ie,vt,ot,Pt,yt,At,tn;return j()().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(Ht.prev=0,Pt=(0,T.p7)(De),Pt!=null&&Pt.collection){Ht.next=4;break}return Ht.abrupt("return",null);case 4:if(yt=Pt.dataSourceKey||"main",At=(Ye=De.dataSourceManager)===null||Ye===void 0||(Ie=Ye.getDataSource)===null||Ie===void 0?void 0:Ie.call(Ye,yt),tn=At==null||(vt=At.collectionManager)===null||vt===void 0||(ot=vt.getCollection)===null||ot===void 0?void 0:ot.call(vt,Pt.collection),tn){Ht.next=9;break}return Ht.abrupt("return",null);case 9:return Ht.next=11,(0,T.Yp)(function(){return tn},De.t("\u5F53\u524D\u89C6\u56FE\u8BB0\u5F55"),function(gt){return(0,T.p7)(gt)});case 11:return Ht.abrupt("return",Ht.sent);case 14:return Ht.prev=14,Ht.t0=Ht.catch(0),Ht.abrupt("return",null);case 17:case"end":return Ht.stop()}},Xe,null,[[0,14]])}));return function(){return ze.apply(this,arguments)}}(),Ue.title=De.t("\u5F53\u524D\u89C6\u56FE\u8BB0\u5F55"),Ue.hasChildren=!0,je.record=Ue),je.type={type:"string",title:(($e=De.t)===null||$e===void 0?void 0:$e.call(De,"\u7C7B\u578B"))||"\u7C7B\u578B"},je.preventClose={type:"boolean",title:((Je=De.t)===null||Je===void 0?void 0:Je.call(De,"\u662F\u5426\u5141\u8BB8\u5173\u95ED"))||"\u662F\u5426\u5141\u8BB8\u5173\u95ED"},je.inputArgs=r(pe==null?void 0:pe.inputArgs,((rt=De.t)===null||rt===void 0?void 0:rt.call(De,"\u8F93\u5165\u53C2\u6570"))||"\u8F93\u5165\u53C2\u6570"),qe.abrupt("return",je);case 7:case"end":return qe.stop()}},we)}));function Ce(){return de.apply(this,arguments)}return Ce}()});case 2:case"end":return ge.stop()}},ce)}));return function(){return be.apply(this,arguments)}}();return ye.title=Fe,ye}function y(De){var Fe=function(de){return De.t(de)},ye=function(){try{var de,Ce,we,$e,Je=(0,T.p7)(De);if(!(Je!=null&&Je.filterByTk))return null;var rt=(de=De.dataSourceManager)===null||de===void 0||(Ce=de.getDataSource)===null||Ce===void 0?void 0:Ce.call(de,Je.dataSourceKey||"main");return(rt==null||(we=rt.collectionManager)===null||we===void 0||($e=we.getCollection)===null||$e===void 0?void 0:$e.call(we,Je.collection))||null}catch{return null}},be=function(){var ge=g()(j()().mark(function de(Ce){var we,$e,Je,rt,je,Ge,Ue,Oe,qe,ze,Xe,Ye,Ie,vt,ot,Pt;return j()().wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(At.prev=0,Oe=(we=De.view)===null||we===void 0?void 0:we.navigation,qe=Array.isArray(Oe==null?void 0:Oe.viewStack)?Oe.viewStack:[],!(qe.length<2||Ce<1)){At.next=5;break}return At.abrupt("return",void 0);case 5:if(ze=qe.length-1-Ce,!(ze<0)){At.next=8;break}return At.abrupt("return",void 0);case 8:if(Xe=qe[ze],Xe!=null&&Xe.viewUid){At.next=11;break}return At.abrupt("return",void 0);case 11:if(Ye=($e=De.engine)===null||$e===void 0||(Je=$e.getModel)===null||Je===void 0?void 0:Je.call($e,Xe.viewUid),!(!Ye&&typeof((rt=De.engine)===null||rt===void 0?void 0:rt.loadModel)=="function")){At.next=22;break}return At.prev=13,At.next=16,De.engine.loadModel({uid:Xe.viewUid});case 16:Ye=At.sent,At.next=22;break;case 19:At.prev=19,At.t0=At.catch(13),console.warn("[FlowEngine] popup.getParentRecordRef loadModel failed:",At.t0);case 22:if(Ie=((je=Ye)===null||je===void 0||(Ge=je.getStepParams)===null||Ge===void 0?void 0:Ge.call(je,"popupSettings","openView"))||{},vt=Ie==null?void 0:Ie.collectionName,ot=(Ie==null?void 0:Ie.dataSourceKey)||"main",Pt=(Ue=Xe==null?void 0:Xe.filterByTk)!==null&&Ue!==void 0?Ue:Xe==null?void 0:Xe.sourceId,!(!vt||typeof Pt>"u"||Pt===null)){At.next=28;break}return At.abrupt("return",void 0);case 28:return At.abrupt("return",{collection:vt,dataSourceKey:ot,filterByTk:Pt});case 31:return At.prev=31,At.t1=At.catch(0),console.warn("[FlowEngine] popup.getParentRecordRef failed:",At.t1),At.abrupt("return",void 0);case 35:case"end":return At.stop()}},de,null,[[0,31],[13,19]])}));return function(Ce){return ge.apply(this,arguments)}}(),ce=function(de){try{var Ce,we=(Ce=De.view)===null||Ce===void 0?void 0:Ce.navigation,$e=Array.isArray(we==null?void 0:we.viewStack)?we.viewStack:[];return $e.length>=de+1}catch{return!1}},pe=function(de){var Ce=function(){var $e={type:"object",title:Fe("Parent popup"),disabled:function(){return!ce(de)},disabledReason:function(){return ce(de)?void 0:Fe("No parent popup")},properties:function(){var Je=g()(j()().mark(function je(){var Ge,Ue,Oe,qe,ze;return j()().wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Ye.next=2,be(de);case 2:if(Ge=Ye.sent,Ue={},Ue.uid={type:"string",title:Fe("Popup uid")},!Ge){Ye.next=13;break}return Oe=function(){try{var Ie,vt,ot,Pt,yt=(Ie=De.dataSourceManager)===null||Ie===void 0||(vt=Ie.getDataSource)===null||vt===void 0?void 0:vt.call(Ie,Ge.dataSourceKey||"main");return(yt==null||(ot=yt.collectionManager)===null||ot===void 0||(Pt=ot.getCollection)===null||Pt===void 0?void 0:Pt.call(ot,Ge.collection||""))||null}catch{return null}}(),Ye.next=9,(0,T.Yp)(function(){return Oe},Fe("Popup record"),function(){return Ge});case 9:qe=Ye.sent,Ue.record=qe||{type:"object",title:Fe("Popup record")},Ye.next=14;break;case 13:Ue.record={type:"object",title:Fe("Popup record")};case 14:return ze={type:"object",title:Fe("Data source"),properties:function(){var Ie=g()(j()().mark(function ot(){return j()().wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.abrupt("return",{dataSourceKey:{type:"string",title:Fe("Data source key")},collectionName:{type:"string",title:Fe("Collection name")},filterByTk:{type:"string",title:Fe("filterByTk")},sourceId:{type:"string",title:Fe("sourceId")}});case 1:case"end":return yt.stop()}},ot)}));function vt(){return Ie.apply(this,arguments)}return vt}()},Ue.resource=ze,Ye.abrupt("return",Ue);case 17:case"end":return Ye.stop()}},je)}));function rt(){return Je.apply(this,arguments)}return rt}()};return $e};return Ce.title=Fe("Parent popup"),Ce},H=function(){var de={type:"object",title:Fe("Current popup"),buildVariablesParams:function(we){var $e,Je=(0,T.p7)(we),rt=(we==null||($e=we.view)===null||$e===void 0?void 0:$e.inputArgs)||{},je={record:Je};try{var Ge=rt==null?void 0:rt.sourceId,Ue=rt==null?void 0:rt.associationName,Oe=(rt==null?void 0:rt.dataSourceKey)||"main";if(Ge!=null&&Ge!==""&&Ue&&typeof Ue=="string"){var qe=String(Ue).split(".")[0];qe&&(je.sourceRecord={collection:qe,dataSourceKey:Oe,filterByTk:Ge})}}catch{}return je},properties:function(){var Ce=g()(j()().mark(function $e(){var Je,rt,je,Ge,Ue,Oe,qe,ze,Xe,Ye,Ie,vt;return j()().wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return Je={},Je.uid={type:"string",title:Fe("Popup uid")},Pt.next=4,(0,T.Yp)(ye,Fe("Current popup record"),function(yt){return(0,T.p7)(yt)});case 4:if(rt=Pt.sent,rt&&(Je.record=rt),Pt.prev=6,Ge=((je=De.view)===null||je===void 0?void 0:je.inputArgs)||{},Ue=Ge==null?void 0:Ge.sourceId,Oe=Ge==null?void 0:Ge.associationName,qe=(Ge==null?void 0:Ge.dataSourceKey)||"main",!(Ue!=null&&Ue!==""&&Oe&&typeof Oe=="string")){Pt.next=19;break}if(ze=String(Oe).includes(".")?String(Oe).split(".")[0]:void 0,!ze){Pt.next=19;break}return Xe=function(){try{var At,tn,bn,Ht,gt=(At=De.dataSourceManager)===null||At===void 0||(tn=At.getDataSource)===null||tn===void 0?void 0:tn.call(At,qe);return(gt==null||(bn=gt.collectionManager)===null||bn===void 0||(Ht=bn.getCollection)===null||Ht===void 0?void 0:Ht.call(bn,ze))||null}catch{return null}},Pt.next=17,(0,T.Yp)(Xe,Fe("Current popup parent record"),function(){return{collection:ze,dataSourceKey:qe,filterByTk:Ue}});case 17:Ye=Pt.sent,Ye&&(Je.sourceRecord=Ye);case 19:Pt.next=23;break;case 21:Pt.prev=21,Pt.t0=Pt.catch(6);case 23:return Ie={type:"object",title:Fe("Data source"),properties:function(){var yt=g()(j()().mark(function tn(){return j()().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.abrupt("return",{dataSourceKey:{type:"string",title:Fe("Data source key")},collectionName:{type:"string",title:Fe("Collection name")},filterByTk:{type:"string",title:Fe("filterByTk")},sourceId:{type:"string",title:Fe("sourceId")}});case 1:case"end":return Ht.stop()}},tn)}));function At(){return yt.apply(this,arguments)}return At}()},Je.resource=Ie,Pt.next=27,be(1);case 27:return vt=Pt.sent,vt&&(Je.parent=pe(1)),Pt.abrupt("return",Je);case 30:case"end":return Pt.stop()}},$e,null,[[6,21]])}));function we(){return Ce.apply(this,arguments)}return we}()};return de};return H.title=Fe("Current popup"),H.sort=975,H}function K(De,Fe){return R.apply(this,arguments)}function R(){return R=g()(j()().mark(function De(Fe,ye){var be,ce,pe,H,ge;return j()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return ce=ye==null?void 0:ye.navigation,pe=Array.isArray(ce==null?void 0:ce.viewStack)?ce.viewStack:[],H=function(){var we=g()(j()().mark(function $e(Je){var rt,je,Ge,Ue,Oe,qe,ze,Xe,Ye,Ie,vt,ot,Pt,yt,At,tn;return j()().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!(Je<0||!((rt=pe[Je])!==null&&rt!==void 0&&rt.viewUid))){Ht.next=2;break}return Ht.abrupt("return",void 0);case 2:if(Ye=pe[Je].viewUid,Ie=(je=Fe.engine)===null||je===void 0||(Ge=je.getModel)===null||Ge===void 0?void 0:Ge.call(je,Ye),!(!Ie&&typeof((Ue=Fe.engine)===null||Ue===void 0?void 0:Ue.loadModel)=="function")){Ht.next=8;break}return Ht.next=7,(vt=Fe.engine)===null||vt===void 0?void 0:vt.loadModel({uid:Ye});case 7:Ie=Ht.sent;case 8:return ot=((Oe=Ie)===null||Oe===void 0||(qe=Oe.getStepParams)===null||qe===void 0?void 0:qe.call(Oe,"popupSettings","openView"))||{},Pt=ot==null?void 0:ot.collectionName,yt=(ot==null?void 0:ot.dataSourceKey)||"main",At={uid:Ye,resource:{dataSourceKey:yt,collectionName:Pt,filterByTk:(ze=pe[Je])===null||ze===void 0?void 0:ze.filterByTk,sourceId:(Xe=pe[Je])===null||Xe===void 0?void 0:Xe.sourceId}},Ht.next=14,H(Je-1);case 14:return tn=Ht.sent,tn&&(At.parent=tn),Ht.abrupt("return",At);case 17:case"end":return Ht.stop()}},$e)}));return function(Je){return we.apply(this,arguments)}}(),Ce.next=5,H(((ye==null||(be=ye.navigation)===null||be===void 0||(be=be.viewStack)===null||be===void 0?void 0:be.length)||1)-1);case 5:return ge=Ce.sent,Ce.abrupt("return",ge);case 7:case"end":return Ce.stop()}},De)})),R.apply(this,arguments)}function Y(De,Fe){De.defineProperty("popup",{get:function(){var ye=g()(j()().mark(function ce(){return j()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.abrupt("return",K(De,Fe));case 1:case"end":return H.stop()}},ce)}));function be(){return ye.apply(this,arguments)}return be}(),meta:y(De),resolveOnServer:function(be){return be==="record"||(be==null?void 0:be.startsWith("record."))||be==="sourceRecord"||(be==null?void 0:be.startsWith("sourceRecord."))}})}var x=e(13769),B=e.n(x),F=e(5914),v=e(85893),i=["afterClose","footer","header","hidden"],I=(0,P.forwardRef)(function(De,Fe){var ye,be=De.afterClose,ce=De.footer,pe=De.header,H=De.hidden,ge=B()(De,i),de=(0,P.useState)(!0),Ce=a()(de,2),we=Ce[0],$e=Ce[1],Je=(0,P.useState)(ge),rt=a()(Je,2),je=rt[0],Ge=rt[1],Ue=(0,P.useState)(function(){return ce}),Oe=a()(Ue,2),qe=Oe[0],ze=Oe[1],Xe=(0,P.useState)(pe),Ye=a()(Xe,2),Ie=Ye[0],vt=Ye[1];(0,P.useImperativeHandle)(Fe,function(){return{destroy:function(){$e(!1),be==null||be()},update:function(At){return Ge(function(tn){return l()(l()({},tn),At)})},setFooter:function(At){ze(At)},setHeader:function(At){Object.values(At||{}).length===0?vt(null):vt(At)}}});var ot=l()(l()({},je),{},{title:(Ie==null?void 0:Ie.title)||je.title,extra:Ie==null?void 0:Ie.extra,footer:qe!==void 0?qe:(ye=je.footer)!==null&&ye!==void 0?ye:null}),Pt=P.useMemo(function(){return document.querySelector("#nocobase-app-container")},[]);return(0,v.jsx)(F.Z,l()(l()({closable:!1,rootClassName:H?"nb-hidden":"",getContainer:Pt},ot),{},{open:we,onCancel:function(At){var tn;$e(!1),(tn=je.onCancel)===null||tn===void 0||tn.call(je,At)},afterClose:function(){be==null||be()},children:je.children}))}),O=I,c=e(19632),d=e.n(c);function p(){var De=P.useState([]),Fe=a()(De,2),ye=Fe[0],be=Fe[1],ce=P.useCallback(function(pe){return be(function(H){return[].concat(d()(H),[pe])}),function(){be(function(H){return H.filter(function(ge){return ge!==pe})})}},[]);return[ye,ce]}var C=e(24084),h=e(45690);function E(De){var Fe=new h._;De.modelRepository&&Fe.setModelRepository(De.modelRepository),Fe.context.addDelegate(De.context);var ye=new Set(["_modelInstances","_applyFlowCache","executor","context","previousEngine","nextEngine","unlinkFromStack","linkAfter","_previousEngine","_nextEngine"]),be={get:function(pe,H,ge){if(ye.has(H))return Reflect.get(pe,H,ge);var de=Reflect.get(De,H,ge);return H==="registerModels"&&typeof de=="function"?de.bind(De):de},set:function(pe,H,ge){return ye.has(H)?Reflect.set(pe,H,ge):Reflect.set(De,H,ge)},has:function(pe,H){return H in pe||H in De}};return Fe.linkAfter(De),new Proxy(Fe,be)}var S=0;function t(){var De=P.useRef(null),Fe=function(pe,H){var ge,de;S+=1;var Ce=P.createRef(),we,$e,Je=new Promise(function(Ie){$e=Ie}),rt=null,je=null,Ge=function(vt){var ot=vt.children;return P.useEffect(function(){var Pt;return rt=ot,(Pt=Ce.current)===null||Pt===void 0||Pt.setFooter(ot),function(){var yt;rt=null,(yt=Ce.current)===null||yt===void 0||yt.setFooter(null)}},[ot]),null},Ue=function(vt){return P.useEffect(function(){var ot;return je=vt,(ot=Ce.current)===null||ot===void 0||ot.setHeader(vt),function(){var Pt;je=null,(Pt=Ce.current)===null||Pt===void 0||Pt.setHeader(null)}},[vt]),null},Oe={type:"dialog",inputArgs:pe.inputArgs||{},preventClose:!!pe.preventClose,destroy:function(){var vt;return(vt=Ce.current)===null||vt===void 0?void 0:vt.destroy()},update:function(vt){var ot;return(ot=Ce.current)===null||ot===void 0?void 0:ot.update(vt)},close:function(vt,ot){var Pt,yt,At;pe.preventClose&&!ot||((Pt=Ce.current)===null||Pt===void 0||Pt.destroy(),(yt=we)===null||yt===void 0||yt(),(At=$e)===null||At===void 0||At(vt))},Footer:Ge,Header:Ue,setFooter:function(vt){var ot;rt=vt,(ot=Ce.current)===null||ot===void 0||ot.setFooter(vt)},setHeader:function(vt){var ot;je=vt,(ot=Ce.current)===null||ot===void 0||ot.setHeader(vt)},navigation:(ge=pe.inputArgs)===null||ge===void 0?void 0:ge.navigation},qe=new o.iT,ze=E(H.engine);qe.defineProperty("engine",{value:ze}),qe.addDelegate(ze.context),pe.inheritContext!==!1?qe.addDelegate(H):qe.addDelegate(H.engine.context),qe.defineProperty("view",{get:function(){return Oe},resolveOnServer:function(vt){return vt==="record"||vt.startsWith("record.")}}),Y(qe,Oe);var Xe=(0,z.observer)(function(){var Ie,vt,ot=P.useRef(!1),Pt=typeof pe.content=="function"?pe.content(Oe,qe):pe.content,yt=typeof Pt=="string"?(0,v.jsx)("div",{dangerouslySetInnerHTML:{__html:m.Z.sanitize(Pt)}}):Pt;return P.useEffect(function(){var At;(At=pe.onOpen)===null||At===void 0||At.call(pe,Oe,qe)},[]),(Ie=pe.inputArgs)!==null&&Ie!==void 0&&(Ie=Ie.hidden)!==null&&Ie!==void 0&&Ie.value&&!ot.current?null:(ot.current=!0,(0,v.jsx)(O,l()(l()({className:"nb-dialog-overflow-hidden",ref:Ce,hidden:(vt=pe.inputArgs)===null||vt===void 0||(vt=vt.hidden)===null||vt===void 0?void 0:vt.value},pe),{},{footer:rt,header:je,afterClose:function(){var tn,bn,Ht;(tn=we)===null||tn===void 0||tn(),(bn=pe.onClose)===null||bn===void 0||bn.call(pe),(Ht=$e)===null||Ht===void 0||Ht(pe.result),ze.unlinkFromStack()},children:yt}),"dialog-".concat(S)))},{displayName:"DialogWithContext"}),Ye=(0,v.jsx)(C.r6,{engine:ze,children:(0,v.jsx)(N.Y5,{context:qe,children:(0,v.jsx)(Xe,{})})});return we=(de=De.current)===null||de===void 0?void 0:de.patchElement(Ye),Object.assign(Je,Oe)},ye=P.useMemo(function(){return{open:Fe}},[]),be=P.memo(P.forwardRef(function(ce,pe){var H=p(),ge=a()(H,2),de=ge[0],Ce=ge[1];return P.useImperativeHandle(pe,function(){return{patchElement:Ce}},[Ce]),(0,v.jsx)(v.Fragment,{children:de})}));return[ye,(0,v.jsx)(be,{ref:De},"dialog-holder")]}var D=e(95012),U=["children","footer","title","extra","hidden"],G=P.forwardRef(function(De,Fe){var ye,be=De.children,ce=De.footer,pe=De.title,H=De.extra,ge=De.hidden,de=B()(De,U),Ce=P.useState(!0),we=a()(Ce,2),$e=we[0],Je=we[1],rt=P.useState(function(){return ce}),je=a()(rt,2),Ge=je[0],Ue=je[1],Oe=P.useState({title:pe,extra:H}),qe=a()(Oe,2),ze=qe[0],Xe=qe[1];P.useImperativeHandle(Fe,function(){return{destroy:function(){var vt;Je(!1),(vt=de.afterClose)===null||vt===void 0||vt.call(de)},update:function(vt){Object.assign(de,vt)},setFooter:function(vt){Ue(vt)},setHeader:function(vt){Object.values(vt||{}).length===0?Xe(null):Xe(vt)}}},[]);var Ye=P.useMemo(function(){return document.querySelector("#nocobase-app-container")},[]);return(0,v.jsx)(D.Z,l()(l()(l()({rootClassName:ge?"nb-hidden":"",closable:!1,getContainer:Ye},de),{},{open:$e,footer:Ge,styles:l()(l()({},de.styles),{},{footer:l()({display:"flex",justifyContent:"flex-end"},(ye=de.styles)===null||ye===void 0?void 0:ye.footer)})},ze),{},{onClose:function(){var vt;Je(!1),(vt=de.afterClose)===null||vt===void 0||vt.call(de)},children:be}))}),k=G;function $(){var De=P.useRef(null),Fe=P.useMemo(function(){return z.observable.shallow({value:[]})},[]),ye=P.memo(function(H){var ge=H.index,de=P.useState(null),Ce=a()(de,2),we=Ce[0],$e=Ce[1];return P.useEffect(function(){(0,z.autorun)(function(){var Je=Fe.value;Je[ge]&&we!==Je[ge]&&$e(Je[ge]),Je[ge]||$e(null)})},[we,ge]),we?(0,v.jsx)(we,{children:(0,v.jsx)(ye,{index:ge+1})}):null});ye.displayName="RenderNestedDrawer";var be=function(ge,de){var Ce,we,$e=P.createRef(),Je,rt,je=new Promise(function(ot){rt=ot}),Ge=null,Ue=null,Oe=function(Pt){var yt=Pt.children;return P.useEffect(function(){var At;return Ge=yt,(At=$e.current)===null||At===void 0||At.setFooter(yt),function(){var tn;Ge=null,(tn=$e.current)===null||tn===void 0||tn.setFooter(null)}},[yt]),null},qe=function(Pt){return P.useEffect(function(){var yt;return Ue=Pt,(yt=$e.current)===null||yt===void 0||yt.setHeader(Pt),function(){var At;Ue=null,(At=$e.current)===null||At===void 0||At.setHeader(null)}},[Pt]),null},ze={type:"drawer",inputArgs:ge.inputArgs||{},preventClose:!!ge.preventClose,destroy:function(){var Pt;return(Pt=$e.current)===null||Pt===void 0?void 0:Pt.destroy()},update:function(Pt){var yt;return(yt=$e.current)===null||yt===void 0?void 0:yt.update(Pt)},close:function(Pt,yt){var At,tn,bn;ge.preventClose&&!yt||((At=$e.current)===null||At===void 0||At.destroy(),(tn=Je)===null||tn===void 0||tn(),(bn=rt)===null||bn===void 0||bn(Pt))},Footer:Oe,Header:qe,setFooter:function(Pt){var yt;Ge=Pt,(yt=$e.current)===null||yt===void 0||yt.setFooter(Pt)},setHeader:function(Pt){var yt;Ue=Pt,(yt=$e.current)===null||yt===void 0||yt.setHeader(Pt)},navigation:(Ce=ge.inputArgs)===null||Ce===void 0?void 0:Ce.navigation},Xe=new o.iT,Ye=E(de.engine);Xe.defineProperty("engine",{value:Ye}),Xe.addDelegate(Ye.context),ge.inheritContext!==!1?Xe.addDelegate(de):Xe.addDelegate(de.engine.context),Xe.defineProperty("view",{get:function(){return ze},resolveOnServer:function(Pt){return Pt==="record"||Pt.startsWith("record.")}}),Y(Xe,ze);var Ie=P.memo((0,z.observer)(function(ot){var Pt,yt,At=P.useRef(!1),tn=typeof ge.content=="function"?ge.content(ze,Xe):ge.content,bn=typeof tn=="string"?(0,v.jsx)("div",{dangerouslySetInnerHTML:{__html:m.Z.sanitize(tn)}}):tn;return P.useEffect(function(){var Ht;(Ht=ge.onOpen)===null||Ht===void 0||Ht.call(ge,ze,Xe)},[]),(Pt=ge.inputArgs)!==null&&Pt!==void 0&&(Pt=Pt.hidden)!==null&&Pt!==void 0&&Pt.value&&!At.current?(0,v.jsx)(v.Fragment,{children:ot.children}):(At.current=!0,(0,v.jsxs)(k,l()(l()({ref:$e},ge),{},{footer:Ge,header:Ue,hidden:(yt=ge.inputArgs)===null||yt===void 0||(yt=yt.hidden)===null||yt===void 0?void 0:yt.value,afterClose:function(){var gt,We,Be;(gt=Je)===null||gt===void 0||gt(),(We=ge.onClose)===null||We===void 0||We.call(ge),(Be=rt)===null||Be===void 0||Be(ge.result),Ye.unlinkFromStack()},children:[bn,ot.children]})))}));Ie.displayName="DrawerWithContext";var vt=P.memo(function(ot){var Pt=ot.children;return(0,v.jsx)(C.r6,{engine:Ye,children:(0,v.jsx)(N.Y5,{context:Xe,children:(0,v.jsx)(Ie,{children:Pt})})})});return vt.displayName="RenderDrawer",Je=(we=De.current)===null||we===void 0?void 0:we.patchElement(vt),Object.assign(je,ze)},ce=P.useMemo(function(){return{open:be}},[]),pe=P.memo(P.forwardRef(function(H,ge){var de=p(),Ce=a()(de,2),we=Ce[0],$e=Ce[1];return P.useImperativeHandle(ge,function(){return{patchElement:$e}},[$e]),P.useEffect(function(){Fe.value=we},[we]),(0,v.jsx)(ye,{index:0})}));return[ce,(0,v.jsx)(pe,{ref:De},"drawer-holder")]}var V=e(73935),J=e(73475),ne=e(83622),ee=(0,P.forwardRef)(function(De,Fe){var ye=P.useState({}),be=a()(ye,2),ce=be[0],pe=be[1],H=l()(l()({},De),ce),ge=H.visible,de=ge===void 0?!0:ge,Ce=H.footer,we=Ce===void 0?null:Ce,$e=H.header,Je=$e===void 0?null:$e,rt=H.afterClose,je=H.children,Ge=H.hidden,Ue=H.title,Oe=H.styles,qe=Oe===void 0?{}:Oe,ze=H.zIndex,Xe=ze===void 0?4:ze,Ye=(0,P.useRef)(!1),Ie=(0,C.Zr)(),vt=(0,P.useState)(function(){return we}),ot=a()(vt,2),Pt=ot[0],yt=ot[1],At=(0,P.useState)(Je),tn=a()(At,2),bn=tn[0],Ht=tn[1];(0,P.useImperativeHandle)(Fe,function(){return{destroy:function(){Ye.current||(Ye.current=!0,rt==null||rt())},update:function(Ne){pe(Ne)},setFooter:function(Ne){yt(Ne)},setHeader:function(Ne){Object.values(Ne||{}).length===0?Ht(null):Ht(Ne)}}});var gt=(0,P.useMemo)(function(){return{display:Ge?"none":"flex",flexDirection:"column",height:"100%",zIndex:Xe}},[Ge,Xe]),We=(0,P.useMemo)(function(){if(!bn&&!Ue)return null;var at=bn||{},Ne=at.title,st=Ne===void 0?Ue:Ne,Mt=at.extra,Gt=Ie.context.themeToken;return(0,v.jsxs)("div",{style:l()({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"".concat(Gt.paddingSM,"px ").concat(Gt.padding,"px"),borderBottom:"1px solid ".concat(Gt.colorSplit),backgroundColor:Gt.colorBgContainer},qe.header),children:[(0,v.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:Gt.marginXS},children:[(0,v.jsx)(ne.ZP,{type:"text",size:"small",icon:(0,v.jsx)(J.Z,{}),onClick:function(){Ye.current||(Ye.current=!0,rt==null||rt())},style:{color:Gt.colorTextTertiary}}),st&&(0,v.jsx)("div",{style:{fontSize:Gt.fontSizeLG,fontWeight:Gt.fontWeightStrong,color:Gt.colorText},children:st})]}),Mt&&(0,v.jsx)("div",{children:Mt})]})},[bn,Ue,Ie.context.themeToken,qe.header,rt]),Be=(0,P.useMemo)(function(){if(!Pt)return null;var at=Ie.context.themeToken;return(0,v.jsx)("div",{style:l()({display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"".concat(at.paddingXS,"px ").concat(at.padding,"px"),borderTop:"1px solid ".concat(at.colorSplit),backgroundColor:at.colorBgContainer},qe.footer),children:Pt})},[Pt,Ie.context.themeToken,qe.footer]);return de?(0,v.jsxs)("div",{style:l()(l()({},gt),qe.content),children:[We,(0,v.jsx)("div",{style:l()({flex:1,overflowY:"auto"},qe.body),children:je}),Be]}):null}),Q=["target","content","preventClose","inheritContext"],W=0,L=P.memo(P.forwardRef(function(De,Fe){var ye=p(),be=a()(ye,2),ce=be[0],pe=be[1];return P.useImperativeHandle(Fe,function(){return{patchElement:pe}},[pe]),(0,v.jsx)(v.Fragment,{children:ce})}));function w(){var De=P.useRef(null),Fe=function(ce,pe){var H;W+=1;var ge=P.createRef(),de,Ce,we=new Promise(function(yt){Ce=yt}),$e=function(At){var tn=At.children;return P.useEffect(function(){var bn;return(bn=ge.current)===null||bn===void 0||bn.setFooter(tn),function(){var Ht;(Ht=ge.current)===null||Ht===void 0||Ht.setFooter(null)}},[tn]),null},Je=function(At){return P.useEffect(function(){var tn;return(tn=ge.current)===null||tn===void 0||tn.setHeader(At),function(){var bn;(bn=ge.current)===null||bn===void 0||bn.setHeader(null)}},[At]),null},rt=ce.target,je=ce.content,Ge=ce.preventClose,Ue=ce.inheritContext,Oe=Ue===void 0?!0:Ue,qe=B()(ce,Q),ze={type:"embed",inputArgs:ce.inputArgs||{},preventClose:!!ce.preventClose,destroy:function(){var At;return(At=ge.current)===null||At===void 0?void 0:At.destroy()},update:function(At){var tn;return(tn=ge.current)===null||tn===void 0?void 0:tn.update(At)},close:function(At,tn){var bn,Ht,gt;Ge&&!tn||((bn=Ce)===null||bn===void 0||bn(At),(Ht=ge.current)===null||Ht===void 0||Ht.destroy(),(gt=de)===null||gt===void 0||gt())},Header:Je,Footer:$e,setFooter:function(At){var tn;(tn=ge.current)===null||tn===void 0||tn.setFooter(At)},setHeader:function(At){var tn;(tn=ge.current)===null||tn===void 0||tn.setHeader(At)},navigation:(H=ce.inputArgs)===null||H===void 0?void 0:H.navigation},Xe=new o.iT,Ye=E(pe.engine);Xe.defineProperty("engine",{value:Ye}),Xe.addDelegate(Ye.context),Oe?Xe.addDelegate(pe):Xe.addDelegate(pe.engine.context),Xe.defineProperty("view",{get:function(){return ze},resolveOnServer:function(At){return At==="record"||At.startsWith("record.")}}),Y(Xe,ze);var Ie=(0,z.observer)(function(){var yt,At,tn=P.useRef(!1),bn=typeof je=="function"?je(ze,Xe):je;return Xe.themeToken,P.useEffect(function(){var Ht;(Ht=ce.onOpen)===null||Ht===void 0||Ht.call(ce,ze,Xe)},[]),(yt=ce.inputArgs)!==null&&yt!==void 0&&(yt=yt.hidden)!==null&&yt!==void 0&&yt.value&&!tn.current?null:(tn.current=!0,(0,v.jsx)(ee,l()(l()({ref:ge,hidden:(At=ce.inputArgs)===null||At===void 0||(At=At.hidden)===null||At===void 0?void 0:At.value},qe),{},{afterClose:function(){var gt,We,Be;(gt=de)===null||gt===void 0||gt(),(We=ce.onClose)===null||We===void 0||We.call(ce),(Be=Ce)===null||Be===void 0||Be(ce.result),Ye.unlinkFromStack()},children:bn}),"page-".concat(W)))},{displayName:"PageWithContext"}),vt=(0,v.jsx)(C.r6,{engine:Ye,children:(0,v.jsx)(N.Y5,{context:Xe,children:(0,v.jsx)(Ie,{})})});if(rt&&rt instanceof HTMLElement){var ot;de=(ot=De.current)===null||ot===void 0?void 0:ot.patchElement(V.createPortal(vt,rt))}else{var Pt;de=(Pt=De.current)===null||Pt===void 0?void 0:Pt.patchElement(vt)}return Object.assign(we,ze)},ye=P.useMemo(function(){return{open:Fe}},[]);return[ye,(0,v.jsx)(L,{ref:De},"page-holder")]}var Z=e(55241),te=["afterClose","content","placement","rect"],oe=["target","placement","content"],fe=0,xe=P.forwardRef(function(De,Fe){var ye,be,ce,pe,H=De.afterClose,ge=De.content,de=De.placement,Ce=De.rect,we=B()(De,te),$e=P.useState(!0),Je=a()($e,2),rt=Je[0],je=Je[1],Ge=P.useState(l()({content:ge,placement:de,rect:Ce},we)),Ue=a()(Ge,2),Oe=Ue[0],qe=Ue[1];return P.useImperativeHandle(Fe,function(){return{destroy:function(){return je(!1)},update:function(Xe){return qe(function(Ye){return l()(l()({},Ye),Xe)})},close:function(Xe,Ye){return je(!1)}}}),P.useEffect(function(){rt||H==null||H()},[rt,H]),(0,v.jsx)(Z.Z,l()(l()({arrow:!1,open:rt,trigger:["click"],destroyTooltipOnHide:!0,content:Oe.content,placement:Oe.placement,getPopupContainer:function(){return document.body},onOpenChange:function(Xe){je(Xe),Xe||H==null||H()}},Oe),{},{children:(0,v.jsx)("span",{style:{position:"absolute",top:((ye=(be=Oe.rect)===null||be===void 0?void 0:be.top)!==null&&ye!==void 0?ye:0)+window.scrollY,left:((ce=(pe=Oe.rect)===null||pe===void 0?void 0:pe.left)!==null&&ce!==void 0?ce:0)+window.scrollX,width:0,height:0}})}))});function he(){var De=P.useRef(null),Fe=function(pe){var H,ge,de;fe+=1;var Ce=pe.target,we=pe.placement,$e=we===void 0?"rightTop":we,Je=pe.content,rt=B()(pe,oe),je=P.createRef(),Ge=(H=Ce==null||(ge=Ce.getBoundingClientRect)===null||ge===void 0?void 0:ge.call(Ce))!==null&&H!==void 0?H:{top:0,left:0},Ue,Oe,qe=new Promise(function(vt){Oe=vt}),ze={type:"popover",destroy:function(){var ot;return(ot=je.current)===null||ot===void 0?void 0:ot.destroy()},update:function(ot){var Pt;return(Pt=je.current)===null||Pt===void 0?void 0:Pt.update(ot)},close:function(ot){var Pt,yt;(Pt=Oe)===null||Pt===void 0||Pt(ot),(yt=je.current)===null||yt===void 0||yt.close(ot)}},Xe=typeof Je=="function"?Je(ze):Je,Ye=typeof Xe=="string"?(0,v.jsx)("div",{dangerouslySetInnerHTML:{__html:m.Z.sanitize(Xe)}}):Xe,Ie=(0,v.jsx)(xe,l()({ref:je,content:Ye,placement:$e,rect:Ge,afterClose:function(){var ot,Pt,yt;(ot=Ue)===null||ot===void 0||ot(),(Pt=pe.onClose)===null||Pt===void 0||Pt.call(pe),(yt=Oe)===null||yt===void 0||yt(pe.result)}},rt),"popover-".concat(fe));return Ue=(de=De.current)===null||de===void 0?void 0:de.patchElement(Ie),Object.assign(qe,ze)},ye=P.useMemo(function(){return{open:Fe}},[]),be=P.memo(P.forwardRef(function(ce,pe){var H=p(),ge=a()(H,2),de=ge[0],Ce=ge[1];return P.useImperativeHandle(pe,function(){return{patchElement:Ce}},[]),(0,v.jsx)(v.Fragment,{children:de})}));return[ye,(0,v.jsx)(be,{ref:De},"popover-holder")]}var ie=e(12444),le=e.n(ie),ue=e(72004),me=e.n(ue),se=e(9783),ae=e.n(se);function Ee(De){if(!De||De.length===0)return"/admin";var Fe=["admin"];return De.forEach(function(ye,be){be>0&&Fe.push("view"),Fe.push(ye.viewUid),ye.tabUid&&Fe.push("tab",ye.tabUid),ye.filterByTk&&Fe.push("filterbytk",ye.filterByTk),ye.sourceId&&Fe.push("sourceid",ye.sourceId)}),"/"+Fe.join("/")}var Pe=function(){function De(Fe,ye){le()(this,De),ae()(this,"viewStack",void 0),ae()(this,"ctx",void 0),this.viewStack=d()(ye),this.ctx=Fe}return me()(De,[{key:"changeTo",value:function(ye){this.viewStack.length===0?this.viewStack.push(ye):this.viewStack[this.viewStack.length-1]=l()(l()({},this.viewStack[this.viewStack.length-1]),ye);var be=Ee(this.viewStack);this.ctx.router.navigate(be,{replace:!0})}},{key:"navigateTo",value:function(ye,be){var ce=Ee([].concat(d()(this.viewStack),[ye])),pe=ce;if(location.pathname.endsWith(pe))return this.ctx.router.navigate(-1);this.ctx.router.navigate(pe,be),this.viewStack.length===0&&this.viewStack.push(ye)}},{key:"back",value:function(){var ye=Ee(this.viewStack);location.pathname.endsWith(ye)&&this.ctx.router.navigate(-1)}}]),De}()},84816:function(_t,ve,e){"use strict";e.r(ve),e.d(ve,{APIClient:function(){return I},Auth:function(){return F},MemoryStorage:function(){return i},Storage:function(){return v},getSubAppName:function(){return c}});var q=e(13769),a=e.n(q),X=e(25098),l=e.n(X),P=e(31996),m=e.n(P),z=e(26037),o=e.n(z),N=e(97857),b=e.n(N),j=e(15009),f=e.n(j),g=e(99289),n=e.n(g),M=e(12444),T=e.n(M),u=e(72004),r=e.n(u),A=e(9783),y=e.n(A),K=e(87066),R=e(80129),Y=e.n(R),x=["authClass","storageType","storageClass","storagePrefix"],B=["values","filter"],F=function(){function d(p){T()(this,d),y()(this,"api",void 0),y()(this,"options",{locale:null,role:null,authenticator:null,token:null}),this.api=p,this.api.axios.interceptors.request.use(this.middleware.bind(this))}return r()(d,[{key:"storagePrefix",get:function(){return this.api.storagePrefix}},{key:"KEYS",get:function(){var C={locale:this.storagePrefix+"LOCALE",role:this.storagePrefix+"ROLE",token:this.storagePrefix+"TOKEN",authenticator:this.storagePrefix+"AUTH",theme:this.storagePrefix+"THEME"};if(this.api.app){var h,E,S=(h=this.api.app)===null||h===void 0||(E=h.getName)===null||E===void 0?void 0:E.call(h);S&&(C.role="".concat(S.toUpperCase(),"_")+C.role,C.locale="".concat(S.toUpperCase(),"_")+C.locale)}return C}},{key:"locale",get:function(){return this.getLocale()},set:function(C){this.setLocale(C)}},{key:"role",get:function(){return this.getRole()},set:function(C){this.setRole(C)}},{key:"token",get:function(){return this.getToken()},set:function(C){this.setToken(C)}},{key:"authenticator",get:function(){return this.getAuthenticator()},set:function(C){this.setAuthenticator(C)}},{key:"getOption",value:function(C){if(this.KEYS[C])return this.api.storage.getItem(this.KEYS[C])}},{key:"setOption",value:function(C,h){if(this.KEYS[C])return this.options[C]=h,this.api.storage.setItem(this.KEYS[C],h||"")}},{key:"getLocale",value:function(){return this.getOption("locale")}},{key:"setLocale",value:function(C){this.setOption("locale",C)}},{key:"getRole",value:function(){return this.getOption("role")}},{key:"setRole",value:function(C){this.setOption("role",C)}},{key:"getToken",value:function(){return this.getOption("token")}},{key:"setToken",value:function(C){this.setOption("token",C),this.api.app&&this.api.app.eventBus.dispatchEvent(new CustomEvent("auth:tokenChanged",{detail:{token:C,authenticator:this.authenticator}}))}},{key:"getAuthenticator",value:function(){return this.getOption("authenticator")}},{key:"setAuthenticator",value:function(C){this.setOption("authenticator",C)}},{key:"middleware",value:function(C){return this.locale&&(C.headers["X-Locale"]=this.locale),this.role&&(C.headers["X-Role"]=this.role),this.authenticator&&!C.headers["X-Authenticator"]&&(C.headers["X-Authenticator"]=this.authenticator),this.token&&(C.headers.Authorization="Bearer ".concat(this.token)),C}},{key:"signIn",value:function(){var p=n()(f()().mark(function h(E,S){var t,D,U;return f()().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return k.next=2,this.api.request({method:"post",url:"auth:signIn",data:E,headers:{"X-Authenticator":S}});case 2:return D=k.sent,U=D==null||(t=D.data)===null||t===void 0?void 0:t.data,this.setAuthenticator(S),this.setToken(U==null?void 0:U.token),k.abrupt("return",D);case 7:case"end":return k.stop()}},h,this)}));function C(h,E){return p.apply(this,arguments)}return C}()},{key:"signUp",value:function(){var p=n()(f()().mark(function h(E,S){return f()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,this.api.request({method:"post",url:"auth:signUp",data:E,headers:{"X-Authenticator":S}});case 2:return D.abrupt("return",D.sent);case 3:case"end":return D.stop()}},h,this)}));function C(h,E){return p.apply(this,arguments)}return C}()},{key:"signOut",value:function(){var p=n()(f()().mark(function h(){var E;return f()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.api.request({method:"post",url:"auth:signOut"});case 2:return E=t.sent,this.setToken(null),this.setRole(null),this.setAuthenticator(null),t.abrupt("return",E);case 7:case"end":return t.stop()}},h,this)}));function C(){return p.apply(this,arguments)}return C}()},{key:"lostPassword",value:function(){var p=n()(f()().mark(function h(E){var S,t,D;return f()().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return S=new URLSearchParams(window.location.search),t=Object.fromEntries(S.entries()),G.next=4,this.api.request({method:"post",url:"auth:lostPassword",data:b()(b()({},E),{},{baseURL:window.location.href.split("/forgot-password")[0]}),headers:{"X-Authenticator":t.name}});case 4:return D=G.sent,G.abrupt("return",D);case 6:case"end":return G.stop()}},h,this)}));function C(h){return p.apply(this,arguments)}return C}()},{key:"resetPassword",value:function(){var p=n()(f()().mark(function h(E){var S;return f()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,this.api.request({method:"post",url:"auth:resetPassword",data:E});case 2:return S=D.sent,D.abrupt("return",S);case 4:case"end":return D.stop()}},h,this)}));function C(h){return p.apply(this,arguments)}return C}()},{key:"checkResetToken",value:function(){var p=n()(f()().mark(function h(E){var S;return f()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,this.api.request({method:"post",url:"auth:checkResetToken",data:E});case 2:return S=D.sent,D.abrupt("return",S);case 4:case"end":return D.stop()}},h,this)}));function C(h){return p.apply(this,arguments)}return C}()}]),d}(),v=r()(function d(){T()(this,d)}),i=function(d){m()(C,d);var p=o()(C);function C(){var h;T()(this,C);for(var E=arguments.length,S=new Array(E),t=0;t<E;t++)S[t]=arguments[t];return h=p.call.apply(p,[this].concat(S)),y()(l()(h),"items",new Map),h}return r()(C,[{key:"clear",value:function(){this.items.clear()}},{key:"getItem",value:function(E){return this.items.get(E)}},{key:"setItem",value:function(E,S){return this.items.set(E,S)}},{key:"removeItem",value:function(E){return this.items.delete(E)}}]),C}(v),I=function(){function d(p){if(T()(this,d),y()(this,"options",void 0),y()(this,"axios",void 0),y()(this,"auth",void 0),y()(this,"storage",void 0),y()(this,"storagePrefix","NOCOBASE_"),this.options=p,typeof p=="function")this.axios=p;else{var C=p||{},h=C.authClass,E=C.storageType,S=C.storageClass,t=C.storagePrefix,D=t===void 0?"NOCOBASE_":t,U=a()(C,x);this.storagePrefix=D,this.axios=K.Z.create(U),this.initStorage(S,E),h&&(this.auth=new h(this))}this.storage||this.initStorage(),this.auth||(this.auth=new F(this)),this.interceptors()}return r()(d,[{key:"toErrMessages",value:function(C){var h,E,S,t,D;if(typeof document<"u"&&typeof(C==null||(h=C.response)===null||h===void 0?void 0:h.data)=="string"){var U,G=document.createElement("div");G.innerHTML=C==null||(U=C.response)===null||U===void 0?void 0:U.data;var k=G.textContent||G.innerText;return k.includes("Error occurred while trying")?(k="The application may be starting up. Please try again later.",[{code:"APP_WARNING",message:k}]):k.includes("502 Bad Gateway")?(k="The application may be starting up. Please try again later.",[{code:"APP_WARNING",message:k}]):[{message:k}]}if(C!=null&&(E=C.response)!==null&&E!==void 0&&(E=E.data)!==null&&E!==void 0&&E.error){var $;return[C==null||($=C.response)===null||$===void 0||($=$.data)===null||$===void 0?void 0:$.error]}return(C==null||(S=C.response)===null||S===void 0||(S=S.data)===null||S===void 0?void 0:S.errors)||(C==null||(t=C.response)===null||t===void 0||(t=t.data)===null||t===void 0?void 0:t.messages)||(C==null||(D=C.response)===null||D===void 0?void 0:D.error)||[{message:C.message||"Server error"}]}},{key:"getHeaders",value:function(){var C={};return this.auth.locale&&(C["X-Locale"]=this.auth.locale),this.auth.role&&(C["X-Role"]=this.auth.role),this.auth.authenticator&&(C["X-Authenticator"]=this.auth.authenticator),this.auth.token&&(C.Authorization="Bearer ".concat(this.auth.token)),C}},{key:"initStorage",value:function(C){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"localStorage";if(C){this.storage=new C(this);return}if(h==="localStorage"&&typeof localStorage<"u"){this.storage=localStorage;return}if(h==="sessionStorage"&&typeof sessionStorage<"u"){this.storage=sessionStorage;return}this.storage=new i}},{key:"interceptors",value:function(){this.axios.interceptors.request.use(function(C){return C.paramsSerializer=function(h){return Y().stringify(h,{strictNullHandling:!0,arrayFormat:"brackets"})},C})}},{key:"request",value:function(C){var h=C,E=h.resource,S=h.resourceOf,t=h.action,D=h.params,U=h.headers;return E?this.resource(E,S,U)[t](D):this.axios.request(C)}},{key:"resource",value:function(C,h,E,S){var t=this,D={},U={get:function(k,$){if(!S){var V=C.split(".").join("/".concat(encodeURIComponent(h)||"_","/"));V+=":".concat($.toString());var J={url:V};return["get","list"].includes($)?J.method="get":J.method="post",function(){var ne=n()(f()().mark(function ee(Q,W){var L,w,Z,te;return f()().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return L=Q||{},w=L.values,Z=L.filter,te=a()(L,B),J.params=te,Z&&(typeof Z=="string"?J.params.filter=Z:(Z["*"]&&delete Z["*"],J.params.filter=JSON.stringify(Z))),J.method!=="get"&&(J.data=w||{}),fe.next=6,t.request(b()(b()(b()({},J),W),{},{headers:E}));case 6:return fe.abrupt("return",fe.sent);case 7:case"end":return fe.stop()}},ee)}));return function(ee,Q){return ne.apply(this,arguments)}}()}}};return new Proxy(D,U)}}]),d}(),O=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"/",C="".concat(p,"apps/");if(window.location.pathname.startsWith(C)){var h=window.location.pathname.substring(C.length),E=h.split("/",1);return E[0]||""}},c=O},20301:function(_t,ve,e){"use strict";e.r(ve),e.d(ve,{CollectionsGraph:function(){return Q},Handlebars:function(){return gt()},Registry:function(){return pn},dayjs:function(){return l()},error:function(){return Qe},evaluateConditions:function(){return De},extractUsedVariableNames:function(){return Qt},extractUsedVariablePaths:function(){return Ft},flatten:function(){return Tn},forEach:function(){return At},getDateTimeFormat:function(){return Pt},getDateVars:function(){return Wn},getDayRange:function(){return Dn},getDayRangeByParams:function(){return U},getDefaultFormat:function(){return Je},getFormatFromDateStr:function(){return yt},getOffsetRangeByParams:function(){return E},getPickerFormat:function(){return ot},getValuesByPath:function(){return tn},hasEmptyValue:function(){return pe},isArray:function(){return ye},isEmpty:function(){return be},isEmptyFilter:function(){return we},isPlainObject:function(){return ce},isPortalInBody:function(){return mt},isString:function(){return Fe},isURL:function(){return vn},isValidFilter:function(){return Ne},lodash:function(){return a()},merge:function(){return Ve},moment2str:function(){return Xe},nextTick:function(){return H},offsetFromString:function(){return Ye},parse:function(){return Wt},parseFilter:function(){return Yt},parseHTML:function(){return ft},removeNullCondition:function(){return $e},showToast:function(){return ct},sleep:function(){return Ce},sortTree:function(){return de},splitPathToTwoParts:function(){return vr},str2moment:function(){return Oe},toFixedByStep:function(){return Vt},toGmt:function(){return rt},toLocal:function(){return je},toUnit:function(){return En},transformFilter:function(){return ae},transformMultiColumnToSingleColumn:function(){return $n},treeFind:function(){return ge},tval:function(){return Ae},uid:function(){return Ut},unflatten:function(){return Gn},utc2unit:function(){return xn}});var q=e(96486),a=e.n(q),X=e(27484),l=e.n(X),P=e(28734),m=e.n(P),z=e(10285),o=e.n(z),N=e(1646),b=e.n(N),j=e(66607),f=e.n(j),g=e(79212),n=e.n(g),M=e(37412),T=e.n(M),u=e(59542),r=e.n(u),A=e(96036),y=e.n(A),K=e(96671),R=e.n(K),Y=e(29387),x=e.n(Y),B=e(70178),F=e.n(B),v=e(55183),i=e.n(v),I=e(172),O=e.n(I),c=e(72540),d=e.n(c);l().extend(d()),l().extend(y()),l().extend(x()),l().extend(F()),l().extend(R()),l().extend(r()),l().extend(f()),l().extend(n()),l().extend(T()),l().extend(i()),l().extend(O()),l().extend(o()),l().extend(m()),l().extend(b());var p=e(5574),C=e.n(p),h=function(Se){if(!Se)return l()();if(/^[+-]\d{2}:\d{2}$/.test(Se)){var Le=Se.match(/([+-])(\d{2}):(\d{2})/).slice(1),dt=C()(Le,3),xt=dt[0],St=dt[1],wt=dt[2],In=(parseInt(St)*60+parseInt(wt))*(xt==="+"?1:-1);return l()().utcOffset(In)}return l()().tz(Se)},E=function(Se){var Le=Se.type,dt=Se.unit,xt=dt===void 0?"day":dt,St=Se.number,wt=St===void 0?1:St,In=Se.timezone,kn=h(In),or=xt==="week"?"isoWeek":xt,Xn,nr;if(Le==="past"){var Er=kn.startOf(or);Xn=Er.subtract(wt,xt).startOf(or),nr=Er.subtract(1,xt).endOf(or)}else if(Le==="next"){var Fr=kn.startOf(or);Xn=Fr.add(1,xt).startOf(or),nr=Xn.add(wt-1,xt).endOf(or)}else throw new Error("Unsupported type: ".concat(Le));return[Xn.format("YYYY-MM-DD HH:mm:ss"),nr.format("YYYY-MM-DD HH:mm:ss")]},S=function(Se,Le,dt){var xt=Le==="isoWeek"?"week":Le;return h(dt).add(Se,xt).startOf(Le)},t=function(Se,Le,dt){var xt=Le==="isoWeek"?"week":Le;return h(dt).add(Se,xt).endOf(Le)},D={today:function(Se){return[S(0,"day",Se==null?void 0:Se.timezone),t(0,"day",Se==null?void 0:Se.timezone)]},yesterday:function(Se){return[S(-1,"day",Se==null?void 0:Se.timezone),t(-1,"day",Se==null?void 0:Se.timezone)]},tomorrow:function(Se){return[S(1,"day",Se==null?void 0:Se.timezone),t(1,"day",Se==null?void 0:Se.timezone)]},thisWeek:function(Se){return[S(0,"isoWeek",Se==null?void 0:Se.timezone),t(0,"isoWeek",Se==null?void 0:Se.timezone)]},lastWeek:function(Se){return[S(-1,"isoWeek",Se==null?void 0:Se.timezone),t(-1,"isoWeek",Se==null?void 0:Se.timezone)]},nextWeek:function(Se){return[S(1,"isoWeek",Se==null?void 0:Se.timezone),t(1,"isoWeek",Se==null?void 0:Se.timezone)]},thisMonth:function(Se){return[S(0,"month",Se==null?void 0:Se.timezone),t(0,"month",Se==null?void 0:Se.timezone)]},lastMonth:function(Se){return[S(-1,"month",Se==null?void 0:Se.timezone),t(-1,"month",Se==null?void 0:Se.timezone)]},nextMonth:function(Se){return[S(1,"month",Se==null?void 0:Se.timezone),t(1,"month",Se==null?void 0:Se.timezone)]},thisQuarter:function(Se){return[S(0,"quarter",Se==null?void 0:Se.timezone),t(0,"quarter",Se==null?void 0:Se.timezone)]},lastQuarter:function(Se){return[S(-1,"quarter",Se==null?void 0:Se.timezone),t(-1,"quarter",Se==null?void 0:Se.timezone)]},nextQuarter:function(Se){return[S(1,"quarter",Se==null?void 0:Se.timezone),t(1,"quarter",Se==null?void 0:Se.timezone)]},thisYear:function(Se){return[S(0,"year",Se==null?void 0:Se.timezone),t(0,"year",Se==null?void 0:Se.timezone)]},lastYear:function(Se){return[S(-1,"year",Se==null?void 0:Se.timezone),t(-1,"year",Se==null?void 0:Se.timezone)]},nextYear:function(Se){return[S(1,"year",Se==null?void 0:Se.timezone),t(1,"year",Se==null?void 0:Se.timezone)]}},U=function(Se){if(Se.type==="past"||Se.type==="next")return E(Se);var Le=D[Se.type];if(!Le)throw new Error("Unsupported type: ".concat(Se.type));var dt=Le(Se),xt=C()(dt,2),St=xt[0],wt=xt[1];return[St.format("YYYY-MM-DD HH:mm:ss"),wt.format("YYYY-MM-DD HH:mm:ss")]},G=e(96695),k=e.n(G),$=e(12444),V=e.n($),J=e(72004),ne=e.n(J),ee=e(28282),Q=function(){function Te(){V()(this,Te)}return ne()(Te,null,[{key:"graphlib",value:function(){return ee}},{key:"connectedNodes",value:function(Le){var dt=(0,q.castArray)(Le.nodes),xt=(0,q.castArray)(Le.excludes||[]),St=Te.build(Le),wt=new Set,In=k()(dt),kn;try{for(In.s();!(kn=In.n()).done;){var or=kn.value,Xn=ee.alg.preorder(St,or),nr=k()(Xn),Er;try{for(nr.s();!(Er=nr.n()).done;){var Fr=Er.value;xt.includes(Fr)||wt.add(Fr)}}catch(Ur){nr.e(Ur)}finally{nr.f()}}}catch(Ur){In.e(Ur)}finally{In.f()}return Array.from(wt)}},{key:"preOrder",value:function(Le){return Te.graphlib().alg.preorder(Te.build(Le),Le.node)}},{key:"build",value:function(Le){var dt=Le.collections,xt=(Le==null?void 0:Le.direction)||"forward",St=xt==="forward",wt=new ee.Graph,In=k()(dt),kn;try{for(In.s();!(kn=In.n()).done;){var or=kn.value;wt.setNode(or.name)}}catch(fo){In.e(fo)}finally{In.f()}var Xn=k()(dt),nr;try{for(Xn.s();!(nr=Xn.n()).done;){var Er=nr.value,Fr=Er.inherits||[],Ur=k()(Fr),br;try{for(Ur.s();!(br=Ur.n()).done;){var Jr=br.value;St?wt.setEdge(Er.name,Jr):wt.setEdge(Jr,Er.name)}}catch(fo){Ur.e(fo)}finally{Ur.f()}var mr=k()(Er.fields||[]),Wr;try{for(mr.s();!(Wr=mr.n()).done;){var Lr=Wr.value;if((Lr.type==="hasMany"||Lr.type==="belongsTo"||Lr.type==="hasOne")&&(St?wt.setEdge(Er.name,Lr.target):wt.setEdge(Lr.target,Er.name)),Lr.type==="belongsToMany"){var eo=Lr.through;St?(wt.setEdge(Er.name,eo),wt.setEdge(eo,Lr.target)):(wt.setEdge(Lr.target,eo),wt.setEdge(eo,Er.name))}}}catch(fo){mr.e(fo)}finally{mr.f()}}}catch(fo){Xn.e(fo)}finally{Xn.f()}return wt}}]),Te}(),W=e(9783),L=e.n(W),w=e(97857),Z=e.n(w),te=e(19632),oe=e.n(te),fe=e(34444),xe=e.n(fe),he=e(52677),ie=e.n(he);function le(Te){return"path"in Te&&"operator"in Te&&"value"in Te}function ue(Te){return"logic"in Te&&"items"in Te}function me(Te){var Se=Te.path,Le=Te.operator,dt=Te.value;return L()({},Se,L()({},Le,dt))}function se(Te){var Se=Te.logic,Le=Te.items,dt=Le.map(function(xt){if(le(xt))return me(xt);if(ue(xt))return se(xt);throw new Error("Invalid filter item type")});return L()({},Se,dt)}function ae(Te){if(!Te||ie()(Te)!=="object")throw new Error("Invalid filter: filter must be an object");if(!ue(Te))throw new Error("Invalid filter: filter must have logic and items properties");if(!Array.isArray(Te.items))throw new Error("Invalid filter: items must be an array");return se(Te)}function Ee(Te,Se){var Le=Te.path,dt=Te.operator,xt=Te.value;return Se(Le,dt,xt)}function Pe(Te,Se){var Le=Te.logic,dt=Te.items;if(!dt||dt.length===0)return!0;var xt=dt.map(function(St){if(le(St))return Ee(St,Se);if(ue(St))return Pe(St,Se);throw new Error("Invalid filter item type")});if(Le==="$and")return xt.every(function(St){return St===!0});if(Le==="$or")return xt.some(function(St){return St===!0});throw new Error("Unsupported logic operator: ".concat(Le))}function De(Te,Se){if(!Te||ie()(Te)!=="object")throw new Error("Invalid conditions: conditions must be an object");if(!ue(Te))throw new Error("Invalid conditions: conditions must have logic and items properties");if(!Array.isArray(Te.items))throw new Error("Invalid conditions: items must be an array");if(typeof Se!="function")throw new Error("Invalid evaluator: evaluator must be a function");return Pe(Te,Se)}var Fe=function(Se){return typeof Se=="string"},ye=function(Se){return Array.isArray(Se)},be=function(Se){return ce(Se)?Object.keys(Se).length===0:Array.isArray(Se)?Se.length===0:!Se},ce=function(Se){if(Object.prototype.toString.call(Se)!=="[object Object]")return!1;var Le=Object.getPrototypeOf(Se);return Le===null||Le===Object.prototype},pe=function Te(Se){var Le=!0;for(var dt in Se){if(Le=!1,ye(Se[dt])&&Se[dt].length===0||!Se[dt])return!0;if(ce(Se[dt])||ye(Se[dt]))return Te(Se[dt])}return Le},H=function(Se){setTimeout(Se)};function ge(Te,Se){var Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(Te){var dt=Le.childrenKey,xt=dt===void 0?"children":dt,St=Array.isArray(Te)?oe()(Te):[Te],wt=k()(St),In;try{for(wt.s();!(In=wt.n()).done;){var kn=In.value;if(Se(kn))return kn;var or=typeof xt=="function"?xt(kn):kn[xt];if(Array.isArray(or)&&or.length>0){var Xn=ge(or,Se,Le);if(Xn!==void 0)return Xn}}}catch(nr){wt.e(nr)}finally{wt.f()}}}function de(Te,Se){var Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"children",dt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;if(!Te||!Array.isArray(Te)||Te.length===0)return Te;var xt=a().orderBy(Te,Se,dt?"asc":"desc");return xt.map(function(St){return St[Le]&&St[Le].length>0?Z()(Z()({},St),{},L()({},Le,de(St[Le],Se,Le,dt))):St})}function Ce(Te){return new Promise(function(Se){setTimeout(Se,Te)})}function we(Te){return!!(!Te||"$and"in Te&&a().isEmpty(Te.$and)||"$or"in Te&&a().isEmpty(Te.$or))}var $e=function(Se){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xe(),dt=Le(Se||{}),xt={};for(var St in dt){var wt=dt[St];wt!=null&&!be(wt)&&wt!==""&&(xt[St]=wt)}var In=Le.unflatten(xt);return a().isEmpty(In)?void 0:In},Je=function(Se){return Se.format?Se.format:Se.dateFormat?Se.showTime?"".concat(Se.dateFormat," ").concat(Se.timeFormat||"HH:mm:ss"):Se.dateFormat:Se.picker==="month"?"YYYY-MM":Se.picker==="quarter"?"YYYY-\\QQ":Se.picker==="year"?"YYYY":Se.picker==="week"?"YYYY[W]W":Se.showTime?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"},rt=function(Se){return!Se||!l().isDayjs(Se)?Se:"".concat(Se.format("YYYY-MM-DD"),"T").concat(Se.format("HH:mm:ss.SSS"),"Z")},je=function(Se){if(!Se)return Se;if(Array.isArray(Se))return Se.map(function(Le){return Le.startOf("second").toISOString()});if(l().isDayjs(Se))return Se.startOf("second").toISOString()},Ge=function(Se){try{var Le=parseInt(Se.slice(0,4)),dt=parseInt(Se.slice(-1));return l()().quarter(dt).year(Le)}catch{return null}},Ue=function(Se,Le){if(Se){var dt=Le.utcOffset,xt=Le.gmt,St=Le.picker,wt=Le.utc,In=wt===void 0?!0:wt,kn=Le.dateOnly;if(l()(Se).isValid()){if(kn){var or=l()(Se);if(!or.isValid())return Se;var Xn=or.format("YYYY-MM-DD");return l().utc(Xn,"YYYY-MM-DD")}return In?l().isDayjs(Se)?dt?Se.utcOffset(Ye(dt)):Se:xt?l()(Se).utcOffset(0):dt?l()(Se).utcOffset(Ye(dt)):l()(Se):l()(Se)}else return Ge(Se)}},Oe=function(Se){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(Se)?Se.map(function(dt){return Ue(dt,Le)}):Se&&Ue(Se,Le)},qe=function(Se,Le){return Le==="year"?Se.format("YYYY")+"-01-01T00:00:00.000Z":Le==="month"||Le==="quarter"?Se.format("YYYY-MM")+"-01T00:00:00.000Z":Se.format("YYYY-MM-DD")+"T00:00:00.000Z"},ze=function(Se,Le){if(!Se)return Se;if(Array.isArray(Se))return Se.map(function(dt){return qe(dt,Le)});if(l().isDayjs(Se))return qe(Se,Le)},Xe=function(Se){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dt=Le.showTime,xt=Le.gmt,St=Le.picker;return Se&&(dt?xt?rt(Se):je(Se):ze(Se,St))};function Ye(Te){if(!a().isString(Te))return Te;var Se=/([+-]|\d\d)/gi,Le=/Z|[+-]\d\d(?::?\d\d)?/gi,dt=/[+-]?\d+(\.\d{1,3})?/,xt=(Te||"").match(Le);if(xt===null&&(xt=(Te||"").match(dt)),xt===null)return null;var St=xt[xt.length-1]||[],wt=(St+"").match(Se)||["-",0,0],In=+(Number(wt[1])*60)+Ie(wt[2]);return In===0?0:wt[0]==="+"?In:-In}function Ie(Te){var Se=+Te,Le=0;return Se!==0&&isFinite(Se)&&(Le=vt(Se)),Le}function vt(Te){return Te<0?Math.ceil(Te)||0:Math.floor(Te)}var ot=function(Se){switch(Se){case"week":return"YYYY[W]W";case"month":return"YYYY-MM";case"quarter":return"YYYY[Q]Q";case"year":return"YYYY";default:return"YYYY-MM-DD"}},Pt=function(Se,Le,dt,xt){return Se==="date"&&dt?"".concat(Le," ").concat(xt||"HH:mm:ss"):Le};function yt(Te){return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(Te)?"YYYY-MM-DD HH:mm:ss":/^\d{4}-\d{2}-\d{2}$/.test(Te)?"YYYY-MM-DD":/^\d{4}-\d{2}$/.test(Te)?"YYYY-MM":/^\d{4}$/.test(Te)?"YYYY":/^\d{4}Q[1-4]$/.test(Te)?"YYYY[Q]Q":/^\d{4}-\d{2}-\d{2}T/.test(Te)?"YYYY-MM-DDTHH:mm:ss.SSSZ":null}var At=function(Se,Le){Array.isArray(Se)?Se.forEach(Le):Object.keys(Se).forEach(function(dt){Le(Se[dt],dt)})},tn=function Te(Se,Le,dt){if(!Se)return dt;for(var xt=Le.split("."),St=[],wt=Se,In=!1,kn=0;kn<xt.length;kn++){var or,Xn=xt[kn];if(Array.isArray(wt)){In=!0;var nr=k()(wt),Er;try{for(nr.s();!(Er=nr.n()).done;){var Fr=Er.value,Ur=Te(Fr,xt.slice(kn).join("."),dt);St=St.concat(Ur)}}catch(br){nr.e(br)}finally{nr.f()}break}if(((or=wt)===null||or===void 0?void 0:or[Xn])===void 0)break;wt=wt[Xn],kn===xt.length-1&&St.push(wt)}return St=St.filter(function(br){return br!==void 0}),St.length===0?dt:In?St.filter(function(br){return br!==null}):St[0]},bn=e(8575),Ht=e(96750),gt=e.n(Ht),We=e(11700),Be=e.n(We),at=Be()();Object.keys(at).forEach(function(Te){gt().registerHelper(Te,at[Te])}),gt().registerHelper("json",function(Te){return JSON.stringify(Te)}),gt().registerHelper("urlParse",function(Te){try{return JSON.stringify(bn.parse(Te))}catch{return"Invalid URL: ".concat(Te)}}),gt().registerHelper("dateFormat",function(Te,Se,Le){return typeof Le=="string"?l()(Te).tz(Le).format(Se):l()(Te).format(Se)}),gt().registerHelper("isNull",function(Te){return a().isNull(Te)});function Ne(Te){if(!Te)return!1;var Se=[Te.$and,Te.$or].filter(Boolean);return Se.length==0?Object.keys(Te).length>0:Se.some(function(Le){if(Array.isArray(Le))return Le.some(Ne);if(Le.$and||Le.$or)return Ne(Le);var dt=Object.keys(Le),xt=C()(dt,1),St=xt[0];if(!St||!Le[St])return!1;var wt=Object.keys(Le[St]),In=C()(wt,1),kn=In[0];return!(!kn||typeof Le[St][kn]>"u")})}function st(Te){var Se=ie()(Te);return Array.isArray(Te)?Se="array":Te instanceof Date?Se="date":Te===null&&(Se="null"),Se}function Mt(Te){var Se,Le=Te.substr(2,Te.length-4).trim(),dt=Le.indexOf(":");return dt!==-1?Se={key:Le.substr(0,dt),defaultValue:Le.substr(dt+1)}:Se={key:Le},Se}function Gt(Te,Se){return Te.parameters=Array.from(new Map(Se.map(function(Le){return[Le.key,Le]})).values()),Te}function Wt(Te){switch(st(Te)){case"string":return nn(Te);case"object":return Zt(Te);case"array":return bt(Te);default:return Gt(function(){return Te},[])}}var nn=function(){var Te=/{{(\w|:|[\s-+.,@/()?=*_$])+}}/g;return function(Se){var Le=[],dt=function(wt){return Se},xt=Se.match(Te);return xt&&(Le=xt.map(Mt),dt=function(wt){return wt=wt||{},xt.reduce(function(In,kn,or){var Xn=Le[or],nr=(0,q.get)(wt,Xn.key);return typeof nr>"u"&&(nr=Xn.defaultValue),typeof nr=="function"&&(nr=nr()),xt.length===1&&Se.startsWith("{{")&&Se.endsWith("}}")?nr:(nr instanceof Date&&(nr=nr.toISOString()),In.replace(kn,nr??""))},Se)}),Gt(dt,Le)}}();function Zt(Te){var Se=Object.keys(Te).map(function(xt){return{keyTemplate:nn(xt),valueTemplate:Wt(Te[xt])}}),Le=Se.reduce(function(xt,St){return xt.concat(St.valueTemplate.parameters,St.keyTemplate.parameters)},[]),dt=function(St){return Se.reduce(function(wt,In){return wt[In.keyTemplate(St)]=In.valueTemplate(St),wt},{})};return Gt(dt,Le)}function bt(Te){var Se=Te.map(Wt),Le=Se.reduce(function(xt,St){return xt.concat(St.parameters)},[]),dt=function(St){return Se.map(function(wt){return wt(St)})};return Gt(dt,Le)}var Qe=function(Se){for(var Le,dt=arguments.length,xt=new Array(dt>1?dt-1:0),St=1;St<dt;St++)xt[St-1]=arguments[St];(Le=console).error.apply(Le,[Se].concat(xt))},it=e(9996),tt=e.n(it),et=function(Se,Le,dt){return Le};function Ve(Te,Se,Le){return tt()(Te,Se,Z()({arrayMerge:et},Le))}var Ze=e(26855),ct=function(Se){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"info",dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:5e3;Ze.ZP[Le]({message:Se,duration:dt})},ut=e(55252),ht=e(8150);function Vt(Te,Se){if(typeof Te>"u"||Te===null||Te==="")return"";var Le=(0,ut.NX)(Se);return(0,ht.FH)(String(Te),".",Le)}var Ot=e(15009),en=e.n(Ot),cn=e(99289),mn=e.n(cn),fn=e(36968),Xt=e.n(fn),Zn=e(30381),on=e.n(Zn),Mn=/^\s*\{\{([\s\S]*)\}\}\s*$/;function jn(Te){return Te&&Te.constructor&&typeof Te.constructor.isBuffer=="function"&&Te.constructor.isBuffer(Te)}function Ln(Te){return Te}function Tn(Te,Se){Se=Se||{};var Le=Se.delimiter||".",dt=Se.maxDepth,xt=Se.transformKey||Ln,St=Se.transformValue||Ln,wt={};function In(kn,or,Xn){Xn=Xn||1,a().isObjectLike(kn)&&Object.keys(kn).forEach(function(nr){var Er,Fr,Ur=kn[nr],br=Se.safe&&Array.isArray(Ur),Jr=Object.prototype.toString.call(Ur),mr=jn(Ur),Wr=Jr==="[object Object]"||Jr==="[object Array]",Lr=or?or+Le+xt(nr):xt(nr);if((Er=(Fr=Se).breakOn)!==null&&Er!==void 0&&Er.call(Fr,{key:nr,value:Ur,path:Lr})){wt[Lr]=St(Ur,Lr);return}if(!br&&!mr&&Wr&&Object.keys(Ur).length&&(!Se.maxDepth||Xn<dt))return In(Ur,Lr,Xn+1);wt[Lr]=St(Ur,Lr)})}return In(Te),wt}function Gn(Te){for(var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le={},dt=Se.transformValue||Ln,xt=0,St=Object.keys(Te);xt<St.length;xt++){var wt=St[xt];Xt()(Le,wt,dt(Te[wt],wt))}return Le}var Yn=function(Se){var Le=Se.split(".").pop()||"";return Le.startsWith("$")||(Le=""),{operator:Le}},_n=function(Se){return["$dateOn","$dateNotOn","$dateBefore","$dateAfter","$dateNotBefore","$dateNotAfter","$dateBetween"].includes(Se)};function Kt(Te){return Te instanceof Date||Object.prototype.toString.call(Te)==="[object Date]"}var zt=function(Se,Le){if(!Se)return null;if(Se.type&&(Se=U(Z()(Z()({},Se),{},{timezone:Le}))),Array.isArray(Se))return Se.length===2?Se.push("[]",Le):Se.length===3&&Se.push(Le),Se;if(typeof Se=="string")return!Le||/(\+|-)\d\d:\d\d$/.test(Se)?Se:Se+Le;if(Kt(Se))return Se.toISOString()},Yt=function(){var Te=mn()(en()().mark(function Se(Le){var dt,xt,St,wt,In,kn,or,Xn,nr=arguments;return en()().wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:if(dt=nr.length>1&&nr[1]!==void 0?nr[1]:{},xt=new Set,St=dt.vars||{},wt=dt.timezone,In=dt.now,kn=dt.getField,or=Tn(Le,{breakOn:function(br){var Jr=br.key;return Jr.startsWith("$")&&Jr!=="$and"&&Jr!=="$or"},transformValue:function(br){if(typeof br!="string")return br;var Jr=Mn.exec(br);if(Jr){var mr=Jr[1].trim();mr.startsWith("$user")&&xt.add(mr.substring(6))}return br}}),!(xt.size>0)){Fr.next=12;break}return Fr.next=10,St.$user({fields:oe()(xt.values())});case 10:Xn=Fr.sent,Object.assign(St,{$user:Xn});case 12:return Fr.abrupt("return",Gn(or,{transformValue:function(br,Jr){var mr=Yn(Jr),Wr=mr.operator;if(typeof br=="string"){var Lr=Mn.exec(br);if(Lr){var eo=Lr[1].trim(),fo=tn(St,eo,null),Lo=kn==null?void 0:kn(Jr);br=typeof fo=="function"?fo==null?void 0:fo({field:Lo,operator:Wr,timezone:wt,now:In}):fo}}if(_n(Wr)){var zr=kn==null?void 0:kn(Jr);return(zr==null?void 0:zr.constructor.name)==="DateOnlyField"||(zr==null?void 0:zr.constructor.name)==="DatetimeNoTzField"?br.type?U(Z()(Z()({},br),{},{timezone:(zr==null?void 0:zr.timezone)||wt})):br:zt(br,(zr==null?void 0:zr.timezone)||wt)}return br}}));case 13:case"end":return Fr.stop()}},Se)}));return function(Le){return Te.apply(this,arguments)}}();function Dn(Te){var Se=Te.now,Le=Te.timezone,dt=Le===void 0?"+00:00":Le,xt=Te.offset,St=yn(Se).utcOffset(Ye(dt));return xt>0?[(St=St.add(1,"day").startOf("day")).format("YYYY-MM-DD"),St.clone().add(xt,"day").startOf("day").format("YYYY-MM-DD"),"[)",dt]:[St.clone().subtract(-1*xt-1,"day").startOf("day").format("YYYY-MM-DD"),St.clone().add(1,"day").startOf("day").format("YYYY-MM-DD"),"[)",dt]}function yn(Te){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Te?l().isDayjs(Te)?Te:Se?on()(Te):l()(Te):Se?on()():l()()}function xn(Te){var Se,Le=Te.now,dt=Te.unit,xt=Te.timezone,St=xt===void 0?"+00:00":xt,wt=Te.offset,In=yn(Le,dt==="isoWeek");In=In.utcOffset(Ye(St)),In=In.startOf(dt),wt>0?In=In.add(wt,dt):wt<0&&(In=In.subtract(-1*wt,dt));var kn={year:function(){return In.format("YYYY")},quarter:function(){return In.format("YYYY[Q]Q")},month:function(){return In.format("YYYY-MM")},week:function(){return In.format("gggg[w]ww")},isoWeek:function(){return In.format("GGGG[W]WW")},day:function(){return In.format("YYYY-MM-DD")}},or=(Se=kn[dt])===null||Se===void 0?void 0:Se.call(kn);return St?or+St:or}var En=function(Se,Le){return function(dt){var xt=dt.now,St=dt.timezone,wt=dt.field;return wt!=null&&wt.timezone&&(St=wt==null?void 0:wt.timezone),xn({now:xt,timezone:St,unit:Se,offset:Le})}},Pn=function(Se){return function(Le){var dt=Le.now,xt=Le.timezone,St=Le.field;return St!=null&&St.timezone&&(xt=St==null?void 0:St.timezone),Dn({now:dt,timezone:xt,offset:Se})}};function Wn(){return{now:new Date().toISOString(),today:En("day"),yesterday:En("day",-1),tomorrow:En("day",1),thisWeek:En("week"),lastWeek:En("week",-1),nextWeek:En("week",1),thisIsoWeek:En("isoWeek"),lastIsoWeek:En("isoWeek",-1),nextIsoWeek:En("isoWeek",1),thisMonth:En("month"),lastMonth:En("month",-1),nextMonth:En("month",1),thisQuarter:En("quarter"),lastQuarter:En("quarter",-1),nextQuarter:En("quarter",1),thisYear:En("year"),lastYear:En("year",-1),nextYear:En("year",1),last7Days:Pn(-7),next7Days:Pn(7),last30Days:Pn(-30),next30Days:Pn(30),last90Days:Pn(-90),next90Days:Pn(90)}}function vr(Te){var Se=Te.split(".");return[Se.shift(),Se.join(".")]}var pn=function(){function Te(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{override:!1};V()(this,Te),L()(this,"map",new Map),L()(this,"options",void 0),this.options=Se}return ne()(Te,[{key:"register",value:function(Le,dt){if(!this.options.override&&this.map.has(Le))throw new Error('this registry does not allow to override existing keys: "'.concat(Le,'"'));this.map.set(Le,dt)}},{key:"get",value:function(Le){return this.map.get(Le)}},{key:"getKeys",value:function(){return this.map.keys()}},{key:"getValues",value:function(){return this.map.values()}},{key:"getEntities",value:function(){return this.map.entries()}}]),Te}(),Rt=null;function Ae(Te,Se){return Se?"{{t(".concat(JSON.stringify(Te),", ").concat(JSON.stringify(Se),")}}"):"{{t(".concat(JSON.stringify(Te),")}}")}var mt=function(Se){for(;Se;){var Le;if(Se.id==="root"||(Le=Se.classList)!==null&&Le!==void 0&&Le.contains("nb-action"))return!1;Se=Se.parentNode}return!{NODE_ENV:"production",PUBLIC_PATH:"auto"}.__TEST__};function ft(Te,Se){return Te.replace(/\{\{(\w+)\}\}/g,function(Le,dt){return typeof Se[dt]<"u"?Se[dt]:Le})}for(var nt=36,lt="";nt--;)lt+=nt.toString(36);function Ut(Te){for(var Se="",Le=Te||11;Le--;)Se+=lt[Math.random()*36|0];return Se}function vn(Te){var Se;try{Se=new URL(Te)}catch{return!1}return Se.protocol==="http:"||Se.protocol==="https:"}var qt=e(33833),Nn=JSON.parse('{"i8":"2.0.0-alpha.10"}'),$n=function Te(Se,Le){if(!Se)return Se;if(Se["x-component"]!=="Grid")return Object.keys(Se.properties||{}).forEach(function(Xn){Se.properties[Xn]=Te(Se.properties[Xn],Le)}),Se;var dt=Se.parent;Se.toJSON?Se=Se.toJSON():Se=a().cloneDeep(Se);var xt={},St=Se,wt=St.properties,In=wt===void 0?{}:wt,kn=0;if(Object.keys(In).forEach(function(Xn,nr){var Er=In[Xn];if(Er["x-component"]!=="Grid.Row"){Er["x-index"]=++kn,xt[Xn]=Er;return}if(Er.properties){if(Object.keys(Er.properties).length===1){Er["x-index"]=++kn,xt[Xn]=Er;return}Object.keys(Er.properties).forEach(function(Fr,Ur){var br=Er.properties[Fr];if(a().set(br,"x-component-props.width",100),Ur===0){Er["x-index"]=++kn,xt[Xn]=Er;return}Le!=null&&Le(br)||(delete Er.properties[Fr],xt["".concat(Ut(),"_").concat(Fr)]=sr(br,Fr,++kn))})}}),Se.properties=xt,dt){var or=new qt.Schema(Se,dt);return dt.properties&&Object.keys(dt.properties).forEach(function(Xn){Xn===Se.name&&(dt.properties[Xn]=or)}),or}return Se};function sr(Te,Se,Le){return{type:"void",version:"2.0","x-component":"Grid.Row","x-app-version":Nn.i8,"x-uid":Ut(),"x-async":!1,"x-index":Le,_isJSONSchemaObject:!0,properties:L()({},Se,Te)}}function Qt(Te){var Se=new Set,Le=function dt(xt){if(typeof xt=="string")for(var St=/\{\{\s*([^}]+?)\s*\}\}/g,wt;(wt=St.exec(xt))!==null;){for(var In=wt[1],kn=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)/g,or=void 0;(or=kn.exec(In))!==null;)Se.add(or[1]);for(var Xn=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]/g,nr=void 0;(nr=Xn.exec(In))!==null;)Se.add(nr[2])}else Array.isArray(xt)?xt.forEach(dt):xt&&ie()(xt)==="object"&&Object.values(xt).forEach(dt)};return Le(Te),Se}function Ft(Te){var Se={},Le=function dt(xt){if(typeof xt=="string")for(var St=/\{\{\s*([^}]+?)\s*\}\}/g,wt;(wt=St.exec(xt))!==null;){for(var In=wt[1],kn=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)([^\s)]*)/g,or=void 0;(or=kn.exec(In))!==null;){var Xn=or[1],nr=or[2]||"";if(Se[Xn]=Se[Xn]||[],nr.startsWith("."))Se[Xn].push(nr.slice(1));else if(nr.startsWith("[")){var Er=nr.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(Er){var Fr=Er[2],Ur=Er[3]||"";Se[Xn].push("".concat(Fr).concat(Ur))}else{var br=nr.match(/^\[(\d+)\](.*)$/);if(br){var Jr=br[1],mr=br[2]||"";Se[Xn].push("[".concat(Jr,"]").concat(mr))}}}else nr.startsWith("(")&&(Se[Xn].length||Se[Xn].push(""))}for(var Wr=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]([^\s)]*)/g,Lr=void 0;(Lr=Wr.exec(In))!==null;){var eo=Lr[2],fo=Lr[3]||"";if(Se[eo]=Se[eo]||[],fo.startsWith("."))Se[eo].push(fo.slice(1));else if(fo.startsWith("[")){var Lo=fo.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(Lo){var zr=Lo[2],Ao=Lo[3]||"";Se[eo].push("".concat(zr).concat(Ao))}else{var vo=fo.match(/^\[(\d+)\](.*)$/);if(vo){var lo=vo[1],Do=vo[2]||"";Se[eo].push("[".concat(lo,"]").concat(Do))}}}else fo.startsWith("(")&&(Se[eo].length||Se[eo].push(""))}}else Array.isArray(xt)?xt.forEach(dt):xt&&ie()(xt)==="object"&&Object.values(xt).forEach(dt)};return Le(Te),Se}},14994:function(){"use strict"},40408:function(_t,ve,e){var q={"./af":[15903,4920],"./af.js":[15903,4920],"./am":[29911,4920],"./am.js":[29911,4920],"./ar":[63939,4920],"./ar-dz":[47200,4920],"./ar-dz.js":[47200,4920],"./ar-iq":[87719,4920],"./ar-iq.js":[87719,4920],"./ar-kw":[62376,4920],"./ar-kw.js":[62376,4920],"./ar-ly":[48540,4920],"./ar-ly.js":[48540,4920],"./ar-ma":[96817,4920],"./ar-ma.js":[96817,4920],"./ar-sa":[11573,4920],"./ar-sa.js":[11573,4920],"./ar-tn":[99339,4920],"./ar-tn.js":[99339,4920],"./ar.js":[63939,4920],"./az":[88092,4920],"./az.js":[88092,4920],"./be":[60504,4920],"./be.js":[60504,4920],"./bg":[19091,4920],"./bg.js":[19091,4920],"./bi":[19149,4920],"./bi.js":[19149,4920],"./bm":[15287,4920],"./bm.js":[15287,4920],"./bn":[35254,4920],"./bn-bd":[61177,4920],"./bn-bd.js":[61177,4920],"./bn.js":[35254,4920],"./bo":[52502,4920],"./bo.js":[52502,4920],"./br":[8864,4920],"./br.js":[8864,4920],"./bs":[4502,4920],"./bs.js":[4502,4920],"./ca":[33646,4920],"./ca.js":[33646,4920],"./cs":[98507,4920],"./cs.js":[98507,4920],"./cv":[16636,4920],"./cv.js":[16636,4920],"./cy":[28792,4920],"./cy.js":[28792,4920],"./da":[17427,4920],"./da.js":[17427,4920],"./de":[80790,4920],"./de-at":[73237,4920],"./de-at.js":[73237,4920],"./de-ch":[16148,4920],"./de-ch.js":[16148,4920],"./de.js":[80790,4920],"./dv":[11794,4920],"./dv.js":[11794,4920],"./el":[65423,4920],"./el.js":[65423,4920],"./en":[25054,4920],"./en-au":[85109,4920],"./en-au.js":[85109,4920],"./en-ca":[55105,4920],"./en-ca.js":[55105,4920],"./en-gb":[99517,4920],"./en-gb.js":[99517,4920],"./en-ie":[30758,4920],"./en-ie.js":[30758,4920],"./en-il":[95805,4920],"./en-il.js":[95805,4920],"./en-in":[88529,4920],"./en-in.js":[88529,4920],"./en-nz":[50302,4920],"./en-nz.js":[50302,4920],"./en-sg":[35941,4920],"./en-sg.js":[35941,4920],"./en-tt":[46183,4920],"./en-tt.js":[46183,4920],"./en.js":[25054,4920],"./eo":[74990,4920],"./eo.js":[74990,4920],"./es":[67763,4920],"./es-do":[3864,4920],"./es-do.js":[3864,4920],"./es-mx":[37118,4920],"./es-mx.js":[37118,4920],"./es-pr":[23521,4920],"./es-pr.js":[23521,4920],"./es-us":[36165,4920],"./es-us.js":[36165,4920],"./es.js":[67763,4920],"./et":[99670,4920],"./et.js":[99670,4920],"./eu":[20837,4920],"./eu.js":[20837,4920],"./fa":[81379,4920],"./fa.js":[81379,4920],"./fi":[47822,4920],"./fi.js":[47822,4920],"./fo":[69197,4920],"./fo.js":[69197,4920],"./fr":[96023,4920],"./fr-ca":[77989,4920],"./fr-ca.js":[77989,4920],"./fr-ch":[54254,4920],"./fr-ch.js":[54254,4920],"./fr.js":[96023,4920],"./fy":[93220,4920],"./fy.js":[93220,4920],"./ga":[47467,4920],"./ga.js":[47467,4920],"./gd":[54855,4920],"./gd.js":[54855,4920],"./gl":[90229,4920],"./gl.js":[90229,4920],"./gom-latn":[46312,4920],"./gom-latn.js":[46312,4920],"./gu":[87632,4920],"./gu.js":[87632,4920],"./he":[76875,4920],"./he.js":[76875,4920],"./hi":[77573,4920],"./hi.js":[77573,4920],"./hr":[96257,4920],"./hr.js":[96257,4920],"./ht":[98889,4920],"./ht.js":[98889,4920],"./hu":[68562,4920],"./hu.js":[68562,4920],"./hy-am":[38242,4920],"./hy-am.js":[38242,4920],"./id":[83783,4920],"./id.js":[83783,4920],"./index.d":[46990,4920],"./index.d.ts":[46990,4920],"./is":[98980,4920],"./is.js":[98980,4920],"./it":[15551,4920],"./it-ch":[83706,4920],"./it-ch.js":[83706,4920],"./it.js":[15551,4920],"./ja":[76831,4920],"./ja.js":[76831,4920],"./jv":[42641,4920],"./jv.js":[42641,4920],"./ka":[46622,4920],"./ka.js":[46622,4920],"./kk":[32921,4920],"./kk.js":[32921,4920],"./km":[45567,4920],"./km.js":[45567,4920],"./kn":[21113,4920],"./kn.js":[21113,4920],"./ko":[19132,4920],"./ko.js":[19132,4920],"./ku":[94888,4920],"./ku.js":[94888,4920],"./ky":[60466,4920],"./ky.js":[60466,4920],"./lb":[91796,4920],"./lb.js":[91796,4920],"./lo":[68894,4920],"./lo.js":[68894,4920],"./lt":[78768,4920],"./lt.js":[78768,4920],"./lv":[30953,4920],"./lv.js":[30953,4920],"./me":[18066,4920],"./me.js":[18066,4920],"./mi":[68602,4920],"./mi.js":[68602,4920],"./mk":[51560,4920],"./mk.js":[51560,4920],"./ml":[4017,4920],"./ml.js":[4017,4920],"./mn":[94717,4920],"./mn.js":[94717,4920],"./mr":[15473,4920],"./mr.js":[15473,4920],"./ms":[43986,4920],"./ms-my":[77387,4920],"./ms-my.js":[77387,4920],"./ms.js":[43986,4920],"./mt":[28477,4920],"./mt.js":[28477,4920],"./my":[62966,4920],"./my.js":[62966,4920],"./nb":[19682,4920],"./nb.js":[19682,4920],"./ne":[14149,4920],"./ne.js":[14149,4920],"./nl":[99182,4920],"./nl-be":[37496,4920],"./nl-be.js":[37496,4920],"./nl.js":[99182,4920],"./nn":[92722,4920],"./nn.js":[92722,4920],"./oc-lnc":[76159,4920],"./oc-lnc.js":[76159,4920],"./pa-in":[35914,4920],"./pa-in.js":[35914,4920],"./pl":[81987,4920],"./pl.js":[81987,4920],"./pt":[15001,4920],"./pt-br":[57548,4920],"./pt-br.js":[57548,4920],"./pt.js":[15001,4920],"./rn":[123,4920],"./rn.js":[123,4920],"./ro":[18146,4920],"./ro.js":[18146,4920],"./ru":[70600,4920],"./ru.js":[70600,4920],"./rw":[6509,4920],"./rw.js":[6509,4920],"./sd":[65437,4920],"./sd.js":[65437,4920],"./se":[772,4920],"./se.js":[772,4920],"./si":[77109,4920],"./si.js":[77109,4920],"./sk":[35627,4920],"./sk.js":[35627,4920],"./sl":[82544,4920],"./sl.js":[82544,4920],"./sq":[88341,4920],"./sq.js":[88341,4920],"./sr":[50617,4920],"./sr-cyrl":[37101,4920],"./sr-cyrl.js":[37101,4920],"./sr.js":[50617,4920],"./ss":[64127,4920],"./ss.js":[64127,4920],"./sv":[91876,4920],"./sv-fi":[19911,4920],"./sv-fi.js":[19911,4920],"./sv.js":[91876,4920],"./sw":[46148,4920],"./sw.js":[46148,4920],"./ta":[55596,4920],"./ta.js":[55596,4920],"./te":[45159,4920],"./te.js":[45159,4920],"./tet":[99157,4920],"./tet.js":[99157,4920],"./tg":[9928,4920],"./tg.js":[9928,4920],"./th":[62019,4920],"./th.js":[62019,4920],"./tk":[75817,4920],"./tk.js":[75817,4920],"./tl-ph":[46513,4920],"./tl-ph.js":[46513,4920],"./tlh":[97296,4920],"./tlh.js":[97296,4920],"./tr":[73035,4920],"./tr.js":[73035,4920],"./types.d":[63799,4920],"./types.d.ts":[63799,4920],"./tzl":[57797,4920],"./tzl.js":[57797,4920],"./tzm":[84722,4920],"./tzm-latn":[30261,4920],"./tzm-latn.js":[30261,4920],"./tzm.js":[84722,4920],"./ug-cn":[80313,4920],"./ug-cn.js":[80313,4920],"./uk":[64144,4920],"./uk.js":[64144,4920],"./ur":[92957,4920],"./ur.js":[92957,4920],"./uz":[7486,4920],"./uz-latn":[98727,4920],"./uz-latn.js":[98727,4920],"./uz.js":[7486,4920],"./vi":[37553,4920],"./vi.js":[37553,4920],"./x-pseudo":[55321,4920],"./x-pseudo.js":[55321,4920],"./yo":[14724,4920],"./yo.js":[14724,4920],"./zh":[32009,4920],"./zh-cn":[33852],"./zh-cn.js":[33852],"./zh-hk":[2390,4920],"./zh-hk.js":[2390,4920],"./zh-tw":[43901,4920],"./zh-tw.js":[43901,4920],"./zh.js":[32009,4920]};function a(X){if(!e.o(q,X))return Promise.resolve().then(function(){var m=new Error("Cannot find module '"+X+"'");throw m.code="MODULE_NOT_FOUND",m});var l=q[X],P=l[0];return Promise.all(l.slice(1).map(e.e)).then(function(){return e.t(P,23)})}a.keys=function(){return Object.keys(q)},a.id=40408,_t.exports=a},79595:function(_t){function ve(e){return Promise.resolve().then(function(){var q=new Error("Cannot find module '"+e+"'");throw q.code="MODULE_NOT_FOUND",q})}ve.keys=function(){return[]},ve.resolve=ve,ve.id=79595,_t.exports=ve},59816:function(){},24654:function(){},95506:function(){},75347:function(){},31777:function(){},34017:function(){},59905:function(){},64604:function(){},75042:function(){}}]);
|
|
2272
|
+
- Page navigation: await ctx.openView("dashboard", { mode: "page" })`,detail:"Promise<void>",completion:{insertText:"await ctx.openView('view-id', { mode: 'drawer', params: {} })"}}}}),o.Uo.define({label:"RunJS \u57FA\u7840",properties:{logger:'Pino \u65E5\u5FD7\u5B9E\u4F8B\uFF08\u7ED3\u6784\u5316\u65E5\u5FD7\uFF09\u3002\u793A\u4F8B\uFF1A`ctx.logger.info({ foo: 1 }, "message")`',message:'Ant Design \u5168\u5C40\u6D88\u606F API\uFF0C\u7528\u4E8E\u663E\u793A\u4E34\u65F6\u63D0\u793A\u3002\u793A\u4F8B\uFF1A`ctx.message.success("\u64CD\u4F5C\u6210\u529F")`',notification:'Ant Design \u901A\u77E5 API\uFF0C\u7528\u4E8E\u663E\u793A\u901A\u77E5\u6846\u3002\u793A\u4F8B\uFF1A`ctx.notification.open({ message: "\u6807\u9898", description: "\u5185\u5BB9" })`',resource:"\u57FA\u4E8E\u5F53\u524D\u7528\u6237\u6743\u9650\u53EF\u8BBF\u95EE\u7684\u6570\u636E\u8D44\u6E90",urlSearchParams:"\u5F53\u524D URL \u7684\u67E5\u8BE2\u53C2\u6570\uFF08URLSearchParams \u5BF9\u8C61\uFF09",token:"\u5F53\u524D\u4F1A\u8BDD\u7684 API \u8BA4\u8BC1 token",role:"\u5F53\u524D\u7528\u6237\u89D2\u8272\u4FE1\u606F",auth:"\u8BA4\u8BC1\u4E0A\u4E0B\u6587\uFF0C\u5305\u542B locale\u3001role\u3001user\u3001token \u7B49\u4FE1\u606F",api:{description:"\u7528\u4E8E\u53D1\u8D77 HTTP \u8BF7\u6C42\u7684 APIClient \u5B9E\u4F8B",detail:"APIClient",properties:{request:{description:"\u901A\u8FC7 ctx.api.request \u53D1\u8D77 HTTP \u8BF7\u6C42\uFF0C\u5165\u53C2\u4E3A RequestOptions\uFF0C\u8FD4\u56DE Promise\u3002",detail:"Promise<any>",completion:{insertText:"await ctx.api.request({ url: '', method: 'get', params: {} })"}}}},i18n:{description:"i18next \u5B9E\u4F8B\uFF0C\u53EF\u7528\u4E8E\u7BA1\u7406\u56FD\u9645\u5316",detail:"i18next",properties:{language:"\u5F53\u524D\u6FC0\u6D3B\u7684\u8BED\u8A00\u4EE3\u7801"}},React:"React \u547D\u540D\u7A7A\u95F4\uFF0C\u63D0\u4F9B React \u51FD\u6570\u4E0E hooks\uFF08RunJS \u73AF\u5883\u4E2D\u53EF\u7528\uFF09",ReactDOM:"ReactDOM \u5BA2\u6237\u7AEF API\uFF0C\u542B createRoot \u7B49\u6E32\u67D3\u65B9\u6CD5",antd:"Ant Design \u7EC4\u4EF6\u5E93\uFF08RunJS \u73AF\u5883\u4E2D\u53EF\u7528\uFF09"},methods:{t:'\u56FD\u9645\u5316\u51FD\u6570\uFF0C\u7528\u4E8E\u7FFB\u8BD1\u6587\u6848\u3002\u53C2\u6570\uFF1A(key: string, variables?: object) => string\u3002\u793A\u4F8B\uFF1A`ctx.t("\u4F60\u597D {name}", { name: "\u4E16\u754C" })`',requireAsync:'\u6309 URL \u5F02\u6B65\u52A0\u8F7D\u5916\u90E8\u5E93\u3002\u53C2\u6570\uFF1A(url: string) => Promise<any>\u3002\u793A\u4F8B\uFF1A`const lodash = await ctx.requireAsync("https://cdn.jsdelivr.net/npm/lodash")`',importAsync:'\u6309 URL \u52A8\u6001\u5BFC\u5165 ESM \u6A21\u5757\uFF08\u5F00\u53D1/\u751F\u4EA7\u5747\u53EF\u7528\uFF09\u3002\u53C2\u6570\uFF1A(url: string) => Promise<Module>\u3002\u793A\u4F8B\uFF1A`const mod = await ctx.importAsync("https://cdn.jsdelivr.net/npm/lit-html@2/+esm")`',resolveJsonTemplate:"\u89E3\u6790\u542B {{ }} \u53D8\u91CF\u8868\u8FBE\u5F0F\u7684 JSON \u6A21\u677F\u3002\u53C2\u6570\uFF1A(template: any, context?: object) => any",runAction:{description:'\u5BF9\u5F53\u524D\u8D44\u6E90\u6267\u884C\u6570\u636E\u52A8\u4F5C\u3002\u53C2\u6570\uFF1A(actionName: string, params: object) => Promise<any>\u3002\u793A\u4F8B\uFF1A`await ctx.runAction("create", { values: { name: "test" } })`',detail:"Promise<any>",completion:{insertText:"await ctx.runAction('create', { values: {} })"}},openView:{description:"\u6839\u636E\u552F\u4E00\u6807\u8BC6\u6253\u5F00\u89C6\u56FE\uFF08\u9875\u9762/\u5F39\u7A97/\u62BD\u5C49\uFF09\u3002\u53C2\u6570\uFF1A(viewId: string, options?: OpenViewOptions) => Promise<void>`\uFF0C\u5E38\u7528\u9009\u9879\uFF1Aparams\u3001mode\u3001title\u3001width\u3001navigation\u3001preventClose\u3001viewUid\u3001isMobileLayout\u3002",detail:"Promise<void>",completion:{insertText:"await ctx.openView('view-id', { mode: 'drawer', params: {} })"}}}},{locale:"zh-CN"})}var b=e(57930),j=!1;function f(){return g.apply(this,arguments)}function g(){return g=m()(a()().mark(function n(){var M,T,u,r,A,y,K,R,Y,x;return a()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(!j){F.next=2;break}return F.abrupt("return");case 2:return N(),F.next=5,Promise.all([b("imported_1c9ja9j_component",e.e(95).then(e.bind(e,10095))),b("imported_13i6jpv_component",e.e(113).then(e.bind(e,40113))),b("imported_-11lme08_component",e.e(1442).then(e.bind(e,41442))),b("imported_-omm1q9_component",e.e(4727).then(e.bind(e,64727))),b("imported_-1v4l8a_component",e.e(7087).then(e.bind(e,67087))),b("imported_ng0n4j_component",e.e(5013).then(e.bind(e,55013))),b("imported_8ja8bj_component",e.e(689).then(e.bind(e,689)))]);case 5:M=F.sent,T=l()(M,7),u=T[0].JSBlockRunJSContext,r=T[1].JSFieldRunJSContext,A=T[2].JSItemRunJSContext,y=T[3].JSColumnRunJSContext,K=T[4].FormJSFieldItemRunJSContext,R=T[5].JSRecordActionRunJSContext,Y=T[6].JSCollectionActionRunJSContext,x="v1",z.e.register(x,"*",o.Uo),z.e.register(x,"JSBlockModel",u,{scenes:["block"]}),z.e.register(x,"JSFieldModel",r,{scenes:["detail"]}),z.e.register(x,"JSItemModel",A,{scenes:["form"]}),z.e.register(x,"JSColumnModel",y,{scenes:["table"]}),z.e.register(x,"FormJSFieldItemModel",K,{scenes:["form"]}),z.e.register(x,"JSRecordActionModel",R,{scenes:["table"]}),z.e.register(x,"JSCollectionActionModel",Y,{scenes:["table"]}),j=!0;case 24:case"end":return F.stop()}},n)})),g.apply(this,arguments)}},81886:function(_t,ve,e){"use strict";e.d(ve,{L:function(){return f}});var q=e(15009),a=e.n(q),X=e(99289),l=e.n(X),P=e(97857),m=e.n(P),z=["belongsTo","hasOne","hasMany","belongsToMany","belongsToArray"],o=["integer","float","double","decimal"];function N(g){var n=j(g);if(g.isAssociationField()){var M=g.targetCollection;return M?m()(m()({type:"object"},n),{},{properties:function(){var T=l()(a()().mark(function r(){var A;return a()().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return A={},M.fields.forEach(function(R){A[R.name]=N(R)}),K.abrupt("return",A);case 3:case"end":return K.stop()}},r)}));function u(){return T.apply(this,arguments)}return u}()}):m()({type:"object"},n)}return m()({type:b(g)},n)}function b(g){var n=g.type;if(z.includes(n))return"object";if(o.includes(n))return"number";switch(n){case"boolean":return"boolean";case"json":return"object";case"array":return"array";default:return"string"}}function j(g){return{title:g.title||g.name,interface:g.interface,uiSchema:g.uiSchema||{}}}function f(g,n){var M=function(){var T=l()(a()().mark(function u(){var r;return a()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(r=typeof g=="function"?g():g,r){y.next=3;break}return y.abrupt("return",null);case 3:return y.abrupt("return",{type:"object",title:n||r.title||r.name,properties:function(){var K=l()(a()().mark(function Y(){var x;return a()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return x={},r.fields.forEach(function(v){x[v.name]=N(v)}),F.abrupt("return",x);case 3:case"end":return F.stop()}},Y)}));function R(){return K.apply(this,arguments)}return R}()});case 4:case"end":return y.stop()}},u)}));return function(){return T.apply(this,arguments)}}();return M.title=n,M}},27482:function(_t,ve,e){"use strict";e.d(ve,{N:function(){return T},i:function(){return M}});var q=e(72004),a=e.n(q),X=e(12444),l=e.n(X),P=e(25098),m=e.n(P),z=e(31996),o=e.n(z),N=e(26037),b=e.n(N),j=e(12665),f=e.n(j),g=e(9783),n=e.n(g),M=function(u){o()(A,u);var r=b()(A);function A(y,K,R){var Y;return l()(this,A),Y=r.call(this,R||"Flow '".concat(y,"' on model '").concat(K,"' exited via ctx.exit().")),n()(m()(Y),"flowKey",void 0),n()(m()(Y),"modelUid",void 0),Y.name="FlowExitException",Y.flowKey=y,Y.modelUid=K,Y}return a()(A)}(f()(Error)),T=function(u){o()(A,u);var r=b()(A);function A(y,K,R){var Y;return l()(this,A),Y=r.call(this,R||"Flow '".concat(y,"' on model '").concat(K,"' exited via ctx.exitAll().")),n()(m()(Y),"flowKey",void 0),n()(m()(Y),"modelUid",void 0),Y.name="FlowExitAllException",Y.flowKey=y,Y.modelUid=K,Y}return a()(A)}(f()(Error))},65247:function(_t,ve,e){"use strict";e.d(ve,{vy:function(){return X},$W:function(){return a},Np:function(){return q},ie:function(){return b.i},Ix:function(){return P},Yp:function(){return d.Yp},E2:function(){return D},N3:function(){return d.N3},QS:function(){return i},LR:function(){return c.L},RB:function(){return d.RB},a9:function(){return d.a9},uh:function(){return k},T:function(){return G},bU:function(){return j},xv:function(){return N},v9:function(){return p},_6:function(){return d._6},gn:function(){return d.gn},sy:function(){return C},Zx:function(){return t},xG:function(){return o},sg:function(){return d.sg},tv:function(){return f},n9:function(){return h},wH:function(){return U},cO:function(){return g.cO},nw:function(){return g.nw},HA:function(){return g.HA},ME:function(){return I},hj:function(){return B},Qs:function(){return S},ZQ:function(){return R.Z},KL:function(){return N}});var q="flow-engine",a={DATA:"dataBlocks",FILTER:"filterBlocks",OTHER:"otherBlocks"},X={data:{key:a.DATA,label:"Data blocks",type:"group",hasCurrentFlowContext:!0},filter:{key:a.FILTER,label:"Filter blocks",type:"group",hasCurrentFlowContext:!1},other:{key:a.OTHER,label:"Other blocks",type:"group",hasCurrentFlowContext:!1}},l=null,P={CURRENT_RECORD:"currentRecord",ASSOCIATION_RECORDS:"associationRecords",OTHER_RECORDS:"otherRecords",OTHER_COLLECTIONS:"otherCollections",CURRENT_COLLECTIONS:"currentCollections"},m=e(97857),z=e.n(m);function o($){var V;return(V=$.flowEngine)!==null&&V!==void 0&&V.translate?function(J,ne){return $.flowEngine.translate(J,z()({ns:[q,"client"],nsMode:"fallback"},ne))}:function(J){return J}}function N($,V){return V?"{{t(".concat(JSON.stringify($),", ").concat(JSON.stringify(V),")}}"):"{{t(".concat(JSON.stringify($),")}}")}var b=e(27482);function j($){return $}function f($,V){if($===V)return!1;if($.prototype instanceof V)return!0;for(var J=Object.getPrototypeOf($.prototype);J&&J!==Object.prototype;){if(J.constructor===V)return!0;J=Object.getPrototypeOf(J)}return!1}var g=e(26233),n=e(15009),M=e.n(n),T=e(52677),u=e.n(T),r=e(99289),A=e.n(r),y=e(33833),K=e(1772),R=e(2991);function Y($,V){return x.apply(this,arguments)}function x(){return x=A()(M()().mark(function $(V,J){var ne;return M()().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(V){Q.next=2;break}return Q.abrupt("return",{});case 2:if(typeof V!="function"){Q.next=14;break}return Q.prev=3,Q.next=6,V(J);case 6:return ne=Q.sent,Q.abrupt("return",ne||{});case 10:return Q.prev=10,Q.t0=Q.catch(3),console.error("Error resolving uiSchema function:",Q.t0),Q.abrupt("return",{});case 14:return Q.abrupt("return",V);case 15:case"end":return Q.stop()}},$,null,[[3,10]])})),x.apply(this,arguments)}function B($,V){return F.apply(this,arguments)}function F(){return F=A()(M()().mark(function $(V,J){var ne;return M()().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(V){Q.next=2;break}return Q.abrupt("return","dialog");case 2:if(typeof V!="function"){Q.next=14;break}return Q.prev=3,Q.next=6,V(J);case 6:return ne=Q.sent,Q.abrupt("return",ne||"dialog");case 10:return Q.prev=10,Q.t0=Q.catch(3),console.error("Error resolving uiMode function:",Q.t0),Q.abrupt("return","dialog");case 14:return Q.abrupt("return",V);case 15:case"end":return Q.stop()}},$,null,[[3,10]])})),F.apply(this,arguments)}var v={};function i($,V){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ne=J.noCache,ee=ne===void 0?!1:ne,Q=function(w){var Z=/\{\{.*?\}\}/g;return Z.test(w)},W=function(w){var Z=!1,te;if(typeof w=="string"&&w.startsWith("{{")&&(Z=!0,te=w),w&&u()(w)==="object"&&!Array.isArray(w)){try{te=JSON.stringify(w)}catch(oe){return console.warn("Failed to stringify:",oe),w}if(v[te])return v[te];Z=Q(te)}if(Array.isArray(w)){try{te=JSON.stringify(w)}catch(oe){return console.warn("Failed to stringify:",oe),w}if(v[te])return v[te];Z=Q(te)}if(Z){if(!te)try{return y.Schema.compile(w,$)}catch(oe){return console.warn("Failed to compile with Formily Schema.compile:",oe),w}try{return ee?y.Schema.compile(w,$):(v[te]=v[te]||y.Schema.compile(w,$),v[te])}catch(oe){console.log("compileUiSchema error",w,oe);try{return y.Schema.compile(w,$)}catch{return w}}}return w};return W(V)}function I($,V,J){return O.apply(this,arguments)}function O(){return O=A()(M()().mark(function $(V,J,ne){var ee,Q,W,L,w,Z;return M()().wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(ee=new K.P$(V,J.key,"settings"),(0,R.Z)(ee,J.steps,V,J.key),ee.defineProperty("currentStep",{value:ne}),Q=ne.uiSchema,ne.use)try{w=(W=V.flowEngine)===null||W===void 0||(L=W.getAction)===null||L===void 0?void 0:L.call(W,ne.use),w&&w.uiSchema&&(Q=Q||w.uiSchema)}catch(fe){console.warn("Failed to get action ".concat(ne.use,":"),fe)}return oe.next=7,Y(Q||{},ee);case 7:if(Z=oe.sent,Object.keys(Z).length!==0){oe.next=10;break}return oe.abrupt("return",null);case 10:return oe.abrupt("return",Z);case 11:case"end":return oe.stop()}},$)})),O.apply(this,arguments)}var c=e(81886),d=e(16184);function p($){if(typeof $!="string")return null;var V=$.trim(),J=/^\{\{\s*ctx(?:\.(.+?))?\s*\}\}$/,ne=V.match(J);if(!ne)return null;var ee=ne[1];return ee?ee.split(".").map(function(Q){return Q.trim()}).filter(function(Q){return Q.length>0}):[]}function C($){return $.length===0?"{{ ctx }}":"{{ ctx.".concat($.join(".")," }}")}function h($){if(typeof $!="string")return!1;var V=$.trim(),J=/^\{\{\s*ctx(?:\..+?)?\s*\}\}$/;return J.test(V)}var E=new WeakMap;function S($,V){E.set($,V??null)}function t($){var V;return(V=E.get($))!==null&&V!==void 0?V:null}function D($){E.delete($)}var U=function(V){if(!V||V==="/")return[];var J=V.replace(/^\/+/,"").split("/").filter(Boolean);if(J.length<2)return[];for(var ne=[],ee=null,Q=0;Q<J.length;){var W=J[Q];if(W==="admin"||W==="view")if(ee&&ne.push(ee),Q+1<J.length)ee={viewUid:J[Q+1]},Q+=2;else break;else if(ee&&Q+1<J.length){var L=J[Q+1];switch(W){case"tab":ee.tabUid=L;break;case"filterbytk":ee.filterByTk=L;break;case"sourceid":ee.sourceId=L;break;default:break}Q+=2}else Q++}return ee&&ne.push(ee),ne};function G($){var V=function(){return"".concat(window.location.origin).concat(window.location.pathname)},J=function(L,w,Z){var te=function(le){try{var ue=new URL(le,V()),me=ue.protocol.toLowerCase();return me==="about:"?ue.href==="about:blank":me==="http:"||me==="https:"}catch{return!1}};if(!te(L))throw new Error("Unsafe URL: window.open only allows http/https/about:blank.");var oe="_blank",fe=function(le){var ue=new Set;return le&&le.split(",").map(function(me){return me.trim()}).filter(Boolean).forEach(function(me){var se=me.split("=")[0].trim().toLowerCase();se!=="noopener"&&se!=="noreferrer"&&ue.add(me)}),ue.add("noopener"),ue.add("noreferrer"),Array.from(ue).join(",")},xe=fe(Z),he=window.open.call(window,L,oe,xe);if(he&&"opener"in he)try{he.opener=null}catch{}return he},ne=function(L,w){var Z=new URL(L,V()),te=Z.protocol.toLowerCase(),oe=te==="about:"&&Z.href==="about:blank",fe=te==="http:"||te==="https:";if(!fe&&!oe)throw new Error("Unsafe URL: only http/https/about:blank are allowed.");if(oe)return w!=null&&w.replace?window.location.replace("about:blank"):window.location.assign("about:blank");var xe=Z.protocol===window.location.protocol&&Z.hostname===window.location.hostname&&Z.port===window.location.port;if(xe)return w!=null&&w.replace?window.location.replace(Z.href):window.location.assign(Z.href);var he=J(Z.href);if(!he)throw new Error("Popup blocked: cross-origin navigation is opened in a new tab.")},ee=new Proxy({},{get:function(L,w){switch(w){case"origin":return window.location.origin;case"protocol":return window.location.protocol;case"host":return window.location.host;case"hostname":return window.location.hostname;case"port":return window.location.port;case"pathname":return window.location.pathname;case"assign":return function(Z){return ne(Z,{replace:!1})};case"replace":return function(Z){return ne(Z,{replace:!0})};case"reload":throw new Error("Access to location.reload is not allowed.");case"href":throw new Error("Reading location.href is not allowed.");default:throw new Error('Access to location property "'.concat(w,'" is not allowed.'))}},set:function(L,w,Z){if(w==="href")return ne(String(Z),{replace:!1}),!0;throw new Error("Mutation on location is not allowed.")}}),Q=z()({setTimeout:window.setTimeout.bind(window),clearTimeout:window.clearTimeout.bind(window),setInterval:window.setInterval.bind(window),clearInterval:window.clearInterval.bind(window),console,Math,Date,addEventListener:addEventListener.bind(window),open:J,location:ee},$||{});return new Proxy({},{get:function(L,w){if(w in Q)return Q[w];throw new Error('Access to global property "'.concat(w,'" is not allowed.'))}})}function k($){var V=z()({createElement:document.createElement.bind(document),querySelector:document.querySelector.bind(document),querySelectorAll:document.querySelectorAll.bind(document)},$||{});return new Proxy({},{get:function(ne,ee){if(ee in V)return V[ee];throw new Error('Access to document property "'.concat(ee,'" is not allowed.'))}})}},26233:function(_t,ve,e){"use strict";e.d(ve,{HA:function(){return B},cO:function(){return r},nw:function(){return T},rz:function(){return x}});var q=e(19632),a=e.n(q),X=e(52677),l=e.n(X),P=e(15009),m=e.n(P),z=e(96695),o=e.n(z),N=e(5574),b=e.n(N),j=e(99289),f=e.n(j),g=e(96486),n=e.n(g),M=e(20301);function T(p,C){return u.apply(this,arguments)}function u(){return u=f()(m()().mark(function p(C,h){var E;return m()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(C){t.next=2;break}return t.abrupt("return",{});case 2:if(typeof C!="function"){t.next=14;break}return t.prev=3,t.next=6,C(h);case 6:return E=t.sent,t.abrupt("return",E||{});case 10:return t.prev=10,t.t0=t.catch(3),console.error("Error resolving defaultParams function:",t.t0),t.abrupt("return",{});case 14:return t.abrupt("return",C);case 15:case"end":return t.stop()}},p,null,[[3,10]])})),u.apply(this,arguments)}function r(p,C,h){return A.apply(this,arguments)}function A(){return A=f()(m()().mark(function p(C,h,E){var S;return m()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(C){D.next=2;break}return D.abrupt("return",{});case 2:if(typeof C!="function"){D.next=14;break}return D.prev=3,D.next=6,C(h,E);case 6:return S=D.sent,D.abrupt("return",S||{});case 10:return D.prev=10,D.t0=D.catch(3),console.error("Error resolving createModelOptions function:",D.t0),D.abrupt("return",{});case 14:return D.abrupt("return",C);case 15:case"end":return D.stop()}},p,null,[[3,10]])})),A.apply(this,arguments)}var y={queue:[],timer:null,inflightByRun:new Map},K=10;function R(p){if(Array.isArray(p))return p.map(R);if(n().isPlainObject(p)){var C=Object.entries(p).map(function(E){var S=b()(E,2),t=S[0],D=S[1];return[t,R(D)]}),h=n().sortBy(C,function(E){var S=b()(E,1),t=S[0];return t});return Object.fromEntries(h)}return p}function Y(p){try{return JSON.stringify(R(p))}catch{try{return JSON.stringify(p)}catch{return String(p)}}}function x(p,C){var h=y,E=p.runId||"GLOBAL",S=Y(C),t=h.inflightByRun.get(E);t||(t=new Map,h.inflightByRun.set(E,t));var D=t.get(S);if(D)return D;var U,G,k=new Promise(function(ne,ee){U=ne,G=ee});t.set(S,k);var $="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)),V={id:$,ctx:p,payload:C,resolve:U,reject:G,runId:E,dedupKey:S};h.queue.push(V);var J=function(){var ne=f()(m()().mark(function ee(){var Q,W,L,w,Z,te,oe,fe,xe,he,ie,le,ue,me,se,ae,Ee,Pe,De,Fe,ye,be,ce,pe,H,ge,de,Ce,we,$e,Je,rt,je;return m()().wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(W=h.queue.splice(0,h.queue.length),h.timer=null,W.length){Ue.next=4;break}return Ue.abrupt("return");case 4:if(L=(Q=W[0].ctx)===null||Q===void 0?void 0:Q.api,L){Ue.next=9;break}w=o()(W);try{for(w.s();!(Z=w.n()).done;){te=Z.value;try{te.resolve(te.payload.template)}catch(Oe){te.reject(Oe)}finally{(oe=h.inflightByRun.get(te.runId))===null||oe===void 0||oe.delete(te.dedupKey)}}}catch(Oe){w.e(Oe)}finally{w.f()}return Ue.abrupt("return");case 9:return Ue.prev=9,he=W.map(function(Oe){return{id:Oe.id,template:Oe.payload.template,contextParams:Oe.payload.contextParams||{}}}),Ue.next=13,L.request({method:"POST",url:"variables:resolve",data:{values:{batch:he}}});case 13:ie=Ue.sent,le=(fe=ie.data)!==null&&fe!==void 0?fe:ie,ue=(xe=le.data)!==null&&xe!==void 0?xe:le,me=ue==null?void 0:ue.results,se=Array.isArray(me)?me:Array.isArray(ue)?ue:[],ae=new Map,Ee=o()(se);try{for(Ee.s();!(Pe=Ee.n()).done;)De=Pe.value,Fe=(De==null?void 0:De.id)!=null?String(De.id):"",Fe&&ae.set(Fe,De==null?void 0:De.data)}catch(Oe){Ee.e(Oe)}finally{Ee.f()}ye=o()(W);try{for(ye.s();!(be=ye.n()).done;){ce=be.value;try{pe=String(ce.id),H=ae.has(pe)?ae.get(pe):ce.payload.template,ce.resolve(H)}catch(Oe){ce.reject(Oe)}finally{(ge=h.inflightByRun.get(ce.runId))===null||ge===void 0||ge.delete(ce.dedupKey)}}}catch(Oe){ye.e(Oe)}finally{ye.f()}Ue.next=29;break;case 25:Ue.prev=25,Ue.t0=Ue.catch(9),de=o()(W);try{for(de.s();!(Ce=de.n()).done;){we=Ce.value;try{p==null||($e=p.logger)===null||$e===void 0||(Je=(rt=$e).warn)===null||Je===void 0||Je.call(rt,{err:Ue.t0},"variables:resolve(batch) failed, fallback"),we.resolve(we.payload.template)}catch(Oe){we.reject(Oe)}finally{(je=h.inflightByRun.get(we.runId))===null||je===void 0||je.delete(we.dedupKey)}}}catch(Oe){de.e(Oe)}finally{de.f()}case 29:case"end":return Ue.stop()}},ee,null,[[9,25]])}));return function(){return ne.apply(this,arguments)}}();return h.timer||(h.timer=setTimeout(J,K)),k}function B(p,C){return F.apply(this,arguments)}function F(){return F=f()(m()().mark(function p(C,h){var E;return m()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return E=function(){var D=f()(m()().mark(function U(G){var k,$,V,J,ne,ee;return m()().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(!(typeof G=="string"&&/\{\{.*?\}\}/.test(G))){W.next=4;break}return W.next=3,c(G,h);case 3:return W.abrupt("return",W.sent);case 4:if(!Array.isArray(G)){W.next=6;break}return W.abrupt("return",Promise.all(G.map(E)));case 6:if(!(G&&l()(G)==="object")){W.next=18;break}k={},$=0,V=Object.entries(G);case 9:if(!($<V.length)){W.next=17;break}return J=b()(V[$],2),ne=J[0],ee=J[1],W.next=13,E(ee);case 13:k[ne]=W.sent;case 14:$++,W.next=9;break;case 17:return W.abrupt("return",k);case 18:return W.abrupt("return",G);case 19:case"end":return W.stop()}},U)}));return function(G){return D.apply(this,arguments)}}(),t.abrupt("return",E(C));case 2:case"end":return t.stop()}},p)})),F.apply(this,arguments)}function v(p,C){return i.apply(this,arguments)}function i(){return i=f()(m()().mark(function p(C,h){var E,S;return m()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,I(C.trim(),h);case 2:return E=D.sent,D.next=5,h.runjs("return ".concat(E),{t:h.t});case 5:return S=D.sent,D.abrupt("return",S!=null&&S.success?S.value:void 0);case 7:case"end":return D.stop()}},p)})),i.apply(this,arguments)}function I(p,C){return O.apply(this,arguments)}function O(){return O=f()(m()().mark(function p(C,h){var E,S,t,D,U,G,k,$,V,J,ne,ee,Q,W,L,w,Z,te,oe,fe,xe,he,ie,le,ue,me;return m()().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:for(E=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*(?:(?:\.[a-zA-Z_$][a-zA-Z0-9_$]*)|(?:\[[^\]]+\]))*)(?!\s*\()/g,S=[],t=new Set;(D=E.exec(C))!==null;)U=D[0],G=D[1],k=G.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)/),k&&($=k[1],V=G.substring($.length),S.push({fullPath:U,firstKey:$,restPath:V}),t.add($));if(S.length!==0){ae.next=6;break}return ae.abrupt("return",C);case 6:J=new Map,ne=o()(t),ae.prev=8,ne.s();case 10:if((ee=ne.n()).done){ae.next=25;break}return Q=ee.value,ae.prev=12,ae.next=15,h[Q];case 15:W=ae.sent,L=W&&W.__isRecordProxy__===!0,J.set(Q,L),ae.next=23;break;case 20:ae.prev=20,ae.t0=ae.catch(12),J.set(Q,!1);case 23:ae.next=10;break;case 25:ae.next=30;break;case 27:ae.prev=27,ae.t1=ae.catch(8),ne.e(ae.t1);case 30:return ae.prev=30,ne.f(),ae.finish(30);case 33:for(S.sort(function(Ee,Pe){return Pe.fullPath.length-Ee.fullPath.length}),w=C,Z=0,te=S;Z<te.length;Z++)oe=te[Z],fe=oe.fullPath,xe=oe.firstKey,he=oe.restPath,ie=J.get(xe)||!1,le=void 0,he===""?le="await ctx.".concat(xe):le=ie?"await (await ctx.".concat(xe,")").concat(he):"(await ctx.".concat(xe,")").concat(he),ue=fe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),me=new RegExp("\\b".concat(ue,"\\b"),"g"),w=w.replace(me,le);return ae.abrupt("return",w);case 37:case"end":return ae.stop()}},p,null,[[8,27,30,33],[12,20]])})),O.apply(this,arguments)}function c(p,C){return d.apply(this,arguments)}function d(){return d=f()(m()().mark(function p(C,h){var E,S,t,D,U,G,k,$,V,J,ne,ee,Q,W,L;return m()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(E=function(oe){var fe=oe.trim().match(/^ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*(?:\.[a-zA-Z_$][a-zA-Z0-9_$]*)*)$/);return fe?fe[1]:null},S=function(){var te=f()(m()().mark(function oe(fe){var xe,he,ie;return m()().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(xe=fe.split("."),he=xe.shift(),he){ue.next=4;break}return ue.abrupt("return",void 0);case 4:return ue.next=6,h[he];case 6:if(ie=ue.sent,xe.length!==0){ue.next=9;break}return ue.abrupt("return",ie);case 9:return ue.abrupt("return",(0,M.getValuesByPath)(ie,xe.join(".")));case 10:case"end":return ue.stop()}},oe)}));return function(fe){return te.apply(this,arguments)}}(),t=C.match(/^\{\{\s*(.+)\s*\}\}$/),!t){Z.next=13;break}if(D=t[1],U=E(D),!U){Z.next=10;break}return Z.next=9,S(U);case 9:return Z.abrupt("return",Z.sent);case 10:return Z.next=12,v(D,h);case 12:return Z.abrupt("return",Z.sent);case 13:G=a()(C.matchAll(/\{\{\s*(.+?)\s*\}\}/g)),k=C,$=o()(G),Z.prev=16,$.s();case 18:if((V=$.n()).done){Z.next=34;break}if(J=b()(V.value,2),ne=J[0],ee=J[1],Q=E(ee),!Q){Z.next=27;break}return Z.next=24,S(Q);case 24:Z.t0=Z.sent,Z.next=30;break;case 27:return Z.next=29,v(ee,h);case 29:Z.t0=Z.sent;case 30:W=Z.t0,W!==void 0&&(L=l()(W)==="object"&&W!==null?JSON.stringify(W):String(W),k=k.replace(ne,L));case 32:Z.next=18;break;case 34:Z.next=39;break;case 36:Z.prev=36,Z.t1=Z.catch(16),$.e(Z.t1);case 39:return Z.prev=39,$.f(),Z.finish(39);case 42:return Z.abrupt("return",k);case 43:case"end":return Z.stop()}},p,null,[[16,36,39,42]])})),d.apply(this,arguments)}},19433:function(_t,ve,e){"use strict";e.d(ve,{A:function(){return b}});var q=e(19632),a=e.n(q),X=e(52677),l=e.n(X),P=e(5574),m=e.n(P);function z(j){var f={};return Object.entries(j||{}).forEach(function(g){var n=m()(g,2),M=n[0],T=n[1];typeof T<"u"&&T!==null&&(f[M]=T)}),f}function o(j,f,g){try{var n,M,T,u,r,A=(n=j.dataSourceManager)===null||n===void 0||(M=n.getDataSource)===null||M===void 0?void 0:M.call(n,f||"main"),y=A==null||(T=A.collectionManager)===null||T===void 0||(u=T.getCollection)===null||u===void 0?void 0:u.call(T,g),K=y==null||(r=y.getPrimaryKey)===null||r===void 0?void 0:r.call(y);return K||"id"}catch{return"id"}}function N(j,f){var g,n;if(f){var M=f.dataSourceKey||"main",T=f.collection||((g=f.record)===null||g===void 0?void 0:g.__collectionName);if(T){var u=o(j,M,T)||"id",r=typeof f.filterByTk<"u"?f.filterByTk:typeof f.id<"u"?f.id:(n=f.record)===null||n===void 0?void 0:n[u];if(!(typeof r>"u"))return z({collection:T,filterByTk:r,dataSourceKey:M,fields:f.fields,appends:f.appends})}}}function b(j){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=function(u){return!u||l()(u)!=="object"?!1:typeof u.collection=="string"&&(typeof u.filterByTk<"u"||typeof u.id<"u"||u.record)},n={},M=function T(u,r){if(g(u)){var A=N(j,u);if(A){var y=r.join(".");n[y]=A}return}if(Array.isArray(u)){for(var K=0;K<u.length;K++)T(u[K],[].concat(a()(r),[String(K)]));return}if(u&&l()(u)==="object"){for(var R=0,Y=Object.entries(u);R<Y.length;R++){var x=m()(Y[R],2),B=x[0],F=x[1];T(F,[].concat(a()(r),[B]))}return}};return M(f,[]),Object.keys(n).length?n:void 0}},2991:function(_t,ve,e){"use strict";e.d(ve,{Z:function(){return P}});var q=e(5574),a=e.n(q),X=e(52677),l=e.n(X);function P(m,z,o,N){var b={},j={},f=function(M){if(Object.prototype.hasOwnProperty.call(z,M)){var T=z[M],u={};if(T.uiSchema&&l()(T.uiSchema)==="object")for(var r=0,A=Object.entries(T.uiSchema);r<A.length;r++){var y=a()(A[r],2),K=y[0],R=y[1];if(R&&l()(R)==="object"){var Y,x=R;u[K]={type:x.type||"any",title:x.title||((Y=x["x-decorator-props"])===null||Y===void 0?void 0:Y.label)||K,interface:x["x-component"],uiSchema:x}}}var B=Object.keys(u).length>0;j[M]={type:"object",title:m.t(T.title)||M,display:B?"default":"none",properties:B?{params:{type:"object",title:"Parameters",display:"flatten",properties:u}}:void 0},b[M]={get params(){return o.getStepParams(N,M)||{}},get uiSchema(){return T.uiSchema},result:void 0}}};for(var g in z)f(g);m.defineProperty("steps",{get:function(){return b}})}},16184:function(_t,ve,e){"use strict";e.d(ve,{N3:function(){return x},RB:function(){return K},Yp:function(){return r},_6:function(){return R},a9:function(){return y},gn:function(){return Y},p7:function(){return T},sg:function(){return M}});var q=e(97857),a=e.n(q),X=e(15009),l=e.n(X),P=e(99289),m=e.n(P),z=e(52677),o=e.n(z),N=e(81886),b=e(19433),j=e(20301);function f(F){return o()(F)==="object"&&F!==null}function g(F){var v=F.resource;return f(v)?v:void 0}function n(F){var v=F.collection;if(f(v)){var i=v;return{name:i.name,dataSourceKey:i.dataSourceKey}}}function M(F){var v,i,I,O=g(F),c=n(F),d=(c==null?void 0:c.name)||(O==null||(v=O.getResourceName)===null||v===void 0?void 0:v.call(O)),p=(c==null?void 0:c.dataSourceKey)||(O==null||(i=O.getDataSourceKey)===null||i===void 0?void 0:i.call(O)),C=O==null||(I=O.getFilterByTk)===null||I===void 0?void 0:I.call(O);if(!(!d||typeof C>"u"||C===null)){var h=String(d).split("."),E=h[h.length-1];return{collection:E,dataSourceKey:p,filterByTk:C}}}function T(F){var v,i,I,O=F.view;if(O){var c=(O==null?void 0:O.inputArgs)||{},d=(c==null?void 0:c.collectionName)||(O==null||(v=O.record)===null||v===void 0?void 0:v.collection),p=(c==null?void 0:c.dataSourceKey)||(O==null||(i=O.record)===null||i===void 0?void 0:i.dataSourceKey)||"main",C=(c==null?void 0:c.filterByTk)||(O==null||(I=O.record)===null||I===void 0?void 0:I.filterByTk),h=c==null?void 0:c.sourceId;if(!(!d||typeof C>"u"||C===null))return{collection:d,dataSourceKey:p,filterByTk:C,sourceId:h}}}function u(F){var v,i,I,O,c=g(F),d=((v=n(F))===null||v===void 0?void 0:v.dataSourceKey)||(c==null||(i=c.getDataSourceKey)===null||i===void 0?void 0:i.call(c)),p=c==null||(I=c.getResourceName)===null||I===void 0?void 0:I.call(c),C=c==null||(O=c.getSourceId)===null||O===void 0?void 0:O.call(c);if(!(!p||typeof C>"u"||C===null)){var h=String(p).split(".");if(!(h.length<2))return{collection:h[0],dataSourceKey:d,filterByTk:C}}}function r(F,v,i){return A.apply(this,arguments)}function A(){return A=m()(l()().mark(function F(v,i,I){var O;return l()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,N.L)(v,i)();case 2:if(O=d.sent,O){d.next=5;break}return d.abrupt("return",null);case 5:return d.abrupt("return",a()(a()({},O),{},{buildVariablesParams:function(C){return I?I(C):M(C)}}));case 6:case"end":return d.stop()}},F)})),A.apply(this,arguments)}function y(F,v,i){var I=function(){var O=m()(l()().mark(function c(){return l()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",r(F,v,i));case 1:case"end":return p.stop()}},c)}));return function(){return O.apply(this,arguments)}}();return I.title=v,I}function K(F,v){var i,I=((i=F.t)===null||i===void 0?void 0:i.call(F,"Current record"))||"Current record";return y(v,I,function(O){return M(O)})}var R=j.extractUsedVariableNames,Y=j.extractUsedVariablePaths;function x(F,v){return B.apply(this,arguments)}function B(){return B=m()(l()().mark(function F(v,i){var I,O,c,d,p,C,h,E,S,t,D,U;return l()().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if(I=(0,j.extractUsedVariablePaths)(i)||{},O=Object.keys(I),O.length){k.next=4;break}return k.abrupt("return",void 0);case 4:c={},d=0,p=O;case 6:if(!(d<p.length)){k.next=37;break}if(h=p[d],E=(C=v.getPropertyOptions)===null||C===void 0?void 0:C.call(v,h),S=E==null?void 0:E.meta,S){k.next=12;break}return k.abrupt("continue",34);case 12:if(t=void 0,k.prev=13,typeof S!="function"){k.next=20;break}return k.next=17,S();case 17:k.t0=k.sent,k.next=21;break;case 20:k.t0=S;case 21:if(D=k.t0,U=D==null?void 0:D.buildVariablesParams,typeof U!="function"){k.next=27;break}return k.next=26,U(v);case 26:t=k.sent;case 27:k.next=33;break;case 29:return k.prev=29,k.t1=k.catch(13),k.t1,k.abrupt("continue",34);case 33:t&&(c[h]=t);case 34:d++,k.next=6;break;case 37:return k.abrupt("return",(0,b.A)(v,c));case 38:case"end":return k.stop()}},F,null,[[13,29]])})),B.apply(this,arguments)}},15827:function(_t,ve,e){"use strict";e.d(ve,{k9:function(){return Pe},I7:function(){return A},Rh:function(){return t},yT:function(){return $},qt:function(){return w},Sv:function(){return he}});var q=e(5574),a=e.n(q),X=e(97857),l=e.n(X),P=e(67294),m=e(22424),z=e(21662),o=e(1772),N=e(43992),b=e(15009),j=e.n(b),f=e(99289),g=e.n(f),n=e(52677),M=e.n(n),T=e(16184);function u(De){if(De===null||M()(De)!=="object")return!1;var Fe=Object.getPrototypeOf(De);return Fe===Object.prototype||Fe===null}function r(De,Fe,ye){var be=M()(De);return De==null?{type:"any",title:Fe}:Array.isArray(De)?{type:"array",title:Fe,properties:function(){var ce=g()(j()().mark(function H(){var ge,de,Ce,we;return j()().wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:for(ge=Math.min(De.length||0,10),de={},Ce=ye??new WeakSet,we=0;we<ge;we++)de[String(we)]=r(De[we],"#".concat(we),Ce);return Je.abrupt("return",de);case 5:case"end":return Je.stop()}},H)}));function pe(){return ce.apply(this,arguments)}return pe}()}:be==="string"?{type:"string",title:Fe}:be==="number"?{type:"number",title:Fe}:be==="boolean"?{type:"boolean",title:Fe}:be==="object"&&u(De)?{type:"object",title:Fe,properties:function(){var ce=g()(j()().mark(function H(){var ge,de;return j()().wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(ge=ye??new WeakSet,!ge.has(De)){we.next=3;break}return we.abrupt("return",{});case 3:return ge.add(De),de={},Object.keys(De||{}).forEach(function($e){de[$e]=r(De[$e],$e,ge)}),we.abrupt("return",de);case 7:case"end":return we.stop()}},H)}));function pe(){return ce.apply(this,arguments)}return pe}()}:{type:"any",title:Fe}}function A(De){var Fe=De.t("\u5F53\u524D\u89C6\u56FE"),ye=function(){var be=g()(j()().mark(function ce(){var pe;return j()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return pe=De.view,ge.abrupt("return",{type:"object",title:De.t("\u5F53\u524D\u89C6\u56FE"),buildVariablesParams:function(Ce){var we=(0,T.p7)(Ce);if(we)return{record:we}},properties:function(){var de=g()(j()().mark(function we(){var $e,Je,rt,je,Ge,Ue;return j()().wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return je={},Ge=(0,T.p7)(De),Ge&&Ge.collection&&(Ue=function(){var ze=g()(j()().mark(function Xe(){var Ye,Ie,vt,ot,Pt,yt,At,tn;return j()().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(Ht.prev=0,Pt=(0,T.p7)(De),Pt!=null&&Pt.collection){Ht.next=4;break}return Ht.abrupt("return",null);case 4:if(yt=Pt.dataSourceKey||"main",At=(Ye=De.dataSourceManager)===null||Ye===void 0||(Ie=Ye.getDataSource)===null||Ie===void 0?void 0:Ie.call(Ye,yt),tn=At==null||(vt=At.collectionManager)===null||vt===void 0||(ot=vt.getCollection)===null||ot===void 0?void 0:ot.call(vt,Pt.collection),tn){Ht.next=9;break}return Ht.abrupt("return",null);case 9:return Ht.next=11,(0,T.Yp)(function(){return tn},De.t("\u5F53\u524D\u89C6\u56FE\u8BB0\u5F55"),function(gt){return(0,T.p7)(gt)});case 11:return Ht.abrupt("return",Ht.sent);case 14:return Ht.prev=14,Ht.t0=Ht.catch(0),Ht.abrupt("return",null);case 17:case"end":return Ht.stop()}},Xe,null,[[0,14]])}));return function(){return ze.apply(this,arguments)}}(),Ue.title=De.t("\u5F53\u524D\u89C6\u56FE\u8BB0\u5F55"),Ue.hasChildren=!0,je.record=Ue),je.type={type:"string",title:(($e=De.t)===null||$e===void 0?void 0:$e.call(De,"\u7C7B\u578B"))||"\u7C7B\u578B"},je.preventClose={type:"boolean",title:((Je=De.t)===null||Je===void 0?void 0:Je.call(De,"\u662F\u5426\u5141\u8BB8\u5173\u95ED"))||"\u662F\u5426\u5141\u8BB8\u5173\u95ED"},je.inputArgs=r(pe==null?void 0:pe.inputArgs,((rt=De.t)===null||rt===void 0?void 0:rt.call(De,"\u8F93\u5165\u53C2\u6570"))||"\u8F93\u5165\u53C2\u6570"),qe.abrupt("return",je);case 7:case"end":return qe.stop()}},we)}));function Ce(){return de.apply(this,arguments)}return Ce}()});case 2:case"end":return ge.stop()}},ce)}));return function(){return be.apply(this,arguments)}}();return ye.title=Fe,ye}function y(De){var Fe=function(de){return De.t(de)},ye=function(){try{var de,Ce,we,$e,Je=(0,T.p7)(De);if(!(Je!=null&&Je.filterByTk))return null;var rt=(de=De.dataSourceManager)===null||de===void 0||(Ce=de.getDataSource)===null||Ce===void 0?void 0:Ce.call(de,Je.dataSourceKey||"main");return(rt==null||(we=rt.collectionManager)===null||we===void 0||($e=we.getCollection)===null||$e===void 0?void 0:$e.call(we,Je.collection))||null}catch{return null}},be=function(){var ge=g()(j()().mark(function de(Ce){var we,$e,Je,rt,je,Ge,Ue,Oe,qe,ze,Xe,Ye,Ie,vt,ot,Pt;return j()().wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(At.prev=0,Oe=(we=De.view)===null||we===void 0?void 0:we.navigation,qe=Array.isArray(Oe==null?void 0:Oe.viewStack)?Oe.viewStack:[],!(qe.length<2||Ce<1)){At.next=5;break}return At.abrupt("return",void 0);case 5:if(ze=qe.length-1-Ce,!(ze<0)){At.next=8;break}return At.abrupt("return",void 0);case 8:if(Xe=qe[ze],Xe!=null&&Xe.viewUid){At.next=11;break}return At.abrupt("return",void 0);case 11:if(Ye=($e=De.engine)===null||$e===void 0||(Je=$e.getModel)===null||Je===void 0?void 0:Je.call($e,Xe.viewUid),!(!Ye&&typeof((rt=De.engine)===null||rt===void 0?void 0:rt.loadModel)=="function")){At.next=22;break}return At.prev=13,At.next=16,De.engine.loadModel({uid:Xe.viewUid});case 16:Ye=At.sent,At.next=22;break;case 19:At.prev=19,At.t0=At.catch(13),console.warn("[FlowEngine] popup.getParentRecordRef loadModel failed:",At.t0);case 22:if(Ie=((je=Ye)===null||je===void 0||(Ge=je.getStepParams)===null||Ge===void 0?void 0:Ge.call(je,"popupSettings","openView"))||{},vt=Ie==null?void 0:Ie.collectionName,ot=(Ie==null?void 0:Ie.dataSourceKey)||"main",Pt=(Ue=Xe==null?void 0:Xe.filterByTk)!==null&&Ue!==void 0?Ue:Xe==null?void 0:Xe.sourceId,!(!vt||typeof Pt>"u"||Pt===null)){At.next=28;break}return At.abrupt("return",void 0);case 28:return At.abrupt("return",{collection:vt,dataSourceKey:ot,filterByTk:Pt});case 31:return At.prev=31,At.t1=At.catch(0),console.warn("[FlowEngine] popup.getParentRecordRef failed:",At.t1),At.abrupt("return",void 0);case 35:case"end":return At.stop()}},de,null,[[0,31],[13,19]])}));return function(Ce){return ge.apply(this,arguments)}}(),ce=function(de){try{var Ce,we=(Ce=De.view)===null||Ce===void 0?void 0:Ce.navigation,$e=Array.isArray(we==null?void 0:we.viewStack)?we.viewStack:[];return $e.length>=de+1}catch{return!1}},pe=function(de){var Ce=function(){var $e={type:"object",title:Fe("Parent popup"),disabled:function(){return!ce(de)},disabledReason:function(){return ce(de)?void 0:Fe("No parent popup")},properties:function(){var Je=g()(j()().mark(function je(){var Ge,Ue,Oe,qe,ze;return j()().wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Ye.next=2,be(de);case 2:if(Ge=Ye.sent,Ue={},Ue.uid={type:"string",title:Fe("Popup uid")},!Ge){Ye.next=13;break}return Oe=function(){try{var Ie,vt,ot,Pt,yt=(Ie=De.dataSourceManager)===null||Ie===void 0||(vt=Ie.getDataSource)===null||vt===void 0?void 0:vt.call(Ie,Ge.dataSourceKey||"main");return(yt==null||(ot=yt.collectionManager)===null||ot===void 0||(Pt=ot.getCollection)===null||Pt===void 0?void 0:Pt.call(ot,Ge.collection||""))||null}catch{return null}}(),Ye.next=9,(0,T.Yp)(function(){return Oe},Fe("Popup record"),function(){return Ge});case 9:qe=Ye.sent,Ue.record=qe||{type:"object",title:Fe("Popup record")},Ye.next=14;break;case 13:Ue.record={type:"object",title:Fe("Popup record")};case 14:return ze={type:"object",title:Fe("Data source"),properties:function(){var Ie=g()(j()().mark(function ot(){return j()().wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.abrupt("return",{dataSourceKey:{type:"string",title:Fe("Data source key")},collectionName:{type:"string",title:Fe("Collection name")},filterByTk:{type:"string",title:Fe("filterByTk")},sourceId:{type:"string",title:Fe("sourceId")}});case 1:case"end":return yt.stop()}},ot)}));function vt(){return Ie.apply(this,arguments)}return vt}()},Ue.resource=ze,Ye.abrupt("return",Ue);case 17:case"end":return Ye.stop()}},je)}));function rt(){return Je.apply(this,arguments)}return rt}()};return $e};return Ce.title=Fe("Parent popup"),Ce},H=function(){var de={type:"object",title:Fe("Current popup"),buildVariablesParams:function(we){var $e,Je=(0,T.p7)(we),rt=(we==null||($e=we.view)===null||$e===void 0?void 0:$e.inputArgs)||{},je={record:Je};try{var Ge=rt==null?void 0:rt.sourceId,Ue=rt==null?void 0:rt.associationName,Oe=(rt==null?void 0:rt.dataSourceKey)||"main";if(Ge!=null&&Ge!==""&&Ue&&typeof Ue=="string"){var qe=String(Ue).split(".")[0];qe&&(je.sourceRecord={collection:qe,dataSourceKey:Oe,filterByTk:Ge})}}catch{}return je},properties:function(){var Ce=g()(j()().mark(function $e(){var Je,rt,je,Ge,Ue,Oe,qe,ze,Xe,Ye,Ie,vt;return j()().wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return Je={},Je.uid={type:"string",title:Fe("Popup uid")},Pt.next=4,(0,T.Yp)(ye,Fe("Current popup record"),function(yt){return(0,T.p7)(yt)});case 4:if(rt=Pt.sent,rt&&(Je.record=rt),Pt.prev=6,Ge=((je=De.view)===null||je===void 0?void 0:je.inputArgs)||{},Ue=Ge==null?void 0:Ge.sourceId,Oe=Ge==null?void 0:Ge.associationName,qe=(Ge==null?void 0:Ge.dataSourceKey)||"main",!(Ue!=null&&Ue!==""&&Oe&&typeof Oe=="string")){Pt.next=19;break}if(ze=String(Oe).includes(".")?String(Oe).split(".")[0]:void 0,!ze){Pt.next=19;break}return Xe=function(){try{var At,tn,bn,Ht,gt=(At=De.dataSourceManager)===null||At===void 0||(tn=At.getDataSource)===null||tn===void 0?void 0:tn.call(At,qe);return(gt==null||(bn=gt.collectionManager)===null||bn===void 0||(Ht=bn.getCollection)===null||Ht===void 0?void 0:Ht.call(bn,ze))||null}catch{return null}},Pt.next=17,(0,T.Yp)(Xe,Fe("Current popup parent record"),function(){return{collection:ze,dataSourceKey:qe,filterByTk:Ue}});case 17:Ye=Pt.sent,Ye&&(Je.sourceRecord=Ye);case 19:Pt.next=23;break;case 21:Pt.prev=21,Pt.t0=Pt.catch(6);case 23:return Ie={type:"object",title:Fe("Data source"),properties:function(){var yt=g()(j()().mark(function tn(){return j()().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.abrupt("return",{dataSourceKey:{type:"string",title:Fe("Data source key")},collectionName:{type:"string",title:Fe("Collection name")},filterByTk:{type:"string",title:Fe("filterByTk")},sourceId:{type:"string",title:Fe("sourceId")}});case 1:case"end":return Ht.stop()}},tn)}));function At(){return yt.apply(this,arguments)}return At}()},Je.resource=Ie,Pt.next=27,be(1);case 27:return vt=Pt.sent,vt&&(Je.parent=pe(1)),Pt.abrupt("return",Je);case 30:case"end":return Pt.stop()}},$e,null,[[6,21]])}));function we(){return Ce.apply(this,arguments)}return we}()};return de};return H.title=Fe("Current popup"),H.sort=975,H}function K(De,Fe){return R.apply(this,arguments)}function R(){return R=g()(j()().mark(function De(Fe,ye){var be,ce,pe,H,ge;return j()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return ce=ye==null?void 0:ye.navigation,pe=Array.isArray(ce==null?void 0:ce.viewStack)?ce.viewStack:[],H=function(){var we=g()(j()().mark(function $e(Je){var rt,je,Ge,Ue,Oe,qe,ze,Xe,Ye,Ie,vt,ot,Pt,yt,At,tn;return j()().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!(Je<0||!((rt=pe[Je])!==null&&rt!==void 0&&rt.viewUid))){Ht.next=2;break}return Ht.abrupt("return",void 0);case 2:if(Ye=pe[Je].viewUid,Ie=(je=Fe.engine)===null||je===void 0||(Ge=je.getModel)===null||Ge===void 0?void 0:Ge.call(je,Ye),!(!Ie&&typeof((Ue=Fe.engine)===null||Ue===void 0?void 0:Ue.loadModel)=="function")){Ht.next=8;break}return Ht.next=7,(vt=Fe.engine)===null||vt===void 0?void 0:vt.loadModel({uid:Ye});case 7:Ie=Ht.sent;case 8:return ot=((Oe=Ie)===null||Oe===void 0||(qe=Oe.getStepParams)===null||qe===void 0?void 0:qe.call(Oe,"popupSettings","openView"))||{},Pt=ot==null?void 0:ot.collectionName,yt=(ot==null?void 0:ot.dataSourceKey)||"main",At={uid:Ye,resource:{dataSourceKey:yt,collectionName:Pt,filterByTk:(ze=pe[Je])===null||ze===void 0?void 0:ze.filterByTk,sourceId:(Xe=pe[Je])===null||Xe===void 0?void 0:Xe.sourceId}},Ht.next=14,H(Je-1);case 14:return tn=Ht.sent,tn&&(At.parent=tn),Ht.abrupt("return",At);case 17:case"end":return Ht.stop()}},$e)}));return function(Je){return we.apply(this,arguments)}}(),Ce.next=5,H(((ye==null||(be=ye.navigation)===null||be===void 0||(be=be.viewStack)===null||be===void 0?void 0:be.length)||1)-1);case 5:return ge=Ce.sent,Ce.abrupt("return",ge);case 7:case"end":return Ce.stop()}},De)})),R.apply(this,arguments)}function Y(De,Fe){De.defineProperty("popup",{get:function(){var ye=g()(j()().mark(function ce(){return j()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.abrupt("return",K(De,Fe));case 1:case"end":return H.stop()}},ce)}));function be(){return ye.apply(this,arguments)}return be}(),meta:y(De),resolveOnServer:function(be){return be==="record"||(be==null?void 0:be.startsWith("record."))||be==="sourceRecord"||(be==null?void 0:be.startsWith("sourceRecord."))}})}var x=e(13769),B=e.n(x),F=e(5914),v=e(85893),i=["afterClose","footer","header","hidden"],I=(0,P.forwardRef)(function(De,Fe){var ye,be=De.afterClose,ce=De.footer,pe=De.header,H=De.hidden,ge=B()(De,i),de=(0,P.useState)(!0),Ce=a()(de,2),we=Ce[0],$e=Ce[1],Je=(0,P.useState)(ge),rt=a()(Je,2),je=rt[0],Ge=rt[1],Ue=(0,P.useState)(function(){return ce}),Oe=a()(Ue,2),qe=Oe[0],ze=Oe[1],Xe=(0,P.useState)(pe),Ye=a()(Xe,2),Ie=Ye[0],vt=Ye[1];(0,P.useImperativeHandle)(Fe,function(){return{destroy:function(){$e(!1),be==null||be()},update:function(At){return Ge(function(tn){return l()(l()({},tn),At)})},setFooter:function(At){ze(At)},setHeader:function(At){Object.values(At||{}).length===0?vt(null):vt(At)}}});var ot=l()(l()({},je),{},{title:(Ie==null?void 0:Ie.title)||je.title,extra:Ie==null?void 0:Ie.extra,footer:qe!==void 0?qe:(ye=je.footer)!==null&&ye!==void 0?ye:null}),Pt=P.useMemo(function(){return document.querySelector("#nocobase-app-container")},[]);return(0,v.jsx)(F.Z,l()(l()({closable:!1,rootClassName:H?"nb-hidden":"",getContainer:Pt},ot),{},{open:we,onCancel:function(At){var tn;$e(!1),(tn=je.onCancel)===null||tn===void 0||tn.call(je,At)},afterClose:function(){be==null||be()},children:je.children}))}),O=I,c=e(19632),d=e.n(c);function p(){var De=P.useState([]),Fe=a()(De,2),ye=Fe[0],be=Fe[1],ce=P.useCallback(function(pe){return be(function(H){return[].concat(d()(H),[pe])}),function(){be(function(H){return H.filter(function(ge){return ge!==pe})})}},[]);return[ye,ce]}var C=e(24084),h=e(45690);function E(De){var Fe=new h._;De.modelRepository&&Fe.setModelRepository(De.modelRepository),Fe.context.addDelegate(De.context);var ye=new Set(["_modelInstances","_applyFlowCache","executor","context","previousEngine","nextEngine","unlinkFromStack","linkAfter","_previousEngine","_nextEngine"]),be={get:function(pe,H,ge){if(ye.has(H))return Reflect.get(pe,H,ge);var de=Reflect.get(De,H,ge);return H==="registerModels"&&typeof de=="function"?de.bind(De):de},set:function(pe,H,ge){return ye.has(H)?Reflect.set(pe,H,ge):Reflect.set(De,H,ge)},has:function(pe,H){return H in pe||H in De}};return Fe.linkAfter(De),new Proxy(Fe,be)}var S=0;function t(){var De=P.useRef(null),Fe=function(pe,H){var ge,de;S+=1;var Ce=P.createRef(),we,$e,Je=new Promise(function(Ie){$e=Ie}),rt=null,je=null,Ge=function(vt){var ot=vt.children;return P.useEffect(function(){var Pt;return rt=ot,(Pt=Ce.current)===null||Pt===void 0||Pt.setFooter(ot),function(){var yt;rt=null,(yt=Ce.current)===null||yt===void 0||yt.setFooter(null)}},[ot]),null},Ue=function(vt){return P.useEffect(function(){var ot;return je=vt,(ot=Ce.current)===null||ot===void 0||ot.setHeader(vt),function(){var Pt;je=null,(Pt=Ce.current)===null||Pt===void 0||Pt.setHeader(null)}},[vt]),null},Oe={type:"dialog",inputArgs:pe.inputArgs||{},preventClose:!!pe.preventClose,destroy:function(){var vt;return(vt=Ce.current)===null||vt===void 0?void 0:vt.destroy()},update:function(vt){var ot;return(ot=Ce.current)===null||ot===void 0?void 0:ot.update(vt)},close:function(vt,ot){var Pt,yt,At;pe.preventClose&&!ot||((Pt=Ce.current)===null||Pt===void 0||Pt.destroy(),(yt=we)===null||yt===void 0||yt(),(At=$e)===null||At===void 0||At(vt))},Footer:Ge,Header:Ue,setFooter:function(vt){var ot;rt=vt,(ot=Ce.current)===null||ot===void 0||ot.setFooter(vt)},setHeader:function(vt){var ot;je=vt,(ot=Ce.current)===null||ot===void 0||ot.setHeader(vt)},navigation:(ge=pe.inputArgs)===null||ge===void 0?void 0:ge.navigation},qe=new o.iT,ze=E(H.engine);qe.defineProperty("engine",{value:ze}),qe.addDelegate(ze.context),pe.inheritContext!==!1?qe.addDelegate(H):qe.addDelegate(H.engine.context),qe.defineProperty("view",{get:function(){return Oe},resolveOnServer:function(vt){return vt==="record"||vt.startsWith("record.")}}),Y(qe,Oe);var Xe=(0,z.observer)(function(){var Ie,vt,ot=P.useRef(!1),Pt=typeof pe.content=="function"?pe.content(Oe,qe):pe.content,yt=typeof Pt=="string"?(0,v.jsx)("div",{dangerouslySetInnerHTML:{__html:m.Z.sanitize(Pt)}}):Pt;return P.useEffect(function(){var At;(At=pe.onOpen)===null||At===void 0||At.call(pe,Oe,qe)},[]),(Ie=pe.inputArgs)!==null&&Ie!==void 0&&(Ie=Ie.hidden)!==null&&Ie!==void 0&&Ie.value&&!ot.current?null:(ot.current=!0,(0,v.jsx)(O,l()(l()({className:"nb-dialog-overflow-hidden",ref:Ce,hidden:(vt=pe.inputArgs)===null||vt===void 0||(vt=vt.hidden)===null||vt===void 0?void 0:vt.value},pe),{},{footer:rt,header:je,afterClose:function(){var tn,bn,Ht;(tn=we)===null||tn===void 0||tn(),(bn=pe.onClose)===null||bn===void 0||bn.call(pe),(Ht=$e)===null||Ht===void 0||Ht(pe.result),ze.unlinkFromStack()},children:yt}),"dialog-".concat(S)))},{displayName:"DialogWithContext"}),Ye=(0,v.jsx)(C.r6,{engine:ze,children:(0,v.jsx)(N.Y5,{context:qe,children:(0,v.jsx)(Xe,{})})});return we=(de=De.current)===null||de===void 0?void 0:de.patchElement(Ye),Object.assign(Je,Oe)},ye=P.useMemo(function(){return{open:Fe}},[]),be=P.memo(P.forwardRef(function(ce,pe){var H=p(),ge=a()(H,2),de=ge[0],Ce=ge[1];return P.useImperativeHandle(pe,function(){return{patchElement:Ce}},[Ce]),(0,v.jsx)(v.Fragment,{children:de})}));return[ye,(0,v.jsx)(be,{ref:De},"dialog-holder")]}var D=e(95012),U=["children","footer","title","extra","hidden"],G=P.forwardRef(function(De,Fe){var ye,be=De.children,ce=De.footer,pe=De.title,H=De.extra,ge=De.hidden,de=B()(De,U),Ce=P.useState(!0),we=a()(Ce,2),$e=we[0],Je=we[1],rt=P.useState(function(){return ce}),je=a()(rt,2),Ge=je[0],Ue=je[1],Oe=P.useState({title:pe,extra:H}),qe=a()(Oe,2),ze=qe[0],Xe=qe[1];P.useImperativeHandle(Fe,function(){return{destroy:function(){var vt;Je(!1),(vt=de.afterClose)===null||vt===void 0||vt.call(de)},update:function(vt){Object.assign(de,vt)},setFooter:function(vt){Ue(vt)},setHeader:function(vt){Object.values(vt||{}).length===0?Xe(null):Xe(vt)}}},[]);var Ye=P.useMemo(function(){return document.querySelector("#nocobase-app-container")},[]);return(0,v.jsx)(D.Z,l()(l()(l()({rootClassName:ge?"nb-hidden":"",closable:!1,getContainer:Ye},de),{},{open:$e,footer:Ge,styles:l()(l()({},de.styles),{},{footer:l()({display:"flex",justifyContent:"flex-end"},(ye=de.styles)===null||ye===void 0?void 0:ye.footer)})},ze),{},{onClose:function(){var vt;Je(!1),(vt=de.afterClose)===null||vt===void 0||vt.call(de)},children:be}))}),k=G;function $(){var De=P.useRef(null),Fe=P.useMemo(function(){return z.observable.shallow({value:[]})},[]),ye=P.memo(function(H){var ge=H.index,de=P.useState(null),Ce=a()(de,2),we=Ce[0],$e=Ce[1];return P.useEffect(function(){(0,z.autorun)(function(){var Je=Fe.value;Je[ge]&&we!==Je[ge]&&$e(Je[ge]),Je[ge]||$e(null)})},[we,ge]),we?(0,v.jsx)(we,{children:(0,v.jsx)(ye,{index:ge+1})}):null});ye.displayName="RenderNestedDrawer";var be=function(ge,de){var Ce,we,$e=P.createRef(),Je,rt,je=new Promise(function(ot){rt=ot}),Ge=null,Ue=null,Oe=function(Pt){var yt=Pt.children;return P.useEffect(function(){var At;return Ge=yt,(At=$e.current)===null||At===void 0||At.setFooter(yt),function(){var tn;Ge=null,(tn=$e.current)===null||tn===void 0||tn.setFooter(null)}},[yt]),null},qe=function(Pt){return P.useEffect(function(){var yt;return Ue=Pt,(yt=$e.current)===null||yt===void 0||yt.setHeader(Pt),function(){var At;Ue=null,(At=$e.current)===null||At===void 0||At.setHeader(null)}},[Pt]),null},ze={type:"drawer",inputArgs:ge.inputArgs||{},preventClose:!!ge.preventClose,destroy:function(){var Pt;return(Pt=$e.current)===null||Pt===void 0?void 0:Pt.destroy()},update:function(Pt){var yt;return(yt=$e.current)===null||yt===void 0?void 0:yt.update(Pt)},close:function(Pt,yt){var At,tn,bn;ge.preventClose&&!yt||((At=$e.current)===null||At===void 0||At.destroy(),(tn=Je)===null||tn===void 0||tn(),(bn=rt)===null||bn===void 0||bn(Pt))},Footer:Oe,Header:qe,setFooter:function(Pt){var yt;Ge=Pt,(yt=$e.current)===null||yt===void 0||yt.setFooter(Pt)},setHeader:function(Pt){var yt;Ue=Pt,(yt=$e.current)===null||yt===void 0||yt.setHeader(Pt)},navigation:(Ce=ge.inputArgs)===null||Ce===void 0?void 0:Ce.navigation},Xe=new o.iT,Ye=E(de.engine);Xe.defineProperty("engine",{value:Ye}),Xe.addDelegate(Ye.context),ge.inheritContext!==!1?Xe.addDelegate(de):Xe.addDelegate(de.engine.context),Xe.defineProperty("view",{get:function(){return ze},resolveOnServer:function(Pt){return Pt==="record"||Pt.startsWith("record.")}}),Y(Xe,ze);var Ie=P.memo((0,z.observer)(function(ot){var Pt,yt,At=P.useRef(!1),tn=typeof ge.content=="function"?ge.content(ze,Xe):ge.content,bn=typeof tn=="string"?(0,v.jsx)("div",{dangerouslySetInnerHTML:{__html:m.Z.sanitize(tn)}}):tn;return P.useEffect(function(){var Ht;(Ht=ge.onOpen)===null||Ht===void 0||Ht.call(ge,ze,Xe)},[]),(Pt=ge.inputArgs)!==null&&Pt!==void 0&&(Pt=Pt.hidden)!==null&&Pt!==void 0&&Pt.value&&!At.current?(0,v.jsx)(v.Fragment,{children:ot.children}):(At.current=!0,(0,v.jsxs)(k,l()(l()({ref:$e},ge),{},{footer:Ge,header:Ue,hidden:(yt=ge.inputArgs)===null||yt===void 0||(yt=yt.hidden)===null||yt===void 0?void 0:yt.value,afterClose:function(){var gt,We,Be;(gt=Je)===null||gt===void 0||gt(),(We=ge.onClose)===null||We===void 0||We.call(ge),(Be=rt)===null||Be===void 0||Be(ge.result),Ye.unlinkFromStack()},children:[bn,ot.children]})))}));Ie.displayName="DrawerWithContext";var vt=P.memo(function(ot){var Pt=ot.children;return(0,v.jsx)(C.r6,{engine:Ye,children:(0,v.jsx)(N.Y5,{context:Xe,children:(0,v.jsx)(Ie,{children:Pt})})})});return vt.displayName="RenderDrawer",Je=(we=De.current)===null||we===void 0?void 0:we.patchElement(vt),Object.assign(je,ze)},ce=P.useMemo(function(){return{open:be}},[]),pe=P.memo(P.forwardRef(function(H,ge){var de=p(),Ce=a()(de,2),we=Ce[0],$e=Ce[1];return P.useImperativeHandle(ge,function(){return{patchElement:$e}},[$e]),P.useEffect(function(){Fe.value=we},[we]),(0,v.jsx)(ye,{index:0})}));return[ce,(0,v.jsx)(pe,{ref:De},"drawer-holder")]}var V=e(73935),J=e(73475),ne=e(83622),ee=(0,P.forwardRef)(function(De,Fe){var ye=P.useState({}),be=a()(ye,2),ce=be[0],pe=be[1],H=l()(l()({},De),ce),ge=H.visible,de=ge===void 0?!0:ge,Ce=H.footer,we=Ce===void 0?null:Ce,$e=H.header,Je=$e===void 0?null:$e,rt=H.afterClose,je=H.children,Ge=H.hidden,Ue=H.title,Oe=H.styles,qe=Oe===void 0?{}:Oe,ze=H.zIndex,Xe=ze===void 0?4:ze,Ye=(0,P.useRef)(!1),Ie=(0,C.Zr)(),vt=(0,P.useState)(function(){return we}),ot=a()(vt,2),Pt=ot[0],yt=ot[1],At=(0,P.useState)(Je),tn=a()(At,2),bn=tn[0],Ht=tn[1];(0,P.useImperativeHandle)(Fe,function(){return{destroy:function(){Ye.current||(Ye.current=!0,rt==null||rt())},update:function(Ne){pe(Ne)},setFooter:function(Ne){yt(Ne)},setHeader:function(Ne){Object.values(Ne||{}).length===0?Ht(null):Ht(Ne)}}});var gt=(0,P.useMemo)(function(){return{display:Ge?"none":"flex",flexDirection:"column",height:"100%",zIndex:Xe}},[Ge,Xe]),We=(0,P.useMemo)(function(){if(!bn&&!Ue)return null;var at=bn||{},Ne=at.title,st=Ne===void 0?Ue:Ne,Mt=at.extra,Gt=Ie.context.themeToken;return(0,v.jsxs)("div",{style:l()({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"".concat(Gt.paddingSM,"px ").concat(Gt.padding,"px"),borderBottom:"1px solid ".concat(Gt.colorSplit),backgroundColor:Gt.colorBgContainer},qe.header),children:[(0,v.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:Gt.marginXS},children:[(0,v.jsx)(ne.ZP,{type:"text",size:"small",icon:(0,v.jsx)(J.Z,{}),onClick:function(){Ye.current||(Ye.current=!0,rt==null||rt())},style:{color:Gt.colorTextTertiary}}),st&&(0,v.jsx)("div",{style:{fontSize:Gt.fontSizeLG,fontWeight:Gt.fontWeightStrong,color:Gt.colorText},children:st})]}),Mt&&(0,v.jsx)("div",{children:Mt})]})},[bn,Ue,Ie.context.themeToken,qe.header,rt]),Be=(0,P.useMemo)(function(){if(!Pt)return null;var at=Ie.context.themeToken;return(0,v.jsx)("div",{style:l()({display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"".concat(at.paddingXS,"px ").concat(at.padding,"px"),borderTop:"1px solid ".concat(at.colorSplit),backgroundColor:at.colorBgContainer},qe.footer),children:Pt})},[Pt,Ie.context.themeToken,qe.footer]);return de?(0,v.jsxs)("div",{style:l()(l()({},gt),qe.content),children:[We,(0,v.jsx)("div",{style:l()({flex:1,overflowY:"auto"},qe.body),children:je}),Be]}):null}),Q=["target","content","preventClose","inheritContext"],W=0,L=P.memo(P.forwardRef(function(De,Fe){var ye=p(),be=a()(ye,2),ce=be[0],pe=be[1];return P.useImperativeHandle(Fe,function(){return{patchElement:pe}},[pe]),(0,v.jsx)(v.Fragment,{children:ce})}));function w(){var De=P.useRef(null),Fe=function(ce,pe){var H;W+=1;var ge=P.createRef(),de,Ce,we=new Promise(function(yt){Ce=yt}),$e=function(At){var tn=At.children;return P.useEffect(function(){var bn;return(bn=ge.current)===null||bn===void 0||bn.setFooter(tn),function(){var Ht;(Ht=ge.current)===null||Ht===void 0||Ht.setFooter(null)}},[tn]),null},Je=function(At){return P.useEffect(function(){var tn;return(tn=ge.current)===null||tn===void 0||tn.setHeader(At),function(){var bn;(bn=ge.current)===null||bn===void 0||bn.setHeader(null)}},[At]),null},rt=ce.target,je=ce.content,Ge=ce.preventClose,Ue=ce.inheritContext,Oe=Ue===void 0?!0:Ue,qe=B()(ce,Q),ze={type:"embed",inputArgs:ce.inputArgs||{},preventClose:!!ce.preventClose,destroy:function(){var At;return(At=ge.current)===null||At===void 0?void 0:At.destroy()},update:function(At){var tn;return(tn=ge.current)===null||tn===void 0?void 0:tn.update(At)},close:function(At,tn){var bn,Ht,gt;Ge&&!tn||((bn=Ce)===null||bn===void 0||bn(At),(Ht=ge.current)===null||Ht===void 0||Ht.destroy(),(gt=de)===null||gt===void 0||gt())},Header:Je,Footer:$e,setFooter:function(At){var tn;(tn=ge.current)===null||tn===void 0||tn.setFooter(At)},setHeader:function(At){var tn;(tn=ge.current)===null||tn===void 0||tn.setHeader(At)},navigation:(H=ce.inputArgs)===null||H===void 0?void 0:H.navigation},Xe=new o.iT,Ye=E(pe.engine);Xe.defineProperty("engine",{value:Ye}),Xe.addDelegate(Ye.context),Oe?Xe.addDelegate(pe):Xe.addDelegate(pe.engine.context),Xe.defineProperty("view",{get:function(){return ze},resolveOnServer:function(At){return At==="record"||At.startsWith("record.")}}),Y(Xe,ze);var Ie=(0,z.observer)(function(){var yt,At,tn=P.useRef(!1),bn=typeof je=="function"?je(ze,Xe):je;return Xe.themeToken,P.useEffect(function(){var Ht;(Ht=ce.onOpen)===null||Ht===void 0||Ht.call(ce,ze,Xe)},[]),(yt=ce.inputArgs)!==null&&yt!==void 0&&(yt=yt.hidden)!==null&&yt!==void 0&&yt.value&&!tn.current?null:(tn.current=!0,(0,v.jsx)(ee,l()(l()({ref:ge,hidden:(At=ce.inputArgs)===null||At===void 0||(At=At.hidden)===null||At===void 0?void 0:At.value},qe),{},{afterClose:function(){var gt,We,Be;(gt=de)===null||gt===void 0||gt(),(We=ce.onClose)===null||We===void 0||We.call(ce),(Be=Ce)===null||Be===void 0||Be(ce.result),Ye.unlinkFromStack()},children:bn}),"page-".concat(W)))},{displayName:"PageWithContext"}),vt=(0,v.jsx)(C.r6,{engine:Ye,children:(0,v.jsx)(N.Y5,{context:Xe,children:(0,v.jsx)(Ie,{})})});if(rt&&rt instanceof HTMLElement){var ot;de=(ot=De.current)===null||ot===void 0?void 0:ot.patchElement(V.createPortal(vt,rt))}else{var Pt;de=(Pt=De.current)===null||Pt===void 0?void 0:Pt.patchElement(vt)}return Object.assign(we,ze)},ye=P.useMemo(function(){return{open:Fe}},[]);return[ye,(0,v.jsx)(L,{ref:De},"page-holder")]}var Z=e(55241),te=["afterClose","content","placement","rect"],oe=["target","placement","content"],fe=0,xe=P.forwardRef(function(De,Fe){var ye,be,ce,pe,H=De.afterClose,ge=De.content,de=De.placement,Ce=De.rect,we=B()(De,te),$e=P.useState(!0),Je=a()($e,2),rt=Je[0],je=Je[1],Ge=P.useState(l()({content:ge,placement:de,rect:Ce},we)),Ue=a()(Ge,2),Oe=Ue[0],qe=Ue[1];return P.useImperativeHandle(Fe,function(){return{destroy:function(){return je(!1)},update:function(Xe){return qe(function(Ye){return l()(l()({},Ye),Xe)})},close:function(Xe,Ye){return je(!1)}}}),P.useEffect(function(){rt||H==null||H()},[rt,H]),(0,v.jsx)(Z.Z,l()(l()({arrow:!1,open:rt,trigger:["click"],destroyTooltipOnHide:!0,content:Oe.content,placement:Oe.placement,getPopupContainer:function(){return document.body},onOpenChange:function(Xe){je(Xe),Xe||H==null||H()}},Oe),{},{children:(0,v.jsx)("span",{style:{position:"absolute",top:((ye=(be=Oe.rect)===null||be===void 0?void 0:be.top)!==null&&ye!==void 0?ye:0)+window.scrollY,left:((ce=(pe=Oe.rect)===null||pe===void 0?void 0:pe.left)!==null&&ce!==void 0?ce:0)+window.scrollX,width:0,height:0}})}))});function he(){var De=P.useRef(null),Fe=function(pe){var H,ge,de;fe+=1;var Ce=pe.target,we=pe.placement,$e=we===void 0?"rightTop":we,Je=pe.content,rt=B()(pe,oe),je=P.createRef(),Ge=(H=Ce==null||(ge=Ce.getBoundingClientRect)===null||ge===void 0?void 0:ge.call(Ce))!==null&&H!==void 0?H:{top:0,left:0},Ue,Oe,qe=new Promise(function(vt){Oe=vt}),ze={type:"popover",destroy:function(){var ot;return(ot=je.current)===null||ot===void 0?void 0:ot.destroy()},update:function(ot){var Pt;return(Pt=je.current)===null||Pt===void 0?void 0:Pt.update(ot)},close:function(ot){var Pt,yt;(Pt=Oe)===null||Pt===void 0||Pt(ot),(yt=je.current)===null||yt===void 0||yt.close(ot)}},Xe=typeof Je=="function"?Je(ze):Je,Ye=typeof Xe=="string"?(0,v.jsx)("div",{dangerouslySetInnerHTML:{__html:m.Z.sanitize(Xe)}}):Xe,Ie=(0,v.jsx)(xe,l()({ref:je,content:Ye,placement:$e,rect:Ge,afterClose:function(){var ot,Pt,yt;(ot=Ue)===null||ot===void 0||ot(),(Pt=pe.onClose)===null||Pt===void 0||Pt.call(pe),(yt=Oe)===null||yt===void 0||yt(pe.result)}},rt),"popover-".concat(fe));return Ue=(de=De.current)===null||de===void 0?void 0:de.patchElement(Ie),Object.assign(qe,ze)},ye=P.useMemo(function(){return{open:Fe}},[]),be=P.memo(P.forwardRef(function(ce,pe){var H=p(),ge=a()(H,2),de=ge[0],Ce=ge[1];return P.useImperativeHandle(pe,function(){return{patchElement:Ce}},[]),(0,v.jsx)(v.Fragment,{children:de})}));return[ye,(0,v.jsx)(be,{ref:De},"popover-holder")]}var ie=e(12444),le=e.n(ie),ue=e(72004),me=e.n(ue),se=e(9783),ae=e.n(se);function Ee(De){if(!De||De.length===0)return"/admin";var Fe=["admin"];return De.forEach(function(ye,be){be>0&&Fe.push("view"),Fe.push(ye.viewUid),ye.tabUid&&Fe.push("tab",ye.tabUid),ye.filterByTk&&Fe.push("filterbytk",ye.filterByTk),ye.sourceId&&Fe.push("sourceid",ye.sourceId)}),"/"+Fe.join("/")}var Pe=function(){function De(Fe,ye){le()(this,De),ae()(this,"viewStack",void 0),ae()(this,"ctx",void 0),this.viewStack=d()(ye),this.ctx=Fe}return me()(De,[{key:"changeTo",value:function(ye){this.viewStack.length===0?this.viewStack.push(ye):this.viewStack[this.viewStack.length-1]=l()(l()({},this.viewStack[this.viewStack.length-1]),ye);var be=Ee(this.viewStack);this.ctx.router.navigate(be,{replace:!0})}},{key:"navigateTo",value:function(ye,be){var ce=Ee([].concat(d()(this.viewStack),[ye])),pe=ce;if(location.pathname.endsWith(pe))return this.ctx.router.navigate(-1);this.ctx.router.navigate(pe,be),this.viewStack.length===0&&this.viewStack.push(ye)}},{key:"back",value:function(){var ye=Ee(this.viewStack);location.pathname.endsWith(ye)&&this.ctx.router.navigate(-1)}}]),De}()},84816:function(_t,ve,e){"use strict";e.r(ve),e.d(ve,{APIClient:function(){return I},Auth:function(){return F},MemoryStorage:function(){return i},Storage:function(){return v},getSubAppName:function(){return c}});var q=e(13769),a=e.n(q),X=e(25098),l=e.n(X),P=e(31996),m=e.n(P),z=e(26037),o=e.n(z),N=e(97857),b=e.n(N),j=e(15009),f=e.n(j),g=e(99289),n=e.n(g),M=e(12444),T=e.n(M),u=e(72004),r=e.n(u),A=e(9783),y=e.n(A),K=e(87066),R=e(80129),Y=e.n(R),x=["authClass","storageType","storageClass","storagePrefix"],B=["values","filter"],F=function(){function d(p){T()(this,d),y()(this,"api",void 0),y()(this,"options",{locale:null,role:null,authenticator:null,token:null}),this.api=p,this.api.axios.interceptors.request.use(this.middleware.bind(this))}return r()(d,[{key:"storagePrefix",get:function(){return this.api.storagePrefix}},{key:"KEYS",get:function(){var C={locale:this.storagePrefix+"LOCALE",role:this.storagePrefix+"ROLE",token:this.storagePrefix+"TOKEN",authenticator:this.storagePrefix+"AUTH",theme:this.storagePrefix+"THEME"};if(this.api.app){var h,E,S=(h=this.api.app)===null||h===void 0||(E=h.getName)===null||E===void 0?void 0:E.call(h);S&&(C.role="".concat(S.toUpperCase(),"_")+C.role,C.locale="".concat(S.toUpperCase(),"_")+C.locale)}return C}},{key:"locale",get:function(){return this.getLocale()},set:function(C){this.setLocale(C)}},{key:"role",get:function(){return this.getRole()},set:function(C){this.setRole(C)}},{key:"token",get:function(){return this.getToken()},set:function(C){this.setToken(C)}},{key:"authenticator",get:function(){return this.getAuthenticator()},set:function(C){this.setAuthenticator(C)}},{key:"getOption",value:function(C){if(this.KEYS[C])return this.api.storage.getItem(this.KEYS[C])}},{key:"setOption",value:function(C,h){if(this.KEYS[C])return this.options[C]=h,this.api.storage.setItem(this.KEYS[C],h||"")}},{key:"getLocale",value:function(){return this.getOption("locale")}},{key:"setLocale",value:function(C){this.setOption("locale",C)}},{key:"getRole",value:function(){return this.getOption("role")}},{key:"setRole",value:function(C){this.setOption("role",C)}},{key:"getToken",value:function(){return this.getOption("token")}},{key:"setToken",value:function(C){this.setOption("token",C),this.api.app&&this.api.app.eventBus.dispatchEvent(new CustomEvent("auth:tokenChanged",{detail:{token:C,authenticator:this.authenticator}}))}},{key:"getAuthenticator",value:function(){return this.getOption("authenticator")}},{key:"setAuthenticator",value:function(C){this.setOption("authenticator",C)}},{key:"middleware",value:function(C){return this.locale&&(C.headers["X-Locale"]=this.locale),this.role&&(C.headers["X-Role"]=this.role),this.authenticator&&!C.headers["X-Authenticator"]&&(C.headers["X-Authenticator"]=this.authenticator),this.token&&(C.headers.Authorization="Bearer ".concat(this.token)),C}},{key:"signIn",value:function(){var p=n()(f()().mark(function h(E,S){var t,D,U;return f()().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return k.next=2,this.api.request({method:"post",url:"auth:signIn",data:E,headers:{"X-Authenticator":S}});case 2:return D=k.sent,U=D==null||(t=D.data)===null||t===void 0?void 0:t.data,this.setAuthenticator(S),this.setToken(U==null?void 0:U.token),k.abrupt("return",D);case 7:case"end":return k.stop()}},h,this)}));function C(h,E){return p.apply(this,arguments)}return C}()},{key:"signUp",value:function(){var p=n()(f()().mark(function h(E,S){return f()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,this.api.request({method:"post",url:"auth:signUp",data:E,headers:{"X-Authenticator":S}});case 2:return D.abrupt("return",D.sent);case 3:case"end":return D.stop()}},h,this)}));function C(h,E){return p.apply(this,arguments)}return C}()},{key:"signOut",value:function(){var p=n()(f()().mark(function h(){var E;return f()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.api.request({method:"post",url:"auth:signOut"});case 2:return E=t.sent,this.setToken(null),this.setRole(null),this.setAuthenticator(null),t.abrupt("return",E);case 7:case"end":return t.stop()}},h,this)}));function C(){return p.apply(this,arguments)}return C}()},{key:"lostPassword",value:function(){var p=n()(f()().mark(function h(E){var S,t,D;return f()().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return S=new URLSearchParams(window.location.search),t=Object.fromEntries(S.entries()),G.next=4,this.api.request({method:"post",url:"auth:lostPassword",data:b()(b()({},E),{},{baseURL:window.location.href.split("/forgot-password")[0]}),headers:{"X-Authenticator":t.name}});case 4:return D=G.sent,G.abrupt("return",D);case 6:case"end":return G.stop()}},h,this)}));function C(h){return p.apply(this,arguments)}return C}()},{key:"resetPassword",value:function(){var p=n()(f()().mark(function h(E){var S;return f()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,this.api.request({method:"post",url:"auth:resetPassword",data:E});case 2:return S=D.sent,D.abrupt("return",S);case 4:case"end":return D.stop()}},h,this)}));function C(h){return p.apply(this,arguments)}return C}()},{key:"checkResetToken",value:function(){var p=n()(f()().mark(function h(E){var S;return f()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,this.api.request({method:"post",url:"auth:checkResetToken",data:E});case 2:return S=D.sent,D.abrupt("return",S);case 4:case"end":return D.stop()}},h,this)}));function C(h){return p.apply(this,arguments)}return C}()}]),d}(),v=r()(function d(){T()(this,d)}),i=function(d){m()(C,d);var p=o()(C);function C(){var h;T()(this,C);for(var E=arguments.length,S=new Array(E),t=0;t<E;t++)S[t]=arguments[t];return h=p.call.apply(p,[this].concat(S)),y()(l()(h),"items",new Map),h}return r()(C,[{key:"clear",value:function(){this.items.clear()}},{key:"getItem",value:function(E){return this.items.get(E)}},{key:"setItem",value:function(E,S){return this.items.set(E,S)}},{key:"removeItem",value:function(E){return this.items.delete(E)}}]),C}(v),I=function(){function d(p){if(T()(this,d),y()(this,"options",void 0),y()(this,"axios",void 0),y()(this,"auth",void 0),y()(this,"storage",void 0),y()(this,"storagePrefix","NOCOBASE_"),this.options=p,typeof p=="function")this.axios=p;else{var C=p||{},h=C.authClass,E=C.storageType,S=C.storageClass,t=C.storagePrefix,D=t===void 0?"NOCOBASE_":t,U=a()(C,x);this.storagePrefix=D,this.axios=K.Z.create(U),this.initStorage(S,E),h&&(this.auth=new h(this))}this.storage||this.initStorage(),this.auth||(this.auth=new F(this)),this.interceptors()}return r()(d,[{key:"toErrMessages",value:function(C){var h,E,S,t,D;if(typeof document<"u"&&typeof(C==null||(h=C.response)===null||h===void 0?void 0:h.data)=="string"){var U,G=document.createElement("div");G.innerHTML=C==null||(U=C.response)===null||U===void 0?void 0:U.data;var k=G.textContent||G.innerText;return k.includes("Error occurred while trying")?(k="The application may be starting up. Please try again later.",[{code:"APP_WARNING",message:k}]):k.includes("502 Bad Gateway")?(k="The application may be starting up. Please try again later.",[{code:"APP_WARNING",message:k}]):[{message:k}]}if(C!=null&&(E=C.response)!==null&&E!==void 0&&(E=E.data)!==null&&E!==void 0&&E.error){var $;return[C==null||($=C.response)===null||$===void 0||($=$.data)===null||$===void 0?void 0:$.error]}return(C==null||(S=C.response)===null||S===void 0||(S=S.data)===null||S===void 0?void 0:S.errors)||(C==null||(t=C.response)===null||t===void 0||(t=t.data)===null||t===void 0?void 0:t.messages)||(C==null||(D=C.response)===null||D===void 0?void 0:D.error)||[{message:C.message||"Server error"}]}},{key:"getHeaders",value:function(){var C={};return this.auth.locale&&(C["X-Locale"]=this.auth.locale),this.auth.role&&(C["X-Role"]=this.auth.role),this.auth.authenticator&&(C["X-Authenticator"]=this.auth.authenticator),this.auth.token&&(C.Authorization="Bearer ".concat(this.auth.token)),C}},{key:"initStorage",value:function(C){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"localStorage";if(C){this.storage=new C(this);return}if(h==="localStorage"&&typeof localStorage<"u"){this.storage=localStorage;return}if(h==="sessionStorage"&&typeof sessionStorage<"u"){this.storage=sessionStorage;return}this.storage=new i}},{key:"interceptors",value:function(){this.axios.interceptors.request.use(function(C){return C.paramsSerializer=function(h){return Y().stringify(h,{strictNullHandling:!0,arrayFormat:"brackets"})},C})}},{key:"request",value:function(C){var h=C,E=h.resource,S=h.resourceOf,t=h.action,D=h.params,U=h.headers;return E?this.resource(E,S,U)[t](D):this.axios.request(C)}},{key:"resource",value:function(C,h,E,S){var t=this,D={},U={get:function(k,$){if(!S){var V=C.split(".").join("/".concat(encodeURIComponent(h)||"_","/"));V+=":".concat($.toString());var J={url:V};return["get","list"].includes($)?J.method="get":J.method="post",function(){var ne=n()(f()().mark(function ee(Q,W){var L,w,Z,te;return f()().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return L=Q||{},w=L.values,Z=L.filter,te=a()(L,B),J.params=te,Z&&(typeof Z=="string"?J.params.filter=Z:(Z["*"]&&delete Z["*"],J.params.filter=JSON.stringify(Z))),J.method!=="get"&&(J.data=w||{}),fe.next=6,t.request(b()(b()(b()({},J),W),{},{headers:E}));case 6:return fe.abrupt("return",fe.sent);case 7:case"end":return fe.stop()}},ee)}));return function(ee,Q){return ne.apply(this,arguments)}}()}}};return new Proxy(D,U)}}]),d}(),O=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"/",C="".concat(p,"apps/");if(window.location.pathname.startsWith(C)){var h=window.location.pathname.substring(C.length),E=h.split("/",1);return E[0]||""}},c=O},20301:function(_t,ve,e){"use strict";e.r(ve),e.d(ve,{CollectionsGraph:function(){return Q},Handlebars:function(){return gt()},Registry:function(){return pn},dayjs:function(){return l()},error:function(){return Qe},evaluateConditions:function(){return De},extractUsedVariableNames:function(){return Qt},extractUsedVariablePaths:function(){return Ft},flatten:function(){return Tn},forEach:function(){return At},getDateTimeFormat:function(){return Pt},getDateVars:function(){return Wn},getDayRange:function(){return Dn},getDayRangeByParams:function(){return U},getDefaultFormat:function(){return Je},getFormatFromDateStr:function(){return yt},getOffsetRangeByParams:function(){return E},getPickerFormat:function(){return ot},getValuesByPath:function(){return tn},hasEmptyValue:function(){return pe},isArray:function(){return ye},isEmpty:function(){return be},isEmptyFilter:function(){return we},isPlainObject:function(){return ce},isPortalInBody:function(){return mt},isString:function(){return Fe},isURL:function(){return vn},isValidFilter:function(){return Ne},lodash:function(){return a()},merge:function(){return Ve},moment2str:function(){return Xe},nextTick:function(){return H},offsetFromString:function(){return Ye},parse:function(){return Wt},parseFilter:function(){return Yt},parseHTML:function(){return ft},removeNullCondition:function(){return $e},showToast:function(){return ct},sleep:function(){return Ce},sortTree:function(){return de},splitPathToTwoParts:function(){return vr},str2moment:function(){return Oe},toFixedByStep:function(){return Vt},toGmt:function(){return rt},toLocal:function(){return je},toUnit:function(){return En},transformFilter:function(){return ae},transformMultiColumnToSingleColumn:function(){return $n},treeFind:function(){return ge},tval:function(){return Ae},uid:function(){return Ut},unflatten:function(){return Gn},utc2unit:function(){return xn}});var q=e(96486),a=e.n(q),X=e(27484),l=e.n(X),P=e(28734),m=e.n(P),z=e(10285),o=e.n(z),N=e(1646),b=e.n(N),j=e(66607),f=e.n(j),g=e(79212),n=e.n(g),M=e(37412),T=e.n(M),u=e(59542),r=e.n(u),A=e(96036),y=e.n(A),K=e(96671),R=e.n(K),Y=e(29387),x=e.n(Y),B=e(70178),F=e.n(B),v=e(55183),i=e.n(v),I=e(172),O=e.n(I),c=e(72540),d=e.n(c);l().extend(d()),l().extend(y()),l().extend(x()),l().extend(F()),l().extend(R()),l().extend(r()),l().extend(f()),l().extend(n()),l().extend(T()),l().extend(i()),l().extend(O()),l().extend(o()),l().extend(m()),l().extend(b());var p=e(5574),C=e.n(p),h=function(Se){if(!Se)return l()();if(/^[+-]\d{2}:\d{2}$/.test(Se)){var Le=Se.match(/([+-])(\d{2}):(\d{2})/).slice(1),dt=C()(Le,3),xt=dt[0],St=dt[1],wt=dt[2],In=(parseInt(St)*60+parseInt(wt))*(xt==="+"?1:-1);return l()().utcOffset(In)}return l()().tz(Se)},E=function(Se){var Le=Se.type,dt=Se.unit,xt=dt===void 0?"day":dt,St=Se.number,wt=St===void 0?1:St,In=Se.timezone,kn=h(In),or=xt==="week"?"isoWeek":xt,Xn,nr;if(Le==="past"){var Er=kn.startOf(or);Xn=Er.subtract(wt,xt).startOf(or),nr=Er.subtract(1,xt).endOf(or)}else if(Le==="next"){var Fr=kn.startOf(or);Xn=Fr.add(1,xt).startOf(or),nr=Xn.add(wt-1,xt).endOf(or)}else throw new Error("Unsupported type: ".concat(Le));return[Xn.format("YYYY-MM-DD HH:mm:ss"),nr.format("YYYY-MM-DD HH:mm:ss")]},S=function(Se,Le,dt){var xt=Le==="isoWeek"?"week":Le;return h(dt).add(Se,xt).startOf(Le)},t=function(Se,Le,dt){var xt=Le==="isoWeek"?"week":Le;return h(dt).add(Se,xt).endOf(Le)},D={today:function(Se){return[S(0,"day",Se==null?void 0:Se.timezone),t(0,"day",Se==null?void 0:Se.timezone)]},yesterday:function(Se){return[S(-1,"day",Se==null?void 0:Se.timezone),t(-1,"day",Se==null?void 0:Se.timezone)]},tomorrow:function(Se){return[S(1,"day",Se==null?void 0:Se.timezone),t(1,"day",Se==null?void 0:Se.timezone)]},thisWeek:function(Se){return[S(0,"isoWeek",Se==null?void 0:Se.timezone),t(0,"isoWeek",Se==null?void 0:Se.timezone)]},lastWeek:function(Se){return[S(-1,"isoWeek",Se==null?void 0:Se.timezone),t(-1,"isoWeek",Se==null?void 0:Se.timezone)]},nextWeek:function(Se){return[S(1,"isoWeek",Se==null?void 0:Se.timezone),t(1,"isoWeek",Se==null?void 0:Se.timezone)]},thisMonth:function(Se){return[S(0,"month",Se==null?void 0:Se.timezone),t(0,"month",Se==null?void 0:Se.timezone)]},lastMonth:function(Se){return[S(-1,"month",Se==null?void 0:Se.timezone),t(-1,"month",Se==null?void 0:Se.timezone)]},nextMonth:function(Se){return[S(1,"month",Se==null?void 0:Se.timezone),t(1,"month",Se==null?void 0:Se.timezone)]},thisQuarter:function(Se){return[S(0,"quarter",Se==null?void 0:Se.timezone),t(0,"quarter",Se==null?void 0:Se.timezone)]},lastQuarter:function(Se){return[S(-1,"quarter",Se==null?void 0:Se.timezone),t(-1,"quarter",Se==null?void 0:Se.timezone)]},nextQuarter:function(Se){return[S(1,"quarter",Se==null?void 0:Se.timezone),t(1,"quarter",Se==null?void 0:Se.timezone)]},thisYear:function(Se){return[S(0,"year",Se==null?void 0:Se.timezone),t(0,"year",Se==null?void 0:Se.timezone)]},lastYear:function(Se){return[S(-1,"year",Se==null?void 0:Se.timezone),t(-1,"year",Se==null?void 0:Se.timezone)]},nextYear:function(Se){return[S(1,"year",Se==null?void 0:Se.timezone),t(1,"year",Se==null?void 0:Se.timezone)]}},U=function(Se){if(Se.type==="past"||Se.type==="next")return E(Se);var Le=D[Se.type];if(!Le)throw new Error("Unsupported type: ".concat(Se.type));var dt=Le(Se),xt=C()(dt,2),St=xt[0],wt=xt[1];return[St.format("YYYY-MM-DD HH:mm:ss"),wt.format("YYYY-MM-DD HH:mm:ss")]},G=e(96695),k=e.n(G),$=e(12444),V=e.n($),J=e(72004),ne=e.n(J),ee=e(28282),Q=function(){function Te(){V()(this,Te)}return ne()(Te,null,[{key:"graphlib",value:function(){return ee}},{key:"connectedNodes",value:function(Le){var dt=(0,q.castArray)(Le.nodes),xt=(0,q.castArray)(Le.excludes||[]),St=Te.build(Le),wt=new Set,In=k()(dt),kn;try{for(In.s();!(kn=In.n()).done;){var or=kn.value,Xn=ee.alg.preorder(St,or),nr=k()(Xn),Er;try{for(nr.s();!(Er=nr.n()).done;){var Fr=Er.value;xt.includes(Fr)||wt.add(Fr)}}catch(Ur){nr.e(Ur)}finally{nr.f()}}}catch(Ur){In.e(Ur)}finally{In.f()}return Array.from(wt)}},{key:"preOrder",value:function(Le){return Te.graphlib().alg.preorder(Te.build(Le),Le.node)}},{key:"build",value:function(Le){var dt=Le.collections,xt=(Le==null?void 0:Le.direction)||"forward",St=xt==="forward",wt=new ee.Graph,In=k()(dt),kn;try{for(In.s();!(kn=In.n()).done;){var or=kn.value;wt.setNode(or.name)}}catch(fo){In.e(fo)}finally{In.f()}var Xn=k()(dt),nr;try{for(Xn.s();!(nr=Xn.n()).done;){var Er=nr.value,Fr=Er.inherits||[],Ur=k()(Fr),br;try{for(Ur.s();!(br=Ur.n()).done;){var Jr=br.value;St?wt.setEdge(Er.name,Jr):wt.setEdge(Jr,Er.name)}}catch(fo){Ur.e(fo)}finally{Ur.f()}var mr=k()(Er.fields||[]),Wr;try{for(mr.s();!(Wr=mr.n()).done;){var Lr=Wr.value;if((Lr.type==="hasMany"||Lr.type==="belongsTo"||Lr.type==="hasOne")&&(St?wt.setEdge(Er.name,Lr.target):wt.setEdge(Lr.target,Er.name)),Lr.type==="belongsToMany"){var eo=Lr.through;St?(wt.setEdge(Er.name,eo),wt.setEdge(eo,Lr.target)):(wt.setEdge(Lr.target,eo),wt.setEdge(eo,Er.name))}}}catch(fo){mr.e(fo)}finally{mr.f()}}}catch(fo){Xn.e(fo)}finally{Xn.f()}return wt}}]),Te}(),W=e(9783),L=e.n(W),w=e(97857),Z=e.n(w),te=e(19632),oe=e.n(te),fe=e(34444),xe=e.n(fe),he=e(52677),ie=e.n(he);function le(Te){return"path"in Te&&"operator"in Te&&"value"in Te}function ue(Te){return"logic"in Te&&"items"in Te}function me(Te){var Se=Te.path,Le=Te.operator,dt=Te.value;return L()({},Se,L()({},Le,dt))}function se(Te){var Se=Te.logic,Le=Te.items,dt=Le.map(function(xt){if(le(xt))return me(xt);if(ue(xt))return se(xt);throw new Error("Invalid filter item type")});return L()({},Se,dt)}function ae(Te){if(!Te||ie()(Te)!=="object")throw new Error("Invalid filter: filter must be an object");if(!ue(Te))throw new Error("Invalid filter: filter must have logic and items properties");if(!Array.isArray(Te.items))throw new Error("Invalid filter: items must be an array");return se(Te)}function Ee(Te,Se){var Le=Te.path,dt=Te.operator,xt=Te.value;return Se(Le,dt,xt)}function Pe(Te,Se){var Le=Te.logic,dt=Te.items;if(!dt||dt.length===0)return!0;var xt=dt.map(function(St){if(le(St))return Ee(St,Se);if(ue(St))return Pe(St,Se);throw new Error("Invalid filter item type")});if(Le==="$and")return xt.every(function(St){return St===!0});if(Le==="$or")return xt.some(function(St){return St===!0});throw new Error("Unsupported logic operator: ".concat(Le))}function De(Te,Se){if(!Te||ie()(Te)!=="object")throw new Error("Invalid conditions: conditions must be an object");if(!ue(Te))throw new Error("Invalid conditions: conditions must have logic and items properties");if(!Array.isArray(Te.items))throw new Error("Invalid conditions: items must be an array");if(typeof Se!="function")throw new Error("Invalid evaluator: evaluator must be a function");return Pe(Te,Se)}var Fe=function(Se){return typeof Se=="string"},ye=function(Se){return Array.isArray(Se)},be=function(Se){return ce(Se)?Object.keys(Se).length===0:Array.isArray(Se)?Se.length===0:!Se},ce=function(Se){if(Object.prototype.toString.call(Se)!=="[object Object]")return!1;var Le=Object.getPrototypeOf(Se);return Le===null||Le===Object.prototype},pe=function Te(Se){var Le=!0;for(var dt in Se){if(Le=!1,ye(Se[dt])&&Se[dt].length===0||!Se[dt])return!0;if(ce(Se[dt])||ye(Se[dt]))return Te(Se[dt])}return Le},H=function(Se){setTimeout(Se)};function ge(Te,Se){var Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(Te){var dt=Le.childrenKey,xt=dt===void 0?"children":dt,St=Array.isArray(Te)?oe()(Te):[Te],wt=k()(St),In;try{for(wt.s();!(In=wt.n()).done;){var kn=In.value;if(Se(kn))return kn;var or=typeof xt=="function"?xt(kn):kn[xt];if(Array.isArray(or)&&or.length>0){var Xn=ge(or,Se,Le);if(Xn!==void 0)return Xn}}}catch(nr){wt.e(nr)}finally{wt.f()}}}function de(Te,Se){var Le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"children",dt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;if(!Te||!Array.isArray(Te)||Te.length===0)return Te;var xt=a().orderBy(Te,Se,dt?"asc":"desc");return xt.map(function(St){return St[Le]&&St[Le].length>0?Z()(Z()({},St),{},L()({},Le,de(St[Le],Se,Le,dt))):St})}function Ce(Te){return new Promise(function(Se){setTimeout(Se,Te)})}function we(Te){return!!(!Te||"$and"in Te&&a().isEmpty(Te.$and)||"$or"in Te&&a().isEmpty(Te.$or))}var $e=function(Se){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xe(),dt=Le(Se||{}),xt={};for(var St in dt){var wt=dt[St];wt!=null&&!be(wt)&&wt!==""&&(xt[St]=wt)}var In=Le.unflatten(xt);return a().isEmpty(In)?void 0:In},Je=function(Se){return Se.format?Se.format:Se.dateFormat?Se.showTime?"".concat(Se.dateFormat," ").concat(Se.timeFormat||"HH:mm:ss"):Se.dateFormat:Se.picker==="month"?"YYYY-MM":Se.picker==="quarter"?"YYYY-\\QQ":Se.picker==="year"?"YYYY":Se.picker==="week"?"YYYY[W]W":Se.showTime?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"},rt=function(Se){return!Se||!l().isDayjs(Se)?Se:"".concat(Se.format("YYYY-MM-DD"),"T").concat(Se.format("HH:mm:ss.SSS"),"Z")},je=function(Se){if(!Se)return Se;if(Array.isArray(Se))return Se.map(function(Le){return Le.startOf("second").toISOString()});if(l().isDayjs(Se))return Se.startOf("second").toISOString()},Ge=function(Se){try{var Le=parseInt(Se.slice(0,4)),dt=parseInt(Se.slice(-1));return l()().quarter(dt).year(Le)}catch{return null}},Ue=function(Se,Le){if(Se){var dt=Le.utcOffset,xt=Le.gmt,St=Le.picker,wt=Le.utc,In=wt===void 0?!0:wt,kn=Le.dateOnly;if(l()(Se).isValid()){if(kn){var or=l()(Se);if(!or.isValid())return Se;var Xn=or.format("YYYY-MM-DD");return l().utc(Xn,"YYYY-MM-DD")}return In?l().isDayjs(Se)?dt?Se.utcOffset(Ye(dt)):Se:xt?l()(Se).utcOffset(0):dt?l()(Se).utcOffset(Ye(dt)):l()(Se):l()(Se)}else return Ge(Se)}},Oe=function(Se){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(Se)?Se.map(function(dt){return Ue(dt,Le)}):Se&&Ue(Se,Le)},qe=function(Se,Le){return Le==="year"?Se.format("YYYY")+"-01-01T00:00:00.000Z":Le==="month"||Le==="quarter"?Se.format("YYYY-MM")+"-01T00:00:00.000Z":Se.format("YYYY-MM-DD")+"T00:00:00.000Z"},ze=function(Se,Le){if(!Se)return Se;if(Array.isArray(Se))return Se.map(function(dt){return qe(dt,Le)});if(l().isDayjs(Se))return qe(Se,Le)},Xe=function(Se){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dt=Le.showTime,xt=Le.gmt,St=Le.picker;return Se&&(dt?xt?rt(Se):je(Se):ze(Se,St))};function Ye(Te){if(!a().isString(Te))return Te;var Se=/([+-]|\d\d)/gi,Le=/Z|[+-]\d\d(?::?\d\d)?/gi,dt=/[+-]?\d+(\.\d{1,3})?/,xt=(Te||"").match(Le);if(xt===null&&(xt=(Te||"").match(dt)),xt===null)return null;var St=xt[xt.length-1]||[],wt=(St+"").match(Se)||["-",0,0],In=+(Number(wt[1])*60)+Ie(wt[2]);return In===0?0:wt[0]==="+"?In:-In}function Ie(Te){var Se=+Te,Le=0;return Se!==0&&isFinite(Se)&&(Le=vt(Se)),Le}function vt(Te){return Te<0?Math.ceil(Te)||0:Math.floor(Te)}var ot=function(Se){switch(Se){case"week":return"YYYY[W]W";case"month":return"YYYY-MM";case"quarter":return"YYYY[Q]Q";case"year":return"YYYY";default:return"YYYY-MM-DD"}},Pt=function(Se,Le,dt,xt){return Se==="date"&&dt?"".concat(Le," ").concat(xt||"HH:mm:ss"):Le};function yt(Te){return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(Te)?"YYYY-MM-DD HH:mm:ss":/^\d{4}-\d{2}-\d{2}$/.test(Te)?"YYYY-MM-DD":/^\d{4}-\d{2}$/.test(Te)?"YYYY-MM":/^\d{4}$/.test(Te)?"YYYY":/^\d{4}Q[1-4]$/.test(Te)?"YYYY[Q]Q":/^\d{4}-\d{2}-\d{2}T/.test(Te)?"YYYY-MM-DDTHH:mm:ss.SSSZ":null}var At=function(Se,Le){Array.isArray(Se)?Se.forEach(Le):Object.keys(Se).forEach(function(dt){Le(Se[dt],dt)})},tn=function Te(Se,Le,dt){if(!Se)return dt;for(var xt=Le.split("."),St=[],wt=Se,In=!1,kn=0;kn<xt.length;kn++){var or,Xn=xt[kn];if(Array.isArray(wt)){In=!0;var nr=k()(wt),Er;try{for(nr.s();!(Er=nr.n()).done;){var Fr=Er.value,Ur=Te(Fr,xt.slice(kn).join("."),dt);St=St.concat(Ur)}}catch(br){nr.e(br)}finally{nr.f()}break}if(((or=wt)===null||or===void 0?void 0:or[Xn])===void 0)break;wt=wt[Xn],kn===xt.length-1&&St.push(wt)}return St=St.filter(function(br){return br!==void 0}),St.length===0?dt:In?St.filter(function(br){return br!==null}):St[0]},bn=e(8575),Ht=e(96750),gt=e.n(Ht),We=e(11700),Be=e.n(We),at=Be()();Object.keys(at).forEach(function(Te){gt().registerHelper(Te,at[Te])}),gt().registerHelper("json",function(Te){return JSON.stringify(Te)}),gt().registerHelper("urlParse",function(Te){try{return JSON.stringify(bn.parse(Te))}catch{return"Invalid URL: ".concat(Te)}}),gt().registerHelper("dateFormat",function(Te,Se,Le){return typeof Le=="string"?l()(Te).tz(Le).format(Se):l()(Te).format(Se)}),gt().registerHelper("isNull",function(Te){return a().isNull(Te)});function Ne(Te){if(!Te)return!1;var Se=[Te.$and,Te.$or].filter(Boolean);return Se.length==0?Object.keys(Te).length>0:Se.some(function(Le){if(Array.isArray(Le))return Le.some(Ne);if(Le.$and||Le.$or)return Ne(Le);var dt=Object.keys(Le),xt=C()(dt,1),St=xt[0];if(!St||!Le[St])return!1;var wt=Object.keys(Le[St]),In=C()(wt,1),kn=In[0];return!(!kn||typeof Le[St][kn]>"u")})}function st(Te){var Se=ie()(Te);return Array.isArray(Te)?Se="array":Te instanceof Date?Se="date":Te===null&&(Se="null"),Se}function Mt(Te){var Se,Le=Te.substr(2,Te.length-4).trim(),dt=Le.indexOf(":");return dt!==-1?Se={key:Le.substr(0,dt),defaultValue:Le.substr(dt+1)}:Se={key:Le},Se}function Gt(Te,Se){return Te.parameters=Array.from(new Map(Se.map(function(Le){return[Le.key,Le]})).values()),Te}function Wt(Te){switch(st(Te)){case"string":return nn(Te);case"object":return Zt(Te);case"array":return bt(Te);default:return Gt(function(){return Te},[])}}var nn=function(){var Te=/{{(\w|:|[\s-+.,@/()?=*_$])+}}/g;return function(Se){var Le=[],dt=function(wt){return Se},xt=Se.match(Te);return xt&&(Le=xt.map(Mt),dt=function(wt){return wt=wt||{},xt.reduce(function(In,kn,or){var Xn=Le[or],nr=(0,q.get)(wt,Xn.key);return typeof nr>"u"&&(nr=Xn.defaultValue),typeof nr=="function"&&(nr=nr()),xt.length===1&&Se.startsWith("{{")&&Se.endsWith("}}")?nr:(nr instanceof Date&&(nr=nr.toISOString()),In.replace(kn,nr??""))},Se)}),Gt(dt,Le)}}();function Zt(Te){var Se=Object.keys(Te).map(function(xt){return{keyTemplate:nn(xt),valueTemplate:Wt(Te[xt])}}),Le=Se.reduce(function(xt,St){return xt.concat(St.valueTemplate.parameters,St.keyTemplate.parameters)},[]),dt=function(St){return Se.reduce(function(wt,In){return wt[In.keyTemplate(St)]=In.valueTemplate(St),wt},{})};return Gt(dt,Le)}function bt(Te){var Se=Te.map(Wt),Le=Se.reduce(function(xt,St){return xt.concat(St.parameters)},[]),dt=function(St){return Se.map(function(wt){return wt(St)})};return Gt(dt,Le)}var Qe=function(Se){for(var Le,dt=arguments.length,xt=new Array(dt>1?dt-1:0),St=1;St<dt;St++)xt[St-1]=arguments[St];(Le=console).error.apply(Le,[Se].concat(xt))},it=e(9996),tt=e.n(it),et=function(Se,Le,dt){return Le};function Ve(Te,Se,Le){return tt()(Te,Se,Z()({arrayMerge:et},Le))}var Ze=e(26855),ct=function(Se){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"info",dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:5e3;Ze.ZP[Le]({message:Se,duration:dt})},ut=e(55252),ht=e(8150);function Vt(Te,Se){if(typeof Te>"u"||Te===null||Te==="")return"";var Le=(0,ut.NX)(Se);return(0,ht.FH)(String(Te),".",Le)}var Ot=e(15009),en=e.n(Ot),cn=e(99289),mn=e.n(cn),fn=e(36968),Xt=e.n(fn),Zn=e(30381),on=e.n(Zn),Mn=/^\s*\{\{([\s\S]*)\}\}\s*$/;function jn(Te){return Te&&Te.constructor&&typeof Te.constructor.isBuffer=="function"&&Te.constructor.isBuffer(Te)}function Ln(Te){return Te}function Tn(Te,Se){Se=Se||{};var Le=Se.delimiter||".",dt=Se.maxDepth,xt=Se.transformKey||Ln,St=Se.transformValue||Ln,wt={};function In(kn,or,Xn){Xn=Xn||1,a().isObjectLike(kn)&&Object.keys(kn).forEach(function(nr){var Er,Fr,Ur=kn[nr],br=Se.safe&&Array.isArray(Ur),Jr=Object.prototype.toString.call(Ur),mr=jn(Ur),Wr=Jr==="[object Object]"||Jr==="[object Array]",Lr=or?or+Le+xt(nr):xt(nr);if((Er=(Fr=Se).breakOn)!==null&&Er!==void 0&&Er.call(Fr,{key:nr,value:Ur,path:Lr})){wt[Lr]=St(Ur,Lr);return}if(!br&&!mr&&Wr&&Object.keys(Ur).length&&(!Se.maxDepth||Xn<dt))return In(Ur,Lr,Xn+1);wt[Lr]=St(Ur,Lr)})}return In(Te),wt}function Gn(Te){for(var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le={},dt=Se.transformValue||Ln,xt=0,St=Object.keys(Te);xt<St.length;xt++){var wt=St[xt];Xt()(Le,wt,dt(Te[wt],wt))}return Le}var Yn=function(Se){var Le=Se.split(".").pop()||"";return Le.startsWith("$")||(Le=""),{operator:Le}},_n=function(Se){return["$dateOn","$dateNotOn","$dateBefore","$dateAfter","$dateNotBefore","$dateNotAfter","$dateBetween"].includes(Se)};function Kt(Te){return Te instanceof Date||Object.prototype.toString.call(Te)==="[object Date]"}var zt=function(Se,Le){if(!Se)return null;if(Se.type&&(Se=U(Z()(Z()({},Se),{},{timezone:Le}))),Array.isArray(Se))return Se.length===2?Se.push("[]",Le):Se.length===3&&Se.push(Le),Se;if(typeof Se=="string")return!Le||/(\+|-)\d\d:\d\d$/.test(Se)?Se:Se+Le;if(Kt(Se))return Se.toISOString()},Yt=function(){var Te=mn()(en()().mark(function Se(Le){var dt,xt,St,wt,In,kn,or,Xn,nr=arguments;return en()().wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:if(dt=nr.length>1&&nr[1]!==void 0?nr[1]:{},xt=new Set,St=dt.vars||{},wt=dt.timezone,In=dt.now,kn=dt.getField,or=Tn(Le,{breakOn:function(br){var Jr=br.key;return Jr.startsWith("$")&&Jr!=="$and"&&Jr!=="$or"},transformValue:function(br){if(typeof br!="string")return br;var Jr=Mn.exec(br);if(Jr){var mr=Jr[1].trim();mr.startsWith("$user")&&xt.add(mr.substring(6))}return br}}),!(xt.size>0)){Fr.next=12;break}return Fr.next=10,St.$user({fields:oe()(xt.values())});case 10:Xn=Fr.sent,Object.assign(St,{$user:Xn});case 12:return Fr.abrupt("return",Gn(or,{transformValue:function(br,Jr){var mr=Yn(Jr),Wr=mr.operator;if(typeof br=="string"){var Lr=Mn.exec(br);if(Lr){var eo=Lr[1].trim(),fo=tn(St,eo,null),Lo=kn==null?void 0:kn(Jr);br=typeof fo=="function"?fo==null?void 0:fo({field:Lo,operator:Wr,timezone:wt,now:In}):fo}}if(_n(Wr)){var zr=kn==null?void 0:kn(Jr);return(zr==null?void 0:zr.constructor.name)==="DateOnlyField"||(zr==null?void 0:zr.constructor.name)==="DatetimeNoTzField"?br.type?U(Z()(Z()({},br),{},{timezone:(zr==null?void 0:zr.timezone)||wt})):br:zt(br,(zr==null?void 0:zr.timezone)||wt)}return br}}));case 13:case"end":return Fr.stop()}},Se)}));return function(Le){return Te.apply(this,arguments)}}();function Dn(Te){var Se=Te.now,Le=Te.timezone,dt=Le===void 0?"+00:00":Le,xt=Te.offset,St=yn(Se).utcOffset(Ye(dt));return xt>0?[(St=St.add(1,"day").startOf("day")).format("YYYY-MM-DD"),St.clone().add(xt,"day").startOf("day").format("YYYY-MM-DD"),"[)",dt]:[St.clone().subtract(-1*xt-1,"day").startOf("day").format("YYYY-MM-DD"),St.clone().add(1,"day").startOf("day").format("YYYY-MM-DD"),"[)",dt]}function yn(Te){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Te?l().isDayjs(Te)?Te:Se?on()(Te):l()(Te):Se?on()():l()()}function xn(Te){var Se,Le=Te.now,dt=Te.unit,xt=Te.timezone,St=xt===void 0?"+00:00":xt,wt=Te.offset,In=yn(Le,dt==="isoWeek");In=In.utcOffset(Ye(St)),In=In.startOf(dt),wt>0?In=In.add(wt,dt):wt<0&&(In=In.subtract(-1*wt,dt));var kn={year:function(){return In.format("YYYY")},quarter:function(){return In.format("YYYY[Q]Q")},month:function(){return In.format("YYYY-MM")},week:function(){return In.format("gggg[w]ww")},isoWeek:function(){return In.format("GGGG[W]WW")},day:function(){return In.format("YYYY-MM-DD")}},or=(Se=kn[dt])===null||Se===void 0?void 0:Se.call(kn);return St?or+St:or}var En=function(Se,Le){return function(dt){var xt=dt.now,St=dt.timezone,wt=dt.field;return wt!=null&&wt.timezone&&(St=wt==null?void 0:wt.timezone),xn({now:xt,timezone:St,unit:Se,offset:Le})}},Pn=function(Se){return function(Le){var dt=Le.now,xt=Le.timezone,St=Le.field;return St!=null&&St.timezone&&(xt=St==null?void 0:St.timezone),Dn({now:dt,timezone:xt,offset:Se})}};function Wn(){return{now:new Date().toISOString(),today:En("day"),yesterday:En("day",-1),tomorrow:En("day",1),thisWeek:En("week"),lastWeek:En("week",-1),nextWeek:En("week",1),thisIsoWeek:En("isoWeek"),lastIsoWeek:En("isoWeek",-1),nextIsoWeek:En("isoWeek",1),thisMonth:En("month"),lastMonth:En("month",-1),nextMonth:En("month",1),thisQuarter:En("quarter"),lastQuarter:En("quarter",-1),nextQuarter:En("quarter",1),thisYear:En("year"),lastYear:En("year",-1),nextYear:En("year",1),last7Days:Pn(-7),next7Days:Pn(7),last30Days:Pn(-30),next30Days:Pn(30),last90Days:Pn(-90),next90Days:Pn(90)}}function vr(Te){var Se=Te.split(".");return[Se.shift(),Se.join(".")]}var pn=function(){function Te(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{override:!1};V()(this,Te),L()(this,"map",new Map),L()(this,"options",void 0),this.options=Se}return ne()(Te,[{key:"register",value:function(Le,dt){if(!this.options.override&&this.map.has(Le))throw new Error('this registry does not allow to override existing keys: "'.concat(Le,'"'));this.map.set(Le,dt)}},{key:"get",value:function(Le){return this.map.get(Le)}},{key:"getKeys",value:function(){return this.map.keys()}},{key:"getValues",value:function(){return this.map.values()}},{key:"getEntities",value:function(){return this.map.entries()}}]),Te}(),Rt=null;function Ae(Te,Se){return Se?"{{t(".concat(JSON.stringify(Te),", ").concat(JSON.stringify(Se),")}}"):"{{t(".concat(JSON.stringify(Te),")}}")}var mt=function(Se){for(;Se;){var Le;if(Se.id==="root"||(Le=Se.classList)!==null&&Le!==void 0&&Le.contains("nb-action"))return!1;Se=Se.parentNode}return!{NODE_ENV:"production",PUBLIC_PATH:"auto"}.__TEST__};function ft(Te,Se){return Te.replace(/\{\{(\w+)\}\}/g,function(Le,dt){return typeof Se[dt]<"u"?Se[dt]:Le})}for(var nt=36,lt="";nt--;)lt+=nt.toString(36);function Ut(Te){for(var Se="",Le=Te||11;Le--;)Se+=lt[Math.random()*36|0];return Se}function vn(Te){var Se;try{Se=new URL(Te)}catch{return!1}return Se.protocol==="http:"||Se.protocol==="https:"}var qt=e(33833),Nn=JSON.parse('{"i8":"2.0.0-alpha.11"}'),$n=function Te(Se,Le){if(!Se)return Se;if(Se["x-component"]!=="Grid")return Object.keys(Se.properties||{}).forEach(function(Xn){Se.properties[Xn]=Te(Se.properties[Xn],Le)}),Se;var dt=Se.parent;Se.toJSON?Se=Se.toJSON():Se=a().cloneDeep(Se);var xt={},St=Se,wt=St.properties,In=wt===void 0?{}:wt,kn=0;if(Object.keys(In).forEach(function(Xn,nr){var Er=In[Xn];if(Er["x-component"]!=="Grid.Row"){Er["x-index"]=++kn,xt[Xn]=Er;return}if(Er.properties){if(Object.keys(Er.properties).length===1){Er["x-index"]=++kn,xt[Xn]=Er;return}Object.keys(Er.properties).forEach(function(Fr,Ur){var br=Er.properties[Fr];if(a().set(br,"x-component-props.width",100),Ur===0){Er["x-index"]=++kn,xt[Xn]=Er;return}Le!=null&&Le(br)||(delete Er.properties[Fr],xt["".concat(Ut(),"_").concat(Fr)]=sr(br,Fr,++kn))})}}),Se.properties=xt,dt){var or=new qt.Schema(Se,dt);return dt.properties&&Object.keys(dt.properties).forEach(function(Xn){Xn===Se.name&&(dt.properties[Xn]=or)}),or}return Se};function sr(Te,Se,Le){return{type:"void",version:"2.0","x-component":"Grid.Row","x-app-version":Nn.i8,"x-uid":Ut(),"x-async":!1,"x-index":Le,_isJSONSchemaObject:!0,properties:L()({},Se,Te)}}function Qt(Te){var Se=new Set,Le=function dt(xt){if(typeof xt=="string")for(var St=/\{\{\s*([^}]+?)\s*\}\}/g,wt;(wt=St.exec(xt))!==null;){for(var In=wt[1],kn=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)/g,or=void 0;(or=kn.exec(In))!==null;)Se.add(or[1]);for(var Xn=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]/g,nr=void 0;(nr=Xn.exec(In))!==null;)Se.add(nr[2])}else Array.isArray(xt)?xt.forEach(dt):xt&&ie()(xt)==="object"&&Object.values(xt).forEach(dt)};return Le(Te),Se}function Ft(Te){var Se={},Le=function dt(xt){if(typeof xt=="string")for(var St=/\{\{\s*([^}]+?)\s*\}\}/g,wt;(wt=St.exec(xt))!==null;){for(var In=wt[1],kn=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)([^\s)]*)/g,or=void 0;(or=kn.exec(In))!==null;){var Xn=or[1],nr=or[2]||"";if(Se[Xn]=Se[Xn]||[],nr.startsWith("."))Se[Xn].push(nr.slice(1));else if(nr.startsWith("[")){var Er=nr.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(Er){var Fr=Er[2],Ur=Er[3]||"";Se[Xn].push("".concat(Fr).concat(Ur))}else{var br=nr.match(/^\[(\d+)\](.*)$/);if(br){var Jr=br[1],mr=br[2]||"";Se[Xn].push("[".concat(Jr,"]").concat(mr))}}}else nr.startsWith("(")&&(Se[Xn].length||Se[Xn].push(""))}for(var Wr=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]([^\s)]*)/g,Lr=void 0;(Lr=Wr.exec(In))!==null;){var eo=Lr[2],fo=Lr[3]||"";if(Se[eo]=Se[eo]||[],fo.startsWith("."))Se[eo].push(fo.slice(1));else if(fo.startsWith("[")){var Lo=fo.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(Lo){var zr=Lo[2],Ao=Lo[3]||"";Se[eo].push("".concat(zr).concat(Ao))}else{var vo=fo.match(/^\[(\d+)\](.*)$/);if(vo){var lo=vo[1],Do=vo[2]||"";Se[eo].push("[".concat(lo,"]").concat(Do))}}}else fo.startsWith("(")&&(Se[eo].length||Se[eo].push(""))}}else Array.isArray(xt)?xt.forEach(dt):xt&&ie()(xt)==="object"&&Object.values(xt).forEach(dt)};return Le(Te),Se}},14994:function(){"use strict"},40408:function(_t,ve,e){var q={"./af":[15903,4920],"./af.js":[15903,4920],"./am":[29911,4920],"./am.js":[29911,4920],"./ar":[63939,4920],"./ar-dz":[47200,4920],"./ar-dz.js":[47200,4920],"./ar-iq":[87719,4920],"./ar-iq.js":[87719,4920],"./ar-kw":[62376,4920],"./ar-kw.js":[62376,4920],"./ar-ly":[48540,4920],"./ar-ly.js":[48540,4920],"./ar-ma":[96817,4920],"./ar-ma.js":[96817,4920],"./ar-sa":[11573,4920],"./ar-sa.js":[11573,4920],"./ar-tn":[99339,4920],"./ar-tn.js":[99339,4920],"./ar.js":[63939,4920],"./az":[88092,4920],"./az.js":[88092,4920],"./be":[60504,4920],"./be.js":[60504,4920],"./bg":[19091,4920],"./bg.js":[19091,4920],"./bi":[19149,4920],"./bi.js":[19149,4920],"./bm":[15287,4920],"./bm.js":[15287,4920],"./bn":[35254,4920],"./bn-bd":[61177,4920],"./bn-bd.js":[61177,4920],"./bn.js":[35254,4920],"./bo":[52502,4920],"./bo.js":[52502,4920],"./br":[8864,4920],"./br.js":[8864,4920],"./bs":[4502,4920],"./bs.js":[4502,4920],"./ca":[33646,4920],"./ca.js":[33646,4920],"./cs":[98507,4920],"./cs.js":[98507,4920],"./cv":[16636,4920],"./cv.js":[16636,4920],"./cy":[28792,4920],"./cy.js":[28792,4920],"./da":[17427,4920],"./da.js":[17427,4920],"./de":[80790,4920],"./de-at":[73237,4920],"./de-at.js":[73237,4920],"./de-ch":[16148,4920],"./de-ch.js":[16148,4920],"./de.js":[80790,4920],"./dv":[11794,4920],"./dv.js":[11794,4920],"./el":[65423,4920],"./el.js":[65423,4920],"./en":[25054,4920],"./en-au":[85109,4920],"./en-au.js":[85109,4920],"./en-ca":[55105,4920],"./en-ca.js":[55105,4920],"./en-gb":[99517,4920],"./en-gb.js":[99517,4920],"./en-ie":[30758,4920],"./en-ie.js":[30758,4920],"./en-il":[95805,4920],"./en-il.js":[95805,4920],"./en-in":[88529,4920],"./en-in.js":[88529,4920],"./en-nz":[50302,4920],"./en-nz.js":[50302,4920],"./en-sg":[35941,4920],"./en-sg.js":[35941,4920],"./en-tt":[46183,4920],"./en-tt.js":[46183,4920],"./en.js":[25054,4920],"./eo":[74990,4920],"./eo.js":[74990,4920],"./es":[67763,4920],"./es-do":[3864,4920],"./es-do.js":[3864,4920],"./es-mx":[37118,4920],"./es-mx.js":[37118,4920],"./es-pr":[23521,4920],"./es-pr.js":[23521,4920],"./es-us":[36165,4920],"./es-us.js":[36165,4920],"./es.js":[67763,4920],"./et":[99670,4920],"./et.js":[99670,4920],"./eu":[20837,4920],"./eu.js":[20837,4920],"./fa":[81379,4920],"./fa.js":[81379,4920],"./fi":[47822,4920],"./fi.js":[47822,4920],"./fo":[69197,4920],"./fo.js":[69197,4920],"./fr":[96023,4920],"./fr-ca":[77989,4920],"./fr-ca.js":[77989,4920],"./fr-ch":[54254,4920],"./fr-ch.js":[54254,4920],"./fr.js":[96023,4920],"./fy":[93220,4920],"./fy.js":[93220,4920],"./ga":[47467,4920],"./ga.js":[47467,4920],"./gd":[54855,4920],"./gd.js":[54855,4920],"./gl":[90229,4920],"./gl.js":[90229,4920],"./gom-latn":[46312,4920],"./gom-latn.js":[46312,4920],"./gu":[87632,4920],"./gu.js":[87632,4920],"./he":[76875,4920],"./he.js":[76875,4920],"./hi":[77573,4920],"./hi.js":[77573,4920],"./hr":[96257,4920],"./hr.js":[96257,4920],"./ht":[98889,4920],"./ht.js":[98889,4920],"./hu":[68562,4920],"./hu.js":[68562,4920],"./hy-am":[38242,4920],"./hy-am.js":[38242,4920],"./id":[83783,4920],"./id.js":[83783,4920],"./index.d":[46990,4920],"./index.d.ts":[46990,4920],"./is":[98980,4920],"./is.js":[98980,4920],"./it":[15551,4920],"./it-ch":[83706,4920],"./it-ch.js":[83706,4920],"./it.js":[15551,4920],"./ja":[76831,4920],"./ja.js":[76831,4920],"./jv":[42641,4920],"./jv.js":[42641,4920],"./ka":[46622,4920],"./ka.js":[46622,4920],"./kk":[32921,4920],"./kk.js":[32921,4920],"./km":[45567,4920],"./km.js":[45567,4920],"./kn":[21113,4920],"./kn.js":[21113,4920],"./ko":[19132,4920],"./ko.js":[19132,4920],"./ku":[94888,4920],"./ku.js":[94888,4920],"./ky":[60466,4920],"./ky.js":[60466,4920],"./lb":[91796,4920],"./lb.js":[91796,4920],"./lo":[68894,4920],"./lo.js":[68894,4920],"./lt":[78768,4920],"./lt.js":[78768,4920],"./lv":[30953,4920],"./lv.js":[30953,4920],"./me":[18066,4920],"./me.js":[18066,4920],"./mi":[68602,4920],"./mi.js":[68602,4920],"./mk":[51560,4920],"./mk.js":[51560,4920],"./ml":[4017,4920],"./ml.js":[4017,4920],"./mn":[94717,4920],"./mn.js":[94717,4920],"./mr":[15473,4920],"./mr.js":[15473,4920],"./ms":[43986,4920],"./ms-my":[77387,4920],"./ms-my.js":[77387,4920],"./ms.js":[43986,4920],"./mt":[28477,4920],"./mt.js":[28477,4920],"./my":[62966,4920],"./my.js":[62966,4920],"./nb":[19682,4920],"./nb.js":[19682,4920],"./ne":[14149,4920],"./ne.js":[14149,4920],"./nl":[99182,4920],"./nl-be":[37496,4920],"./nl-be.js":[37496,4920],"./nl.js":[99182,4920],"./nn":[92722,4920],"./nn.js":[92722,4920],"./oc-lnc":[76159,4920],"./oc-lnc.js":[76159,4920],"./pa-in":[35914,4920],"./pa-in.js":[35914,4920],"./pl":[81987,4920],"./pl.js":[81987,4920],"./pt":[15001,4920],"./pt-br":[57548,4920],"./pt-br.js":[57548,4920],"./pt.js":[15001,4920],"./rn":[123,4920],"./rn.js":[123,4920],"./ro":[18146,4920],"./ro.js":[18146,4920],"./ru":[70600,4920],"./ru.js":[70600,4920],"./rw":[6509,4920],"./rw.js":[6509,4920],"./sd":[65437,4920],"./sd.js":[65437,4920],"./se":[772,4920],"./se.js":[772,4920],"./si":[77109,4920],"./si.js":[77109,4920],"./sk":[35627,4920],"./sk.js":[35627,4920],"./sl":[82544,4920],"./sl.js":[82544,4920],"./sq":[88341,4920],"./sq.js":[88341,4920],"./sr":[50617,4920],"./sr-cyrl":[37101,4920],"./sr-cyrl.js":[37101,4920],"./sr.js":[50617,4920],"./ss":[64127,4920],"./ss.js":[64127,4920],"./sv":[91876,4920],"./sv-fi":[19911,4920],"./sv-fi.js":[19911,4920],"./sv.js":[91876,4920],"./sw":[46148,4920],"./sw.js":[46148,4920],"./ta":[55596,4920],"./ta.js":[55596,4920],"./te":[45159,4920],"./te.js":[45159,4920],"./tet":[99157,4920],"./tet.js":[99157,4920],"./tg":[9928,4920],"./tg.js":[9928,4920],"./th":[62019,4920],"./th.js":[62019,4920],"./tk":[75817,4920],"./tk.js":[75817,4920],"./tl-ph":[46513,4920],"./tl-ph.js":[46513,4920],"./tlh":[97296,4920],"./tlh.js":[97296,4920],"./tr":[73035,4920],"./tr.js":[73035,4920],"./types.d":[63799,4920],"./types.d.ts":[63799,4920],"./tzl":[57797,4920],"./tzl.js":[57797,4920],"./tzm":[84722,4920],"./tzm-latn":[30261,4920],"./tzm-latn.js":[30261,4920],"./tzm.js":[84722,4920],"./ug-cn":[80313,4920],"./ug-cn.js":[80313,4920],"./uk":[64144,4920],"./uk.js":[64144,4920],"./ur":[92957,4920],"./ur.js":[92957,4920],"./uz":[7486,4920],"./uz-latn":[98727,4920],"./uz-latn.js":[98727,4920],"./uz.js":[7486,4920],"./vi":[37553,4920],"./vi.js":[37553,4920],"./x-pseudo":[55321,4920],"./x-pseudo.js":[55321,4920],"./yo":[14724,4920],"./yo.js":[14724,4920],"./zh":[32009,4920],"./zh-cn":[33852],"./zh-cn.js":[33852],"./zh-hk":[2390,4920],"./zh-hk.js":[2390,4920],"./zh-tw":[43901,4920],"./zh-tw.js":[43901,4920],"./zh.js":[32009,4920]};function a(X){if(!e.o(q,X))return Promise.resolve().then(function(){var m=new Error("Cannot find module '"+X+"'");throw m.code="MODULE_NOT_FOUND",m});var l=q[X],P=l[0];return Promise.all(l.slice(1).map(e.e)).then(function(){return e.t(P,23)})}a.keys=function(){return Object.keys(q)},a.id=40408,_t.exports=a},79595:function(_t){function ve(e){return Promise.resolve().then(function(){var q=new Error("Cannot find module '"+e+"'");throw q.code="MODULE_NOT_FOUND",q})}ve.keys=function(){return[]},ve.resolve=ve,ve.id=79595,_t.exports=ve},59816:function(){},24654:function(){},95506:function(){},75347:function(){},31777:function(){},34017:function(){},59905:function(){},64604:function(){},75042:function(){}}]);
|