@nocobase/client 2.2.0-beta.8 → 2.3.0-alpha.1

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.
package/es/index.mjs CHANGED
@@ -8,7 +8,7 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
8
8
  }
9
9
  }
10
10
  }
11
- `},83249(e,t,o){o.d(t,{_T:()=>l.AIManager,eY:()=>l.DefaultToolsManager,f:()=>l.toToolsMap});var l=o(13975)},51771(e,t,o){o.d(t,{IK:()=>p,P4:()=>c,Rk:()=>m,j:()=>h});var l=o(71178),n=o(63526),a=o(52793),r=o(51649),i=o(77843),s=o(16211),d=o(83468),u=o(60422);let c=(0,r.createContext)({});c.displayName="AppLangContext";let p=()=>(0,r.useContext)(c);function m(e){var t;let{remoteLocale:o,...r}=e,d=(0,s.VB)(),{i18n:p}=(0,i.useTranslation)(),{data:m,loading:h}=(0,s.bP)({url:"app:getLang",params:{locale:d.auth.locale}},{onSuccess(e){var t,o,l,a,r,i;let s=d.auth.locale;(null==e||null==(t=e.data)?void 0:t.lang)&&!s&&(d.auth.setLocale(null==e||null==(r=e.data)?void 0:r.lang),p.changeLanguage(null==e||null==(i=e.data)?void 0:i.lang)),Object.keys((null==e||null==(o=e.data)?void 0:o.resources)||{}).forEach(t=>{var o,l;p.addResources(null==e||null==(o=e.data)?void 0:o.lang,t,(null==e||null==(l=e.data)?void 0:l.resources[t])||{})}),(0,u.M)(null==e?void 0:e.data),n.dayjs.locale(null==e||null==(l=e.data)?void 0:l.moment),window.cronLocale=null==e||null==(a=e.data)?void 0:a.cron},manual:!o});return h?(0,l.jsx)("div",{style:{textAlign:"center",marginTop:20},children:(0,l.jsx)(a.Spin,{})}):(0,l.jsx)(c.Provider,{value:null==m?void 0:m.data,children:(0,l.jsx)(a.ConfigProvider,{popupMatchSelectWidth:!1,...r,locale:(null==m||null==(t=m.data)?void 0:t.antd)||{},children:e.children})})}class h extends d.k{async load(){var e;this.app.use(m,(null==(e=this.options)?void 0:e.config)||{})}}},60422(e,t,o){o.d(t,{M:()=>a});var l=o(31515);class n{atX0SecondsPastTheMinuteGt20(){return this.data.atX0SecondsPastTheMinuteGt20}atX0MinutesPastTheHourGt20(){return this.data.atX0MinutesPastTheHourGt20}commaMonthX0ThroughMonthX1(){return this.data.commaMonthX0ThroughMonthX1}commaYearX0ThroughYearX1(){return this.data.commaYearX0ThroughYearX1}use24HourTimeFormatByDefault(){return this.data.use24HourTimeFormatByDefault}anErrorOccuredWhenGeneratingTheExpressionD(){return this.data.anErrorOccuredWhenGeneratingTheExpressionD}everyMinute(){return this.data.everyMinute}everyHour(){return this.data.everyHour}atSpace(){return this.data.atSpace}everyMinuteBetweenX0AndX1(){return this.data.everyMinuteBetweenX0AndX1}at(){return this.data.at}spaceAnd(){return this.data.spaceAnd}everySecond(){return this.data.everySecond}everyX0Seconds(){return this.data.everyX0Seconds}secondsX0ThroughX1PastTheMinute(){return this.data.secondsX0ThroughX1PastTheMinute}atX0SecondsPastTheMinute(){return this.data.atX0SecondsPastTheMinute}everyX0Minutes(){return this.data.everyX0Minutes}minutesX0ThroughX1PastTheHour(){return this.data.minutesX0ThroughX1PastTheHour}atX0MinutesPastTheHour(){return this.data.atX0MinutesPastTheHour}everyX0Hours(){return this.data.everyX0Hours}betweenX0AndX1(){return this.data.betweenX0AndX1}atX0(){return this.data.atX0}commaEveryDay(){return this.data.commaEveryDay}commaEveryX0DaysOfTheWeek(){return this.data.commaEveryX0DaysOfTheWeek}commaX0ThroughX1(){return this.data.commaX0ThroughX1}commaAndX0ThroughX1(){return this.data.commaAndX0ThroughX1}first(){return this.data.first}second(){return this.data.second}third(){return this.data.third}fourth(){return this.data.fourth}fifth(){return this.data.fifth}commaOnThe(){return this.data.commaOnThe}spaceX0OfTheMonth(){return this.data.spaceX0OfTheMonth}lastDay(){return this.data.lastDay}commaOnTheLastX0OfTheMonth(){return this.data.commaOnTheLastX0OfTheMonth}commaOnlyOnX0(){return this.data.commaOnlyOnX0}commaAndOnX0(){return this.data.commaAndOnX0}commaEveryX0Months(){return this.data.commaEveryX0Months}commaOnlyInX0(){return this.data.commaOnlyInX0}commaOnTheLastDayOfTheMonth(){return this.data.commaOnTheLastDayOfTheMonth}commaOnTheLastWeekdayOfTheMonth(){return this.data.commaOnTheLastWeekdayOfTheMonth}commaDaysBeforeTheLastDayOfTheMonth(){return this.data.commaDaysBeforeTheLastDayOfTheMonth}firstWeekday(){return this.data.firstWeekday}weekdayNearestDayX0(){return this.data.weekdayNearestDayX0}commaOnTheX0OfTheMonth(){return this.data.commaOnTheX0OfTheMonth}commaEveryX0Days(){return this.data.commaEveryX0Days}commaBetweenDayX0AndX1OfTheMonth(){return this.data.commaBetweenDayX0AndX1OfTheMonth}commaOnDayX0OfTheMonth(){return this.data.commaOnDayX0OfTheMonth}commaEveryHour(){return this.data.commaEveryHour}commaEveryX0Years(){return this.data.commaEveryX0Years}commaStartingX0(){return this.data.commaStartingX0}daysOfTheWeek(){return this.data.daysOfTheWeek}monthsOfTheYear(){return this.data.monthsOfTheYear}constructor(e){this.data=e}}let a=e=>{(l.default.default?l.default.default:l.default).initialize({load(t){t[null==e?void 0:e.lang]=new n(null==e?void 0:e.cronstrue)}})}},26351(e,t,o){o.d(t,{n:()=>a});var l=o(71178);o(51649);var n=o(22932);let a=e=>{let{apiClient:t,children:o}=e;return(0,l.jsx)(n.j.Provider,{value:t,children:o})}},22932(e,t,o){o.d(t,{j:()=>l});let l=(0,o(51649).createContext)(null);l.displayName="APIClientContext"},24(e,t,o){o.d(t,{V:()=>r});var l=o(51649),n=o(22932),a=o(16716);function r(){let e=(0,a.n)();return(0,l.useContext)(n.j)||e.apiClient}},16211(e,t,o){o.d(t,{nd:()=>f.n,j8:()=>g.j,Q9:()=>_,VB:()=>l.V,bP:()=>c,qK:()=>p});var l=o(24),n=o(27404),a=o(71883),r=o(13791),i=o(51649),s=o(63526),d=o(27741);let u=new Map;function c(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[s,d]=(0,a.useSetState)({}),c=(0,l.V)();t="function"==typeof e?e:e?async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{resource:o,url:l}=e,a=(0,r.default)(e);o||l?(a.params=a.params||{},function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(e=>t.propertyIsEnumerable(e)):[]).forEach(l=>{let n=o[l],a=u.get("deepMerge");"function"==typeof n?a=n:"string"==typeof n&&u.has(n)&&(a=u.get(n)),e[l]=a(e[l],t[l])})}(a.params,t)):a=(0,n.merge)(a,t);let i=await c.request(a);return null==i?void 0:i.data}:async()=>{};let p={...o,onSuccess(){for(var e,t=arguments.length,l=Array(t),n=0;n<t;n++)l[n]=arguments[n];null==(e=o.onSuccess)||e.call(o,...l),o.uid&&(c.services[o.uid]=m)}},m=(0,a.useRequest)(t,p);return(0,i.useMemo)(()=>({...m,state:s,setState:d}),[m,d,s])}function p(e,t){return(0,l.V)().resource(e,t)}u.set("overwrite",(e,t)=>t),u.set("andMerge",(e,t)=>{if(e||t)return e?t?{$and:[e,t]}:e:t}),u.set("orMerge",(e,t)=>{if(e||t)return e?t?{$or:[e,t]}:e:t}),u.set("deepMerge",(e,t)=>(0,s.isPlainObject)(e)&&(0,s.isPlainObject)(t)?(0,eo.default)(e,t,{arrayMerge:(e,t)=>t}):t),u.set("merge",(e,t)=>(0,s.isPlainObject)(e)&&(0,s.isPlainObject)(t)?Object.assign(e,t):t),u.set("union",(e,t)=>("string"==typeof e&&(e=e.split(",")),"string"==typeof t&&(t=t.split(",")),(0,d.default)((e||[]).concat(t||[])))),u.set("intersect",(e,t)=>("string"==typeof e&&(e=e.split(",")),"string"==typeof t&&(t=t.split(",")),Array.isArray(e)&&0!==e.length)?Array.isArray(t)&&0!==t.length?e.filter(e=>t.includes(e)):e||[]:t||[]);var m=o(27697),h=o(52793);function x(e,t,o){var l;(null==t?void 0:t.length)&&o[e]({message:null==(l=t.map)?void 0:l.call(t,(e,t)=>i.default.createElement("div",{key:`${t}_${e.message}`},"string"==typeof e?e:e.message))})}let v=new Map;class _ extends m.APIClient{get notification(){var e,t;return(null==(t=this.app)||null==(e=t.context)?void 0:e.notification)||h.notification}cloneInstance(){let e=new _(this.options);e.options=this.options,e.services=this.services,e.storage=this.storage,e.app=this.app,e.auth=this.auth,e.storagePrefix=this.storagePrefix;let t=[];for(let l of this.axios.interceptors.response.handlers){var o;(null==l||null==(o=l.rejected)?void 0:o._name)==="handleNotificationError"?t.push({...l,rejected:e.handleNotificationError.bind(e)}):t.push(l)}return e.axios.interceptors.response.handlers=t,e}getHostname(){var e,t;if(process.env.API_BASE_URL)try{return new URL(process.env.API_BASE_URL).hostname}catch(e){}return null==(t=window)||null==(e=t.location)?void 0:e.hostname}getHeaders(){var e,t;let o,l,n=super.getHeaders(),a=null==(e=this.app)?void 0:e.getName();return a&&(n["X-App"]=a),n["X-Timezone"]=(o=Math.floor(Math.abs(t=-(new Date().getTimezoneOffset()/60))),l=Math.abs(t%1*60),(t>=0?"+":"-")+(o<10?"0":"")+o+":"+(l<10?"0":"")+l),n["X-Hostname"]=this.getHostname(),n}service(e){return this.services[e]}interceptors(){this.axios.interceptors.request.use(e=>{e.headers["X-With-ACL-Meta"]=!0;let t=this.getHeaders();return Object.keys(t).forEach(o=>{(0,m.hasHeaderValue)(e.headers,o)||(e.headers[o]=t[o])}),e}),super.interceptors(),this.useNotificationMiddleware(),this.axios.interceptors.response.use(e=>e,e=>{let t=this.toErrMessages(e);throw t.find(e=>"ROLE_NOT_FOUND_ERR"===e.code)&&(this.auth.setRole(null),window.location.reload()),t.find(e=>"TOKEN_INVALID"===e.code||"USER_LOCKED"===e.code)&&this.auth.setToken(null),t.find(e=>"ROLE_NOT_FOUND_FOR_USER"===e.code)&&(this.auth.setRole(null),window.location.reload()),e})}toErrMessages(e){var t,o,l,n,a,r,i,s,d,u,c;if("string"==typeof(null==e||null==(t=e.response)?void 0:t.data)){let t=document.createElement("div");t.innerHTML=null==e||null==(d=e.response)?void 0:d.data;let o=t.textContent||t.innerText;return o.includes("Error occurred while trying")||o.includes("502 Bad Gateway")?[{code:"APP_WARNING",message:o="The application may be starting up. Please try again later."}]:[{message:o}]}return(null==e||null==(l=e.response)||null==(o=l.data)?void 0:o.error)?[null==e||null==(c=e.response)||null==(u=c.data)?void 0:u.error]:(null==e||null==(a=e.response)||null==(n=a.data)?void 0:n.errors)||(null==e||null==(i=e.response)||null==(r=i.data)?void 0:r.messages)||(null==e||null==(s=e.response)?void 0:s.error)||[{message:e.message||"Server error"}]}async handleNotificationError(e){var t,o,l,n,a,r,i,s,d,u,c,p;if(this.silence)throw e;let m=null==(t=e.config)?void 0:t.skipNotify;if(m&&("function"==typeof m&&m(e)||!0===m))throw e;let h=null==e||null==(l=e.response)||null==(o=l.data)?void 0:o.redirectTo;if(h)return window.location.href=h;if((null==e||null==(a=e.response)||null==(n=a.data)?void 0:n.type)==="application/json"){let t;c=this.notification,(t=new FileReader).readAsText(null==e||null==(p=e.response)?void 0:p.data,"utf-8"),t.onload=function(){x("error",JSON.parse(t.result).errors,c)}}else{v.size>10&&v.clear();let t=!!(null==e||null==(s=e.response)||null==(i=s.data)||null==(r=i.error)?void 0:r.maintaining);if(this.app.maintaining!==t&&(this.app.maintaining=t),this.app.maintaining)throw this.app.error=null==e||null==(u=e.response)||null==(d=u.data)?void 0:d.error,e;this.app.error&&(this.app.error=null);let o=this.toErrMessages(e);if(0===(o=o.filter(e=>{let t=v.get(e.message);return!(t&&new Date().getTime()-t<500)&&(v.set(e.message,new Date().getTime()),!0)})).length)throw e;x("error",o,this.notification)}throw e}useNotificationMiddleware(){let e=this.handleNotificationError.bind(this);e._name="handleNotificationError",this.axios.interceptors.response.use(e=>{var t,o;return(null==(o=e.data)||null==(t=o.messages)?void 0:t.length)&&x("success",e.data.messages.filter(e=>{let t=v.get("string"==typeof e?e:e.message);return!(t&&new Date().getTime()-t<500)&&(v.set(e.message,new Date().getTime()),!0)}),this.notification),e},e)}silent(){let e=this.cloneInstance();return e.silence=!0,e}constructor(...e){super(...e),this.services={},this.silence=!1}}var f=o(26351),g=o(22932)},17103(e,t,o){o.d(t,{G0:()=>r,gL:()=>i,qm:()=>s});var l=o(71178),n=o(51649),a=o(16211);let r=(0,n.createContext)(null);r.displayName="CurrentAppInfoContext";let i=()=>(0,n.useContext)(r),s=e=>{let t=(0,a.bP)({url:"app:getInfo"});return(0,l.jsx)(r.Provider,{value:t.data,children:e.children})}},94702(e,t,o){o.d(t,{G0:()=>l.G0,gL:()=>l.gL,qm:()=>l.qm});var l=o(17103)},41897(e,t,o){o.d(t,{$Q:()=>j,$y:()=>Y,C1:()=>v,CR:()=>D,Cj:()=>_,EB:()=>m,JY:()=>T,Jr:()=>B,MJ:()=>A,MR:()=>c,bR:()=>d,dT:()=>L,es:()=>I,ol:()=>R,sn:()=>k,tu:()=>S,vx:()=>F,yh:()=>h,zd:()=>P});var l=o(71178),n=o(77583),a=o(51649),r=o(38356);let i=a.default.createContext(null);i.displayName="NavigateNoUpdateContext";let s=a.default.createContext(null);s.displayName="LocationNoUpdateContext";let d=a.default.createContext("");d.displayName="LocationSearchContext";let u=a.default.createContext(!1);u.displayName="IsAdminPageContext";let c=a.default.createContext("");c.displayName="CurrentPageUidContext";let p=a.default.createContext(!1);p.displayName="IsInSettingsPageContext";let m=a.default.createContext("");m.displayName="CurrentTabUidContext";let h=a.default.createContext(new URLSearchParams);h.displayName="SearchParamsContext";let x=a.default.createContext("");x.displayName="RouterBasenameContext";let v=a.default.createContext({isSubPageClosedByPageMenu:()=>!1,setFieldSchema:()=>{},reset:()=>{}});v.displayName="IsSubPageClosedByPageMenuContext";let _=e=>{let{children:t}=e,o=(0,r.useParams)(),i=(0,a.useRef)({}),[s,d]=(0,a.useState)(null),u=(0,a.useCallback)(()=>{var e,t;let l=n.default.isEmpty(o["*"])&&(null==s||null==(e=s["x-component-props"])?void 0:e.openMode)==="page"&&!!(null==(t=i.current["*"])?void 0:t.includes(s["x-uid"]));return i.current=o,l},[s,o]),c=(0,a.useCallback)(()=>{i.current={}},[]),p=(0,a.useMemo)(()=>({isSubPageClosedByPageMenu:u,setFieldSchema:d,reset:c}),[u,c]);return(0,l.jsx)(v.Provider,{value:p,children:t})},f=e=>{let{children:t}=e,o=(0,r.useHref)("/");return(0,l.jsx)(x.Provider,{value:o,children:t})},g=e=>{let{children:t}=e,[o]=(0,r.useSearchParams)();return(0,l.jsx)(h.Provider,{value:o,children:t})},b=e=>{let{children:t}=e,o=(0,r.useLocation)().pathname.includes("/settings");return(0,l.jsx)(p.Provider,{value:o,children:t})},y=e=>{let{children:t}=e,o=(0,r.useLocation)().pathname.startsWith("/admin");return(0,l.jsx)(u.Provider,{value:o,children:t})},S=e=>{let{children:t}=e,o=(0,r.useParams)();return(0,l.jsx)(c.Provider,{value:o.name,children:t})},k=e=>{let{children:t}=e,o=(0,r.useParams)();return(0,l.jsx)(m.Provider,{value:o.tabUid,children:t})},C=e=>{let{children:t}=e,o=(0,r.useNavigate)(),n=a.default.useRef(o);n.current=o;let s=a.default.useCallback((e,t)=>{n.current(e,t)},[]);return(0,l.jsx)(i.Provider,{value:s,children:t})},M=e=>{let{children:t}=e,o=(0,r.useLocation)(),n=a.default.useRef({});return(0,a.useEffect)(()=>{Object.assign(n.current,o)},[o]),(0,l.jsx)(s.Provider,{value:n.current,children:t})},w=e=>{let{children:t}=e,o=(0,r.useLocation)();return(0,l.jsx)(d.Provider,{value:o.search,children:t})},F=()=>a.default.useContext(i),P=()=>a.default.useContext(s),j=()=>a.default.useContext(d),A=()=>a.default.useContext(u),I=()=>a.default.useContext(c),T=()=>a.default.useContext(p),D=()=>a.default.useContext(m),L=()=>a.default.useContext(h),Y=()=>a.default.useContext(x),R=e=>{let{isSubPageClosedByPageMenu:t,setFieldSchema:o,reset:l}=a.default.useContext(v);return(0,a.useEffect)(()=>{o(e)},[e,o]),{isSubPageClosedByPageMenu:t,reset:l}},B=e=>{let{children:t}=e;return(0,l.jsx)(C,{children:(0,l.jsx)(M,{children:(0,l.jsx)(y,{children:(0,l.jsx)(w,{children:(0,l.jsx)(g,{children:(0,l.jsx)(f,{children:(0,l.jsx)(b,{children:t})})})})})})})}},83468(e,t,o){o.d(t,{k:()=>n});var l=o(13975);class n extends l.Plugin{}},34316(e,t,o){o.d(t,{g:()=>l});let l=(0,o(51649).createContext)(null);l.displayName="ApplicationContext"},90653(e,t,o){o.d(t,{nm:()=>l.n,$q:()=>s.$,vk:()=>n.v,nu:()=>r,K3:()=>d.K,i0:()=>s.i,rd:()=>i});var l=o(16716),n=o(82976),a=o(504);function r(e){let t=(0,l.n)(),o=(0,a.useFlowEngine)({throwError:!1});return(t||o.context.app).pm.get(e)}let i=()=>(0,l.n)().router;var s=o(45560),d=o(87879)},87879(e,t,o){o.d(t,{K:()=>n});var l=o(42536);let n=()=>{let{allowAll:e,snippets:t}=(0,l.v6)();return{allow:o=>{if(o){let l=(0,ep.default)().add(t);return e||l.ignores(o)}return!0}}}},16716(e,t,o){o.d(t,{n:()=>r});var l=o(504),n=o(51649),a=o(34316);let r=()=>{var e;let t=(0,n.useContext)(a.g),o=(0,l.useFlowEngine)({throwError:!1});return(null==o||null==(e=o.context)?void 0:e.app)||t||{}}},82976(e,t,o){o.d(t,{v:()=>r});var l=o(52793),n=o(51649),a=o(16716);let r=()=>{let e=(0,a.n)();return{render:(0,n.useCallback)(()=>{var t;return(null==e?void 0:e.renderComponent)?null==e||null==(t=e.renderComponent)?void 0:t.call(e,"AppSpin"):n.default.createElement(l.Spin)},[e])}}},45560(e,t,o){o.d(t,{$:()=>r,i:()=>i});var l=o(77583),n=o(51649),a=o(90653);let r=e=>{let t=(0,a.nm)(),o=(0,n.useMemo)(()=>t.getGlobalVar(e),[t,e]);if((0,l.isFunction)(o))try{return o()}catch(t){console.error(`Error calling global variable function for key: ${e}`,t);return}return o},i=e=>{let t=(0,a.nm)(),o=(0,n.useMemo)(()=>{var o;return null==t||null==(o=t.getGlobalVarCtx)?void 0:o.call(t,e)},[t,e]);if((0,l.isFunction)(o))try{return o()}catch(t){console.error(`Error calling global variable function for key: ${e}`,t);return}return o}},17157(e,t,o){o.d(t,{yh:()=>ep.yh,CR:()=>ep.CR,Yx:()=>ef.Yx,$q:()=>eD.$q,gc:()=>ef.gc,FE:()=>ef.FE,IN:()=>eN,rd:()=>eD.rd,zw:()=>ef.zw,eL:()=>ef.eL,Lm:()=>ef.Lm,S3:()=>ef.S3,gD:()=>eT.g,C1:()=>ep.C1,MR:()=>ep.MR,fx:()=>ef.fx,AK:()=>ef.AK,Ah:()=>eP.Ah,mh:()=>eP.mh,ZI:()=>ef.ZI,Zz:()=>eV,vx:()=>ep.vx,tu:()=>ep.tu,qX:()=>ef.qX,mz:()=>ea,yb:()=>ef.yb,JY:()=>ep.JY,KK:()=>ef.KK,dT:()=>ep.dT,q9:()=>ef.q9,nu:()=>eD.nu,Vr:()=>ef.Vr,EB:()=>ep.EB,ct:()=>em,vk:()=>eD.vk,wq:()=>eo,lg:()=>eA,y$:()=>eO.y,IF:()=>eE,OD:()=>eP.OD,JL:()=>ef.tu,vt:()=>ef.vt,Zk:()=>ef.Zk,z3:()=>ef.z3,k_:()=>eI.k,G8:()=>ef.G8,y6:()=>eq.y6,MJ:()=>ep.MJ,K3:()=>eD.K3,Jr:()=>ep.Jr,zd:()=>ep.zd,vr:()=>eP.vr,Z$:()=>ef.Z$,pi:()=>ez,es:()=>ep.es,RT:()=>eP.RT,$y:()=>ep.$y,ol:()=>ep.ol,KY:()=>eP.KY,$Q:()=>ep.$Q,s6:()=>eq.s6,__:()=>ef.__,OI:()=>eq.OI,$c:()=>e$.$,Cj:()=>ep.Cj,i0:()=>eD.i0,nm:()=>eD.nm,$l:()=>ef.$l,sn:()=>ep.sn,w$:()=>et,bR:()=>ep.bR,Bv:()=>eH,pZ:()=>ev,qt:()=>ef.qt,rR:()=>ef.rR,xd:()=>e_,C5:()=>eq.C5,e1:()=>ef.e1,PK:()=>eh,tJ:()=>el,NH:()=>ef.NH,G0:()=>ef.G0,T2:()=>eP.T2,wp:()=>ef.wp,Vf:()=>ef.Vf,Ix:()=>ef.Ix,dQ:()=>ef.dQ,IY:()=>ef.IY});var l=o(2314),n=o(13975),a=o(27697),r=o(93656),i=o(20148),s=o(16211),d=o(25739),u=o(42219),c=o(62248),p=o(32444),m=o(67574),h=o(7271),x=o(38693),v=o(41196),_=o(82113),f=o(38533),g=o(8198),b=o(10691),y=o(56220),S=o(44814),k=o(56920),C=o(27404),M=o(48849),w=o(83489),F=o(63526),P=o(504),j=o(71883),A=o(52793),I=o(76821),T=o(15636),D=o(23977),L=o(77583),Y=o(51649),R=o(7516),B=o(77843),N=o(38356),E=o(71178),$=o(44374);function z(e,t,o){e.define(t,()=>o),window.__nocobase_app_dev__&&(window.__nocobase_app_dev_deps__=window.__nocobase_app_dev_deps__||{},window.__nocobase_app_dev_deps__[t]=o)}var O=o(90995);let q=e=>{var t;let[o,l]=(0,j.useLocalStorageState)((t=e.appName)?`nocobase_${t}_designable`.toUpperCase():"NOCOBASE_DESIGNABLE",{defaultValue:!!e.designable});return(0,E.jsx)(O.OA,{...e,designable:o,onDesignableChange:e=>{l(e)}})},H=e=>"boolean"==typeof e.designable?(0,E.jsx)(O.OA,{...e}):(0,E.jsx)(q,{...e});function V(e){return("default"in e?e.default:void 0)||e}function U(e){return`${e}/client`}function G(e,t){window.__nocobase_app_dev_plugins__=window.__nocobase_app_dev_plugins__||{},window.__nocobase_app_dev_plugins__[e]=t}function K(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.requirejs.config({waitSeconds:120,paths:t.reduce((e,t)=>(e[t.packageName]=t.url,t.clientV2Url&&(e[`${t.packageName}/client-v2`]=t.clientV2Url),e),{})});let o=t.map(e=>e.packageName);return o.forEach(e=>{let t;t=U(e),window.define(t,["exports",e],function(e,o){Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(o).forEach(function(t){"__esModule"===t||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})}),G(t,e)})}),new Promise((l,n)=>{e.requirejs(o,function(){for(var e=arguments.length,o=Array(e),n=0;n<e;n++)o[n]=arguments[n];o.forEach((e,o)=>{e&&G(U(t[o].packageName),e)}),l(o.map((e,o)=>[t[o].name,(null==e?void 0:e.default)||e]).filter(e=>e[1]));let a=o.map((e,t)=>e?null:t).filter(e=>null!==e).map(e=>t[e].packageName);a.length>0&&console.error("[nocobase load plugin error]: These plugins do not have an `export.default` exported content or there is an error in the plugins. error plugins: \r\n%s",a.join(", \r\n"))},n)})}async function W(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];for(let o of J(e)){let e=await import(o.url),l=V(e);l&&(t.push([o.name,l]),Object.entries({[o.packageName]:e}).forEach(e=>{let[t,o]=e,l=U(t);window.define(l,()=>o),G(l,o)}))}return t}function J(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new Map(e.map(e=>[e.packageName,e])),o=[],l=new Set,n=new Set,a=e=>{if(!n.has(e.packageName)&&!l.has(e.packageName)){for(let o of(l.add(e.packageName),e.appDevDependencies||[])){let e=t.get(o);e&&a(e)}l.delete(e.packageName),n.add(e.packageName),o.push(e)}};return e.forEach(a),o}async function X(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[],l=[],n=async()=>{if(0===l.length)return;let t=await K(e,l);o.push(...t),l=[]};for(let e of J(t)){if("esm"===e.devMode){await n();let t=await W([e]);o.push(...t);continue}l.push(e)}return await n(),o}async function Z(e){let{requirejs:t,pluginData:o,devDynamicImport:l}=e;if(0===o.length)return[];let n=[],a={},r={};if(l){for await(let e of o){let t=await l(e.packageName);if(t){let o=V(t);n.push([e.name,o]),a[e.packageName]=o,r[e.packageName]=t}}Object.entries(r).forEach(e=>{let[t,o]=e,l=U(t);window.define(l,()=>o),G(l,o)})}let i=o.filter(e=>!a[e.packageName]),s=i.filter(e=>"esm"===e.devMode),d=i.filter(e=>"esm"!==e.devMode);if(0===s.length){if(0===d.length)return n;let e=await K(t,d);return n.push(...e),n}let u=await X(t,i);return n.push(...u),n}class Q extends n.PluginManager{getRemotePluginsRequestUrl(){return"pm:listEnabled"}async initRemotePlugins(){var e;let t=await this.app.apiClient.request({url:this.getRemotePluginsRequestUrl()}),o=(null==t||null==(e=t.data)?void 0:e.data)||[];for await(let[e,t]of(await Z({requirejs:this.app.requirejs,pluginData:o,devDynamicImport:this.app.devDynamicImport}))){let l=o.find(t=>t.name===e);await this.add(t,l)}}}var ee=o(60430);let et="admin.settings.",eo="/admin/settings/",el="pm.";class ea{renderIcon(e){return"string"==typeof e?(0,Y.createElement)(ee.In,{type:e}):e}clearCache(){this.cachedList={}}setAclSnippets(e){this.aclSnippets=e,this.clearCache()}getAclSnippet(e){let t=this.settings[e];return(null==t?void 0:t.skipAclConfigure)?null:(null==t?void 0:t.aclSnippet)?t.aclSnippet:`${el}${e}`}getRouteName(e){return`${et}${e}`}getRoutePath(e){return`${eo}${e.replaceAll(".","/")}`}add(e,t){this.clearCache();let o=e.split("."),l=o[0];this.settings[e]={...this.settings[e],Component:N.Outlet,...t,name:e,topLevelName:t.topLevelName||l},o.length>1&&(0,L.set)(this.settings,o.join(".children."),this.settings[e]),this.app.router.add(this.getRouteName(e),{path:this.getRoutePath(e),Component:this.settings[e].Component,componentLoader:this.settings[e].componentLoader})}remove(e){this.clearCache(),Object.keys(this.settings).forEach(t=>{t.startsWith(e)&&(delete this.settings[t],this.app.router.remove(`${et}${t}`))})}hasAuth(e){return!this.aclSnippets.includes(`!${this.getAclSnippet("*")}`)&&!1===this.aclSnippets.includes(`!${this.getAclSnippet(e)}`)}getSetting(e){return this.settings[e]}has(e){return!!this.hasAuth(e)&&!!this.getSetting(e)}get(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],o=this.hasAuth(e),l=this.getSetting(e);if(t&&!o||!l)return null;let n=Object.keys(l.children||{}).sort((e,t)=>e.localeCompare(t)).map(e=>this.get(l.children[e].name,t)).filter(Boolean).sort((e,t)=>((null==e?void 0:e.sort)||0)-((null==t?void 0:t.sort)||0)),{title:a,icon:r,aclSnippet:i,...s}=l;return{isTopLevel:e===l.topLevelName,...s,aclSnippet:this.getAclSnippet(e),title:a,isAllow:o,label:a,icon:this.renderIcon(r),path:this.getRoutePath(e),key:e,children:n.length?n:void 0}}getList(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=JSON.stringify(e);return this.cachedList[t]?this.cachedList[t]:this.cachedList[t]=Array.from(new Set(Object.values(this.settings).map(e=>e.topLevelName))).sort((e,t)=>e.localeCompare(t)).map(t=>this.get(t,e)).filter(Boolean).sort((e,t)=>((null==e?void 0:e.sort)||0)-((null==t?void 0:t.sort)||0))}getAclSnippets(){return Object.keys(this.settings).map(e=>this.getAclSnippet(e)).filter(Boolean)}constructor(e,t){this.settings={},this.aclSnippets=[],this.cachedList={},this.app=t,e&&Object.entries(e||{}).forEach(e=>{let[t,o]=e;this.add(t,o)})}}var ec=o(73518),ep=o(41897);let em=e=>{let{children:t}=e;return(0,E.jsx)(E.Fragment,{children:t})},eh=Y.default.memo(e=>(0,E.jsx)(N.UNSAFE_RouteContext.Provider,{value:{outlet:null,matches:[],isDataRoute:!1},children:(0,E.jsx)(N.UNSAFE_LocationContext.Provider,{value:null,children:e.children})}));function ex(e){let t,o,l,n,{app:a}=e;return t=(0,N.useParams)(),o=(0,N.useLocation)(),l=(0,N.useMatches)(),n=a.flowEngine,(0,Y.useEffect)(()=>{var e;let o=l[l.length-1];o&&(n.context._observableCache.route={name:o.id,pathname:o.pathname,path:(null==(e=o.handle)?void 0:e.path)||null,params:t})},[n.context,t,l]),(0,Y.useEffect)(()=>{n.context._observableCache.location=o},[n.context,o]),null}eh.displayName="RouterContextCleaner";class ev extends n.RouterManager{getRouterComponent(e){let{type:t="browser",...o}=this.options,l={hash:N.createHashRouter,browser:N.createBrowserRouter,memory:N.createMemoryRouter},n=this.getRoutesTree(),a=(0,Y.createContext)(null),r=()=>{let t=(0,Y.useContext)(a);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ex,{app:this.app}),(0,E.jsx)(ep.Jr,{children:(0,E.jsx)(t,{children:(0,E.jsxs)(ec.Ay,{children:[(0,E.jsx)(N.Outlet,{}),e]})})})]})};return this.router=l[t]([{element:(0,E.jsx)(r,{}),errorElement:(0,E.jsx)(()=>{throw(0,N.useRouteError)()},{}),children:n}],o),e=>{let{BaseLayout:t=em}=e;return(0,E.jsx)(a.Provider,{value:t,children:(0,E.jsx)(eh,{children:(0,E.jsx)(N.RouterProvider,{future:{v7_startTransition:!0},router:this.router})})})}}}function e_(e,t){return new ev(e,t)}var ef=o(96023),eg=o(12765),eb=o(94003),ey=o(72559),eS=o(82451),ek=o(17596),eC=o(90592),eM=o(60714),ew=o(73927),eF=o(40506),eP=o(31675),ej=o(87879);class eA extends n.BaseApplication{initRequireJs(){var e;super.initRequireJs(),this.requirejs&&(z(e=this.requirejs,"react",Y.default),z(e,"react-dom",R.default),z(e,"react/jsx-runtime",E.default),z(e,"react-router",eu),z(e,"react-router-dom",N),z(e,"antd",A),z(e,"antd-style",I),z(e,"@ant-design/icons",_),z(e,"@ant-design/cssinjs",v),z(e,"i18next",D),z(e,"react-i18next",B),z(e,"@formily/antd-v5",y),z(e,"@formily/core",S),z(e,"@formily/react",k),z(e,"@formily/shared",C),z(e,"@formily/json-schema",er),z(e,"@formily/reactive",l),z(e,"@formily/path",ei),z(e,"@formily/validator",M),z(e,"@formily/reactive-react",es),z(e,"@nocobase/utils",F),z(e,"@nocobase/utils/client",F),z(e,"@nocobase/client",$),z(e,"@nocobase/client/client",$),z(e,"@nocobase/evaluators",w),z(e,"@nocobase/evaluators/client",w),z(e,"@nocobase/sdk",a),z(e,"@nocobase/flow-engine",P),z(e,"@dnd-kit/core",f),z(e,"@dnd-kit/sortable",g),z(e,"axios",ed.default),z(e,"dayjs",F.dayjs),z(e,"lodash",L.default),z(e,"ahooks",j),z(e,"@emotion/css",b),z(e,"file-saver",T))}defineObservableState(){super.defineObservableState(),(0,l.define)(this,{loading:l.observable.ref})}createApiClient(e){let t=e.apiClient instanceof s.Q9?e.apiClient:new s.Q9({...e.apiClient,appName:this.options.name||(0,a.getSubAppName)(e.publicPath)});return t.app=this,t}createI18n(e){return e.i18n||h.Ru}createRouterManager(e){return new ev(e.router,this)}createPluginManager(e){return new Q(e.plugins,e.loadRemotePlugins,this)}createPluginSettingsManager(e){return new ea(e.pluginSettings,this)}getDefaultComponents(){return{...super.getDefaultComponents(),DataBlockProvider:p.T4,SchemaInitializerActionModal:eg.z,SchemaInitializerActionModalInternal:eg.Y,SchemaInitializerChildren:eb.Z,SchemaInitializerChild:eb.w,SchemaInitializerDivider:ey.Z,SchemaInitializerItem:eS.r,SchemaInitializerItemGroup:ek.G,SchemaInitializerItemGroupInternal:ek.t,SchemaInitializerItemInternal:eS.K,SchemaInitializerItems:eC.e,SchemaInitializerSelect:eM.S,SchemaInitializerSelectInternal:eM.V,SchemaInitializerSubMenu:ew.zw,SchemaInitializerSubMenuInternal:ew.gc,SchemaInitializerSwitch:eF.q,SchemaInitializerSwitchInternal:eF.N,CollectionField:u.J}}initializeExtendedState(){super.initializeExtendedState(),this.systemSettings=new n.SystemSettingsSource(this.apiClient),this.schemaSettingsManager=new eP.mh(this.options.schemaSettings,this),this.schemaInitializerManager=new ef.FE(this.options.schemaInitializers,this),this.dataSourceManager=new m.zA(this.options.dataSourceManager,this),this.loading=!0,this.hasLoadError=!1,this.locales=null}addCustomProviders(){this.use(s.nd,{apiClient:this.apiClient}),this.use(d.B),this.use(H,{designable:this.options.designable,appName:this.name,components:this.components,scope:this.scopes}),this.use(c.N,{dataSourceManager:this.dataSourceManager}),this.use(x.R)}getRootFallback(){return this.renderComponent("AppSpin",{app:this})}getCollectionManager(e){var t;return null==(t=this.dataSourceManager.getDataSource(e))?void 0:t.collectionManager}async load(){try{this.loading=!0,await this.loadWebSocket(),await this.pm.load(),await this.flowEngine.flowSettings.load()}catch(a){var e,t,o,l,n;this.hasLoadError=!0,(null==a||null==(l=a.response)||null==(o=l.data)||null==(t=o.errors)||null==(e=t[0])?void 0:e.code)==="BLOCKED_IP"&&(this.hasLoadError=!1),this.ws.enabled&&await new Promise(e=>{setTimeout(()=>e(null),1e3)}),this.error={code:"LOAD_ERROR",...null==(n=this.apiClient.toErrMessages(a))?void 0:n[0]},console.error(a,this.error)}this.loading=!1,this.updateFavicon()}async loadWebSocket(){this.eventBus.addEventListener("ws:message:authorized",()=>{this.setWsAuthorized(!0)}),this.ws.on("message",e=>{var t,o,l,n,a;let r=JSON.parse(e.data);if(null==r||null==(t=r.payload)?void 0:t.refresh)return void window.location.reload();if("notification"===r.type){null==(l=(a=this.context.notification)[(null==(n=r.payload)?void 0:n.type)||"info"])||l.call(a,{message:null==(o=r.payload)?void 0:o.message});return}if("maintaining"===r.type&&"APP_RUNNING"!==r.payload.code)this.setMaintaining(!0),this.error=r.payload;else{this.hasLoadError&&window.location.reload(),this.setMaintaining(!1),this.maintained=!0,this.error=null;let e=r.type;if(!e)return;let t=`ws:message:${e}`;this.eventBus.dispatchEvent(new CustomEvent(t,{detail:r.payload}))}}),this.ws.on("serverDown",()=>{this.maintaining=!0,this.maintained=!1}),this.ws.on("open",()=>{let e=this.apiClient.auth.token;e&&this.setTokenInWebSocket({token:e,authenticator:this.apiClient.auth.getAuthenticator()})}),this.ws.connect()}addScopes(e){this.scopes=(0,en.default)(this.scopes,e)}addFieldInterfaces(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaces(e)}addFieldInterfaceGroups(e){return this.dataSourceManager.addFieldInterfaceGroups(e)}addFieldInterfaceComponentOption(e,t){return this.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption(e,t)}addFieldInterfaceOperator(e,t){return this.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceOperator(e,t)}addGlobalVar(e,t,o){(0,i.default)(this.globalVars,e,t),o&&(0,i.default)(this.globalVarCtxs,e,o)}getGlobalVar(e){return(0,r.default)(this.globalVars,e)}getGlobalVarCtx(e){return(0,r.default)(this.globalVarCtxs,e)}addUserCenterSettingsItem(e){let t=e.useVisible||(()=>!0);this.schemaSettingsManager.addItem("userCenterSettings",e.name,{...e,useVisible:()=>{let{allow:o}=(0,ej.K)();return!!t()&&(!e.aclSnippet||o(e.aclSnippet))}})}registerVariable(e){this.variables.find(t=>t.name===e.name)?console.warn(`Variable ${e.name} already registered`):this.variables.push(e)}getVariables(){return this.variables}constructor(...e){super(...e),this.globalVars={},this.globalVarCtxs={},this.loading=!0,this.hasLoadError=!1,this.locales=null,this.variables=[]}}var eI=o(83468),eT=o(34316),eD=o(90653),eL=o(82924),eY=o(61013),eR=o(95951),eB=o(19057);function eN(e){let{name:t,parentSchemaKey:o,valueKeys:l,schema:n,title:a,useSubmit:r=eB.qs,useVisible:i,defaultValue:s,useDefaultValue:d=eB.qs,width:u,type:c="common"}=e;return{name:t,type:"actionModal",useVisible:i,useComponentProps(){let e=(0,eB.gm)(c),{dn:t}=(0,eR.er)(),i=d(s),p=o?L.default.get(e,o):void 0,m=(0,eY.l)(),{t:h}=(0,B.useTranslation)(),x=r(),{fieldSchema:v}=(0,eL.BCL)()||{};return{title:"function"==typeof a?a(h):m(a),width:u,schema:n({...i,...p}),onSubmit(n){let a=(0,eB.Yj)({fieldSchema:e,parentSchemaKey:o,value:n,valueKeys:l});return v?(t.emit("patch",{schema:a}),t.refresh()):t.deepMerge(a),null==x?void 0:x(n)}}}}}let eE=e=>{let{name:t,title:o,options:l,useOptions:n=eB.qs,schemaKey:a,useVisible:r,type:i="common",defaultValue:s,useDefaultValue:d=eB.qs}=e;return{name:t,type:"select",useVisible:r,useComponentProps(){let e=(0,eB.gm)(i),{fieldSchema:t}=(0,eL.BCL)()||{},{dn:r}=(0,eR.er)(),u=n(l),c=d(s),p=(0,eY.l)(),{t:m}=(0,B.useTranslation)();return{title:"function"==typeof o?o(m):p(o),options:u,value:L.default.get(e,a,c),onChange(o){let l=(0,eB.Yj)({fieldSchema:e,schemaKey:a,value:o});t?(r.emit("patch",{schema:l}),r.refresh()):r.deepMerge(l)}}}}};var e$=o(43545);function ez(e){let{name:t,useVisible:o,title:l,useTextClick:n=eB.qs}=e;return{name:t,type:"item",useVisible:o,useComponentProps(){let e=(0,eY.l)(),{t}=(0,B.useTranslation)(),o=n();return{title:"function"==typeof l?l(t):e(l),onClick:o}}}}o(59934);var eO=o(7195),eq=o(49629);function eH(e){if(!e)return console.warn("Failed to mount app: mount target should not be null or undefined."),null;if("string"==typeof e){let t=document.querySelector(e);return t||console.warn(`Failed to mount app: mount target selector "${e}" returned null.`),t}return window.ShadowRoot&&e instanceof window.ShadowRoot&&"closed"===e.mode&&console.warn('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}let eV=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];let l=t.reduce((e,t)=>{let[o,l]=t,n=t=>{let{children:n}=t;return(0,E.jsx)(e,{children:(0,E.jsx)(o,{...l,children:n})})};return n.displayName=`compose(${o.displayName||o.name})`,n},em);return e=>t=>(0,E.jsx)(l,{children:e&&(0,E.jsx)(e,{...t})})}},65623(e,t,o){o.d(t,{_:()=>n,q:()=>r});var l=o(51005);class n extends l.I{add(e,t){!super.get(e)&&(super.add(e,t),this.otherInstance&&this.otherInstance.add(e,t))}remove(e){super.get(e)&&(super.remove(e),this.otherInstance&&this.otherInstance.remove(e))}constructor(e,t){super(e),this.otherInstance=null,t&&(this.otherInstance=t,t.otherInstance=this)}}let a={BlockInitializers:"page:addBlock",MBlockInitializers:"mobilePage:addBlock",CreateFormBlockInitializers:"popup:addNew:addBlock",CusomeizeCreateFormBlockInitializers:"popup:addRecord:addBlock",RecordBlockInitializers:"popup:common:addBlock",BulkEditBlockInitializers:"popup:bulkEdit:addBlock",TableColumnInitializers:"table:configureColumns",TableActionColumnInitializers:"table:configureItemActions",TableActionInitializers:"table:configureActions",SubTableActionInitializers:"subTable:configureActions",FormItemInitializers:"form:configureFields",CreateFormActionInitializers:"createForm:configureActions",UpdateFormActionInitializers:"editForm:configureActions",ReadPrettyFormItemInitializers:"details:configureFields",DetailsActionInitializers:"detailsWithPaging:configureActions",ReadPrettyFormActionInitializers:"details:configureActions",KanbanCardInitializers:"kanban:configureItemFields",KanbanActionInitializers:"kanban:configureActions",GridCardActionInitializers:"gridCard:configureActions",GridCardItemActionInitializers:"gridCard:configureItemActions",ListActionInitializers:"list:configureActions",ListItemActionInitializers:"list:configureItemActions",CalendarActionInitializers:"calendar:configureActions",GanttActionInitializers:"gantt:configureActions",MapActionInitializers:"map:configureActions",TableSelectorInitializers:"popup:tableSelector:addBlock",ChartInitializers:"charts:addBlock",ChartFilterItemInitializers:"chartFilterForm:configureFields",ChartFilterActionInitializers:"chartFilterForm:configureActions",AssociationFilterInitializers:"filterCollapse:configureFields",FilterFormItemInitializers:"filterForm:configureFields",FilterFormActionInitializers:"filterForm:configureActions",CustomFormItemInitializers:"assignFieldValuesForm:configureFields",BulkEditFormItemInitializers:"bulkEditForm:configureFields",BulkEditFormActionInitializers:"bulkEditForm:configureActions",AuditLogsTableColumnInitializers:"auditLogsTable:configureColumns",AuditLogsTableActionColumnInitializers:"auditLogsTable:configureItemActions",AuditLogsTableActionInitializers:"auditLogsTable:configureActions",SnapshotBlockInitializers:"popup:snapshot:addBlock",AddBlockButton:"workflowManual:popup:configureUserInterface:addBlock",AddCustomFormField:"workflowManual:customForm:configureFields",AddActionButton:"workflowManual:form:configureActions"};function r(e,t){return e===t||a[e]===t}},51005(e,t,o){o.d(t,{I:()=>l});class l{get items(){return this.options.items}add(e,t){let o=e.split("."),l=o[o.length-1],n={...t,name:l},a=(e,t)=>{let o=this.items.findIndex(t=>t.name===e);-1===o?this.items.push(t):this.items[o]=t};if(1===o.length)return void a(l,n);let r=o.slice(0,-1).join("."),i=this.get(r);if(i){i.children||(i.children=[]);let t=e.replace(`${i.name}.`,""),o=i.children.findIndex(e=>e.name===t);-1===o?i.children.push(n):i.children[o]=n}else a(l,n)}get(e){if(!e)return;let t=e.split("."),o={children:this.items};for(let e=0;e<t.length;e++){var l;let n=t[e],a=null==(l=o.children)?void 0:l.find(e=>e.name===n);if(a&&(o=a),e===t.length-1)return a}}remove(e){let t=e.split(".");if(1===t.length){let e=this.items.findIndex(e=>e.name===t[0]);-1!==e&&this.items.splice(e,1);return}let o=this.get(t.slice(0,-1).join("."));if(o&&o.children){let e=t[t.length-1],l=o.children.findIndex(t=>t.name===e);-1!==l&&o.children.splice(l,1)}}constructor(e){this.options=Object.assign({items:[]},e),this.name=e.name}}},12765(e,t,o){o.d(t,{Y:()=>m,z:()=>p});var l=o(71178),n=o(56920),a=o(51649),r=o(51275),i=o(93726),s=o(65010),d=o(82451),u=o(27404);let c=a.default.forwardRef((e,t)=>{let{onClick:o,...n}=e;return(0,l.jsx)(d.r,{ref:t,...n,onClick:e=>null==o?void 0:o(e.event,!1)})}),p=e=>{let{title:t,icon:o,width:d,schema:p,buttonText:m,btnStyles:h,isItem:x,component:v,onCancel:_,onSubmit:f}=e,{setVisible:g}=(0,s.fx)(),b=(0,a.useCallback)(()=>{let e=(0,n.useForm)(),t=(0,r.D5)();return{async run(){await (null==_?void 0:_()),t.setVisible(!1),e.reset()}}},[_]),y=(0,a.useCallback)(()=>{let e=(0,n.useForm)(),t=(0,r.D5)();return{async run(){await e.validate();try{await (null==f?void 0:f(e.values)),t.setVisible(!1),e.reset()}catch(e){console.error(e)}}}},[f]),S=(0,a.useMemo)(()=>a.default.forwardRef((e,t)=>{let{onClick:n}=e;return(0,l.jsx)(c,{onClick:n,ref:t,title:m,icon:o})}),[m,o]),k=(0,a.useMemo)(()=>(0,u.uid)(),[]),C=(0,a.useMemo)(()=>({type:"void",properties:{[k]:{type:"void","x-component":"Action","x-component-props":v?{component:v,icon:o}:x?{component:S}:{icon:o||"PlusOutlined",style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",...h||{}},title:m,type:"dashed"},properties:{drawer1:{"x-decorator":"Form","x-component":"Action.Modal","x-component-props":{width:d,style:{maxWidth:d||"520px",width:"100%"},afterOpenChange:()=>{g(!1)}},type:"void",title:t,properties:{...(null==p?void 0:p.properties)||p,footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:b}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:y}}}}}}}}}}),[m,v,k,p,t,b,y]);return(0,l.jsx)(i.H,{schema:C})},m=()=>{let e=(0,s.eL)();return(0,l.jsx)(p,{...e})}},94003(e,t,o){o.d(t,{Z:()=>i,w:()=>p});var l=o(71178),n=o(51649),a=o(95951),r=o(65010);let i=e=>{let{children:t}=e;return t?(0,l.jsx)(l.Fragment,{children:t.sort((e,t)=>(e.sort||0)-(t.sort||0)).map((e,t)=>(0,l.jsx)(p,{...e},e.name||e.key||t))}):null},s={item:"SchemaInitializerItemInternal",itemGroup:"SchemaInitializerItemGroupInternal",divider:"SchemaInitializerDivider",switch:"SchemaInitializerSwitchInternal",subMenu:"SchemaInitializerSubMenuInternal",actionModal:"SchemaInitializerActionModalInternal"},d=()=>void 0,u=()=>!0,c=()=>void 0,p=(0,n.memo)(e=>{let{type:t,Component:o,component:i,children:p,useVisible:m=u,useChildren:h=d,useComponentProps:x=c,hideIfNoChildren:v,componentProps:_,sort:f,...g}=e,b=h(),y=x(),S=(0,a.QI)(),k=o||i,C=!k&&t&&s[t],M=(0,n.useMemo)(()=>{let e=[...b||[],...p||[]];return 0===e.length?void 0:e},[b,p]),w=(0,n.useMemo)(()=>({...g,...C?y:{},...C?_:{},children:M}),[g,C,y,_,M]);if(!m()||!t&&!k)return null;let F=S(C?s[t]:k);return F&&(!v||M)?(0,l.jsx)(r.G8.Provider,{value:w,children:(0,l.jsx)(F,{..._,...y,children:M})}):null});p.displayName="SchemaInitializerChild"},72559(e,t,o){o.d(t,{Z:()=>a});var l=o(71178),n=o(52793);o(51649);let a=()=>{let{token:e}=n.theme.useToken();return(0,l.jsx)(n.Divider,{style:{marginTop:e.marginXXS,marginBottom:e.marginXXS}})}},82451(e,t,o){o.d(t,{K:()=>x,r:()=>h});var l=o(71178),n=o(27404),a=o(94046),r=o(51649),i=o(60430),s=o(61013),d=o(65010),u=o(31166),c=o(97866),p=o(73927),m=o(44866);let h=(0,r.memo)(r.default.forwardRef((e,t)=>{let{style:o,closeInitializerMenuWhenClick:h=!0,name:x=(0,n.uid)(),applyMenuStyle:v=!0,className:_,disabled:f,items:g,icon:b,title:y,onClick:S,children:k}=e,C=(0,s.l)(),M=(0,c.A)(g,x,S),{componentCls:w,hashId:F}=(0,m.L)(),{attribute:P}=(0,u.y)(),{setVisible:j}=(0,d.fx)(),A=(0,r.useMemo)(()=>{if(g&&g.length>0)return[{key:x,style:o,className:_,label:k||C(y),onClick:t=>{f||t.key!==x||(h&&(null==j||j(!1)),null==S||S({...t,item:e}))},icon:"string"==typeof b?(0,l.jsx)(i.In,{type:b}):b,children:M}]},[x,f,o,_,k,y,S,b,M]);return g&&g.length>0?(0,l.jsx)(p.$l,{disabled:f,items:A}):(0,l.jsx)("div",{ref:t,onClick:t=>{t.stopPropagation(),h&&(null==j||j(!1)),null==S||S({event:t,item:e})},children:(0,l.jsx)("div",{...P,className:(0,a.default)({[`${w}-menu-item`]:v,[`${w}-menu-item-disabled`]:f},_),style:o,children:k||(0,l.jsxs)(l.Fragment,{children:["string"==typeof b?(0,l.jsx)(i.In,{type:b}):b,(0,l.jsx)("span",{className:(0,a.default)({[`${F} ${w}-item-content`]:!!b}),children:C(y)})]})})})}));h.displayName="SchemaInitializerItem";let x=()=>{let e=(0,d.eL)();return(0,l.jsx)(h,{...e})}},17596(e,t,o){o.d(t,{G:()=>v,t:()=>_});var l=o(71178),n=o(52793),a=o(51649),r=o(61013),i=o(65010),s=o(94003),d=o(72559),u=o(44866),c=o(27404),p=o(77843),m=o(44374);let h=e=>{let{value:t,onChange:o,name:r}=e,{t:i}=(0,p.useTranslation)(),[s,d]=(0,a.useState)(t),u=(0,a.useRef)(""),c=(0,a.useRef)(`${r||Math.random().toString(10).substr(2,9)}`);(0,a.useEffect)(()=>{d(t)},[t]),(0,a.useEffect)(()=>{var e;let t=new IntersectionObserver(e=>{var t,o,l,n;let a,r;e.some(e=>e.isIntersecting)&&u.current&&(null==(t=document.activeElement)?void 0:t.id)!==u.current.input.id&&(l=null==(o=document.activeElement)?void 0:o.id,n=u.current.input.id,a=l.replace(/-displayCollectionFields$/,""),r=n.replace(/-displayCollectionFields$/,""),!a.includes(r))&&u.current.focus()});return(null==(e=u.current)?void 0:e.input)&&(u.current.input.id=c.current,t.observe(u.current.input)),()=>{t.disconnect()}},[]);let m=(0,a.useRef)(!1),h=e=>{m.current||(o(e.target.value),d(e.target.value))},x=e=>{"compositionend"===e.type?(m.current=!1,h(e)):m.current=!0};return(0,l.jsxs)("div",{onClick:e=>e.stopPropagation(),children:[(0,l.jsx)(n.Input,{ref:u,allowClear:!0,style:{padding:"0 4px 6px 16px",boxShadow:"none"},bordered:!1,placeholder:i("Search"),defaultValue:s,onClick:e=>{e.stopPropagation()},onChange:h,onCompositionStart:x,onCompositionEnd:x,onCompositionUpdate:x}),(0,l.jsx)(n.Divider,{style:{margin:0}})]})},x=null,v=e=>{let{children:t,items:o,title:a,divider:i}=e,c=(0,r.l)(),{componentCls:p}=(0,u.L)(),{token:m}=n.theme.useToken();return(0,l.jsxs)("div",{style:{marginInline:m.marginXXS},children:[i&&(0,l.jsx)(d.Z,{}),(0,l.jsx)("div",{className:`${p}-group-title`,children:c(a)}),(0,l.jsx)(s.Z,{children:o||t})]})},_=()=>{let e=(0,i.eL)(),t=(e=>{let{children:t,showType:o,hideSearch:r,name:i}=e,s=(0,m.useCompile)(),[d,u]=(0,a.useState)(null),p=(e,t)=>{if(!d||""===d||x&&x!==t)return e;let o=d.toLocaleLowerCase();return e.filter(e=>(e.title||e.label)&&String(s(e.title||e.label)).toLocaleLowerCase().includes(o))},v=function(e,t){var a;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,s=[];return!r&&(e.length>10||d)&&!["subMenu","itemGroup"].includes(null==(a=e[0])?void 0:a.type)&&s.push({key:`search-${(0,c.uid)()}`,Component:()=>(0,l.jsx)(h,{name:t,value:x&&x!==t?"":d,onChange:e=>{x=t,u(e)}}),onClick(e){let{domEvent:t}=e;t.stopPropagation()},...o?{isMenuType:!0}:{}}),e.forEach(e=>{if(!i.has(e))if(i.add(e),["subMenu","itemGroup"].includes(e.type)){let t=v(x&&x!==e.name?e.children:p(e.children.concat(),e.name),e.name,i);s.push({...e,children:t})}else s.push(e)}),0===e.length&&s.push({key:"empty",style:{height:150},Component:()=>(0,l.jsx)("div",{onClick:e=>e.stopPropagation(),children:(0,l.jsx)(n.Empty,{image:n.Empty.PRESENTED_IMAGE_SIMPLE})}),...o?{isMenuType:!0}:{}}),s},_=v(p((null==t?void 0:t.concat())||[],i),i);return t?_:void 0})(e);return e.name&&"displayFields"!==e.name?(0,l.jsx)(v,{...e}):(0,l.jsx)(v,{...e,children:t})}},90592(e,t,o){o.d(t,{e:()=>a});var l=o(71178);o(51649);var n=o(94003);let a=e=>{let{items:t}=e;return 0===t.length?null:(0,l.jsx)(n.Z,{children:t})}},60714(e,t,o){o.d(t,{S:()=>s,V:()=>d});var l=o(71178),n=o(52793),a=o(51649),r=o(82451),i=o(65010);let s=e=>{let{title:t,options:o,value:i,onChange:s,openOnHover:d,onClick:u,...c}=e,[p,m]=(0,a.useState)(!1),h=(0,a.useCallback)(function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];m(!1),null==u||u(...t)},[m,u]),x=(0,a.useCallback)(()=>m(!0),[]),v=(0,a.useMemo)(()=>d?{onMouseEnter:x,open:p}:{},[x,p,d]);return(0,l.jsx)(r.r,{closeInitializerMenuWhenClick:!1,...c,children:(0,l.jsxs)("div",{style:{alignItems:"center",display:"flex",justifyContent:"space-between"},children:[t,(0,l.jsx)(n.Select,{"data-testid":"antd-select",popupMatchSelectWidth:!1,bordered:!1,defaultValue:i,onChange:function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return m(!1),s(...t)},options:o,style:{textAlign:"right",minWidth:100},onClick:h,...v})]})})},d=()=>{let e=(0,i.eL)();return(0,l.jsx)(s,{...e})}},73927(e,t,o){o.d(t,{$l:()=>v,Ix:()=>h,Zk:()=>x,gc:()=>f,zw:()=>_});var l=o(71178),n=o(82113),a=o(10691),r=o(27404),i=o(52793),s=o(51649),d=o(61013),u=o(65010),c=o(97866),p=o(44866);let m=s.default.createContext({}),h=e=>(0,l.jsx)(m.Provider,{value:{isInMenu:!0},children:e.children}),x=()=>s.default.useContext(m),v=e=>{let{componentCls:t,hashId:o}=(0,p.L)(),{items:r,...d}=e,{token:u}=i.theme.useToken(),c=(0,s.useMemo)(()=>r.map(e=>({...e,popupClassName:`${o} ${t}-menu-sub`})),[t,o,r]);return(0,l.jsx)(h,{children:(0,l.jsx)(i.Menu,{selectable:!1,expandIcon:(0,l.jsx)(n.RightOutlined,{style:{fontSize:u.fontSizeSM,color:u.colorTextDescription}}),rootClassName:(0,a.css)`
11
+ `},83249(e,t,o){o.d(t,{_T:()=>l.AIManager,eY:()=>l.DefaultToolsManager,f:()=>l.toToolsMap});var l=o(13975)},51771(e,t,o){o.d(t,{IK:()=>p,P4:()=>c,Rk:()=>m,j:()=>h});var l=o(71178),n=o(63526),a=o(52793),r=o(51649),i=o(77843),s=o(16211),d=o(83468),u=o(60422);let c=(0,r.createContext)({});c.displayName="AppLangContext";let p=()=>(0,r.useContext)(c);function m(e){var t;let{remoteLocale:o,...r}=e,d=(0,s.VB)(),{i18n:p}=(0,i.useTranslation)(),{data:m,loading:h}=(0,s.bP)({url:"app:getLang",params:{locale:d.auth.locale}},{onSuccess(e){var t,o,l,a,r,i;let s=d.auth.locale;(null==e||null==(t=e.data)?void 0:t.lang)&&!s&&(d.auth.setLocale(null==e||null==(r=e.data)?void 0:r.lang),p.changeLanguage(null==e||null==(i=e.data)?void 0:i.lang)),Object.keys((null==e||null==(o=e.data)?void 0:o.resources)||{}).forEach(t=>{var o,l;p.addResources(null==e||null==(o=e.data)?void 0:o.lang,t,(null==e||null==(l=e.data)?void 0:l.resources[t])||{})}),(0,u.M)(null==e?void 0:e.data),n.dayjs.locale(null==e||null==(l=e.data)?void 0:l.moment),window.cronLocale=null==e||null==(a=e.data)?void 0:a.cron},manual:!o});return h?(0,l.jsx)("div",{style:{textAlign:"center",marginTop:20},children:(0,l.jsx)(a.Spin,{})}):(0,l.jsx)(c.Provider,{value:null==m?void 0:m.data,children:(0,l.jsx)(a.ConfigProvider,{popupMatchSelectWidth:!1,...r,locale:(null==m||null==(t=m.data)?void 0:t.antd)||{},children:e.children})})}class h extends d.k{async load(){var e;this.app.use(m,(null==(e=this.options)?void 0:e.config)||{})}}},60422(e,t,o){o.d(t,{M:()=>a});var l=o(31515);class n{atX0SecondsPastTheMinuteGt20(){return this.data.atX0SecondsPastTheMinuteGt20}atX0MinutesPastTheHourGt20(){return this.data.atX0MinutesPastTheHourGt20}commaMonthX0ThroughMonthX1(){return this.data.commaMonthX0ThroughMonthX1}commaYearX0ThroughYearX1(){return this.data.commaYearX0ThroughYearX1}use24HourTimeFormatByDefault(){return this.data.use24HourTimeFormatByDefault}anErrorOccuredWhenGeneratingTheExpressionD(){return this.data.anErrorOccuredWhenGeneratingTheExpressionD}everyMinute(){return this.data.everyMinute}everyHour(){return this.data.everyHour}atSpace(){return this.data.atSpace}everyMinuteBetweenX0AndX1(){return this.data.everyMinuteBetweenX0AndX1}at(){return this.data.at}spaceAnd(){return this.data.spaceAnd}everySecond(){return this.data.everySecond}everyX0Seconds(){return this.data.everyX0Seconds}secondsX0ThroughX1PastTheMinute(){return this.data.secondsX0ThroughX1PastTheMinute}atX0SecondsPastTheMinute(){return this.data.atX0SecondsPastTheMinute}everyX0Minutes(){return this.data.everyX0Minutes}minutesX0ThroughX1PastTheHour(){return this.data.minutesX0ThroughX1PastTheHour}atX0MinutesPastTheHour(){return this.data.atX0MinutesPastTheHour}everyX0Hours(){return this.data.everyX0Hours}betweenX0AndX1(){return this.data.betweenX0AndX1}atX0(){return this.data.atX0}commaEveryDay(){return this.data.commaEveryDay}commaEveryX0DaysOfTheWeek(){return this.data.commaEveryX0DaysOfTheWeek}commaX0ThroughX1(){return this.data.commaX0ThroughX1}commaAndX0ThroughX1(){return this.data.commaAndX0ThroughX1}first(){return this.data.first}second(){return this.data.second}third(){return this.data.third}fourth(){return this.data.fourth}fifth(){return this.data.fifth}commaOnThe(){return this.data.commaOnThe}spaceX0OfTheMonth(){return this.data.spaceX0OfTheMonth}lastDay(){return this.data.lastDay}commaOnTheLastX0OfTheMonth(){return this.data.commaOnTheLastX0OfTheMonth}commaOnlyOnX0(){return this.data.commaOnlyOnX0}commaAndOnX0(){return this.data.commaAndOnX0}commaEveryX0Months(){return this.data.commaEveryX0Months}commaOnlyInX0(){return this.data.commaOnlyInX0}commaOnTheLastDayOfTheMonth(){return this.data.commaOnTheLastDayOfTheMonth}commaOnTheLastWeekdayOfTheMonth(){return this.data.commaOnTheLastWeekdayOfTheMonth}commaDaysBeforeTheLastDayOfTheMonth(){return this.data.commaDaysBeforeTheLastDayOfTheMonth}firstWeekday(){return this.data.firstWeekday}weekdayNearestDayX0(){return this.data.weekdayNearestDayX0}commaOnTheX0OfTheMonth(){return this.data.commaOnTheX0OfTheMonth}commaEveryX0Days(){return this.data.commaEveryX0Days}commaBetweenDayX0AndX1OfTheMonth(){return this.data.commaBetweenDayX0AndX1OfTheMonth}commaOnDayX0OfTheMonth(){return this.data.commaOnDayX0OfTheMonth}commaEveryHour(){return this.data.commaEveryHour}commaEveryX0Years(){return this.data.commaEveryX0Years}commaStartingX0(){return this.data.commaStartingX0}daysOfTheWeek(){return this.data.daysOfTheWeek}monthsOfTheYear(){return this.data.monthsOfTheYear}constructor(e){this.data=e}}let a=e=>{(l.default.default?l.default.default:l.default).initialize({load(t){t[null==e?void 0:e.lang]=new n(null==e?void 0:e.cronstrue)}})}},26351(e,t,o){o.d(t,{n:()=>a});var l=o(71178);o(51649);var n=o(22932);let a=e=>{let{apiClient:t,children:o}=e;return(0,l.jsx)(n.j.Provider,{value:t,children:o})}},22932(e,t,o){o.d(t,{j:()=>l});let l=(0,o(51649).createContext)(null);l.displayName="APIClientContext"},24(e,t,o){o.d(t,{V:()=>r});var l=o(51649),n=o(22932),a=o(16716);function r(){let e=(0,a.n)();return(0,l.useContext)(n.j)||e.apiClient}},16211(e,t,o){o.d(t,{nd:()=>f.n,j8:()=>g.j,Q9:()=>_,VB:()=>l.V,bP:()=>c,qK:()=>p});var l=o(24),n=o(27404),a=o(71883),r=o(13791),i=o(51649),s=o(63526),d=o(27741);let u=new Map;function c(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[s,d]=(0,a.useSetState)({}),c=(0,l.V)();t="function"==typeof e?e:e?async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{resource:o,url:l}=e,a=(0,r.default)(e);o||l?(a.params=a.params||{},function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(e=>t.propertyIsEnumerable(e)):[]).forEach(l=>{let n=o[l],a=u.get("deepMerge");"function"==typeof n?a=n:"string"==typeof n&&u.has(n)&&(a=u.get(n)),e[l]=a(e[l],t[l])})}(a.params,t)):a=(0,n.merge)(a,t);let i=await c.request(a);return null==i?void 0:i.data}:async()=>{};let p={...o,onSuccess(){for(var e,t=arguments.length,l=Array(t),n=0;n<t;n++)l[n]=arguments[n];null==(e=o.onSuccess)||e.call(o,...l),o.uid&&(c.services[o.uid]=m)}},m=(0,a.useRequest)(t,p);return(0,i.useMemo)(()=>({...m,state:s,setState:d}),[m,d,s])}function p(e,t){return(0,l.V)().resource(e,t)}u.set("overwrite",(e,t)=>t),u.set("andMerge",(e,t)=>{if(e||t)return e?t?{$and:[e,t]}:e:t}),u.set("orMerge",(e,t)=>{if(e||t)return e?t?{$or:[e,t]}:e:t}),u.set("deepMerge",(e,t)=>(0,s.isPlainObject)(e)&&(0,s.isPlainObject)(t)?(0,eo.default)(e,t,{arrayMerge:(e,t)=>t}):t),u.set("merge",(e,t)=>(0,s.isPlainObject)(e)&&(0,s.isPlainObject)(t)?Object.assign(e,t):t),u.set("union",(e,t)=>("string"==typeof e&&(e=e.split(",")),"string"==typeof t&&(t=t.split(",")),(0,d.default)((e||[]).concat(t||[])))),u.set("intersect",(e,t)=>("string"==typeof e&&(e=e.split(",")),"string"==typeof t&&(t=t.split(",")),Array.isArray(e)&&0!==e.length)?Array.isArray(t)&&0!==t.length?e.filter(e=>t.includes(e)):e||[]:t||[]);var m=o(27697),h=o(52793);function x(e,t,o){var l;(null==t?void 0:t.length)&&o[e]({message:null==(l=t.map)?void 0:l.call(t,(e,t)=>i.default.createElement("div",{key:`${t}_${e.message}`},"string"==typeof e?e:e.message))})}let v=new Map;class _ extends m.APIClient{get notification(){var e,t;return(null==(t=this.app)||null==(e=t.context)?void 0:e.notification)||h.notification}cloneInstance(){let e=new _(this.options);e.options=this.options,e.services=this.services,e.storage=this.storage,e.app=this.app,e.auth=this.auth,e.storagePrefix=this.storagePrefix;let t=[];for(let l of this.axios.interceptors.response.handlers){var o;(null==l||null==(o=l.rejected)?void 0:o._name)==="handleNotificationError"?t.push({...l,rejected:e.handleNotificationError.bind(e)}):t.push(l)}return e.axios.interceptors.response.handlers=t,e}getHostname(){var e,t;if(process.env.API_BASE_URL)try{return new URL(process.env.API_BASE_URL).hostname}catch(e){}return null==(t=window)||null==(e=t.location)?void 0:e.hostname}getHeaders(){var e,t;let o,l,n=super.getHeaders(),a=null==(e=this.app)?void 0:e.getName();return a&&(n["X-App"]=a),n["X-Timezone"]=(o=Math.floor(Math.abs(t=-(new Date().getTimezoneOffset()/60))),l=Math.abs(t%1*60),(t>=0?"+":"-")+(o<10?"0":"")+o+":"+(l<10?"0":"")+l),n["X-Hostname"]=this.getHostname(),n}service(e){return this.services[e]}interceptors(){this.axios.interceptors.request.use(e=>{e.headers["X-With-ACL-Meta"]=!0;let t=this.getHeaders();return Object.keys(t).forEach(o=>{(0,m.hasHeaderValue)(e.headers,o)||(e.headers[o]=t[o])}),e}),super.interceptors(),this.useNotificationMiddleware(),this.axios.interceptors.response.use(e=>e,e=>{let t=this.toErrMessages(e);throw t.find(e=>"ROLE_NOT_FOUND_ERR"===e.code)&&(this.auth.setRole(null),window.location.reload()),t.find(e=>"TOKEN_INVALID"===e.code||"USER_LOCKED"===e.code)&&this.auth.setToken(null),t.find(e=>"ROLE_NOT_FOUND_FOR_USER"===e.code)&&(this.auth.setRole(null),window.location.reload()),e})}toErrMessages(e){var t,o,l,n,a,r,i,s,d,u,c;if("string"==typeof(null==e||null==(t=e.response)?void 0:t.data)){let t=document.createElement("div");t.innerHTML=null==e||null==(d=e.response)?void 0:d.data;let o=t.textContent||t.innerText;return o.includes("Error occurred while trying")||o.includes("502 Bad Gateway")?[{code:"APP_WARNING",message:o="The application may be starting up. Please try again later."}]:[{message:o}]}return(null==e||null==(l=e.response)||null==(o=l.data)?void 0:o.error)?[null==e||null==(c=e.response)||null==(u=c.data)?void 0:u.error]:(null==e||null==(a=e.response)||null==(n=a.data)?void 0:n.errors)||(null==e||null==(i=e.response)||null==(r=i.data)?void 0:r.messages)||(null==e||null==(s=e.response)?void 0:s.error)||[{message:e.message||"Server error"}]}async handleNotificationError(e){var t,o,l,n,a,r,i,s,d,u,c,p;if(this.silence)throw e;let m=null==(t=e.config)?void 0:t.skipNotify;if(m&&("function"==typeof m&&m(e)||!0===m))throw e;let h=null==e||null==(l=e.response)||null==(o=l.data)?void 0:o.redirectTo;if(h)return window.location.href=h;if((null==e||null==(a=e.response)||null==(n=a.data)?void 0:n.type)==="application/json"){let t;c=this.notification,(t=new FileReader).readAsText(null==e||null==(p=e.response)?void 0:p.data,"utf-8"),t.onload=function(){x("error",JSON.parse(t.result).errors,c)}}else{v.size>10&&v.clear();let t=!!(null==e||null==(s=e.response)||null==(i=s.data)||null==(r=i.error)?void 0:r.maintaining);if(this.app.maintaining!==t&&(this.app.maintaining=t),this.app.maintaining)throw this.app.error=null==e||null==(u=e.response)||null==(d=u.data)?void 0:d.error,e;this.app.error&&(this.app.error=null);let o=this.toErrMessages(e);if(0===(o=o.filter(e=>{let t=v.get(e.message);return!(t&&new Date().getTime()-t<500)&&(v.set(e.message,new Date().getTime()),!0)})).length)throw e;x("error",o,this.notification)}throw e}useNotificationMiddleware(){let e=this.handleNotificationError.bind(this);e._name="handleNotificationError",this.axios.interceptors.response.use(e=>{var t,o;return(null==(o=e.data)||null==(t=o.messages)?void 0:t.length)&&x("success",e.data.messages.filter(e=>{let t=v.get("string"==typeof e?e:e.message);return!(t&&new Date().getTime()-t<500)&&(v.set(e.message,new Date().getTime()),!0)}),this.notification),e},e)}silent(){let e=this.cloneInstance();return e.silence=!0,e}constructor(...e){super(...e),this.services={},this.silence=!1}}var f=o(26351),g=o(22932)},17103(e,t,o){o.d(t,{G0:()=>r,gL:()=>i,qm:()=>s});var l=o(71178),n=o(51649),a=o(16211);let r=(0,n.createContext)(null);r.displayName="CurrentAppInfoContext";let i=()=>(0,n.useContext)(r),s=e=>{let t=(0,a.bP)({url:"app:getInfo"});return(0,l.jsx)(r.Provider,{value:t.data,children:e.children})}},94702(e,t,o){o.d(t,{G0:()=>l.G0,gL:()=>l.gL,qm:()=>l.qm});var l=o(17103)},41897(e,t,o){o.d(t,{$Q:()=>j,$y:()=>Y,C1:()=>v,CR:()=>D,Cj:()=>_,EB:()=>m,JY:()=>T,Jr:()=>B,MJ:()=>A,MR:()=>c,bR:()=>d,dT:()=>L,es:()=>I,ol:()=>R,sn:()=>k,tu:()=>S,vx:()=>F,yh:()=>h,zd:()=>P});var l=o(71178),n=o(77583),a=o(51649),r=o(38356);let i=a.default.createContext(null);i.displayName="NavigateNoUpdateContext";let s=a.default.createContext(null);s.displayName="LocationNoUpdateContext";let d=a.default.createContext("");d.displayName="LocationSearchContext";let u=a.default.createContext(!1);u.displayName="IsAdminPageContext";let c=a.default.createContext("");c.displayName="CurrentPageUidContext";let p=a.default.createContext(!1);p.displayName="IsInSettingsPageContext";let m=a.default.createContext("");m.displayName="CurrentTabUidContext";let h=a.default.createContext(new URLSearchParams);h.displayName="SearchParamsContext";let x=a.default.createContext("");x.displayName="RouterBasenameContext";let v=a.default.createContext({isSubPageClosedByPageMenu:()=>!1,setFieldSchema:()=>{},reset:()=>{}});v.displayName="IsSubPageClosedByPageMenuContext";let _=e=>{let{children:t}=e,o=(0,r.useParams)(),i=(0,a.useRef)({}),[s,d]=(0,a.useState)(null),u=(0,a.useCallback)(()=>{var e,t;let l=n.default.isEmpty(o["*"])&&(null==s||null==(e=s["x-component-props"])?void 0:e.openMode)==="page"&&!!(null==(t=i.current["*"])?void 0:t.includes(s["x-uid"]));return i.current=o,l},[s,o]),c=(0,a.useCallback)(()=>{i.current={}},[]),p=(0,a.useMemo)(()=>({isSubPageClosedByPageMenu:u,setFieldSchema:d,reset:c}),[u,c]);return(0,l.jsx)(v.Provider,{value:p,children:t})},f=e=>{let{children:t}=e,o=(0,r.useHref)("/");return(0,l.jsx)(x.Provider,{value:o,children:t})},g=e=>{let{children:t}=e,[o]=(0,r.useSearchParams)();return(0,l.jsx)(h.Provider,{value:o,children:t})},b=e=>{let{children:t}=e,o=(0,r.useLocation)().pathname.includes("/settings");return(0,l.jsx)(p.Provider,{value:o,children:t})},y=e=>{let{children:t}=e,o=(0,r.useLocation)().pathname.startsWith("/admin");return(0,l.jsx)(u.Provider,{value:o,children:t})},S=e=>{let{children:t}=e,o=(0,r.useParams)();return(0,l.jsx)(c.Provider,{value:o.name,children:t})},k=e=>{let{children:t}=e,o=(0,r.useParams)();return(0,l.jsx)(m.Provider,{value:o.tabUid,children:t})},C=e=>{let{children:t}=e,o=(0,r.useNavigate)(),n=a.default.useRef(o);n.current=o;let s=a.default.useCallback((e,t)=>{n.current(e,t)},[]);return(0,l.jsx)(i.Provider,{value:s,children:t})},M=e=>{let{children:t}=e,o=(0,r.useLocation)(),n=a.default.useRef({});return(0,a.useEffect)(()=>{Object.assign(n.current,o)},[o]),(0,l.jsx)(s.Provider,{value:n.current,children:t})},w=e=>{let{children:t}=e,o=(0,r.useLocation)();return(0,l.jsx)(d.Provider,{value:o.search,children:t})},F=()=>a.default.useContext(i),P=()=>a.default.useContext(s),j=()=>a.default.useContext(d),A=()=>a.default.useContext(u),I=()=>a.default.useContext(c),T=()=>a.default.useContext(p),D=()=>a.default.useContext(m),L=()=>a.default.useContext(h),Y=()=>a.default.useContext(x),R=e=>{let{isSubPageClosedByPageMenu:t,setFieldSchema:o,reset:l}=a.default.useContext(v);return(0,a.useEffect)(()=>{o(e)},[e,o]),{isSubPageClosedByPageMenu:t,reset:l}},B=e=>{let{children:t}=e;return(0,l.jsx)(C,{children:(0,l.jsx)(M,{children:(0,l.jsx)(y,{children:(0,l.jsx)(w,{children:(0,l.jsx)(g,{children:(0,l.jsx)(f,{children:(0,l.jsx)(b,{children:t})})})})})})})}},83468(e,t,o){o.d(t,{k:()=>n});var l=o(13975);class n extends l.Plugin{}},34316(e,t,o){o.d(t,{g:()=>l});let l=(0,o(51649).createContext)(null);l.displayName="ApplicationContext"},90653(e,t,o){o.d(t,{nm:()=>l.n,$q:()=>s.$,vk:()=>n.v,nu:()=>r,K3:()=>d.K,i0:()=>s.i,rd:()=>i});var l=o(16716),n=o(82976),a=o(504);function r(e){let t=(0,l.n)(),o=(0,a.useFlowEngine)({throwError:!1});return(t||o.context.app).pm.get(e)}let i=()=>(0,l.n)().router;var s=o(45560),d=o(87879)},87879(e,t,o){o.d(t,{K:()=>n});var l=o(42536);let n=()=>{let{allowAll:e,snippets:t}=(0,l.v6)();return{allow:o=>{if(o){let l=(0,ep.default)().add(t);return e||l.ignores(o)}return!0}}}},16716(e,t,o){o.d(t,{n:()=>r});var l=o(504),n=o(51649),a=o(34316);let r=()=>{var e;let t=(0,n.useContext)(a.g),o=(0,l.useFlowEngine)({throwError:!1});return(null==o||null==(e=o.context)?void 0:e.app)||t||{}}},82976(e,t,o){o.d(t,{v:()=>r});var l=o(52793),n=o(51649),a=o(16716);let r=()=>{let e=(0,a.n)();return{render:(0,n.useCallback)(()=>{var t;return(null==e?void 0:e.renderComponent)?null==e||null==(t=e.renderComponent)?void 0:t.call(e,"AppSpin"):n.default.createElement(l.Spin)},[e])}}},45560(e,t,o){o.d(t,{$:()=>r,i:()=>i});var l=o(77583),n=o(51649),a=o(90653);let r=e=>{let t=(0,a.nm)(),o=(0,n.useMemo)(()=>t.getGlobalVar(e),[t,e]);if((0,l.isFunction)(o))try{return o()}catch(t){console.error(`Error calling global variable function for key: ${e}`,t);return}return o},i=e=>{let t=(0,a.nm)(),o=(0,n.useMemo)(()=>{var o;return null==t||null==(o=t.getGlobalVarCtx)?void 0:o.call(t,e)},[t,e]);if((0,l.isFunction)(o))try{return o()}catch(t){console.error(`Error calling global variable function for key: ${e}`,t);return}return o}},17157(e,t,o){o.d(t,{yh:()=>ep.yh,CR:()=>ep.CR,Yx:()=>ef.Yx,$q:()=>eD.$q,gc:()=>ef.gc,FE:()=>ef.FE,IN:()=>eN,rd:()=>eD.rd,zw:()=>ef.zw,eL:()=>ef.eL,Lm:()=>ef.Lm,S3:()=>ef.S3,gD:()=>eT.g,C1:()=>ep.C1,MR:()=>ep.MR,fx:()=>ef.fx,AK:()=>ef.AK,Ah:()=>eP.Ah,mh:()=>eP.mh,ZI:()=>ef.ZI,Zz:()=>eV,vx:()=>ep.vx,tu:()=>ep.tu,qX:()=>ef.qX,mz:()=>ea,yb:()=>ef.yb,JY:()=>ep.JY,KK:()=>ef.KK,dT:()=>ep.dT,q9:()=>ef.q9,nu:()=>eD.nu,Vr:()=>ef.Vr,EB:()=>ep.EB,ct:()=>em,vk:()=>eD.vk,wq:()=>eo,lg:()=>eA,y$:()=>eO.y,IF:()=>eE,OD:()=>eP.OD,JL:()=>ef.tu,vt:()=>ef.vt,Zk:()=>ef.Zk,z3:()=>ef.z3,k_:()=>eI.k,G8:()=>ef.G8,y6:()=>eq.y6,MJ:()=>ep.MJ,K3:()=>eD.K3,Jr:()=>ep.Jr,zd:()=>ep.zd,vr:()=>eP.vr,Z$:()=>ef.Z$,pi:()=>ez,es:()=>ep.es,RT:()=>eP.RT,$y:()=>ep.$y,ol:()=>ep.ol,KY:()=>eP.KY,$Q:()=>ep.$Q,s6:()=>eq.s6,__:()=>ef.__,OI:()=>eq.OI,$c:()=>e$.$,Cj:()=>ep.Cj,i0:()=>eD.i0,nm:()=>eD.nm,$l:()=>ef.$l,sn:()=>ep.sn,w$:()=>et,bR:()=>ep.bR,Bv:()=>eH,pZ:()=>ev,qt:()=>ef.qt,rR:()=>ef.rR,xd:()=>e_,C5:()=>eq.C5,e1:()=>ef.e1,PK:()=>eh,tJ:()=>el,NH:()=>ef.NH,G0:()=>ef.G0,T2:()=>eP.T2,wp:()=>ef.wp,Vf:()=>ef.Vf,Ix:()=>ef.Ix,dQ:()=>ef.dQ,IY:()=>ef.IY});var l=o(2314),n=o(13975),a=o(27697),r=o(93656),i=o(20148),s=o(16211),d=o(25739),u=o(42219),c=o(62248),p=o(32444),m=o(67574),h=o(7271),x=o(38693),v=o(41196),_=o(82113),f=o(38533),g=o(8198),b=o(10691),y=o(56220),S=o(44814),k=o(56920),C=o(27404),M=o(48849),w=o(83489),F=o(63526),P=o(504),j=o(71883),A=o(52793),I=o(76821),T=o(15636),D=o(23977),L=o(77583),Y=o(51649),R=o(7516),B=o(77843),N=o(38356),E=o(71178),$=o(44374);function z(e,t,o){e.define(t,()=>o),window.__nocobase_app_dev__&&(window.__nocobase_app_dev_deps__=window.__nocobase_app_dev_deps__||{},window.__nocobase_app_dev_deps__[t]=o)}var O=o(90995);let q=e=>{var t;let[o,l]=(0,j.useLocalStorageState)((t=e.appName)?`nocobase_${t}_designable`.toUpperCase():"NOCOBASE_DESIGNABLE",{defaultValue:!!e.designable});return(0,E.jsx)(O.OA,{...e,designable:o,onDesignableChange:e=>{l(e)}})},H=e=>"boolean"==typeof e.designable?(0,E.jsx)(O.OA,{...e}):(0,E.jsx)(q,{...e});function V(e){return("default"in e?e.default:void 0)||e}function U(e){return`${e}/client`}function G(e,t){window.__nocobase_app_dev_plugins__=window.__nocobase_app_dev_plugins__||{},window.__nocobase_app_dev_plugins__[e]=t}function K(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.requirejs.config({waitSeconds:120,paths:t.reduce((e,t)=>(e[t.packageName]=t.url,t.clientV2Url&&(e[`${t.packageName}/client-v2`]=t.clientV2Url),e),{})});let o=t.map(e=>e.packageName);return o.forEach(e=>{let t;t=U(e),window.define(t,["exports",e],function(e,o){Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(o).forEach(function(t){"__esModule"===t||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})}),G(t,e)})}),new Promise((l,n)=>{e.requirejs(o,function(){for(var e=arguments.length,o=Array(e),n=0;n<e;n++)o[n]=arguments[n];o.forEach((e,o)=>{e&&G(U(t[o].packageName),e)}),l(o.map((e,o)=>[t[o].name,(null==e?void 0:e.default)||e]).filter(e=>e[1]));let a=o.map((e,t)=>e?null:t).filter(e=>null!==e).map(e=>t[e].packageName);a.length>0&&console.error("[nocobase load plugin error]: These plugins do not have an `export.default` exported content or there is an error in the plugins. error plugins: \r\n%s",a.join(", \r\n"))},n)})}async function W(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];for(let o of J(e)){let e=await import(o.url),l=V(e);l&&(t.push([o.name,l]),Object.entries({[o.packageName]:e}).forEach(e=>{let[t,o]=e,l=U(t);window.define(l,()=>o),G(l,o)}))}return t}function J(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new Map(e.map(e=>[e.packageName,e])),o=[],l=new Set,n=new Set,a=e=>{if(!n.has(e.packageName)&&!l.has(e.packageName)){for(let o of(l.add(e.packageName),e.appDevDependencies||[])){let e=t.get(o);e&&a(e)}l.delete(e.packageName),n.add(e.packageName),o.push(e)}};return e.forEach(a),o}async function X(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[],l=[],n=async()=>{if(0===l.length)return;let t=await K(e,l);o.push(...t),l=[]};for(let e of J(t)){if("esm"===e.devMode){await n();let t=await W([e]);o.push(...t);continue}l.push(e)}return await n(),o}async function Z(e){let{requirejs:t,pluginData:o,devDynamicImport:l}=e;if(0===o.length)return[];let n=[],a={},r={};if(l){for await(let e of o){let t=await l(e.packageName);if(t){let o=V(t);n.push([e.name,o]),a[e.packageName]=o,r[e.packageName]=t}}Object.entries(r).forEach(e=>{let[t,o]=e,l=U(t);window.define(l,()=>o),G(l,o)})}let i=o.filter(e=>!a[e.packageName]),s=i.filter(e=>"esm"===e.devMode),d=i.filter(e=>"esm"!==e.devMode);if(0===s.length){if(0===d.length)return n;let e=await K(t,d);return n.push(...e),n}let u=await X(t,i);return n.push(...u),n}class Q extends n.PluginManager{getRemotePluginsRequestUrl(){return"pm:listEnabled"}async initRemotePlugins(){var e;let t=await this.app.apiClient.request({url:this.getRemotePluginsRequestUrl()}),o=(null==t||null==(e=t.data)?void 0:e.data)||[];for await(let[e,t]of(await Z({requirejs:this.app.requirejs,pluginData:o,devDynamicImport:this.app.devDynamicImport}))){let l=o.find(t=>t.name===e);await this.add(t,l)}}}var ee=o(60430);let et="admin.settings.",eo="/admin/settings/",el="pm.";class ea{renderIcon(e){return"string"==typeof e?(0,Y.createElement)(ee.In,{type:e}):e}clearCache(){this.cachedList={}}setAclSnippets(e){this.aclSnippets=e,this.clearCache()}getAclSnippet(e){let t=this.settings[e];return(null==t?void 0:t.skipAclConfigure)?null:(null==t?void 0:t.aclSnippet)?t.aclSnippet:`${el}${e}`}getRouteName(e){return`${et}${e}`}getRoutePath(e){return`${eo}${e.replaceAll(".","/")}`}add(e,t){this.clearCache();let o=e.split("."),l=o[0];this.settings[e]={...this.settings[e],Component:N.Outlet,...t,name:e,topLevelName:t.topLevelName||l},o.length>1&&(0,L.set)(this.settings,o.join(".children."),this.settings[e]),this.app.router.add(this.getRouteName(e),{path:this.getRoutePath(e),Component:this.settings[e].Component,componentLoader:this.settings[e].componentLoader})}remove(e){this.clearCache(),Object.keys(this.settings).forEach(t=>{t.startsWith(e)&&(delete this.settings[t],this.app.router.remove(`${et}${t}`))})}hasAuth(e){return!this.aclSnippets.includes(`!${this.getAclSnippet("*")}`)&&!1===this.aclSnippets.includes(`!${this.getAclSnippet(e)}`)}getSetting(e){return this.settings[e]}has(e){return!!this.hasAuth(e)&&!!this.getSetting(e)}get(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],o=this.hasAuth(e),l=this.getSetting(e);if(t&&!o||!l)return null;let n=Object.keys(l.children||{}).sort((e,t)=>e.localeCompare(t)).map(e=>this.get(l.children[e].name,t)).filter(Boolean).sort((e,t)=>((null==e?void 0:e.sort)||0)-((null==t?void 0:t.sort)||0)),{title:a,icon:r,aclSnippet:i,...s}=l;return{isTopLevel:e===l.topLevelName,...s,aclSnippet:this.getAclSnippet(e),title:a,isAllow:o,label:a,icon:this.renderIcon(r),path:this.getRoutePath(e),key:e,children:n.length?n:void 0}}getList(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=JSON.stringify(e);return this.cachedList[t]?this.cachedList[t]:this.cachedList[t]=Array.from(new Set(Object.values(this.settings).map(e=>e.topLevelName))).sort((e,t)=>e.localeCompare(t)).map(t=>this.get(t,e)).filter(Boolean).sort((e,t)=>((null==e?void 0:e.sort)||0)-((null==t?void 0:t.sort)||0))}getAclSnippets(){return Object.keys(this.settings).map(e=>this.getAclSnippet(e)).filter(Boolean)}constructor(e,t){this.settings={},this.aclSnippets=[],this.cachedList={},this.app=t,e&&Object.entries(e||{}).forEach(e=>{let[t,o]=e;this.add(t,o)})}}var ec=o(73518),ep=o(41897);let em=e=>{let{children:t}=e;return(0,E.jsx)(E.Fragment,{children:t})},eh=Y.default.memo(e=>(0,E.jsx)(N.UNSAFE_RouteContext.Provider,{value:{outlet:null,matches:[],isDataRoute:!1},children:(0,E.jsx)(N.UNSAFE_LocationContext.Provider,{value:null,children:e.children})}));function ex(e){let t,o,l,n,{app:a}=e;return t=(0,N.useParams)(),o=(0,N.useLocation)(),l=(0,N.useMatches)(),n=a.flowEngine,(0,Y.useEffect)(()=>{var e;let o=l[l.length-1];o&&(n.context._observableCache.route={name:o.id,pathname:o.pathname,path:(null==(e=o.handle)?void 0:e.path)||null,params:t})},[n.context,t,l]),(0,Y.useEffect)(()=>{n.context._observableCache.location=o},[n.context,o]),null}eh.displayName="RouterContextCleaner";class ev extends n.RouterManager{getRouterComponent(e){let{type:t="browser",...o}=this.options,l={hash:N.createHashRouter,browser:N.createBrowserRouter,memory:N.createMemoryRouter},n=this.getRoutesTree(),a=(0,Y.createContext)(null),r=()=>{let t=(0,Y.useContext)(a);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ex,{app:this.app}),(0,E.jsx)(ep.Jr,{children:(0,E.jsx)(t,{children:(0,E.jsxs)(ec.Ay,{children:[(0,E.jsx)(N.Outlet,{}),e]})})})]})};return this.router=l[t]([{element:(0,E.jsx)(r,{}),errorElement:(0,E.jsx)(()=>{throw(0,N.useRouteError)()},{}),children:n}],o),e=>{let{BaseLayout:t=em}=e;return(0,E.jsx)(a.Provider,{value:t,children:(0,E.jsx)(eh,{children:(0,E.jsx)(N.RouterProvider,{future:{v7_startTransition:!0},router:this.router})})})}}}function e_(e,t){return new ev(e,t)}var ef=o(96023),eg=o(12765),eb=o(94003),ey=o(72559),eS=o(82451),ek=o(17596),eC=o(90592),eM=o(60714),ew=o(73927),eF=o(40506),eP=o(31675),ej=o(87879);class eA extends n.BaseApplication{initRequireJs(){var e;super.initRequireJs(),this.requirejs&&(z(e=this.requirejs,"react",Y.default),z(e,"react-dom",R.default),z(e,"react/jsx-runtime",E.default),z(e,"react-router",eu),z(e,"react-router-dom",N),z(e,"antd",A),z(e,"antd-style",I),z(e,"@ant-design/icons",_),z(e,"@ant-design/cssinjs",v),z(e,"i18next",D),z(e,"react-i18next",B),z(e,"@formily/antd-v5",y),z(e,"@formily/core",S),z(e,"@formily/react",k),z(e,"@formily/shared",C),z(e,"@formily/json-schema",er),z(e,"@formily/reactive",l),z(e,"@formily/path",ei),z(e,"@formily/validator",M),z(e,"@formily/reactive-react",es),z(e,"@nocobase/utils",F),z(e,"@nocobase/utils/client",F),z(e,"@nocobase/client",$),z(e,"@nocobase/client/client",$),z(e,"@nocobase/evaluators",w),z(e,"@nocobase/evaluators/client",w),z(e,"@nocobase/sdk",a),z(e,"@nocobase/flow-engine",P),z(e,"@dnd-kit/core",f),z(e,"@dnd-kit/sortable",g),z(e,"axios",ed.default),z(e,"dayjs",F.dayjs),z(e,"lodash",L.default),z(e,"ahooks",j),z(e,"@emotion/css",b),z(e,"file-saver",T))}defineObservableState(){super.defineObservableState(),(0,l.define)(this,{loading:l.observable.ref})}createApiClient(e){let t=e.apiClient instanceof s.Q9?e.apiClient:new s.Q9({withCredentials:!0,...e.apiClient,appName:this.options.name||(0,a.getSubAppName)(e.publicPath)});return t.app=this,t}createI18n(e){return e.i18n||h.Ru}createRouterManager(e){return new ev(e.router,this)}createPluginManager(e){return new Q(e.plugins,e.loadRemotePlugins,this)}createPluginSettingsManager(e){return new ea(e.pluginSettings,this)}getDefaultComponents(){return{...super.getDefaultComponents(),DataBlockProvider:p.T4,SchemaInitializerActionModal:eg.z,SchemaInitializerActionModalInternal:eg.Y,SchemaInitializerChildren:eb.Z,SchemaInitializerChild:eb.w,SchemaInitializerDivider:ey.Z,SchemaInitializerItem:eS.r,SchemaInitializerItemGroup:ek.G,SchemaInitializerItemGroupInternal:ek.t,SchemaInitializerItemInternal:eS.K,SchemaInitializerItems:eC.e,SchemaInitializerSelect:eM.S,SchemaInitializerSelectInternal:eM.V,SchemaInitializerSubMenu:ew.zw,SchemaInitializerSubMenuInternal:ew.gc,SchemaInitializerSwitch:eF.q,SchemaInitializerSwitchInternal:eF.N,CollectionField:u.J}}initializeExtendedState(){super.initializeExtendedState(),this.systemSettings=new n.SystemSettingsSource(this.apiClient),this.schemaSettingsManager=new eP.mh(this.options.schemaSettings,this),this.schemaInitializerManager=new ef.FE(this.options.schemaInitializers,this),this.dataSourceManager=new m.zA(this.options.dataSourceManager,this),this.loading=!0,this.hasLoadError=!1,this.locales=null}addCustomProviders(){this.use(s.nd,{apiClient:this.apiClient}),this.use(d.B),this.use(H,{designable:this.options.designable,appName:this.name,components:this.components,scope:this.scopes}),this.use(c.N,{dataSourceManager:this.dataSourceManager}),this.use(x.R)}getRootFallback(){return this.renderComponent("AppSpin",{app:this})}getCollectionManager(e){var t;return null==(t=this.dataSourceManager.getDataSource(e))?void 0:t.collectionManager}async load(){try{this.loading=!0,await this.loadWebSocket(),await this.pm.load(),await this.flowEngine.flowSettings.load()}catch(a){var e,t,o,l,n;this.hasLoadError=!0,(null==a||null==(l=a.response)||null==(o=l.data)||null==(t=o.errors)||null==(e=t[0])?void 0:e.code)==="BLOCKED_IP"&&(this.hasLoadError=!1),this.ws.enabled&&await new Promise(e=>{setTimeout(()=>e(null),1e3)}),this.error={code:"LOAD_ERROR",...null==(n=this.apiClient.toErrMessages(a))?void 0:n[0]},console.error(a,this.error)}this.loading=!1,this.updateFavicon()}async loadWebSocket(){this.eventBus.addEventListener("ws:message:authorized",()=>{this.setWsAuthorized(!0)}),this.ws.on("message",e=>{var t,o,l,n,a;let r=JSON.parse(e.data);if(null==r||null==(t=r.payload)?void 0:t.refresh)return void window.location.reload();if("notification"===r.type){null==(l=(a=this.context.notification)[(null==(n=r.payload)?void 0:n.type)||"info"])||l.call(a,{message:null==(o=r.payload)?void 0:o.message});return}if("maintaining"===r.type&&"APP_RUNNING"!==r.payload.code)this.setMaintaining(!0),this.error=r.payload;else{this.hasLoadError&&window.location.reload(),this.setMaintaining(!1),this.maintained=!0,this.error=null;let e=r.type;if(!e)return;let t=`ws:message:${e}`;this.eventBus.dispatchEvent(new CustomEvent(t,{detail:r.payload}))}}),this.ws.on("serverDown",()=>{this.maintaining=!0,this.maintained=!1}),this.ws.on("open",()=>{let e=this.apiClient.auth.token;e&&this.setTokenInWebSocket({token:e,authenticator:this.apiClient.auth.getAuthenticator()})}),this.ws.connect()}addScopes(e){this.scopes=(0,en.default)(this.scopes,e)}addFieldInterfaces(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaces(e)}addFieldInterfaceGroups(e){return this.dataSourceManager.addFieldInterfaceGroups(e)}addFieldInterfaceComponentOption(e,t){return this.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption(e,t)}addFieldInterfaceOperator(e,t){return this.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceOperator(e,t)}addGlobalVar(e,t,o){(0,i.default)(this.globalVars,e,t),o&&(0,i.default)(this.globalVarCtxs,e,o)}getGlobalVar(e){return(0,r.default)(this.globalVars,e)}getGlobalVarCtx(e){return(0,r.default)(this.globalVarCtxs,e)}addUserCenterSettingsItem(e){let t=e.useVisible||(()=>!0);this.schemaSettingsManager.addItem("userCenterSettings",e.name,{...e,useVisible:()=>{let{allow:o}=(0,ej.K)();return!!t()&&(!e.aclSnippet||o(e.aclSnippet))}})}registerVariable(e){this.variables.find(t=>t.name===e.name)?console.warn(`Variable ${e.name} already registered`):this.variables.push(e)}getVariables(){return this.variables}constructor(...e){super(...e),this.globalVars={},this.globalVarCtxs={},this.loading=!0,this.hasLoadError=!1,this.locales=null,this.variables=[]}}var eI=o(83468),eT=o(34316),eD=o(90653),eL=o(82924),eY=o(61013),eR=o(95951),eB=o(19057);function eN(e){let{name:t,parentSchemaKey:o,valueKeys:l,schema:n,title:a,useSubmit:r=eB.qs,useVisible:i,defaultValue:s,useDefaultValue:d=eB.qs,width:u,type:c="common"}=e;return{name:t,type:"actionModal",useVisible:i,useComponentProps(){let e=(0,eB.gm)(c),{dn:t}=(0,eR.er)(),i=d(s),p=o?L.default.get(e,o):void 0,m=(0,eY.l)(),{t:h}=(0,B.useTranslation)(),x=r(),{fieldSchema:v}=(0,eL.BCL)()||{};return{title:"function"==typeof a?a(h):m(a),width:u,schema:n({...i,...p}),onSubmit(n){let a=(0,eB.Yj)({fieldSchema:e,parentSchemaKey:o,value:n,valueKeys:l});return v?(t.emit("patch",{schema:a}),t.refresh()):t.deepMerge(a),null==x?void 0:x(n)}}}}}let eE=e=>{let{name:t,title:o,options:l,useOptions:n=eB.qs,schemaKey:a,useVisible:r,type:i="common",defaultValue:s,useDefaultValue:d=eB.qs}=e;return{name:t,type:"select",useVisible:r,useComponentProps(){let e=(0,eB.gm)(i),{fieldSchema:t}=(0,eL.BCL)()||{},{dn:r}=(0,eR.er)(),u=n(l),c=d(s),p=(0,eY.l)(),{t:m}=(0,B.useTranslation)();return{title:"function"==typeof o?o(m):p(o),options:u,value:L.default.get(e,a,c),onChange(o){let l=(0,eB.Yj)({fieldSchema:e,schemaKey:a,value:o});t?(r.emit("patch",{schema:l}),r.refresh()):r.deepMerge(l)}}}}};var e$=o(43545);function ez(e){let{name:t,useVisible:o,title:l,useTextClick:n=eB.qs}=e;return{name:t,type:"item",useVisible:o,useComponentProps(){let e=(0,eY.l)(),{t}=(0,B.useTranslation)(),o=n();return{title:"function"==typeof l?l(t):e(l),onClick:o}}}}o(59934);var eO=o(7195),eq=o(49629);function eH(e){if(!e)return console.warn("Failed to mount app: mount target should not be null or undefined."),null;if("string"==typeof e){let t=document.querySelector(e);return t||console.warn(`Failed to mount app: mount target selector "${e}" returned null.`),t}return window.ShadowRoot&&e instanceof window.ShadowRoot&&"closed"===e.mode&&console.warn('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}let eV=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];let l=t.reduce((e,t)=>{let[o,l]=t,n=t=>{let{children:n}=t;return(0,E.jsx)(e,{children:(0,E.jsx)(o,{...l,children:n})})};return n.displayName=`compose(${o.displayName||o.name})`,n},em);return e=>t=>(0,E.jsx)(l,{children:e&&(0,E.jsx)(e,{...t})})}},65623(e,t,o){o.d(t,{_:()=>n,q:()=>r});var l=o(51005);class n extends l.I{add(e,t){!super.get(e)&&(super.add(e,t),this.otherInstance&&this.otherInstance.add(e,t))}remove(e){super.get(e)&&(super.remove(e),this.otherInstance&&this.otherInstance.remove(e))}constructor(e,t){super(e),this.otherInstance=null,t&&(this.otherInstance=t,t.otherInstance=this)}}let a={BlockInitializers:"page:addBlock",MBlockInitializers:"mobilePage:addBlock",CreateFormBlockInitializers:"popup:addNew:addBlock",CusomeizeCreateFormBlockInitializers:"popup:addRecord:addBlock",RecordBlockInitializers:"popup:common:addBlock",BulkEditBlockInitializers:"popup:bulkEdit:addBlock",TableColumnInitializers:"table:configureColumns",TableActionColumnInitializers:"table:configureItemActions",TableActionInitializers:"table:configureActions",SubTableActionInitializers:"subTable:configureActions",FormItemInitializers:"form:configureFields",CreateFormActionInitializers:"createForm:configureActions",UpdateFormActionInitializers:"editForm:configureActions",ReadPrettyFormItemInitializers:"details:configureFields",DetailsActionInitializers:"detailsWithPaging:configureActions",ReadPrettyFormActionInitializers:"details:configureActions",KanbanCardInitializers:"kanban:configureItemFields",KanbanActionInitializers:"kanban:configureActions",GridCardActionInitializers:"gridCard:configureActions",GridCardItemActionInitializers:"gridCard:configureItemActions",ListActionInitializers:"list:configureActions",ListItemActionInitializers:"list:configureItemActions",CalendarActionInitializers:"calendar:configureActions",GanttActionInitializers:"gantt:configureActions",MapActionInitializers:"map:configureActions",TableSelectorInitializers:"popup:tableSelector:addBlock",ChartInitializers:"charts:addBlock",ChartFilterItemInitializers:"chartFilterForm:configureFields",ChartFilterActionInitializers:"chartFilterForm:configureActions",AssociationFilterInitializers:"filterCollapse:configureFields",FilterFormItemInitializers:"filterForm:configureFields",FilterFormActionInitializers:"filterForm:configureActions",CustomFormItemInitializers:"assignFieldValuesForm:configureFields",BulkEditFormItemInitializers:"bulkEditForm:configureFields",BulkEditFormActionInitializers:"bulkEditForm:configureActions",AuditLogsTableColumnInitializers:"auditLogsTable:configureColumns",AuditLogsTableActionColumnInitializers:"auditLogsTable:configureItemActions",AuditLogsTableActionInitializers:"auditLogsTable:configureActions",SnapshotBlockInitializers:"popup:snapshot:addBlock",AddBlockButton:"workflowManual:popup:configureUserInterface:addBlock",AddCustomFormField:"workflowManual:customForm:configureFields",AddActionButton:"workflowManual:form:configureActions"};function r(e,t){return e===t||a[e]===t}},51005(e,t,o){o.d(t,{I:()=>l});class l{get items(){return this.options.items}add(e,t){let o=e.split("."),l=o[o.length-1],n={...t,name:l},a=(e,t)=>{let o=this.items.findIndex(t=>t.name===e);-1===o?this.items.push(t):this.items[o]=t};if(1===o.length)return void a(l,n);let r=o.slice(0,-1).join("."),i=this.get(r);if(i){i.children||(i.children=[]);let t=e.replace(`${i.name}.`,""),o=i.children.findIndex(e=>e.name===t);-1===o?i.children.push(n):i.children[o]=n}else a(l,n)}get(e){if(!e)return;let t=e.split("."),o={children:this.items};for(let e=0;e<t.length;e++){var l;let n=t[e],a=null==(l=o.children)?void 0:l.find(e=>e.name===n);if(a&&(o=a),e===t.length-1)return a}}remove(e){let t=e.split(".");if(1===t.length){let e=this.items.findIndex(e=>e.name===t[0]);-1!==e&&this.items.splice(e,1);return}let o=this.get(t.slice(0,-1).join("."));if(o&&o.children){let e=t[t.length-1],l=o.children.findIndex(t=>t.name===e);-1!==l&&o.children.splice(l,1)}}constructor(e){this.options=Object.assign({items:[]},e),this.name=e.name}}},12765(e,t,o){o.d(t,{Y:()=>m,z:()=>p});var l=o(71178),n=o(56920),a=o(51649),r=o(51275),i=o(93726),s=o(65010),d=o(82451),u=o(27404);let c=a.default.forwardRef((e,t)=>{let{onClick:o,...n}=e;return(0,l.jsx)(d.r,{ref:t,...n,onClick:e=>null==o?void 0:o(e.event,!1)})}),p=e=>{let{title:t,icon:o,width:d,schema:p,buttonText:m,btnStyles:h,isItem:x,component:v,onCancel:_,onSubmit:f}=e,{setVisible:g}=(0,s.fx)(),b=(0,a.useCallback)(()=>{let e=(0,n.useForm)(),t=(0,r.D5)();return{async run(){await (null==_?void 0:_()),t.setVisible(!1),e.reset()}}},[_]),y=(0,a.useCallback)(()=>{let e=(0,n.useForm)(),t=(0,r.D5)();return{async run(){await e.validate();try{await (null==f?void 0:f(e.values)),t.setVisible(!1),e.reset()}catch(e){console.error(e)}}}},[f]),S=(0,a.useMemo)(()=>a.default.forwardRef((e,t)=>{let{onClick:n}=e;return(0,l.jsx)(c,{onClick:n,ref:t,title:m,icon:o})}),[m,o]),k=(0,a.useMemo)(()=>(0,u.uid)(),[]),C=(0,a.useMemo)(()=>({type:"void",properties:{[k]:{type:"void","x-component":"Action","x-component-props":v?{component:v,icon:o}:x?{component:S}:{icon:o||"PlusOutlined",style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",...h||{}},title:m,type:"dashed"},properties:{drawer1:{"x-decorator":"Form","x-component":"Action.Modal","x-component-props":{width:d,style:{maxWidth:d||"520px",width:"100%"},afterOpenChange:()=>{g(!1)}},type:"void",title:t,properties:{...(null==p?void 0:p.properties)||p,footer:{"x-component":"Action.Modal.Footer",type:"void",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:b}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:y}}}}}}}}}}),[m,v,k,p,t,b,y]);return(0,l.jsx)(i.H,{schema:C})},m=()=>{let e=(0,s.eL)();return(0,l.jsx)(p,{...e})}},94003(e,t,o){o.d(t,{Z:()=>i,w:()=>p});var l=o(71178),n=o(51649),a=o(95951),r=o(65010);let i=e=>{let{children:t}=e;return t?(0,l.jsx)(l.Fragment,{children:t.sort((e,t)=>(e.sort||0)-(t.sort||0)).map((e,t)=>(0,l.jsx)(p,{...e},e.name||e.key||t))}):null},s={item:"SchemaInitializerItemInternal",itemGroup:"SchemaInitializerItemGroupInternal",divider:"SchemaInitializerDivider",switch:"SchemaInitializerSwitchInternal",subMenu:"SchemaInitializerSubMenuInternal",actionModal:"SchemaInitializerActionModalInternal"},d=()=>void 0,u=()=>!0,c=()=>void 0,p=(0,n.memo)(e=>{let{type:t,Component:o,component:i,children:p,useVisible:m=u,useChildren:h=d,useComponentProps:x=c,hideIfNoChildren:v,componentProps:_,sort:f,...g}=e,b=h(),y=x(),S=(0,a.QI)(),k=o||i,C=!k&&t&&s[t],M=(0,n.useMemo)(()=>{let e=[...b||[],...p||[]];return 0===e.length?void 0:e},[b,p]),w=(0,n.useMemo)(()=>({...g,...C?y:{},...C?_:{},children:M}),[g,C,y,_,M]);if(!m()||!t&&!k)return null;let F=S(C?s[t]:k);return F&&(!v||M)?(0,l.jsx)(r.G8.Provider,{value:w,children:(0,l.jsx)(F,{..._,...y,children:M})}):null});p.displayName="SchemaInitializerChild"},72559(e,t,o){o.d(t,{Z:()=>a});var l=o(71178),n=o(52793);o(51649);let a=()=>{let{token:e}=n.theme.useToken();return(0,l.jsx)(n.Divider,{style:{marginTop:e.marginXXS,marginBottom:e.marginXXS}})}},82451(e,t,o){o.d(t,{K:()=>x,r:()=>h});var l=o(71178),n=o(27404),a=o(94046),r=o(51649),i=o(60430),s=o(61013),d=o(65010),u=o(31166),c=o(97866),p=o(73927),m=o(44866);let h=(0,r.memo)(r.default.forwardRef((e,t)=>{let{style:o,closeInitializerMenuWhenClick:h=!0,name:x=(0,n.uid)(),applyMenuStyle:v=!0,className:_,disabled:f,items:g,icon:b,title:y,onClick:S,children:k}=e,C=(0,s.l)(),M=(0,c.A)(g,x,S),{componentCls:w,hashId:F}=(0,m.L)(),{attribute:P}=(0,u.y)(),{setVisible:j}=(0,d.fx)(),A=(0,r.useMemo)(()=>{if(g&&g.length>0)return[{key:x,style:o,className:_,label:k||C(y),onClick:t=>{f||t.key!==x||(h&&(null==j||j(!1)),null==S||S({...t,item:e}))},icon:"string"==typeof b?(0,l.jsx)(i.In,{type:b}):b,children:M}]},[x,f,o,_,k,y,S,b,M]);return g&&g.length>0?(0,l.jsx)(p.$l,{disabled:f,items:A}):(0,l.jsx)("div",{ref:t,onClick:t=>{t.stopPropagation(),h&&(null==j||j(!1)),null==S||S({event:t,item:e})},children:(0,l.jsx)("div",{...P,className:(0,a.default)({[`${w}-menu-item`]:v,[`${w}-menu-item-disabled`]:f},_),style:o,children:k||(0,l.jsxs)(l.Fragment,{children:["string"==typeof b?(0,l.jsx)(i.In,{type:b}):b,(0,l.jsx)("span",{className:(0,a.default)({[`${F} ${w}-item-content`]:!!b}),children:C(y)})]})})})}));h.displayName="SchemaInitializerItem";let x=()=>{let e=(0,d.eL)();return(0,l.jsx)(h,{...e})}},17596(e,t,o){o.d(t,{G:()=>v,t:()=>_});var l=o(71178),n=o(52793),a=o(51649),r=o(61013),i=o(65010),s=o(94003),d=o(72559),u=o(44866),c=o(27404),p=o(77843),m=o(44374);let h=e=>{let{value:t,onChange:o,name:r}=e,{t:i}=(0,p.useTranslation)(),[s,d]=(0,a.useState)(t),u=(0,a.useRef)(""),c=(0,a.useRef)(`${r||Math.random().toString(10).substr(2,9)}`);(0,a.useEffect)(()=>{d(t)},[t]),(0,a.useEffect)(()=>{var e;let t=new IntersectionObserver(e=>{var t,o,l,n;let a,r;e.some(e=>e.isIntersecting)&&u.current&&(null==(t=document.activeElement)?void 0:t.id)!==u.current.input.id&&(l=null==(o=document.activeElement)?void 0:o.id,n=u.current.input.id,a=l.replace(/-displayCollectionFields$/,""),r=n.replace(/-displayCollectionFields$/,""),!a.includes(r))&&u.current.focus()});return(null==(e=u.current)?void 0:e.input)&&(u.current.input.id=c.current,t.observe(u.current.input)),()=>{t.disconnect()}},[]);let m=(0,a.useRef)(!1),h=e=>{m.current||(o(e.target.value),d(e.target.value))},x=e=>{"compositionend"===e.type?(m.current=!1,h(e)):m.current=!0};return(0,l.jsxs)("div",{onClick:e=>e.stopPropagation(),children:[(0,l.jsx)(n.Input,{ref:u,allowClear:!0,style:{padding:"0 4px 6px 16px",boxShadow:"none"},bordered:!1,placeholder:i("Search"),defaultValue:s,onClick:e=>{e.stopPropagation()},onChange:h,onCompositionStart:x,onCompositionEnd:x,onCompositionUpdate:x}),(0,l.jsx)(n.Divider,{style:{margin:0}})]})},x=null,v=e=>{let{children:t,items:o,title:a,divider:i}=e,c=(0,r.l)(),{componentCls:p}=(0,u.L)(),{token:m}=n.theme.useToken();return(0,l.jsxs)("div",{style:{marginInline:m.marginXXS},children:[i&&(0,l.jsx)(d.Z,{}),(0,l.jsx)("div",{className:`${p}-group-title`,children:c(a)}),(0,l.jsx)(s.Z,{children:o||t})]})},_=()=>{let e=(0,i.eL)(),t=(e=>{let{children:t,showType:o,hideSearch:r,name:i}=e,s=(0,m.useCompile)(),[d,u]=(0,a.useState)(null),p=(e,t)=>{if(!d||""===d||x&&x!==t)return e;let o=d.toLocaleLowerCase();return e.filter(e=>(e.title||e.label)&&String(s(e.title||e.label)).toLocaleLowerCase().includes(o))},v=function(e,t){var a;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,s=[];return!r&&(e.length>10||d)&&!["subMenu","itemGroup"].includes(null==(a=e[0])?void 0:a.type)&&s.push({key:`search-${(0,c.uid)()}`,Component:()=>(0,l.jsx)(h,{name:t,value:x&&x!==t?"":d,onChange:e=>{x=t,u(e)}}),onClick(e){let{domEvent:t}=e;t.stopPropagation()},...o?{isMenuType:!0}:{}}),e.forEach(e=>{if(!i.has(e))if(i.add(e),["subMenu","itemGroup"].includes(e.type)){let t=v(x&&x!==e.name?e.children:p(e.children.concat(),e.name),e.name,i);s.push({...e,children:t})}else s.push(e)}),0===e.length&&s.push({key:"empty",style:{height:150},Component:()=>(0,l.jsx)("div",{onClick:e=>e.stopPropagation(),children:(0,l.jsx)(n.Empty,{image:n.Empty.PRESENTED_IMAGE_SIMPLE})}),...o?{isMenuType:!0}:{}}),s},_=v(p((null==t?void 0:t.concat())||[],i),i);return t?_:void 0})(e);return e.name&&"displayFields"!==e.name?(0,l.jsx)(v,{...e}):(0,l.jsx)(v,{...e,children:t})}},90592(e,t,o){o.d(t,{e:()=>a});var l=o(71178);o(51649);var n=o(94003);let a=e=>{let{items:t}=e;return 0===t.length?null:(0,l.jsx)(n.Z,{children:t})}},60714(e,t,o){o.d(t,{S:()=>s,V:()=>d});var l=o(71178),n=o(52793),a=o(51649),r=o(82451),i=o(65010);let s=e=>{let{title:t,options:o,value:i,onChange:s,openOnHover:d,onClick:u,...c}=e,[p,m]=(0,a.useState)(!1),h=(0,a.useCallback)(function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];m(!1),null==u||u(...t)},[m,u]),x=(0,a.useCallback)(()=>m(!0),[]),v=(0,a.useMemo)(()=>d?{onMouseEnter:x,open:p}:{},[x,p,d]);return(0,l.jsx)(r.r,{closeInitializerMenuWhenClick:!1,...c,children:(0,l.jsxs)("div",{style:{alignItems:"center",display:"flex",justifyContent:"space-between"},children:[t,(0,l.jsx)(n.Select,{"data-testid":"antd-select",popupMatchSelectWidth:!1,bordered:!1,defaultValue:i,onChange:function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return m(!1),s(...t)},options:o,style:{textAlign:"right",minWidth:100},onClick:h,...v})]})})},d=()=>{let e=(0,i.eL)();return(0,l.jsx)(s,{...e})}},73927(e,t,o){o.d(t,{$l:()=>v,Ix:()=>h,Zk:()=>x,gc:()=>f,zw:()=>_});var l=o(71178),n=o(82113),a=o(10691),r=o(27404),i=o(52793),s=o(51649),d=o(61013),u=o(65010),c=o(97866),p=o(44866);let m=s.default.createContext({}),h=e=>(0,l.jsx)(m.Provider,{value:{isInMenu:!0},children:e.children}),x=()=>s.default.useContext(m),v=e=>{let{componentCls:t,hashId:o}=(0,p.L)(),{items:r,...d}=e,{token:u}=i.theme.useToken(),c=(0,s.useMemo)(()=>r.map(e=>({...e,popupClassName:`${o} ${t}-menu-sub`})),[t,o,r]);return(0,l.jsx)(h,{children:(0,l.jsx)(i.Menu,{selectable:!1,expandIcon:(0,l.jsx)(n.RightOutlined,{style:{fontSize:u.fontSizeSM,color:u.colorTextDescription}}),rootClassName:(0,a.css)`
12
12
  box-shadow: none !important;
13
13
  border-inline-end: 0 !important;
14
14
  .ant-menu-sub {
@@ -54,7 +54,7 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
54
54
  .ant-pagination-simple-pager {
55
55
  display: none !important;
56
56
  }
57
- `}:{simple:!0,hidden:g<=1,current:(null==(c=f.service)||null==(u=c.data)||null==(d=u.meta)?void 0:d.page)||1,total:g,pageSize:1,showSizeChanger:!1,align:"center",async onChange(e){var t,o;let l=null==(o=f.service)||null==(t=o.params)?void 0:t[0];f.service.run({...l,page:e})},style:{marginTop:24,textAlign:"center"}}},ed=()=>{var e,t,o,l,a;let r=x.AssociationFilter.useAssociationField(),{service:i,props:s}=(0,D.J6)(),d=(0,n.useFieldSchema)(),u=(0,g.nj)(),c=(null==r?void 0:r.target)?null==(e=u.getCollection(r.target))?void 0:e.getPrimaryKey():"id",p=(null==(o=d["x-component-props"])||null==(t=o.fieldNames)?void 0:t.label)||c,m=(0,n.useField)(),h=r.name,_=(0,x.useDataSourceHeaders)(null==s?void 0:s.dataSource),{data:f,params:b,run:y}=(0,v.bP)({headers:_,resource:r.target,action:"list",params:{fields:[p,c],pageSize:200,page:1,...null==(l=m.componentProps)?void 0:l.params}},{refreshDeps:[p,c,JSON.stringify((null==(a=m.componentProps)?void 0:a.params)||{})],debounceWait:300});return{list:(null==f?void 0:f.data)||[],onSelected:e=>{var t,o,l,n;let a=(null==(o=i.params)||null==(t=o[1])?void 0:t.filters)||{};e.length?a[`af.${h}`]={[`${h}.${c}.$in`]:e}:delete a[`af.${h}`],i.run({...null==(l=i.params)?void 0:l[0],pageSize:200,page:1,filter:(0,S.Dj)([...Object.values(a),null==s||null==(n=s.params)?void 0:n.filter])},{filters:a})},handleSearchInput:e=>{y({...null==b?void 0:b[0],filter:{[`${p}.$includes`]:e.target.value}})},params:b,run:y}},eu=()=>{let{currentFields:e=[]}=(0,g.k7)();return e.filter(e=>ec(e))},ec=e=>{var t;return["select","multipleSelect","checkbox","checkboxGroup","chinaRegion"].includes(null==e?void 0:e.interface)&&(null==e||null==(t=e.uiSchema)?void 0:t.enum)},ep=()=>{var e,t,o,l,a,r,i,s,u,c;let p,h,_,f,g,b,k,C,M=x.AssociationFilter.useAssociationField(),w=(0,n.useFieldSchema)(),F=eu(),{getDataBlocks:P}=(0,y.xZ)(),j=null==M?void 0:M.name,A=(0,n.useField)(),{props:I}=(0,D.J6)(),T=(0,x.useDataSourceHeaders)(null==I?void 0:I.dataSource),L=(0,x.useCollectionManager)(),{filter:Y,parseVariableLoading:R}=(0,x.useParsedFilter)({filterOption:null==(t=A.componentProps)||null==(e=t.params)?void 0:e.filter});b=(null==M?void 0:M.target)?null==L||null==(o=L.getCollection(M.target))?void 0:o.getPrimaryKey():"id",k=(null==(a=w["x-component-props"])||null==(l=a.fieldNames)?void 0:l.label)||b,({data:g,params:_,run:f}=(0,v.bP)({headers:T,resource:null==M?void 0:M.target,action:"list",params:{fields:[k,b],pageSize:200,page:1,...null==(r=A.componentProps)?void 0:r.params,filter:Y}},{manual:!0,debounceWait:300})),(0,m.useEffect)(()=>{M&&!ec(M)&&!1===R&&f()},[M,k,f,b,null==(i=A.componentProps)?void 0:i.params,null==(u=A.componentProps)||null==(s=u.params)?void 0:s.sort,R]);let B=(0,m.useCallback)(e=>{let{targets:t,uid:o}=U(w);P().forEach(l=>{var n,a,r,i;if(!t.find(e=>e.uid===l.uid))return;let s=`${o}${w.name}`,u=(null==(n=l.service.params)?void 0:n[0])||{};(null==(r=l.service.params)||null==(a=r[1])?void 0:a.filters)||d.default.set(l.service.params,"[1].filters",{});let c=l.service.params[1].filters;if(e.length)c[s]={[C]:e};else{if(null==(i=l.clearSelection)||i.call(l),"manual"===l.dataLoadingMode)return l.clearData();delete c[s]}let p=(0,S.Dj)([...Object.values(c),l.defaultFilter]);return l.doFilter({...u,page:1,filter:p},{filters:c})})},[w,C,P]);if(!M)return{};if(ec(M)){let e=F.find(e=>e.name===w.name),t=(null==e||null==(c=e.uiSchema)?void 0:c.enum)||[];b="value",k="label",p=t,_={},f=()=>{},C=`${e.name}.${({select:"$in",multipleSelect:"$anyOf",checkbox:"$in",checkboxGroup:"$anyOf"})[e.interface]}`,h=e=>{let o=e.target.value;if(!o){p=t;return}p=t.filter(e=>e.label.includes(o))}}else C=`${j}.${b}.$in`,p=(null==g?void 0:g.data)||[],h=e=>{f({...null==_?void 0:_[0],filter:{[`${k}.$includes`]:e.target.value}})};return{list:p,onSelected:B,handleSearchInput:h,params:_,run:f,valueKey:b,labelKey:k,dataScopeFilter:Y}};async function em(e){let{getDataBlocks:t,targets:o,uid:l}=e;try{await Promise.all(t().map(async e=>{var t,n,a,r;if(!o.find(t=>t.uid===e.uid))return;if(null==(t=e.clearSelection)||t.call(e),"manual"===e.dataLoadingMode)return e.clearData();let i=(null==(n=e.service.params)?void 0:n[0])||{},s=(null==(r=e.service.params)||null==(a=r[1])?void 0:a.filters)||{};delete s[l];let d=(0,S.Dj)([...Object.values(s),e.defaultFilter]);return e.doFilter({...i,page:1,filter:d},{filters:s})}))}catch(e){console.error(e)}}function eh(e){let t=e.lastIndexOf(".");return -1!==t?e.substring(0,t):e}let ex=e=>{let{schema:t,prefix:o,updateAssociationValues:l,appends:n,getCollectionJoinField:a,getCollection:r,dataSource:i}=e;t.reduceProperties((e,t)=>{var s,u,c;let p=e||o,m=t["x-collection-field"]&&a(t["x-collection-field"],i),h=t.name.includes("."),x=m&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(m.type);if(t["x-linkage-rules"]&&!(0,F.WX)(t)){let e=t=>{let o=Object.keys(t)[0]||"$and";(t[o]||[]).filter(Boolean).forEach(t=>{let o,l,a;if("$and"in t||"$or"in t)return e(t);let r=(l=(o=[],!function e(t){Object.keys(t).sort().forEach(function(l){o.push(l),t[l]&&"object"==typeof t[l]&&e(t[l])})}(t),o),a=d.default.findIndex(l,(e,t)=>{if(e.includes("$")&&t>0)return!0}),l.slice(0,a));r.length>1&&!t.op&&n.add(r.join("."))})};t["x-linkage-rules"].forEach(t=>{let{condition:o}=t;e(o)})}let v=x&&(null==(s=r(m.target,i))?void 0:s.template)==="tree";if(m&&(x||h)&&"TableField"!==t["x-component"]){let e=!x&&h?eh(t.name):t.name,o=""!==p&&p?p+"."+e:e;if(v)n.add(o),n.add(`${o}.parent(recursively=true)`);else if(null==(u=t["x-component-props"])?void 0:u.sortArr){let e=null==(c=t["x-component-props"])?void 0:c.sortArr;n.add(`${o}(sort=${e})`)}else n.add(o);if((0,F.WX)(t)){l.add(o);let e=p&&""!==p?p+"."+t.name:t.name;ex({schema:t,prefix:e,updateAssociationValues:l,appends:n,getCollectionJoinField:a,getCollection:r,dataSource:i})}}else["Action","Action.Link","Action.Modal","Selector","Viewer","AddNewer","AssociationField.Selector","AssociationField.AddNewer","TableField","Kanban.CardViewer","Action.Container"].includes(t["x-component"])||ex({schema:t,prefix:o,updateAssociationValues:l,appends:n,getCollectionJoinField:a,getCollection:r,dataSource:i})},o)},ev=e=>{let{getCollectionJoinField:t,getCollection:o}=(0,g.nj)(e),l=(0,n.useFieldSchema)(),a=(0,m.useRef)(null);return{getAssociationAppends:(0,m.useCallback)(()=>{let n=new Set([]),r=new Set([]);ex({schema:l,prefix:"",updateAssociationValues:n,appends:r,getCollectionJoinField:t,getCollection:o,dataSource:e});let i=[...r=ew(r)],s=[...n],u={appends:d.default.isEqual(a.current,i)?a.current:i,updateAssociationValues:s};return a.current=u.appends,u},[e,l,o,t])}};async function e_(e){(0,a.untracked)(()=>{Object.keys(e.fields).forEach(t=>{(0,F.WX)(e.fields[t])&&(e.fields[t].initialValue=null)})}),await e.reset()}function ef(e,t){if(!t)return e;let o=e.indexOf("#"),l=o>=0,n=l?e.slice(0,o):e,a=l?e.slice(o+1):"",r=a.startsWith("/")||a.startsWith("!/");if(l&&r){let e=a.includes("?")?"&":"?";return`${n}#${a}${e}${t}`}let i=n.includes("?")?"&":"?";return l?`${n}${i}${t}#${a}`:`${n}${i}${t}`}let eg=()=>{let e=(0,A.$l)(),t=(0,A.gp)();return{parseURLAndParams:(0,m.useCallback)(async(o,l)=>{let n=await eS({searchParams:l,variables:e,localVariables:t,replaceVariableValue:ey});return ef(await ey(o,e,t),n)},[e,t])}};function eb(e){var t;let o=(0,_.vx)(),l=(0,n.useFieldSchema)(),a=(null==l?void 0:l["x-component-props"])||e,{t:r}=(0,h.useTranslation)(),i=null==a?void 0:a.url,d=(null==a?void 0:a.params)||[],u=(null==a?void 0:a.type)||"default",c=null==l||null==(t=l["x-component-props"])?void 0:t.openInNewWindow,{parseURLAndParams:p}=eg(),m=(0,x.useRouterBasename)();return{type:u,async onClick(){if(!i)return void s.message.warning(r("Please configure the URL"));let e=await p(i,d);e?c?window.open(eC(e),"_blank"):eM(e,o,window.location.origin+m):console.error("link should be a string")}}}async function ey(e,t,o){if(!e)return;let{evaluate:l}=r.evaluators.get("string"),{exp:n,scope:a}=await (0,P.qk)(e,{variables:t,localVariables:o});try{return l(n,{now:()=>new Date().toString(),...a})}catch(e){console.error(e)}}async function eS(e){let{searchParams:t,variables:o,localVariables:l,replaceVariableValue:n}=e,a=await Promise.all(t.map(async e=>{let{name:t,value:a}=e;if("string"==typeof a){if((0,I.DZ)(a)){let{value:e}=await o.parseVariable(a,l)||{};return{name:t,value:e}}return{name:t,value:await n(a,o,l)}}return{name:t,value:a}})),r={};for(let{name:e,value:t}of a)e&&t&&(r[e]=ek(t));return p.default.stringify(r)}function ek(e){if(d.default.isPlainObject(e)){let t={};return Object.keys(e).forEach(o=>{d.default.isPlainObject(e[o])||d.default.isArray(e[o])||d.default.isString(e[o])&&e[o].length>100||(t[o]=e[o])}),t}return d.default.isArray(e)?e.map(e=>d.default.isPlainObject(e)||d.default.isArray(e)?ek(e):e):e}function eC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.origin;return e?(0,i.isURL)(e)?e:e.startsWith("/")?`${t}${e}`:`${t}/${e}`:""}function eM(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.origin;if(!d.default.isString(e))return console.error("link should be a string");(0,i.isURL)(e)?e.startsWith(o)?t(eC(e.replace(o,""),"")):window.open(e,"_self"):t(eC(e,""))}function ew(e){return Array.from(e).filter(e=>e.includes(".")).forEach(t=>{let o=t.split(".");o.pop();let l=o.join(".");e.add(l)}),e}},95210(e,t,o){o.d(t,{RN:()=>u,es:()=>d,r1:()=>c});var l=o(56920),n=o(51649),a=o(24768),r=o(71226),i=o(90236),s=o(41897);let d=()=>{var e,t,o;let d=(0,l.useFieldSchema)(),p=c(d),m=null==(e=(0,a.kU)())?void 0:e.fieldSchema,h=(0,n.useMemo)(()=>u(m||d),[]),{disablePageHeader:x,enablePageTabs:v,hidePageTitle:_}=(null==h?void 0:h["x-component-props"])||{},{titleHeight:f}=(0,n.useContext)(r.A)||{},{allAccessRoutes:g}=(0,i.nr)(),b=(0,s.es)(),y=(0,n.useMemo)(()=>(0,i.bl)(b,g),[b,g]);return{heightProps:{...null==p?void 0:p["x-component-props"],title:(null==p||null==(t=p["x-component-props"])?void 0:t.title)||(null==p||null==(o=p["x-component-props"])?void 0:o.description),disablePageHeader:x,enablePageTabs:(null==y?void 0:y.enableTabs)||v,hidePageTitle:_,titleHeight:f}}},u=e=>e?"Page"===e["x-component"]?e:u(e.parent):null,c=e=>e?["BlockItem","CardItem"].includes(e["x-component"])?e:c(e.parent):null},8004(e,t,o){o.d(t,{Q:()=>n});var l=o(44374);let n=e=>{var t;let{association:o}=e,n=(0,l.useCollectionRecordData)(),a=(0,l.useCollectionParentRecordData)(),r=(0,l.useCollectionManager)(),i=(0,l.useCollection)();if(!o)return;let s=r.getCollection(o.split(".")[0]);return i.name===s.name||(null==(t=i.getParentCollectionsName)?void 0:t.call(i).includes(s.name))?n:a}},29333(e,t,o){o.d(t,{X:()=>r,d:()=>i});var l=o(71178),n=o(51649);let a=(0,n.createContext)(null),r=e=>{let{children:t,name:o,getActiveFieldsName:r,addActiveFieldName:i,removeActiveFieldName:s}=e,d=(0,n.useRef)(new Set),u=(0,n.useContext)(a),c=(0,n.useMemo)(()=>({getActiveFieldsName:r||(e=>e&&e!==o?null==u?void 0:u.getActiveFieldsName(e):Array.from(d.current)),addActiveFieldName:i||(e=>{d.current.add(e)}),removeActiveFieldName:s||(e=>{d.current.delete(e)}),name:o,parent:u}),[i,r,o,s,u]);return(0,l.jsx)(a.Provider,{value:c,children:t})},i=()=>(0,n.useContext)(a)},68557(e,t,o){o.d(t,{j:()=>p});var l=o(2314),n=o(63526),a=o(77583),r=o(51649),i=o(99300),s=o(43923),d=o(39607),u=o(88847),c=o(59896);function p(e){let{filterOption:t,onFilterChange:o}=e,{parseFilter:p,findVariable:m}=(0,i.hJ)(),h=JSON.stringify(t),x=(0,r.useRef)(t),v=(0,r.useRef)(o),[_,f]=(0,r.useState)({}),[g,b]=(0,r.useState)(()=>t?null:h),y=!!t&&g!==h;return x.current=t,v.current=o,(0,r.useEffect)(()=>{let e=x.current;if(!e){f({}),b(h);return}let t=!1,o=async()=>{var o;let l=await p(e);t||(f(l),b(h),null==(o=v.current)||o.call(v,l))};o();let r=a.default.debounce(o,s.wU),i=(0,l.reaction)(()=>(0,n.flatten)(e,{breakOn(e){let{key:t}=e;return t.startsWith("$")&&"$and"!==t&&"$or"!==t},transformValue(e){if(!(0,c.DZ)(e))return e;let t=(0,u.S)(e),o=m(t),l=null,r=(0,d.Y)(e).split(".");return r.forEach((e,i)=>{let s=r.slice(0,i+1).join("."),d=(0,n.getValuesByPath)({[t]:(null==o?void 0:o.ctx)||{}},s);a.default.isEmpty(d)||(l=d)}),l}}),r,{equals:a.default.isEqual});return()=>{t=!0,r.cancel(),i()}},[h,m,p]),{filter:_,parseVariableLoading:y}}},18111(e,t,o){o.d(t,{iz:()=>ep.parseVariablesAndChangeParamsToQueryString,B6:()=>ep.useFilterBlockActionProps,V3:()=>ed.V3,r1:()=>_.r1,Ur:()=>l.Ur,UJ:()=>es.UJ,Zj:()=>ep.useParseURLAndParams,bt:()=>es.bt,XS:()=>ep.useTableColumns,hJ:()=>l.hJ,R6:()=>K.R6,lm:()=>ex.l,Rg:()=>ep.fillParentFields,H2:()=>ec.H2,hS:()=>em,O6:()=>ed.O6,Vb:()=>ev.V,c3:()=>ep.getAppends,RH:()=>ep.usePickActionProps,jh:()=>ep.getAssociationPath,$1:()=>ec.$1,Ry:()=>ep.useAssociationNames,g7:()=>l.g7,Q7:()=>ep.useDataBlockParentRecord,nw:()=>K.nw,yE:()=>ep.useResetBlockActionProps,VL:()=>l.VL,bp:()=>ec.bp,xp:()=>_.xp,El:()=>ed.El,cY:()=>eu.cY,qM:()=>l.qM,vv:()=>eu.vv,eZ:()=>ep.useDestroyActionProps,qj:()=>ep.useCustomizeBulkUpdateActionProps,wh:()=>es.wh,EV:()=>ep.useDetailsPaginationProps,Gb:()=>ep.useCustomizeUpdateActionProps,Es:()=>_.Es,hu:()=>ep.reduceValueSize,WY:()=>ep.replaceVariableValue,oe:()=>l.oe,jY:()=>ep.useParsedFilter,vi:()=>es.vi,ZC:()=>l.ZC,G8:()=>eu.G8,Il:()=>ep.useEditTableActionProps,Ez:()=>ep.updateFilterTargets,to:()=>ed.to,wx:()=>ep.useCreateActionProps,Cc:()=>eu.Cc,nI:()=>eu.nI,gN:()=>ep.appendQueryStringToUrl,Xz:()=>ep.FormActiveFieldsProvider,es:()=>ep.useBlockHeightProps,J6:()=>l.J6,Km:()=>ep.getCardItemSchema,ru:()=>ep.getFormValues,Bq:()=>ep.useCustomizeRequestActionProps,wY:()=>ep.useDisassociateActionProps,r9:()=>_.r9,Y0:()=>ep.useBulkDestroyActionProps,zE:()=>_.zE,U5:()=>es.U5,dW:()=>ep.useFormActiveFields,Dg:()=>ep.completeURL,V0:()=>l.V0,tv:()=>eh,yH:()=>_.yH,tG:()=>ep.useRefreshActionProps,Gg:()=>ep.useRemoveActionProps,zL:()=>l.zL,TJ:()=>ep.useCollectValuesToSubmit,gU:()=>K.gU,JZ:()=>ei,Su:()=>ep.useLinkActionProps,_q:()=>ep.useOptionalFieldList,f0:()=>K.f0,K8:()=>ec.K8,DQ:()=>l.DQ,tt:()=>eu.tt,MX:()=>l.MX,fX:()=>ec.fX,yn:()=>ex.y,f2:()=>ep.useUpdateActionProps,j4:()=>ec.j4,OP:()=>ep.findFilterTargets,JD:()=>_.JD,cM:()=>l.cM,Ff:()=>ep.navigateWithinSelf,Pj:()=>ep.useAssociationCreateActionProps,UN:()=>ep.useAssociationFilterBlockProps,RN:()=>ep.getPageSchema,Ps:()=>l.Ps,hY:()=>l.hY,ge:()=>l.ge,fh:()=>l.fh,L1:()=>ep.useAssociationFilterProps,E6:()=>l.E6});var l=o(11340),n=o(71178),a=o(52793),r=o(51649),i=o(83468),s=o(23620);let d=e=>(0,n.jsx)(s.Bw,{initializer:!1,showBorder:!1,showBackground:!0,...e});var u=o(56250),c=o(4017),p=o(76564),m=o(11184),h=o(1575),x=o(92579),v=o(14696),_=o(69412),f=o(49621),g=o(41944),b=o(95951);let y=e=>{let t=(0,g.pE)(),{collection:o,isCusomeizeCreate:l,hidden:n}=e,{__collection:a}=t,r=(0,f.Ge)(),{designable:i}=(0,b.er)(),s=(0,_.yH)();if(!r)return{hidden:n||!1};let d=!1;s&&(d=!0,!i&&a&&(d=a===o));let u=r.name===((null==o?void 0:o.name)||o)&&!s||!r.name||!o;return{hidden:n||!d&&!u&&!l}};function S(e){let t,{hidden:o}=y(e);return e.association&&(t=(0,v.M)(e.association)),{parentRecord:t,hidden:o}}function k(){return(0,_.xp)()}var C=o(1451);function M(e){var t;let o,n=(t=e,(0,l.DQ)(t)),{hidden:a}=y(e);return e.association&&(o=(0,m.l)(e.association)),{params:n,parentRecord:o,hidden:a}}function w(){return(0,_.xp)()}var F=o(56920),P=o(77583),j=o(82924);let A=()=>{let e=(0,F.useFieldSchema)(),{designable:t}=(0,j.erX)();return{style:{marginBottom:"var(--nb-spacing)"},hidden:!t&&P.default.isEmpty(e.properties)}};var I=o(68106);function T(e){let t,{params:o,parseVariableLoading:l}=(0,I.Z)(e);return e.association&&(t=(0,v.M)(e.association)),{params:o,parentRecord:t,parseVariableLoading:l}}function D(){return{}}function L(){return{}}function Y(e){let t;return e.association&&(t=(0,v.M)(e.association)),{parentRecord:t}}function R(){return{}}function B(){}var N=o(69744),E=o(67722),$=o(46539),z=o(99300);let O=e=>(0,n.jsx)(z.Bw,{initializer:!1,...e});function q(){}function H(){}function V(){return(0,_.xp)()}var U=o(34214);let G=()=>{(0,U.e)()};var K=o(76706),W=o(69575),J=o(80461),X=o(2314),Z=o(27404),Q=o(64679),ee=o(44374),et=o(46724),eo=o(83508);let el=(e,t,o)=>{(0,X.untracked)(()=>{void 0===e[t]&&(e[t]=o)})},en=e=>{var t,o,l,a,i,s;let d=(0,j.lum)(),u=(0,F.useField)(),c=(0,F.useFieldSchema)(),{getInterface:p}=(0,ee.useCollectionManager_deprecated)(),{uiSchema:m,defaultValue:h,interface:x}=(0,et.E1)(),{isAllowToSetDefaultValue:v}=(0,eo.eT)(),f=p(x),g=(null==f||null==(o=f.filterable)||null==(t=o.operators)?void 0:t.find((e,t)=>e.value===(null==c?void 0:c["x-filter-operator"])))||(null==f||null==(a=f.filterable)||null==(l=a.operators)?void 0:l[0]),b=(0,j.xZI)((null==g||null==(i=g.schema)?void 0:i["x-component"])||(null==(s=c["x-component-props"])?void 0:s.component)||(null==m?void 0:m["x-component"])||"Input"),y=(0,_.Es)(),S=(0,J.S)(null==m?void 0:m["x-use-component-props"],e);if((0,r.useEffect)(()=>{var e;if(!m)return;let t=d(m);if(el(u,"content",t["x-content"]),el(u,"title",t.title),el(u,"description",t.description),null==y?void 0:y.form){let e=v()?c.default||h:void 0;null!=e&&el(u,"initialValue",e)}!u.validator&&(t["x-validator"]||c["x-validator"])&&(u.validator=(0,P.concat)([],t["x-validator"]||[],c["x-validator"]||[])),!0===c["x-disabled"]&&(u.disabled=!0),!0===c["x-read-pretty"]&&(u.readPretty=!0),void 0===c.required&&(u.required=!!t.required),u.dataSource=t.enum,u.data=u.data||{},u.data.dataSource=null==t?void 0:t.enum;let o=d({...(null==g||null==(e=g.schema)?void 0:e["x-component-props"])||{},...t["x-component-props"]||{},...(null==c?void 0:c["x-component-props"])||{}})||{};u.componentProps=(0,Z.merge)(u.componentProps||{},o,S||{})},[m]),!m)return null;let k={...e,...S};return(0,ee.isVariable)(k.value)&&k.value===c.default&&(k.value=void 0),(0,n.jsx)(b,{...k})},ea=(0,F.connect)(e=>{let t=(0,F.useFieldSchema)();return(0,n.jsx)(Q.ErrorBoundary,{FallbackComponent:j.xPi.Modal,onError:e=>console.log(e),children:(0,n.jsx)(et.Ey,{name:t.name,children:(0,n.jsx)(en,{...e})})})});ea.displayName="FilterCollectionField";var er=o(6565);let ei=(0,J.T)(e=>{let t=(0,F.useFieldSchema)()["x-filter-operators"]||{};return(0,n.jsx)(j.t6u,{components:{CollectionField:ea},children:(0,n.jsx)(er.k,{defaultOperators:t,children:(0,n.jsx)(j.QoO,{value:{utc:!1},children:(0,n.jsx)(z.UY,{isAllowToSetDefaultValue:()=>!1,children:(0,n.jsx)(W.UU,{isInFilterFormBlock:!0,children:(0,n.jsx)(_.r1,{name:"filter-form",...e,confirmBeforeClose:!1})})})})})})});var es=o(11251),ed=o(70892),eu=o(14411),ec=o(55102),ep=o(73761);let em=e=>(0,n.jsx)(j.t6u,{components:{TableFieldProvider:eu.Cc,TableBlockProvider:ed.to,TableSelectorProvider:ec.j4,FormBlockProvider:_.r1,FilterFormBlockProvider:ei,FormFieldProvider:es.UJ,DetailsBlockProvider:K.f0,RecordLink:l.Ur,Slider:a.Slider},scope:{...ep,useSourceIdFromRecord:l.ZC,useSourceIdFromParentRecord:l.hY,useParamsFromRecord:l.DQ,useFormBlockProps:_.xp,useCreateFormBlockProps:k,useCreateFormBlockDecoratorProps:S,useEditFormBlockDecoratorProps:M,useEditFormBlockProps:w,useFormFieldProps:es.U5,useDetailsBlockProps:K.nw,useDetailsProps:h.Y,useDetailsWithPaginationProps:p.y,useDetailsDecoratorProps:m.D,useDetailsWithPaginationDecoratorProps:c.B,useTableFieldProps:eu.cY,useTableBlockProps:$.Z,useTableSelectorProps:ec.fX,useTableBlockDecoratorProps:E.A,useListBlockDecoratorProps:Y,useListBlockProps:R,useTableSelectorDecoratorProps:B,useCollapseBlockDecoratorProps:q,useFilterFormBlockProps:V,useFilterFormBlockDecoratorProps:H,useGridCardBlockDecoratorProps:T,useGridCardBlockItemProps:D,useGridCardBlockProps:L,useFormItemProps:G,useDataFormItemProps:C.Z,useGridCardActionBarProps:A},children:e.children});class eh extends i.k{async load(){this.addComponents(),this.addScopes()}addComponents(){this.app.addComponents({TableFieldProvider:eu.Cc,TableBlockProvider:ed.to,TableSelectorProvider:ec.j4,FormBlockProvider:_.r1,FilterFormBlockProvider:ei,FormFieldProvider:es.UJ,DetailsBlockProvider:K.f0,RecordLink:l.Ur,BlockSchemaToolbar:u.C,ActionSchemaToolbar:d,FormItemSchemaToolbar:x.i,CollapseItemSchemaToolbar:O,TableColumnSchemaToolbar:N.l,Slider:a.Slider})}addScopes(){this.app.addScopes({...ep,useSourceIdFromRecord:l.ZC,useSourceIdFromParentRecord:l.hY,useParamsFromRecord:l.DQ,useFormBlockProps:_.xp,useCreateFormBlockProps:k,useCreateFormBlockDecoratorProps:S,useEditFormBlockDecoratorProps:M,useEditFormBlockProps:w,useFormFieldProps:es.U5,useDetailsBlockProps:K.nw,useDetailsProps:h.Y,useDetailsWithPaginationProps:p.y,useDetailsDecoratorProps:m.D,useDetailsWithPaginationDecoratorProps:c.B,useTableFieldProps:eu.cY,useTableBlockProps:$.Z,useTableSelectorProps:ec.fX,useTableBlockDecoratorProps:E.A,useListBlockDecoratorProps:Y,useListBlockProps:R,useTableSelectorDecoratorProps:B,useCollapseBlockDecoratorProps:q,useFilterFormBlockProps:V,useFilterFormBlockDecoratorProps:H,useGridCardBlockDecoratorProps:T,useGridCardBlockProps:L,useGridCardBlockItemProps:D,useFormItemProps:G,useDataFormItemProps:C.Z,useGridCardActionBarProps:A})}}var ex=o(70136),ev=o(35123)},77624(e,t,o){o.d(t,{US:()=>d,W:()=>c,gV:()=>u});var l=o(71178),n=o(51649),a=o(16211),r=o(41897);let i=(0,n.createContext)({historyCollections:[],refreshCH:()=>void 0});i.displayName="CollectionHistoryContext";let s={resource:"collectionsHistory",action:"list",params:{paginate:!1,appends:["fields"],filter:{},sort:["sort"]}},d=e=>{var t;let o=(0,a.VB)(),d=(0,r.MJ)(),u=o.auth.getToken()||"",c=(0,a.bP)(s,{refreshDeps:[d,u],ready:!!(d&&u)}),p=(0,n.useCallback)(async()=>{let{data:e}=await o.request(s);return c.mutate(e),(null==e?void 0:e.data)||[]},[c]),m=(0,n.useMemo)(()=>{var e;return{historyCollections:null==(e=c.data)?void 0:e.data,refreshCH:p}},[p,null==(t=c.data)?void 0:t.data]);return(0,l.jsx)(i.Provider,{value:m,children:e.children})},u=e=>{let{historyCollections:t}=(0,n.useContext)(i);return(null==t?void 0:t.filter(t=>e.includes(t.name)))||[]},c=()=>(0,n.useContext)(i)},43353(e,t,o){o.d(t,{Ho:()=>h,RH:()=>m,nq:()=>c,q0:()=>x});var l=o(71178),n=o(51649),a=o(16211),r=o(26174),i=o(14669),s=o(77624),d=o(46089),u=o(36362);let c=e=>(0,l.jsx)(r.Pf,{children:(0,l.jsx)(d.X,{children:e.children})}),p=(0,n.createContext)(!1),m=()=>(0,n.useContext)(p),h=e=>{let t=(0,i.m6)(),{refreshCH:o}=(0,s.W)(),n=(0,a.bP)(()=>t.reload().then(o));return(0,l.jsx)(p.Provider,{value:n.loading,children:(0,l.jsx)(c,{...e})})},x=e=>{var t;let{service:o,refreshCategory:a}=e,r=(0,n.useMemo)(()=>{var t;return{data:null==o||null==(t=o.data)?void 0:t.data,refresh:a,...e}},[null==o||null==(t=o.data)?void 0:t.data,a,e]);return(0,l.jsx)(u.C.Provider,{value:r,children:e.children})}},46089(e,t,o){o.d(t,{X:()=>c});var l=o(71178),n=o(51649),a=o(44374),r=o(45422),i=o(78406),s=o(47442),d=o(63586);let u={SubFieldDataSourceProvider_deprecated:d.Jq,DataSourceProvider_deprecated:d.T8,CollectionProvider_deprecated:r.i,ResourceActionProvider:i.mD},c=e=>{let t=(0,n.useMemo)(()=>({cm:{...s,useDataSourceFromRAC:i.PN},ds:d.ds}),[]);return(0,l.jsx)(a.SchemaComponentOptions,{scope:t,components:u,children:e.children})}},45422(e,t,o){o.d(t,{i:()=>r});var l=o(71178),n=o(49621),a=o(26174);o(51649);let r=e=>{let{children:t,allowNull:o,name:r,dataSource:i,collection:s}=e;return i?(0,l.jsx)(a.Pf,{dataSource:i,children:(0,l.jsx)(n.Yz,{allowNull:o,name:r||s,children:t})}):(0,l.jsx)(n.Yz,{allowNull:o,name:r||s,children:t})}},78406(e,t,o){o.d(t,{PN:()=>x,aB:()=>d,br:()=>h,mD:()=>m,xh:()=>v});var l=o(71178),n=o(56920),a=o(51649),r=o(43288),i=o(44374),s=o(16211);let d=(0,a.createContext)(null);d.displayName="ResourceActionContext";let u=(0,a.createContext)(null);u.displayName="ResourceContext";let c=e=>{var t,o,n;let{collection:r,request:c,uid:p,dragSort:m}=e,h=(0,s.VB)(),x=(0,i.useRecord)(),v=null==c?void 0:c.action,_={};"get"===v&&(_.filterByTk=x[r.targetKey||r.filterTargetKey||"id"]);let{appends:f,disableDefaultAppends:g,...b}=(null==c?void 0:c.params)||{},y=(null==r||null==(o=r.fields)||null==(t=o.filter)?void 0:t.call(o,e=>e.target).map(e=>e.name))||[],S=g?f||[]:[...y,...f||[]],k=S.length>0,C=(0,s.bP)({...c,params:{..._,...b,...k?{appends:S}:{},sort:m?[!0===r.sortable?"sort":r.sortable]:null==c||null==(n=c.params)?void 0:n.sort}},{uid:p}),M=h.resource(c.resource),w=(0,a.useMemo)(()=>({...C,defaultRequest:c,dragSort:m}),[m,c,C]),F=(0,a.useMemo)(()=>({type:"collection",resource:M,collection:r}),[r,M]);return(0,l.jsx)(u.Provider,{value:F,children:(0,l.jsx)(d.Provider,{value:w,children:(0,l.jsx)(i.CollectionProvider_deprecated,{collection:r,children:e.children})})})},p=e=>{var t,o;let{collection:n,association:r,request:c,uid:p,dragSort:m}=e,h=(0,s.VB)(),x=(0,i.useRecord)()[r.sourceKey],{appends:v,disableDefaultAppends:_,...f}=(null==c?void 0:c.params)||{},g=(null==n||null==(o=n.fields)||null==(t=o.filter)?void 0:t.call(o,e=>e.target).map(e=>e.name))||[],b=_?v||[]:[...g,...v||[]],y=b.length>0,S=(0,s.bP)({resourceOf:x,...c,params:{...f,...y?{appends:b}:{}}},{uid:p}),k=h.resource(c.resource,x),C=(0,a.useMemo)(()=>({type:"association",resource:k,association:r,collection:n}),[r,n,k]),M=(0,a.useMemo)(()=>({...S,defaultRequest:c,dragSort:m}),[m,c,S]);return(0,l.jsx)(u.Provider,{value:C,children:(0,l.jsx)(d.Provider,{value:M,children:(0,l.jsx)(i.CollectionProvider_deprecated,{collection:n,children:e.children})})})},m=e=>{var t;let{collection:o,request:n}=e,{getCollection:a}=(0,r.nj)();return("string"==typeof o&&(o=a(o)),o)?(null==n||null==(t=n.resource)?void 0:t.includes("."))?(0,l.jsx)(p,{...e,collection:o}):(0,l.jsx)(c,{...e,collection:o}):null},h=()=>(0,a.useContext)(d)||{},x=e=>{let t=(0,a.useContext)(d),o=(0,n.useField)();return(0,a.useEffect)(()=>{t.loading||(null==e||e.onSuccess(t.data),o.componentProps.dragSort=!!t.dragSort)},[t.loading]),t},v=()=>{let{type:e,resource:t,collection:o,association:l}=(0,a.useContext)(u)||{};return{type:e,resource:t,collection:o,association:l,targetKey:(null==l?void 0:l.targetKey)||(null==o?void 0:o.filterTargetKey)||(null==o?void 0:o.targetKey)||"id"}}},47442(e,t,o){o.r(t),o.d(t,{isDeleteButtonDisabled:()=>z,useBulkDestroyAction:()=>Y,useBulkDestroyActionAndRefreshCM:()=>O,useCancelAction:()=>v,useChildrenCollections:()=>y,useCollectionFieldsOptions:()=>w,useCollectionFilterOptions:()=>k,useCollectionFilterOptionsV2:()=>C,useCreateAction:()=>j,useCreateActionAndRefreshCM:()=>B,useCreateActionWithoutRefresh:()=>A,useDeleteButtonDisabled:()=>$,useDestroyAction:()=>L,useDestroyActionAndRefreshCM:()=>E,useFilterAction:()=>P,useFilterActionProps:()=>q,useFilterDataSource:()=>F,useKanbanEvents:()=>g,useLinkageCollectionFilterOptions:()=>M,useMoveAction:()=>T,useResetFilterAction:()=>f,useSelfAndChildrenCollections:()=>S,useSortFields:()=>b,useUpdateAction:()=>D,useUpdateActionAndRefreshCM:()=>N,useUpdateViewAction:()=>I,useValuesFromRA:()=>R,useValuesFromRecord:()=>_});var l=o(56920),n=o(52793),a=o(77583),r=o(13791),i=o(57453),s=o(51649),d=o(77843),u=o(43288),c=o(16211),p=o(41944),m=o(82924),h=o(72548),x=o(78406);let v=()=>{let e=(0,l.useForm)(),t=(0,m.D50)();return{async run(){t.setVisible(!1),e.reset()}}},_=e=>{let t=(0,p.pE)(),o=(0,c.bP)(()=>Promise.resolve({data:(0,i.default)((0,r.default)(t),["__parent","__collectionName"])}),{...e,manual:!0}),l=(0,m.D50)();return(0,s.useEffect)(()=>{l.visible&&o.run()},[l.visible]),o},f=()=>{let{run:e}=(0,x.br)(),t=(0,l.useForm)(),o=(0,m.D50)();return{async run(){t.reset(),e(),o.setVisible(!1)}}},g=()=>{let{resource:e}=(0,u.k7)();return{async onCardDragEnd(t,o,l){var n,a;let{columns:r,groupField:i}=t,{fromColumnId:s,fromPosition:d}=o,{toColumnId:u,toPosition:c}=l,p=r.find(e=>e.id===s),m=r.find(e=>e.id===u),h=null==p||null==(n=p.cards)?void 0:n[d],x=null==m||null==(a=m.cards)?void 0:a[c],v={sourceId:h.id,sortField:`${i.name}_sort`};x?v.targetId=x.id:v.targetScope={[i.name]:u},await e.move(v)}}},b=e=>{let{getCollectionFields:t,getInterface:o}=(0,u.nj)();return t(e).filter(e=>{if(!e.interface)return!1;let t=o(e.interface);return null!=t&&!!t.sortable}).map(e=>{var t;return{value:e.name,label:(null==e||null==(t=e.uiSchema)?void 0:t.title)||e.name}})},y=e=>{let{getChildrenCollections:t}=(0,u.nj)();return t(e).map(e=>({value:e.name,label:(null==e?void 0:e.title)||e.name}))},S=e=>{let{getChildrenCollections:t,getCollection:o}=(0,u.nj)(),l=t(e),n=o(e);if(!e)return null;let a=l.map(e=>({value:e.name,label:(null==e?void 0:e.title)||e.name}));return a.unshift({value:n.name,label:(null==n?void 0:n.title)||n.name}),a},k=(e,t)=>{let{getCollectionFields:o,getInterface:l}=(0,u.nj)();return(0,s.useMemo)(()=>{let n=o(e,t),a=(e,n)=>{let r=[];return e.forEach(e=>{let i=((e,n)=>{var r,i,s;if(!e.interface)return;let d=l(e.interface);if(!(null==d?void 0:d.filterable))return;let{nested:u,children:c,operators:p}=d.filterable,m={name:e.name,title:(null==e||null==(r=e.uiSchema)?void 0:r.title)||e.name,label:(null==e||null==(i=e.uiSchema)?void 0:i.title)||e.name,value:e.name,schema:null==e?void 0:e.uiSchema,operators:(null==p||null==(s=p.filter)?void 0:s.call(p,t=>!(null==t?void 0:t.visible)||t.visible(e)))||[],interface:e.interface};if(!e.target||!(n>2)){if(n>2)return m;if((null==c?void 0:c.length)&&(m.children=c),u){let l=a(o(e.target,t),n+1).filter(Boolean);m.children=m.children||[],m.children.push(...l)}return m}})(e,n);i&&r.push(i)}),r};return a(n,1)},[a.default.isString(e)?e:null==e?void 0:e.name,t])},C=e=>{let{getCollectionFields:t,getInterface:o}=(0,u.nj)();return{getFields:(0,s.useCallback)(()=>{let l=t(e),n=(e,l)=>{let a=[];return e.forEach(e=>{let r=((e,l)=>{var a,r;if(!e.interface)return;let i=o(e.interface);if(!(null==i?void 0:i.filterable))return;let{nested:s,children:d,operators:u}=i.filterable,c={name:e.name,title:(null==e||null==(a=e.uiSchema)?void 0:a.title)||e.name,schema:null==e?void 0:e.uiSchema,operators:(null==u||null==(r=u.filter)?void 0:r.call(u,t=>!(null==t?void 0:t.visible)||t.visible(e)))||[],interface:e.interface};if(!e.target||!(l>2)){if(l>2)return c;if((null==d?void 0:d.length)&&(c.children=d),s){let o=n(t(e.target),l+1).filter(Boolean);c.children=c.children||[],c.children.push(...o)}return c}})(e,l);r&&a.push(r)}),a};return n(l,1)},[a.default.isString(e)?e:null==e?void 0:e.name])}},M=e=>{let{getCollectionFields:t,getInterface:o}=(0,u.nj)(),l=t(e),n=(e,l)=>{let a=[];return e.forEach(e=>{let r=((e,l)=>{var a,r;if(!e.interface)return;let i=o(e.interface);if(!(null==i?void 0:i.filterable))return;let{nested:s,children:d,operators:u}=i.filterable,c={name:e.name,title:(null==e||null==(a=e.uiSchema)?void 0:a.title)||e.name,schema:null==e?void 0:e.uiSchema,operators:(null==u||null==(r=u.filter)?void 0:r.call(u,t=>!(null==t?void 0:t.visible)||t.visible(e)))||[],interface:e.interface};if(!e.target||!(l>2)){if(l>2)return c;if((null==d?void 0:d.length)&&(c.children=d),s){let o=n(t(e.target).filter(t=>["hasMany","belongsToMany"].includes(e.type)?!["hasOne","hasMany","belongsTo","belongsToMany"].includes(t.type):!["hasMany","belongsToMany"].includes(t.type)),l+1).filter(Boolean);c.children=c.children||[],c.children.push(...o)}return c}})(e,l);r&&a.push(r)}),a};return n(l,1)},w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],{getCollectionFields:l,getInterface:n}=(0,u.nj)(),a=l(e).filter(e=>!o.includes(e.interface)),r=(e,a,i)=>{let s=[];return e.forEach(e=>{let d=((e,a,i)=>{var s;if(!e.interface)return;let d=n(e.interface);if(!(null==d?void 0:d.filterable))return;let{nested:u,children:c}=d.filterable,p=i?`${i}.${e.name}`:e.name,m={...e,name:e.name,title:(null==e||null==(s=e.uiSchema)?void 0:s.title)||e.name,schema:null==e?void 0:e.uiSchema,key:p};if(!e.target||!(a>t)){if(a>t)return m;if((null==c?void 0:c.length)&&(m.children=c.map(t=>({...t,key:`${e.name}.${t.name}`}))),u){let t=r(l(e.target).filter(e=>!o.includes(e.interface)),a+1,e.name).filter(Boolean);m.children=m.children||[],m.children.push(...t)}return m}})(e,a,i);d&&s.push(d)}),s};return r(a,1)},F=e=>{let{name:t}=(0,u.k7)(),o=k(t);return(0,c.bP)(()=>Promise.resolve({data:o}),e)},P=()=>{let{run:e,params:t,defaultRequest:o}=(0,x.br)(),n=(0,l.useForm)(),a=(0,m.D50)(),[r,...i]=t;return{async run(){var t;let l=null==o||null==(t=o.params)?void 0:t.filter,s=l?{$and:[l,n.values.filter]}:n.values.filter;e({...r,filter:s},...i),a.setVisible(!1)}}},j=e=>{let t=(0,l.useForm)(),o=(0,l.useField)(),n=(0,m.D50)(),{refresh:a}=(0,x.br)(),{resource:r}=(0,x.xh)();return{async run(){try{var l;await t.submit(),o.data=o.data||{},o.data.loading=!0;let i=await r.create({values:t.values});n.setVisible(!1),null==e||e(null==i||null==(l=i.data)?void 0:l.data),await t.reset(),o.data.loading=!1,a()}catch(e){o.data&&(o.data.loading=!1)}}}},A=e=>{let t=(0,l.useForm)(),{resource:o}=(0,x.xh)();return{async run(){var l;await t.submit();let n=await o.create({values:t.values});null==e||e(null==n||null==(l=n.data)?void 0:l.data),await t.reset()}}},I=e=>{let t=(0,l.useForm)();(0,m.D50)();let{resource:o,targetKey:a}=(0,x.xh)(),{[a]:r}=(0,p.pE)();return{async run(){var l;await t.submit();let a=await o.update({filterByTk:r,values:t.values});null==e||e(r,null==a||null==(l=a.data)?void 0:l.data),n.message.success("保存成功")}}},T=()=>{let{resource:e}=(0,x.xh)(),{refresh:t}=(0,x.br)();return{async move(o,l){await e.move({sourceId:o.id,targetId:l.id}),t()}}},D=e=>{let t=(0,l.useField)(),o=(0,l.useForm)(),n=(0,m.D50)(),{refresh:a}=(0,x.br)(),{resource:r,targetKey:i}=(0,x.xh)(),{[i]:s}=(0,p.pE)();return{async run(){await o.submit(),t.data=t.data||{},t.data.loading=!0;try{var l;let t=await r.update({filterByTk:s,values:o.values});n.setVisible(!1),null==e||e(s,null==t||null==(l=t.data)?void 0:l.data),await o.reset(),a()}catch(e){console.log(e)}finally{t.data.loading=!1}}}},L=e=>{let{refresh:t}=(0,x.br)(),{resource:o,targetKey:l}=(0,x.xh)(),{[l]:n}=(0,p.pE)();return{async run(){await o.destroy({filterByTk:n}),null==e||e(n),t()}}},Y=e=>{let{state:t,setState:o,refresh:l}=(0,x.br)(),{resource:a}=(0,x.xh)(),{t:r}=(0,d.useTranslation)();return{async run(){var i;if(!(null==t||null==(i=t.selectedRowKeys)?void 0:i.length))return n.message.error(r("Please select the records you want to delete"));await a.destroy({filterByTk:(null==t?void 0:t.selectedRowKeys)||[]}),null==e||e(null==t?void 0:t.selectedRowKeys),null==o||o({selectedRowKeys:[]}),l()}}},R=e=>{let t=(0,x.br)();return(0,c.bP)(()=>Promise.resolve(t.data),{...e,refreshDeps:[t.data]})},B=()=>{let{run:e}=j(),{refreshCM:t}=(0,u.nj)();return{async run(){await e(),await t()}}},N=()=>{let{run:e}=D(),{refreshCM:t}=(0,u.nj)();return{async run(){await e(),await t()}}},E=()=>{let{run:e}=L(),{refreshCM:t}=(0,u.nj)();return{async run(){await e(),await t()}}},$=e=>{let t=(0,p.pE)();return z(e||t)},z=e=>{let{interface:t,deletable:o=!0}=e||{};return!o||"id"===t},O=()=>{let{run:e}=Y(),{refreshCM:t}=(0,u.nj)();return{async run(){await e(),await t()}}},q=()=>{var e,t;let{collection:o}=(0,x.xh)(),l=(0,h.g9)(o.fields),n=(0,x.br)();return(0,h.yG)({options:l.filter(e=>["title","name"].includes(e.name)),params:(null==(t=n.state)||null==(e=t.params)?void 0:e[0])||n.params,service:n})}},36362(e,t,o){o.d(t,{C:()=>l});let l=(0,o(51649).createContext)({data:[],refresh:()=>{}});l.displayName="CollectionCategoriesContext"},20492(e,t,o){o.d(t,{gp:()=>s,nj:()=>d.n,LF:()=>c,k7:()=>l.k});var l=o(51281),n=o(16211),a=o(46724),r=o(41944),i=o(82924);let s=()=>{let e=(0,l.k)(),t=(0,r.pE)(),o=(0,n.VB)(),s=(0,i.lum)(),d=(0,a.E1)();if(!d)return{};let u=`${(null==d?void 0:d.collectionName)||(null==e?void 0:e.name)}.${d.name}`,c=null==o?void 0:o.resource(u,t[d.sourceKey]);return{...d,uiSchema:s(d.uiSchema),resource:c}};var d=o(61500),u=o(2314);function c(e){let t=(0,i.lum)(),{collections:o=[]}=(0,d.n)();return l=>{u.action.bound(o=>{l.dataSource=("function"==typeof e?o.filter(e):o).map(e=>({label:t(e.title),value:e.name}))})(o)}}},61500(e,t,o){o.d(t,{n:()=>c});var l=o(27404),n=o(77583),a=o(51649),r=o(26174),i=o(67574),s=o(14669),d=o(23460),u=o(82924);let c=e=>{let t=(0,s.m6)(),o=(0,d.xw)(),c=(0,r.r2)(),p=e||(null==o?void 0:o.key)||void 0,[m,h]=(0,a.useState)((0,l.uid)()),{refresh:x}=(0,u.Fag)(),v=(0,a.useMemo)(()=>{var e;return null==t||null==(e=t.collectionFieldInterfaceManager)?void 0:e.getFieldInterfaces().reduce((e,t)=>(e[t.name]=t,e),{})},[t,m]),_=(0,a.useMemo)(()=>null==t?void 0:t.collectionTemplateManager.getCollectionTemplates(),[t,m]),f=(0,a.useCallback)(()=>{var e,o;return null==t||null==(o=t.getDataSource(p))||null==(e=o.collectionManager)?void 0:e.getCollections().map(e=>e.getOptions())},[t,o]),g=(0,a.useCallback)(e=>{var o;return c&&!e?c:null==t||null==(o=t.getDataSource(e||p))?void 0:o.collectionManager},[c,t,p]),b=(0,a.useMemo)(()=>{var e,o;return null==t||null==(o=t.getDataSource(i.Ze))||null==(e=o.collectionManager)?void 0:e.getCollections()},[t,m]),y=(0,a.useCallback)(()=>null==t?void 0:t.getDataSource(i.Ze).reload().then(()=>{x(),h((0,l.uid)())}),[t]),S=(0,a.useCallback)(()=>null==t?void 0:t.getDataSource(i.Ze).reload().then(()=>{x(),h((0,l.uid)())}),[t]),k=(0,u.lum)(),C=(0,a.useCallback)((e,t)=>{var o,l;return(null==(l=g(t))||null==(o=l.getCollection(e))?void 0:o.getInheritedFields())||[]},[t,g]),M=(0,a.useCallback)((e,t)=>{var o,l;if(!e)return[];let n=null==(o=g(t))?void 0:o.getCollection(e);return(null==n||null==(l=n.getAllFields)?void 0:l.call(n))||(null==n?void 0:n.getFields())||[]},[t,g]),w=(0,a.useCallback)((e,t)=>{var o;if(e&&!(e.split(".").length<2))return null==(o=g(t))?void 0:o.getCollectionField(e)},[t,g]),F=(0,a.useCallback)((e,t)=>{var o,l;return e&&(null==(l=g(t))||null==(o=l.getCollection(e))?void 0:o.getParentCollectionsName())||[]},[t,g]),P=(0,a.useCallback)(function(e){var t;let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=arguments.length>2?arguments[2]:void 0;if(!e)return[];let n=null==(t=g(l))?void 0:t.getCollection(e);return(null==n?void 0:n.getChildrenCollections(o))||[]},[t,g]),j=(0,a.useCallback)((e,t)=>{var o,l;return e&&(null==(l=g(t))||null==(o=l.getCollection(e))?void 0:o.getCurrentFields())||[]},[t,g]),A=(0,a.useCallback)((e,t,o,l)=>{var a;let{association:r=!1,cached:i={},collectionNames:s=[e],maxDepth:d=1,allowAllTypes:u=!1,exceptInterfaces:c=[],prefixFieldValue:p="",usePrefix:m=!1,dataSource:h}=l||{};if(s.length-1>d)return;if(i[e])return n.default.cloneDeep(i[e]);t&&"string"==typeof t&&(t=[t]),o&&"string"==typeof o&&(o=[o]);let x=M(e,h),v=null==x||null==(a=x.filter(l=>l.interface&&!c.includes(l.interface)&&(u||t&&t.includes(l.type)||o&&o.includes(l.interface)||!!(r&&l.target&&l.target!==e&&Array.isArray(r))&&r.includes(l.interface))))?void 0:a.map(e=>{var n,a;let d={value:m&&p?`${p}.${e.name}`:e.name,label:k(null==e||null==(n=e.uiSchema)?void 0:n.title)||e.name,...e};return r&&e.target&&(d.children=s.includes(e.target)?[]:A(e.target,t,o,{...l,cached:i,dataSource:h,collectionNames:[...s,e.target],prefixFieldValue:m?p?`${p}.${e.name}`:e.name:"",usePrefix:m}),!(null==(a=d.children)?void 0:a.length))?null:d}).filter(Boolean);return i[e]=v,v},[M]),I=(0,a.useCallback)((e,t)=>{var o;return null==(o=g(t))?void 0:o.getCollection(e)},[t,g]),T=(0,a.useCallback)((e,t)=>{var o,l;return null==(l=g(t))||null==(o=l.getCollection(e))?void 0:o.getAllCollectionsInheritChain()},[t,g]),D=(0,a.useCallback)((e,t)=>()=>{var o,l;return null==(l=g(t))||null==(o=l.getCollection(e))?void 0:o.getInheritCollectionsChain()},[t,g]),L=(0,a.useCallback)(e=>null==t?void 0:t.collectionFieldInterfaceManager.getFieldInterface(e),[t]),Y=(0,a.useCallback)(e=>{var t;return null==(t=L(e.interface))?void 0:t.titleUsable},[L]),R=(0,a.useCallback)((e,t,o)=>{var l,n;return null==(n=g(o))||null==(l=n.getCollection(t))?void 0:l.getParentCollectionFields(e)},[t,g]);return{service:y,interfaces:v,collections:b,templates:_,getTemplate:(0,a.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"general";return null==t?void 0:t.collectionTemplateManager.getCollectionTemplate(e)},[t]),getInterface:L,getCollections:f,getParentCollectionFields:R,getInheritCollections:F,getChildrenCollections:P,refreshCM:S,get:I,getInheritedFields:C,getCollectionField:w,getCollectionFields:M,getCollectionFieldsOptions:A,getCurrentCollectionFields:j,getCollection:I,getCollectionJoinField:w,getAllCollectionsInheritChain:T,getInheritCollectionsChain:D,isTitleField:Y}}},51281(e,t,o){o.d(t,{k:()=>r});var l=o(16211),n=o(51649),a=o(49621);let r=()=>{var e;let t=(0,a.Ge)(),o=(0,l.VB)(),r=null==o?void 0:o.resource(null==t?void 0:t.name),i=(0,n.useMemo)(()=>(null==t?void 0:t.fields)||[],[t]),s=(0,n.useMemo)(()=>{var e;return(null==t||null==(e=t.getInheritedFields)?void 0:e.call(t))||[]},[t]),d=(0,n.useMemo)(()=>{var e,o;return(null==t||null==(e=t.getAllFields)?void 0:e.call(t))||(null==t||null==(o=t.getFields)?void 0:o.call(t))||[]},[t]),u=(0,n.useMemo)(()=>{var e;return(null==t||null==(e=t.getForeignKeyFields)?void 0:e.call(t))||[]},[t]),c=(0,n.useCallback)(()=>null==d?void 0:d.find(e=>e.treeParent),[d]),p=(0,n.useCallback)(e=>{var o;return null==t||null==(o=t.getField)?void 0:o.call(t,e)},[t]),m=(0,n.useCallback)(()=>null==t?void 0:t.getPrimaryKey(),[t]);return{...null==t||null==(e=t.getOptions)?void 0:e.call(t),resource:r,getTreeParentField:c,fields:d,getField:p,getPrimaryKey:m,currentFields:i,inheritedFields:s,foreignKeyFields:u}}},43288(e,t,o){o.d(t,{qS:()=>eu,io:()=>i.i,ju:()=>tP,Ik:()=>eL,uk:()=>eY,Jq:()=>tW.Jq,OU:()=>n.useCollectionFilterOptions,lY:()=>n.useSortFields,E2:()=>eW.dateTimeProps,sf:()=>e5,F8:()=>eU,ur:()=>tk,Jx:()=>ex,g7:()=>I,W5:()=>tY,UF:()=>tr,C8:()=>eW.collectionDataSource,aB:()=>y.aB,q:()=>eW,nO:()=>O,VA:()=>e9,Si:()=>tv,B9:()=>tc,P$:()=>L,LF:()=>S.LF,ry:()=>em,Am:()=>eW.unique,Mi:()=>eV,BK:()=>eD,ZC:()=>eN,YZ:()=>eB,CF:()=>e4,Ho:()=>a.Ho,Lj:()=>eq,Uq:()=>$,N1:()=>eW.autoIncrement,pA:()=>ee,TC:()=>e0,$e:()=>ts,T8:()=>tW.T8,V:()=>eh,fn:()=>eH,Kv:()=>ta,wv:()=>tb,xq:()=>eG,N8:()=>es,Xm:()=>r.X,Mw:()=>eW.reverseFieldProperties,uq:()=>eR,YK:()=>tw,B1:()=>eW.relationshipType,II:()=>eW.operators,NU:()=>n.useLinkageCollectionFilterOptions,Nr:()=>e8,CT:()=>tA,l7:()=>D,h1:()=>e7,gp:()=>S.gp,CI:()=>eK.C,YG:()=>ea,IE:()=>ec,mD:()=>y.mD,if:()=>tp,X6:()=>tS,Gs:()=>eW.defaultProps,A9:()=>eE,g:()=>G,Nc:()=>tI,Po:()=>te,US:()=>tJ.US,qQ:()=>U,Sd:()=>t_,Li:()=>ti,ms:()=>tu,IL:()=>th,OA:()=>tM,mK:()=>eW.recordPickerViewer,kg:()=>eW.timeProps,gV:()=>tJ.gV,br:()=>y.br,Sv:()=>tZ,RH:()=>a.RH,Nj:()=>tm,nF:()=>tT,xS:()=>tC,u6:()=>eg,Hu:()=>tX,ds:()=>tW.ds,$N:()=>tg,q0:()=>a.q0,PN:()=>y.PN,n0:()=>N,w7:()=>en,vv:()=>e6,nj:()=>S.nj,sN:()=>R,hu:()=>tW.hu,mY:()=>H,Yy:()=>eM,Kf:()=>tK,qT:()=>tL,jY:()=>Q,Pg:()=>Y,k7:()=>S.k7,w3:()=>ez,nq:()=>a.nq,WW:()=>tz,ie:()=>eW.primaryKey,oO:()=>eo,WL:()=>n.isDeleteButtonDisabled,OK:()=>tF,A8:()=>tj,Tt:()=>n.useCollectionFieldsOptions,a1:()=>tR,Ex:()=>eW.dataSource,fZ:()=>tD,NW:()=>eW.type,xh:()=>y.xh,mJ:()=>E,Em:()=>td,NL:()=>tf,Jn:()=>ep,jg:()=>eW.constraintsProps,Y7:()=>n.useCancelAction,SB:()=>tx,yu:()=>el,Xk:()=>tt,xG:()=>eC,em:()=>e3,Yf:()=>tn,l5:()=>eW.autoFill,D0:()=>B,W:()=>tJ.W,jc:()=>e2,QZ:()=>ty});var l={};o.r(l),o.d(l,{FieldValidation:()=>I,ForeignKey:()=>E,SourceCollection:()=>R,SourceForeignKey:()=>D,SourceKey:()=>B,TargetForeignKey:()=>Y,TargetKey:()=>N,ThroughCollection:()=>$,ThroughForeignKey:()=>L});var n=o(47442),a=o(43353),r=o(46089),i=o(45422),s=o(44814),d=o(71178),u=o(82113),c=o(56220),p=o(56920),m=o(27404),h=o(52793),x=o(77583),v=o(51649),_=o(77843),f=o(16211),g=o(41944),b=o(82924),y=o(78406),S=o(20492),k=o(94702);let C=()=>{let{data:{database:e}}=(0,k.gL)()||{data:{database:{}}};return{isDialect:t=>(null==e?void 0:e.dialect)===t,dialect:null==e?void 0:e.dialect}};var M=o(76821);let w="required",F=[{key:w,label:"Required",hasValue:!1,params:[]}],P={string:[...F,{key:"max",label:"Max length",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"min",label:"Min length",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"pattern",label:"Pattern",hasValue:!0,params:[{key:"regex",label:"Regular Expression",componentType:"text",required:!0}]},{key:"email",label:"Email",hasValue:!0,params:[{key:"allowFullyQualified",label:"Domains ending with a . character are permitted",componentType:"checkbox"},{key:"allowUnicode",label:"Unicode characters are permitted",componentType:"checkbox"},{key:"ignoreLength",label:"Ignore invalid email length errors",componentType:"checkbox"},{key:"minDomainSegments",label:"Min Domain Segments",componentType:"inputNumber",defaultValue:2},{key:"maxDomainSegments",label:"Max Domain Segments",componentType:"inputNumber"},{key:"tlds",label:"tlds",componentType:"radio",defaultValue:"iana",options:[{label:"IANA registry",value:"iana"},{label:"Disable validation",value:"disable"},{label:"Allow list",value:"allow",componentType:"text"},{label:"Deny list",value:"deny",componentType:"text"}]}],paramsType:"object"},{key:"uuid",label:"UUID",hasValue:!0,params:[{key:"version",label:"Version",componentType:"multipleSelect",options:[{label:"uuidv1",value:"uuidv1"},{label:"uuidv2",value:"uuidv2"},{label:"uuidv3",value:"uuidv3"},{label:"uuidv4",value:"uuidv4"},{label:"uuidv5",value:"uuidv5"},{label:"uuidv6",value:"uuidv6"},{label:"uuidv7",value:"uuidv7"},{label:"uuidv8",value:"uuidv8"}]},{key:"separator",label:"Separator",componentType:"singleSelect",options:[{label:"Must use `-` and `:`",value:!0},{label:"No allow `-` and `:`",value:!1},{label:"Only use `-`",value:"-"},{label:"Only use `_`",value:"_"},{label:"Only use `.`",value:"."}]}],paramsType:"object"},{key:"hex",label:"Hex",hasValue:!0,params:[{key:"prefix",label:"Prefix",componentType:"singleSelect",options:[{label:"Must use prefix",value:!0},{label:"No use prefix",value:!1},{label:"Optional prefix",value:"optional"}]},{key:"byteAligned",label:"Byte Aligned",componentType:"checkbox"}]},{key:"length",label:"Length",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"uri",label:"URI",hasValue:!0,params:[{key:"scheme",label:"Scheme",componentType:"multipleSelect",options:[{label:"http",value:"http"},{label:"https",value:"https"},{label:"ftp",value:"ftp"},{label:"file",value:"file"},{label:"ws",value:"ws"},{label:"wss",value:"wss"}]},{key:"allowRelative",label:"Allow relative URIs",componentType:"checkbox"},{key:"relativeOnly",label:"Restrict only relative URIs",componentType:"checkbox"},{key:"allowQuerySquareBrackets",label:"Allows unencoded square brackets inside the query string",componentType:"checkbox"},{key:"encodeUri",label:"Attempts to encode the URI using encodeURI before validating it again",componentType:"checkbox"}],paramsType:"object"}],number:[...F,{key:"greater",label:"Greater than",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"less",label:"Less than",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"max",label:"Max value",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"min",label:"Min value",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"multiple",label:"Multiple",hasValue:!0,params:[{key:"base",label:"Base",componentType:"inputNumber",required:!0}]},{key:"integer",label:"Integer",hasValue:!1,params:[]},{key:"precision",label:"Precision",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"unsafe",label:"Unsafe integer",hasValue:!1,params:[]}],date:[...F,{key:"greater",label:"Greater than",hasValue:!0,params:[{key:"date",label:"Date",componentType:"datePicker",required:!0}]},{key:"less",label:"Less than",hasValue:!0,params:[{key:"date",label:"Date",componentType:"datePicker",required:!0}]},{key:"max",label:"Max value",hasValue:!0,params:[{key:"date",label:"Date",componentType:"datePicker",required:!0}]},{key:"min",label:"Min value",hasValue:!0,params:[{key:"date",label:"Date",componentType:"datePicker",required:!0}]},{key:"timestamp",label:"Timestamp",hasValue:!0,params:[{key:"type",label:"Type",componentType:"singleSelect",options:[{label:"JavaScript",value:"javascript"},{label:"Unix",value:"unix"}],defaultValue:"javascript"}]}],object:[...F]};var j=o(78316),A=o(91815);let I=(0,p.observer)(e=>{let{value:t,onChange:o,type:l,availableValidationOptions:n,excludeValidationOptions:a,isAssociation:r}=e,{t:i}=(0,_.useTranslation)(),s=(0,M.useAntdToken)(),c=(0,j.css)`
57
+ `}:{simple:!0,hidden:g<=1,current:(null==(c=f.service)||null==(u=c.data)||null==(d=u.meta)?void 0:d.page)||1,total:g,pageSize:1,showSizeChanger:!1,align:"center",async onChange(e){var t,o;let l=null==(o=f.service)||null==(t=o.params)?void 0:t[0];f.service.run({...l,page:e})},style:{marginTop:24,textAlign:"center"}}},ed=()=>{var e,t,o,l,a;let r=x.AssociationFilter.useAssociationField(),{service:i,props:s}=(0,D.J6)(),d=(0,n.useFieldSchema)(),u=(0,g.nj)(),c=(null==r?void 0:r.target)?null==(e=u.getCollection(r.target))?void 0:e.getPrimaryKey():"id",p=(null==(o=d["x-component-props"])||null==(t=o.fieldNames)?void 0:t.label)||c,m=(0,n.useField)(),h=r.name,_=(0,x.useDataSourceHeaders)(null==s?void 0:s.dataSource),{data:f,params:b,run:y}=(0,v.bP)({headers:_,resource:r.target,action:"list",params:{fields:[p,c],pageSize:200,page:1,...null==(l=m.componentProps)?void 0:l.params}},{refreshDeps:[p,c,JSON.stringify((null==(a=m.componentProps)?void 0:a.params)||{})],debounceWait:300});return{list:(null==f?void 0:f.data)||[],onSelected:e=>{var t,o,l,n;let a=(null==(o=i.params)||null==(t=o[1])?void 0:t.filters)||{};e.length?a[`af.${h}`]={[`${h}.${c}.$in`]:e}:delete a[`af.${h}`],i.run({...null==(l=i.params)?void 0:l[0],pageSize:200,page:1,filter:(0,S.Dj)([...Object.values(a),null==s||null==(n=s.params)?void 0:n.filter])},{filters:a})},handleSearchInput:e=>{y({...null==b?void 0:b[0],filter:{[`${p}.$includes`]:e.target.value}})},params:b,run:y}},eu=()=>{let{currentFields:e=[]}=(0,g.k7)();return e.filter(e=>ec(e))},ec=e=>{var t;return["select","multipleSelect","checkbox","checkboxGroup","chinaRegion"].includes(null==e?void 0:e.interface)&&(null==e||null==(t=e.uiSchema)?void 0:t.enum)},ep=()=>{var e,t,o,l,a,r,i,s,u,c;let p,h,_,f,g,b,k,C,M=x.AssociationFilter.useAssociationField(),w=(0,n.useFieldSchema)(),F=eu(),{getDataBlocks:P}=(0,y.xZ)(),j=null==M?void 0:M.name,A=(0,n.useField)(),{props:I}=(0,D.J6)(),T=(0,x.useDataSourceHeaders)(null==I?void 0:I.dataSource),L=(0,x.useCollectionManager)(),{filter:Y,parseVariableLoading:R}=(0,x.useParsedFilter)({filterOption:null==(t=A.componentProps)||null==(e=t.params)?void 0:e.filter});b=(null==M?void 0:M.target)?null==L||null==(o=L.getCollection(M.target))?void 0:o.getPrimaryKey():"id",k=(null==(a=w["x-component-props"])||null==(l=a.fieldNames)?void 0:l.label)||b,({data:g,params:_,run:f}=(0,v.bP)({headers:T,resource:null==M?void 0:M.target,action:"list",params:{fields:[k,b],pageSize:200,page:1,...null==(r=A.componentProps)?void 0:r.params,filter:Y}},{manual:!0,debounceWait:300})),(0,m.useEffect)(()=>{M&&!ec(M)&&!1===R&&f()},[M,k,f,b,null==(i=A.componentProps)?void 0:i.params,null==(u=A.componentProps)||null==(s=u.params)?void 0:s.sort,R]);let B=(0,m.useCallback)(e=>{let{targets:t,uid:o}=U(w);P().forEach(l=>{var n,a,r,i;if(!t.find(e=>e.uid===l.uid))return;let s=`${o}${w.name}`,u=(null==(n=l.service.params)?void 0:n[0])||{};(null==(r=l.service.params)||null==(a=r[1])?void 0:a.filters)||d.default.set(l.service.params,"[1].filters",{});let c=l.service.params[1].filters;if(e.length)c[s]={[C]:e};else{if(null==(i=l.clearSelection)||i.call(l),"manual"===l.dataLoadingMode)return l.clearData();delete c[s]}let p=(0,S.Dj)([...Object.values(c),l.defaultFilter]);return l.doFilter({...u,page:1,filter:p},{filters:c})})},[w,C,P]);if(!M)return{};if(ec(M)){let e=F.find(e=>e.name===w.name),t=(null==e||null==(c=e.uiSchema)?void 0:c.enum)||[];b="value",k="label",p=t,_={},f=()=>{},C=`${e.name}.${({select:"$in",multipleSelect:"$anyOf",checkbox:"$in",checkboxGroup:"$anyOf"})[e.interface]}`,h=e=>{let o=e.target.value;if(!o){p=t;return}p=t.filter(e=>e.label.includes(o))}}else C=`${j}.${b}.$in`,p=(null==g?void 0:g.data)||[],h=e=>{f({...null==_?void 0:_[0],filter:{[`${k}.$includes`]:e.target.value}})};return{list:p,onSelected:B,handleSearchInput:h,params:_,run:f,valueKey:b,labelKey:k,dataScopeFilter:Y}};async function em(e){let{getDataBlocks:t,targets:o,uid:l}=e;try{await Promise.all(t().map(async e=>{var t,n,a,r;if(!o.find(t=>t.uid===e.uid))return;if(null==(t=e.clearSelection)||t.call(e),"manual"===e.dataLoadingMode)return e.clearData();let i=(null==(n=e.service.params)?void 0:n[0])||{},s=(null==(r=e.service.params)||null==(a=r[1])?void 0:a.filters)||{};delete s[l];let d=(0,S.Dj)([...Object.values(s),e.defaultFilter]);return e.doFilter({...i,page:1,filter:d},{filters:s})}))}catch(e){console.error(e)}}function eh(e){let t=e.lastIndexOf(".");return -1!==t?e.substring(0,t):e}let ex=e=>{let{schema:t,prefix:o,updateAssociationValues:l,appends:n,getCollectionJoinField:a,getCollection:r,dataSource:i}=e;t.reduceProperties((e,t)=>{var s,u,c;let p=e||o,m=t["x-collection-field"]&&a(t["x-collection-field"],i),h=t.name.includes("."),x=m&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(m.type);if(t["x-linkage-rules"]&&!(0,F.WX)(t)){let e=t=>{let o=Object.keys(t)[0]||"$and";(t[o]||[]).filter(Boolean).forEach(t=>{let o,l,a;if("$and"in t||"$or"in t)return e(t);let r=(l=(o=[],!function e(t){Object.keys(t).sort().forEach(function(l){o.push(l),t[l]&&"object"==typeof t[l]&&e(t[l])})}(t),o),a=d.default.findIndex(l,(e,t)=>{if(e.includes("$")&&t>0)return!0}),l.slice(0,a));r.length>1&&!t.op&&n.add(r.join("."))})};t["x-linkage-rules"].forEach(t=>{let{condition:o}=t;e(o)})}let v=x&&(null==(s=r(m.target,i))?void 0:s.template)==="tree";if(m&&(x||h)&&"TableField"!==t["x-component"]){let e=!x&&h?eh(t.name):t.name,o=""!==p&&p?p+"."+e:e;if(v)n.add(o),n.add(`${o}.parent(recursively=true)`);else if(null==(u=t["x-component-props"])?void 0:u.sortArr){let e=null==(c=t["x-component-props"])?void 0:c.sortArr;n.add(`${o}(sort=${e})`)}else n.add(o);if((0,F.WX)(t)){l.add(o);let e=p&&""!==p?p+"."+t.name:t.name;ex({schema:t,prefix:e,updateAssociationValues:l,appends:n,getCollectionJoinField:a,getCollection:r,dataSource:i})}}else["Action","Action.Link","Action.Modal","Selector","Viewer","AddNewer","AssociationField.Selector","AssociationField.AddNewer","TableField","Kanban.CardViewer","Action.Container"].includes(t["x-component"])||ex({schema:t,prefix:o,updateAssociationValues:l,appends:n,getCollectionJoinField:a,getCollection:r,dataSource:i})},o)},ev=e=>{let{getCollectionJoinField:t,getCollection:o}=(0,g.nj)(e),l=(0,n.useFieldSchema)(),a=(0,m.useRef)(null);return{getAssociationAppends:(0,m.useCallback)(()=>{let n=new Set([]),r=new Set([]);ex({schema:l,prefix:"",updateAssociationValues:n,appends:r,getCollectionJoinField:t,getCollection:o,dataSource:e});let i=[...r=ew(r)],s=[...n],u={appends:d.default.isEqual(a.current,i)?a.current:i,updateAssociationValues:s};return a.current=u.appends,u},[e,l,o,t])}};async function e_(e){(0,a.untracked)(()=>{Object.keys(e.fields).forEach(t=>{(0,F.WX)(e.fields[t])&&(e.fields[t].initialValue=null)})}),await e.reset()}function ef(e,t){if(!t)return e;let o=e.indexOf("#"),l=o>=0,n=l?e.slice(0,o):e,a=l?e.slice(o+1):"",r=a.startsWith("/")||a.startsWith("!/");if(l&&r){let e=a.includes("?")?"&":"?";return`${n}#${a}${e}${t}`}let i=n.includes("?")?"&":"?";return l?`${n}${i}${t}#${a}`:`${n}${i}${t}`}let eg=()=>{let e=(0,A.$l)(),t=(0,A.gp)();return{parseURLAndParams:(0,m.useCallback)(async(o,l)=>{let n=await eS({searchParams:l,variables:e,localVariables:t,replaceVariableValue:ey});return ef(await ey(o,e,t),n)},[e,t])}};function eb(e){var t;let o=(0,_.vx)(),l=(0,n.useFieldSchema)(),a=(null==l?void 0:l["x-component-props"])||e,{t:r}=(0,h.useTranslation)(),i=null==a?void 0:a.url,d=(null==a?void 0:a.params)||[],u=(null==a?void 0:a.type)||"default",c=null==l||null==(t=l["x-component-props"])?void 0:t.openInNewWindow,{parseURLAndParams:p}=eg(),m=(0,x.useRouterBasename)();return{type:u,async onClick(){if(!i)return void s.message.warning(r("Please configure the URL"));let e=await p(i,d);e?c?window.open(eC(e),"_blank"):eM(e,o,window.location.origin+m):console.error("link should be a string")}}}async function ey(e,t,o){if(!e)return;let{evaluate:l}=r.evaluators.get("string"),{exp:n,scope:a}=await (0,P.qk)(e,{variables:t,localVariables:o});try{return l(n,{now:()=>new Date().toString(),...a})}catch(e){console.error(e)}}async function eS(e){let{searchParams:t,variables:o,localVariables:l,replaceVariableValue:n}=e,a=await Promise.all(t.map(async e=>{let{name:t,value:a}=e;if("string"==typeof a){if((0,I.DZ)(a)){let{value:e}=await o.parseVariable(a,l)||{};return{name:t,value:e}}return{name:t,value:await n(a,o,l)}}return{name:t,value:a}})),r={};for(let{name:e,value:t}of a)e&&t&&(r[e]=ek(t));return p.default.stringify(r)}function ek(e){if(d.default.isPlainObject(e)){let t={};return Object.keys(e).forEach(o=>{d.default.isPlainObject(e[o])||d.default.isArray(e[o])||d.default.isString(e[o])&&e[o].length>100||(t[o]=e[o])}),t}return d.default.isArray(e)?e.map(e=>d.default.isPlainObject(e)||d.default.isArray(e)?ek(e):e):e}function eC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.origin;return e?(0,i.isURL)(e)?e:e.startsWith("/")?`${t}${e}`:`${t}/${e}`:""}function eM(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.origin;if(!d.default.isString(e))return console.error("link should be a string");(0,i.isURL)(e)?e.startsWith(o)?t(eC(e.replace(o,""),"")):window.open(e,"_self"):t(eC(e,""))}function ew(e){return Array.from(e).filter(e=>e.includes(".")).forEach(t=>{let o=t.split(".");o.pop();let l=o.join(".");e.add(l)}),e}},95210(e,t,o){o.d(t,{RN:()=>u,es:()=>d,r1:()=>c});var l=o(56920),n=o(51649),a=o(24768),r=o(71226),i=o(7819),s=o(41897);let d=()=>{var e,t,o;let d=(0,l.useFieldSchema)(),p=c(d),m=null==(e=(0,a.kU)())?void 0:e.fieldSchema,h=(0,n.useMemo)(()=>u(m||d),[]),{disablePageHeader:x,enablePageTabs:v,hidePageTitle:_}=(null==h?void 0:h["x-component-props"])||{},{titleHeight:f}=(0,n.useContext)(r.A)||{},{allAccessRoutes:g}=(0,i.nr)(),b=(0,s.es)(),y=(0,n.useMemo)(()=>(0,i.bl)(b,g),[b,g]);return{heightProps:{...null==p?void 0:p["x-component-props"],title:(null==p||null==(t=p["x-component-props"])?void 0:t.title)||(null==p||null==(o=p["x-component-props"])?void 0:o.description),disablePageHeader:x,enablePageTabs:(null==y?void 0:y.enableTabs)||v,hidePageTitle:_,titleHeight:f}}},u=e=>e?"Page"===e["x-component"]?e:u(e.parent):null,c=e=>e?["BlockItem","CardItem"].includes(e["x-component"])?e:c(e.parent):null},8004(e,t,o){o.d(t,{Q:()=>n});var l=o(44374);let n=e=>{var t;let{association:o}=e,n=(0,l.useCollectionRecordData)(),a=(0,l.useCollectionParentRecordData)(),r=(0,l.useCollectionManager)(),i=(0,l.useCollection)();if(!o)return;let s=r.getCollection(o.split(".")[0]);return i.name===s.name||(null==(t=i.getParentCollectionsName)?void 0:t.call(i).includes(s.name))?n:a}},29333(e,t,o){o.d(t,{X:()=>r,d:()=>i});var l=o(71178),n=o(51649);let a=(0,n.createContext)(null),r=e=>{let{children:t,name:o,getActiveFieldsName:r,addActiveFieldName:i,removeActiveFieldName:s}=e,d=(0,n.useRef)(new Set),u=(0,n.useContext)(a),c=(0,n.useMemo)(()=>({getActiveFieldsName:r||(e=>e&&e!==o?null==u?void 0:u.getActiveFieldsName(e):Array.from(d.current)),addActiveFieldName:i||(e=>{d.current.add(e)}),removeActiveFieldName:s||(e=>{d.current.delete(e)}),name:o,parent:u}),[i,r,o,s,u]);return(0,l.jsx)(a.Provider,{value:c,children:t})},i=()=>(0,n.useContext)(a)},68557(e,t,o){o.d(t,{j:()=>p});var l=o(2314),n=o(63526),a=o(77583),r=o(51649),i=o(99300),s=o(43923),d=o(39607),u=o(88847),c=o(59896);function p(e){let{filterOption:t,onFilterChange:o}=e,{parseFilter:p,findVariable:m}=(0,i.hJ)(),h=JSON.stringify(t),x=(0,r.useRef)(t),v=(0,r.useRef)(o),[_,f]=(0,r.useState)({}),[g,b]=(0,r.useState)(()=>t?null:h),y=!!t&&g!==h;return x.current=t,v.current=o,(0,r.useEffect)(()=>{let e=x.current;if(!e){f({}),b(h);return}let t=!1,o=async()=>{var o;let l=await p(e);t||(f(l),b(h),null==(o=v.current)||o.call(v,l))};o();let r=a.default.debounce(o,s.wU),i=(0,l.reaction)(()=>(0,n.flatten)(e,{breakOn(e){let{key:t}=e;return t.startsWith("$")&&"$and"!==t&&"$or"!==t},transformValue(e){if(!(0,c.DZ)(e))return e;let t=(0,u.S)(e),o=m(t),l=null,r=(0,d.Y)(e).split(".");return r.forEach((e,i)=>{let s=r.slice(0,i+1).join("."),d=(0,n.getValuesByPath)({[t]:(null==o?void 0:o.ctx)||{}},s);a.default.isEmpty(d)||(l=d)}),l}}),r,{equals:a.default.isEqual});return()=>{t=!0,r.cancel(),i()}},[h,m,p]),{filter:_,parseVariableLoading:y}}},18111(e,t,o){o.d(t,{iz:()=>ep.parseVariablesAndChangeParamsToQueryString,B6:()=>ep.useFilterBlockActionProps,V3:()=>ed.V3,r1:()=>_.r1,Ur:()=>l.Ur,UJ:()=>es.UJ,Zj:()=>ep.useParseURLAndParams,bt:()=>es.bt,XS:()=>ep.useTableColumns,hJ:()=>l.hJ,R6:()=>K.R6,lm:()=>ex.l,Rg:()=>ep.fillParentFields,H2:()=>ec.H2,hS:()=>em,O6:()=>ed.O6,Vb:()=>ev.V,c3:()=>ep.getAppends,RH:()=>ep.usePickActionProps,jh:()=>ep.getAssociationPath,$1:()=>ec.$1,Ry:()=>ep.useAssociationNames,g7:()=>l.g7,Q7:()=>ep.useDataBlockParentRecord,nw:()=>K.nw,yE:()=>ep.useResetBlockActionProps,VL:()=>l.VL,bp:()=>ec.bp,xp:()=>_.xp,El:()=>ed.El,cY:()=>eu.cY,qM:()=>l.qM,vv:()=>eu.vv,eZ:()=>ep.useDestroyActionProps,qj:()=>ep.useCustomizeBulkUpdateActionProps,wh:()=>es.wh,EV:()=>ep.useDetailsPaginationProps,Gb:()=>ep.useCustomizeUpdateActionProps,Es:()=>_.Es,hu:()=>ep.reduceValueSize,WY:()=>ep.replaceVariableValue,oe:()=>l.oe,jY:()=>ep.useParsedFilter,vi:()=>es.vi,ZC:()=>l.ZC,G8:()=>eu.G8,Il:()=>ep.useEditTableActionProps,Ez:()=>ep.updateFilterTargets,to:()=>ed.to,wx:()=>ep.useCreateActionProps,Cc:()=>eu.Cc,nI:()=>eu.nI,gN:()=>ep.appendQueryStringToUrl,Xz:()=>ep.FormActiveFieldsProvider,es:()=>ep.useBlockHeightProps,J6:()=>l.J6,Km:()=>ep.getCardItemSchema,ru:()=>ep.getFormValues,Bq:()=>ep.useCustomizeRequestActionProps,wY:()=>ep.useDisassociateActionProps,r9:()=>_.r9,Y0:()=>ep.useBulkDestroyActionProps,zE:()=>_.zE,U5:()=>es.U5,dW:()=>ep.useFormActiveFields,Dg:()=>ep.completeURL,V0:()=>l.V0,tv:()=>eh,yH:()=>_.yH,tG:()=>ep.useRefreshActionProps,Gg:()=>ep.useRemoveActionProps,zL:()=>l.zL,TJ:()=>ep.useCollectValuesToSubmit,gU:()=>K.gU,JZ:()=>ei,Su:()=>ep.useLinkActionProps,_q:()=>ep.useOptionalFieldList,f0:()=>K.f0,K8:()=>ec.K8,DQ:()=>l.DQ,tt:()=>eu.tt,MX:()=>l.MX,fX:()=>ec.fX,yn:()=>ex.y,f2:()=>ep.useUpdateActionProps,j4:()=>ec.j4,OP:()=>ep.findFilterTargets,JD:()=>_.JD,cM:()=>l.cM,Ff:()=>ep.navigateWithinSelf,Pj:()=>ep.useAssociationCreateActionProps,UN:()=>ep.useAssociationFilterBlockProps,RN:()=>ep.getPageSchema,Ps:()=>l.Ps,hY:()=>l.hY,ge:()=>l.ge,fh:()=>l.fh,L1:()=>ep.useAssociationFilterProps,E6:()=>l.E6});var l=o(11340),n=o(71178),a=o(52793),r=o(51649),i=o(83468),s=o(23620);let d=e=>(0,n.jsx)(s.Bw,{initializer:!1,showBorder:!1,showBackground:!0,...e});var u=o(56250),c=o(4017),p=o(76564),m=o(11184),h=o(1575),x=o(92579),v=o(14696),_=o(69412),f=o(49621),g=o(41944),b=o(95951);let y=e=>{let t=(0,g.pE)(),{collection:o,isCusomeizeCreate:l,hidden:n}=e,{__collection:a}=t,r=(0,f.Ge)(),{designable:i}=(0,b.er)(),s=(0,_.yH)();if(!r)return{hidden:n||!1};let d=!1;s&&(d=!0,!i&&a&&(d=a===o));let u=r.name===((null==o?void 0:o.name)||o)&&!s||!r.name||!o;return{hidden:n||!d&&!u&&!l}};function S(e){let t,{hidden:o}=y(e);return e.association&&(t=(0,v.M)(e.association)),{parentRecord:t,hidden:o}}function k(){return(0,_.xp)()}var C=o(1451);function M(e){var t;let o,n=(t=e,(0,l.DQ)(t)),{hidden:a}=y(e);return e.association&&(o=(0,m.l)(e.association)),{params:n,parentRecord:o,hidden:a}}function w(){return(0,_.xp)()}var F=o(56920),P=o(77583),j=o(82924);let A=()=>{let e=(0,F.useFieldSchema)(),{designable:t}=(0,j.erX)();return{style:{marginBottom:"var(--nb-spacing)"},hidden:!t&&P.default.isEmpty(e.properties)}};var I=o(68106);function T(e){let t,{params:o,parseVariableLoading:l}=(0,I.Z)(e);return e.association&&(t=(0,v.M)(e.association)),{params:o,parentRecord:t,parseVariableLoading:l}}function D(){return{}}function L(){return{}}function Y(e){let t;return e.association&&(t=(0,v.M)(e.association)),{parentRecord:t}}function R(){return{}}function B(){}var N=o(69744),E=o(67722),$=o(46539),z=o(99300);let O=e=>(0,n.jsx)(z.Bw,{initializer:!1,...e});function q(){}function H(){}function V(){return(0,_.xp)()}var U=o(34214);let G=()=>{(0,U.e)()};var K=o(76706),W=o(69575),J=o(80461),X=o(2314),Z=o(27404),Q=o(64679),ee=o(44374),et=o(46724),eo=o(83508);let el=(e,t,o)=>{(0,X.untracked)(()=>{void 0===e[t]&&(e[t]=o)})},en=e=>{var t,o,l,a,i,s;let d=(0,j.lum)(),u=(0,F.useField)(),c=(0,F.useFieldSchema)(),{getInterface:p}=(0,ee.useCollectionManager_deprecated)(),{uiSchema:m,defaultValue:h,interface:x}=(0,et.E1)(),{isAllowToSetDefaultValue:v}=(0,eo.eT)(),f=p(x),g=(null==f||null==(o=f.filterable)||null==(t=o.operators)?void 0:t.find((e,t)=>e.value===(null==c?void 0:c["x-filter-operator"])))||(null==f||null==(a=f.filterable)||null==(l=a.operators)?void 0:l[0]),b=(0,j.xZI)((null==g||null==(i=g.schema)?void 0:i["x-component"])||(null==(s=c["x-component-props"])?void 0:s.component)||(null==m?void 0:m["x-component"])||"Input"),y=(0,_.Es)(),S=(0,J.S)(null==m?void 0:m["x-use-component-props"],e);if((0,r.useEffect)(()=>{var e;if(!m)return;let t=d(m);if(el(u,"content",t["x-content"]),el(u,"title",t.title),el(u,"description",t.description),null==y?void 0:y.form){let e=v()?c.default||h:void 0;null!=e&&el(u,"initialValue",e)}!u.validator&&(t["x-validator"]||c["x-validator"])&&(u.validator=(0,P.concat)([],t["x-validator"]||[],c["x-validator"]||[])),!0===c["x-disabled"]&&(u.disabled=!0),!0===c["x-read-pretty"]&&(u.readPretty=!0),void 0===c.required&&(u.required=!!t.required),u.dataSource=t.enum,u.data=u.data||{},u.data.dataSource=null==t?void 0:t.enum;let o=d({...(null==g||null==(e=g.schema)?void 0:e["x-component-props"])||{},...t["x-component-props"]||{},...(null==c?void 0:c["x-component-props"])||{}})||{};u.componentProps=(0,Z.merge)(u.componentProps||{},o,S||{})},[m]),!m)return null;let k={...e,...S};return(0,ee.isVariable)(k.value)&&k.value===c.default&&(k.value=void 0),(0,n.jsx)(b,{...k})},ea=(0,F.connect)(e=>{let t=(0,F.useFieldSchema)();return(0,n.jsx)(Q.ErrorBoundary,{FallbackComponent:j.xPi.Modal,onError:e=>console.log(e),children:(0,n.jsx)(et.Ey,{name:t.name,children:(0,n.jsx)(en,{...e})})})});ea.displayName="FilterCollectionField";var er=o(6565);let ei=(0,J.T)(e=>{let t=(0,F.useFieldSchema)()["x-filter-operators"]||{};return(0,n.jsx)(j.t6u,{components:{CollectionField:ea},children:(0,n.jsx)(er.k,{defaultOperators:t,children:(0,n.jsx)(j.QoO,{value:{utc:!1},children:(0,n.jsx)(z.UY,{isAllowToSetDefaultValue:()=>!1,children:(0,n.jsx)(W.UU,{isInFilterFormBlock:!0,children:(0,n.jsx)(_.r1,{name:"filter-form",...e,confirmBeforeClose:!1})})})})})})});var es=o(11251),ed=o(70892),eu=o(14411),ec=o(55102),ep=o(73761);let em=e=>(0,n.jsx)(j.t6u,{components:{TableFieldProvider:eu.Cc,TableBlockProvider:ed.to,TableSelectorProvider:ec.j4,FormBlockProvider:_.r1,FilterFormBlockProvider:ei,FormFieldProvider:es.UJ,DetailsBlockProvider:K.f0,RecordLink:l.Ur,Slider:a.Slider},scope:{...ep,useSourceIdFromRecord:l.ZC,useSourceIdFromParentRecord:l.hY,useParamsFromRecord:l.DQ,useFormBlockProps:_.xp,useCreateFormBlockProps:k,useCreateFormBlockDecoratorProps:S,useEditFormBlockDecoratorProps:M,useEditFormBlockProps:w,useFormFieldProps:es.U5,useDetailsBlockProps:K.nw,useDetailsProps:h.Y,useDetailsWithPaginationProps:p.y,useDetailsDecoratorProps:m.D,useDetailsWithPaginationDecoratorProps:c.B,useTableFieldProps:eu.cY,useTableBlockProps:$.Z,useTableSelectorProps:ec.fX,useTableBlockDecoratorProps:E.A,useListBlockDecoratorProps:Y,useListBlockProps:R,useTableSelectorDecoratorProps:B,useCollapseBlockDecoratorProps:q,useFilterFormBlockProps:V,useFilterFormBlockDecoratorProps:H,useGridCardBlockDecoratorProps:T,useGridCardBlockItemProps:D,useGridCardBlockProps:L,useFormItemProps:G,useDataFormItemProps:C.Z,useGridCardActionBarProps:A},children:e.children});class eh extends i.k{async load(){this.addComponents(),this.addScopes()}addComponents(){this.app.addComponents({TableFieldProvider:eu.Cc,TableBlockProvider:ed.to,TableSelectorProvider:ec.j4,FormBlockProvider:_.r1,FilterFormBlockProvider:ei,FormFieldProvider:es.UJ,DetailsBlockProvider:K.f0,RecordLink:l.Ur,BlockSchemaToolbar:u.C,ActionSchemaToolbar:d,FormItemSchemaToolbar:x.i,CollapseItemSchemaToolbar:O,TableColumnSchemaToolbar:N.l,Slider:a.Slider})}addScopes(){this.app.addScopes({...ep,useSourceIdFromRecord:l.ZC,useSourceIdFromParentRecord:l.hY,useParamsFromRecord:l.DQ,useFormBlockProps:_.xp,useCreateFormBlockProps:k,useCreateFormBlockDecoratorProps:S,useEditFormBlockDecoratorProps:M,useEditFormBlockProps:w,useFormFieldProps:es.U5,useDetailsBlockProps:K.nw,useDetailsProps:h.Y,useDetailsWithPaginationProps:p.y,useDetailsDecoratorProps:m.D,useDetailsWithPaginationDecoratorProps:c.B,useTableFieldProps:eu.cY,useTableBlockProps:$.Z,useTableSelectorProps:ec.fX,useTableBlockDecoratorProps:E.A,useListBlockDecoratorProps:Y,useListBlockProps:R,useTableSelectorDecoratorProps:B,useCollapseBlockDecoratorProps:q,useFilterFormBlockProps:V,useFilterFormBlockDecoratorProps:H,useGridCardBlockDecoratorProps:T,useGridCardBlockProps:L,useGridCardBlockItemProps:D,useFormItemProps:G,useDataFormItemProps:C.Z,useGridCardActionBarProps:A})}}var ex=o(70136),ev=o(35123)},77624(e,t,o){o.d(t,{US:()=>d,W:()=>c,gV:()=>u});var l=o(71178),n=o(51649),a=o(16211),r=o(41897);let i=(0,n.createContext)({historyCollections:[],refreshCH:()=>void 0});i.displayName="CollectionHistoryContext";let s={resource:"collectionsHistory",action:"list",params:{paginate:!1,appends:["fields"],filter:{},sort:["sort"]}},d=e=>{var t;let o=(0,a.VB)(),d=(0,r.MJ)(),u=o.auth.getToken()||"",c=(0,a.bP)(s,{refreshDeps:[d,u],ready:!!(d&&u)}),p=(0,n.useCallback)(async()=>{let{data:e}=await o.request(s);return c.mutate(e),(null==e?void 0:e.data)||[]},[c]),m=(0,n.useMemo)(()=>{var e;return{historyCollections:null==(e=c.data)?void 0:e.data,refreshCH:p}},[p,null==(t=c.data)?void 0:t.data]);return(0,l.jsx)(i.Provider,{value:m,children:e.children})},u=e=>{let{historyCollections:t}=(0,n.useContext)(i);return(null==t?void 0:t.filter(t=>e.includes(t.name)))||[]},c=()=>(0,n.useContext)(i)},43353(e,t,o){o.d(t,{Ho:()=>h,RH:()=>m,nq:()=>c,q0:()=>x});var l=o(71178),n=o(51649),a=o(16211),r=o(26174),i=o(14669),s=o(77624),d=o(46089),u=o(36362);let c=e=>(0,l.jsx)(r.Pf,{children:(0,l.jsx)(d.X,{children:e.children})}),p=(0,n.createContext)(!1),m=()=>(0,n.useContext)(p),h=e=>{let t=(0,i.m6)(),{refreshCH:o}=(0,s.W)(),n=(0,a.bP)(()=>t.reload().then(o));return(0,l.jsx)(p.Provider,{value:n.loading,children:(0,l.jsx)(c,{...e})})},x=e=>{var t;let{service:o,refreshCategory:a}=e,r=(0,n.useMemo)(()=>{var t;return{data:null==o||null==(t=o.data)?void 0:t.data,refresh:a,...e}},[null==o||null==(t=o.data)?void 0:t.data,a,e]);return(0,l.jsx)(u.C.Provider,{value:r,children:e.children})}},46089(e,t,o){o.d(t,{X:()=>c});var l=o(71178),n=o(51649),a=o(44374),r=o(45422),i=o(78406),s=o(47442),d=o(63586);let u={SubFieldDataSourceProvider_deprecated:d.Jq,DataSourceProvider_deprecated:d.T8,CollectionProvider_deprecated:r.i,ResourceActionProvider:i.mD},c=e=>{let t=(0,n.useMemo)(()=>({cm:{...s,useDataSourceFromRAC:i.PN},ds:d.ds}),[]);return(0,l.jsx)(a.SchemaComponentOptions,{scope:t,components:u,children:e.children})}},45422(e,t,o){o.d(t,{i:()=>r});var l=o(71178),n=o(49621),a=o(26174);o(51649);let r=e=>{let{children:t,allowNull:o,name:r,dataSource:i,collection:s}=e;return i?(0,l.jsx)(a.Pf,{dataSource:i,children:(0,l.jsx)(n.Yz,{allowNull:o,name:r||s,children:t})}):(0,l.jsx)(n.Yz,{allowNull:o,name:r||s,children:t})}},78406(e,t,o){o.d(t,{PN:()=>x,aB:()=>d,br:()=>h,mD:()=>m,xh:()=>v});var l=o(71178),n=o(56920),a=o(51649),r=o(43288),i=o(44374),s=o(16211);let d=(0,a.createContext)(null);d.displayName="ResourceActionContext";let u=(0,a.createContext)(null);u.displayName="ResourceContext";let c=e=>{var t,o,n;let{collection:r,request:c,uid:p,dragSort:m}=e,h=(0,s.VB)(),x=(0,i.useRecord)(),v=null==c?void 0:c.action,_={};"get"===v&&(_.filterByTk=x[r.targetKey||r.filterTargetKey||"id"]);let{appends:f,disableDefaultAppends:g,...b}=(null==c?void 0:c.params)||{},y=(null==r||null==(o=r.fields)||null==(t=o.filter)?void 0:t.call(o,e=>e.target).map(e=>e.name))||[],S=g?f||[]:[...y,...f||[]],k=S.length>0,C=(0,s.bP)({...c,params:{..._,...b,...k?{appends:S}:{},sort:m?[!0===r.sortable?"sort":r.sortable]:null==c||null==(n=c.params)?void 0:n.sort}},{uid:p}),M=h.resource(c.resource),w=(0,a.useMemo)(()=>({...C,defaultRequest:c,dragSort:m}),[m,c,C]),F=(0,a.useMemo)(()=>({type:"collection",resource:M,collection:r}),[r,M]);return(0,l.jsx)(u.Provider,{value:F,children:(0,l.jsx)(d.Provider,{value:w,children:(0,l.jsx)(i.CollectionProvider_deprecated,{collection:r,children:e.children})})})},p=e=>{var t,o;let{collection:n,association:r,request:c,uid:p,dragSort:m}=e,h=(0,s.VB)(),x=(0,i.useRecord)()[r.sourceKey],{appends:v,disableDefaultAppends:_,...f}=(null==c?void 0:c.params)||{},g=(null==n||null==(o=n.fields)||null==(t=o.filter)?void 0:t.call(o,e=>e.target).map(e=>e.name))||[],b=_?v||[]:[...g,...v||[]],y=b.length>0,S=(0,s.bP)({resourceOf:x,...c,params:{...f,...y?{appends:b}:{}}},{uid:p}),k=h.resource(c.resource,x),C=(0,a.useMemo)(()=>({type:"association",resource:k,association:r,collection:n}),[r,n,k]),M=(0,a.useMemo)(()=>({...S,defaultRequest:c,dragSort:m}),[m,c,S]);return(0,l.jsx)(u.Provider,{value:C,children:(0,l.jsx)(d.Provider,{value:M,children:(0,l.jsx)(i.CollectionProvider_deprecated,{collection:n,children:e.children})})})},m=e=>{var t;let{collection:o,request:n}=e,{getCollection:a}=(0,r.nj)();return("string"==typeof o&&(o=a(o)),o)?(null==n||null==(t=n.resource)?void 0:t.includes("."))?(0,l.jsx)(p,{...e,collection:o}):(0,l.jsx)(c,{...e,collection:o}):null},h=()=>(0,a.useContext)(d)||{},x=e=>{let t=(0,a.useContext)(d),o=(0,n.useField)();return(0,a.useEffect)(()=>{t.loading||(null==e||e.onSuccess(t.data),o.componentProps.dragSort=!!t.dragSort)},[t.loading]),t},v=()=>{let{type:e,resource:t,collection:o,association:l}=(0,a.useContext)(u)||{};return{type:e,resource:t,collection:o,association:l,targetKey:(null==l?void 0:l.targetKey)||(null==o?void 0:o.filterTargetKey)||(null==o?void 0:o.targetKey)||"id"}}},47442(e,t,o){o.r(t),o.d(t,{isDeleteButtonDisabled:()=>z,useBulkDestroyAction:()=>Y,useBulkDestroyActionAndRefreshCM:()=>O,useCancelAction:()=>v,useChildrenCollections:()=>y,useCollectionFieldsOptions:()=>w,useCollectionFilterOptions:()=>k,useCollectionFilterOptionsV2:()=>C,useCreateAction:()=>j,useCreateActionAndRefreshCM:()=>B,useCreateActionWithoutRefresh:()=>A,useDeleteButtonDisabled:()=>$,useDestroyAction:()=>L,useDestroyActionAndRefreshCM:()=>E,useFilterAction:()=>P,useFilterActionProps:()=>q,useFilterDataSource:()=>F,useKanbanEvents:()=>g,useLinkageCollectionFilterOptions:()=>M,useMoveAction:()=>T,useResetFilterAction:()=>f,useSelfAndChildrenCollections:()=>S,useSortFields:()=>b,useUpdateAction:()=>D,useUpdateActionAndRefreshCM:()=>N,useUpdateViewAction:()=>I,useValuesFromRA:()=>R,useValuesFromRecord:()=>_});var l=o(56920),n=o(52793),a=o(77583),r=o(13791),i=o(57453),s=o(51649),d=o(77843),u=o(43288),c=o(16211),p=o(41944),m=o(82924),h=o(72548),x=o(78406);let v=()=>{let e=(0,l.useForm)(),t=(0,m.D50)();return{async run(){t.setVisible(!1),e.reset()}}},_=e=>{let t=(0,p.pE)(),o=(0,c.bP)(()=>Promise.resolve({data:(0,i.default)((0,r.default)(t),["__parent","__collectionName"])}),{...e,manual:!0}),l=(0,m.D50)();return(0,s.useEffect)(()=>{l.visible&&o.run()},[l.visible]),o},f=()=>{let{run:e}=(0,x.br)(),t=(0,l.useForm)(),o=(0,m.D50)();return{async run(){t.reset(),e(),o.setVisible(!1)}}},g=()=>{let{resource:e}=(0,u.k7)();return{async onCardDragEnd(t,o,l){var n,a;let{columns:r,groupField:i}=t,{fromColumnId:s,fromPosition:d}=o,{toColumnId:u,toPosition:c}=l,p=r.find(e=>e.id===s),m=r.find(e=>e.id===u),h=null==p||null==(n=p.cards)?void 0:n[d],x=null==m||null==(a=m.cards)?void 0:a[c],v={sourceId:h.id,sortField:`${i.name}_sort`};x?v.targetId=x.id:v.targetScope={[i.name]:u},await e.move(v)}}},b=e=>{let{getCollectionFields:t,getInterface:o}=(0,u.nj)();return t(e).filter(e=>{if(!e.interface)return!1;let t=o(e.interface);return null!=t&&!!t.sortable}).map(e=>{var t;return{value:e.name,label:(null==e||null==(t=e.uiSchema)?void 0:t.title)||e.name}})},y=e=>{let{getChildrenCollections:t}=(0,u.nj)();return t(e).map(e=>({value:e.name,label:(null==e?void 0:e.title)||e.name}))},S=e=>{let{getChildrenCollections:t,getCollection:o}=(0,u.nj)(),l=t(e),n=o(e);if(!e)return null;let a=l.map(e=>({value:e.name,label:(null==e?void 0:e.title)||e.name}));return a.unshift({value:n.name,label:(null==n?void 0:n.title)||n.name}),a},k=(e,t)=>{let{getCollectionFields:o,getInterface:l}=(0,u.nj)();return(0,s.useMemo)(()=>{let n=o(e,t),a=(e,n)=>{let r=[];return e.forEach(e=>{let i=((e,n)=>{var r,i,s;if(!e.interface)return;let d=l(e.interface);if(!(null==d?void 0:d.filterable))return;let{nested:u,children:c,operators:p}=d.filterable,m={name:e.name,title:(null==e||null==(r=e.uiSchema)?void 0:r.title)||e.name,label:(null==e||null==(i=e.uiSchema)?void 0:i.title)||e.name,value:e.name,schema:null==e?void 0:e.uiSchema,operators:(null==p||null==(s=p.filter)?void 0:s.call(p,t=>!(null==t?void 0:t.visible)||t.visible(e)))||[],interface:e.interface};if(!e.target||!(n>2)){if(n>2)return m;if((null==c?void 0:c.length)&&(m.children=c),u){let l=a(o(e.target,t),n+1).filter(Boolean);m.children=m.children||[],m.children.push(...l)}return m}})(e,n);i&&r.push(i)}),r};return a(n,1)},[a.default.isString(e)?e:null==e?void 0:e.name,t])},C=e=>{let{getCollectionFields:t,getInterface:o}=(0,u.nj)();return{getFields:(0,s.useCallback)(()=>{let l=t(e),n=(e,l)=>{let a=[];return e.forEach(e=>{let r=((e,l)=>{var a,r;if(!e.interface)return;let i=o(e.interface);if(!(null==i?void 0:i.filterable))return;let{nested:s,children:d,operators:u}=i.filterable,c={name:e.name,title:(null==e||null==(a=e.uiSchema)?void 0:a.title)||e.name,schema:null==e?void 0:e.uiSchema,operators:(null==u||null==(r=u.filter)?void 0:r.call(u,t=>!(null==t?void 0:t.visible)||t.visible(e)))||[],interface:e.interface};if(!e.target||!(l>2)){if(l>2)return c;if((null==d?void 0:d.length)&&(c.children=d),s){let o=n(t(e.target),l+1).filter(Boolean);c.children=c.children||[],c.children.push(...o)}return c}})(e,l);r&&a.push(r)}),a};return n(l,1)},[a.default.isString(e)?e:null==e?void 0:e.name])}},M=e=>{let{getCollectionFields:t,getInterface:o}=(0,u.nj)(),l=t(e),n=(e,l)=>{let a=[];return e.forEach(e=>{let r=((e,l)=>{var a,r;if(!e.interface)return;let i=o(e.interface);if(!(null==i?void 0:i.filterable))return;let{nested:s,children:d,operators:u}=i.filterable,c={name:e.name,title:(null==e||null==(a=e.uiSchema)?void 0:a.title)||e.name,schema:null==e?void 0:e.uiSchema,operators:(null==u||null==(r=u.filter)?void 0:r.call(u,t=>!(null==t?void 0:t.visible)||t.visible(e)))||[],interface:e.interface};if(!e.target||!(l>2)){if(l>2)return c;if((null==d?void 0:d.length)&&(c.children=d),s){let o=n(t(e.target).filter(t=>["hasMany","belongsToMany"].includes(e.type)?!["hasOne","hasMany","belongsTo","belongsToMany"].includes(t.type):!["hasMany","belongsToMany"].includes(t.type)),l+1).filter(Boolean);c.children=c.children||[],c.children.push(...o)}return c}})(e,l);r&&a.push(r)}),a};return n(l,1)},w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],{getCollectionFields:l,getInterface:n}=(0,u.nj)(),a=l(e).filter(e=>!o.includes(e.interface)),r=(e,a,i)=>{let s=[];return e.forEach(e=>{let d=((e,a,i)=>{var s;if(!e.interface)return;let d=n(e.interface);if(!(null==d?void 0:d.filterable))return;let{nested:u,children:c}=d.filterable,p=i?`${i}.${e.name}`:e.name,m={...e,name:e.name,title:(null==e||null==(s=e.uiSchema)?void 0:s.title)||e.name,schema:null==e?void 0:e.uiSchema,key:p};if(!e.target||!(a>t)){if(a>t)return m;if((null==c?void 0:c.length)&&(m.children=c.map(t=>({...t,key:`${e.name}.${t.name}`}))),u){let t=r(l(e.target).filter(e=>!o.includes(e.interface)),a+1,e.name).filter(Boolean);m.children=m.children||[],m.children.push(...t)}return m}})(e,a,i);d&&s.push(d)}),s};return r(a,1)},F=e=>{let{name:t}=(0,u.k7)(),o=k(t);return(0,c.bP)(()=>Promise.resolve({data:o}),e)},P=()=>{let{run:e,params:t,defaultRequest:o}=(0,x.br)(),n=(0,l.useForm)(),a=(0,m.D50)(),[r,...i]=t;return{async run(){var t;let l=null==o||null==(t=o.params)?void 0:t.filter,s=l?{$and:[l,n.values.filter]}:n.values.filter;e({...r,filter:s},...i),a.setVisible(!1)}}},j=e=>{let t=(0,l.useForm)(),o=(0,l.useField)(),n=(0,m.D50)(),{refresh:a}=(0,x.br)(),{resource:r}=(0,x.xh)();return{async run(){try{var l;await t.submit(),o.data=o.data||{},o.data.loading=!0;let i=await r.create({values:t.values});n.setVisible(!1),null==e||e(null==i||null==(l=i.data)?void 0:l.data),await t.reset(),o.data.loading=!1,a()}catch(e){o.data&&(o.data.loading=!1)}}}},A=e=>{let t=(0,l.useForm)(),{resource:o}=(0,x.xh)();return{async run(){var l;await t.submit();let n=await o.create({values:t.values});null==e||e(null==n||null==(l=n.data)?void 0:l.data),await t.reset()}}},I=e=>{let t=(0,l.useForm)();(0,m.D50)();let{resource:o,targetKey:a}=(0,x.xh)(),{[a]:r}=(0,p.pE)();return{async run(){var l;await t.submit();let a=await o.update({filterByTk:r,values:t.values});null==e||e(r,null==a||null==(l=a.data)?void 0:l.data),n.message.success("保存成功")}}},T=()=>{let{resource:e}=(0,x.xh)(),{refresh:t}=(0,x.br)();return{async move(o,l){await e.move({sourceId:o.id,targetId:l.id}),t()}}},D=e=>{let t=(0,l.useField)(),o=(0,l.useForm)(),n=(0,m.D50)(),{refresh:a}=(0,x.br)(),{resource:r,targetKey:i}=(0,x.xh)(),{[i]:s}=(0,p.pE)();return{async run(){await o.submit(),t.data=t.data||{},t.data.loading=!0;try{var l;let t=await r.update({filterByTk:s,values:o.values});n.setVisible(!1),null==e||e(s,null==t||null==(l=t.data)?void 0:l.data),await o.reset(),a()}catch(e){console.log(e)}finally{t.data.loading=!1}}}},L=e=>{let{refresh:t}=(0,x.br)(),{resource:o,targetKey:l}=(0,x.xh)(),{[l]:n}=(0,p.pE)();return{async run(){await o.destroy({filterByTk:n}),null==e||e(n),t()}}},Y=e=>{let{state:t,setState:o,refresh:l}=(0,x.br)(),{resource:a}=(0,x.xh)(),{t:r}=(0,d.useTranslation)();return{async run(){var i;if(!(null==t||null==(i=t.selectedRowKeys)?void 0:i.length))return n.message.error(r("Please select the records you want to delete"));await a.destroy({filterByTk:(null==t?void 0:t.selectedRowKeys)||[]}),null==e||e(null==t?void 0:t.selectedRowKeys),null==o||o({selectedRowKeys:[]}),l()}}},R=e=>{let t=(0,x.br)();return(0,c.bP)(()=>Promise.resolve(t.data),{...e,refreshDeps:[t.data]})},B=()=>{let{run:e}=j(),{refreshCM:t}=(0,u.nj)();return{async run(){await e(),await t()}}},N=()=>{let{run:e}=D(),{refreshCM:t}=(0,u.nj)();return{async run(){await e(),await t()}}},E=()=>{let{run:e}=L(),{refreshCM:t}=(0,u.nj)();return{async run(){await e(),await t()}}},$=e=>{let t=(0,p.pE)();return z(e||t)},z=e=>{let{interface:t,deletable:o=!0}=e||{};return!o||"id"===t},O=()=>{let{run:e}=Y(),{refreshCM:t}=(0,u.nj)();return{async run(){await e(),await t()}}},q=()=>{var e,t;let{collection:o}=(0,x.xh)(),l=(0,h.g9)(o.fields),n=(0,x.br)();return(0,h.yG)({options:l.filter(e=>["title","name"].includes(e.name)),params:(null==(t=n.state)||null==(e=t.params)?void 0:e[0])||n.params,service:n})}},36362(e,t,o){o.d(t,{C:()=>l});let l=(0,o(51649).createContext)({data:[],refresh:()=>{}});l.displayName="CollectionCategoriesContext"},20492(e,t,o){o.d(t,{gp:()=>s,nj:()=>d.n,LF:()=>c,k7:()=>l.k});var l=o(51281),n=o(16211),a=o(46724),r=o(41944),i=o(82924);let s=()=>{let e=(0,l.k)(),t=(0,r.pE)(),o=(0,n.VB)(),s=(0,i.lum)(),d=(0,a.E1)();if(!d)return{};let u=`${(null==d?void 0:d.collectionName)||(null==e?void 0:e.name)}.${d.name}`,c=null==o?void 0:o.resource(u,t[d.sourceKey]);return{...d,uiSchema:s(d.uiSchema),resource:c}};var d=o(61500),u=o(2314);function c(e){let t=(0,i.lum)(),{collections:o=[]}=(0,d.n)();return l=>{u.action.bound(o=>{l.dataSource=("function"==typeof e?o.filter(e):o).map(e=>({label:t(e.title),value:e.name}))})(o)}}},61500(e,t,o){o.d(t,{n:()=>c});var l=o(27404),n=o(77583),a=o(51649),r=o(26174),i=o(67574),s=o(14669),d=o(23460),u=o(82924);let c=e=>{let t=(0,s.m6)(),o=(0,d.xw)(),c=(0,r.r2)(),p=e||(null==o?void 0:o.key)||void 0,[m,h]=(0,a.useState)((0,l.uid)()),{refresh:x}=(0,u.Fag)(),v=(0,a.useMemo)(()=>{var e;return null==t||null==(e=t.collectionFieldInterfaceManager)?void 0:e.getFieldInterfaces().reduce((e,t)=>(e[t.name]=t,e),{})},[t,m]),_=(0,a.useMemo)(()=>null==t?void 0:t.collectionTemplateManager.getCollectionTemplates(),[t,m]),f=(0,a.useCallback)(()=>{var e,o;return null==t||null==(o=t.getDataSource(p))||null==(e=o.collectionManager)?void 0:e.getCollections().map(e=>e.getOptions())},[t,o]),g=(0,a.useCallback)(e=>{var o;return c&&!e?c:null==t||null==(o=t.getDataSource(e||p))?void 0:o.collectionManager},[c,t,p]),b=(0,a.useMemo)(()=>{var e,o;return null==t||null==(o=t.getDataSource(i.Ze))||null==(e=o.collectionManager)?void 0:e.getCollections()},[t,m]),y=(0,a.useCallback)(()=>null==t?void 0:t.getDataSource(i.Ze).reload().then(()=>{x(),h((0,l.uid)())}),[t]),S=(0,a.useCallback)(()=>null==t?void 0:t.getDataSource(i.Ze).reload().then(()=>{x(),h((0,l.uid)())}),[t]),k=(0,u.lum)(),C=(0,a.useCallback)((e,t)=>{var o,l;return(null==(l=g(t))||null==(o=l.getCollection(e))?void 0:o.getInheritedFields())||[]},[t,g]),M=(0,a.useCallback)((e,t)=>{var o,l;if(!e)return[];let n=null==(o=g(t))?void 0:o.getCollection(e);return(null==n||null==(l=n.getAllFields)?void 0:l.call(n))||(null==n?void 0:n.getFields())||[]},[t,g]),w=(0,a.useCallback)((e,t)=>{var o;if(e&&!(e.split(".").length<2))return null==(o=g(t))?void 0:o.getCollectionField(e)},[t,g]),F=(0,a.useCallback)((e,t)=>{var o,l;return e&&(null==(l=g(t))||null==(o=l.getCollection(e))?void 0:o.getParentCollectionsName())||[]},[t,g]),P=(0,a.useCallback)(function(e){var t;let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=arguments.length>2?arguments[2]:void 0;if(!e)return[];let n=null==(t=g(l))?void 0:t.getCollection(e);return(null==n?void 0:n.getChildrenCollections(o))||[]},[t,g]),j=(0,a.useCallback)((e,t)=>{var o,l;return e&&(null==(l=g(t))||null==(o=l.getCollection(e))?void 0:o.getCurrentFields())||[]},[t,g]),A=(0,a.useCallback)((e,t,o,l)=>{var a;let{association:r=!1,cached:i={},collectionNames:s=[e],maxDepth:d=1,allowAllTypes:u=!1,exceptInterfaces:c=[],prefixFieldValue:p="",usePrefix:m=!1,dataSource:h}=l||{};if(s.length-1>d)return;if(i[e])return n.default.cloneDeep(i[e]);t&&"string"==typeof t&&(t=[t]),o&&"string"==typeof o&&(o=[o]);let x=M(e,h),v=null==x||null==(a=x.filter(l=>l.interface&&!c.includes(l.interface)&&(u||t&&t.includes(l.type)||o&&o.includes(l.interface)||!!(r&&l.target&&l.target!==e&&Array.isArray(r))&&r.includes(l.interface))))?void 0:a.map(e=>{var n,a;let d={value:m&&p?`${p}.${e.name}`:e.name,label:k(null==e||null==(n=e.uiSchema)?void 0:n.title)||e.name,...e};return r&&e.target&&(d.children=s.includes(e.target)?[]:A(e.target,t,o,{...l,cached:i,dataSource:h,collectionNames:[...s,e.target],prefixFieldValue:m?p?`${p}.${e.name}`:e.name:"",usePrefix:m}),!(null==(a=d.children)?void 0:a.length))?null:d}).filter(Boolean);return i[e]=v,v},[M]),I=(0,a.useCallback)((e,t)=>{var o;return null==(o=g(t))?void 0:o.getCollection(e)},[t,g]),T=(0,a.useCallback)((e,t)=>{var o,l;return null==(l=g(t))||null==(o=l.getCollection(e))?void 0:o.getAllCollectionsInheritChain()},[t,g]),D=(0,a.useCallback)((e,t)=>()=>{var o,l;return null==(l=g(t))||null==(o=l.getCollection(e))?void 0:o.getInheritCollectionsChain()},[t,g]),L=(0,a.useCallback)(e=>null==t?void 0:t.collectionFieldInterfaceManager.getFieldInterface(e),[t]),Y=(0,a.useCallback)(e=>{var t;return null==(t=L(e.interface))?void 0:t.titleUsable},[L]),R=(0,a.useCallback)((e,t,o)=>{var l,n;return null==(n=g(o))||null==(l=n.getCollection(t))?void 0:l.getParentCollectionFields(e)},[t,g]);return{service:y,interfaces:v,collections:b,templates:_,getTemplate:(0,a.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"general";return null==t?void 0:t.collectionTemplateManager.getCollectionTemplate(e)},[t]),getInterface:L,getCollections:f,getParentCollectionFields:R,getInheritCollections:F,getChildrenCollections:P,refreshCM:S,get:I,getInheritedFields:C,getCollectionField:w,getCollectionFields:M,getCollectionFieldsOptions:A,getCurrentCollectionFields:j,getCollection:I,getCollectionJoinField:w,getAllCollectionsInheritChain:T,getInheritCollectionsChain:D,isTitleField:Y}}},51281(e,t,o){o.d(t,{k:()=>r});var l=o(16211),n=o(51649),a=o(49621);let r=()=>{var e;let t=(0,a.Ge)(),o=(0,l.VB)(),r=null==o?void 0:o.resource(null==t?void 0:t.name),i=(0,n.useMemo)(()=>(null==t?void 0:t.fields)||[],[t]),s=(0,n.useMemo)(()=>{var e;return(null==t||null==(e=t.getInheritedFields)?void 0:e.call(t))||[]},[t]),d=(0,n.useMemo)(()=>{var e,o;return(null==t||null==(e=t.getAllFields)?void 0:e.call(t))||(null==t||null==(o=t.getFields)?void 0:o.call(t))||[]},[t]),u=(0,n.useMemo)(()=>{var e;return(null==t||null==(e=t.getForeignKeyFields)?void 0:e.call(t))||[]},[t]),c=(0,n.useCallback)(()=>null==d?void 0:d.find(e=>e.treeParent),[d]),p=(0,n.useCallback)(e=>{var o;return null==t||null==(o=t.getField)?void 0:o.call(t,e)},[t]),m=(0,n.useCallback)(()=>null==t?void 0:t.getPrimaryKey(),[t]);return{...null==t||null==(e=t.getOptions)?void 0:e.call(t),resource:r,getTreeParentField:c,fields:d,getField:p,getPrimaryKey:m,currentFields:i,inheritedFields:s,foreignKeyFields:u}}},43288(e,t,o){o.d(t,{qS:()=>eu,io:()=>i.i,ju:()=>tP,Ik:()=>eL,uk:()=>eY,Jq:()=>tW.Jq,OU:()=>n.useCollectionFilterOptions,lY:()=>n.useSortFields,E2:()=>eW.dateTimeProps,sf:()=>e5,F8:()=>eU,ur:()=>tk,Jx:()=>ex,g7:()=>I,W5:()=>tY,UF:()=>tr,C8:()=>eW.collectionDataSource,aB:()=>y.aB,q:()=>eW,nO:()=>O,VA:()=>e9,Si:()=>tv,B9:()=>tc,P$:()=>L,LF:()=>S.LF,ry:()=>em,Am:()=>eW.unique,Mi:()=>eV,BK:()=>eD,ZC:()=>eN,YZ:()=>eB,CF:()=>e4,Ho:()=>a.Ho,Lj:()=>eq,Uq:()=>$,N1:()=>eW.autoIncrement,pA:()=>ee,TC:()=>e0,$e:()=>ts,T8:()=>tW.T8,V:()=>eh,fn:()=>eH,Kv:()=>ta,wv:()=>tb,xq:()=>eG,N8:()=>es,Xm:()=>r.X,Mw:()=>eW.reverseFieldProperties,uq:()=>eR,YK:()=>tw,B1:()=>eW.relationshipType,II:()=>eW.operators,NU:()=>n.useLinkageCollectionFilterOptions,Nr:()=>e8,CT:()=>tA,l7:()=>D,h1:()=>e7,gp:()=>S.gp,CI:()=>eK.C,YG:()=>ea,IE:()=>ec,mD:()=>y.mD,if:()=>tp,X6:()=>tS,Gs:()=>eW.defaultProps,A9:()=>eE,g:()=>G,Nc:()=>tI,Po:()=>te,US:()=>tJ.US,qQ:()=>U,Sd:()=>t_,Li:()=>ti,ms:()=>tu,IL:()=>th,OA:()=>tM,mK:()=>eW.recordPickerViewer,kg:()=>eW.timeProps,gV:()=>tJ.gV,br:()=>y.br,Sv:()=>tZ,RH:()=>a.RH,Nj:()=>tm,nF:()=>tT,xS:()=>tC,u6:()=>eg,Hu:()=>tX,ds:()=>tW.ds,$N:()=>tg,q0:()=>a.q0,PN:()=>y.PN,n0:()=>N,w7:()=>en,vv:()=>e6,nj:()=>S.nj,sN:()=>R,hu:()=>tW.hu,mY:()=>H,Yy:()=>eM,Kf:()=>tK,qT:()=>tL,jY:()=>Q,Pg:()=>Y,k7:()=>S.k7,w3:()=>ez,nq:()=>a.nq,WW:()=>tz,ie:()=>eW.primaryKey,oO:()=>eo,WL:()=>n.isDeleteButtonDisabled,OK:()=>tF,A8:()=>tj,Tt:()=>n.useCollectionFieldsOptions,a1:()=>tR,Ex:()=>eW.dataSource,fZ:()=>tD,NW:()=>eW.type,xh:()=>y.xh,mJ:()=>E,Em:()=>td,NL:()=>tf,Jn:()=>ep,jg:()=>eW.constraintsProps,Y7:()=>n.useCancelAction,SB:()=>tx,yu:()=>el,Xk:()=>tt,xG:()=>eC,em:()=>e3,Yf:()=>tn,l5:()=>eW.autoFill,D0:()=>B,W:()=>tJ.W,jc:()=>e2,QZ:()=>ty});var l={};o.r(l),o.d(l,{FieldValidation:()=>I,ForeignKey:()=>E,SourceCollection:()=>R,SourceForeignKey:()=>D,SourceKey:()=>B,TargetForeignKey:()=>Y,TargetKey:()=>N,ThroughCollection:()=>$,ThroughForeignKey:()=>L});var n=o(47442),a=o(43353),r=o(46089),i=o(45422),s=o(44814),d=o(71178),u=o(82113),c=o(56220),p=o(56920),m=o(27404),h=o(52793),x=o(77583),v=o(51649),_=o(77843),f=o(16211),g=o(41944),b=o(82924),y=o(78406),S=o(20492),k=o(94702);let C=()=>{let{data:{database:e}}=(0,k.gL)()||{data:{database:{}}};return{isDialect:t=>(null==e?void 0:e.dialect)===t,dialect:null==e?void 0:e.dialect}};var M=o(76821);let w="required",F=[{key:w,label:"Required",hasValue:!1,params:[]}],P={string:[...F,{key:"max",label:"Max length",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"min",label:"Min length",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"pattern",label:"Pattern",hasValue:!0,params:[{key:"regex",label:"Regular Expression",componentType:"text",required:!0}]},{key:"email",label:"Email",hasValue:!0,params:[{key:"allowFullyQualified",label:"Domains ending with a . character are permitted",componentType:"checkbox"},{key:"allowUnicode",label:"Unicode characters are permitted",componentType:"checkbox"},{key:"ignoreLength",label:"Ignore invalid email length errors",componentType:"checkbox"},{key:"minDomainSegments",label:"Min Domain Segments",componentType:"inputNumber",defaultValue:2},{key:"maxDomainSegments",label:"Max Domain Segments",componentType:"inputNumber"},{key:"tlds",label:"tlds",componentType:"radio",defaultValue:"iana",options:[{label:"IANA registry",value:"iana"},{label:"Disable validation",value:"disable"},{label:"Allow list",value:"allow",componentType:"text"},{label:"Deny list",value:"deny",componentType:"text"}]}],paramsType:"object"},{key:"uuid",label:"UUID",hasValue:!0,params:[{key:"version",label:"Version",componentType:"multipleSelect",options:[{label:"uuidv1",value:"uuidv1"},{label:"uuidv2",value:"uuidv2"},{label:"uuidv3",value:"uuidv3"},{label:"uuidv4",value:"uuidv4"},{label:"uuidv5",value:"uuidv5"},{label:"uuidv6",value:"uuidv6"},{label:"uuidv7",value:"uuidv7"},{label:"uuidv8",value:"uuidv8"}]},{key:"separator",label:"Separator",componentType:"singleSelect",options:[{label:"Must use `-` and `:`",value:!0},{label:"No allow `-` and `:`",value:!1},{label:"Only use `-`",value:"-"},{label:"Only use `_`",value:"_"},{label:"Only use `.`",value:"."}]}],paramsType:"object"},{key:"hex",label:"Hex",hasValue:!0,params:[{key:"prefix",label:"Prefix",componentType:"singleSelect",options:[{label:"Must use prefix",value:!0},{label:"No use prefix",value:!1},{label:"Optional prefix",value:"optional"}]},{key:"byteAligned",label:"Byte Aligned",componentType:"checkbox"}]},{key:"length",label:"Length",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"uri",label:"URI",hasValue:!0,params:[{key:"scheme",label:"Scheme",componentType:"multipleSelect",options:[{label:"http",value:"http"},{label:"https",value:"https"},{label:"ftp",value:"ftp"},{label:"file",value:"file"},{label:"ws",value:"ws"},{label:"wss",value:"wss"}]},{key:"allowRelative",label:"Allow relative URIs",componentType:"checkbox"},{key:"relativeOnly",label:"Restrict only relative URIs",componentType:"checkbox"},{key:"allowQuerySquareBrackets",label:"Allows unencoded square brackets inside the query string",componentType:"checkbox"},{key:"encodeUri",label:"Attempts to encode the URI using encodeURI before validating it again",componentType:"checkbox"}],paramsType:"object"}],number:[...F,{key:"greater",label:"Greater than",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"less",label:"Less than",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"max",label:"Max value",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"min",label:"Min value",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"multiple",label:"Multiple of",hasValue:!0,params:[{key:"base",label:"Base",componentType:"inputNumber",required:!0}]},{key:"integer",label:"Integer",hasValue:!1,params:[]},{key:"precision",label:"Precision",hasValue:!0,params:[{key:"limit",label:"Limit",componentType:"inputNumber",required:!0}]},{key:"unsafe",label:"Unsafe integer",hasValue:!1,params:[]}],date:[...F,{key:"greater",label:"Greater than",hasValue:!0,params:[{key:"date",label:"Date",componentType:"datePicker",required:!0}]},{key:"less",label:"Less than",hasValue:!0,params:[{key:"date",label:"Date",componentType:"datePicker",required:!0}]},{key:"max",label:"Max value",hasValue:!0,params:[{key:"date",label:"Date",componentType:"datePicker",required:!0}]},{key:"min",label:"Min value",hasValue:!0,params:[{key:"date",label:"Date",componentType:"datePicker",required:!0}]},{key:"timestamp",label:"Timestamp",hasValue:!0,params:[{key:"type",label:"Type",componentType:"singleSelect",options:[{label:"JavaScript",value:"javascript"},{label:"Unix",value:"unix"}],defaultValue:"javascript"}]}],object:[...F]};var j=o(78316),A=o(91815);let I=(0,p.observer)(e=>{let{value:t,onChange:o,type:l,availableValidationOptions:n,excludeValidationOptions:a,isAssociation:r}=e,{t:i}=(0,_.useTranslation)(),s=(0,M.useAntdToken)(),c=(0,j.css)`
58
58
  .ant-form-item:not(.ant-form-item-has-error) .ant-input,
59
59
  .ant-form-item:not(.ant-form-item-has-error) .ant-input-number,
60
60
  .ant-form-item:not(.ant-form-item-has-error) .ant-input-number .ant-input-number-input,
@@ -136,12 +136,12 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
136
136
  display: flex;
137
137
  margin: 5px 0px;
138
138
  }
139
- `,defaultValue:"h:mm a",formats:["hh:mm:ss a","HH:mm:ss"],timeFormat:!0},default:"HH:mm:ss",enum:[{label:(0,a.b)({format:"hh:mm:ss a"}),value:"hh:mm:ss a"},{label:(0,a.b)({format:"HH:mm:ss"}),value:"HH:mm:ss"},{label:"custom",value:"custom"}]}},_={type:"array",title:'{{t("Options")}}',"x-decorator":"FormItem","x-component":"ArrayTable","x-component-props":{pagination:{pageSize:1e3}},items:{type:"object",properties:{column1:{type:"void","x-component":"ArrayTable.Column","x-component-props":{width:50,title:"",align:"center"},properties:{sort:{type:"void","x-component":"ArrayTable.SortHandle"}}},column2:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Option value")}}'},properties:{value:{type:"string",required:!0,"x-decorator":"FormItem","x-component":"Input","x-reactions":e=>{e.initialValue||e.initialized||(e.initialValue=(0,l.uid)(),e.setValue((0,l.uid)()))}}}},column3:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Option label")}}'},properties:{label:{type:"string",required:!0,"x-decorator":"FormItem","x-component":"Input"}}},column4:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Color")}}'},properties:{color:{type:"string","x-decorator":"FormItem","x-component":"ColorSelect"}}},column5:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:"",dataIndex:"operations",fixed:"right"},properties:{item:{type:"void","x-component":"FormItem",properties:{remove:{type:"void","x-component":"ArrayTable.Remove"}}}}}}},properties:{add:{type:"void","x-component":"ArrayTable.Addition","x-component-props":{randomValue:!0},title:"{{t('Add option')}}"}}},f={"uiSchema.title":{type:"string",title:'{{t("Field display name")}}',required:!0,"x-decorator":"FormItem","x-component":"Input"},name:{type:"string",title:'{{t("Field name")}}',required:!0,"x-disabled":"{{ !createOnly }}","x-decorator":"FormItem","x-component":"Input","x-validator":"uid",description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with a letter.')}}"}},g={type:"void",title:'{{ t("View record") }}',"x-component":"RecordPicker.Viewer","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:{}}}}}}}},b={type:"string",title:'{{t("Options")}}',"x-decorator":"FormItem","x-component":"Select","x-component-props":{multiple:!0},enum:"{{collections}}"}},40919(e,t,o){o.r(t),o.d(t,{array:()=>n,bigField:()=>h,boolean:()=>c,collection:()=>m,datetime:()=>r,enumType:()=>d,id:()=>s,number:()=>i,object:()=>a,string:()=>l,tableoid:()=>p,time:()=>u});let l=[{label:'{{t("contains")}}',value:"$includes",selected:!0},{label:'{{t("does not contain")}}',value:"$notIncludes"},{label:'{{t("is")}}',value:"$eq"},{label:'{{t("is not")}}',value:"$ne"},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],n=[{label:'{{t("is")}}',value:"$match",selected:!0,schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is not")}}',value:"$notMatch",schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is any of")}}',value:"$anyOf",schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is none of")}}',value:"$noneOf",schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],a=[{label:'{{t("is")}}',value:"$eq",selected:!0},{label:'{{t("is not")}}',value:"$ne"}],r=[{label:"{{ t('is') }}",value:"$dateOn",selected:!0,schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is not') }}",value:"$dateNotOn",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is before') }}",value:"$dateBefore",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is after') }}",value:"$dateAfter",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is on or after') }}",value:"$dateNotBefore",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is on or before') }}",value:"$dateNotAfter",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is between') }}",value:"$dateBetween",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!0}}},{label:"{{ t('is empty') }}",value:"$empty",noValue:!0},{label:"{{ t('is not empty') }}",value:"$notEmpty",noValue:!0}],i=[{label:'{{t("=")}}',value:"$eq",selected:!0},{label:'{{t("≠")}}',value:"$ne"},{label:'{{t(">")}}',value:"$gt"},{label:'{{t("≥")}}',value:"$gte"},{label:'{{t("<")}}',value:"$lt"},{label:'{{t("≤")}}',value:"$lte"},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],s=[{label:'{{t("is")}}',value:"$eq",selected:!0},{label:'{{t("is not")}}',value:"$ne"},{label:'{{t("exists")}}',value:"$exists",noValue:!0},{label:'{{t("not exists")}}',value:"$notExists",noValue:!0}],d=[{label:'{{t("is")}}',value:"$eq",selected:!0,schema:{"x-component":"Select","x-component-props":{mode:null}}},{label:'{{t("is not")}}',value:"$ne",schema:{"x-component":"Select","x-component-props":{mode:null}}},{label:'{{t("is any of")}}',value:"$in",schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is none of")}}',value:"$notIn",schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],u=[{label:'{{t("is")}}',value:"$eq",selected:!0},{label:'{{t("is not")}}',value:"$neq"},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],c=[{label:'{{t("Yes")}}',value:"$isTruly",selected:!0,noValue:!0,schema:{"x-component":"Select","x-component-props":{multiple:!1,options:[{label:'{{t("Yes")}}',value:!0},{label:'{{t("No")}}',value:!1}]}}},{label:'{{t("No")}}',value:"$isFalsy",noValue:!0,schema:{"x-component":"Select","x-component-props":{multiple:!1,options:[{label:'{{t("Yes")}}',value:!0},{label:'{{t("No")}}',value:!1}]}}},{label:"{{ t('is empty') }}",value:"$empty",noValue:!0},{label:"{{ t('is not empty') }}",value:"$notEmpty",noValue:!0}],p=[{label:'{{t("is any of")}}',value:"$childIn",schema:{"x-component":"CollectionSelect","x-component-props":{mode:"tags"}}},{label:'{{t("is none of")}}',value:"$childNotIn",schema:{"x-component":"CollectionSelect","x-component-props":{mode:"tags"}}}],m=[{label:'{{t("is")}}',value:"$eq",selected:!0,schema:{"x-component":"DataSourceCollectionCascader"}},{label:'{{t("is not")}}',value:"$ne",schema:{"x-component":"DataSourceCollectionCascader"}},{label:'{{t("is any of")}}',value:"$in",schema:{"x-component":"DataSourceCollectionCascader","x-component-props":{mode:"tags"}}},{label:'{{t("is none of")}}',value:"$notIn",schema:{"x-component":"DataSourceCollectionCascader","x-component-props":{mode:"tags"}}},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],h=[{label:'{{t("contains")}}',value:"$includes",selected:!0,schema:{type:"string","x-component":"Input"}},{label:'{{t("does not contain")}}',value:"$notIncludes",schema:{type:"string","x-component":"Input"}},{label:'{{t("is")}}',value:"$eq",schema:{type:"string","x-component":"Input"}},{label:'{{t("is not")}}',value:"$ne",schema:{type:"string","x-component":"Input"}},{label:'{{t("is empty")}}',value:"$empty",noValue:!0,schema:{type:"string","x-component":"Input"}},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0,schema:{type:"string","x-component":"Input"}}]},63586(e,t,o){o.d(t,{Jq:()=>p,T8:()=>m,ds:()=>c,hu:()=>u});var l=o(71178),n=o(56920),a=o(77583),r=o(51649),i=o(44374),s=o(16211);let d={name:"fields",targetKey:"name",fields:[{type:"string",name:"type",interface:"input",uiSchema:{title:'{{ t("Storage type") }}',type:"string","x-component":"Select",enum:[{label:"String",value:"string"}],required:!0}},{type:"string",name:"interface",interface:"input",uiSchema:{title:'{{ t("Field interface") }}',type:"string","x-component":"Select",enum:"{{interfaces}}"}},{type:"string",name:"title",interface:"input",uiSchema:{title:'{{ t("Field display name") }}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"name",interface:"input",uiSchema:{title:'{{ t("Field name") }}',type:"string","x-component":"Input"}}]},u=(0,r.createContext)(null);u.displayName="DataSourceContext_deprecated";let c={useSelectedRowKeys:()=>{let e=(0,r.useContext)(u);return[e.selectedRowKeys,e.setSelectedRowKeys]},useDataSource_deprecated:e=>{let t=(0,r.useContext)(u);return(0,i.useRequest)(()=>Promise.resolve({data:t.dataSource}),{...e,refreshDeps:[JSON.stringify(t.dataSource)]})},useCreateAction:()=>{let e=(0,r.useContext)(u),t=(0,n.useForm)(),{setVisible:o}=(0,i.useActionContext)();return{async run(){console.log("form.values",t.values);let l=e.dataSource||[];l.push((0,a.cloneDeep)(t.values)),e.setDataSource([...l]),o(!1),await t.reset()}}},useBulkDestroyAction:()=>{let e=(0,r.useContext)(u),{selectedRowKeys:t,setSelectedRowKeys:o}=e;return{async run(){let l=e.dataSource||[];e.setDataSource(l.filter((e,o)=>!t.includes(o))),o([])}}},useUpdateAction:()=>{let e=(0,i.useRecordIndex)(),t=(0,n.useForm)(),{setVisible:o}=(0,i.useActionContext)(),l=(0,r.useContext)(u);return{async run(){let n=((null==l?void 0:l.dataSource)||[]).map((o,l)=>l===e?{...t.values}:o);l.setDataSource([...n]),o(!1)}}},useDestroyAction:()=>{let e=(0,i.useRecordIndex)(),t=(0,r.useContext)(u);return{async run(){let o=t.dataSource||[];t.setDataSource(o.filter((t,o)=>e!==o))}}}},p=(0,n.observer)(e=>{let[t,o]=(0,r.useState)([]),[n,a]=(0,r.useState)([]),c=(0,i.useRecord)(),p=(0,s.VB)(),m=(0,i.useRequest)(()=>{if("subTable"===c.interface){var e;return(null==c||null==(e=c.children)?void 0:e.length)?Promise.resolve({data:(null==c?void 0:c.children)||[]}):p.resource("fields").list({paginate:!1,sort:"sort",filter:{parentKey:c.key}}).then(e=>null==e?void 0:e.data)}return Promise.resolve({data:[]})},{onSuccess(e){console.log("dataSource1",null==e?void 0:e.data),a(null==e?void 0:e.data)}});return(0,l.jsx)(i.CollectionProvider_deprecated,{collection:d,children:(0,l.jsx)(u.Provider,{value:{rowKey:"name",service:m,dataSource:n,setDataSource:a,selectedRowKeys:t,setSelectedRowKeys:o},children:e.children})})},{displayName:"SubFieldDataSourceProvider_deprecated"}),m=(0,n.observer)(e=>{let{rowKey:t,collection:o,association:n}=e,[a,d]=(0,r.useState)([]),[c,p]=(0,r.useState)([]),m=(0,i.useRecord)(),h=(0,s.VB)(),{getCollection:x}=(0,i.useCollectionManager_deprecated)(),v=x(o),_=null==m?void 0:m[n.targetKey||"id"],f=(0,i.useRequest)(()=>{if(_){var e,t;return h.request({resource:`${n.collectionName}.${n.name}`,resourceOf:_,action:"list",params:{appends:null==v||null==(t=v.fields)||null==(e=t.filter(e=>e.target))?void 0:e.map(e=>e.name)}}).then(e=>e.data)}return Promise.resolve({data:(null==m?void 0:m[n.name])||[]})},{onSuccess(e){p(null==e?void 0:e.data)}});return(0,l.jsx)(i.CollectionProvider_deprecated,{collection:v,children:(0,l.jsx)(u.Provider,{value:{rowKey:t,service:f,dataSource:c,setDataSource:p,selectedRowKeys:a,setSelectedRowKeys:d},children:e.children})})},{displayName:"DataSourceProvider_deprecated"})},85162(e,t,o){o.d(t,{b:()=>i});var l=o(71178),n=o(52793);o(51649);var a=o(77843),r=o(38356);let i=()=>{let e=(0,r.useNavigate)(),{t}=(0,a.useTranslation)();return(0,l.jsx)(n.Result,{status:"404",title:"404",subTitle:t("Sorry, the page you visited does not exist."),extra:(0,l.jsx)(n.Button,{onClick:()=>e("/",{replace:!0}),type:"primary",children:"Back Home"})})}},25180(e,t,o){o.d(t,{$:()=>r});var l=o(71178),n=o(52793),a=o(51649);function r(e){let{title:t,defaultValue:o,onChange:r,options:i,fieldNames:s,...d}=e,[u,c]=(0,a.useState)(!1),p=(0,a.useRef)(null);return(0,l.jsxs)("div",{style:{alignItems:"center",display:"flex",justifyContent:"space-between"},onClick:e=>{e.stopPropagation(),c(e=>!e)},onMouseLeave:()=>{p.current=setTimeout(()=>{c(!1)},200)},children:[t,(0,l.jsx)(n.Select,{...d,open:u,"data-testid":`select-${t}`,popupMatchSelectWidth:!1,bordered:!1,defaultValue:o,onChange:r,popupClassName:`select-popup-${t.replaceAll(" ","-")}`,fieldNames:s,options:i,style:{textAlign:"right",minWidth:100},onMouseEnter:()=>{clearTimeout(p.current)}})]})}},52081(e,t,o){o.d(t,{W:()=>a});var l=o(83489),n=o(4627);let a=async(e,t)=>{if(!e)return e;let{evaluate:o}=l.evaluators.get("string"),{exp:a,scope:r}=await (0,n.qk)(e,t);return o(a,{now:()=>new Date().toString(),...r})}},53770(e,t,o){o.d(t,{$d:()=>n.$,Wu:()=>r.W,bM:()=>l.b,qA:()=>a.q});var l=o(85162),n=o(25180),a=o(57359),r=o(52081)},57359(e,t,o){o.d(t,{q:()=>i});var l=o(56920),n=o(46724),a=o(31574),r=o(32221);function i(){var e,t,o,i;let{fieldSchema:s,collectionField:d}=(0,r.BC)(),u=(0,l.useField)(),c=(0,a.oA)(),p=(0,l.useFieldSchema)(),m=(0,n.E1)(),h=s||p,x=d||m,v=(null==h||null==(e=h["x-component-props"])?void 0:e.mode)||(null==u||null==(t=u.componentProps)?void 0:t.mode)||(c?"FileManager":"")||(null==h||null==(o=h["x-component-props"])?void 0:o.component)||(null==x||null==(i=x.uiSchema)?void 0:i["x-component"]);return({AssociationField:"Select"})[v]||v}},85906(e,t,o){o.d(t,{t:()=>n});var l=o(51649);let n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,l.useRef)(0);return(0,l.useEffect)(()=>{let e=e=>{let{clientY:o}=e;t.current=Math.max(o,window.innerHeight-o)};return window.addEventListener("mousemove",e),()=>{window.removeEventListener("mousemove",e)}},[]),(0,l.useMemo)(()=>t.current-40,e)}},25739(e,t,o){o.d(t,{B:()=>s});var l=o(72741),n=o(51649),a=o(13975),r=o(52793);let i=e=>{let{children:t}=e,{token:o}=r.theme.useToken(),i=o.colorFillTertiary,s=new l.TinyColor(o.colorFill).onBackground(o.colorFillSecondary).toHexShortString(),d=new l.TinyColor(o.colorFill).onBackground(o.colorFill).toHexShortString(),u=new l.TinyColor(o.colorFill).onBackground(o.colorFill).onBackground(o.colorFill).toHexShortString();return(0,n.useEffect)(()=>{document.body.style.setProperty("--nb-spacing",`${o.marginLG}px`),document.body.style.setProperty("--nb-designer-offset",`${o.marginXS}px`),document.body.style.setProperty("--nb-header-height",`${o.sizeXXL-2}px`),document.body.style.setProperty("--nb-box-bg",o.colorBgLayout),document.body.style.setProperty("--colorBgLayout",o.colorBgLayout),document.body.style.setProperty("--colorBgContainer",o.colorBgContainer),document.body.style.setProperty("--controlHeightLG",`${o.controlHeightLG}px`),document.body.style.setProperty("--paddingContentVerticalSM",`${o.paddingContentVerticalSM}px`),document.body.style.setProperty("--marginSM",`${o.marginSM}px`),document.body.style.setProperty("--colorInfoBg",o.colorInfoBg),document.body.style.setProperty("--colorInfoBorder",o.colorInfoBorder),document.body.style.setProperty("--colorWarningBg",o.colorWarningBg),document.body.style.setProperty("--colorWarningBorder",o.colorWarningBorder),document.body.style.setProperty("--colorText",o.colorText),document.body.style.setProperty("--colorTextDescription",o.colorTextDescription),document.body.style.setProperty("--colorBgTextHover",o.colorBgTextHover),document.body.style.setProperty("--colorSplit",o.colorSplit),document.body.style.setProperty("--borderRadiusOuter",`${o.borderRadiusOuter}px`),document.body.style.setProperty("--colorTextHeaderMenu",o.colorTextHeaderMenu),document.body.style.setProperty("--colorPrimaryText",o.colorPrimaryText),document.body.style.setProperty("--colorPrimaryTextActive",o.colorPrimaryTextActive),document.body.style.setProperty("--colorPrimaryTextHover",o.colorPrimaryTextHover),document.body.style.setProperty("--colorBgSider",o.colorBgSider),document.body.style.setProperty("--colorBgSiderMenuHover",o.colorBgSiderMenuHover),document.body.style.setProperty("--colorBgSiderMenuActive",o.colorBgSiderMenuActive),document.body.style.setProperty("--colorTextSiderMenu",o.colorTextSiderMenu),document.body.style.setProperty("--colorTextSiderMenuHover",o.colorTextSiderMenuHover),document.body.style.setProperty("--colorTextSiderMenuActive",o.colorTextSiderMenuActive),document.body.style.setProperty("--colorBgScrollTrack",i),document.body.style.setProperty("--colorBgScrollBar",s),document.body.style.setProperty("--colorBgScrollBarHover",d),document.body.style.setProperty("--colorBgScrollBarActive",u),document.body.style.setProperty("--colorSettings",o.colorSettings||a.defaultTheme.token.colorSettings),document.body.style.setProperty("--colorBgSettingsHover",o.colorBgSettingsHover),document.body.style.setProperty("--colorTemplateBgSettingsHover",o.colorTemplateBgSettingsHover),document.body.style.setProperty("--colorBorderSettingsHover",o.colorBorderSettingsHover),document.body.style.setProperty("--colorBgMenuItemSelected",o.colorBgHeaderMenuActive),document.body.style.setProperty("background-color",o.colorBgContainer)},[s,u,d,i,o.colorBgContainer,o.colorBgLayout,o.colorBgSettingsHover,o.colorTemplateBgSettingsHover,o.colorBorderSettingsHover,o.colorInfoBg,o.colorInfoBorder,o.colorPrimaryText,o.colorPrimaryTextActive,o.colorPrimaryTextHover,o.colorSettings,o.colorBgTextHover,o.colorSplit,o.colorText,o.colorTextDescription,o.colorWarningBg,o.colorWarningBorder,o.borderRadiusOuter,o.controlHeightLG,o.marginLG,o.marginSM,o.marginXS,o.paddingContentVerticalSM,o.sizeXXL,o.colorTextHeaderMenu,o.colorBgSider,o.colorBgSiderMenuHover,o.colorBgSiderMenuActive,o.colorTextSiderMenu,o.colorTextSiderMenuHover,o.colorTextSiderMenuActive,o.colorBgHeaderMenuActive]),t};i.displayName="CSSVariableProvider";let s=i},29928(e,t,o){o.d(t,{y:()=>r});var l=o(77583),n=o(99982),a=o(63526);class r{addComponentOption(e){if(!this.componentOptions){var t,o,n,r,i,s;this.componentOptions=[];let e=null==(o=this.default)||null==(t=o.uiSchema)?void 0:t["x-component"],d=null==(r=this.default)||null==(n=r.uiSchema)?void 0:n["x-component-props"];if(e){let t=(null==(s=this.default)||null==(i=s.uiSchema)?void 0:i.type)||"string",o=(0,a.tval)(e.startsWith("Input")?(0,l.capitalize)(t):e.split(".").pop());this.componentOptions=[{label:o,value:e,useProps:()=>d||{}}]}}this.componentOptions.push(e)}getConfigureFormProperties(e){let t=this.hasDefaultValue?this.getDefaultValueProperty():{};this.availableValidationOptions.push("required");let o=null==e?void 0:e.view,a=(null==e?void 0:e.template)==="sql"||(null==e?void 0:e.sql),r=o||a||!this.validationType?{}:{validation:{title:'{{ t("Validation") }}',required:!1,"x-decorator":"FormItem","x-component":"FieldValidation","x-component-props":{type:this.validationType,availableValidationOptions:[...new Set(this.availableValidationOptions)],excludeValidationOptions:[...new Set(this.excludeValidationOptions)],isAssociation:this.isAssociation}}};return{...(0,l.cloneDeep)({...n.defaultProps,...null===this||void 0===this?void 0:this.properties}),...t,...r}}getDefaultValueProperty(){var e,t;return{defaultValue:{...(0,l.cloneDeep)(null===this||void 0===this||null==(e=this.default)?void 0:e.uiSchema),...null===this||void 0===this||null==(t=this.properties)?void 0:t.uiSchema,required:!1,title:'{{ t("Default value") }}',"x-decorator":"FormItem","x-reactions":[{dependencies:["uiSchema.x-component-props.gmt","uiSchema.x-component-props.showTime","uiSchema.x-component-props.dateFormat","uiSchema.x-component-props.timeFormat","uiSchema.x-component-props.picker","uiSchema.x-component-props.format"],fulfill:{state:{componentProps:{gmt:"{{$deps[0]}}",showTime:"{{$deps[1]}}",dateFormat:"{{$deps[2]}}",timeFormat:"{{$deps[3]}}",picker:"{{$deps[4]}}",format:"{{$deps[5]}}"}}}},{dependencies:["uiSchema.x-component-props.picker"],fulfill:{state:{value:null}}},{dependencies:["primaryKey","unique","autoIncrement","defaultToCurrentTime"],when:"{{$deps[0]||$deps[1]||$deps[2]||$deps[3]}}",fulfill:{state:{hidden:!0,value:null}},otherwise:{state:{hidden:!1}}},{dependencies:["uiSchema.enum"],fulfill:{state:{dataSource:"{{$deps[0]}}"}}}]}}}addOperator(e){(0,l.set)(this,"filterable.operators",[...this.filterable.operators||[]]),this.filterable.operators.find(t=>t.value===e.value)||this.filterable.operators.push(e)}constructor(e){this.collectionFieldInterfaceManager=e,this.availableValidationOptions=[]}}},32799(e,t,o){o.d(t,{y:()=>l.y,L:()=>n});var l=o(29928);class n{addFieldInterfaces(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.reduce((e,t)=>{let o=new t(this);return e[o.name]=o,Array.isArray(this.actionList[o.name])&&(this.actionList[o.name].forEach(e=>{o[e.type](e.data)}),this.actionList[o.name]=void 0),e},{});Object.assign(this.collectionFieldInterfaceInstances,t)}addFieldInterfaceComponentOption(e,t){let o=this.getFieldInterface(e);if(!o){this.actionList[e]||(this.actionList[e]=[]),this.actionList[e].push({type:"addComponentOption",data:t});return}o.addComponentOption(t)}addFieldInterfaceOperator(e,t){let o=this.getFieldInterface(e);null==o||o.addOperator(t)}getFieldInterface(e){return this.collectionFieldInterfaceInstances[e]}getFieldInterfaces(e){return Object.values(this.collectionFieldInterfaceInstances).filter(t=>{var o,l;return!e||!t.supportDataSourceType&&!t.notSupportDataSourceType||(t.supportDataSourceType?null==(o=t.supportDataSourceType)?void 0:o.includes(e):t.notSupportDataSourceType?!(null==(l=t.notSupportDataSourceType)?void 0:l.includes(e)):void 0)})}addFieldInterfaceGroups(e){Object.assign(this.collectionFieldGroups,e)}getFieldInterfaceGroups(){return this.collectionFieldGroups}getFieldInterfaceGroup(e){return this.collectionFieldGroups[e]}constructor(e,t,o){this.dataSourceManager=o,this.collectionFieldInterfaceInstances={},this.collectionFieldGroups={},this.actionList={},this.addFieldInterfaces(e),this.addFieldInterfaceGroups(t)}}},42219(e,t,o){o.d(t,{J:()=>g});var l=o(71178),n=o(56920),a=o(2314),r=o(27404),i=o(77583),s=o(51649),d=o(69412),u=o(30644),c=o(80461),p=o(82924),m=o(83508),h=o(59896),x=o(46724);let v=(e,t,o)=>{(0,a.untracked)(()=>{void 0===e[t]&&(e[t]=o)})},_=e=>{var t;let o=(0,p.lum)(),a=(0,n.useField)(),u=(0,n.useFieldSchema)(),{uiSchema:h,defaultValue:_}=(0,x.E1)(),{isAllowToSetDefaultValue:f}=(0,m.eT)(),g=(0,p.xZI)((null==(t=u["x-component-props"])?void 0:t.component)||(null==h?void 0:h["x-component"])||"Input"),b=(0,d.Es)(),y=(0,c.S)(null==h?void 0:h["x-use-component-props"],e);return((0,s.useEffect)(()=>{if(!h)return;let e=o(h);if(v(a,"content",e["x-content"]),v(a,"title",e.title),v(a,"description",e.description),null==b?void 0:b.form){let e=f()?u.default||_:void 0;null!=e&&v(a,"initialValue",e)}!a.validator&&(e["x-validator"]||u["x-validator"])&&(a.validator=(0,i.concat)([],e["x-validator"]||[],u["x-validator"]||[])),!0===u["x-disabled"]&&(a.disabled=!0),!0===u["x-read-pretty"]&&(a.readPretty=!0),void 0===u.required&&(a.required=!!e.required),a.dataSource=e.enum,a.data=a.data||{},a.data.dataSource=null==e?void 0:e.enum;let t=o(e["x-component-props"])||{};a.componentProps=(0,r.merge)(t,a.componentProps||{},y||{})},[h]),h)?(0,l.jsx)(g,{...e,...y}):null},f=e=>{var t;let o=(0,n.useField)(),a=(0,n.useFieldSchema)(),{uiSchema:r}=(0,u.ZC)(),i=(0,p.xZI)((null==(t=a["x-component-props"])?void 0:t.component)||(null==r?void 0:r["x-component"])||"Input"),d=(0,c.S)(null==r?void 0:r["x-use-component-props"],e);if((0,s.useEffect)(()=>{!0!==a["x-read-pretty"]||o.readPretty||(o.readPretty=!0),!0===a["x-disabled"]&&(o.disabled=!0),o.data=o.data||{},o.data.dataSource=null==r?void 0:r.enum},[o,a]),!r)return null;let m={...e,...d};return(0,h.DZ)(m.value)&&m.value===a.default&&(m.value=void 0),(0,l.jsx)(i,{...m})},g=(0,n.connect)(e=>{let t=(0,n.useFieldSchema)(),o=(0,u.IC)();return(0,l.jsx)(x.Ey,{name:t.name,children:o?(0,l.jsx)(f,{...e}):(0,l.jsx)(_,{...e})})});g.displayName="CollectionField"},46724(e,t,o){o.d(t,{E1:()=>c,Ey:()=>d,bJ:()=>u,yn:()=>s});var l=o(71178),n=o(51649),a=o(56920),r=o(40829),i=o(52968);let s=(0,n.createContext)(null);s.displayName="CollectionFieldContext";let d=e=>{let{name:t,children:o,allowNull:d}=e,u=(0,a.useFieldSchema)(),c=(0,r.Ge)(),p=(0,r.r2)(),m=(0,n.useMemo)(()=>{var e;if(!c)return null;let o=null==u||null==(e=u["x-component-props"])?void 0:e.field;return p.getCollectionField(null==u?void 0:u["x-collection-field"])||o||c.getField((null==o?void 0:o.name)||t)},[c,u,p,t]);return!m&&d?(0,l.jsx)(l.Fragment,{children:o}):m?(0,l.jsx)(s.Provider,{value:m,children:o}):(0,l.jsx)(i.x,{type:"Field",name:t})},u=e=>(0,l.jsx)(s.Provider,{value:null,children:e.children}),c=()=>(0,n.useContext)(s)},78813(e,t,o){o.d(t,{o:()=>l});class l{setData(e){this.data=e}setParentRecord(e){this.parentRecord=e}constructor(e){let{data:t,parentRecord:o,isNew:l}=e;this.isNew=l,this.data=t,this.parentRecord=o}}},35432(e,t,o){o.d(t,{Jw:()=>i,PD:()=>s,Vm:()=>u,tH:()=>r,vt:()=>c,zv:()=>d});var l=o(71178),n=o(51649),a=o(78813);let r=(0,n.createContext)(null);r.displayName="CollectionRecordContext";let i=n.default.memo(e=>{let{isNew:t,record:o,parentRecord:i,children:s}=e,d=(0,n.useMemo)(()=>i?i instanceof a.o?i:new a.o({data:i}):o instanceof a.o?o.parentRecord:void 0,[i,o]),u=(0,n.useMemo)(()=>{let e;return o?o instanceof a.o?(e=o).isNew=o.isNew||t:e=new a.o({data:o,isNew:t}):e=new a.o({isNew:t}),e.setParentRecord(d),e},[o,d,t]);return(0,l.jsx)(r.Provider,{value:u,children:s})});function s(){return(0,n.useContext)(r)}function d(){let e=s();return null==e?void 0:e.data}function u(){let e=s();return null==e?void 0:e.parentRecord}function c(){var e;let t=s();return null==t||null==(e=t.parentRecord)?void 0:e.data}i.displayName="CollectionRecordProvider"},66110(e,t,o){o.d(t,{Jw:()=>n.Jw,PD:()=>n.PD,Vm:()=>n.Vm,ol:()=>l.o,tH:()=>n.tH,vt:()=>n.vt,zv:()=>n.zv});var l=o(78813),n=o(35432)},14469(e,t,o){o.d(t,{$:()=>i,_:()=>r});var l=o(2314),n=o(77583);let a="__isNewRecord__",r=e=>(0,l.untracked)(()=>!!(null==e?void 0:e[a])),i=e=>{if(!(0,n.isObject)(e))throw Error("markRecordAsNew: record must be an object");return e[a]=!0,e}},83339(e,t,o){o.d(t,{T:()=>l});class l{constructor(e){this.collectionTemplateManager=e}}},86960(e,t,o){o.d(t,{C:()=>l});class l{addCollectionTemplates(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.reduce((e,t)=>{let o=new t(this);return e[o.name]=o,e},{});return Object.assign(this.collectionTemplateInstances,t),this.dataSourceManager.getDataSources().forEach(e=>{let o=e.collectionManager.getCollections(e=>t[e.template]);e.collectionManager.reAddCollections(o)}),t}getCollectionTemplate(e){return this.collectionTemplateInstances[e]}getCollectionTemplates(e){return Object.values(this.collectionTemplateInstances).filter(t=>{var o,l;return!e||!t.supportDataSourceType&&!t.notSupportDataSourceType||(t.supportDataSourceType?null==(o=t.supportDataSourceType)?void 0:o.includes(e):t.notSupportDataSourceType?!(null==(l=t.notSupportDataSourceType)?void 0:l.includes(e)):void 0)}).sort((e,t)=>(e.order||0)-(t.order||0))}constructor(e,t){this.dataSourceManager=t,this.collectionTemplateInstances={},this.addCollectionTemplates(e)}}},94138(e,t,o){o.d(t,{$z:()=>p,KY:()=>c,UJ:()=>m});var l=o(71178),n=o(51649),a=o(46724),r=o(52968),i=o(26174),s=o(49621);let d=(0,n.createContext)(null);d.displayName="ParentCollectionContext";let u=e=>{let t=(0,s.Ge)();return(0,l.jsx)(d.Provider,{value:t,children:e.children})},c=()=>(0,n.useContext)(d),p=e=>{let{name:t,children:o}=e,n=(0,i.r2)().getCollectionName(t);return n?(0,l.jsx)(s.Yz,{name:String(t).split(".")[0],children:(0,l.jsx)(u,{children:(0,l.jsx)(a.Ey,{name:t,children:(0,l.jsx)(s.Yz,{name:n,children:o})})})}):(0,l.jsx)(r.x,{type:"Collection",name:t})},m=()=>{let e=(0,a.E1)();return(null==e?void 0:e.target)?`${e.collectionName}.${e.name}`:null}},21086(e,t,o){o.d(t,{p:()=>n});var l=o(77583);class n{get fields(){return this.options.fields||[]}get app(){return this.collectionManager.app}get dataSource(){return this.options.dataSource}get sourceKey(){return this.options.sourceKey}get name(){return this.options.name}get key(){return this.options.key}get title(){return this.options.title}get inherit(){return this.options.inherit}get hidden(){return this.options.hidden}get description(){return this.options.description}get duplicator(){return this.options.duplicator}get category(){return this.options.category}get targetKey(){return this.options.targetKey}get model(){return this.options.model}get createdBy(){return this.options.createdBy}get updatedBy(){return this.options.updatedBy}get logging(){return this.options.logging}get from(){return this.options.from}get rawTitle(){return this.options.rawTitle}getPrimaryKey(){if(this.primaryKey)return this.primaryKey;if(this.options.targetKey)return this.options.targetKey;let e=this.getFields({primaryKey:!0})[0];return this.primaryKey=null==e?void 0:e.name,this.primaryKey}getFilterTargetKey(){return this.filterTargetKey||this.getPrimaryKey()||"id"}get inherits(){return this.options.inherits||[]}get titleField(){return this.hasField(this.options.titleField)?this.options.titleField:this.getPrimaryKey()}get sources(){return this.options.sources||[]}get template(){return this.options.template}get tableName(){return this.options.tableName}get viewName(){return this.options.viewName}get writableView(){return this.options.writableView}get filterTargetKey(){return this.options.filterTargetKey}get sortable(){return this.options.sortable}get autoGenId(){return this.options.autoGenId}get magicAttribute(){return this.options.magicAttribute}get tree(){return this.options.tree}get isThrough(){return this.options.isThrough}get autoCreate(){return this.options.autoCreate}get resource(){return this.options.resource}setOption(e,t){return this.options[e]=t,this}getOptions(){return this.options}getOption(e){return this.options[e]}getFields(e){return e?(0,l.filter)(this.fields,e):this.fields}getAllFields(e){return this.getFields(e)}getFieldsMap(){return this.fieldsMap||(this.fieldsMap=this.getFields().reduce((e,t)=>(e[t.name]=t,e),{})),this.fieldsMap}getFieldByAssociationName(e){let t=this.getFieldsMap(),[o,...l]=String(e).split("."),n=t[o];if(!n)return;let a=null==n?void 0:n.target;if(!a)return;let r=this.collectionManager.getCollection(a);if(r)return r.getField(l.join("."))}getField(e){if(!e)return;let t=this.getFieldsMap();if(String(e).split(".").length>1){let t=this.getFieldByAssociationName(e);return t||("string"==typeof e&&e.startsWith(`${this.name}.`)?(e=e.replace(`${this.name}.`,""),this.getField(e)):void 0)}return t[e]}hasField(e){return!!this.getField(e)}isTitleField(e){var t;return null==(t=this.app.dataSourceManager.collectionFieldInterfaceManager.getFieldInterface(e.interface))?void 0:t.titleUsable}isInherited(){return this.inherits.length>0}constructor(e,t){this.options=e,this.collectionManager=t}}},26174(e,t,o){o.d(t,{Jr:()=>i,Pf:()=>d,Xd:()=>c,r2:()=>u});var l=o(71178),n=o(51649),a=o(23460),r=o(17544);let i=(0,n.createContext)(null);i.displayName="CollectionManagerContext";let s=e=>{let{instance:t,children:o}=e,s=(0,a.xw)(),d=(0,r.h_)(),u=(0,n.useMemo)(()=>t||(null==s?void 0:s.collectionManager),[t,s]),[c,p]=n.default.useState(Math.random());(0,n.useEffect)(()=>{u.dataSource.addReloadCallback(()=>{p(Math.random())})},[u]);let m=(0,n.useMemo)(()=>(null==d?void 0:d.length)?u.clone(d):u,[u,d,c]);return(0,l.jsx)(i.Provider,{value:m,children:o})},d=e=>{let{instance:t,dataSource:o,children:n}=e;return(0,l.jsx)(a.tc,{dataSource:o,children:(0,l.jsx)(s,{instance:t,children:n})})};function u(){return(0,n.useContext)(i)}let c=e=>{let t=u();return(0,n.useMemo)(()=>t.getCollections(e),[t,e])}},49621(e,t,o){o.d(t,{$h:()=>p,CQ:()=>s,Ge:()=>c,N5:()=>u,Yz:()=>d});var l=o(71178),n=o(51649),a=o(46724),r=o(52968),i=o(26174);let s=(0,n.createContext)(null);s.displayName="CollectionContext";let d=e=>{let{name:t,children:o,allowNull:a}=e,d=(0,i.r2)(),u=(0,n.useMemo)(()=>null==d?void 0:d.getCollection(t),[d,t]);return!u&&a?(0,l.jsx)(l.Fragment,{children:e.children}):u||a?(0,l.jsx)(s.Provider,{value:u,children:o}):(0,l.jsx)(r.x,{type:"Collection",name:t})},u=e=>(0,l.jsx)(a.yn.Provider,{value:null,children:(0,l.jsx)(d,{...e})});function c(){return(0,n.useContext)(s)}let p=e=>{let t=c();return(0,n.useMemo)(()=>t.getFields(e),[t,e])}},17544(e,t,o){o.d(t,{Jl:()=>s,h_:()=>d,pi:()=>i});var l=o(71178),n=o(51649),a=o(23460),r=o(26174);let i=(0,n.createContext)(null);i.displayName="ExtendCollectionsContext";let s=e=>{let{children:t,collections:o}=e,s=d(),u=(0,n.useMemo)(()=>s?[...s,...o]:o,[s,o]),c=(0,a.Mp)();return(0,l.jsx)(i.Provider,{value:u,children:(0,l.jsx)(r.Pf,{dataSource:c,children:t})})};function d(){return(0,n.useContext)(i)}},40829(e,t,o){o.d(t,{pM:()=>l.p,r2:()=>u.r2,Jr:()=>u.Jr,Pf:()=>u.Pf,$z:()=>a.$z,UJ:()=>a.UJ,h_:()=>c.h_,pi:()=>c.pi,Jl:()=>c.Jl,qG:()=>d,KY:()=>a.KY,N5:()=>n.N5,Yz:()=>n.Yz,Xd:()=>u.Xd,$h:()=>n.$h,CQ:()=>n.CQ,Ge:()=>n.Ge});var l=o(21086),n=o(49621),a=o(94138),r=o(42966),i=o(7271);let s=(e,t)=>{let{rawTitle:o,title:l,fields:n=[],...a}=e,r=(o,l)=>{var n,a;if(e.disableTranslation)return o;if(null==(n=t.context)?void 0:n.t)return t.context.t(o,l);let r=t.i18n||(null==(a=t.getOptions)?void 0:a.call(t).i18n)||i.Ru;return(null==r?void 0:r.t)?r.t(o,l):o};return{...a,title:o?l:r(l,{ns:"lm-collections"}),rawTitle:o||l,fields:null==n?void 0:n.map(e=>{let{uiSchema:t,...o}=e;if(null==t?void 0:t.title){let e=t.title;t.title=t.rawTitle?e:r(e,{ns:"lm-collections"}),t.rawTitle=t.rawTitle||e}return Array.isArray(null==t?void 0:t.enum)&&(t.enum=t.enum.map(e=>({...e,value:(null==e?void 0:e.value)===void 0?e:e.value,label:e.rawLabel?e.label:r(e.label,{ns:"lm-collections"}),rawLabel:e.rawLabel||e.label}))),{uiSchema:t,...o}})}};class d{get dataSourceManager(){return this.dataSource.dataSourceManager}get app(){return this.dataSourceManager.app}getCollectionInstance(e){var t,o;let n,a=this.dataSource.dataSourceManager.collectionTemplateManager.getCollectionTemplate(e.template),r=(null==a?void 0:a.Collection)||l.p,i=null==a?void 0:a.transform,d={...i?i(s(e,this.app),this.app):s(e,this.dataSource.dataSourceManager.app),dataSource:this.dataSource.key};return t=this.dataSourceManager.collectionMixins,o=this,n=new r(d,o),t.forEach(e=>{let t=new e(d,o);Object.getOwnPropertyNames(t).forEach(e=>{let o=Object.getOwnPropertyDescriptor(t,e);o?Object.defineProperty(n,e,o):n[e]=t[e]}),Object.getOwnPropertyNames(e.prototype).forEach(t=>{"constructor"!==t&&(n.__proto__[t]=e.prototype[t])})}),n}getInstancesMap(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>this.getCollectionInstance(e)).reduce((e,t)=>(e[t.name]=t,e),{})}addCollections(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.getInstancesMap(e);this.collectionInstancesMap={...this.collectionInstancesMap,...t},this.collectionInstancesArr=Object.values(this.collectionInstancesMap)}setCollections(e){this.collectionInstancesMap=this.getInstancesMap(e),this.collectionInstancesArr=Object.values(this.collectionInstancesMap)}reAddCollections(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.collectionInstancesArr,t=e.map(e=>e.getOptions());this.addCollections(t)}getCollection(e){if(e){if("object"==typeof e)return e.disableTranslation=!0,this.getCollectionInstance(e);if(String(e).split(".").length>1){let t=this.getCollectionField(e);if(!t)return;return this.getCollection(t.target)}return this.collectionInstancesMap[e]}}getCollections(e){return e?this.collectionInstancesArr.filter(e):this.collectionInstancesArr}getCollectionName(e){let t=this.getCollection(e);return null==t?void 0:t.name}getCollectionField(e){if(!e)return;if("object"==typeof e)return e;if(String(e).split(".").length<2)return void console.error(`[@nocobase/client]: CollectionManager.getField() path "${e}" is invalid`);let[t,...o]=String(e).split("."),l=this.getCollection(t);if(l)return l.getField(o.join("."))}getCollectionFields(e,t){var o;return(null==(o=this.getCollection(e))?void 0:o.getFields(t))||[]}getCollectionAllFields(e,t){var o;return(null==(o=this.getCollection(e))?void 0:o.getAllFields(t))||[]}getFilterByTK(e,t){if(!e||!t)return void console.error("@nocobase/client]: CollectionManager.getFilterByTK() collectionOrAssociation or collectionRecordOrAssociationRecord is invalid");let o=(e,t)=>{if(!Array.isArray(e))return t[e];{let o={};return e.forEach(e=>{o[e]=t[e]}),r.default.stringify(o)}};if(e instanceof l.p)return o(e.getFilterTargetKey(),t);if(e.includes(".")){let l=this.getCollectionField(e);if(!l)return void console.error(`[@nocobase/client]: CollectionManager.getFilterByTK() field "${e}" is invalid`);let n=this.getCollection(l.target);if(n)return o(n.getFilterTargetKey(),t);if(l.targetKey)return t[l.targetKey]}let n=this.getCollection(e);return n?o(n.getFilterTargetKey(),t):void console.error(`[@nocobase/client]: CollectionManager.getFilterByTK() collection "${e}" is invalid`)}getSourceKeyByAssociation(e){if(!e)return;let t=this.getCollectionField(e);if(!t)return;if(t.sourceKey)return t.sourceKey;let o=this.getCollection(e.split(".")[0]);if(o)return o.filterTargetKey||o.getPrimaryKey()||"id"}clone(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new d([],this.dataSource);return t.collectionInstancesArr=this.collectionInstancesArr,t.collectionInstancesMap=this.collectionInstancesMap,t.addCollections(e),t}constructor(e,t){this.dataSource=t,this.collectionInstancesMap={},this.collectionInstancesArr=[],this.addCollections(e)}}var u=o(26174),c=o(17544)},92719(e,t,o){o.d(t,{I:()=>c});var l=o(56920),n=o(77583),a=o(77843),r=o(14669),i=o(46724),s=o(32221),d=o(61013),u=o(95951);let c={name:"fieldComponent",type:"select",useVisible(){let e=(0,i.E1)(),t=(0,r.m6)();if(!e)return!1;let o=t.collectionFieldInterfaceManager.getFieldInterface(null==e?void 0:e.interface);return Array.isArray(null==o?void 0:o.componentOptions)&&o.componentOptions.length>1&&o.componentOptions.filter(e=>!e.useVisible||e.useVisible()).length>1},useComponentProps(){var e,t,o,c;let{t:p}=(0,a.useTranslation)(),m=(0,l.useField)(),h=(0,l.useFieldSchema)(),x=(0,i.E1)(),v=(0,r.m6)().collectionFieldInterfaceManager.getFieldInterface(null==x?void 0:x.interface),{fieldSchema:_}=(0,s.BC)(),f=_||h,{dn:g}=(0,u.er)(),b=(0,d.l)(),y=(null==v||null==(t=v.componentOptions)||null==(e=t.filter(e=>!e.useVisible||e.useVisible()))?void 0:e.map(e=>({label:b(e.label),value:e.value,useProps:e.useProps})))||[];return{title:p("Field component"),options:y,value:(null==(o=f["x-component-props"])?void 0:o.component)||(null==(c=y[0])?void 0:c.value),onChange(e){var t;let o=y.find(t=>t.value===e),l={component:e,...(null==o||null==(t=o.useProps)?void 0:t.call(o))||{},...e===x.uiSchema["x-component"]?x.uiSchema["x-component-props"]:{}};n.default.set(f,"x-component-props",l),m.componentProps=l,g.emit("patch",{schema:{"x-uid":f["x-uid"],"x-component-props":l}})}}}}},52968(e,t,o){o.d(t,{b:()=>v,x:()=>h});var l=o(71178),n=o(52793),a=o(51649),r=o(77843),i=o(82924),s=o(23460),d=o(2490),u=o(67574),c=o(40829),p=o(71226);let{Text:m}=n.Typography,h=e=>{let{type:t,name:o,message:h}=e,{designable:x,dn:v}=(0,i.erX)(),{modal:_}=n.App.useApp(),{t:f}=(0,r.useTranslation)(),g=(0,s.xw)(),b=(0,i.lum)(),y=(0,c.Ge)(),S=(0,d.m6)(),k=(0,a.useMemo)(()=>{if("Data Source"===t)return o;let e=(null==S?void 0:S.getDataSources().length)>=1&&g&&g.key!==u.Ze?`${b(g.displayName||g.key)} > `:"";if("Collection"===t)return`${e}${o}`;let l=y?`${b(y.title)||y.name||y.tableName} > `:"";return`${e}${l}${o}`},[]),C=(0,a.useMemo)(()=>"Field"===t?"Field":"Block",[t]),M=(0,a.useMemo)(()=>o?h?`${f(t)} "${k}" ${h}`:f('The {{type}} "{{name}}" may have been deleted. Please remove this {{blockType}}.',{type:f(t).toLocaleLowerCase(),name:k,blockType:f(C).toLocaleLowerCase()}).replaceAll("&gt;",">"):`${f(t)} name is required`,[h,k,t,f,C]);return x?"Field"===t?(0,l.jsx)(i.R_2,{ellipsis:!0,children:(0,l.jsx)(m,{type:"secondary",children:M})}):(0,l.jsx)(p.t,{children:(0,l.jsx)(n.Result,{status:"404",subTitle:M,extra:(0,l.jsx)(n.Button,{onClick:()=>_.confirm({title:f("Delete block"),content:f("Are you sure you want to delete it?"),...confirm,onOk(){v.remove(null,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}),v.refresh({refreshParentSchema:!0})}}),children:f("Delete")},"Delete")})}):null},x=()=>{let{t:e}=(0,r.useTranslation)(),t=(0,s.xw)(),o=(0,i.lum)(),m=(0,c.Ge)(),h=(0,d.m6)(),x=(0,a.useMemo)(()=>{let e=(null==h?void 0:h.getDataSources().length)>=1&&t&&t.key!==u.Ze?`${o(t.displayName||t.key)} > `:"";if(m)return`${e}${m.name}`;let l=m?`${o(m.title)||m.name||m.tableName} > `:"";return`${e}${l}${m.name}`},[]),v=(0,a.useMemo)(()=>e('The current user only has the UI configuration permission, but don\'t have view permission for collection "{{name}}"',{name:x}).replaceAll("&gt;",">"),[x,e]);return(0,l.jsx)(p.t,{children:(0,l.jsx)(n.Result,{status:"404",subTitle:v})})},v=()=>{let{designable:e}=(0,i.erX)();return e?(0,l.jsx)(x,{}):null}},62248(e,t,o){o.d(t,{N:()=>r});var l=o(71178);o(51649);var n=o(14669),a=o(26174);let r=e=>{let{children:t,dataSourceManager:o,...r}=e;return(0,l.jsx)(n.e1,{dataSourceManager:o,children:(0,l.jsx)(a.Pf,{...r,children:t})})}},32444(e,t,o){o.d(t,{$$:()=>b,Kx:()=>S,Qj:()=>_,R6:()=>x,T4:()=>g,h6:()=>y,uG:()=>f});var l=o(71178),n=o(51649),a=o(42536),r=o(11482),i=o(80461),s=o(95951),d=o(40829),u=o(14187),c=o(46776),p=o(38892),m=o(76460),h=o(56920);let x=(0,n.createContext)({});x.displayName="DataBlockContext";let v=(0,n.createContext)(null),_=e=>{let{children:t}=e,[o,a]=n.default.useState(!1),r=(0,n.useMemo)(()=>({rerenderDataBlock:()=>{a(!0),setTimeout(()=>{a(!1)})}}),[]);return o?null:(0,l.jsx)(v.Provider,{value:r,children:t})},f=e=>{let{collection:t,association:o,allowNull:a=!1}=e,r=(0,n.useMemo)(()=>o?{Component:d.$z,name:o}:{Component:d.N5,name:t},[t,o]);return(0,l.jsx)(r.Component,{name:r.name,allowNull:a,children:e.children})},g=(0,i.T)(n.default.memo(e=>{let{collection:t,association:o,dataSource:n,children:i,hidden:v,...g}=e,{dn:b}=(0,s.er)(),y=(0,h.useFieldSchema)();return v?null:(0,l.jsx)(m.j0,{scopeId:null==y?void 0:y["x-uid"],type:"dataBlock",children:(0,l.jsx)(x.Provider,{value:{dn:b,props:{...g,collection:t,association:o,dataSource:n}},children:(0,l.jsx)(d.Pf,{dataSource:n,children:(0,l.jsx)(f,{collection:t,association:o,children:(0,l.jsx)(a.yb,{children:(0,l.jsx)(p._,{children:(0,l.jsx)(c.Fr,{children:(0,l.jsx)(u.Yu,{children:(0,l.jsx)(r.Pt,{params:e.params,children:(0,l.jsx)(_,{children:i})})})})})})})})})})}),{displayName:"DataBlockProvider"}),b=()=>{let e=(0,n.useContext)(x);if(!e)throw Error("useDataBlock() must be used within a DataBlockProvider");return e},y=()=>b().props,S=()=>{let e=(0,n.useContext)(v);if(!e)throw Error("useRerenderDataBlock() must be used within a DataBlockProvider");return e}},14187(e,t,o){o.d(t,{$G:()=>b,NB:()=>y,OO:()=>f,YE:()=>M,Yu:()=>S,ZK:()=>C,_J:()=>k});var l=o(71178),n=o(51649),a=o(77583),r=o(16211),i=o(41897),s=o(70136),d=o(43873),u=o(67242),c=o(79647),p=o(67285),m=o(66110),h=o(29558),x=o(32444),v=o(46776);let _=(0,n.createContext)(null);_.displayName="BlockRequestRefContext";let f=(0,n.createContext)(!1);f.displayName="BlockRequestLoadingContext";let g=(0,n.createContext)(null);async function b(e){let{sourceId:t,association:o,parentRecord:l,api:n,headers:a,sourceKey:r}=e;if(l)return Promise.resolve({data:l});if(!o||!r||!t)return Promise.resolve({data:void 0});let i=o.split("."),s=`${i[0]}:get?filter[${r}]=${t}`;return(await n.request({url:s,headers:a})).data}g.displayName="BlockRequestDataContext";let y=e=>{var t,o,r,s,d,u;let p=(0,n.useRef)(e.recordRequest),m=(0,n.useRef)(null==(t=e.recordRequest)?void 0:t.data),{active:h}=(0,c.Y)(),v=(0,i.$Q)(),b=(0,n.useRef)(h),y=(0,n.useRef)(v),S=(0,n.useDeferredValue)(h),k=(0,x.h6)(),C=b.current;return S&&!C&&y.current===v&&(a.default.isNil(k.dataLoadingMode)||"auto"===k.dataLoadingMode)&&(null==(d=e.recordRequest)||d.refresh()),!S||!C||(null==(o=e.recordRequest)?void 0:o.loading)||a.default.isEqual(m.current,null==(r=e.recordRequest)?void 0:r.data)||(m.current=null==(u=e.recordRequest)?void 0:u.data),h&&C&&(y.current=v),S!==C&&(b.current=S),p.current=e.recordRequest,(0,l.jsx)(_.Provider,{value:p,children:(0,l.jsx)(f.Provider,{value:null==(s=e.recordRequest)?void 0:s.loading,children:(0,l.jsx)(g.Provider,{value:m.current,children:e.children})})})},S=n.default.memo(e=>{var t,o;let{children:i}=e,{action:c,filterByTk:_,sourceId:f,params:g=p.M,association:S,collection:k,record:C,parentRecord:M,requestOptions:w,requestService:F}=(0,x.h6)(),P=function(e){let t=(0,d.fY)(),o=(0,v.jz)(),{action:l,params:i={},record:c,requestService:p,requestOptions:m,sourceId:_,association:f,parentRecord:g}=e,y=(0,r.VB)(),S=(0,x.h6)(),k=(0,h.TF)(S.dataSource),C=(0,u.i)(f),[M,w]=(0,n.useMemo)(()=>[JSON.stringify(i),JSON.stringify(c)],[i,c]),{isBlockTemplate:F,templateFinished:P}=(0,s.y)(),j=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(null==F?void 0:F())&&!P?null:(p||(e=>{var t;if(c)return Promise.resolve({data:c});if(!l)throw Error("[nocobase]: The 'action' parameter is missing in the 'DataBlockRequestProvider' component");if("get"===l&&a.default.isNil(i.filterByTk))return console.warn('[nocobase]: The "filterByTk" parameter is missing in the "DataBlockRequestProvider" component');let n={...void 0===i.filterByTk?a.default.omit(i,"filterByTk"):i,...e};return null==(t=o[l])?void 0:t.call(o,n).then(e=>e.data)}))(...t)},A=async function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];let[l,n]=await Promise.all([j(...t),b({sourceId:_,association:f,parentRecord:g,api:y,headers:k,sourceKey:C})]);return l&&(l.parentRecord=null==n?void 0:n.data),l},I=(0,r.bP)(A,{...m,manual:"manual"===t,ready:!!l,refreshDeps:[l,M,w,o,f,g,_,P]});return I._defaultParams=i,I}({action:c,sourceId:f,record:C,association:S,collection:k,requestOptions:w,requestService:F,params:(0,n.useMemo)(()=>({...g,filterByTk:_||g.filterByTk}),[_,g]),parentRecord:M}),j=null==(t=P.data)?void 0:t.parentRecord,A=(0,n.useMemo)(()=>j&&new m.ol({isNew:!1,data:j instanceof m.ol?j.data:j}),[j]);return(0,l.jsx)(y,{recordRequest:P,children:"list"!==c?(0,l.jsx)(m.Jw,{isNew:null==c,record:(null==(o=P.data)?void 0:o.data)||C,parentRecord:A||M,children:i}):(0,l.jsx)(m.Jw,{isNew:!1,record:null,parentRecord:A||M,children:i})})});S.displayName="DataBlockRequestProvider";let k=()=>{let e=(0,n.useContext)(_),t=(0,n.useContext)(f),o=(0,n.useContext)(g);return(0,n.useMemo)(()=>e?{...e.current,loading:t,data:o}:null,[e,o,t])},C=()=>{let e=(0,n.useContext)(_);return(0,n.useMemo)(()=>({getDataBlockRequest:()=>e?e.current:null}),[e])},M=()=>(0,n.useContext)(g)},46776(e,t,o){o.d(t,{Fr:()=>p,RE:()=>c,jz:()=>m});var l=o(71178),n=o(77583),a=o(51649),r=o(16211),i=o(40829),s=o(66110),d=o(29558),u=o(32444);let c=(0,a.createContext)(null);c.displayName="DataBlockResourceContext";let p=e=>{let{children:t}=e,o=(0,u.h6)(),p=(0,i.r2)(),{association:m,collection:h,dataSource:x,sourceId:v,parentRecord:_}=o,f=(0,r.VB)(),g=(0,d.TF)(x),b=(0,a.useMemo)(()=>"string"==typeof h?h:null==h?void 0:h.name,[h]),y=(0,a.useMemo)(()=>{if(v)return v;if(m&&_){let e=p.getSourceKeyByAssociation(m),t=_ instanceof s.ol?_.data:_;if(!(0,n.isArray)(e))return t[e];{let o={};for(let l of e)o[l]=null==t?void 0:t[l];return encodeURIComponent(JSON.stringify(o))}}},[m,v,_]),S=(0,a.useMemo)(()=>m?f.resource(m,y,g,!y):f.resource(b,void 0,g),[f,m,h,y,g]);return(0,l.jsx)(c.Provider,{value:S,children:t})};function m(){let e=(0,a.useContext)(c);if(!e)throw Error("useDataBlockResource() must be used within a DataBlockResourceProvider");return e}},593(e,t,o){o.d(t,{h:()=>a,q:()=>n});var l=o(40829);class n{get app(){return this.dataSourceManager.app}get key(){return this.options.key}get displayName(){return this.options.displayName}get status(){return this.options.status}get errorMessage(){return this.options.errorMessage}get collections(){return this.collectionManager.getCollections()||[]}getOptions(){return this.options}setOptions(e){Object.assign(this.options,e)}getOption(e){return this.options[e]}addReloadCallback(e){this.reloadCallbacks.includes(e)||this.reloadCallbacks.push(e)}removeReloadCallback(e){this.reloadCallbacks=this.reloadCallbacks.filter(t=>t!==e)}get flowEngineDataSourceManager(){var e;return null==(e=this.app.flowEngine)?void 0:e.context.dataSourceManager}async reload(){let e=await this.getDataSource(),t=this.flowEngineDataSourceManager;return t&&(t.upsertDataSource(this.options),t.getDataSource(this.key).upsertCollections(e.collections||[],{clearFields:!0})),this.setOptions(e),this.collectionManager.setCollections(e.collections||[]),this.reloadCallbacks.forEach(t=>t(e.collections)),this.options}constructor(e,t){this.options=e,this.dataSourceManager=t,this.reloadCallbacks=[],this.collectionManager=new l.qG(e.collections,this)}}class a extends n{getDataSource(){return{collections:this.collections}}}},67574(e,t,o){o.d(t,{Ze:()=>i,gP:()=>s,zA:()=>d});var l=o(593),n=o(86960),a=o(32799),r=o(77583);let i="main",s='{{t("Main")}}';class d{addCollectionMixins(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.filter(e=>!this.collectionMixins.includes(e));t.length&&(this.collectionMixins.push(...t),this.getDataSources().forEach(e=>e.collectionManager.reAddCollections()))}getDataSources(e){let t=Object.values(this.dataSourceInstancesMap);return e?r.default.filter(t,e):t}setDataSources(e){let t=r.default.keyBy(e,"key");Object.keys(this.dataSourceInstancesMap).forEach(e=>{let o=t[e];o&&this.dataSourceInstancesMap[e].setOptions({displayName:o.displayName,status:o.status})})}getDataSource(e){return e?this.dataSourceInstancesMap[e]:this.dataSourceInstancesMap[i]}removeDataSources(e){e.forEach(e=>{delete this.dataSourceInstancesMap[e]})}addDataSource(e,t){let o=new e(t,this);return this.dataSourceInstancesMap[o.key]=o,o}async addDataSources(e,t){this.multiDataSources.some(o=>{let[l,n]=o;return l===e&&n===t})||this.multiDataSources.push([e,t])}getAllCollections(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{filterCollection:t,filterDataSource:o}=e;return this.getDataSources(o).reduce((e,o)=>(e.push({...o.getOptions(),collections:o.collectionManager.getCollections(t)}),e),[])}addFieldInterfaceGroups(e){this.collectionFieldInterfaceManager.addFieldInterfaceGroups(e)}addCollectionTemplates(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.collectionTemplateManager.addCollectionTemplates(e)}addFieldInterfaces(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.collectionFieldInterfaceManager.addFieldInterfaces(e)}async reload(){return await Promise.all(this.multiDataSources.map(async e=>{let[t,o]=e;(await t()).map(e=>this.addDataSource(o,e))})),Promise.all(this.getDataSources().map(e=>e.reload()))}constructor(e={},t){this.options=e,this.app=t,this.dataSourceInstancesMap={},this.multiDataSources=[],this.collectionMixins=[],this.collectionTemplateManager=new n.C(e.collectionTemplates,this),this.collectionFieldInterfaceManager=new a.L(e.fieldInterfaces,e.fieldInterfaceGroups,this),this.collectionMixins.push(...e.collectionMixins||[]),this.addDataSource(l.h,{key:i,displayName:s,collections:e.collections||[],status:"loaded"}),(e.dataSources||[]).forEach(e=>{this.addDataSource(l.h,e)})}}},14669(e,t,o){o.d(t,{LQ:()=>s,e1:()=>r,m6:()=>i,oc:()=>a});var l=o(71178),n=o(51649);let a=(0,n.createContext)(null);a.displayName="DataSourceManagerContext";let r=e=>{let{children:t,dataSourceManager:o}=e;return(0,l.jsx)(a.Provider,{value:o,children:t})};function i(){return(0,n.useContext)(a)}function s(){let e=i();return{getAllCollectionsInheritChain:(0,n.useCallback)((t,o)=>{var l,n,a;return null==e||null==(a=e.getDataSource(o))||null==(n=a.collectionManager)||null==(l=n.getCollection(t))?void 0:l.getInheritChain()},[e])}}},23460(e,t,o){o.d(t,{Mp:()=>h,Vl:()=>c,tc:()=>p,xw:()=>m});var l=o(71178),n=o(51649),a=o(14669),r=o(52968),i=o(82924),s=o(52793),d=o(82113),u=o(77843);let c=(0,n.createContext)(null);c.displayName="DataSourceContext";let p=e=>{let{children:t,dataSource:o}=e,p=(0,a.m6)(),{t:m}=(0,u.useTranslation)(),{refresh:h}=(0,i.Fag)(),[x,v]=n.default.useState(0),_=null==p?void 0:p.getDataSource(o);return _?"loading-failed"===_.status?(0,l.jsx)(r.x,{type:"Data Source",name:_.displayName||o,message:_.errorMessage||"loading failed"}):"loading"===_.status||"reloading"===_.status?(0,l.jsx)(i.oVU,{children:(0,l.jsx)(s.Result,{icon:(0,l.jsx)(d.LoadingOutlined,{}),title:`${_.displayName||o} ${m("data source")} ${m("loading")}...`,extra:(0,l.jsx)(s.Button,{type:"primary",onClick:()=>_.reload().then(()=>{h(),v(Math.random())}),children:m("Refresh")})})}):(0,l.jsx)(c.Provider,{value:_,children:t}):(0,l.jsx)(r.x,{type:"Data Source",name:o})};function m(){return(0,n.useContext)(c)}function h(){let e=(0,n.useContext)(c);return null==e?void 0:e.key}},2490(e,t,o){o.d(t,{LQ:()=>r.LQ,Mp:()=>a.Mp,Vl:()=>a.Vl,Ze:()=>n.Ze,e1:()=>r.e1,gP:()=>n.gP,h0:()=>l.h,m6:()=>r.m6,oc:()=>r.oc,qS:()=>l.q,tc:()=>a.tc,xw:()=>a.xw,zA:()=>n.zA});var l=o(593),n=o(67574),a=o(23460),r=o(14669)},28227(e,t,o){o.d(t,{pM:()=>l.pM,I1:()=>N.I,qS:()=>h.qS,tH:()=>x.tH,$z:()=>l.$z,bC:()=>B,Pf:()=>l.Pf,T0:()=>i.T,SG:()=>L,UJ:()=>l.UJ,yz:()=>r.y,Ey:()=>a.Ey,C1:()=>s.C,R6:()=>m.R6,$G:()=>p.$G,Vm:()=>x.Vm,h6:()=>m.h6,YE:()=>p.YE,ZK:()=>p.ZK,tc:()=>h.tc,Qj:()=>m.Qj,bJ:()=>a.bJ,NB:()=>p.NB,_J:()=>p._J,Fr:()=>c.Fr,jz:()=>c.jz,LQ:()=>h.LQ,Ln:()=>r.L,N5:()=>l.N5,OO:()=>p.OO,$$:()=>m.$$,h0:()=>h.h0,xw:()=>h.xw,vt:()=>x.vt,JL:()=>n.J,b:()=>d.b,gP:()=>h.gP,Dk:()=>Y,r2:()=>l.r2,CQ:()=>l.CQ,Nd:()=>u.N,Jr:()=>l.Jr,h_:()=>l.h_,Kx:()=>m.Kx,oc:()=>h.oc,pi:()=>l.pi,Mp:()=>h.Mp,ol:()=>x.ol,qG:()=>l.qG,zv:()=>x.zv,KY:()=>l.KY,Yu:()=>p.Yu,Vl:()=>h.Vl,ji:()=>v.ji,Jy:()=>T,yn:()=>a.yn,Xd:()=>l.Xd,m6:()=>h.m6,E1:()=>a.E1,Ge:()=>l.Ge,PD:()=>x.PD,Jw:()=>x.Jw,Ze:()=>h.Ze,zA:()=>h.zA,Jl:()=>l.Jl,T4:()=>m.T4,RE:()=>c.RE,kb:()=>v.kb,xd:()=>d.x,uG:()=>m.uG,Yz:()=>l.Yz,e1:()=>h.e1,TF:()=>v.TF,$h:()=>l.$h});var l=o(40829),n=o(42219),a=o(46724),r=o(32799),i=o(83339),s=o(86960),d=o(52968),u=o(62248),c=o(46776),p=o(14187),m=o(32444),h=o(2490),x=o(66110),v=o(29558),_=o(71178);function f(e,t,o){var l;let{block:n,isReadPretty:a=e=>{let{form:t}=e;return t.readPretty},filter:r=()=>!0,getInitializerItem:i=()=>({}),getSchema:s=()=>({})}=e,{collectionManager:d,collection:u,dataSourceManager:c,actionContext:p}=o,m=null==(l=p.fieldSchema)?void 0:l["x-action"];return u?t.map(e=>{let t=d.getCollection(e.target),l=c.collectionFieldInterfaceManager.getFieldInterface(e.interface);return{collectionField:e,context:{...o,targetCollection:t,collectionFieldInterface:l}}}).filter(e=>{let{collectionField:t}=e;return t.interface}).filter(e=>{let{collectionField:t,context:o}=e;return r(t,o)}).map(e=>{var t,o;let{collectionField:l,context:n}=e,a={type:"string",title:(null==l||null==(t=l.uiSchema)?void 0:t.title)||l.name,name:l.name,"x-component":"CollectionField","x-collection-field":`${u.name}.${l.name}`,"x-read-pretty":null==l||null==(o=l.uiSchema)?void 0:o["x-read-pretty"]},r=s(l,{...n,defaultSchema:a}),i={...a,...r||{}};return{collectionField:l,schema:i,context:{...n,schema:i}}}).map(e=>{var t;let{collectionField:o,context:l}=e,r={type:"item",name:o.name,title:(null==o||null==(t=o.uiSchema)?void 0:t.title)||o.name,Component:"CollectionFieldInitializer",schemaInitialize:e=>{var t,r;null==(r=l.collectionFieldInterface)||null==(t=r.schemaInitialize)||t.call(r,e,{field:o,block:n,readPretty:null==a?void 0:a(l),action:m,targetCollection:l.targetCollection})},schema:l.schema};return{collectionField:o,context:l,defaultInitializerItem:r}}).map(e=>{let{collectionField:t,defaultInitializerItem:o,context:l}=e,n=i(t,{...l,defaultInitializerItem:o});return{...o,...n||{}}}):[]}o(51649);var g=o(56920),b=o(77843),y=o(49621),S=o(23460),k=o(78562),C=o(26174),M=o(14669),w=o(82924);function F(){let{t:e}=(0,b.useTranslation)(),t=(0,y.Ge)(),o=(0,M.m6)(),l=(0,k.D5)(),n=(0,S.xw)(),a=(0,g.useForm)(),r=(0,g.useFieldSchema)(),i=(0,C.r2)();return{t:e,compile:(0,w.lum)(),actionContext:l,fieldSchema:r,collection:t,dataSource:n,form:a,collectionManager:i,dataSourceManager:o}}var P=o(96023);let j=e=>{let t=F(),{t:o,collection:l}=t,n=f(e,l.getFields(),t);return(0,_.jsx)(P.G0,{title:o("Display fields"),children:n})},A=e=>{let t=F(),{collection:o,t:l,collectionManager:n}=t,a=o.getParentCollectionsName();if(!a.length)return null;let r=a.map(e=>{let t=o.getParentCollectionFields(e);return 0===t.length?null:{parentCollection:n.getCollection(e),parentCollectionFields:t}}).filter(Boolean).map(o=>{let{parentCollection:n,parentCollectionFields:a}=o,r={...t,collection:n};return{type:"itemGroup",divider:!0,title:l("Parent collection fields")+"("+t.compile(n.title)+")",children:f(e,a,r)}});return(0,_.jsx)(P.ZI,{children:r})},I=e=>{let{filterAssociationField:t,filterSelfField:o=()=>!0,getSchema:l,...n}=e,{collection:a,t:r,collectionManager:i}=e.context,s=a.getFields(),d=["o2o","oho","obo","m2o"],u=s.filter(e=>d.includes(e.interface)).filter(t=>o(t,e.context));if(!u.length)return null;let c=u.map(e=>{let t=i.getCollection(e.target);if(!t)return null;let o=null==t?void 0:t.getAllFields();return o.length?{associationField:e,associationCollection:t,associationCollectionFields:o}:null}).filter(Boolean).map(o=>{var r,i;let{associationField:s,associationCollection:d,associationCollectionFields:u}=o,c={...e.context,collection:d};return{type:"subMenu",name:null==(r=s.uiSchema)?void 0:r.title,title:null==(i=s.uiSchema)?void 0:i.title,children:f({...n,filter:t,getSchema:(e,t)=>({...l(e,t)||{},"x-read-pretty":!0,name:`${s.name}.${e.name}`,"x-collection-field":`${a.name}.${s.name}.${e.name}`})},u,c)}});return c.length?(0,_.jsx)(P.G0,{title:r("Display association fields"),children:c}):null},T=e=>{let{selfField:t,parentField:o,associationField:l,block:n}=e,a=F();return a.collection?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(j,{block:n,...t,context:{...a,collection:a.collection}}),o&&(0,_.jsx)(A,{block:n,...o,context:{...a,collection:a.collection}}),l&&(0,_.jsx)(I,{block:n,...l,context:{...a,collection:a.collection}})]}):null};var D=o(81936);let L=(e,t,o)=>{let l=(0,D.Rg)(e,"x-component","Kanban");return(0,D.Rg)(l,t,o)},Y=e=>{let t=(null==e?void 0:e.block)||"Form",o={"x-toolbar":"FormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-decorator":"FormItem"},l={remove:D.AZ};return(0,_.jsx)(T,{block:t,selfField:{filter:e=>!e.treeChildren,getSchema:(e,t)=>{var l,n;let{targetCollection:a}=t,r=(null==a?void 0:a.template)==="file",i=null==e||null==(n=e.uiSchema)||null==(l=n["x-component-props"])?void 0:l.fieldNames;return{...o,"x-component-props":r?{fieldNames:{label:"preview",value:"id"}}:a&&i?{fieldNames:{...i,label:(null==a?void 0:a.titleField)||i.label}}:{}}},getInitializerItem:()=>({...l,find:(null==e?void 0:e.block)==="Kanban"?L:void 0})},parentField:{getSchema:()=>o,getInitializerItem:()=>l},associationField:{filterSelfField:e=>"Form"!==t||(null==e?void 0:e.interface)==="m2o",filterAssociationField:e=>(null==e?void 0:e.interface)&&!["subTable"].includes(null==e?void 0:e.interface)&&!e.treeChildren,getSchema:()=>o,getInitializerItem:()=>l}})},R=["attachment","textarea","markdown","json","richText","polygon","circle","point","lineString"],B=e=>{function t(e){let{fieldSchema:t,form:o}=e;return"AssociationField.SubTable"!==t["x-component"]||o.readPretty}return(0,_.jsx)(T,{block:"Table",selfField:{isReadPretty:t,filter:e=>"subTable"!==e.interface&&!e.treeChildren,getSchema:(e,o)=>{var l,n;let{targetCollection:a,fieldSchema:r,form:i}=o,s=(null==a?void 0:a.template)==="file",d=(null==(l=e.uiSchema)?void 0:l["x-component"])==="Preview",u="AssociationField.SubTable"===r["x-component"];return{"x-component-props":s?{fieldNames:{label:"preview",value:"id"}}:d?{size:"small"}:{},"x-read-pretty":t({fieldSchema:r,form:i})||(null==(n=e.uiSchema)?void 0:n["x-read-pretty"]),"x-decorator":u?R.includes(e.interface)||s?"QuickEdit":"FormItem":null,"x-decorator-props":{labelStyle:{display:"none"}}}},getInitializerItem:()=>({find:D.Oo,remove:D.nt})},parentField:{isReadPretty:t,getSchema(e,o){var l;let{targetCollection:n,fieldSchema:a,form:r}=o,i=(null==n?void 0:n.template)==="file",s="AssociationField.SubTable"===a["x-component"];return{"x-component-props":i?{fieldNames:{label:"preview",value:"id"}}:{},"x-read-pretty":t({fieldSchema:a,form:r})||(null==(l=e.uiSchema)?void 0:l["x-read-pretty"]),"x-decorator":s?R.includes(e.interface)||i?"QuickEdit":"FormItem":null,"x-decorator-props":{labelStyle:{display:"none"}}}},getInitializerItem:()=>({remove:D.AZ})},associationField:{filterAssociationField:e=>!["subTable"].includes(e.interface)&&!e.treeChildren,getSchema:()=>({}),getInitializerItem:()=>({find:D.Oo,remove:D.nt})}})};var N=o(92719)},29558(e,t,o){o.d(t,{TF:()=>i,ji:()=>r,kb:()=>s});var l=o(51649),n=o(67574);let a="x-data-source",r=(e,t)=>{var o;return null==(o=e.collectionFieldInterfaceManager.getFieldInterface(t.interface))?void 0:o.titleUsable},i=e=>(0,l.useMemo)(()=>{if(e&&e!==n.Ze)return{[a]:e}},[e]),s=e=>e&&e!==n.Ze?{[a]:e}:{}},50255(e,t,o){o.d(t,{L2:()=>m,er:()=>p,pf:()=>d,rN:()=>c,to:()=>s,vB:()=>u});var l=o(71178),n=o(51649),a=o(83468),r=o(86393),i=o(504);let s=(0,n.createContext)({getTitle:()=>"",setTitle:()=>{}});s.displayName="DocumentTitleContext";let d=n.default.memo(e=>{let{addonBefore:t,addonAfter:o}=e,a=(0,i.useFlowEngineContext)(),r=a.t.bind(a),d=e=>a.t(e,{ns:"lm-desktop-routes"}),u=e=>a.t(e,{ns:"lm-collections"}),c=n.default.useRef(""),p=(0,n.useCallback)(()=>c.current,[]),m=(0,n.useCallback)(e=>{setTimeout(()=>{document.title=c.current=`${t?` - ${r(t)}`:""}${d(e||"")}${o?` - ${u(o)}`:""}`})},[o,t,r,d,u]),h=(0,n.useMemo)(()=>({getTitle:p,setTitle:m}),[p,m]);return(0,l.jsx)(s.Provider,{value:h,children:e.children})});d.displayName="DocumentTitleProvider";let u=e=>{var t,o;let n=(0,r.e6)();return(0,l.jsx)(d,{addonAfter:null==n||null==(o=n.data)||null==(t=o.data)?void 0:t.title,children:e.children})},c=()=>(0,n.useContext)(s),p=e=>{let{setTitle:t}=c();(0,n.useEffect)(()=>{t(e)},[t,e])};class m extends a.k{async load(){this.app.use(u,this.options)}}},11482(e,t,o){o.d(t,{$3:()=>h,Pt:()=>x,xZ:()=>v});var l=o(71178),n=o(56920),a=o(77583),r=o(49621),i=o(14187),s=o(43873),d=o(82924),u=o(58980),c=o(51649),p=o(50570);let m=(0,c.createContext)(null);m.displayName="FilterContext";let h=c.default.memo(e=>{let{children:t}=e,o=c.default.useRef([]),n=(0,c.useCallback)(e=>{"function"==typeof e?o.current=e(o.current):o.current=e},[]),a=(0,c.useCallback)(()=>o.current,[]),r=(0,c.useMemo)(()=>({getDataBlocks:a,setDataBlocks:n}),[a,n]);return(0,l.jsx)(m.Provider,{value:r,children:t})});h.displayName="FilterBlockProvider";let x=e=>{let{children:t,params:o}=e,a=(0,r.Ge)(),{recordDataBlocks:p}=v(),{getDataBlockRequest:m}=(0,i.ZK)(),h=(0,n.useField)(),x=(0,n.useFieldSchema)(),_=(0,u.ze)(),f=(0,c.useRef)(null),g=(0,s.fY)(),b=h&&"FilterFormBlockProvider"!==h.decoratorType&&"FormBlockProvider"!==h.decoratorType&&"filter"!==h.decoratorProps.blockType,y=(0,c.useCallback)(()=>{let e=m();p({uid:x["x-uid"],title:h.componentProps.title,doFilter:e.runAsync,collection:a,associatedFields:_,foreignKeyFields:null==a?void 0:a.getFields("isForeignKey"),defaultFilter:(null==o?void 0:o.filter)||{},service:e,dom:f.current,dataLoadingMode:g,clearFilter(e){var t,l,n;let a=(null==(t=this.service.params)?void 0:t[0])||{},r=(null==(n=this.service.params)||null==(l=n[1])?void 0:l.filters)||{};delete r[e];let i=(0,u.Dj)([...Object.values(r).map(e=>(0,d.pA3)(e)),(null==o?void 0:o.filter)||{}]);this.service.run({...a,page:1,filter:i},{filters:r})},clearData(){this.service.mutate(void 0)},clearSelection(){if(h){var e,t;null==(t=h.data)||null==(e=t.clearSelectedRowKeys)||e.call(t)}},highlightBlock(){var e;let t=f.current;if(!t)return;let o=t.querySelector(".ant-nb-schema-toolbar");o&&o.classList.remove("hidden"),t.style.boxShadow="0 3px 12px rgba(0, 0, 0, 0.15)",t.style.transition="box-shadow 0.3s ease, transform 0.2s ease",null==(e=t.scrollIntoView)||e.call(t,{behavior:"smooth",block:"start"})},unhighlightBlock(){let e=f.current;if(!e)return;let t=e.querySelector(".ant-nb-schema-toolbar");t&&t.classList.add("hidden"),e.style.boxShadow="none",e.style.transition="box-shadow 0.3s ease, transform 0.2s ease"}})},[_,a,g,x,null==o?void 0:o.filter,p,m,h]);return(0,c.useEffect)(()=>{b&&y()},[y,b]),(0,l.jsx)("div",{ref:f,children:t})},v=()=>{let e=c.default.useContext(m),t=(0,p.dW)(),o=(0,c.useCallback)(()=>(null==e?void 0:e.getDataBlocks())||[],[e]),l=(0,c.useCallback)(o=>{t.recordDataBlocks(o);let l=null==e?void 0:e.getDataBlocks().find(e=>e.uid===o.uid);l?Object.assign(l,o):null==e||e.setDataBlocks(e=>[...e,o])},[e]),n=(0,c.useCallback)(o=>{t.removeDataBlock(o),null!=e&&e.getDataBlocks().every(e=>e.uid!==o)||null==e||e.setDataBlocks(e=>e.filter(e=>e.uid!==o))},[e]);return e?{recordDataBlocks:l,getDataBlocks:o,removeDataBlock:n,inProvider:!0}:{inProvider:!1,recordDataBlocks:a.default.noop,getDataBlocks:o,removeDataBlock:a.default.noop}}},65613(e,t,o){o.d(t,{$3:()=>l.$3,Dj:()=>n.Dj,I1:()=>n.I1,Lt:()=>n.Lt,Pt:()=>l.Pt,Rm:()=>n.Rm,SU:()=>n.SU,TQ:()=>n.TQ,Uf:()=>n.Uf,W0:()=>n.W0,eB:()=>n.eB,vc:()=>n.vc,xZ:()=>l.xZ,ze:()=>n.ze});var l=o(11482),n=o(58980)},58980(e,t,o){o.d(t,{Dj:()=>h,I1:()=>m,Lt:()=>x,Rm:()=>v,SU:()=>f,TQ:()=>y,Uf:()=>_,W0:()=>b,eB:()=>S,vc:()=>k,ze:()=>g});var l,n=o(56920),a=o(63526),r=o(77583),i=o(51649),s=o(73761),d=o(49621),u=o(14669),c=o(82924),p=o(11482),m=((l={})[l.FORM=0]="FORM",l[l.TABLE=1]="TABLE",l[l.TREE=2]="TREE",l[l.COLLAPSE=3]="COLLAPSE",l);let h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$and",o=e.filter(e=>{if(e&&"object"==typeof e&&!Array.isArray(e))return Object.values(e).filter(e=>void 0!==e).length});return 0===o.length?{}:1===o.length?o[0]:{[t]:o}},x=(e,t)=>{var o;return null==(o=t.associatedFields)?void 0:o.filter(t=>null==e?void 0:e.some(e=>e===t.target))},v=(e,t)=>{var o;return null==(o=t.foreignKeyFields)?void 0:o.filter(t=>e.fields.some(e=>"belongsTo"!==e.type&&e.foreignKey===t.name&&e.target===t.collectionName))},_=e=>{let{getDataBlocks:t}=(0,p.xZ)(),o=(0,n.useFieldSchema)(),l=(0,d.Ge)(),{getAllCollectionsInheritChain:a}=(0,u.LQ)();return 0===e||3===e?t().filter(e=>y(e.collection,l)):1===e||2===e?t().filter(e=>{var t,n;return o["x-uid"]!==e.uid&&(y(e.collection,l)||(null==(t=x(a(l.name,l.dataSource),e))?void 0:t.length)||(null==(n=v(l,e))?void 0:n.length))}):void 0},f=(e,t,o,l)=>({$and:Object.keys(e=(0,a.flatten)(e,{breakOn(e){let{value:n,path:a}=e;if(["$match","$notMatch","$anyOf","$noneOf","$childIn","$childNotIn","$dateBetween","$in","$notIn"].includes(t[a]))return!0;let r=o(`${l}.${a}`);if(["datetime","datetimeNoTz","date","unixTimestamp","createdAt","updatedAt"].includes(null==r?void 0:r.interface))return!0;if(null==r?void 0:r.target){if(Array.isArray(n))return!0;let e=r.targetKey||"id";if(n&&null!=n[e])return!0}return!1}})).map(n=>{let i=r.default.get(e,n),s=o(`${l}.${n}`);return((null==s?void 0:s.target)&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(s.type)&&(i=(0,a.getValuesByPath)(i,s.targetKey||"id"),n=`${n}.${s.targetKey||"id"}`,(null==s?void 0:s.interface)==="chinaRegion"&&(i=r.default.last(i))),i||0===i||!1===i)?{[n]:{[t[n]||"$eq"]:i}}:null}).filter(Boolean)}),g=()=>{var e;return(null==(e=(0,d.Ge)())?void 0:e.fields.filter(e=>b(e)))||[]},b=e=>["o2o","oho","obo","m2o","createdBy","updatedBy","o2m","m2m","linkTo","chinaRegion","mbm"].includes(null==e?void 0:e.interface),y=(e,t)=>e.name===t.name&&e.dataSource===t.dataSource,S=()=>{let e=(0,n.useFieldSchema)(),{getDataBlocks:t}=(0,p.xZ)(),{targets:o,uid:l}=(0,s.findFilterTargets)(e),a=t(),[d,u]=(0,i.useState)(()=>o&&o.some(e=>a.some(t=>t.uid===e.uid))),m=Object.keys(o||{});return(0,i.useEffect)(()=>{u(o&&o.some(e=>a.some(t=>t.uid===e.uid)))},[m.length,o,a]),{isConnected:d,doFilter:(0,i.useCallback)(function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"$eq",s=a.find(t=>t.uid===e.parent["x-uid"]);a.forEach(e=>{var a,d,u,p,m,x,v,_,f;let g,b=n,y=o.find(t=>t.uid===e.uid);if(!y)return;r.default.isFunction(t)&&(t=t(y,e,(m=s,x=y.field,(null==(g=null==m||null==(v=m.associatedFields)?void 0:v.find(e=>e.foreignKey===x))?void 0:g.sourceKey)||(null==x||null==(f=x.split)||null==(_=f.call(x,"."))?void 0:_[1])))),r.default.isFunction(n)&&(b=n(y,e)),r.default.isFunction(i)&&(i=i(y));let S=(null==(a=e.service.params)?void 0:a[0])||{},k=(null==(u=e.service.params)||null==(d=u[1])?void 0:d.filters)||{};if(null!=t)k[l]={$and:[{[b]:{[i]:t}}]};else if(null==(p=e.clearSelection)||p.call(e),delete k[l],"manual"===e.dataLoadingMode)return e.clearData();let C=h([...Object.values(k).map(e=>(0,c.pA3)(e)),e.defaultFilter]);e.doFilter({...S,page:1,filter:C},{filters:k})})},[a,o,l,e])}},k=e=>{for(;e;){if(e["x-filter-targets"])return"FilterFormBlockProvider"===e["x-decorator"];e=e.parent}return!1}},4658(e,t,o){o.d(t,{I:()=>n,U:()=>a});var l=o(71178);let n=o(51649).default.createContext(null),a=e=>(0,l.jsx)(n.Provider,{value:e,children:e.children})},92619(e,t,o){o.d(t,{_:()=>a});var l=o(51649),n=o(4658);let a=()=>(0,l.useContext)(n.I)||{}},69575(e,t,o){o.d(t,{Im:()=>l.I,UU:()=>l.U,_P:()=>n._});var l=o(4658),n=o(92619)},30644(e,t,o){o.d(t,{ZC:()=>C,E0:()=>y,cQ:()=>S,dw:()=>A,Tu:()=>M,Bs:()=>P,IC:()=>j,o8:()=>k});var l=o(71178),n=o(56920),a=o(27404),r=o(71883),i=o(77583),s=o(51649),d=o(26174),u=o(49621),c=o(93726),p=o(67285),m=o(61013);let h=e=>{var t;let o,r,i=(0,s.useContext)(n.SchemaComponentsContext),d=e.field,u=((e,t)=>{if((e||t)&&!(0,a.isFn)(e))return(0,l.jsxs)(s.Fragment,{children:[e,t]})})((o=e.children,r=d.form,(0,a.isFn)(o)?o(d,r):o),d.content??d.componentProps.children);if("visible"!==d.display)return null;let c=e=>e&&("object"==typeof e||"function"==typeof e)?e:a.FormPath.getIn(i,e)??e;return t=d.componentType?s.default.createElement(c(d.componentType),{...d.componentProps,value:d.value},u):u,d.decoratorType?s.default.createElement(c(d.decoratorType),d.decoratorProps,t):(0,l.jsx)(s.Fragment,{children:t})};h.displayName="NocoBaseReactiveInternal",h.displayName="NocoBaseReactiveField";class x{initialize(){var e,t,o,l,n,r,s,d,u,c,p,m,h,x,v,_,f,g,b,y;let S=this.props.compile;this.pattern="readPretty",this.readPretty=!0,this.initialized=!0,this.loading=!1,this.validating=!1,this.submitting=!1,this.selfModified=!1,this.active=!1,this.visited=!0,this.mounted=!0,this.unmounted=!1,this.inputValues=[],this.inputValue=null,this.feedbacks=[],this.title=S(this.props.title||(null==(e=this.props.schema)?void 0:e.title)),this.description=S(this.props.description||(null==(t=this.props.schema)?void 0:t.description)),this.display="visible",this.editable=this.props.editable||(null==(o=this.props.schema)?void 0:o["x-editable"]),this.disabled=this.props.disabled||(null==(l=this.props.schema)?void 0:l["x-disabled"]),this.readOnly=this.props.readOnly||(null==(n=this.props.schema)?void 0:n["x-read-only"]),this.visible=this.props.visible||(null==(r=this.props.schema)?void 0:r["x-visible"]),this.hidden=this.props.hidden||(null==(s=this.props.schema)?void 0:s["x-hidden"]),this.dataSource=S(this.props.dataSource||(null==(d=this.props.schema)?void 0:d.enum)),this.validator=this.props.validator,this.required=this.props.required||!!(null==(u=this.props.schema)?void 0:u.required),this.content=S(this.props.content||(null==(c=this.props.schema)?void 0:c["x-content"])),this.initialValue=S(this.props.initialValue||(null==(p=this.props.schema)?void 0:p.default)),this.value=S(this.props.value),this.data=this.props.data||(null==(m=this.props.schema)?void 0:m["x-data"]),this.decorator=this.props.decorator?(0,a.toArr)(this.props.decorator):[null==(h=this.props.schema)?void 0:h["x-decorator"],null==(x=this.props.schema)?void 0:x["x-decorator-props"]],this.component=this.props.component?(0,a.toArr)(this.props.component):[null==(v=this.props.schema)?void 0:v["x-component"],null==(_=this.props.schema)?void 0:_["x-component-props"]],this.decoratorProps=(null==(f=this.props.schema)?void 0:f["x-decorator-props"])||{},this.componentProps=(null==(g=this.props.schema)?void 0:g["x-component-props"])||{},this.decoratorType=null==(b=this.props.schema)?void 0:b["x-decorator"],this.componentType=null==(y=this.props.schema)?void 0:y["x-component"],this.path={},this.form={},this.address={concat:i.default.noop}}constructor(e){this.props=e,this.initialize()}}let v=e=>{let t=(0,m.l)(),o=(0,n.useFieldSchema)(),a=(0,s.useMemo)(()=>new x({...e,compile:t}),[]);return Object.assign(a.componentProps,o["x-component-props"]),a.value=e.value,(0,l.jsx)(n.FieldContext.Provider,{value:a,children:(0,l.jsx)(h,{field:a,children:e.children})})},_=s.default.createContext({}),f=s.default.createContext(i.default.noop),g=e=>{let{children:t,refresh:o}=e,n=k(),a=(0,s.useCallback)(e=>{o(),(null==e?void 0:e.refreshParentSchema)&&(null==n||n())},[n,o]);return(0,l.jsx)(f.Provider,{value:a,children:t})},b=s.default.createContext(i.default.noop),y=e=>{let{children:t,refresh:o}=e;return(0,l.jsx)(b.Provider,{value:o,children:t})},S=()=>s.default.useContext(b),k=()=>s.default.useContext(f),C=()=>s.default.useContext(_)||{},M=e=>{let{children:t,fieldSchema:o}=e,n=(0,u.Ge)(),a=(0,d.r2)(),r=null==o?void 0:o.name,i=(0,s.useMemo)(()=>{var e;if(!n)return null;let t=null==o||null==(e=o["x-component-props"])?void 0:e.field;return a.getCollectionField(null==o?void 0:o["x-collection-field"])||t||n.getField((null==t?void 0:t.name)||r)},[n,a,o,r]);return(0,l.jsx)(_.Provider,{value:i,children:t})},w=i.default.memoize((e,t)=>e.toFieldProps({scope:t})),F=(e,t,o)=>{let l=e.toJSON();if(o){if(!l.properties)return e;let o=Object.keys(l.properties)[0],r=Object.values(l.properties)[0];return l.properties[o]=(0,a.merge)(i.default.omit(t,"type","x-read-pretty"),r),new n.Schema(l)}return new n.Schema((0,a.merge)(i.default.omit(t,"type","x-read-pretty"),l))},P=s.default.createContext(!1),j=()=>s.default.useContext(P),A=s.default.memo(e=>{let{schema:t,name:o,onlyRenderProperties:d,onlyRenderSelf:u,mapProperties:m,filterProperties:h,propsRecursion:x,values:f,isUseFormilyField:b=!0,uiSchema:y,parentSchema:S}=e,k=(e=>{let t=(0,n.useField)();if(e.onlyRenderProperties){var o;return e.basePath||(null==t||null==(o=t.address)?void 0:o.concat(e.name))}return e.basePath||(null==t?void 0:t.address)})(e),j=(0,s.useRef)(null),I=(0,s.useMemo)(()=>(j.current=null,new n.Schema(t)),[t]),{uiSchema:T,defaultValue:D}=C(),L=(0,r.useUpdate)(),{onChange:Y}=(0,s.useContext)(c.D),R=j.current||I;if(!R.parent&&S){var B,N;R.parent=S,(null==(N=R.parent)||null==(B=N.properties)?void 0:B[R.name])||!R.name||i.default.set(R.parent,`properties.${R.name}`,R)}let E=(0,s.useCallback)(()=>{let e=R.parent;j.current=new n.Schema(R.toJSON(),e),(null==e?void 0:e.properties)&&Object.keys(e.properties).forEach(t=>{t===R.name&&(e.properties[t]=j.current)}),L(),null==Y||Y()},[R,Y,L]),$=(0,s.useMemo)(()=>y?F(R,y,d):T?(T.default=D,F(R,T,d)):R,[T,D,R,d,y]),z=w($,(0,n.useExpressionScope)()),O=e=>{if(!u)return(e=>{let{schema:t,field:o,basePath:r,mapProperties:d,filterProperties:u,propsRecursion:c,values:m,isUseFormilyField:h}=e,x=n.Schema.getOrderProperties(t);return x.length?(0,l.jsx)(s.Fragment,{children:x.map((e,t)=>{let{schema:n,key:s}=e,x=(null==o?void 0:o.address)||r,v=n;if((0,a.isFn)(d)){let e=d(n,s);e&&(v=e)}if((0,a.isFn)(u)&&!1===u(v,s))return null;let f=(0,a.isBool)(c)&&c?(0,l.jsx)(A,{propsRecursion:!0,filterProperties:u,mapProperties:d,schema:v,name:s,basePath:x,values:i.default.get(m,s),isUseFormilyField:h}):(0,l.jsx)(A,{schema:v,name:s,basePath:x,values:i.default.get(m,s),isUseFormilyField:h});return"CollectionField"===v["x-component"]?(0,l.jsx)(P.Provider,{value:!0,children:(0,l.jsx)(M,{fieldSchema:v,children:f})},`${t}-${s}`):(0,l.jsx)(P.Provider,{value:!1,children:(0,l.jsx)(_.Provider,{value:p.M,children:f})},`${t}-${s}`)})}):null})({schema:R,field:e,basePath:k,mapProperties:m,filterProperties:h,propsRecursion:x,values:f,isUseFormilyField:b})};return R?(0,l.jsx)(n.SchemaContext.Provider,{value:R,children:(0,l.jsx)(g,{refresh:E,children:(0,a.isValid)(o)?"object"===$.type?d?O():(0,l.jsx)(n.ObjectField,{...z,name:o,basePath:k,children:O}):"array"===$.type?(0,l.jsx)(n.ArrayField,{...z,name:o,basePath:k}):"void"===$.type?d?O():(0,l.jsx)(n.VoidField,{...z,name:o,basePath:k,children:O}):b?(0,l.jsx)(n.Field,{...z,name:o,basePath:k}):(0,l.jsx)(v,{name:o,value:f,initialValue:f,basePath:k,schema:$}):O()})}):(0,l.jsx)(s.Fragment,{})});A.displayName="NocoBaseRecursionField"},79980(e,t,o){o.d(t,{Ne:()=>l.compatOldTheme,Og:()=>l.AntdAppProvider,U_:()=>l.GlobalThemeProvider,_l:()=>l.addCustomAlgorithmToTheme,my:()=>l.useGlobalTheme,zQ:()=>l.defaultTheme,ze:()=>l.customAlgorithm});var l=o(13975)},80461(e,t,o){o.d(t,{S:()=>c,T:()=>p});var l=o(71178),n=o(56920),a=o(77583),r=o(51649),i=o(52793),s=o(95951);let d=()=>void 0,u=(e,t,o)=>{let l;return a.default.isFunction(e)?l=e:(l=t[e])||console.error(`${o} is not registered`),l||d};function c(e,t){return((e,t)=>{let o;if(!e)return d;if(a.default.isFunction(e))return e;for(let l of e.split("."))o=u(l,o||t,e);return o})(e,(0,n.useExpressionScope)())(t)}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.displayName||e.displayName||e.name,n=t=>{let{dn:o,findComponent:a}=(0,s.er)(),d=c((0,r.useMemo)(()=>{let e=o.getSchemaAttribute("x-component"),t=o.getSchemaAttribute("x-decorator"),l=o.getSchemaAttribute("x-use-component-props"),r=o.getSchemaAttribute("x-use-decorator-props");return e&&l&&a(e)===n?l:t&&r&&a(t)===n?r:void 0},[o]),t),u=(0,r.useMemo)(()=>({...t,...d}),[d,t]);return(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(i.Spin,{}),children:(0,l.jsx)(e,{...u,children:t.children})})};return e.displayName=o,n.displayName=`withSchemaProps(${o})`,n}},99847(e,t,o){o.d(t,{t:()=>s});var l=o(71178),n=o(52793),a=o(14187),r=o(51649);let i=()=>{var e;return!!(null==(e=(0,a._J)())?void 0:e.loading)},s=(e,t)=>{let{useLoading:o=i,displayName:a,SkeletonComponent:s=n.Skeleton}=t||{},d=r.default.memo(t=>{let n=o(),a=(0,r.useRef)(!1),i=(0,r.useDeferredValue)(n);return!a.current&&i?(0,l.jsx)(s,{}):(a.current=!0,(0,l.jsx)(e,{...t}))});return d.displayName=a||`${e.displayName}(withSkeletonComponent)`||`${e.name}(withSkeletonComponent)`,d}},7775(e,t,o){o.d(t,{L:()=>i});var l=o(71178);o(51649);var n=o(52793),a=o(82113);let r={display:"flex",alignItems:"center",gap:4},i=e=>t=>{let{tooltip:o}=t;return o?(0,l.jsxs)("div",{style:r,children:[(0,l.jsx)(e,{...t}),(0,l.jsx)(n.Tooltip,{title:o,children:(0,l.jsx)(a.QuestionCircleOutlined,{style:{zIndex:1}})})]}):(0,l.jsx)(e,{...t})}},18226(e,t,o){o.d(t,{w:()=>l,k:()=>a});let l=()=>"nocobase-admin-menu";var n=o(51649);function a(){let e,t,{metaRef:o,restore:l}=(e=(0,n.useRef)("initial-scale=0.1"),t=(0,n.useRef)(),(0,n.useEffect)(()=>{let o=document.querySelector('meta[name="viewport"]');o?e.current=o.content:(o=document.createElement("meta")).name="viewport",o&&(o.content="width=device-width, initial-scale=1, user-scalable=0",t.current=o)},[]),{metaRef:t,restore:()=>{t.current&&(t.current.content=e.current)}});(0,n.useEffect)(()=>{if(o.current)return document.head.insertBefore(o.current,document.head.firstChild),()=>{l()}},[])}},33750(e,t,o){o.d(t,{Os:()=>u,co:()=>s,re:()=>d});var l=o(71178),n=o(77583),a=o(51649);let r=(0,a.createContext)(null);r.displayName="GetMenuItemContext";let i=(0,a.createContext)(null);i.displayName="GetMenuItemsContext";let s=()=>(0,a.useContext)(r)||{},d=()=>(0,a.useContext)(i)||{},u=()=>{let e=(0,a.useRef)([]),t=(0,a.useRef)(null),o=(0,a.useRef)(!1),s=(0,a.useCallback)(n=>{let{limitCount:a}=n;return o.current?(o.current=!1,t.current)?t.current():a&&e.current.length>a?(0,l.jsx)(l.Fragment,{children:e.current.slice(0,a).map((e,t)=>(0,l.jsx)(e,{},t))}):(0,l.jsx)(l.Fragment,{children:e.current.map((e,t)=>(0,l.jsx)(e,{},t))}):null},[]),d=(0,a.useCallback)(e=>{let a=[],r=e=>{a.push(e),a.sort((e,t)=>(e.order||0)-(t.order||0))};return o.current=!0,t.current=()=>{let t=a.filter(e=>e.notdelete).map(e=>n.default.omit(e,"notdelete"));return a.length=0,a.push(...t),(0,l.jsx)(i.Provider,{value:{pushMenuItem:r},children:e()})},a},[]);return{Component:s,getMenuItems:d,getMenuItem:(0,a.useCallback)(t=>{let n={},a=e=>{Object.assign(n,e)};return o.current=!0,e.current.push(()=>(0,l.jsx)(r.Provider,{value:{collectMenuItem:a},children:t()})),n},[]),clean:(0,a.useCallback)(()=>{e.current=[]},[])}}},60070(e,t,o){o.d(t,{J:()=>i});var l=o(51649),n=o(43923),a=o(99300);let{evaluate:r}=o(83489).evaluators.get("formula.js"),i=e=>{let t=(0,n.$l)(),o=(0,n.gp)(),[i,s]=(0,l.useState)();return(0,l.useEffect)(()=>{(async()=>{if(null==e||""===e)return s(void 0);let{exp:l,scope:n}=await (0,a.qk)(e,{variables:t,localVariables:o});try{let e=r(l,{now:()=>new Date().toString(),...n});s(e)}catch(e){console.error(e)}})()},[t.parseVariable,e,o]),i}},24943(e,t,o){o.d(t,{r:()=>d});var l=o(71178),n=o(82113),a=o(52793);o(51649);var r=o(16211),i=o(28601),s=o(86393);function d(){var e,t,o;let{data:d}=(0,s.e6)()||{},u=(0,r.VB)();return(null==d||null==(e=d.data)?void 0:e.enabledLanguages.length)>1&&(0,l.jsx)(a.Dropdown,{menu:{onClick(e){u.auth.setLocale(e.key),window.location.reload()},selectable:!0,defaultSelectedKeys:[u.auth.locale],items:null==d||null==(o=d.data)||null==(t=o.enabledLanguages)?void 0:t.filter(e=>i.Ay[e]).map(e=>({key:e,label:i.Ay[e].label}))},children:(0,l.jsx)(n.TranslationOutlined,{style:{fontSize:24}})})}},839(e,t,o){o.d(t,{z:()=>l});let l="ui-schema-storage"},7271(e,t,o){o.d(t,{Ru:()=>i,ul:()=>r,zg:()=>d.z});var l=o(23977),n=o(77843),a=o(28601);function r(e,t){return t?`{{t(${JSON.stringify(e)}, ${JSON.stringify(t)})}}`:`{{t(${JSON.stringify(e)})}}`}let i=l.default.createInstance(),s={};Object.keys(a.Ay).forEach(e=>{s[e]=a.Ay[e].resources}),i.use(n.initReactI18next).init({lng:"en-US",defaultNS:"client",resources:{},keySeparator:!1,nsSeparator:!1});var d=o(839)},37679(e,t,o){let l;o.d(t,{In:()=>u,K1:()=>d,Pt:()=>r,cE:()=>s,pU:()=>i});var n=o(71178),a=o(82113);o(51649);let r=new Map;function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;r.set(e.toLowerCase(),t)}function s(e){return!!e&&r.has(e.toLowerCase())}function d(e){Object.keys(e).forEach(t=>{i(t,e[t])})}Object.keys(a).forEach(e=>{i(e,a[e])});let u=e=>{let{type:t="",component:o,...i}=e;if(o)return(0,n.jsx)(a.default,{component:o,...i});if(t&&r.has(t.toLowerCase())){let e=r.get(t.toLowerCase());return(0,n.jsx)(e,{...i})}return t&&l?(0,n.jsx)(l,{type:t}):null};u.createFromIconfontCN=e=>{l=(0,a.createFromIconfontCN)(e)},u.register=e=>{d(e)}},60430(e,t,o){o.d(t,{In:()=>l.In,K1:()=>l.K1,Pt:()=>l.Pt,cE:()=>l.cE,pU:()=>l.pU});var l=o(37679)},44374(e,t,o){o.r(t),o.d(t,{ACLActionParamsContext:()=>r.gU,ACLActionProvider:()=>r.aK,ACLCollectionFieldProvider:()=>r.mu,ACLCollectionProvider:()=>r.yb,ACLContext:()=>r.w0,ACLCustomContext:()=>r.j,ACLMenuItemProvider:()=>r.Ik,ACLPane:()=>r.tA,ACLPlugin:()=>r.gt,ACLProvider:()=>r.AY,ACLRolesCheckProvider:()=>r.rR,ADMIN_SETTINGS_KEY:()=>u.w$,ADMIN_SETTINGS_PATH:()=>u.wq,AIManager:()=>ec._T,APIClient:()=>s.Q9,APIClientContext:()=>s.j8,APIClientProvider:()=>s.nd,AccessControl:()=>B.kx,Action:()=>D.rcl,ActionBar:()=>D.E76,ActionBarAssociationFilterAction:()=>Y.pB,ActionBarProvider:()=>D.xqq,ActionContext:()=>D.yVm,ActionContextNoRerender:()=>D.Wis,ActionContextProvider:()=>D.z45,ActionDesigner:()=>D.U6o,ActionGroupModel:()=>a.ActionGroupModel,ActionInitializer:()=>Y.LF,ActionInitializerItem:()=>Y.E2,ActionModel:()=>a.ActionModel,ActionSceneEnum:()=>a.ActionSceneEnum,ActionType:()=>B.X2,AddChildActionModel:()=>a.AddChildActionModel,AddCollection:()=>h.qS,AddCollectionAction:()=>h.IE,AddCollectionField:()=>h.qQ,AddFieldAction:()=>h.g,AddNewActionModel:()=>a.AddNewActionModel,AddSubFieldAction:()=>h.w3,AdminDynamicPage:()=>T.Y4,AdminLayout:()=>T.Ui,AdminLayoutMenuItemModel:()=>T.xF,AdminLayoutPlugin:()=>T.NC,AdminProvider:()=>T.X7,AdminSettingsLayout:()=>j.dj,AdminSettingsLayoutModel:()=>j.C_,AfterSuccess:()=>D.Kql,AllDataBlocksContext:()=>D.rrz,AllDataBlocksProvider:()=>D.J3t,AntdAppProvider:()=>y.Og,AntdConfigPlugin:()=>i.j,AntdConfigProvider:()=>i.Rk,AntdSchemaComponentPlugin:()=>D.bkX,AntdSchemaComponentProvider:()=>D.TDj,AppLangContext:()=>i.P4,AppNotFound:()=>x.bM,AppendsTreeSelect:()=>D.m$h,Application:()=>u.lg,ApplicationContext:()=>u.gD,AssignFormModel:()=>a.AssignFormModel,AssignedFieldValues:()=>D.TB2,AssociatedFields:()=>Y.Ag,AssociationField:()=>D.m2w,AssociationFieldMode:()=>D.Bnf,AssociationFieldModeProvider:()=>D.o8F,AssociationFilter:()=>Y.AO,AssociationFilterDesignerDelete:()=>Y.um,AssociationFilterDesignerDisplayField:()=>Y.xc,AssociationFilterPlugin:()=>Y.PB,AssociationOrCollectionProvider:()=>_.uG,AssociationProvider:()=>_.$z,AssociationSelect:()=>D.i_F,AsyncDataContext:()=>c.IC,AsyncDataProvider:()=>c.Gd,AttachmentList:()=>D._sT,AutoComplete:()=>D.j9R,BackButtonUsedInSubPage:()=>D.hsK,BaseVariableProvider:()=>B.jr,BlankComponent:()=>u.ct,Block:()=>D.eBw,BlockAssociationContext:()=>m.qM,BlockConfigsContext:()=>p.U1,BlockConfigsProvider:()=>p.AZ,BlockContext:()=>m.zL,BlockGridModel:()=>a.BlockGridModel,BlockInitializer:()=>Y.yl,BlockItem:()=>D.Z0V,BlockItemCard:()=>D.tn0,BlockItemCardContext:()=>D.AQf,BlockItemInitializer:()=>Y.z6,BlockModel:()=>a.BlockModel,BlockProvider:()=>m.VL,BlockRequestContextProvider:()=>_.NB,BlockRequestContext_deprecated:()=>m.cM,BlockRequestLoadingContext:()=>_.OO,BlockRequestProvider:()=>_.Yu,BlockRequestProvider_deprecated:()=>m.ge,BlockResourceContext:()=>m.fh,BlockSceneEnum:()=>a.BlockSceneEnum,BlockSchemaComponentPlugin:()=>m.tv,BlockSchemaComponentProvider:()=>m.hS,BlockSchemaToolbar:()=>W.C,BlockTemplateContext:()=>N.V5,BlockTemplateDetails:()=>N.YU,BlockTemplatePage:()=>N.BZ,BlockTemplateProvider:()=>N.XZ,BlockTemplatesPane:()=>N.NV,BlocksSelector:()=>D.Gjn,ButtonEditor:()=>D.Ypd,CSSVariableProvider:()=>v.B,CardItem:()=>D.oVU,Cascader:()=>D.vxQ,Checkbox:()=>D.Sc0,CheckboxFieldInterface:()=>h.jc,CheckboxGroupFieldInterface:()=>h.sf,ChildPageModel:()=>a.ChildPageModel,ChildPageTabModel:()=>a.ChildPageTabModel,ClearCollectionFieldContext:()=>_.bJ,ClickableFieldModel:()=>a.ClickableFieldModel,CodeEditor:()=>a.CodeEditor,CodeEditorExtension:()=>a.CodeEditorExtension,Collection:()=>_.pM,CollectionActionGroupModel:()=>a.CollectionActionGroupModel,CollectionActionModel:()=>a.CollectionActionModel,CollectionBlockModel:()=>a.CollectionBlockModel,CollectionCategoriesContext:()=>h.CI,CollectionCategoriesProvider:()=>h.q0,CollectionCategory:()=>h.F8,CollectionContext:()=>_.CQ,CollectionDeletedPlaceholder:()=>_.xd,CollectionField:()=>_.JL,CollectionFieldContext:()=>_.yn,CollectionFieldInterface:()=>_.yz,CollectionFieldInterfaceManager:()=>_.Ln,CollectionFieldInterfaceTag:()=>h.Mi,CollectionFieldProvider:()=>_.Ey,CollectionFieldUISchemaProvider:()=>ei.Tu,CollectionFieldsToFormInitializerItems:()=>_.Dk,CollectionFieldsToInitializerItems:()=>_.Jy,CollectionFieldsToTableInitializerItems:()=>_.bC,CollectionHistoryProvider:()=>h.US,CollectionManager:()=>_.qG,CollectionManagerContext:()=>_.Jr,CollectionManagerProvider:()=>_.Pf,CollectionManagerProvider_deprecated:()=>h.nq,CollectionManagerSchemaComponentProvider:()=>h.Xm,CollectionNotAllowViewPlaceholder:()=>_.b,CollectionPlugin:()=>h.Kf,CollectionProvider:()=>_.Yz,CollectionProvider_deprecated:()=>h.io,CollectionRecord:()=>_.ol,CollectionRecordContext:()=>_.tH,CollectionRecordProvider:()=>_.Jw,CollectionSelect:()=>D.vzL,CollectionSelectFieldInterface:()=>h.CF,CollectionTemplate:()=>_.T0,CollectionTemplateManager:()=>_.C1,CollectionTemplateTag:()=>h.xq,ColorFieldInterface:()=>h.h1,ColorPicker:()=>D.skP,ColorSelect:()=>D.qy5,CommonItemModel:()=>a.CommonItemModel,CompatibleSchemaInitializer:()=>u.__,CreateFilterActionInitializer:()=>Y.z8,CreateFormModel:()=>a.CreateFormModel,CreateResetActionInitializer:()=>Y.uj,CreatedAtFieldInterface:()=>h.vv,CreatedByFieldInterface:()=>h.VA,Cron:()=>D.l46,CronSet:()=>D.hbv,CurrentAppInfoContext:()=>d.G0,CurrentAppInfoProvider:()=>d.qm,CurrentPageUidContext:()=>u.MR,CurrentPageUidProvider:()=>u.tu,CurrentRouteProvider:()=>T.yb,CurrentTabUidContext:()=>u.EB,CurrentTabUidProvider:()=>u.sn,CurrentUserContext:()=>O.Ip,CurrentUserProvider:()=>O.Qd,CurrentUserSettingsMenuProvider:()=>O.Y,CustomRouterContextProvider:()=>u.Jr,CustomizeActionInitializer:()=>Y.A4,DEBOUNCE_WAIT:()=>q.wU,DEFAULT_DATA_SOURCE_KEY:()=>_.Ze,DEFAULT_DATA_SOURCE_TITLE:()=>_.gP,DataBlockCollector:()=>g.Pt,DataBlockContext:()=>_.R6,DataBlockInitializer:()=>Y.kq,DataBlockModel:()=>a.DataBlockModel,DataBlockProvider:()=>_.T4,DataBlockResourceContext:()=>_.RE,DataBlockResourceProvider:()=>_.Fr,DataSource:()=>_.qS,DataSourceApplicationProvider:()=>_.Nd,DataSourceCollectionCascader:()=>D.C4D,DataSourceContext:()=>_.Vl,DataSourceContext_deprecated:()=>h.hu,DataSourceManager:()=>_.zA,DataSourceManagerContext:()=>_.oc,DataSourceManagerProvider:()=>_.e1,DataSourceProvider:()=>_.tc,DataSourceProvider_deprecated:()=>h.T8,DataSourceSelect:()=>D.qy$,DateFieldInterface:()=>h.W5,DateFilterDynamicComponent:()=>D.dVP,DateFormatCom:()=>D.b2W,DatePicker:()=>D.lrV,DatePickerProvider:()=>D.QoO,DatetimeFieldInterface:()=>h.Nr,DatetimeNoTzFieldInterface:()=>h.a1,DefaultToolsManager:()=>ec.eY,DefaultValueProvider:()=>B.UY,DeleteCollection:()=>h.Ik,DeleteCollectionAction:()=>h.A9,Designable:()=>D.d1R,DesignableSwitch:()=>D.N3p,Details:()=>D.B_g,DetailsAssociationFieldGroupModel:()=>a.DetailsAssociationFieldGroupModel,DetailsBlockContext:()=>m.R6,DetailsBlockModel:()=>a.DetailsBlockModel,DetailsBlockProvider:()=>m.f0,DetailsCustomItemModel:()=>a.DetailsCustomItemModel,DetailsDesigner:()=>D.CqQ,DetailsGridModel:()=>a.DetailsGridModel,DetailsItemModel:()=>a.DetailsItemModel,DisplaySubTableFieldModel:()=>a.DisplaySubTableFieldModel,DisplayTextFieldModel:()=>a.DisplayTextFieldModel,DisplayTitleFieldModel:()=>a.DisplayTitleFieldModel,Divider:()=>D.cGx,DndContext:()=>D.Mp5,DocumentTitleContext:()=>f.to,DocumentTitleProvider:()=>f.pf,DragHandler:()=>D.L3t,DraggableContext:()=>D.X_,DropdownVisibleContext:()=>O.R2,EMPTY_OBJECT:()=>q.Ml,EditCollection:()=>h.V,EditCollectionAction:()=>h.Jx,EditCollectionField:()=>h.jY,EditComponent:()=>D.iI7,EditDefaultValue:()=>D.tvd,EditDescription:()=>D.JQe,EditFieldAction:()=>h.pA,EditFormModel:()=>a.EditFormModel,EditOperator:()=>D.B4G,EditPattern:()=>D.$t1,EditRequired:()=>D.QpY,EditSortField:()=>D.jgC,EditSubFieldAction:()=>h.Lj,EditTable:()=>D.j0_,EditTableAction:()=>D.vjx,EditTableActionContext:()=>D.uc_,EditTitle:()=>D.Xzy,EditTitleField:()=>D.Ff5,EditTooltip:()=>D.IJ7,EditValidationRules:()=>D.vPC,Editable:()=>D.FoY,EllipsisWithTooltip:()=>D.R_2,EmailFieldInterface:()=>h.em,ErrorFallback:()=>D.xPi,Expand:()=>D.JaO,ExpiresRadio:()=>D.S5r,ExtendCollectionsContext:()=>_.pi,ExtendCollectionsProvider:()=>_.Jl,FieldModel:()=>a.FieldModel,FieldModelRenderer:()=>es.FieldModelRenderer,FieldSummary:()=>h.fn,FieldValidation:()=>h.g7,FieldsTreeSelect:()=>D.ARu,Fieldset:()=>D.LBS,Filter:()=>D.dJT,FilterAction:()=>D.BsJ,FilterActionContext:()=>D.SOm,FilterActionModel:()=>a.FilterActionModel,FilterAssociatedFields:()=>Y.Q3,FilterBlockModel:()=>a.FilterBlockModel,FilterBlockProvider:()=>g.$3,FilterBlockType:()=>g.I1,FilterContext:()=>D.gM2,FilterDynamicComponent:()=>D.N$k,FilterFormActionGroupModel:()=>a.FilterFormActionGroupModel,FilterFormBlockModel:()=>a.FilterFormBlockModel,FilterFormBlockProvider:()=>m.JZ,FilterFormItemModel:()=>a.FilterFormItemModel,FilterGroup:()=>a.FilterGroup,FilterLogicContext:()=>D.c_d,FilterParentCollectionFields:()=>Y.gE,FlagContext:()=>b.Im,FlagProvider:()=>b.UU,ForeignKey:()=>h.mJ,Form:()=>D.lVW,FormActionGroupModel:()=>a.FormActionGroupModel,FormActionModel:()=>a.FormActionModel,FormActiveFieldsProvider:()=>m.Xz,FormAssociationFieldGroupModel:()=>a.FormAssociationFieldGroupModel,FormBlockContext:()=>m.JD,FormBlockInitializer:()=>J.yU,FormBlockModel:()=>a.FormBlockModel,FormBlockProvider:()=>m.r1,FormComponent:()=>a.FormComponent,FormDialog:()=>D.RD4,FormDrawer:()=>D.wA7,FormField:()=>D.zBI,FormFieldContext:()=>m.wh,FormFieldProvider:()=>m.UJ,FormGridModel:()=>a.FormGridModel,FormItem:()=>L.e,FormItemModel:()=>a.FormItemModel,FormItemSchemaToolbar:()=>J.iz,FormProvider:()=>D.OpO,FormSubmitActionModel:()=>a.FormSubmitActionModel,FormV2:()=>D.htN,G2Plot:()=>D.D6h,G2PlotInitializer:()=>Y.PV,G2PlotRenderer:()=>D.ic7,GeneralSchemaDesigner:()=>B.xK,GeneralSchemaItems:()=>R.g$,GlobalThemeProvider:()=>y.U_,Grid:()=>D.xA9,GridCard:()=>D.RLS,GridModel:()=>a.GridModel,GridRowContext:()=>D.mz8,HTMLEncode:()=>D.mJi,HeightMode:()=>B.Dn,ICON_POPUP_Z_INDEX:()=>D.b6K,Icon:()=>C.In,IconFieldInterface:()=>h.Po,IconPicker:()=>D.arW,IdFieldInterface:()=>h.Xk,InheritanceCollectionMixin:()=>h.WW,InitializerWithSwitch:()=>Y.Nl,Input:()=>D.pde,InputFieldInterface:()=>h.Yf,InputFieldModel:()=>a.InputFieldModel,InputNumber:()=>D.YIz,InputReadPretty:()=>D.FZR,InputRecordPicker:()=>D.qKt,IntegerFieldInterface:()=>h.Kv,InternalAdminSettingsLayout:()=>j.Q7,IsInNocoBaseRecursionFieldContext:()=>ei.Bs,IsSubPageClosedByPageMenuContext:()=>u.C1,IsSubPageClosedByPageMenuProvider:()=>u.Cj,JSActionModel:()=>a.JSActionModel,Json:()=>D.LMh,JsonFieldInterface:()=>h.UF,KeepAlive:()=>T.PR,LAZY_COMPONENT_KEY:()=>M.PE,LOADING_DELAY:()=>q.fG,Layout:()=>B.PE,LayoutContent:()=>T.A1,LinkActionModel:()=>a.LinkActionModel,LinkToFieldInterface:()=>h.Li,LinkageFilter:()=>D.ccy,LinkageRuleCategory:()=>B.Od,LinkageRuleDataKeyMap:()=>B.bx,List:()=>D.B8B,LocalDataSource:()=>_.h0,LocationSearchContext:()=>u.bR,M2MFieldInterface:()=>h.Em,M2OFieldInterface:()=>h.ms,Markdown:()=>D.ozN,MarkdownFieldInterface:()=>h.B9,MarkdownReadPretty:()=>D.wN6,MaybeCollectionProvider:()=>m.oe,Menu:()=>D.W1t,MenuConfigure:()=>r.MO,MockFlowModelRepository:()=>a.MockFlowModelRepository,ModalActionSchemaInitializerItem:()=>Y.Au,MultipleSelectFieldInterface:()=>h.if,NAMESPACE_UI_SCHEMA:()=>k.zg,NanoIDInput:()=>D.Q00,NanoidFieldInterface:()=>h.fZ,NocoBaseBuildInPlugin:()=>F.x,NocoBaseDesktopRouteType:()=>T.q2,NocoBaseRecursionField:()=>ei.dw,NocoBaseRouteContext:()=>T.dI,NumberFieldInterface:()=>h.Nj,O2MFieldInterface:()=>h.IL,O2OFieldInterface:()=>h.SB,OBOFieldInterface:()=>h.Sd,OHOFieldInterface:()=>h.Si,OpenModeProvider:()=>eo.R,OverridingCollectionField:()=>h.oO,OverridingFieldAction:()=>h.yu,PMPlugin:()=>j.V_,Page:()=>D.YW0,PagePopups:()=>D.rNg,PageTabs:()=>D.Y2j,Pagination:()=>D.dKS,ParentCollectionFields:()=>Y.y8,ParentRouteContext:()=>D.Zy6,Password:()=>D._22,PasswordFieldInterface:()=>h.NL,Percent:()=>D.QEB,PercentFieldInterface:()=>h.$N,PermissionContext:()=>r.dg,PermissionProvider:()=>r.XI,PhoneFieldInterface:()=>h.wv,PinnedListPlugin:()=>P._,PinnedPluginList:()=>P.i6,PinnedPluginListContext:()=>P.DW,PinnedPluginListProvider:()=>P.P7,Plugin:()=>u.k_,PluginManager:()=>j.R0,PluginManagerLink:()=>j.X1,PluginSettingsManager:()=>u.mz,PopupActionModel:()=>a.PopupActionModel,PopupContextProvider:()=>el.P,PopupSettingsProvider:()=>D.T$Q,PopupSubTableFormActionGroupModel:()=>a.PopupSubTableFormActionGroupModel,PoweredBy:()=>A.G,Preview:()=>D.lNE,QuickEdit:()=>D.gt0,REGEX_OF_VARIABLE:()=>q.vV,REGEX_OF_VARIABLE_IN_EXPRESSION:()=>q.qe,Radio:()=>D.sxL,RadioGroupFieldInterface:()=>h.QZ,ReadPretty:()=>D.hqJ,ReadPrettyRecordPicker:()=>D.w2W,RecordActionGroupModel:()=>a.RecordActionGroupModel,RecordAssociationBlockInitializer:()=>Y.Cg,RecordAssociationDetailsBlockInitializer:()=>Y.QP,RecordAssociationFormBlockInitializer:()=>Y.we,RecordAssociationGridCardBlockInitializer:()=>Y.Q2,RecordAssociationListBlockInitializer:()=>Y.kv,RecordContext_deprecated:()=>I.Ze,RecordFormBlockInitializer:()=>J.BM,RecordIndexContext:()=>I.t9,RecordIndexProvider:()=>I.l2,RecordLink:()=>m.Ur,RecordPicker:()=>D.O$4,RecordPickerContent:()=>a.RecordPickerContent,RecordPickerContext:()=>D.pEl,RecordPickerProvider:()=>D.bee,RecordProvider:()=>I.B4,RecordReadPrettyAssociationFormBlockInitializer:()=>Y.SL,RecordSelectFieldModel:()=>a.RecordSelectFieldModel,RecordSimpleProvider:()=>I.RP,RefreshActionModel:()=>a.RefreshActionModel,RefreshComponentProvider:()=>ei.E0,RefreshDataBlockRequest:()=>D.ud1,RemoteCollectionManagerProvider:()=>h.Ho,RemoteDocumentTitlePlugin:()=>f.L2,RemoteDocumentTitleProvider:()=>f.vB,RemoteSchemaComponent:()=>D.DYS,RemoteSchemaTemplateManagerPlugin:()=>N.IU,RemoteSchemaTemplateManagerProvider:()=>N.sx,RemoteSelect:()=>D.lTd,RemoveButton:()=>D.d09,RemoveConditionContext:()=>D.b7u,RenderChildrenWithAssociationFilter:()=>m.hJ,RequestSettings:()=>D.RhU,RerenderDataBlockProvider:()=>_.Qj,Resizable:()=>X.cM,ResourceActionContext:()=>h.aB,ResourceActionProvider:()=>h.mD,RichText:()=>D.sDQ,RichTextFieldInterface:()=>h.X6,RoleConfigure:()=>r.jc,RoleResourceCollectionContext:()=>r.mW,RoleTable:()=>r.PO,RolesResourcesActions:()=>r.WH,RouteSchemaComponent:()=>T.yU,RouterContextCleaner:()=>u.PK,RouterManager:()=>u.pZ,SNIPPET_PREFIX:()=>u.tJ,SanitizedCollectionProvider:()=>_.N5,SchemaComponent:()=>D.HvB,SchemaComponentContext:()=>D.u4V,SchemaComponentOnChangeContext:()=>D.Doh,SchemaComponentOptions:()=>D.t6u,SchemaComponentPlugin:()=>D.GD6,SchemaComponentProvider:()=>D.OAH,SchemaInitializer:()=>u.IY,SchemaInitializerActionModal:()=>u.z3,SchemaInitializerActionModalInternal:()=>u.Yx,SchemaInitializerChild:()=>u.wp,SchemaInitializerChildren:()=>u.ZI,SchemaInitializerContext:()=>u.dQ,SchemaInitializerDivider:()=>u.Z$,SchemaInitializerItem:()=>u.rR,SchemaInitializerItemContext:()=>u.G8,SchemaInitializerItemGroup:()=>u.G0,SchemaInitializerItemGroupInternal:()=>u.JL,SchemaInitializerItemInternal:()=>u.KK,SchemaInitializerItems:()=>u.e1,SchemaInitializerManager:()=>u.FE,SchemaInitializerMenu:()=>u.$l,SchemaInitializerMenuProvider:()=>u.Ix,SchemaInitializerOpenModeSchemaItems:()=>R.yF,SchemaInitializerPlugin:()=>Y.X1,SchemaInitializerSelect:()=>u.S3,SchemaInitializerSelectInternal:()=>u.Vf,SchemaInitializerSubMenu:()=>u.zw,SchemaInitializerSubMenuInternal:()=>u.gc,SchemaInitializerSwitch:()=>u.qX,SchemaInitializerSwitchInternal:()=>u.NH,SchemaSettingAccessControl:()=>B.Xh,SchemaSettingItemContext:()=>u.KY,SchemaSettingOpenModeSchemaItems:()=>R.sm,SchemaSettings:()=>u.RT,SchemaSettingsActionLinkItem:()=>G.i,SchemaSettingsActionModalItem:()=>B.l,SchemaSettingsBlockHeightItem:()=>B._M,SchemaSettingsBlockTitleItem:()=>B.Pp,SchemaSettingsCascaderItem:()=>B.Wk,SchemaSettingsChild:()=>u.T2,SchemaSettingsChildren:()=>u.Ah,SchemaSettingsConnectDataBlocks:()=>B.$r,SchemaSettingsDataScope:()=>B.Zy,SchemaSettingsDataTemplates:()=>B.iJ,SchemaSettingsDateFormat:()=>B.AH,SchemaSettingsDefaultSortingRules:()=>B.lZ,SchemaSettingsDefaultValue:()=>B.Jw,SchemaSettingsDivider:()=>B.kT,SchemaSettingsDropdown:()=>B.QA,SchemaSettingsEnableChildCollections:()=>B.DE,SchemaSettingsFixed:()=>X.$e,SchemaSettingsFormItemTemplate:()=>B.Sm,SchemaSettingsItem:()=>B.iU,SchemaSettingsItemGroup:()=>B.NT,SchemaSettingsLayoutItem:()=>B.qj,SchemaSettingsLinkageRules:()=>B.f9,SchemaSettingsManager:()=>u.mh,SchemaSettingsModalItem:()=>B.fY,SchemaSettingsNumberFormat:()=>B.vv,SchemaSettingsPlugin:()=>B.SA,SchemaSettingsPopupItem:()=>B.QN,SchemaSettingsProvider:()=>B.Kd,SchemaSettingsRemove:()=>B.d$,SchemaSettingsRenderEngine:()=>B.Fs,SchemaSettingsSelectItem:()=>B.Al,SchemaSettingsSortingRule:()=>B.bO,SchemaSettingsSubMenu:()=>B.OO,SchemaSettingsSwitchItem:()=>B.Qd,SchemaSettingsTemplate:()=>B.lC,SchemaSettingsWrapper:()=>u.OD,SchemaTemplateManagerContext:()=>N.cC,SchemaToolbar:()=>B.Bw,SchemaToolbarContext:()=>u.OI,SchemaToolbarProvider:()=>u.y6,SchemaToolbarVisibleContext:()=>B.Oy,ScopeSelect:()=>r.dn,SearchCollections:()=>Y.Cl,SearchParamsContext:()=>u.yh,SecondConFirm:()=>D.VXI,Select:()=>D.l6P,SelectActionInitializer:()=>Y.J_,SelectFieldInterface:()=>h.ur,SelectWithTitle:()=>x.$d,SetDataLoadingMode:()=>Q.yz,SettingCenterPermissionProvider:()=>r.kL,SettingCenterProvider:()=>r.$k,SettingsCenterConfigure:()=>r.$S,SettingsCenterContext:()=>j.WS,SettingsCenterDropdown:()=>j.wj,SettingsMenuProvider:()=>O.mn,ShowFormData:()=>D.a1G,SkeletonFallback:()=>a.SkeletonFallback,SkipValidation:()=>D.zN,SnowflakeIdFieldInterface:()=>h.xS,Sortable:()=>D.L1H,SortableContext:()=>D.gBZ,SortableItem:()=>D.UqM,SortableProvider:()=>D.gBz,SourceCollection:()=>h.sN,SourceForeignKey:()=>h.l7,SourceKey:()=>h.D0,Space:()=>D.$xS,StablePopover:()=>D.$mi,StrategyActions:()=>r.T,SubFieldDataSourceProvider_deprecated:()=>h.Jq,SubTableColumnModel:()=>a.SubTableColumnModel,SubTableFieldInterface:()=>h.OA,SubTableFieldModel:()=>a.SubTableFieldModel,SubmitActionInitializer:()=>Y.pW,SwitchLanguage:()=>U.r,SyncFieldsAction:()=>h.xG,SyncFieldsActionCom:()=>h.Yy,SyncSQLFieldsAction:()=>h.BK,SystemSettingsPane:()=>$.nS,SystemSettingsPlugin:()=>$.Cz,SystemSettingsSource:()=>$.or,Table:()=>D.XIK,TableActionColumnInitializer:()=>Y.rb,TableAssociationFieldGroupModel:()=>a.TableAssociationFieldGroupModel,TableBlockContext:()=>m.V3,TableBlockDesigner:()=>D.v93,TableBlockInitializer:()=>X.IB,TableBlockModel:()=>a.TableBlockModel,TableBlockProvider:()=>m.to,TableColumnModel:()=>a.TableColumnModel,TableColumnSchemaToolbar:()=>X.lI,TableField:()=>D.Bmi,TableFieldContext:()=>m.G8,TableFieldProvider:()=>m.Cc,TableFieldResource:()=>m.vv,TableSelectorContext:()=>m.$1,TableSelectorDesigner:()=>D.p9h,TableSelectorInitializer:()=>Z.w,TableSelectorParamsProvider:()=>m.bp,TableSelectorProvider:()=>m.j4,TableV2:()=>D.Hi5,TableoidFieldInterface:()=>h.YK,Tabs:()=>D.tUM,TabsContextProvider:()=>D.hY7,TargetForeignKey:()=>h.Pg,TargetKey:()=>h.n0,TemplateBlockProvider:()=>m.lm,TemplateSummary:()=>h.N8,Templates:()=>D.I5x,TestDesigner:()=>D.qIn,TextAreaWithContextSelector:()=>a.TextAreaWithContextSelector,TextAreaWithGlobalScope:()=>D.Ur4,TextareaFieldInterface:()=>h.OK,ThroughCollection:()=>h.Uq,ThroughForeignKey:()=>h.P$,TimeFieldInterface:()=>h.ju,TimePicker:()=>D.AG,TreeSelect:()=>D.f7I,UUIDFieldInterface:()=>h.nF,UnSupportFields:()=>h.u6,UnixTimestamp:()=>D.zVE,UnixTimestampFieldInterface:()=>h.qT,UpdateRecordActionModel:()=>a.UpdateRecordActionModel,UpdatedAtFieldInterface:()=>h.A8,UpdatedByFieldInterface:()=>h.CT,Upload:()=>D._OO,Uploader:()=>D.d9b,UrlFieldInterface:()=>h.Nc,Variable:()=>D.rTt,VariableFilterItem:()=>a.VariableFilterItem,VariableInput:()=>B.P8,VariablePopupRecordProvider:()=>ea.P3,VariableScope:()=>q.j0,VariableScopeProvider:()=>D.sIN,VariableSelect:()=>D.PnP,VariablesContext:()=>q.jT,VariablesProvider:()=>q.fK,ViewCollectionField:()=>h.w7,ViewFieldAction:()=>h.YG,WithoutFormFieldResource:()=>m.vi,WithoutTableFieldResource:()=>m.nI,actionSettings:()=>D.Sh8,actionSettingsItems:()=>D.MoU,addCustomAlgorithmToTheme:()=>y._l,allowAddNew:()=>D.lE3,appendQueryStringToUrl:()=>m.gN,applyCollectionFieldUiSchemaToDefaultValueSchema:()=>B.Ux,applyMobilePaginationProps:()=>a.applyMobilePaginationProps,attachmentFileTypes:()=>D.lNX,autoFill:()=>h.l5,autoIncrement:()=>h.N1,canMakeAssociationBlock:()=>Y.xj,collectionDataSource:()=>h.C8,compatOldTheme:()=>y.Ne,completeURL:()=>m.Dg,compose:()=>u.Zz,constraintsProps:()=>h.jg,createCompactSimpleItemRender:()=>a.createCompactSimpleItemRender,createCreateFormBlockUISchema:()=>J.U9,createDesignable:()=>D.pxY,createDetailsBlockSchema:()=>Y.DJ,createFormActionInitializers:()=>J.CQ,createFormActionInitializers_deprecated:()=>J.E9,createFormBlockSchema:()=>Y.je,createFormBlockSettings:()=>J.NO,createModalSettingsItem:()=>u.IN,createReadPrettyFormBlockSchema:()=>Y.TA,createRouterManager:()=>u.xd,createSelectSchemaSettingsItem:()=>u.IF,createStyles:()=>E.r,createSwitchSettingsItem:()=>u.$c,createTableBlockSchema:()=>Y.JP,createTableBlockUISchema:()=>X.DJ,createTextSettingsItem:()=>u.pi,customAlgorithm:()=>y.ze,customFormItemInitializers:()=>Y.qf,customFormItemInitializers_deprecated:()=>Y.KL,dataSource:()=>h.Ex,dateTimeProps:()=>h.E2,defaultFieldNames:()=>D.KDQ,defaultInputStyle:()=>B.D0,defaultProps:()=>h.Gs,defaultTheme:()=>y.zQ,dispatchEventDeep:()=>a.dispatchEventDeep,ds:()=>h.ds,editFormBlockSettings:()=>J.RG,editMarkdownFlow:()=>a.editMarkdownFlow,fetchTemplateData:()=>D.rlt,fieldComponentSettingsItem:()=>_.I1,fieldSettingsFormItem:()=>J.ln,fileSizeSetting:()=>er.oc,fillParentFields:()=>m.Rg,filterFormItemSettings:()=>D.Dgp,findByUid:()=>D.X6x,findFilterTargets:()=>m.OP,findFirstPageRoute:()=>T.sj,findFormBlock:()=>m.r9,findKanbanFormItem:()=>_.SG,findKeysByUid:()=>D.VFg,findMenuItem:()=>D.OZ6,findParentFieldSchema:()=>B.Jq,findRouteBySchemaUid:()=>T.bl,formActionInitializers:()=>J.eI,formDetailsSettings:()=>D.QIX,formItemInitializers:()=>J.rj,formItemInitializers_deprecated:()=>J.Lm,formItemSettings:()=>D.DVX,formSettings:()=>D.UyB,formV1Settings:()=>D.$Eq,genStyleHook:()=>D.fDF,getAppends:()=>m.c3,getAssociationPath:()=>m.jh,getCardItemSchema:()=>m.Km,getCollectionTitle:()=>W.R,getConfigurableProperties:()=>h.TC,getCurrentOptions:()=>D.oMF,getDataSourceHeaders:()=>_.kb,getDateExact:()=>D.Q2z,getDatePickerLabels:()=>D.Mwt,getDateRanges:()=>D.fDM,getFieldDefaultValue:()=>B.lD,getFilterByTkByCollection:()=>m.g7,getFlowPageMenuSchema:()=>eu.g,getFormValues:()=>m.ru,getIdsWithChildren:()=>m.O6,getLabelFormatValue:()=>D.PB5,getLabelWithTooltip:()=>B.YO,getPageMenuSchema:()=>et.my,getPageSchema:()=>m.RN,getPinnedPluginListKeys:()=>P.k4,getPopupPathFromParams:()=>D.C5g,getRenderContent:()=>D.a2g,getSchemaSettingsConfirmZIndex:()=>B.rf,getSchemaSettingsDialogZIndex:()=>B.tN,getShouldChange:()=>B.io,getSimpleModePaginationClassName:()=>a.getSimpleModePaginationClassName,getStoredPopupContext:()=>D.lSn,getSupportFieldsByAssociation:()=>g.Lt,getSupportFieldsByForeignKey:()=>g.Rm,getSystemSettingsMutationData:()=>$.mY,getTabSchema:()=>D.jZb,getURLSearchParams:()=>B._V,getURLSearchParamsChildren:()=>B.B_,getUniqueKeyFromCollection:()=>h.$e,getUnknownCountPaginationTotal:()=>a.getUnknownCountPaginationTotal,getVariableComponentWithScope:()=>K.Iy,getVariableValue:()=>x.Wu,getVariablesFromExpression:()=>q.e3,getZIndex:()=>D.flR,gridRowColWrap:()=>Y.xH,handleDateChangeOnForm:()=>D.QD_,hasIcon:()=>C.cE,i18n:()=>k.Ru,icons:()=>C.Pt,inferPickerType:()=>D.Pnr,interfacesOfUnsupportedDefaultValue:()=>B.lM,interfacesProperties:()=>h.q,isAssocField:()=>g.W0,isBulkEditAction:()=>D.PSc,isDeleteButtonDisabled:()=>h.WL,isFileCollection:()=>D.XOn,isInFilterFormBlock:()=>g.vc,isInitializersSame:()=>u.qt,isMobile:()=>D.FrL,isPatternDisabled:()=>B.h2,isSameCollection:()=>g.TQ,isShowFilePicker:()=>D.GmQ,isSystemField:()=>B.kr,isTabPage:()=>D.nKd,isTitleField:()=>_.ji,isVariable:()=>q.DZ,isWriteEmailAction:()=>D.cWk,itemsMerge:()=>Y.jz,joinCollectionName:()=>h.Sv,joinUrlSearch:()=>a.joinUrlSearch,languageCodes:()=>w.XK,lazy:()=>M.RZ,locale:()=>w.Ay,mapDatePicker:()=>D.x1p,mapRangePicker:()=>D.UTu,mapTimeFormat:()=>D.JDj,matchMimetype:()=>D._bM,mergeFilter:()=>g.Dj,mergePaginationClassName:()=>a.mergePaginationClassName,mockAPIClient:()=>z.a,moment2str:()=>D.msY,navigateToTab:()=>D.s23,navigateWithinSelf:()=>m.Ff,normalizeContainer:()=>u.Bv,openViewFlow:()=>a.openViewFlow,operators:()=>h.II,pageSettings:()=>D.fM,pageTabSettings:()=>D.uUT,parseCollectionName:()=>h.Hu,parseVariablesAndChangeParamsToQueryString:()=>m.iz,primaryKey:()=>h.ie,readPrettyFormSettings:()=>D.ud$,recordBlockInitializers:()=>Y.o$,recordBlockInitializers_deprecated:()=>Y.GA,recordPickerViewer:()=>h.mK,recursiveParent:()=>m.H2,reduceValueSize:()=>m.hu,registerIcon:()=>C.pU,registerIcons:()=>C.K1,registerInitializerMenusGenerator:()=>Y.LR,relationshipType:()=>h.B1,removeNullCondition:()=>D.pA3,replaceVariableValue:()=>m.WY,replaceVariables:()=>B.qk,requestParentRecordData:()=>_.$G,resolveFilterPickerFormat:()=>D.CEt,reverseFieldProperties:()=>h.Mw,schemaSettingsLabelLayout:()=>B.jN,setDataLoadingModeSettingsItem:()=>Q.qm,setDefaultSortingRulesSchemaSettingsItem:()=>B.ez,setTheDataScopeSchemaSettingsItem:()=>B.dh,shouldRenderIconInTitle:()=>T.Uc,showFileName:()=>er.FU,splitWrapSchema:()=>D.kBD,storePopupContext:()=>D.NVg,subTableActionInitializers:()=>Y.cj,subTableActionInitializers_deprecated:()=>Y.m,systemKeys:()=>B.Kg,tabPaneInitializers:()=>Y.fq,tabPaneInitializersForBulkEditFormBlock:()=>Y.BM,tabPaneInitializersForRecordBlock:()=>Y.C6,tabPaneInitializers_deprecated:()=>Y.DP,tableActionColumnInitializers:()=>X.Wf,tableActionColumnInitializers_deprecated:()=>X.Wd,tableActionInitializers:()=>X.kL,tableActionInitializers_deprecated:()=>X.Wc,tableBlockSettings:()=>X.Fe,tableColumnInitializers:()=>X.Cg,tableColumnInitializers_deprecated:()=>X.UH,tableColumnSettings:()=>X._s,tableSelectorBlockSettings:()=>Z.A,timeProps:()=>h.kg,titleField:()=>a.titleField,toToolsMap:()=>ec.f,transformFilter:()=>ed.transformFilter,transformToFilter:()=>g.SU,transformVariableValue:()=>q.Ap,tval:()=>k.ul,type:()=>h.NW,unique:()=>h.Am,updateFilterTargets:()=>m.Ez,updateFormActionInitializers:()=>J.Zg,updateFormActionInitializers_deprecated:()=>J.T,useACLActionParamsContext:()=>r.Zj,useACLContext:()=>r.bq,useACLFieldWhitelist:()=>r.xy,useACLRoleContext:()=>r.v6,useACLRolesCheck:()=>r.X0,useAPIClient:()=>s.VB,useAPITokenVariable:()=>B.ff,useAclSnippets:()=>u.K3,useActionAvailable:()=>Q.$R,useActionBarContext:()=>D.MIq,useActionContext:()=>D.D50,useAdminSchemaUid:()=>S.w,useAfterSuccessOptions:()=>D.bZ4,useAllAccessDesktopRoutes:()=>T.nr,useAllCollectionsInheritChainGetter:()=>_.LQ,useAllDataBlocks:()=>D.dWC,useApp:()=>u.nm,useAppLangContext:()=>i.IK,useAppSpin:()=>u.vk,useAriaAttributeOfMenuItem:()=>u.yb,useAssociatedFields:()=>g.ze,useAssociatedFormItemInitializerFields:()=>Y.aY,useAssociatedTableColumnInitializerFields:()=>Y.vP,useAssociationCreateActionProps:()=>m.Pj,useAssociationFieldContext:()=>D.G2C,useAssociationFieldModeContext:()=>D.Xjr,useAssociationFilterBlockProps:()=>m.UN,useAssociationFilterProps:()=>m.L1,useAssociationName:()=>_.UJ,useAssociationNames:()=>m.Ry,useAsyncData:()=>c.e6,useAttach:()=>D.TDH,useBackButton:()=>D.zEg,useBaseVariable:()=>B.de,useBlockAssociationContext:()=>m.Ps,useBlockConfigs:()=>p.oL,useBlockContext:()=>m.MX,useBlockHeight:()=>D.a97,useBlockHeightProps:()=>m.es,useBlockRequestContext:()=>m.J6,useBlockResource:()=>m.V0,useBlockTemplateContext:()=>N.kU,useBuiltinVariables:()=>q.c7,useBulkDestroyAction:()=>h.ZC,useBulkDestroyActionAndRefreshCM:()=>h.uq,useBulkDestroyActionProps:()=>m.Y0,useCancelAction:()=>h.Y7,useCloseAction:()=>D.GjU,useCollectValuesToSubmit:()=>m.TJ,useCollection:()=>_.Ge,useCollectionDataSource:()=>h.LF,useCollectionDataSourceItems:()=>Y.nG,useCollectionField:()=>_.E1,useCollectionFieldFormValues:()=>h.mY,useCollectionField_deprecated:()=>h.gp,useCollectionFields:()=>_.$h,useCollectionFieldsOptions:()=>h.Tt,useCollectionFilterOptions:()=>h.OU,useCollectionHistory:()=>h.W,useCollectionManager:()=>_.r2,useCollectionManager_deprecated:()=>h.nj,useCollectionParentRecord:()=>_.Vm,useCollectionParentRecordData:()=>_.vt,useCollectionRecord:()=>_.PD,useCollectionRecordData:()=>_.zv,useCollectionState:()=>B.lI,useCollection_deprecated:()=>h.k7,useCollections:()=>_.Xd,useColumnSchema:()=>D.BCL,useColumnSettings:()=>D.dbD,useCompatOldVariables:()=>B.aw,useCompile:()=>D.lum,useComponent:()=>D.xZI,useContextAssociationFields:()=>B.JV,useContextVariable:()=>q.Rr,useCreateActionProps:()=>m.wx,useCreateAssociationDetailsBlock:()=>Y.ug,useCreateAssociationDetailsWithoutPagination:()=>Y.Xr,useCreateAssociationFormBlock:()=>Y.MG,useCreateAssociationGridCardBlock:()=>Y.EC,useCreateAssociationListBlock:()=>Y.Q9,useCreateAssociationTableBlock:()=>Y.m5,useCreateEditFormBlock:()=>J.fi,useCreateFormBlock:()=>J.tH,useCreateTableBlock:()=>X.Hb,useCurrentAppInfo:()=>d.gL,useCurrentDocumentTitle:()=>f.er,useCurrentPageUid:()=>u.es,useCurrentPopupContext:()=>D.IX0,useCurrentPopupRecord:()=>ea.EZ,useCurrentRoleMode:()=>r.GL,useCurrentRoleVariable:()=>B.TV,useCurrentRoles:()=>O._N,useCurrentRoute:()=>T.K7,useCurrentSchema:()=>Y.oK,useCurrentSearchParams:()=>u.dT,useCurrentTabUid:()=>u.CR,useCurrentUserContext:()=>O.BW,useCurrentUserSettingsMenu:()=>O.Gg,useCurrentUserVariable:()=>B.oW,useCustomizeBulkUpdateActionProps:()=>m.qj,useCustomizeRequestActionProps:()=>m.Bq,useCustomizeUpdateActionProps:()=>m.Gb,useDataBlock:()=>_.$$,useDataBlockHeight:()=>D.mhY,useDataBlockParentRecord:()=>m.Q7,useDataBlockProps:()=>_.h6,useDataBlockRequest:()=>_._J,useDataBlockRequestData:()=>_.YE,useDataBlockRequestGetter:()=>_.ZK,useDataBlockResource:()=>_.jz,useDataLoadingMode:()=>Q.fY,useDataSource:()=>_.xw,useDataSourceFromRAC:()=>h.PN,useDataSourceHeaders:()=>_.TF,useDataSourceKey:()=>_.Mp,useDataSourceManager:()=>_.m6,useDataTemplates:()=>B.dF,useDatePickerContext:()=>D.nxV,useDateVariable:()=>B.Yv,useDatetimeVariable:()=>B.hY,useDatetimeVariableContext:()=>B.U$,useDeleteRouteSchema:()=>T.NH,useDesignable:()=>D.erX,useDesigner:()=>D.Hbp,useDestroyAction:()=>h.YZ,useDestroyActionAndRefreshCM:()=>h.uk,useDestroyActionProps:()=>m.eZ,useDetailsBlockContext:()=>m.gU,useDetailsBlockProps:()=>m.nw,useDetailsDecoratorProps:()=>Q.DM,useDetailsPaginationProps:()=>m.EV,useDetailsParentRecord:()=>Q.lJ,useDetailsProps:()=>Q.Yb,useDetailsWithPaginationBlockParams:()=>Q.lO,useDetailsWithPaginationDecoratorProps:()=>Q.Bd,useDetailsWithPaginationProps:()=>Q.ys,useDisassociateActionProps:()=>m.wY,useDocumentTitle:()=>f.rN,useDownloadLogs:()=>D.nu1,useEditTableActionProps:()=>m.Il,useEnsureOperatorsValid:()=>D.lhV,useExactDateVariable:()=>B.vm,useExactDateVariableContext:()=>B.gQ,useExtendCollections:()=>_.h_,useFieldComponentName:()=>x.qA,useFieldComponentOptions:()=>D.xB5,useFieldInterfaceOptions:()=>h.nO,useFieldMode:()=>D.J1,useFieldModeOptions:()=>D.jE9,useFieldNames:()=>D.gZ,useFieldProps:()=>D.OJX,useFieldTitle:()=>D.Us6,useFilterAPI:()=>g.eB,useFilterActionProps:()=>D.Um,useFilterBlock:()=>g.xZ,useFilterBlockActionProps:()=>m.B6,useFilterByTk:()=>m.E6,useFilterFieldOptions:()=>D.g9w,useFilterFieldProps:()=>D.yGk,useFilterOptions:()=>D.uwA,useFindComponent:()=>D.QIi,useFlag:()=>b._P,useFormActiveFields:()=>m.dW,useFormBlockContext:()=>m.Es,useFormBlockProps:()=>m.xp,useFormBlockType:()=>m.zE,useFormDataTemplates:()=>D.nlx,useFormFieldContext:()=>m.bt,useFormFieldProps:()=>m.U5,useFormItemInitializerFields:()=>Y.g_,useGetAriaLabelOfAction:()=>D.U8O,useGetAriaLabelOfDesigner:()=>B.$X,useGetAriaLabelOfDrawer:()=>D.HPy,useGetAriaLabelOfModal:()=>D.tO8,useGetAriaLabelOfPopover:()=>D.l2i,useGetFilterFieldOptions:()=>D.OqW,useGetFilterOptions:()=>D.wnJ,useGetSchemaInitializerMenuItems:()=>u.q9,useGlobalTheme:()=>y.my,useGlobalVariable:()=>u.$q,useGlobalVariableCtx:()=>u.i0,useGridContext:()=>D.ZB7,useGridRowContext:()=>D.FVw,useHistoryCollectionsByNames:()=>h.gV,useInheritsTableColumnInitializerFields:()=>Y.FJ,useInsertPageSchema:()=>et.rP,useIsAddNewForm:()=>D.TNL,useIsAdminPage:()=>u.MJ,useIsAllowToSetDefaultValue:()=>B.eT,useIsAssociationField:()=>D.xq$,useIsDetailBlock:()=>m.yH,useIsFieldReadPretty:()=>D.U5u,useIsFileField:()=>D.oAT,useIsFormReadPretty:()=>D.q7s,useIsInSettingsPage:()=>u.JY,useIsLoggedIn:()=>O.DB,useIsSameOrChildCollection:()=>B.j6,useIsSelectFieldMode:()=>D.jeY,useIsSubPageClosedByPageMenu:()=>u.ol,useKeepAlive:()=>T.Y,useKeepAliveLocationSearch:()=>D.xAQ,useLabelUiSchema:()=>D.RB3,useLazy:()=>M._P,useLinkActionProps:()=>m.Su,useLinkageAction:()=>D.LtX,useLinkageCollectionFilterOptions:()=>h.NU,useListBlockContext:()=>D.cl6,useLocalVariables:()=>q.gp,useLocalVariablesWithoutCustomVariable:()=>q.T_,useLocationNoUpdate:()=>u.zd,useLocationSearch:()=>u.$Q,useMenuDragEnd:()=>D.yt2,useMenuSearch:()=>Y.Fh,useMenuTranslation:()=>D.Qgm,useMobileLayout:()=>T.mY,useNavigateNoUpdate:()=>u.vx,useNocoBaseRoutes:()=>D.Ob5,useOpenModeContext:()=>eo.k,useOptionalFieldList:()=>m._q,useParamsFromRecord:()=>m.DQ,useParentCollection:()=>_.KY,useParentRecordCommon:()=>ee.M,useParentRoute:()=>D.TrS,useParseDataScopeFilter:()=>B.hJ,useParseURLAndParams:()=>m.Zj,useParsedFilter:()=>m.jY,usePickActionProps:()=>m.RH,usePlugin:()=>u.nu,usePopupSettings:()=>D.X43,usePopupUtils:()=>en.H,usePopupVariable:()=>B.GL,usePopupVariableContext:()=>B.hK,useProps:()=>D.YYe,useRecord:()=>I.pE,useRecordCollectionDataSourceItems:()=>Y.aU,useRecordIndex:()=>I.Hg,useRecordIsOwn:()=>I.BH,useRecordPkValue:()=>r.fr,useRefreshActionProps:()=>m.tG,useRefreshFieldSchema:()=>ei.o8,useRemoteCollectionManagerLoading:()=>h.RH,useRemoveActionProps:()=>m.Gg,useRemoveGridFormItem:()=>Y.l,useRequest:()=>s.bP,useRerenderDataBlock:()=>_.Kx,useResetBlockActionProps:()=>m.yE,useResource:()=>s.qK,useResourceActionContext:()=>h.br,useResourceContext:()=>h.xh,useRoleRecheck:()=>r.N5,useRoleVariable:()=>B._K,useRolesResourcesScopesSelectedRowKeys:()=>r.OV,useRouter:()=>u.rd,useRouterBasename:()=>u.$y,useSchemaComponentContext:()=>D.Fag,useSchemaInitializer:()=>u.fx,useSchemaInitializerItem:()=>u.eL,useSchemaInitializerMenuItems:()=>u.AK,useSchemaInitializerRender:()=>u.vt,useSchemaInitializerStyles:()=>u.Lm,useSchemaInitializerSubMenuContext:()=>u.Zk,useSchemaOptionsContext:()=>D.MqW,useSchemaSettings:()=>B.KR,useSchemaSettingsItem:()=>u.vr,useSchemaSettingsRender:()=>u.y$,useSchemaTemplate:()=>N.D$,useSchemaTemplateManager:()=>N.ov,useSchemaToolbar:()=>u.C5,useSchemaToolbarRender:()=>u.s6,useSortFields:()=>h.lY,useSourceId:()=>Q.YF,useSourceIdFromParentRecord:()=>m.hY,useSourceIdFromRecord:()=>m.ZC,useStyles:()=>D.ISS,useSupportedBlocks:()=>g.Uf,useSyncFromForm:()=>B.r3,useSystemSettings:()=>$.e6,useSystemSettingsVariable:()=>B.G,useTableBlockContext:()=>m.El,useTableBlockContextBasicValue:()=>m.Vb,useTableBlockDecoratorProps:()=>X.Av,useTableBlockParams:()=>X.Lu,useTableBlockProps:()=>X.ZI,useTableColumnInitializerFields:()=>Y.HG,useTableColumnIntegration:()=>D.i_r,useTableColumns:()=>m.XS,useTableFieldContext:()=>m.tt,useTableFieldProps:()=>m.cY,useTableSelectorContext:()=>m.K8,useTableSelectorProps:()=>m.fX,useTableSize:()=>D.LjE,useTabsContext:()=>D.f2z,useTemplateBlockContext:()=>m.yn,useTitleFieldOptions:()=>D.kDr,useToken:()=>E.K,useUIConfigurationPermissions:()=>r.uM,useURLAndHTMLSchema:()=>K.my,useURLSearchParamsCtx:()=>B.yu,useURLSearchParamsVariable:()=>B.hx,useUpdateActionProps:()=>m.f2,useUpdateCollectionActionAndRefreshCM:()=>h.ry,useUploadStyles:()=>D.dF1,useUserVariable:()=>B.vY,useValidateSchema:()=>D.doK,useValuesFromRecord:()=>h.Jn,useVariableOptions:()=>B._R,useVariableScope:()=>D.ami,useVariableScopeInfo:()=>q.g5,useVariables:()=>q.$l,useViewport:()=>S.k,useZIndexContext:()=>D.$5j,withDynamicSchemaProps:()=>H.T,withInitializer:()=>u.Vr,withSearchParams:()=>D.tXY,withSkeletonComponent:()=>V.t,zIndexContext:()=>D.Eaz}),o(37260),o(60339),o(65132),o(43017),o(38694),o(95836),o(26362),o(45814),o(29663),o(36519);var l=o(10691),n={};for(let e in l)0>["EditFormModel","PopupSubTableFormActionGroupModel","AddChildActionModel","InputFieldModel","PopupContextProvider","usePopupUtils","LinkActionModel","BlockModel","FormSubmitActionModel","joinUrlSearch","FilterFormBlockModel","FormActionGroupModel","RecordSelectFieldModel","DetailsCustomItemModel","GridModel","RefreshActionModel","CollectionBlockModel","DetailsBlockModel","JSActionModel","PopupActionModel","getUnknownCountPaginationTotal","openViewFlow","OpenModeProvider","FormAssociationFieldGroupModel","withDynamicSchemaProps","FilterFormItemModel","languageCodes","getVariableComponentWithScope","AssignFormModel","DisplayTextFieldModel","FilterActionModel","transformFilter","useOpenModeContext","SubTableColumnModel","ActionModel","BlockGridModel","FieldModel","CollectionActionGroupModel","DetailsGridModel","CollectionActionModel","AddNewActionModel","ActionSceneEnum","ClickableFieldModel","editMarkdownFlow","FormItem","useInsertPageSchema","ChildPageModel","getSimpleModePaginationClassName","dispatchEventDeep","VariablePopupRecordProvider","CreateFormModel","IsInNocoBaseRecursionFieldContext","FieldModelRenderer","DisplayTitleFieldModel","locale","DataBlockModel","ActionGroupModel","CodeEditorExtension","withSkeletonComponent","RecordActionGroupModel","SubTableFieldModel","titleField","SwitchLanguage","getPageMenuSchema","FilterGroup","UpdateRecordActionModel","CollectionFieldUISchemaProvider","FormGridModel","TableColumnModel","NocoBaseRecursionField","ChildPageTabModel","FormBlockModel","VariableFilterItem","RefreshComponentProvider","MockFlowModelRepository","fileSizeSetting","default","FilterBlockModel","useRefreshFieldSchema","DetailsItemModel","TextAreaWithContextSelector","CommonItemModel","FormActionModel","FormComponent","CodeEditor","SkeletonFallback","applyMobilePaginationProps","createCompactSimpleItemRender","TableBlockModel","RecordPickerContent","TableAssociationFieldGroupModel","FilterFormActionGroupModel","DisplaySubTableFieldModel","BlockSceneEnum","useCurrentPopupRecord","FormItemModel","DetailsAssociationFieldGroupModel","SchemaSettingsActionLinkItem","showFileName","useURLAndHTMLSchema","mergePaginationClassName"].indexOf(e)&&(n[e]=()=>l[e]);o.d(t,n);var a=o(13975),r=o(41906),i=o(51771),s=o(16211),d=o(94702),u=o(17157),c=o(13274),p=o(29594),m=o(18111),h=o(43288),x=o(53770),v=o(25739),_=o(28227),f=o(50255),g=o(65613),b=o(69575),y=o(79980),S=o(18226),k=o(7271),C=o(60430),M=o(88448),w=o(28601),F=o(21676),P=o(6997),j=o(76028),A=o(92627),I=o(41944),T=o(93160),D=o(82924),L=o(2046),Y=o(5101),R=o(18272),B=o(99300),N=o(96932),E=o(49948),$=o(86393),z=o(48245),O=o(84693),q=o(43923),H=o(80461),V=o(99847),U=o(24943),G=o(39315),K=o(1590),W=o(56250),J=o(12416),X=o(77526),Z=o(92452),Q=o(97173),ee=o(14696),et=o(52973),eo=o(38693),el=o(47851),en=o(84313),ea=o(39888),er=o(15701),ei=o(30644),es=o(504),ed=o(63526),eu=o(40854),ec=o(83249)},88448(e,t,o){o.d(t,{PE:()=>i,RZ:()=>d,_P:()=>u});var l=o(71178),n=o(51649),a=o(52793),r=o(77583);let i=Symbol("LAZY_COMPONENT_KEY"),s=new Map;function d(e){for(var t=arguments.length,o=Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];if(0===o.length){let t=(0,n.lazy)(()=>e().then(e=>{let t=e.default;return o[i]=t,{default:t}})),o=e=>(0,l.jsx)(n.default.Suspense,{fallback:(0,l.jsx)(a.Spin,{}),children:(0,l.jsx)(t,{...e})});return o}return o.reduce((t,o)=>{let s=(0,n.lazy)(()=>e().then(e=>{let l=(0,r.get)(e,o);return t[o][i]=l,{default:l}}));return t[o]=e=>(0,l.jsx)(n.default.Suspense,{fallback:(0,l.jsx)(a.Spin,{}),children:(0,l.jsx)(s,{...e})}),t},{})}function u(e,t){let o="function"==typeof t?t:e=>e[t],l=e.toString(),n=s.get(l);if(null==n?void 0:n.error)throw n.error;if(null==n?void 0:n.module)return o(n.module);if(!(null==n?void 0:n.promise)){let t=n||{};throw t.promise=e().then(e=>(t.module=e,e)).catch(e=>{throw t.error=e,e}),s.set(l,t),t.promise}throw n.promise}},28601(e,t,o){o.d(t,{At:()=>l,Ay:()=>a,XK:()=>n});let l={"ar-EG":"ar","az-AZ":"az","bg-BG":"bg","bn-BD":"bn-bd","by-BY":"en","ca-ES":"ca","cs-CZ":"cs","da-DK":"da","de-DE":"de","el-GR":"el","en-GB":"en-gb","en-US":"en","es-ES":"es","et-EE":"et","fa-IR":"fa","fi-FI":"fi","fr-BE":"fr","fr-CA":"fr","fr-FR":"fr","ga-IE":"ga","gl-ES":"gl","he-IL":"he","hi-IN":"hi","hr-HR":"hr","hu-HU":"hu","hy-AM":"hy-am","id-ID":"id","is-IS":"is","it-IT":"it","ja-JP":"ja","ka-GE":"ka","kk-KZ":"kk","km-KH":"km","kn-IN":"kn","ko-KR":"ko","ku-IQ":"ku","lt-LT":"lt","lv-LV":"lv","mk-MK":"mk","ml-IN":"ml","mn-MN":"mn","ms-MY":"ms","nb-NO":"nb","ne-NP":"ne","nl-BE":"nl-be","nl-NL":"nl","pl-PL":"pl","pt-BR":"pt-br","pt-PT":"pt","ro-RO":"ro","ru-RU":"ru","si-LK":"si","sk-SK":"sk","sl-SI":"sl","sr-RS":"sr","sv-SE":"sv","ta-IN":"ta","th-TH":"th","tk-TK":"tk","tr-TR":"tr","uk-UA":"uk","ur-PK":"ur","vi-VN":"vi","zh-CN":"zh-cn","zh-HK":"zh-hk","zh-TW":"zh-tw"},n={"ar-EG":{label:"العربية"},"az-AZ":{label:"Azərbaycan dili"},"bg-BG":{label:"Български"},"bn-BD":{label:"Bengali"},"by-BY":{label:"Беларускі"},"ca-ES":{label:"Сatal\xe0/Espanya"},"cs-CZ":{label:"Česky"},"da-DK":{label:"Dansk"},"de-DE":{label:"Deutsch"},"el-GR":{label:"Ελληνικά"},"en-GB":{label:"English(GB)"},"en-US":{label:"English"},"es-ES":{label:"Espa\xf1ol"},"et-EE":{label:"Estonian (Eesti)"},"fa-IR":{label:"فارسی"},"fi-FI":{label:"Suomi"},"fr-BE":{label:"Fran\xe7ais(BE)"},"fr-CA":{label:"Fran\xe7ais(CA)"},"fr-FR":{label:"Fran\xe7ais"},"ga-IE":{label:"Gaeilge"},"gl-ES":{label:"Galego"},"he-IL":{label:"עברית"},"hi-IN":{label:"हिन्दी"},"hr-HR":{label:"Hrvatski jezik"},"hu-HU":{label:"Magyar"},"hy-AM":{label:"Հայերեն"},"id-ID":{label:"Bahasa Indonesia"},"is-IS":{label:"\xcdslenska"},"it-IT":{label:"Italiano"},"ja-JP":{label:"日本語"},"ka-GE":{label:"ქართული"},"kk-KZ":{label:"Қазақ тілі"},"km-KH":{label:"ភាសាខ្មែរ"},"kn-IN":{label:"ಕನ್ನಡ"},"ko-KR":{label:"한국어"},"ku-IQ":{label:"کوردی"},"lt-LT":{label:"lietuvių"},"lv-LV":{label:"Latviešu valoda"},"mk-MK":{label:"македонски јазик"},"ml-IN":{label:"മലയാളം"},"mn-MN":{label:"Монгол хэл"},"ms-MY":{label:"بهاس ملايو"},"nb-NO":{label:"Norsk bokm\xe5l"},"ne-NP":{label:"नेपाली"},"nl-BE":{label:"Vlaams"},"nl-NL":{label:"Nederlands"},"pl-PL":{label:"Polski"},"pt-BR":{label:"Portugu\xeas brasileiro"},"pt-PT":{label:"Portugu\xeas"},"ro-RO":{label:"Rom\xe2nia"},"ru-RU":{label:"Русский"},"si-LK":{label:"සිංහල"},"sk-SK":{label:"Slovenčina"},"sl-SI":{label:"Slovenščina"},"sr-RS":{label:"српски језик"},"sv-SE":{label:"Svenska"},"ta-IN":{label:"Tamil"},"th-TH":{label:"ภาษาไทย"},"tk-TK":{label:"Turkmen"},"tr-TR":{label:"T\xfcrk\xe7e"},"uk-UA":{label:"Українська"},"ur-PK":{label:"Oʻzbekcha"},"vi-VN":{label:"Tiếng Việt"},"zh-CN":{label:"简体中文"},"zh-HK":{label:"繁體中文(香港)"},"zh-TW":{label:"繁體中文(台湾)"}},a=n},39315(e,t,o){o.d(t,{V:()=>v,i:()=>x});var l=o(71178),n=o(56220),a=o(56920);o(51649);var r=o(77843),i=o(44374),s=o(17157),d=o(38951),u=o(45036),c=o(43288),p=o(99300),m=o(1590),h=o(28227);let x=()=>{let e=(0,a.useField)(),t=(0,a.useFieldSchema)(),{dn:o}=(0,i.useDesignable)(),{t:s}=(0,r.useTranslation)(),{urlSchema:d,paramsSchema:u,openInNewWindowSchema:c}=(0,m.my)(),h=t["x-component-props"]||{},x={url:h.url,params:h.params||[{}],openInNewWindow:h.openInNewWindow};return(0,l.jsx)(p.fY,{title:s("Edit link"),components:{ArrayItems:n.ArrayItems},schema:{type:"object",title:s("Edit link"),properties:{url:{...d,required:!0},params:u,openInNewWindow:c}},onSubmit:l=>{let{url:n,params:a,openInNewWindow:r}=l;h.url=n,h.params=a,h.openInNewWindow=r,t["x-component-props"]=h,e.componentProps.url=n,e.componentProps.params=a,e.componentProps.openInNewWindow=r,o.emit("patch",{schema:{"x-uid":t["x-uid"],"x-component-props":h}}),o.refresh()},initialValues:x})},v=new d.R({name:"actionSettings:link",items:[{name:"editButton",Component:u.Yp,useComponentProps(){let{buttonEditorProps:e}=(0,s.C5)();return e}},{name:"editLink",Component:x},{name:"linkageRules",Component:p.f9,useComponentProps(){let{linkageRulesProps:e}=(0,s.C5)(),{association:t}=(0,h.h6)()||{},{getCollectionField:o}=(0,c.nj)();return o(t),{...e}}},p.Xh,{name:"remove",sort:100,Component:u.d0,useComponentProps(){let{removeButtonProps:e}=(0,s.C5)();return e}}]})},1590(e,t,o){o.d(t,{Iy:()=>m,my:()=>h});var l=o(71178),n=o(10691),a=o(56920),r=o(51649),i=o(77843),s=o(69412),d=o(41944),u=o(7122),c=o(96123),p=o(45560);let m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return o=>{let n=(0,a.useFieldSchema)(),{form:r}=(0,s.Es)(),i=(0,d.pE)(),u=(0,c._)({collectionField:{uiSchema:n},form:r,record:i,uiSchema:n,noDisabled:!0});return(0,l.jsx)(e,{...o,scope:t.concat(u).filter(Boolean)})}},h=()=>{let{t:e}=(0,i.useTranslation)(),t=(()=>{let e=(0,p.$)("$env"),t=(0,r.useMemo)(()=>e?JSON.stringify((e.children||[]).map(e=>({name:null==e?void 0:e.name,type:null==e?void 0:e.type,title:null==e?void 0:e.title}))):null,[e]),o=(0,r.useRef)(null),l=(0,r.useRef)(null);if(!e)return o.current=null,l.current=null,null;if(l.current!==t){let{children:n=[]}=e;o.current={...e,children:n.filter(e=>"default"===e.type)},l.current=t}return o.current})(),o=(0,r.useMemo)(()=>m(u.rT.TextArea,t?[t]:[]),[t]),l=(0,r.useMemo)(()=>({title:e("URL"),type:"string","x-decorator":"FormItem","x-component":o,description:e("Do not concatenate search params in the URL"),"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "html"}}'}}}}),[e,o]),a=(0,r.useMemo)(()=>({title:'{{t("Mode")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"url",enum:[{value:"url",label:e("URL")},{value:"html",label:e("HTML")}]}),[e]),s=(0,r.useMemo)(()=>({title:e("html"),type:"string","x-decorator":"FormItem","x-component":m(u.rT.RawTextArea),"x-component-props":{rows:10},"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "url"}}'}}}}),[e]);return{urlSchema:l,paramsSchema:(0,r.useMemo)(()=>({type:"array","x-component":"ArrayItems","x-decorator":"FormItem",title:'{{t("Search parameters")}}',items:{type:"object",properties:{space:{type:"void","x-component":"Space","x-component-props":{style:{flexWrap:"nowrap",maxWidth:"100%"},className:(0,n.css)`
139
+ `,defaultValue:"h:mm a",formats:["hh:mm:ss a","HH:mm:ss"],timeFormat:!0},default:"HH:mm:ss",enum:[{label:(0,a.b)({format:"hh:mm:ss a"}),value:"hh:mm:ss a"},{label:(0,a.b)({format:"HH:mm:ss"}),value:"HH:mm:ss"},{label:"custom",value:"custom"}]}},_={type:"array",title:'{{t("Options")}}',"x-decorator":"FormItem","x-component":"ArrayTable","x-component-props":{pagination:{pageSize:1e3}},items:{type:"object",properties:{column1:{type:"void","x-component":"ArrayTable.Column","x-component-props":{width:50,title:"",align:"center"},properties:{sort:{type:"void","x-component":"ArrayTable.SortHandle"}}},column2:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Option value")}}'},properties:{value:{type:"string",required:!0,"x-decorator":"FormItem","x-component":"Input","x-reactions":e=>{e.initialValue||e.initialized||(e.initialValue=(0,l.uid)(),e.setValue((0,l.uid)()))}}}},column3:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Option label")}}'},properties:{label:{type:"string",required:!0,"x-decorator":"FormItem","x-component":"Input"}}},column4:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:'{{t("Color")}}'},properties:{color:{type:"string","x-decorator":"FormItem","x-component":"ColorSelect"}}},column5:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:"",dataIndex:"operations",fixed:"right"},properties:{item:{type:"void","x-component":"FormItem",properties:{remove:{type:"void","x-component":"ArrayTable.Remove"}}}}}}},properties:{add:{type:"void","x-component":"ArrayTable.Addition","x-component-props":{randomValue:!0},title:"{{t('Add option')}}"}}},f={"uiSchema.title":{type:"string",title:'{{t("Field display name")}}',required:!0,"x-decorator":"FormItem","x-component":"Input"},name:{type:"string",title:'{{t("Field name")}}',required:!0,"x-disabled":"{{ !createOnly }}","x-decorator":"FormItem","x-component":"Input","x-validator":"uid",description:"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with a letter.')}}"}},g={type:"void",title:'{{ t("View record") }}',"x-component":"RecordPicker.Viewer","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:{}}}}}}}},b={type:"string",title:'{{t("Options")}}',"x-decorator":"FormItem","x-component":"Select","x-component-props":{multiple:!0},enum:"{{collections}}"}},40919(e,t,o){o.r(t),o.d(t,{array:()=>n,bigField:()=>h,boolean:()=>c,collection:()=>m,datetime:()=>r,enumType:()=>d,id:()=>s,number:()=>i,object:()=>a,string:()=>l,tableoid:()=>p,time:()=>u});let l=[{label:'{{t("contains")}}',value:"$includes",selected:!0},{label:'{{t("does not contain")}}',value:"$notIncludes"},{label:'{{t("is")}}',value:"$eq"},{label:'{{t("is not")}}',value:"$ne"},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],n=[{label:'{{t("is")}}',value:"$match",selected:!0,schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is not")}}',value:"$notMatch",schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is any of")}}',value:"$anyOf",schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is none of")}}',value:"$noneOf",schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],a=[{label:'{{t("is")}}',value:"$eq",selected:!0},{label:'{{t("is not")}}',value:"$ne"}],r=[{label:"{{ t('is') }}",value:"$dateOn",selected:!0,schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is not') }}",value:"$dateNotOn",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is before') }}",value:"$dateBefore",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is after') }}",value:"$dateAfter",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is on or after') }}",value:"$dateNotBefore",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is on or before') }}",value:"$dateNotAfter",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!1}},onlyFilterAction:!0},{label:"{{ t('is between') }}",value:"$dateBetween",schema:{"x-component":"DateFilterDynamicComponent","x-component-props":{isRange:!0}}},{label:"{{ t('is empty') }}",value:"$empty",noValue:!0},{label:"{{ t('is not empty') }}",value:"$notEmpty",noValue:!0}],i=[{label:'{{t("=")}}',value:"$eq",selected:!0},{label:'{{t("≠")}}',value:"$ne"},{label:'{{t(">")}}',value:"$gt"},{label:'{{t("≥")}}',value:"$gte"},{label:'{{t("<")}}',value:"$lt"},{label:'{{t("≤")}}',value:"$lte"},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],s=[{label:'{{t("is")}}',value:"$eq",selected:!0},{label:'{{t("is not")}}',value:"$ne"},{label:'{{t("exists")}}',value:"$exists",noValue:!0},{label:'{{t("not exists")}}',value:"$notExists",noValue:!0}],d=[{label:'{{t("is")}}',value:"$eq",selected:!0,schema:{"x-component":"Select","x-component-props":{mode:null}}},{label:'{{t("is not")}}',value:"$ne",schema:{"x-component":"Select","x-component-props":{mode:null}}},{label:'{{t("is any of")}}',value:"$in",schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is none of")}}',value:"$notIn",schema:{"x-component":"Select","x-component-props":{mode:"tags"}}},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],u=[{label:'{{t("is")}}',value:"$eq",selected:!0},{label:'{{t("is not")}}',value:"$neq"},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],c=[{label:'{{t("Yes")}}',value:"$isTruly",selected:!0,noValue:!0,schema:{"x-component":"Select","x-component-props":{multiple:!1,options:[{label:'{{t("Yes")}}',value:!0},{label:'{{t("No")}}',value:!1}]}}},{label:'{{t("No")}}',value:"$isFalsy",noValue:!0,schema:{"x-component":"Select","x-component-props":{multiple:!1,options:[{label:'{{t("Yes")}}',value:!0},{label:'{{t("No")}}',value:!1}]}}},{label:"{{ t('is empty') }}",value:"$empty",noValue:!0},{label:"{{ t('is not empty') }}",value:"$notEmpty",noValue:!0}],p=[{label:'{{t("is any of")}}',value:"$childIn",schema:{"x-component":"CollectionSelect","x-component-props":{mode:"tags"}}},{label:'{{t("is none of")}}',value:"$childNotIn",schema:{"x-component":"CollectionSelect","x-component-props":{mode:"tags"}}}],m=[{label:'{{t("is")}}',value:"$eq",selected:!0,schema:{"x-component":"DataSourceCollectionCascader"}},{label:'{{t("is not")}}',value:"$ne",schema:{"x-component":"DataSourceCollectionCascader"}},{label:'{{t("is any of")}}',value:"$in",schema:{"x-component":"DataSourceCollectionCascader","x-component-props":{mode:"tags"}}},{label:'{{t("is none of")}}',value:"$notIn",schema:{"x-component":"DataSourceCollectionCascader","x-component-props":{mode:"tags"}}},{label:'{{t("is empty")}}',value:"$empty",noValue:!0},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0}],h=[{label:'{{t("contains")}}',value:"$includes",selected:!0,schema:{type:"string","x-component":"Input"}},{label:'{{t("does not contain")}}',value:"$notIncludes",schema:{type:"string","x-component":"Input"}},{label:'{{t("is")}}',value:"$eq",schema:{type:"string","x-component":"Input"}},{label:'{{t("is not")}}',value:"$ne",schema:{type:"string","x-component":"Input"}},{label:'{{t("is empty")}}',value:"$empty",noValue:!0,schema:{type:"string","x-component":"Input"}},{label:'{{t("is not empty")}}',value:"$notEmpty",noValue:!0,schema:{type:"string","x-component":"Input"}}]},63586(e,t,o){o.d(t,{Jq:()=>p,T8:()=>m,ds:()=>c,hu:()=>u});var l=o(71178),n=o(56920),a=o(77583),r=o(51649),i=o(44374),s=o(16211);let d={name:"fields",targetKey:"name",fields:[{type:"string",name:"type",interface:"input",uiSchema:{title:'{{ t("Storage type") }}',type:"string","x-component":"Select",enum:[{label:"String",value:"string"}],required:!0}},{type:"string",name:"interface",interface:"input",uiSchema:{title:'{{ t("Field interface") }}',type:"string","x-component":"Select",enum:"{{interfaces}}"}},{type:"string",name:"title",interface:"input",uiSchema:{title:'{{ t("Field display name") }}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"name",interface:"input",uiSchema:{title:'{{ t("Field name") }}',type:"string","x-component":"Input"}}]},u=(0,r.createContext)(null);u.displayName="DataSourceContext_deprecated";let c={useSelectedRowKeys:()=>{let e=(0,r.useContext)(u);return[e.selectedRowKeys,e.setSelectedRowKeys]},useDataSource_deprecated:e=>{let t=(0,r.useContext)(u);return(0,i.useRequest)(()=>Promise.resolve({data:t.dataSource}),{...e,refreshDeps:[JSON.stringify(t.dataSource)]})},useCreateAction:()=>{let e=(0,r.useContext)(u),t=(0,n.useForm)(),{setVisible:o}=(0,i.useActionContext)();return{async run(){console.log("form.values",t.values);let l=e.dataSource||[];l.push((0,a.cloneDeep)(t.values)),e.setDataSource([...l]),o(!1),await t.reset()}}},useBulkDestroyAction:()=>{let e=(0,r.useContext)(u),{selectedRowKeys:t,setSelectedRowKeys:o}=e;return{async run(){let l=e.dataSource||[];e.setDataSource(l.filter((e,o)=>!t.includes(o))),o([])}}},useUpdateAction:()=>{let e=(0,i.useRecordIndex)(),t=(0,n.useForm)(),{setVisible:o}=(0,i.useActionContext)(),l=(0,r.useContext)(u);return{async run(){let n=((null==l?void 0:l.dataSource)||[]).map((o,l)=>l===e?{...t.values}:o);l.setDataSource([...n]),o(!1)}}},useDestroyAction:()=>{let e=(0,i.useRecordIndex)(),t=(0,r.useContext)(u);return{async run(){let o=t.dataSource||[];t.setDataSource(o.filter((t,o)=>e!==o))}}}},p=(0,n.observer)(e=>{let[t,o]=(0,r.useState)([]),[n,a]=(0,r.useState)([]),c=(0,i.useRecord)(),p=(0,s.VB)(),m=(0,i.useRequest)(()=>{if("subTable"===c.interface){var e;return(null==c||null==(e=c.children)?void 0:e.length)?Promise.resolve({data:(null==c?void 0:c.children)||[]}):p.resource("fields").list({paginate:!1,sort:"sort",filter:{parentKey:c.key}}).then(e=>null==e?void 0:e.data)}return Promise.resolve({data:[]})},{onSuccess(e){console.log("dataSource1",null==e?void 0:e.data),a(null==e?void 0:e.data)}});return(0,l.jsx)(i.CollectionProvider_deprecated,{collection:d,children:(0,l.jsx)(u.Provider,{value:{rowKey:"name",service:m,dataSource:n,setDataSource:a,selectedRowKeys:t,setSelectedRowKeys:o},children:e.children})})},{displayName:"SubFieldDataSourceProvider_deprecated"}),m=(0,n.observer)(e=>{let{rowKey:t,collection:o,association:n}=e,[a,d]=(0,r.useState)([]),[c,p]=(0,r.useState)([]),m=(0,i.useRecord)(),h=(0,s.VB)(),{getCollection:x}=(0,i.useCollectionManager_deprecated)(),v=x(o),_=null==m?void 0:m[n.targetKey||"id"],f=(0,i.useRequest)(()=>{if(_){var e,t;return h.request({resource:`${n.collectionName}.${n.name}`,resourceOf:_,action:"list",params:{appends:null==v||null==(t=v.fields)||null==(e=t.filter(e=>e.target))?void 0:e.map(e=>e.name)}}).then(e=>e.data)}return Promise.resolve({data:(null==m?void 0:m[n.name])||[]})},{onSuccess(e){p(null==e?void 0:e.data)}});return(0,l.jsx)(i.CollectionProvider_deprecated,{collection:v,children:(0,l.jsx)(u.Provider,{value:{rowKey:t,service:f,dataSource:c,setDataSource:p,selectedRowKeys:a,setSelectedRowKeys:d},children:e.children})})},{displayName:"DataSourceProvider_deprecated"})},85162(e,t,o){o.d(t,{b:()=>i});var l=o(71178),n=o(52793);o(51649);var a=o(77843),r=o(38356);let i=()=>{let e=(0,r.useNavigate)(),{t}=(0,a.useTranslation)();return(0,l.jsx)(n.Result,{status:"404",title:"404",subTitle:t("Sorry, the page you visited does not exist."),extra:(0,l.jsx)(n.Button,{onClick:()=>e("/",{replace:!0}),type:"primary",children:"Back Home"})})}},25180(e,t,o){o.d(t,{$:()=>r});var l=o(71178),n=o(52793),a=o(51649);function r(e){let{title:t,defaultValue:o,onChange:r,options:i,fieldNames:s,...d}=e,[u,c]=(0,a.useState)(!1),p=(0,a.useRef)(null);return(0,l.jsxs)("div",{style:{alignItems:"center",display:"flex",justifyContent:"space-between"},onClick:e=>{e.stopPropagation(),c(e=>!e)},onMouseLeave:()=>{p.current=setTimeout(()=>{c(!1)},200)},children:[t,(0,l.jsx)(n.Select,{...d,open:u,"data-testid":`select-${t}`,popupMatchSelectWidth:!1,bordered:!1,defaultValue:o,onChange:r,popupClassName:`select-popup-${t.replaceAll(" ","-")}`,fieldNames:s,options:i,style:{textAlign:"right",minWidth:100},onMouseEnter:()=>{clearTimeout(p.current)}})]})}},52081(e,t,o){o.d(t,{W:()=>a});var l=o(83489),n=o(4627);let a=async(e,t)=>{if(!e)return e;let{evaluate:o}=l.evaluators.get("string"),{exp:a,scope:r}=await (0,n.qk)(e,t);return o(a,{now:()=>new Date().toString(),...r})}},53770(e,t,o){o.d(t,{$d:()=>n.$,Wu:()=>r.W,bM:()=>l.b,qA:()=>a.q});var l=o(85162),n=o(25180),a=o(57359),r=o(52081)},57359(e,t,o){o.d(t,{q:()=>i});var l=o(56920),n=o(46724),a=o(31574),r=o(32221);function i(){var e,t,o,i;let{fieldSchema:s,collectionField:d}=(0,r.BC)(),u=(0,l.useField)(),c=(0,a.oA)(),p=(0,l.useFieldSchema)(),m=(0,n.E1)(),h=s||p,x=d||m,v=(null==h||null==(e=h["x-component-props"])?void 0:e.mode)||(null==u||null==(t=u.componentProps)?void 0:t.mode)||(c?"FileManager":"")||(null==h||null==(o=h["x-component-props"])?void 0:o.component)||(null==x||null==(i=x.uiSchema)?void 0:i["x-component"]);return({AssociationField:"Select"})[v]||v}},85906(e,t,o){o.d(t,{t:()=>n});var l=o(51649);let n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,l.useRef)(0);return(0,l.useEffect)(()=>{let e=e=>{let{clientY:o}=e;t.current=Math.max(o,window.innerHeight-o)};return window.addEventListener("mousemove",e),()=>{window.removeEventListener("mousemove",e)}},[]),(0,l.useMemo)(()=>t.current-40,e)}},25739(e,t,o){o.d(t,{B:()=>s});var l=o(72741),n=o(51649),a=o(13975),r=o(52793);let i=e=>{let{children:t}=e,{token:o}=r.theme.useToken(),i=o.colorFillTertiary,s=new l.TinyColor(o.colorFill).onBackground(o.colorFillSecondary).toHexShortString(),d=new l.TinyColor(o.colorFill).onBackground(o.colorFill).toHexShortString(),u=new l.TinyColor(o.colorFill).onBackground(o.colorFill).onBackground(o.colorFill).toHexShortString();return(0,n.useEffect)(()=>{document.body.style.setProperty("--nb-spacing",`${o.marginLG}px`),document.body.style.setProperty("--nb-designer-offset",`${o.marginXS}px`),document.body.style.setProperty("--nb-header-height",`${o.sizeXXL-2}px`),document.body.style.setProperty("--nb-box-bg",o.colorBgLayout),document.body.style.setProperty("--colorBgLayout",o.colorBgLayout),document.body.style.setProperty("--colorBgContainer",o.colorBgContainer),document.body.style.setProperty("--controlHeightLG",`${o.controlHeightLG}px`),document.body.style.setProperty("--paddingContentVerticalSM",`${o.paddingContentVerticalSM}px`),document.body.style.setProperty("--marginSM",`${o.marginSM}px`),document.body.style.setProperty("--colorInfoBg",o.colorInfoBg),document.body.style.setProperty("--colorInfoBorder",o.colorInfoBorder),document.body.style.setProperty("--colorWarningBg",o.colorWarningBg),document.body.style.setProperty("--colorWarningBorder",o.colorWarningBorder),document.body.style.setProperty("--colorText",o.colorText),document.body.style.setProperty("--colorTextDescription",o.colorTextDescription),document.body.style.setProperty("--colorBgTextHover",o.colorBgTextHover),document.body.style.setProperty("--colorSplit",o.colorSplit),document.body.style.setProperty("--borderRadiusOuter",`${o.borderRadiusOuter}px`),document.body.style.setProperty("--colorTextHeaderMenu",o.colorTextHeaderMenu),document.body.style.setProperty("--colorPrimaryText",o.colorPrimaryText),document.body.style.setProperty("--colorPrimaryTextActive",o.colorPrimaryTextActive),document.body.style.setProperty("--colorPrimaryTextHover",o.colorPrimaryTextHover),document.body.style.setProperty("--colorBgSider",o.colorBgSider),document.body.style.setProperty("--colorBgSiderMenuHover",o.colorBgSiderMenuHover),document.body.style.setProperty("--colorBgSiderMenuActive",o.colorBgSiderMenuActive),document.body.style.setProperty("--colorTextSiderMenu",o.colorTextSiderMenu),document.body.style.setProperty("--colorTextSiderMenuHover",o.colorTextSiderMenuHover),document.body.style.setProperty("--colorTextSiderMenuActive",o.colorTextSiderMenuActive),document.body.style.setProperty("--colorBgScrollTrack",i),document.body.style.setProperty("--colorBgScrollBar",s),document.body.style.setProperty("--colorBgScrollBarHover",d),document.body.style.setProperty("--colorBgScrollBarActive",u),document.body.style.setProperty("--colorSettings",o.colorSettings||a.defaultTheme.token.colorSettings),document.body.style.setProperty("--colorBgSettingsHover",o.colorBgSettingsHover),document.body.style.setProperty("--colorTemplateBgSettingsHover",o.colorTemplateBgSettingsHover),document.body.style.setProperty("--colorBorderSettingsHover",o.colorBorderSettingsHover),document.body.style.setProperty("--colorBgMenuItemSelected",o.colorBgHeaderMenuActive),document.body.style.setProperty("background-color",o.colorBgContainer)},[s,u,d,i,o.colorBgContainer,o.colorBgLayout,o.colorBgSettingsHover,o.colorTemplateBgSettingsHover,o.colorBorderSettingsHover,o.colorInfoBg,o.colorInfoBorder,o.colorPrimaryText,o.colorPrimaryTextActive,o.colorPrimaryTextHover,o.colorSettings,o.colorBgTextHover,o.colorSplit,o.colorText,o.colorTextDescription,o.colorWarningBg,o.colorWarningBorder,o.borderRadiusOuter,o.controlHeightLG,o.marginLG,o.marginSM,o.marginXS,o.paddingContentVerticalSM,o.sizeXXL,o.colorTextHeaderMenu,o.colorBgSider,o.colorBgSiderMenuHover,o.colorBgSiderMenuActive,o.colorTextSiderMenu,o.colorTextSiderMenuHover,o.colorTextSiderMenuActive,o.colorBgHeaderMenuActive]),t};i.displayName="CSSVariableProvider";let s=i},29928(e,t,o){o.d(t,{y:()=>r});var l=o(77583),n=o(99982),a=o(63526);class r{addComponentOption(e){if(!this.componentOptions){var t,o,n,r,i,s;this.componentOptions=[];let e=null==(o=this.default)||null==(t=o.uiSchema)?void 0:t["x-component"],d=null==(r=this.default)||null==(n=r.uiSchema)?void 0:n["x-component-props"];if(e){let t=(null==(s=this.default)||null==(i=s.uiSchema)?void 0:i.type)||"string",o=(0,a.tval)(e.startsWith("Input")?(0,l.capitalize)(t):e.split(".").pop());this.componentOptions=[{label:o,value:e,useProps:()=>d||{}}]}}this.componentOptions.push(e)}getConfigureFormProperties(e){let t=this.hasDefaultValue?this.getDefaultValueProperty():{};this.availableValidationOptions.push("required");let o=null==e?void 0:e.view,a=(null==e?void 0:e.template)==="sql"||(null==e?void 0:e.sql),r=o||a||!this.validationType?{}:{validation:{title:'{{ t("Validation") }}',required:!1,"x-decorator":"FormItem","x-component":"FieldValidation","x-component-props":{type:this.validationType,availableValidationOptions:[...new Set(this.availableValidationOptions)],excludeValidationOptions:[...new Set(this.excludeValidationOptions)],isAssociation:this.isAssociation}}};return{...(0,l.cloneDeep)({...n.defaultProps,...null===this||void 0===this?void 0:this.properties}),...t,...r}}getDefaultValueProperty(){var e,t;return{defaultValue:{...(0,l.cloneDeep)(null===this||void 0===this||null==(e=this.default)?void 0:e.uiSchema),...null===this||void 0===this||null==(t=this.properties)?void 0:t.uiSchema,required:!1,title:'{{ t("Default value") }}',"x-decorator":"FormItem","x-reactions":[{dependencies:["uiSchema.x-component-props.gmt","uiSchema.x-component-props.showTime","uiSchema.x-component-props.dateFormat","uiSchema.x-component-props.timeFormat","uiSchema.x-component-props.picker","uiSchema.x-component-props.format"],fulfill:{state:{componentProps:{gmt:"{{$deps[0]}}",showTime:"{{$deps[1]}}",dateFormat:"{{$deps[2]}}",timeFormat:"{{$deps[3]}}",picker:"{{$deps[4]}}",format:"{{$deps[5]}}"}}}},{dependencies:["uiSchema.x-component-props.picker"],fulfill:{state:{value:null}}},{dependencies:["primaryKey","unique","autoIncrement","defaultToCurrentTime"],when:"{{$deps[0]||$deps[1]||$deps[2]||$deps[3]}}",fulfill:{state:{hidden:!0,value:null}},otherwise:{state:{hidden:!1}}},{dependencies:["uiSchema.enum"],fulfill:{state:{dataSource:"{{$deps[0]}}"}}}]}}}addOperator(e){(0,l.set)(this,"filterable.operators",[...this.filterable.operators||[]]),this.filterable.operators.find(t=>t.value===e.value)||this.filterable.operators.push(e)}constructor(e){this.collectionFieldInterfaceManager=e,this.availableValidationOptions=[]}}},32799(e,t,o){o.d(t,{y:()=>l.y,L:()=>n});var l=o(29928);class n{addFieldInterfaces(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.reduce((e,t)=>{let o=new t(this);return e[o.name]=o,Array.isArray(this.actionList[o.name])&&(this.actionList[o.name].forEach(e=>{o[e.type](e.data)}),this.actionList[o.name]=void 0),e},{});Object.assign(this.collectionFieldInterfaceInstances,t)}addFieldInterfaceComponentOption(e,t){let o=this.getFieldInterface(e);if(!o){this.actionList[e]||(this.actionList[e]=[]),this.actionList[e].push({type:"addComponentOption",data:t});return}o.addComponentOption(t)}addFieldInterfaceOperator(e,t){let o=this.getFieldInterface(e);null==o||o.addOperator(t)}getFieldInterface(e){return this.collectionFieldInterfaceInstances[e]}getFieldInterfaces(e){return Object.values(this.collectionFieldInterfaceInstances).filter(t=>{var o,l;return!e||!t.supportDataSourceType&&!t.notSupportDataSourceType||(t.supportDataSourceType?null==(o=t.supportDataSourceType)?void 0:o.includes(e):t.notSupportDataSourceType?!(null==(l=t.notSupportDataSourceType)?void 0:l.includes(e)):void 0)})}addFieldInterfaceGroups(e){Object.assign(this.collectionFieldGroups,e)}getFieldInterfaceGroups(){return this.collectionFieldGroups}getFieldInterfaceGroup(e){return this.collectionFieldGroups[e]}constructor(e,t,o){this.dataSourceManager=o,this.collectionFieldInterfaceInstances={},this.collectionFieldGroups={},this.actionList={},this.addFieldInterfaces(e),this.addFieldInterfaceGroups(t)}}},42219(e,t,o){o.d(t,{J:()=>g});var l=o(71178),n=o(56920),a=o(2314),r=o(27404),i=o(77583),s=o(51649),d=o(69412),u=o(30644),c=o(80461),p=o(82924),m=o(83508),h=o(59896),x=o(46724);let v=(e,t,o)=>{(0,a.untracked)(()=>{void 0===e[t]&&(e[t]=o)})},_=e=>{var t;let o=(0,p.lum)(),a=(0,n.useField)(),u=(0,n.useFieldSchema)(),{uiSchema:h,defaultValue:_}=(0,x.E1)(),{isAllowToSetDefaultValue:f}=(0,m.eT)(),g=(0,p.xZI)((null==(t=u["x-component-props"])?void 0:t.component)||(null==h?void 0:h["x-component"])||"Input"),b=(0,d.Es)(),y=(0,c.S)(null==h?void 0:h["x-use-component-props"],e);return((0,s.useEffect)(()=>{if(!h)return;let e=o(h);if(v(a,"content",e["x-content"]),v(a,"title",e.title),v(a,"description",e.description),null==b?void 0:b.form){let e=f()?u.default||_:void 0;null!=e&&v(a,"initialValue",e)}!a.validator&&(e["x-validator"]||u["x-validator"])&&(a.validator=(0,i.concat)([],e["x-validator"]||[],u["x-validator"]||[])),!0===u["x-disabled"]&&(a.disabled=!0),!0===u["x-read-pretty"]&&(a.readPretty=!0),void 0===u.required&&(a.required=!!e.required),a.dataSource=e.enum,a.data=a.data||{},a.data.dataSource=null==e?void 0:e.enum;let t=o(e["x-component-props"])||{};a.componentProps=(0,r.merge)(t,a.componentProps||{},y||{})},[h]),h)?(0,l.jsx)(g,{...e,...y}):null},f=e=>{var t;let o=(0,n.useField)(),a=(0,n.useFieldSchema)(),{uiSchema:r}=(0,u.ZC)(),i=(0,p.xZI)((null==(t=a["x-component-props"])?void 0:t.component)||(null==r?void 0:r["x-component"])||"Input"),d=(0,c.S)(null==r?void 0:r["x-use-component-props"],e);if((0,s.useEffect)(()=>{!0!==a["x-read-pretty"]||o.readPretty||(o.readPretty=!0),!0===a["x-disabled"]&&(o.disabled=!0),o.data=o.data||{},o.data.dataSource=null==r?void 0:r.enum},[o,a]),!r)return null;let m={...e,...d};return(0,h.DZ)(m.value)&&m.value===a.default&&(m.value=void 0),(0,l.jsx)(i,{...m})},g=(0,n.connect)(e=>{let t=(0,n.useFieldSchema)(),o=(0,u.IC)();return(0,l.jsx)(x.Ey,{name:t.name,children:o?(0,l.jsx)(f,{...e}):(0,l.jsx)(_,{...e})})});g.displayName="CollectionField"},46724(e,t,o){o.d(t,{E1:()=>c,Ey:()=>d,bJ:()=>u,yn:()=>s});var l=o(71178),n=o(51649),a=o(56920),r=o(40829),i=o(52968);let s=(0,n.createContext)(null);s.displayName="CollectionFieldContext";let d=e=>{let{name:t,children:o,allowNull:d}=e,u=(0,a.useFieldSchema)(),c=(0,r.Ge)(),p=(0,r.r2)(),m=(0,n.useMemo)(()=>{var e;if(!c)return null;let o=null==u||null==(e=u["x-component-props"])?void 0:e.field;return p.getCollectionField(null==u?void 0:u["x-collection-field"])||o||c.getField((null==o?void 0:o.name)||t)},[c,u,p,t]);return!m&&d?(0,l.jsx)(l.Fragment,{children:o}):m?(0,l.jsx)(s.Provider,{value:m,children:o}):(0,l.jsx)(i.x,{type:"Field",name:t})},u=e=>(0,l.jsx)(s.Provider,{value:null,children:e.children}),c=()=>(0,n.useContext)(s)},78813(e,t,o){o.d(t,{o:()=>l});class l{setData(e){this.data=e}setParentRecord(e){this.parentRecord=e}constructor(e){let{data:t,parentRecord:o,isNew:l}=e;this.isNew=l,this.data=t,this.parentRecord=o}}},35432(e,t,o){o.d(t,{Jw:()=>i,PD:()=>s,Vm:()=>u,tH:()=>r,vt:()=>c,zv:()=>d});var l=o(71178),n=o(51649),a=o(78813);let r=(0,n.createContext)(null);r.displayName="CollectionRecordContext";let i=n.default.memo(e=>{let{isNew:t,record:o,parentRecord:i,children:s}=e,d=(0,n.useMemo)(()=>i?i instanceof a.o?i:new a.o({data:i}):o instanceof a.o?o.parentRecord:void 0,[i,o]),u=(0,n.useMemo)(()=>{let e;return o?o instanceof a.o?(e=o).isNew=o.isNew||t:e=new a.o({data:o,isNew:t}):e=new a.o({isNew:t}),e.setParentRecord(d),e},[o,d,t]);return(0,l.jsx)(r.Provider,{value:u,children:s})});function s(){return(0,n.useContext)(r)}function d(){let e=s();return null==e?void 0:e.data}function u(){let e=s();return null==e?void 0:e.parentRecord}function c(){var e;let t=s();return null==t||null==(e=t.parentRecord)?void 0:e.data}i.displayName="CollectionRecordProvider"},66110(e,t,o){o.d(t,{Jw:()=>n.Jw,PD:()=>n.PD,Vm:()=>n.Vm,ol:()=>l.o,tH:()=>n.tH,vt:()=>n.vt,zv:()=>n.zv});var l=o(78813),n=o(35432)},14469(e,t,o){o.d(t,{$:()=>i,_:()=>r});var l=o(2314),n=o(77583);let a="__isNewRecord__",r=e=>(0,l.untracked)(()=>!!(null==e?void 0:e[a])),i=e=>{if(!(0,n.isObject)(e))throw Error("markRecordAsNew: record must be an object");return e[a]=!0,e}},83339(e,t,o){o.d(t,{T:()=>l});class l{constructor(e){this.collectionTemplateManager=e}}},86960(e,t,o){o.d(t,{C:()=>l});class l{addCollectionTemplates(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.reduce((e,t)=>{let o=new t(this);return e[o.name]=o,e},{});return Object.assign(this.collectionTemplateInstances,t),this.dataSourceManager.getDataSources().forEach(e=>{let o=e.collectionManager.getCollections(e=>t[e.template]);e.collectionManager.reAddCollections(o)}),t}getCollectionTemplate(e){return this.collectionTemplateInstances[e]}getCollectionTemplates(e){return Object.values(this.collectionTemplateInstances).filter(t=>{var o,l;return!e||!t.supportDataSourceType&&!t.notSupportDataSourceType||(t.supportDataSourceType?null==(o=t.supportDataSourceType)?void 0:o.includes(e):t.notSupportDataSourceType?!(null==(l=t.notSupportDataSourceType)?void 0:l.includes(e)):void 0)}).sort((e,t)=>(e.order||0)-(t.order||0))}constructor(e,t){this.dataSourceManager=t,this.collectionTemplateInstances={},this.addCollectionTemplates(e)}}},94138(e,t,o){o.d(t,{$z:()=>p,KY:()=>c,UJ:()=>m});var l=o(71178),n=o(51649),a=o(46724),r=o(52968),i=o(26174),s=o(49621);let d=(0,n.createContext)(null);d.displayName="ParentCollectionContext";let u=e=>{let t=(0,s.Ge)();return(0,l.jsx)(d.Provider,{value:t,children:e.children})},c=()=>(0,n.useContext)(d),p=e=>{let{name:t,children:o}=e,n=(0,i.r2)().getCollectionName(t);return n?(0,l.jsx)(s.Yz,{name:String(t).split(".")[0],children:(0,l.jsx)(u,{children:(0,l.jsx)(a.Ey,{name:t,children:(0,l.jsx)(s.Yz,{name:n,children:o})})})}):(0,l.jsx)(r.x,{type:"Collection",name:t})},m=()=>{let e=(0,a.E1)();return(null==e?void 0:e.target)?`${e.collectionName}.${e.name}`:null}},21086(e,t,o){o.d(t,{p:()=>n});var l=o(77583);class n{get fields(){return this.options.fields||[]}get app(){return this.collectionManager.app}get dataSource(){return this.options.dataSource}get sourceKey(){return this.options.sourceKey}get name(){return this.options.name}get key(){return this.options.key}get title(){return this.options.title}get inherit(){return this.options.inherit}get hidden(){return this.options.hidden}get description(){return this.options.description}get duplicator(){return this.options.duplicator}get category(){return this.options.category}get targetKey(){return this.options.targetKey}get model(){return this.options.model}get createdBy(){return this.options.createdBy}get updatedBy(){return this.options.updatedBy}get logging(){return this.options.logging}get from(){return this.options.from}get rawTitle(){return this.options.rawTitle}getPrimaryKey(){if(this.primaryKey)return this.primaryKey;if(this.options.targetKey)return this.options.targetKey;let e=this.getFields({primaryKey:!0})[0];return this.primaryKey=null==e?void 0:e.name,this.primaryKey}getFilterTargetKey(){return this.filterTargetKey||this.getPrimaryKey()||"id"}get inherits(){return this.options.inherits||[]}get titleField(){return this.hasField(this.options.titleField)?this.options.titleField:this.getPrimaryKey()}get sources(){return this.options.sources||[]}get template(){return this.options.template}get tableName(){return this.options.tableName}get viewName(){return this.options.viewName}get writableView(){return this.options.writableView}get filterTargetKey(){return this.options.filterTargetKey}get sortable(){return this.options.sortable}get autoGenId(){return this.options.autoGenId}get magicAttribute(){return this.options.magicAttribute}get tree(){return this.options.tree}get isThrough(){return this.options.isThrough}get autoCreate(){return this.options.autoCreate}get resource(){return this.options.resource}setOption(e,t){return this.options[e]=t,this}getOptions(){return this.options}getOption(e){return this.options[e]}getFields(e){return e?(0,l.filter)(this.fields,e):this.fields}getAllFields(e){return this.getFields(e)}getFieldsMap(){return this.fieldsMap||(this.fieldsMap=this.getFields().reduce((e,t)=>(e[t.name]=t,e),{})),this.fieldsMap}getFieldByAssociationName(e){let t=this.getFieldsMap(),[o,...l]=String(e).split("."),n=t[o];if(!n)return;let a=null==n?void 0:n.target;if(!a)return;let r=this.collectionManager.getCollection(a);if(r)return r.getField(l.join("."))}getField(e){if(!e)return;let t=this.getFieldsMap();if(String(e).split(".").length>1){let t=this.getFieldByAssociationName(e);return t||("string"==typeof e&&e.startsWith(`${this.name}.`)?(e=e.replace(`${this.name}.`,""),this.getField(e)):void 0)}return t[e]}hasField(e){return!!this.getField(e)}isTitleField(e){var t;return null==(t=this.app.dataSourceManager.collectionFieldInterfaceManager.getFieldInterface(e.interface))?void 0:t.titleUsable}isInherited(){return this.inherits.length>0}constructor(e,t){this.options=e,this.collectionManager=t}}},26174(e,t,o){o.d(t,{Jr:()=>i,Pf:()=>d,Xd:()=>c,r2:()=>u});var l=o(71178),n=o(51649),a=o(23460),r=o(17544);let i=(0,n.createContext)(null);i.displayName="CollectionManagerContext";let s=e=>{let{instance:t,children:o}=e,s=(0,a.xw)(),d=(0,r.h_)(),u=(0,n.useMemo)(()=>t||(null==s?void 0:s.collectionManager),[t,s]),[c,p]=n.default.useState(Math.random());(0,n.useEffect)(()=>{u.dataSource.addReloadCallback(()=>{p(Math.random())})},[u]);let m=(0,n.useMemo)(()=>(null==d?void 0:d.length)?u.clone(d):u,[u,d,c]);return(0,l.jsx)(i.Provider,{value:m,children:o})},d=e=>{let{instance:t,dataSource:o,children:n}=e;return(0,l.jsx)(a.tc,{dataSource:o,children:(0,l.jsx)(s,{instance:t,children:n})})};function u(){return(0,n.useContext)(i)}let c=e=>{let t=u();return(0,n.useMemo)(()=>t.getCollections(e),[t,e])}},49621(e,t,o){o.d(t,{$h:()=>p,CQ:()=>s,Ge:()=>c,N5:()=>u,Yz:()=>d});var l=o(71178),n=o(51649),a=o(46724),r=o(52968),i=o(26174);let s=(0,n.createContext)(null);s.displayName="CollectionContext";let d=e=>{let{name:t,children:o,allowNull:a}=e,d=(0,i.r2)(),u=(0,n.useMemo)(()=>null==d?void 0:d.getCollection(t),[d,t]);return!u&&a?(0,l.jsx)(l.Fragment,{children:e.children}):u||a?(0,l.jsx)(s.Provider,{value:u,children:o}):(0,l.jsx)(r.x,{type:"Collection",name:t})},u=e=>(0,l.jsx)(a.yn.Provider,{value:null,children:(0,l.jsx)(d,{...e})});function c(){return(0,n.useContext)(s)}let p=e=>{let t=c();return(0,n.useMemo)(()=>t.getFields(e),[t,e])}},17544(e,t,o){o.d(t,{Jl:()=>s,h_:()=>d,pi:()=>i});var l=o(71178),n=o(51649),a=o(23460),r=o(26174);let i=(0,n.createContext)(null);i.displayName="ExtendCollectionsContext";let s=e=>{let{children:t,collections:o}=e,s=d(),u=(0,n.useMemo)(()=>s?[...s,...o]:o,[s,o]),c=(0,a.Mp)();return(0,l.jsx)(i.Provider,{value:u,children:(0,l.jsx)(r.Pf,{dataSource:c,children:t})})};function d(){return(0,n.useContext)(i)}},40829(e,t,o){o.d(t,{pM:()=>l.p,r2:()=>u.r2,Jr:()=>u.Jr,Pf:()=>u.Pf,$z:()=>a.$z,UJ:()=>a.UJ,h_:()=>c.h_,pi:()=>c.pi,Jl:()=>c.Jl,qG:()=>d,KY:()=>a.KY,N5:()=>n.N5,Yz:()=>n.Yz,Xd:()=>u.Xd,$h:()=>n.$h,CQ:()=>n.CQ,Ge:()=>n.Ge});var l=o(21086),n=o(49621),a=o(94138),r=o(42966),i=o(7271);let s=(e,t)=>{let{rawTitle:o,title:l,fields:n=[],...a}=e,r=(o,l)=>{var n,a;if(e.disableTranslation)return o;if(null==(n=t.context)?void 0:n.t)return t.context.t(o,l);let r=t.i18n||(null==(a=t.getOptions)?void 0:a.call(t).i18n)||i.Ru;return(null==r?void 0:r.t)?r.t(o,l):o};return{...a,title:o?l:r(l,{ns:"lm-collections"}),rawTitle:o||l,fields:null==n?void 0:n.map(e=>{let{uiSchema:t,...o}=e;if(null==t?void 0:t.title){let e=t.title;t.title=t.rawTitle?e:r(e,{ns:"lm-collections"}),t.rawTitle=t.rawTitle||e}return Array.isArray(null==t?void 0:t.enum)&&(t.enum=t.enum.map(e=>({...e,value:(null==e?void 0:e.value)===void 0?e:e.value,label:e.rawLabel?e.label:r(e.label,{ns:"lm-collections"}),rawLabel:e.rawLabel||e.label}))),{uiSchema:t,...o}})}};class d{get dataSourceManager(){return this.dataSource.dataSourceManager}get app(){return this.dataSourceManager.app}getCollectionInstance(e){var t,o;let n,a=this.dataSource.dataSourceManager.collectionTemplateManager.getCollectionTemplate(e.template),r=(null==a?void 0:a.Collection)||l.p,i=null==a?void 0:a.transform,d={...i?i(s(e,this.app),this.app):s(e,this.dataSource.dataSourceManager.app),dataSource:this.dataSource.key};return t=this.dataSourceManager.collectionMixins,o=this,n=new r(d,o),t.forEach(e=>{let t=new e(d,o);Object.getOwnPropertyNames(t).forEach(e=>{let o=Object.getOwnPropertyDescriptor(t,e);o?Object.defineProperty(n,e,o):n[e]=t[e]}),Object.getOwnPropertyNames(e.prototype).forEach(t=>{"constructor"!==t&&(n.__proto__[t]=e.prototype[t])})}),n}getInstancesMap(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>this.getCollectionInstance(e)).reduce((e,t)=>(e[t.name]=t,e),{})}addCollections(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.getInstancesMap(e);this.collectionInstancesMap={...this.collectionInstancesMap,...t},this.collectionInstancesArr=Object.values(this.collectionInstancesMap)}setCollections(e){this.collectionInstancesMap=this.getInstancesMap(e),this.collectionInstancesArr=Object.values(this.collectionInstancesMap)}reAddCollections(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.collectionInstancesArr,t=e.map(e=>e.getOptions());this.addCollections(t)}getCollection(e){if(e){if("object"==typeof e)return e.disableTranslation=!0,this.getCollectionInstance(e);if(String(e).split(".").length>1){let t=this.getCollectionField(e);if(!t)return;return this.getCollection(t.target)}return this.collectionInstancesMap[e]}}getCollections(e){return e?this.collectionInstancesArr.filter(e):this.collectionInstancesArr}getCollectionName(e){let t=this.getCollection(e);return null==t?void 0:t.name}getCollectionField(e){if(!e)return;if("object"==typeof e)return e;if(String(e).split(".").length<2)return void console.error(`[@nocobase/client]: CollectionManager.getField() path "${e}" is invalid`);let[t,...o]=String(e).split("."),l=this.getCollection(t);if(l)return l.getField(o.join("."))}getCollectionFields(e,t){var o;return(null==(o=this.getCollection(e))?void 0:o.getFields(t))||[]}getCollectionAllFields(e,t){var o;return(null==(o=this.getCollection(e))?void 0:o.getAllFields(t))||[]}getFilterByTK(e,t){if(!e||!t)return void console.error("@nocobase/client]: CollectionManager.getFilterByTK() collectionOrAssociation or collectionRecordOrAssociationRecord is invalid");let o=(e,t)=>{if(!Array.isArray(e))return t[e];{let o={};return e.forEach(e=>{o[e]=t[e]}),r.default.stringify(o)}};if(e instanceof l.p)return o(e.getFilterTargetKey(),t);if(e.includes(".")){let l=this.getCollectionField(e);if(!l)return void console.error(`[@nocobase/client]: CollectionManager.getFilterByTK() field "${e}" is invalid`);let n=this.getCollection(l.target);if(n)return o(n.getFilterTargetKey(),t);if(l.targetKey)return t[l.targetKey]}let n=this.getCollection(e);return n?o(n.getFilterTargetKey(),t):void console.error(`[@nocobase/client]: CollectionManager.getFilterByTK() collection "${e}" is invalid`)}getSourceKeyByAssociation(e){if(!e)return;let t=this.getCollectionField(e);if(!t)return;if(t.sourceKey)return t.sourceKey;let o=this.getCollection(e.split(".")[0]);if(o)return o.filterTargetKey||o.getPrimaryKey()||"id"}clone(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new d([],this.dataSource);return t.collectionInstancesArr=this.collectionInstancesArr,t.collectionInstancesMap=this.collectionInstancesMap,t.addCollections(e),t}constructor(e,t){this.dataSource=t,this.collectionInstancesMap={},this.collectionInstancesArr=[],this.addCollections(e)}}var u=o(26174),c=o(17544)},92719(e,t,o){o.d(t,{I:()=>c});var l=o(56920),n=o(77583),a=o(77843),r=o(14669),i=o(46724),s=o(32221),d=o(61013),u=o(95951);let c={name:"fieldComponent",type:"select",useVisible(){let e=(0,i.E1)(),t=(0,r.m6)();if(!e)return!1;let o=t.collectionFieldInterfaceManager.getFieldInterface(null==e?void 0:e.interface);return Array.isArray(null==o?void 0:o.componentOptions)&&o.componentOptions.length>1&&o.componentOptions.filter(e=>!e.useVisible||e.useVisible()).length>1},useComponentProps(){var e,t,o,c;let{t:p}=(0,a.useTranslation)(),m=(0,l.useField)(),h=(0,l.useFieldSchema)(),x=(0,i.E1)(),v=(0,r.m6)().collectionFieldInterfaceManager.getFieldInterface(null==x?void 0:x.interface),{fieldSchema:_}=(0,s.BC)(),f=_||h,{dn:g}=(0,u.er)(),b=(0,d.l)(),y=(null==v||null==(t=v.componentOptions)||null==(e=t.filter(e=>!e.useVisible||e.useVisible()))?void 0:e.map(e=>({label:b(e.label),value:e.value,useProps:e.useProps})))||[];return{title:p("Field component"),options:y,value:(null==(o=f["x-component-props"])?void 0:o.component)||(null==(c=y[0])?void 0:c.value),onChange(e){var t;let o=y.find(t=>t.value===e),l={component:e,...(null==o||null==(t=o.useProps)?void 0:t.call(o))||{},...e===x.uiSchema["x-component"]?x.uiSchema["x-component-props"]:{}};n.default.set(f,"x-component-props",l),m.componentProps=l,g.emit("patch",{schema:{"x-uid":f["x-uid"],"x-component-props":l}})}}}}},52968(e,t,o){o.d(t,{b:()=>v,x:()=>h});var l=o(71178),n=o(52793),a=o(51649),r=o(77843),i=o(82924),s=o(23460),d=o(2490),u=o(67574),c=o(40829),p=o(71226);let{Text:m}=n.Typography,h=e=>{let{type:t,name:o,message:h}=e,{designable:x,dn:v}=(0,i.erX)(),{modal:_}=n.App.useApp(),{t:f}=(0,r.useTranslation)(),g=(0,s.xw)(),b=(0,i.lum)(),y=(0,c.Ge)(),S=(0,d.m6)(),k=(0,a.useMemo)(()=>{if("Data Source"===t)return o;let e=(null==S?void 0:S.getDataSources().length)>=1&&g&&g.key!==u.Ze?`${b(g.displayName||g.key)} > `:"";if("Collection"===t)return`${e}${o}`;let l=y?`${b(y.title)||y.name||y.tableName} > `:"";return`${e}${l}${o}`},[]),C=(0,a.useMemo)(()=>"Field"===t?"Field":"Block",[t]),M=(0,a.useMemo)(()=>o?h?`${f(t)} "${k}" ${h}`:f('The {{type}} "{{name}}" may have been deleted. Please remove this {{blockType}}.',{type:f(t).toLocaleLowerCase(),name:k,blockType:f(C).toLocaleLowerCase()}).replaceAll("&gt;",">"):`${f(t)} name is required`,[h,k,t,f,C]);return x?"Field"===t?(0,l.jsx)(i.R_2,{ellipsis:!0,children:(0,l.jsx)(m,{type:"secondary",children:M})}):(0,l.jsx)(p.t,{children:(0,l.jsx)(n.Result,{status:"404",subTitle:M,extra:(0,l.jsx)(n.Button,{onClick:()=>_.confirm({title:f("Delete block"),content:f("Are you sure you want to delete it?"),...confirm,onOk(){v.remove(null,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}),v.refresh({refreshParentSchema:!0})}}),children:f("Delete")},"Delete")})}):null},x=()=>{let{t:e}=(0,r.useTranslation)(),t=(0,s.xw)(),o=(0,i.lum)(),m=(0,c.Ge)(),h=(0,d.m6)(),x=(0,a.useMemo)(()=>{let e=(null==h?void 0:h.getDataSources().length)>=1&&t&&t.key!==u.Ze?`${o(t.displayName||t.key)} > `:"";if(m)return`${e}${m.name}`;let l=m?`${o(m.title)||m.name||m.tableName} > `:"";return`${e}${l}${m.name}`},[]),v=(0,a.useMemo)(()=>e('The current user only has the UI configuration permission, but don\'t have view permission for collection "{{name}}"',{name:x}).replaceAll("&gt;",">"),[x,e]);return(0,l.jsx)(p.t,{children:(0,l.jsx)(n.Result,{status:"404",subTitle:v})})},v=()=>{let{designable:e}=(0,i.erX)();return e?(0,l.jsx)(x,{}):null}},62248(e,t,o){o.d(t,{N:()=>r});var l=o(71178);o(51649);var n=o(14669),a=o(26174);let r=e=>{let{children:t,dataSourceManager:o,...r}=e;return(0,l.jsx)(n.e1,{dataSourceManager:o,children:(0,l.jsx)(a.Pf,{...r,children:t})})}},32444(e,t,o){o.d(t,{$$:()=>b,Kx:()=>S,Qj:()=>_,R6:()=>x,T4:()=>g,h6:()=>y,uG:()=>f});var l=o(71178),n=o(51649),a=o(42536),r=o(11482),i=o(80461),s=o(95951),d=o(40829),u=o(14187),c=o(46776),p=o(38892),m=o(76460),h=o(56920);let x=(0,n.createContext)({});x.displayName="DataBlockContext";let v=(0,n.createContext)(null),_=e=>{let{children:t}=e,[o,a]=n.default.useState(!1),r=(0,n.useMemo)(()=>({rerenderDataBlock:()=>{a(!0),setTimeout(()=>{a(!1)})}}),[]);return o?null:(0,l.jsx)(v.Provider,{value:r,children:t})},f=e=>{let{collection:t,association:o,allowNull:a=!1}=e,r=(0,n.useMemo)(()=>o?{Component:d.$z,name:o}:{Component:d.N5,name:t},[t,o]);return(0,l.jsx)(r.Component,{name:r.name,allowNull:a,children:e.children})},g=(0,i.T)(n.default.memo(e=>{let{collection:t,association:o,dataSource:n,children:i,hidden:v,...g}=e,{dn:b}=(0,s.er)(),y=(0,h.useFieldSchema)();return v?null:(0,l.jsx)(m.j0,{scopeId:null==y?void 0:y["x-uid"],type:"dataBlock",children:(0,l.jsx)(x.Provider,{value:{dn:b,props:{...g,collection:t,association:o,dataSource:n}},children:(0,l.jsx)(d.Pf,{dataSource:n,children:(0,l.jsx)(f,{collection:t,association:o,children:(0,l.jsx)(a.yb,{children:(0,l.jsx)(p._,{children:(0,l.jsx)(c.Fr,{children:(0,l.jsx)(u.Yu,{children:(0,l.jsx)(r.Pt,{params:e.params,children:(0,l.jsx)(_,{children:i})})})})})})})})})})}),{displayName:"DataBlockProvider"}),b=()=>{let e=(0,n.useContext)(x);if(!e)throw Error("useDataBlock() must be used within a DataBlockProvider");return e},y=()=>b().props,S=()=>{let e=(0,n.useContext)(v);if(!e)throw Error("useRerenderDataBlock() must be used within a DataBlockProvider");return e}},14187(e,t,o){o.d(t,{$G:()=>b,NB:()=>y,OO:()=>f,YE:()=>M,Yu:()=>S,ZK:()=>C,_J:()=>k});var l=o(71178),n=o(51649),a=o(77583),r=o(16211),i=o(41897),s=o(70136),d=o(43873),u=o(67242),c=o(79647),p=o(67285),m=o(66110),h=o(29558),x=o(32444),v=o(46776);let _=(0,n.createContext)(null);_.displayName="BlockRequestRefContext";let f=(0,n.createContext)(!1);f.displayName="BlockRequestLoadingContext";let g=(0,n.createContext)(null);async function b(e){let{sourceId:t,association:o,parentRecord:l,api:n,headers:a,sourceKey:r}=e;if(l)return Promise.resolve({data:l});if(!o||!r||!t)return Promise.resolve({data:void 0});let i=o.split("."),s=`${i[0]}:get?filter[${r}]=${t}`;return(await n.request({url:s,headers:a})).data}g.displayName="BlockRequestDataContext";let y=e=>{var t,o,r,s,d,u;let p=(0,n.useRef)(e.recordRequest),m=(0,n.useRef)(null==(t=e.recordRequest)?void 0:t.data),{active:h}=(0,c.Y)(),v=(0,i.$Q)(),b=(0,n.useRef)(h),y=(0,n.useRef)(v),S=(0,n.useDeferredValue)(h),k=(0,x.h6)(),C=b.current;return S&&!C&&y.current===v&&(a.default.isNil(k.dataLoadingMode)||"auto"===k.dataLoadingMode)&&(null==(d=e.recordRequest)||d.refresh()),!S||!C||(null==(o=e.recordRequest)?void 0:o.loading)||a.default.isEqual(m.current,null==(r=e.recordRequest)?void 0:r.data)||(m.current=null==(u=e.recordRequest)?void 0:u.data),h&&C&&(y.current=v),S!==C&&(b.current=S),p.current=e.recordRequest,(0,l.jsx)(_.Provider,{value:p,children:(0,l.jsx)(f.Provider,{value:null==(s=e.recordRequest)?void 0:s.loading,children:(0,l.jsx)(g.Provider,{value:m.current,children:e.children})})})},S=n.default.memo(e=>{var t,o;let{children:i}=e,{action:c,filterByTk:_,sourceId:f,params:g=p.M,association:S,collection:k,record:C,parentRecord:M,requestOptions:w,requestService:F}=(0,x.h6)(),P=function(e){let t=(0,d.fY)(),o=(0,v.jz)(),{action:l,params:i={},record:c,requestService:p,requestOptions:m,sourceId:_,association:f,parentRecord:g}=e,y=(0,r.VB)(),S=(0,x.h6)(),k=(0,h.TF)(S.dataSource),C=(0,u.i)(f),[M,w]=(0,n.useMemo)(()=>[JSON.stringify(i),JSON.stringify(c)],[i,c]),{isBlockTemplate:F,templateFinished:P}=(0,s.y)(),j=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(null==F?void 0:F())&&!P?null:(p||(e=>{var t;if(c)return Promise.resolve({data:c});if(!l)throw Error("[nocobase]: The 'action' parameter is missing in the 'DataBlockRequestProvider' component");if("get"===l&&a.default.isNil(i.filterByTk))return console.warn('[nocobase]: The "filterByTk" parameter is missing in the "DataBlockRequestProvider" component');let n={...void 0===i.filterByTk?a.default.omit(i,"filterByTk"):i,...e};return null==(t=o[l])?void 0:t.call(o,n).then(e=>e.data)}))(...t)},A=async function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];let[l,n]=await Promise.all([j(...t),b({sourceId:_,association:f,parentRecord:g,api:y,headers:k,sourceKey:C})]);return l&&(l.parentRecord=null==n?void 0:n.data),l},I=(0,r.bP)(A,{...m,manual:"manual"===t,ready:!!l,refreshDeps:[l,M,w,o,f,g,_,P]});return I._defaultParams=i,I}({action:c,sourceId:f,record:C,association:S,collection:k,requestOptions:w,requestService:F,params:(0,n.useMemo)(()=>({...g,filterByTk:_||g.filterByTk}),[_,g]),parentRecord:M}),j=null==(t=P.data)?void 0:t.parentRecord,A=(0,n.useMemo)(()=>j&&new m.ol({isNew:!1,data:j instanceof m.ol?j.data:j}),[j]);return(0,l.jsx)(y,{recordRequest:P,children:"list"!==c?(0,l.jsx)(m.Jw,{isNew:null==c,record:(null==(o=P.data)?void 0:o.data)||C,parentRecord:A||M,children:i}):(0,l.jsx)(m.Jw,{isNew:!1,record:null,parentRecord:A||M,children:i})})});S.displayName="DataBlockRequestProvider";let k=()=>{let e=(0,n.useContext)(_),t=(0,n.useContext)(f),o=(0,n.useContext)(g);return(0,n.useMemo)(()=>e?{...e.current,loading:t,data:o}:null,[e,o,t])},C=()=>{let e=(0,n.useContext)(_);return(0,n.useMemo)(()=>({getDataBlockRequest:()=>e?e.current:null}),[e])},M=()=>(0,n.useContext)(g)},46776(e,t,o){o.d(t,{Fr:()=>p,RE:()=>c,jz:()=>m});var l=o(71178),n=o(77583),a=o(51649),r=o(16211),i=o(40829),s=o(66110),d=o(29558),u=o(32444);let c=(0,a.createContext)(null);c.displayName="DataBlockResourceContext";let p=e=>{let{children:t}=e,o=(0,u.h6)(),p=(0,i.r2)(),{association:m,collection:h,dataSource:x,sourceId:v,parentRecord:_}=o,f=(0,r.VB)(),g=(0,d.TF)(x),b=(0,a.useMemo)(()=>"string"==typeof h?h:null==h?void 0:h.name,[h]),y=(0,a.useMemo)(()=>{if(v)return v;if(m&&_){let e=p.getSourceKeyByAssociation(m),t=_ instanceof s.ol?_.data:_;if(!(0,n.isArray)(e))return t[e];{let o={};for(let l of e)o[l]=null==t?void 0:t[l];return encodeURIComponent(JSON.stringify(o))}}},[m,v,_]),S=(0,a.useMemo)(()=>m?f.resource(m,y,g,!y):f.resource(b,void 0,g),[f,m,h,y,g]);return(0,l.jsx)(c.Provider,{value:S,children:t})};function m(){let e=(0,a.useContext)(c);if(!e)throw Error("useDataBlockResource() must be used within a DataBlockResourceProvider");return e}},593(e,t,o){o.d(t,{h:()=>a,q:()=>n});var l=o(40829);class n{get app(){return this.dataSourceManager.app}get key(){return this.options.key}get displayName(){return this.options.displayName}get status(){return this.options.status}get errorMessage(){return this.options.errorMessage}get collections(){return this.collectionManager.getCollections()||[]}getOptions(){return this.options}setOptions(e){Object.assign(this.options,e)}getOption(e){return this.options[e]}addReloadCallback(e){this.reloadCallbacks.includes(e)||this.reloadCallbacks.push(e)}removeReloadCallback(e){this.reloadCallbacks=this.reloadCallbacks.filter(t=>t!==e)}get flowEngineDataSourceManager(){var e;return null==(e=this.app.flowEngine)?void 0:e.context.dataSourceManager}async reload(){let e=await this.getDataSource(),t=this.flowEngineDataSourceManager;return t&&(t.upsertDataSource(this.options),t.getDataSource(this.key).upsertCollections(e.collections||[],{clearFields:!0})),this.setOptions(e),this.collectionManager.setCollections(e.collections||[]),this.reloadCallbacks.forEach(t=>t(e.collections)),this.options}constructor(e,t){this.options=e,this.dataSourceManager=t,this.reloadCallbacks=[],this.collectionManager=new l.qG(e.collections,this)}}class a extends n{getDataSource(){return{collections:this.collections}}}},67574(e,t,o){o.d(t,{Ze:()=>i,gP:()=>s,zA:()=>d});var l=o(593),n=o(86960),a=o(32799),r=o(77583);let i="main",s='{{t("Main")}}';class d{addCollectionMixins(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.filter(e=>!this.collectionMixins.includes(e));t.length&&(this.collectionMixins.push(...t),this.getDataSources().forEach(e=>e.collectionManager.reAddCollections()))}getDataSources(e){let t=Object.values(this.dataSourceInstancesMap);return e?r.default.filter(t,e):t}setDataSources(e){let t=r.default.keyBy(e,"key");Object.keys(this.dataSourceInstancesMap).forEach(e=>{let o=t[e];o&&this.dataSourceInstancesMap[e].setOptions({displayName:o.displayName,status:o.status})})}getDataSource(e){return e?this.dataSourceInstancesMap[e]:this.dataSourceInstancesMap[i]}removeDataSources(e){e.forEach(e=>{delete this.dataSourceInstancesMap[e]})}addDataSource(e,t){let o=new e(t,this);return this.dataSourceInstancesMap[o.key]=o,o}async addDataSources(e,t){this.multiDataSources.some(o=>{let[l,n]=o;return l===e&&n===t})||this.multiDataSources.push([e,t])}getAllCollections(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{filterCollection:t,filterDataSource:o}=e;return this.getDataSources(o).reduce((e,o)=>(e.push({...o.getOptions(),collections:o.collectionManager.getCollections(t)}),e),[])}addFieldInterfaceGroups(e){this.collectionFieldInterfaceManager.addFieldInterfaceGroups(e)}addCollectionTemplates(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.collectionTemplateManager.addCollectionTemplates(e)}addFieldInterfaces(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.collectionFieldInterfaceManager.addFieldInterfaces(e)}async reload(){return await Promise.all(this.multiDataSources.map(async e=>{let[t,o]=e;(await t()).map(e=>this.addDataSource(o,e))})),Promise.all(this.getDataSources().map(e=>e.reload()))}constructor(e={},t){this.options=e,this.app=t,this.dataSourceInstancesMap={},this.multiDataSources=[],this.collectionMixins=[],this.collectionTemplateManager=new n.C(e.collectionTemplates,this),this.collectionFieldInterfaceManager=new a.L(e.fieldInterfaces,e.fieldInterfaceGroups,this),this.collectionMixins.push(...e.collectionMixins||[]),this.addDataSource(l.h,{key:i,displayName:s,collections:e.collections||[],status:"loaded"}),(e.dataSources||[]).forEach(e=>{this.addDataSource(l.h,e)})}}},14669(e,t,o){o.d(t,{LQ:()=>s,e1:()=>r,m6:()=>i,oc:()=>a});var l=o(71178),n=o(51649);let a=(0,n.createContext)(null);a.displayName="DataSourceManagerContext";let r=e=>{let{children:t,dataSourceManager:o}=e;return(0,l.jsx)(a.Provider,{value:o,children:t})};function i(){return(0,n.useContext)(a)}function s(){let e=i();return{getAllCollectionsInheritChain:(0,n.useCallback)((t,o)=>{var l,n,a;return null==e||null==(a=e.getDataSource(o))||null==(n=a.collectionManager)||null==(l=n.getCollection(t))?void 0:l.getInheritChain()},[e])}}},23460(e,t,o){o.d(t,{Mp:()=>h,Vl:()=>c,tc:()=>p,xw:()=>m});var l=o(71178),n=o(51649),a=o(14669),r=o(52968),i=o(82924),s=o(52793),d=o(82113),u=o(77843);let c=(0,n.createContext)(null);c.displayName="DataSourceContext";let p=e=>{let{children:t,dataSource:o}=e,p=(0,a.m6)(),{t:m}=(0,u.useTranslation)(),{refresh:h}=(0,i.Fag)(),[x,v]=n.default.useState(0),_=null==p?void 0:p.getDataSource(o);return _?"loading-failed"===_.status?(0,l.jsx)(r.x,{type:"Data Source",name:_.displayName||o,message:_.errorMessage||"loading failed"}):"loading"===_.status||"reloading"===_.status?(0,l.jsx)(i.oVU,{children:(0,l.jsx)(s.Result,{icon:(0,l.jsx)(d.LoadingOutlined,{}),title:`${_.displayName||o} ${m("data source")} ${m("loading")}...`,extra:(0,l.jsx)(s.Button,{type:"primary",onClick:()=>_.reload().then(()=>{h(),v(Math.random())}),children:m("Refresh")})})}):(0,l.jsx)(c.Provider,{value:_,children:t}):(0,l.jsx)(r.x,{type:"Data Source",name:o})};function m(){return(0,n.useContext)(c)}function h(){let e=(0,n.useContext)(c);return null==e?void 0:e.key}},2490(e,t,o){o.d(t,{LQ:()=>r.LQ,Mp:()=>a.Mp,Vl:()=>a.Vl,Ze:()=>n.Ze,e1:()=>r.e1,gP:()=>n.gP,h0:()=>l.h,m6:()=>r.m6,oc:()=>r.oc,qS:()=>l.q,tc:()=>a.tc,xw:()=>a.xw,zA:()=>n.zA});var l=o(593),n=o(67574),a=o(23460),r=o(14669)},28227(e,t,o){o.d(t,{pM:()=>l.pM,I1:()=>N.I,qS:()=>h.qS,tH:()=>x.tH,$z:()=>l.$z,bC:()=>B,Pf:()=>l.Pf,T0:()=>i.T,SG:()=>L,UJ:()=>l.UJ,yz:()=>r.y,Ey:()=>a.Ey,C1:()=>s.C,R6:()=>m.R6,$G:()=>p.$G,Vm:()=>x.Vm,h6:()=>m.h6,YE:()=>p.YE,ZK:()=>p.ZK,tc:()=>h.tc,Qj:()=>m.Qj,bJ:()=>a.bJ,NB:()=>p.NB,_J:()=>p._J,Fr:()=>c.Fr,jz:()=>c.jz,LQ:()=>h.LQ,Ln:()=>r.L,N5:()=>l.N5,OO:()=>p.OO,$$:()=>m.$$,h0:()=>h.h0,xw:()=>h.xw,vt:()=>x.vt,JL:()=>n.J,b:()=>d.b,gP:()=>h.gP,Dk:()=>Y,r2:()=>l.r2,CQ:()=>l.CQ,Nd:()=>u.N,Jr:()=>l.Jr,h_:()=>l.h_,Kx:()=>m.Kx,oc:()=>h.oc,pi:()=>l.pi,Mp:()=>h.Mp,ol:()=>x.ol,qG:()=>l.qG,zv:()=>x.zv,KY:()=>l.KY,Yu:()=>p.Yu,Vl:()=>h.Vl,ji:()=>v.ji,Jy:()=>T,yn:()=>a.yn,Xd:()=>l.Xd,m6:()=>h.m6,E1:()=>a.E1,Ge:()=>l.Ge,PD:()=>x.PD,Jw:()=>x.Jw,Ze:()=>h.Ze,zA:()=>h.zA,Jl:()=>l.Jl,T4:()=>m.T4,RE:()=>c.RE,kb:()=>v.kb,xd:()=>d.x,uG:()=>m.uG,Yz:()=>l.Yz,e1:()=>h.e1,TF:()=>v.TF,$h:()=>l.$h});var l=o(40829),n=o(42219),a=o(46724),r=o(32799),i=o(83339),s=o(86960),d=o(52968),u=o(62248),c=o(46776),p=o(14187),m=o(32444),h=o(2490),x=o(66110),v=o(29558),_=o(71178);function f(e,t,o){var l;let{block:n,isReadPretty:a=e=>{let{form:t}=e;return t.readPretty},filter:r=()=>!0,getInitializerItem:i=()=>({}),getSchema:s=()=>({})}=e,{collectionManager:d,collection:u,dataSourceManager:c,actionContext:p}=o,m=null==(l=p.fieldSchema)?void 0:l["x-action"];return u?t.map(e=>{let t=d.getCollection(e.target),l=c.collectionFieldInterfaceManager.getFieldInterface(e.interface);return{collectionField:e,context:{...o,targetCollection:t,collectionFieldInterface:l}}}).filter(e=>{let{collectionField:t}=e;return t.interface}).filter(e=>{let{collectionField:t,context:o}=e;return r(t,o)}).map(e=>{var t,o;let{collectionField:l,context:n}=e,a={type:"string",title:(null==l||null==(t=l.uiSchema)?void 0:t.title)||l.name,name:l.name,"x-component":"CollectionField","x-collection-field":`${u.name}.${l.name}`,"x-read-pretty":null==l||null==(o=l.uiSchema)?void 0:o["x-read-pretty"]},r=s(l,{...n,defaultSchema:a}),i={...a,...r||{}};return{collectionField:l,schema:i,context:{...n,schema:i}}}).map(e=>{var t;let{collectionField:o,context:l}=e,r={type:"item",name:o.name,title:(null==o||null==(t=o.uiSchema)?void 0:t.title)||o.name,Component:"CollectionFieldInitializer",schemaInitialize:e=>{var t,r;null==(r=l.collectionFieldInterface)||null==(t=r.schemaInitialize)||t.call(r,e,{field:o,block:n,readPretty:null==a?void 0:a(l),action:m,targetCollection:l.targetCollection})},schema:l.schema};return{collectionField:o,context:l,defaultInitializerItem:r}}).map(e=>{let{collectionField:t,defaultInitializerItem:o,context:l}=e,n=i(t,{...l,defaultInitializerItem:o});return{...o,...n||{}}}):[]}o(51649);var g=o(56920),b=o(77843),y=o(49621),S=o(23460),k=o(78562),C=o(26174),M=o(14669),w=o(82924);function F(){let{t:e}=(0,b.useTranslation)(),t=(0,y.Ge)(),o=(0,M.m6)(),l=(0,k.D5)(),n=(0,S.xw)(),a=(0,g.useForm)(),r=(0,g.useFieldSchema)(),i=(0,C.r2)();return{t:e,compile:(0,w.lum)(),actionContext:l,fieldSchema:r,collection:t,dataSource:n,form:a,collectionManager:i,dataSourceManager:o}}var P=o(96023);let j=e=>{let t=F(),{t:o,collection:l}=t,n=f(e,l.getFields(),t);return(0,_.jsx)(P.G0,{title:o("Display fields"),children:n})},A=e=>{let t=F(),{collection:o,t:l,collectionManager:n}=t,a=o.getParentCollectionsName();if(!a.length)return null;let r=a.map(e=>{let t=o.getParentCollectionFields(e);return 0===t.length?null:{parentCollection:n.getCollection(e),parentCollectionFields:t}}).filter(Boolean).map(o=>{let{parentCollection:n,parentCollectionFields:a}=o,r={...t,collection:n};return{type:"itemGroup",divider:!0,title:l("Parent collection fields")+"("+t.compile(n.title)+")",children:f(e,a,r)}});return(0,_.jsx)(P.ZI,{children:r})},I=e=>{let{filterAssociationField:t,filterSelfField:o=()=>!0,getSchema:l,...n}=e,{collection:a,t:r,collectionManager:i}=e.context,s=a.getFields(),d=["o2o","oho","obo","m2o"],u=s.filter(e=>d.includes(e.interface)).filter(t=>o(t,e.context));if(!u.length)return null;let c=u.map(e=>{let t=i.getCollection(e.target);if(!t)return null;let o=null==t?void 0:t.getAllFields();return o.length?{associationField:e,associationCollection:t,associationCollectionFields:o}:null}).filter(Boolean).map(o=>{var r,i;let{associationField:s,associationCollection:d,associationCollectionFields:u}=o,c={...e.context,collection:d};return{type:"subMenu",name:null==(r=s.uiSchema)?void 0:r.title,title:null==(i=s.uiSchema)?void 0:i.title,children:f({...n,filter:t,getSchema:(e,t)=>({...l(e,t)||{},"x-read-pretty":!0,name:`${s.name}.${e.name}`,"x-collection-field":`${a.name}.${s.name}.${e.name}`})},u,c)}});return c.length?(0,_.jsx)(P.G0,{title:r("Display association fields"),children:c}):null},T=e=>{let{selfField:t,parentField:o,associationField:l,block:n}=e,a=F();return a.collection?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(j,{block:n,...t,context:{...a,collection:a.collection}}),o&&(0,_.jsx)(A,{block:n,...o,context:{...a,collection:a.collection}}),l&&(0,_.jsx)(I,{block:n,...l,context:{...a,collection:a.collection}})]}):null};var D=o(81936);let L=(e,t,o)=>{let l=(0,D.Rg)(e,"x-component","Kanban");return(0,D.Rg)(l,t,o)},Y=e=>{let t=(null==e?void 0:e.block)||"Form",o={"x-toolbar":"FormItemSchemaToolbar","x-settings":"fieldSettings:FormItem","x-decorator":"FormItem"},l={remove:D.AZ};return(0,_.jsx)(T,{block:t,selfField:{filter:e=>!e.treeChildren,getSchema:(e,t)=>{var l,n;let{targetCollection:a}=t,r=(null==a?void 0:a.template)==="file",i=null==e||null==(n=e.uiSchema)||null==(l=n["x-component-props"])?void 0:l.fieldNames;return{...o,"x-component-props":r?{fieldNames:{label:"preview",value:"id"}}:a&&i?{fieldNames:{...i,label:(null==a?void 0:a.titleField)||i.label}}:{}}},getInitializerItem:()=>({...l,find:(null==e?void 0:e.block)==="Kanban"?L:void 0})},parentField:{getSchema:()=>o,getInitializerItem:()=>l},associationField:{filterSelfField:e=>"Form"!==t||(null==e?void 0:e.interface)==="m2o",filterAssociationField:e=>(null==e?void 0:e.interface)&&!["subTable"].includes(null==e?void 0:e.interface)&&!e.treeChildren,getSchema:()=>o,getInitializerItem:()=>l}})},R=["attachment","textarea","markdown","json","richText","polygon","circle","point","lineString"],B=e=>{function t(e){let{fieldSchema:t,form:o}=e;return"AssociationField.SubTable"!==t["x-component"]||o.readPretty}return(0,_.jsx)(T,{block:"Table",selfField:{isReadPretty:t,filter:e=>"subTable"!==e.interface&&!e.treeChildren,getSchema:(e,o)=>{var l,n;let{targetCollection:a,fieldSchema:r,form:i}=o,s=(null==a?void 0:a.template)==="file",d=(null==(l=e.uiSchema)?void 0:l["x-component"])==="Preview",u="AssociationField.SubTable"===r["x-component"];return{"x-component-props":s?{fieldNames:{label:"preview",value:"id"}}:d?{size:"small"}:{},"x-read-pretty":t({fieldSchema:r,form:i})||(null==(n=e.uiSchema)?void 0:n["x-read-pretty"]),"x-decorator":u?R.includes(e.interface)||s?"QuickEdit":"FormItem":null,"x-decorator-props":{labelStyle:{display:"none"}}}},getInitializerItem:()=>({find:D.Oo,remove:D.nt})},parentField:{isReadPretty:t,getSchema(e,o){var l;let{targetCollection:n,fieldSchema:a,form:r}=o,i=(null==n?void 0:n.template)==="file",s="AssociationField.SubTable"===a["x-component"];return{"x-component-props":i?{fieldNames:{label:"preview",value:"id"}}:{},"x-read-pretty":t({fieldSchema:a,form:r})||(null==(l=e.uiSchema)?void 0:l["x-read-pretty"]),"x-decorator":s?R.includes(e.interface)||i?"QuickEdit":"FormItem":null,"x-decorator-props":{labelStyle:{display:"none"}}}},getInitializerItem:()=>({remove:D.AZ})},associationField:{filterAssociationField:e=>!["subTable"].includes(e.interface)&&!e.treeChildren,getSchema:()=>({}),getInitializerItem:()=>({find:D.Oo,remove:D.nt})}})};var N=o(92719)},29558(e,t,o){o.d(t,{TF:()=>i,ji:()=>r,kb:()=>s});var l=o(51649),n=o(67574);let a="x-data-source",r=(e,t)=>{var o;return null==(o=e.collectionFieldInterfaceManager.getFieldInterface(t.interface))?void 0:o.titleUsable},i=e=>(0,l.useMemo)(()=>{if(e&&e!==n.Ze)return{[a]:e}},[e]),s=e=>e&&e!==n.Ze?{[a]:e}:{}},50255(e,t,o){o.d(t,{L2:()=>m,er:()=>p,pf:()=>d,rN:()=>c,to:()=>s,vB:()=>u});var l=o(71178),n=o(51649),a=o(83468),r=o(86393),i=o(504);let s=(0,n.createContext)({getTitle:()=>"",setTitle:()=>{}});s.displayName="DocumentTitleContext";let d=n.default.memo(e=>{let{addonBefore:t,addonAfter:o}=e,a=(0,i.useFlowEngineContext)(),r=a.t.bind(a),d=e=>a.t(e,{ns:"lm-desktop-routes"}),u=e=>a.t(e,{ns:"lm-collections"}),c=n.default.useRef(""),p=(0,n.useCallback)(()=>c.current,[]),m=(0,n.useCallback)(e=>{setTimeout(()=>{document.title=c.current=`${t?` - ${r(t)}`:""}${d(e||"")}${o?` - ${u(o)}`:""}`})},[o,t,r,d,u]),h=(0,n.useMemo)(()=>({getTitle:p,setTitle:m}),[p,m]);return(0,l.jsx)(s.Provider,{value:h,children:e.children})});d.displayName="DocumentTitleProvider";let u=e=>{var t,o;let n=(0,r.e6)();return(0,l.jsx)(d,{addonAfter:null==n||null==(o=n.data)||null==(t=o.data)?void 0:t.title,children:e.children})},c=()=>(0,n.useContext)(s),p=e=>{let{setTitle:t}=c();(0,n.useEffect)(()=>{t(e)},[t,e])};class m extends a.k{async load(){this.app.use(u,this.options)}}},11482(e,t,o){o.d(t,{$3:()=>h,Pt:()=>x,xZ:()=>v});var l=o(71178),n=o(56920),a=o(77583),r=o(49621),i=o(14187),s=o(43873),d=o(82924),u=o(58980),c=o(51649),p=o(50570);let m=(0,c.createContext)(null);m.displayName="FilterContext";let h=c.default.memo(e=>{let{children:t}=e,o=c.default.useRef([]),n=(0,c.useCallback)(e=>{"function"==typeof e?o.current=e(o.current):o.current=e},[]),a=(0,c.useCallback)(()=>o.current,[]),r=(0,c.useMemo)(()=>({getDataBlocks:a,setDataBlocks:n}),[a,n]);return(0,l.jsx)(m.Provider,{value:r,children:t})});h.displayName="FilterBlockProvider";let x=e=>{let{children:t,params:o}=e,a=(0,r.Ge)(),{recordDataBlocks:p}=v(),{getDataBlockRequest:m}=(0,i.ZK)(),h=(0,n.useField)(),x=(0,n.useFieldSchema)(),_=(0,u.ze)(),f=(0,c.useRef)(null),g=(0,s.fY)(),b=h&&"FilterFormBlockProvider"!==h.decoratorType&&"FormBlockProvider"!==h.decoratorType&&"filter"!==h.decoratorProps.blockType,y=(0,c.useCallback)(()=>{let e=m();p({uid:x["x-uid"],title:h.componentProps.title,doFilter:e.runAsync,collection:a,associatedFields:_,foreignKeyFields:null==a?void 0:a.getFields("isForeignKey"),defaultFilter:(null==o?void 0:o.filter)||{},service:e,dom:f.current,dataLoadingMode:g,clearFilter(e){var t,l,n;let a=(null==(t=this.service.params)?void 0:t[0])||{},r=(null==(n=this.service.params)||null==(l=n[1])?void 0:l.filters)||{};delete r[e];let i=(0,u.Dj)([...Object.values(r).map(e=>(0,d.pA3)(e)),(null==o?void 0:o.filter)||{}]);this.service.run({...a,page:1,filter:i},{filters:r})},clearData(){this.service.mutate(void 0)},clearSelection(){if(h){var e,t;null==(t=h.data)||null==(e=t.clearSelectedRowKeys)||e.call(t)}},highlightBlock(){var e;let t=f.current;if(!t)return;let o=t.querySelector(".ant-nb-schema-toolbar");o&&o.classList.remove("hidden"),t.style.boxShadow="0 3px 12px rgba(0, 0, 0, 0.15)",t.style.transition="box-shadow 0.3s ease, transform 0.2s ease",null==(e=t.scrollIntoView)||e.call(t,{behavior:"smooth",block:"start"})},unhighlightBlock(){let e=f.current;if(!e)return;let t=e.querySelector(".ant-nb-schema-toolbar");t&&t.classList.add("hidden"),e.style.boxShadow="none",e.style.transition="box-shadow 0.3s ease, transform 0.2s ease"}})},[_,a,g,x,null==o?void 0:o.filter,p,m,h]);return(0,c.useEffect)(()=>{b&&y()},[y,b]),(0,l.jsx)("div",{ref:f,children:t})},v=()=>{let e=c.default.useContext(m),t=(0,p.dW)(),o=(0,c.useCallback)(()=>(null==e?void 0:e.getDataBlocks())||[],[e]),l=(0,c.useCallback)(o=>{t.recordDataBlocks(o);let l=null==e?void 0:e.getDataBlocks().find(e=>e.uid===o.uid);l?Object.assign(l,o):null==e||e.setDataBlocks(e=>[...e,o])},[e]),n=(0,c.useCallback)(o=>{t.removeDataBlock(o),null!=e&&e.getDataBlocks().every(e=>e.uid!==o)||null==e||e.setDataBlocks(e=>e.filter(e=>e.uid!==o))},[e]);return e?{recordDataBlocks:l,getDataBlocks:o,removeDataBlock:n,inProvider:!0}:{inProvider:!1,recordDataBlocks:a.default.noop,getDataBlocks:o,removeDataBlock:a.default.noop}}},65613(e,t,o){o.d(t,{$3:()=>l.$3,Dj:()=>n.Dj,I1:()=>n.I1,Lt:()=>n.Lt,Pt:()=>l.Pt,Rm:()=>n.Rm,SU:()=>n.SU,TQ:()=>n.TQ,Uf:()=>n.Uf,W0:()=>n.W0,eB:()=>n.eB,vc:()=>n.vc,xZ:()=>l.xZ,ze:()=>n.ze});var l=o(11482),n=o(58980)},58980(e,t,o){o.d(t,{Dj:()=>h,I1:()=>m,Lt:()=>x,Rm:()=>v,SU:()=>f,TQ:()=>y,Uf:()=>_,W0:()=>b,eB:()=>S,vc:()=>k,ze:()=>g});var l,n=o(56920),a=o(63526),r=o(77583),i=o(51649),s=o(73761),d=o(49621),u=o(14669),c=o(82924),p=o(11482),m=((l={})[l.FORM=0]="FORM",l[l.TABLE=1]="TABLE",l[l.TREE=2]="TREE",l[l.COLLAPSE=3]="COLLAPSE",l);let h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$and",o=e.filter(e=>{if(e&&"object"==typeof e&&!Array.isArray(e))return Object.values(e).filter(e=>void 0!==e).length});return 0===o.length?{}:1===o.length?o[0]:{[t]:o}},x=(e,t)=>{var o;return null==(o=t.associatedFields)?void 0:o.filter(t=>null==e?void 0:e.some(e=>e===t.target))},v=(e,t)=>{var o;return null==(o=t.foreignKeyFields)?void 0:o.filter(t=>e.fields.some(e=>"belongsTo"!==e.type&&e.foreignKey===t.name&&e.target===t.collectionName))},_=e=>{let{getDataBlocks:t}=(0,p.xZ)(),o=(0,n.useFieldSchema)(),l=(0,d.Ge)(),{getAllCollectionsInheritChain:a}=(0,u.LQ)();return 0===e||3===e?t().filter(e=>y(e.collection,l)):1===e||2===e?t().filter(e=>{var t,n;return o["x-uid"]!==e.uid&&(y(e.collection,l)||(null==(t=x(a(l.name,l.dataSource),e))?void 0:t.length)||(null==(n=v(l,e))?void 0:n.length))}):void 0},f=(e,t,o,l)=>({$and:Object.keys(e=(0,a.flatten)(e,{breakOn(e){let{value:n,path:a}=e;if(["$match","$notMatch","$anyOf","$noneOf","$childIn","$childNotIn","$dateBetween","$in","$notIn"].includes(t[a]))return!0;let r=o(`${l}.${a}`);if(["datetime","datetimeNoTz","date","unixTimestamp","createdAt","updatedAt"].includes(null==r?void 0:r.interface))return!0;if(null==r?void 0:r.target){if(Array.isArray(n))return!0;let e=r.targetKey||"id";if(n&&null!=n[e])return!0}return!1}})).map(n=>{let i=r.default.get(e,n),s=o(`${l}.${n}`);return((null==s?void 0:s.target)&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(s.type)&&(i=(0,a.getValuesByPath)(i,s.targetKey||"id"),n=`${n}.${s.targetKey||"id"}`,(null==s?void 0:s.interface)==="chinaRegion"&&(i=r.default.last(i))),i||0===i||!1===i)?{[n]:{[t[n]||"$eq"]:i}}:null}).filter(Boolean)}),g=()=>{var e;return(null==(e=(0,d.Ge)())?void 0:e.fields.filter(e=>b(e)))||[]},b=e=>["o2o","oho","obo","m2o","createdBy","updatedBy","o2m","m2m","linkTo","chinaRegion","mbm"].includes(null==e?void 0:e.interface),y=(e,t)=>e.name===t.name&&e.dataSource===t.dataSource,S=()=>{let e=(0,n.useFieldSchema)(),{getDataBlocks:t}=(0,p.xZ)(),{targets:o,uid:l}=(0,s.findFilterTargets)(e),a=t(),[d,u]=(0,i.useState)(()=>o&&o.some(e=>a.some(t=>t.uid===e.uid))),m=Object.keys(o||{});return(0,i.useEffect)(()=>{u(o&&o.some(e=>a.some(t=>t.uid===e.uid)))},[m.length,o,a]),{isConnected:d,doFilter:(0,i.useCallback)(function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"$eq",s=a.find(t=>t.uid===e.parent["x-uid"]);a.forEach(e=>{var a,d,u,p,m,x,v,_,f;let g,b=n,y=o.find(t=>t.uid===e.uid);if(!y)return;r.default.isFunction(t)&&(t=t(y,e,(m=s,x=y.field,(null==(g=null==m||null==(v=m.associatedFields)?void 0:v.find(e=>e.foreignKey===x))?void 0:g.sourceKey)||(null==x||null==(f=x.split)||null==(_=f.call(x,"."))?void 0:_[1])))),r.default.isFunction(n)&&(b=n(y,e)),r.default.isFunction(i)&&(i=i(y));let S=(null==(a=e.service.params)?void 0:a[0])||{},k=(null==(u=e.service.params)||null==(d=u[1])?void 0:d.filters)||{};if(null!=t)k[l]={$and:[{[b]:{[i]:t}}]};else if(null==(p=e.clearSelection)||p.call(e),delete k[l],"manual"===e.dataLoadingMode)return e.clearData();let C=h([...Object.values(k).map(e=>(0,c.pA3)(e)),e.defaultFilter]);e.doFilter({...S,page:1,filter:C},{filters:k})})},[a,o,l,e])}},k=e=>{for(;e;){if(e["x-filter-targets"])return"FilterFormBlockProvider"===e["x-decorator"];e=e.parent}return!1}},4658(e,t,o){o.d(t,{I:()=>n,U:()=>a});var l=o(71178);let n=o(51649).default.createContext(null),a=e=>(0,l.jsx)(n.Provider,{value:e,children:e.children})},92619(e,t,o){o.d(t,{_:()=>a});var l=o(51649),n=o(4658);let a=()=>(0,l.useContext)(n.I)||{}},69575(e,t,o){o.d(t,{Im:()=>l.I,UU:()=>l.U,_P:()=>n._});var l=o(4658),n=o(92619)},30644(e,t,o){o.d(t,{ZC:()=>C,E0:()=>y,cQ:()=>S,dw:()=>A,Tu:()=>M,Bs:()=>P,IC:()=>j,o8:()=>k});var l=o(71178),n=o(56920),a=o(27404),r=o(71883),i=o(77583),s=o(51649),d=o(26174),u=o(49621),c=o(93726),p=o(67285),m=o(61013);let h=e=>{var t;let o,r,i=(0,s.useContext)(n.SchemaComponentsContext),d=e.field,u=((e,t)=>{if((e||t)&&!(0,a.isFn)(e))return(0,l.jsxs)(s.Fragment,{children:[e,t]})})((o=e.children,r=d.form,(0,a.isFn)(o)?o(d,r):o),d.content??d.componentProps.children);if("visible"!==d.display)return null;let c=e=>e&&("object"==typeof e||"function"==typeof e)?e:a.FormPath.getIn(i,e)??e;return t=d.componentType?s.default.createElement(c(d.componentType),{...d.componentProps,value:d.value},u):u,d.decoratorType?s.default.createElement(c(d.decoratorType),d.decoratorProps,t):(0,l.jsx)(s.Fragment,{children:t})};h.displayName="NocoBaseReactiveInternal",h.displayName="NocoBaseReactiveField";class x{initialize(){var e,t,o,l,n,r,s,d,u,c,p,m,h,x,v,_,f,g,b,y;let S=this.props.compile;this.pattern="readPretty",this.readPretty=!0,this.initialized=!0,this.loading=!1,this.validating=!1,this.submitting=!1,this.selfModified=!1,this.active=!1,this.visited=!0,this.mounted=!0,this.unmounted=!1,this.inputValues=[],this.inputValue=null,this.feedbacks=[],this.title=S(this.props.title||(null==(e=this.props.schema)?void 0:e.title)),this.description=S(this.props.description||(null==(t=this.props.schema)?void 0:t.description)),this.display="visible",this.editable=this.props.editable||(null==(o=this.props.schema)?void 0:o["x-editable"]),this.disabled=this.props.disabled||(null==(l=this.props.schema)?void 0:l["x-disabled"]),this.readOnly=this.props.readOnly||(null==(n=this.props.schema)?void 0:n["x-read-only"]),this.visible=this.props.visible||(null==(r=this.props.schema)?void 0:r["x-visible"]),this.hidden=this.props.hidden||(null==(s=this.props.schema)?void 0:s["x-hidden"]),this.dataSource=S(this.props.dataSource||(null==(d=this.props.schema)?void 0:d.enum)),this.validator=this.props.validator,this.required=this.props.required||!!(null==(u=this.props.schema)?void 0:u.required),this.content=S(this.props.content||(null==(c=this.props.schema)?void 0:c["x-content"])),this.initialValue=S(this.props.initialValue||(null==(p=this.props.schema)?void 0:p.default)),this.value=S(this.props.value),this.data=this.props.data||(null==(m=this.props.schema)?void 0:m["x-data"]),this.decorator=this.props.decorator?(0,a.toArr)(this.props.decorator):[null==(h=this.props.schema)?void 0:h["x-decorator"],null==(x=this.props.schema)?void 0:x["x-decorator-props"]],this.component=this.props.component?(0,a.toArr)(this.props.component):[null==(v=this.props.schema)?void 0:v["x-component"],null==(_=this.props.schema)?void 0:_["x-component-props"]],this.decoratorProps=(null==(f=this.props.schema)?void 0:f["x-decorator-props"])||{},this.componentProps=(null==(g=this.props.schema)?void 0:g["x-component-props"])||{},this.decoratorType=null==(b=this.props.schema)?void 0:b["x-decorator"],this.componentType=null==(y=this.props.schema)?void 0:y["x-component"],this.path={},this.form={},this.address={concat:i.default.noop}}constructor(e){this.props=e,this.initialize()}}let v=e=>{let t=(0,m.l)(),o=(0,n.useFieldSchema)(),a=(0,s.useMemo)(()=>new x({...e,compile:t}),[]);return Object.assign(a.componentProps,o["x-component-props"]),a.value=e.value,(0,l.jsx)(n.FieldContext.Provider,{value:a,children:(0,l.jsx)(h,{field:a,children:e.children})})},_=s.default.createContext({}),f=s.default.createContext(i.default.noop),g=e=>{let{children:t,refresh:o}=e,n=k(),a=(0,s.useCallback)(e=>{o(),(null==e?void 0:e.refreshParentSchema)&&(null==n||n())},[n,o]);return(0,l.jsx)(f.Provider,{value:a,children:t})},b=s.default.createContext(i.default.noop),y=e=>{let{children:t,refresh:o}=e;return(0,l.jsx)(b.Provider,{value:o,children:t})},S=()=>s.default.useContext(b),k=()=>s.default.useContext(f),C=()=>s.default.useContext(_)||{},M=e=>{let{children:t,fieldSchema:o}=e,n=(0,u.Ge)(),a=(0,d.r2)(),r=null==o?void 0:o.name,i=(0,s.useMemo)(()=>{var e;if(!n)return null;let t=null==o||null==(e=o["x-component-props"])?void 0:e.field;return a.getCollectionField(null==o?void 0:o["x-collection-field"])||t||n.getField((null==t?void 0:t.name)||r)},[n,a,o,r]);return(0,l.jsx)(_.Provider,{value:i,children:t})},w=i.default.memoize((e,t)=>e.toFieldProps({scope:t})),F=(e,t,o)=>{let l=e.toJSON();if(o){if(!l.properties)return e;let o=Object.keys(l.properties)[0],r=Object.values(l.properties)[0];return l.properties[o]=(0,a.merge)(i.default.omit(t,"type","x-read-pretty"),r),new n.Schema(l)}return new n.Schema((0,a.merge)(i.default.omit(t,"type","x-read-pretty"),l))},P=s.default.createContext(!1),j=()=>s.default.useContext(P),A=s.default.memo(e=>{let{schema:t,name:o,onlyRenderProperties:d,onlyRenderSelf:u,mapProperties:m,filterProperties:h,propsRecursion:x,values:f,isUseFormilyField:b=!0,uiSchema:y,parentSchema:S}=e,k=(e=>{let t=(0,n.useField)();if(e.onlyRenderProperties){var o;return e.basePath||(null==t||null==(o=t.address)?void 0:o.concat(e.name))}return e.basePath||(null==t?void 0:t.address)})(e),j=(0,s.useRef)(null),I=(0,s.useMemo)(()=>(j.current=null,new n.Schema(t)),[t]),{uiSchema:T,defaultValue:D}=C(),L=(0,r.useUpdate)(),{onChange:Y}=(0,s.useContext)(c.D),R=j.current||I;if(!R.parent&&S){var B,N;R.parent=S,(null==(N=R.parent)||null==(B=N.properties)?void 0:B[R.name])||!R.name||i.default.set(R.parent,`properties.${R.name}`,R)}let E=(0,s.useCallback)(()=>{let e=R.parent;j.current=new n.Schema(R.toJSON(),e),(null==e?void 0:e.properties)&&Object.keys(e.properties).forEach(t=>{t===R.name&&(e.properties[t]=j.current)}),L(),null==Y||Y()},[R,Y,L]),$=(0,s.useMemo)(()=>y?F(R,y,d):T?(T.default=D,F(R,T,d)):R,[T,D,R,d,y]),z=w($,(0,n.useExpressionScope)()),O=e=>{if(!u)return(e=>{let{schema:t,field:o,basePath:r,mapProperties:d,filterProperties:u,propsRecursion:c,values:m,isUseFormilyField:h}=e,x=n.Schema.getOrderProperties(t);return x.length?(0,l.jsx)(s.Fragment,{children:x.map((e,t)=>{let{schema:n,key:s}=e,x=(null==o?void 0:o.address)||r,v=n;if((0,a.isFn)(d)){let e=d(n,s);e&&(v=e)}if((0,a.isFn)(u)&&!1===u(v,s))return null;let f=(0,a.isBool)(c)&&c?(0,l.jsx)(A,{propsRecursion:!0,filterProperties:u,mapProperties:d,schema:v,name:s,basePath:x,values:i.default.get(m,s),isUseFormilyField:h}):(0,l.jsx)(A,{schema:v,name:s,basePath:x,values:i.default.get(m,s),isUseFormilyField:h});return"CollectionField"===v["x-component"]?(0,l.jsx)(P.Provider,{value:!0,children:(0,l.jsx)(M,{fieldSchema:v,children:f})},`${t}-${s}`):(0,l.jsx)(P.Provider,{value:!1,children:(0,l.jsx)(_.Provider,{value:p.M,children:f})},`${t}-${s}`)})}):null})({schema:R,field:e,basePath:k,mapProperties:m,filterProperties:h,propsRecursion:x,values:f,isUseFormilyField:b})};return R?(0,l.jsx)(n.SchemaContext.Provider,{value:R,children:(0,l.jsx)(g,{refresh:E,children:(0,a.isValid)(o)?"object"===$.type?d?O():(0,l.jsx)(n.ObjectField,{...z,name:o,basePath:k,children:O}):"array"===$.type?(0,l.jsx)(n.ArrayField,{...z,name:o,basePath:k}):"void"===$.type?d?O():(0,l.jsx)(n.VoidField,{...z,name:o,basePath:k,children:O}):b?(0,l.jsx)(n.Field,{...z,name:o,basePath:k}):(0,l.jsx)(v,{name:o,value:f,initialValue:f,basePath:k,schema:$}):O()})}):(0,l.jsx)(s.Fragment,{})});A.displayName="NocoBaseRecursionField"},79980(e,t,o){o.d(t,{Ne:()=>l.compatOldTheme,Og:()=>l.AntdAppProvider,U_:()=>l.GlobalThemeProvider,_l:()=>l.addCustomAlgorithmToTheme,my:()=>l.useGlobalTheme,zQ:()=>l.defaultTheme,ze:()=>l.customAlgorithm});var l=o(13975)},80461(e,t,o){o.d(t,{S:()=>c,T:()=>p});var l=o(71178),n=o(56920),a=o(77583),r=o(51649),i=o(52793),s=o(95951);let d=()=>void 0,u=(e,t,o)=>{let l;return a.default.isFunction(e)?l=e:(l=t[e])||console.error(`${o} is not registered`),l||d};function c(e,t){return((e,t)=>{let o;if(!e)return d;if(a.default.isFunction(e))return e;for(let l of e.split("."))o=u(l,o||t,e);return o})(e,(0,n.useExpressionScope)())(t)}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.displayName||e.displayName||e.name,n=t=>{let{dn:o,findComponent:a}=(0,s.er)(),d=c((0,r.useMemo)(()=>{let e=o.getSchemaAttribute("x-component"),t=o.getSchemaAttribute("x-decorator"),l=o.getSchemaAttribute("x-use-component-props"),r=o.getSchemaAttribute("x-use-decorator-props");return e&&l&&a(e)===n?l:t&&r&&a(t)===n?r:void 0},[o]),t),u=(0,r.useMemo)(()=>({...t,...d}),[d,t]);return(0,l.jsx)(r.Suspense,{fallback:(0,l.jsx)(i.Spin,{}),children:(0,l.jsx)(e,{...u,children:t.children})})};return e.displayName=o,n.displayName=`withSchemaProps(${o})`,n}},99847(e,t,o){o.d(t,{t:()=>s});var l=o(71178),n=o(52793),a=o(14187),r=o(51649);let i=()=>{var e;return!!(null==(e=(0,a._J)())?void 0:e.loading)},s=(e,t)=>{let{useLoading:o=i,displayName:a,SkeletonComponent:s=n.Skeleton}=t||{},d=r.default.memo(t=>{let n=o(),a=(0,r.useRef)(!1),i=(0,r.useDeferredValue)(n);return!a.current&&i?(0,l.jsx)(s,{}):(a.current=!0,(0,l.jsx)(e,{...t}))});return d.displayName=a||`${e.displayName}(withSkeletonComponent)`||`${e.name}(withSkeletonComponent)`,d}},7775(e,t,o){o.d(t,{L:()=>i});var l=o(71178);o(51649);var n=o(52793),a=o(82113);let r={display:"flex",alignItems:"center",gap:4},i=e=>t=>{let{tooltip:o}=t;return o?(0,l.jsxs)("div",{style:r,children:[(0,l.jsx)(e,{...t}),(0,l.jsx)(n.Tooltip,{title:o,children:(0,l.jsx)(a.QuestionCircleOutlined,{style:{zIndex:1}})})]}):(0,l.jsx)(e,{...t})}},18226(e,t,o){o.d(t,{w:()=>l,k:()=>a});let l=()=>"nocobase-admin-menu";var n=o(51649);function a(){let e,t,{metaRef:o,restore:l}=(e=(0,n.useRef)("initial-scale=0.1"),t=(0,n.useRef)(),(0,n.useEffect)(()=>{let o=document.querySelector('meta[name="viewport"]');o?e.current=o.content:(o=document.createElement("meta")).name="viewport",o&&(o.content="width=device-width, initial-scale=1, user-scalable=0",t.current=o)},[]),{metaRef:t,restore:()=>{t.current&&(t.current.content=e.current)}});(0,n.useEffect)(()=>{if(o.current)return document.head.insertBefore(o.current,document.head.firstChild),()=>{l()}},[])}},33750(e,t,o){o.d(t,{Os:()=>u,co:()=>s,re:()=>d});var l=o(71178),n=o(77583),a=o(51649);let r=(0,a.createContext)(null);r.displayName="GetMenuItemContext";let i=(0,a.createContext)(null);i.displayName="GetMenuItemsContext";let s=()=>(0,a.useContext)(r)||{},d=()=>(0,a.useContext)(i)||{},u=()=>{let e=(0,a.useRef)([]),t=(0,a.useRef)(null),o=(0,a.useRef)(!1),s=(0,a.useCallback)(n=>{let{limitCount:a}=n;return o.current?(o.current=!1,t.current)?t.current():a&&e.current.length>a?(0,l.jsx)(l.Fragment,{children:e.current.slice(0,a).map((e,t)=>(0,l.jsx)(e,{},t))}):(0,l.jsx)(l.Fragment,{children:e.current.map((e,t)=>(0,l.jsx)(e,{},t))}):null},[]),d=(0,a.useCallback)(e=>{let a=[],r=e=>{a.push(e),a.sort((e,t)=>(e.order||0)-(t.order||0))};return o.current=!0,t.current=()=>{let t=a.filter(e=>e.notdelete).map(e=>n.default.omit(e,"notdelete"));return a.length=0,a.push(...t),(0,l.jsx)(i.Provider,{value:{pushMenuItem:r},children:e()})},a},[]);return{Component:s,getMenuItems:d,getMenuItem:(0,a.useCallback)(t=>{let n={},a=e=>{Object.assign(n,e)};return o.current=!0,e.current.push(()=>(0,l.jsx)(r.Provider,{value:{collectMenuItem:a},children:t()})),n},[]),clean:(0,a.useCallback)(()=>{e.current=[]},[])}}},60070(e,t,o){o.d(t,{J:()=>i});var l=o(51649),n=o(43923),a=o(99300);let{evaluate:r}=o(83489).evaluators.get("formula.js"),i=e=>{let t=(0,n.$l)(),o=(0,n.gp)(),[i,s]=(0,l.useState)();return(0,l.useEffect)(()=>{(async()=>{if(null==e||""===e)return s(void 0);let{exp:l,scope:n}=await (0,a.qk)(e,{variables:t,localVariables:o});try{let e=r(l,{now:()=>new Date().toString(),...n});s(e)}catch(e){console.error(e)}})()},[t.parseVariable,e,o]),i}},24943(e,t,o){o.d(t,{r:()=>d});var l=o(71178),n=o(82113),a=o(52793);o(51649);var r=o(16211),i=o(28601),s=o(86393);function d(){var e,t,o;let{data:d}=(0,s.e6)()||{},u=(0,r.VB)();return(null==d||null==(e=d.data)?void 0:e.enabledLanguages.length)>1&&(0,l.jsx)(a.Dropdown,{menu:{onClick(e){u.auth.setLocale(e.key),window.location.reload()},selectable:!0,defaultSelectedKeys:[u.auth.locale],items:null==d||null==(o=d.data)||null==(t=o.enabledLanguages)?void 0:t.filter(e=>i.Ay[e]).map(e=>({key:e,label:i.Ay[e].label}))},children:(0,l.jsx)(n.TranslationOutlined,{style:{fontSize:24}})})}},839(e,t,o){o.d(t,{z:()=>l});let l="ui-schema-storage"},7271(e,t,o){o.d(t,{Ru:()=>i,ul:()=>r,zg:()=>d.z});var l=o(23977),n=o(77843),a=o(28601);function r(e,t){return t?`{{t(${JSON.stringify(e)}, ${JSON.stringify(t)})}}`:`{{t(${JSON.stringify(e)})}}`}let i=l.default.createInstance(),s={};Object.keys(a.Ay).forEach(e=>{s[e]=a.Ay[e].resources}),i.use(n.initReactI18next).init({lng:"en-US",defaultNS:"client",resources:{},keySeparator:!1,nsSeparator:!1});var d=o(839)},37679(e,t,o){let l;o.d(t,{In:()=>u,K1:()=>d,Pt:()=>r,cE:()=>s,pU:()=>i});var n=o(71178),a=o(82113);o(51649);let r=new Map;function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;r.set(e.toLowerCase(),t)}function s(e){return!!e&&r.has(e.toLowerCase())}function d(e){Object.keys(e).forEach(t=>{i(t,e[t])})}Object.keys(a).forEach(e=>{i(e,a[e])});let u=e=>{let{type:t="",component:o,...i}=e;if(o)return(0,n.jsx)(a.default,{component:o,...i});if(t&&r.has(t.toLowerCase())){let e=r.get(t.toLowerCase());return(0,n.jsx)(e,{...i})}return t&&l?(0,n.jsx)(l,{type:t}):null};u.createFromIconfontCN=e=>{l=(0,a.createFromIconfontCN)(e)},u.register=e=>{d(e)}},60430(e,t,o){o.d(t,{In:()=>l.In,K1:()=>l.K1,Pt:()=>l.Pt,cE:()=>l.cE,pU:()=>l.pU});var l=o(37679)},44374(e,t,o){o.r(t),o.d(t,{ACLActionParamsContext:()=>r.gU,ACLActionProvider:()=>r.aK,ACLCollectionFieldProvider:()=>r.mu,ACLCollectionProvider:()=>r.yb,ACLContext:()=>r.w0,ACLCustomContext:()=>r.j,ACLMenuItemProvider:()=>r.Ik,ACLPane:()=>r.tA,ACLPlugin:()=>r.gt,ACLProvider:()=>r.AY,ACLRolesCheckProvider:()=>r.rR,ADMIN_SETTINGS_KEY:()=>u.w$,ADMIN_SETTINGS_PATH:()=>u.wq,AIManager:()=>ec._T,APIClient:()=>s.Q9,APIClientContext:()=>s.j8,APIClientProvider:()=>s.nd,AccessControl:()=>B.kx,Action:()=>D.rcl,ActionBar:()=>D.E76,ActionBarAssociationFilterAction:()=>Y.pB,ActionBarProvider:()=>D.xqq,ActionContext:()=>D.yVm,ActionContextNoRerender:()=>D.Wis,ActionContextProvider:()=>D.z45,ActionDesigner:()=>D.U6o,ActionGroupModel:()=>a.ActionGroupModel,ActionInitializer:()=>Y.LF,ActionInitializerItem:()=>Y.E2,ActionModel:()=>a.ActionModel,ActionSceneEnum:()=>a.ActionSceneEnum,ActionType:()=>B.X2,AddChildActionModel:()=>a.AddChildActionModel,AddCollection:()=>h.qS,AddCollectionAction:()=>h.IE,AddCollectionField:()=>h.qQ,AddFieldAction:()=>h.g,AddNewActionModel:()=>a.AddNewActionModel,AddSubFieldAction:()=>h.w3,AdminDynamicPage:()=>T.Y4,AdminLayout:()=>T.Ui,AdminLayoutMenuItemModel:()=>T.xF,AdminLayoutPlugin:()=>T.NC,AdminProvider:()=>T.X7,AdminSettingsLayout:()=>j.dj,AdminSettingsLayoutModel:()=>j.C_,AfterSuccess:()=>D.Kql,AllDataBlocksContext:()=>D.rrz,AllDataBlocksProvider:()=>D.J3t,AntdAppProvider:()=>y.Og,AntdConfigPlugin:()=>i.j,AntdConfigProvider:()=>i.Rk,AntdSchemaComponentPlugin:()=>D.bkX,AntdSchemaComponentProvider:()=>D.TDj,AppLangContext:()=>i.P4,AppNotFound:()=>x.bM,AppendsTreeSelect:()=>D.m$h,Application:()=>u.lg,ApplicationContext:()=>u.gD,AssignFormModel:()=>a.AssignFormModel,AssignedFieldValues:()=>D.TB2,AssociatedFields:()=>Y.Ag,AssociationField:()=>D.m2w,AssociationFieldMode:()=>D.Bnf,AssociationFieldModeProvider:()=>D.o8F,AssociationFilter:()=>Y.AO,AssociationFilterDesignerDelete:()=>Y.um,AssociationFilterDesignerDisplayField:()=>Y.xc,AssociationFilterPlugin:()=>Y.PB,AssociationOrCollectionProvider:()=>_.uG,AssociationProvider:()=>_.$z,AssociationSelect:()=>D.i_F,AsyncDataContext:()=>c.IC,AsyncDataProvider:()=>c.Gd,AttachmentList:()=>D._sT,AutoComplete:()=>D.j9R,BackButtonUsedInSubPage:()=>D.hsK,BaseVariableProvider:()=>B.jr,BlankComponent:()=>u.ct,Block:()=>D.eBw,BlockAssociationContext:()=>m.qM,BlockConfigsContext:()=>p.U1,BlockConfigsProvider:()=>p.AZ,BlockContext:()=>m.zL,BlockGridModel:()=>a.BlockGridModel,BlockInitializer:()=>Y.yl,BlockItem:()=>D.Z0V,BlockItemCard:()=>D.tn0,BlockItemCardContext:()=>D.AQf,BlockItemInitializer:()=>Y.z6,BlockModel:()=>a.BlockModel,BlockProvider:()=>m.VL,BlockRequestContextProvider:()=>_.NB,BlockRequestContext_deprecated:()=>m.cM,BlockRequestLoadingContext:()=>_.OO,BlockRequestProvider:()=>_.Yu,BlockRequestProvider_deprecated:()=>m.ge,BlockResourceContext:()=>m.fh,BlockSceneEnum:()=>a.BlockSceneEnum,BlockSchemaComponentPlugin:()=>m.tv,BlockSchemaComponentProvider:()=>m.hS,BlockSchemaToolbar:()=>W.C,BlockTemplateContext:()=>N.V5,BlockTemplateDetails:()=>N.YU,BlockTemplatePage:()=>N.BZ,BlockTemplateProvider:()=>N.XZ,BlockTemplatesPane:()=>N.NV,BlocksSelector:()=>D.Gjn,ButtonEditor:()=>D.Ypd,CSSVariableProvider:()=>v.B,CardItem:()=>D.oVU,Cascader:()=>D.vxQ,Checkbox:()=>D.Sc0,CheckboxFieldInterface:()=>h.jc,CheckboxGroupFieldInterface:()=>h.sf,ChildPageModel:()=>a.ChildPageModel,ChildPageTabModel:()=>a.ChildPageTabModel,ClearCollectionFieldContext:()=>_.bJ,ClickableFieldModel:()=>a.ClickableFieldModel,CodeEditor:()=>a.CodeEditor,CodeEditorExtension:()=>a.CodeEditorExtension,Collection:()=>_.pM,CollectionActionGroupModel:()=>a.CollectionActionGroupModel,CollectionActionModel:()=>a.CollectionActionModel,CollectionBlockModel:()=>a.CollectionBlockModel,CollectionCategoriesContext:()=>h.CI,CollectionCategoriesProvider:()=>h.q0,CollectionCategory:()=>h.F8,CollectionContext:()=>_.CQ,CollectionDeletedPlaceholder:()=>_.xd,CollectionField:()=>_.JL,CollectionFieldContext:()=>_.yn,CollectionFieldInterface:()=>_.yz,CollectionFieldInterfaceManager:()=>_.Ln,CollectionFieldInterfaceTag:()=>h.Mi,CollectionFieldProvider:()=>_.Ey,CollectionFieldUISchemaProvider:()=>ei.Tu,CollectionFieldsToFormInitializerItems:()=>_.Dk,CollectionFieldsToInitializerItems:()=>_.Jy,CollectionFieldsToTableInitializerItems:()=>_.bC,CollectionHistoryProvider:()=>h.US,CollectionManager:()=>_.qG,CollectionManagerContext:()=>_.Jr,CollectionManagerProvider:()=>_.Pf,CollectionManagerProvider_deprecated:()=>h.nq,CollectionManagerSchemaComponentProvider:()=>h.Xm,CollectionNotAllowViewPlaceholder:()=>_.b,CollectionPlugin:()=>h.Kf,CollectionProvider:()=>_.Yz,CollectionProvider_deprecated:()=>h.io,CollectionRecord:()=>_.ol,CollectionRecordContext:()=>_.tH,CollectionRecordProvider:()=>_.Jw,CollectionSelect:()=>D.vzL,CollectionSelectFieldInterface:()=>h.CF,CollectionTemplate:()=>_.T0,CollectionTemplateManager:()=>_.C1,CollectionTemplateTag:()=>h.xq,ColorFieldInterface:()=>h.h1,ColorPicker:()=>D.skP,ColorSelect:()=>D.qy5,CommonItemModel:()=>a.CommonItemModel,CompatibleSchemaInitializer:()=>u.__,CreateFilterActionInitializer:()=>Y.z8,CreateFormModel:()=>a.CreateFormModel,CreateResetActionInitializer:()=>Y.uj,CreatedAtFieldInterface:()=>h.vv,CreatedByFieldInterface:()=>h.VA,Cron:()=>D.l46,CronSet:()=>D.hbv,CurrentAppInfoContext:()=>d.G0,CurrentAppInfoProvider:()=>d.qm,CurrentPageUidContext:()=>u.MR,CurrentPageUidProvider:()=>u.tu,CurrentRouteProvider:()=>T.yb,CurrentTabUidContext:()=>u.EB,CurrentTabUidProvider:()=>u.sn,CurrentUserContext:()=>O.Ip,CurrentUserProvider:()=>O.Qd,CurrentUserSettingsMenuProvider:()=>O.Y,CustomRouterContextProvider:()=>u.Jr,CustomizeActionInitializer:()=>Y.A4,DEBOUNCE_WAIT:()=>q.wU,DEFAULT_DATA_SOURCE_KEY:()=>_.Ze,DEFAULT_DATA_SOURCE_TITLE:()=>_.gP,DataBlockCollector:()=>g.Pt,DataBlockContext:()=>_.R6,DataBlockInitializer:()=>Y.kq,DataBlockModel:()=>a.DataBlockModel,DataBlockProvider:()=>_.T4,DataBlockResourceContext:()=>_.RE,DataBlockResourceProvider:()=>_.Fr,DataSource:()=>_.qS,DataSourceApplicationProvider:()=>_.Nd,DataSourceCollectionCascader:()=>D.C4D,DataSourceContext:()=>_.Vl,DataSourceContext_deprecated:()=>h.hu,DataSourceManager:()=>_.zA,DataSourceManagerContext:()=>_.oc,DataSourceManagerProvider:()=>_.e1,DataSourceProvider:()=>_.tc,DataSourceProvider_deprecated:()=>h.T8,DataSourceSelect:()=>D.qy$,DateFieldInterface:()=>h.W5,DateFilterDynamicComponent:()=>D.dVP,DateFormatCom:()=>D.b2W,DatePicker:()=>D.lrV,DatePickerProvider:()=>D.QoO,DatetimeFieldInterface:()=>h.Nr,DatetimeNoTzFieldInterface:()=>h.a1,DefaultToolsManager:()=>ec.eY,DefaultValueProvider:()=>B.UY,DeleteCollection:()=>h.Ik,DeleteCollectionAction:()=>h.A9,Designable:()=>D.d1R,DesignableSwitch:()=>D.N3p,Details:()=>D.B_g,DetailsAssociationFieldGroupModel:()=>a.DetailsAssociationFieldGroupModel,DetailsBlockContext:()=>m.R6,DetailsBlockModel:()=>a.DetailsBlockModel,DetailsBlockProvider:()=>m.f0,DetailsCustomItemModel:()=>a.DetailsCustomItemModel,DetailsDesigner:()=>D.CqQ,DetailsGridModel:()=>a.DetailsGridModel,DetailsItemModel:()=>a.DetailsItemModel,DisplaySubTableFieldModel:()=>a.DisplaySubTableFieldModel,DisplayTextFieldModel:()=>a.DisplayTextFieldModel,DisplayTitleFieldModel:()=>a.DisplayTitleFieldModel,Divider:()=>D.cGx,DndContext:()=>D.Mp5,DocumentTitleContext:()=>f.to,DocumentTitleProvider:()=>f.pf,DragHandler:()=>D.L3t,DraggableContext:()=>D.X_,DropdownVisibleContext:()=>O.R2,EMPTY_OBJECT:()=>q.Ml,EditCollection:()=>h.V,EditCollectionAction:()=>h.Jx,EditCollectionField:()=>h.jY,EditComponent:()=>D.iI7,EditDefaultValue:()=>D.tvd,EditDescription:()=>D.JQe,EditFieldAction:()=>h.pA,EditFormModel:()=>a.EditFormModel,EditOperator:()=>D.B4G,EditPattern:()=>D.$t1,EditRequired:()=>D.QpY,EditSortField:()=>D.jgC,EditSubFieldAction:()=>h.Lj,EditTable:()=>D.j0_,EditTableAction:()=>D.vjx,EditTableActionContext:()=>D.uc_,EditTitle:()=>D.Xzy,EditTitleField:()=>D.Ff5,EditTooltip:()=>D.IJ7,EditValidationRules:()=>D.vPC,Editable:()=>D.FoY,EllipsisWithTooltip:()=>D.R_2,EmailFieldInterface:()=>h.em,ErrorFallback:()=>D.xPi,Expand:()=>D.JaO,ExpiresRadio:()=>D.S5r,ExtendCollectionsContext:()=>_.pi,ExtendCollectionsProvider:()=>_.Jl,FieldModel:()=>a.FieldModel,FieldModelRenderer:()=>es.FieldModelRenderer,FieldSummary:()=>h.fn,FieldValidation:()=>h.g7,FieldsTreeSelect:()=>D.ARu,Fieldset:()=>D.LBS,Filter:()=>D.dJT,FilterAction:()=>D.BsJ,FilterActionContext:()=>D.SOm,FilterActionModel:()=>a.FilterActionModel,FilterAssociatedFields:()=>Y.Q3,FilterBlockModel:()=>a.FilterBlockModel,FilterBlockProvider:()=>g.$3,FilterBlockType:()=>g.I1,FilterContext:()=>D.gM2,FilterDynamicComponent:()=>D.N$k,FilterFormActionGroupModel:()=>a.FilterFormActionGroupModel,FilterFormBlockModel:()=>a.FilterFormBlockModel,FilterFormBlockProvider:()=>m.JZ,FilterFormItemModel:()=>a.FilterFormItemModel,FilterGroup:()=>a.FilterGroup,FilterLogicContext:()=>D.c_d,FilterParentCollectionFields:()=>Y.gE,FlagContext:()=>b.Im,FlagProvider:()=>b.UU,ForeignKey:()=>h.mJ,Form:()=>D.lVW,FormActionGroupModel:()=>a.FormActionGroupModel,FormActionModel:()=>a.FormActionModel,FormActiveFieldsProvider:()=>m.Xz,FormAssociationFieldGroupModel:()=>a.FormAssociationFieldGroupModel,FormBlockContext:()=>m.JD,FormBlockInitializer:()=>J.yU,FormBlockModel:()=>a.FormBlockModel,FormBlockProvider:()=>m.r1,FormComponent:()=>a.FormComponent,FormDialog:()=>D.RD4,FormDrawer:()=>D.wA7,FormField:()=>D.zBI,FormFieldContext:()=>m.wh,FormFieldProvider:()=>m.UJ,FormGridModel:()=>a.FormGridModel,FormItem:()=>L.e,FormItemModel:()=>a.FormItemModel,FormItemSchemaToolbar:()=>J.iz,FormProvider:()=>D.OpO,FormSubmitActionModel:()=>a.FormSubmitActionModel,FormV2:()=>D.htN,G2Plot:()=>D.D6h,G2PlotInitializer:()=>Y.PV,G2PlotRenderer:()=>D.ic7,GeneralSchemaDesigner:()=>B.xK,GeneralSchemaItems:()=>R.g$,GlobalThemeProvider:()=>y.U_,Grid:()=>D.xA9,GridCard:()=>D.RLS,GridModel:()=>a.GridModel,GridRowContext:()=>D.mz8,HTMLEncode:()=>D.mJi,HeightMode:()=>B.Dn,ICON_POPUP_Z_INDEX:()=>D.b6K,Icon:()=>C.In,IconFieldInterface:()=>h.Po,IconPicker:()=>D.arW,IdFieldInterface:()=>h.Xk,InheritanceCollectionMixin:()=>h.WW,InitializerWithSwitch:()=>Y.Nl,Input:()=>D.pde,InputFieldInterface:()=>h.Yf,InputFieldModel:()=>a.InputFieldModel,InputNumber:()=>D.YIz,InputReadPretty:()=>D.FZR,InputRecordPicker:()=>D.qKt,IntegerFieldInterface:()=>h.Kv,InternalAdminSettingsLayout:()=>j.Q7,IsInNocoBaseRecursionFieldContext:()=>ei.Bs,IsSubPageClosedByPageMenuContext:()=>u.C1,IsSubPageClosedByPageMenuProvider:()=>u.Cj,JSActionModel:()=>a.JSActionModel,Json:()=>D.LMh,JsonFieldInterface:()=>h.UF,KeepAlive:()=>T.PR,LAZY_COMPONENT_KEY:()=>M.PE,LOADING_DELAY:()=>q.fG,Layout:()=>B.PE,LayoutContent:()=>T.A1,LinkActionModel:()=>a.LinkActionModel,LinkToFieldInterface:()=>h.Li,LinkageFilter:()=>D.ccy,LinkageRuleCategory:()=>B.Od,LinkageRuleDataKeyMap:()=>B.bx,List:()=>D.B8B,LocalDataSource:()=>_.h0,LocationSearchContext:()=>u.bR,M2MFieldInterface:()=>h.Em,M2OFieldInterface:()=>h.ms,Markdown:()=>D.ozN,MarkdownFieldInterface:()=>h.B9,MarkdownReadPretty:()=>D.wN6,MaybeCollectionProvider:()=>m.oe,Menu:()=>D.W1t,MenuConfigure:()=>r.MO,MockFlowModelRepository:()=>a.MockFlowModelRepository,ModalActionSchemaInitializerItem:()=>Y.Au,MultipleSelectFieldInterface:()=>h.if,NAMESPACE_UI_SCHEMA:()=>k.zg,NanoIDInput:()=>D.Q00,NanoidFieldInterface:()=>h.fZ,NocoBaseBuildInPlugin:()=>F.x,NocoBaseDesktopRouteType:()=>T.q2,NocoBaseRecursionField:()=>ei.dw,NocoBaseRouteContext:()=>T.dI,NumberFieldInterface:()=>h.Nj,O2MFieldInterface:()=>h.IL,O2OFieldInterface:()=>h.SB,OBOFieldInterface:()=>h.Sd,OHOFieldInterface:()=>h.Si,OpenModeProvider:()=>eo.R,OverridingCollectionField:()=>h.oO,OverridingFieldAction:()=>h.yu,PMPlugin:()=>j.V_,Page:()=>D.YW0,PagePopups:()=>D.rNg,PageTabs:()=>D.Y2j,Pagination:()=>D.dKS,ParentCollectionFields:()=>Y.y8,ParentRouteContext:()=>D.Zy6,Password:()=>D._22,PasswordFieldInterface:()=>h.NL,Percent:()=>D.QEB,PercentFieldInterface:()=>h.$N,PermissionContext:()=>r.dg,PermissionProvider:()=>r.XI,PhoneFieldInterface:()=>h.wv,PinnedListPlugin:()=>P._,PinnedPluginList:()=>P.i6,PinnedPluginListContext:()=>P.DW,PinnedPluginListProvider:()=>P.P7,Plugin:()=>u.k_,PluginManager:()=>j.R0,PluginManagerLink:()=>j.X1,PluginSettingsManager:()=>u.mz,PopupActionModel:()=>a.PopupActionModel,PopupContextProvider:()=>el.P,PopupSettingsProvider:()=>D.T$Q,PopupSubTableFormActionGroupModel:()=>a.PopupSubTableFormActionGroupModel,PoweredBy:()=>A.G,Preview:()=>D.lNE,QuickEdit:()=>D.gt0,REGEX_OF_VARIABLE:()=>q.vV,REGEX_OF_VARIABLE_IN_EXPRESSION:()=>q.qe,Radio:()=>D.sxL,RadioGroupFieldInterface:()=>h.QZ,ReadPretty:()=>D.hqJ,ReadPrettyRecordPicker:()=>D.w2W,RecordActionGroupModel:()=>a.RecordActionGroupModel,RecordAssociationBlockInitializer:()=>Y.Cg,RecordAssociationDetailsBlockInitializer:()=>Y.QP,RecordAssociationFormBlockInitializer:()=>Y.we,RecordAssociationGridCardBlockInitializer:()=>Y.Q2,RecordAssociationListBlockInitializer:()=>Y.kv,RecordContext_deprecated:()=>I.Ze,RecordFormBlockInitializer:()=>J.BM,RecordIndexContext:()=>I.t9,RecordIndexProvider:()=>I.l2,RecordLink:()=>m.Ur,RecordPicker:()=>D.O$4,RecordPickerContent:()=>a.RecordPickerContent,RecordPickerContext:()=>D.pEl,RecordPickerProvider:()=>D.bee,RecordProvider:()=>I.B4,RecordReadPrettyAssociationFormBlockInitializer:()=>Y.SL,RecordSelectFieldModel:()=>a.RecordSelectFieldModel,RecordSimpleProvider:()=>I.RP,RefreshActionModel:()=>a.RefreshActionModel,RefreshComponentProvider:()=>ei.E0,RefreshDataBlockRequest:()=>D.ud1,RemoteCollectionManagerProvider:()=>h.Ho,RemoteDocumentTitlePlugin:()=>f.L2,RemoteDocumentTitleProvider:()=>f.vB,RemoteSchemaComponent:()=>D.DYS,RemoteSchemaTemplateManagerPlugin:()=>N.IU,RemoteSchemaTemplateManagerProvider:()=>N.sx,RemoteSelect:()=>D.lTd,RemoveButton:()=>D.d09,RemoveConditionContext:()=>D.b7u,RenderChildrenWithAssociationFilter:()=>m.hJ,RequestSettings:()=>D.RhU,RerenderDataBlockProvider:()=>_.Qj,Resizable:()=>X.cM,ResourceActionContext:()=>h.aB,ResourceActionProvider:()=>h.mD,RichText:()=>D.sDQ,RichTextFieldInterface:()=>h.X6,RoleConfigure:()=>r.jc,RoleResourceCollectionContext:()=>r.mW,RoleTable:()=>r.PO,RolesResourcesActions:()=>r.WH,RouteSchemaComponent:()=>T.yU,RouterContextCleaner:()=>u.PK,RouterManager:()=>u.pZ,SNIPPET_PREFIX:()=>u.tJ,SanitizedCollectionProvider:()=>_.N5,SchemaComponent:()=>D.HvB,SchemaComponentContext:()=>D.u4V,SchemaComponentOnChangeContext:()=>D.Doh,SchemaComponentOptions:()=>D.t6u,SchemaComponentPlugin:()=>D.GD6,SchemaComponentProvider:()=>D.OAH,SchemaInitializer:()=>u.IY,SchemaInitializerActionModal:()=>u.z3,SchemaInitializerActionModalInternal:()=>u.Yx,SchemaInitializerChild:()=>u.wp,SchemaInitializerChildren:()=>u.ZI,SchemaInitializerContext:()=>u.dQ,SchemaInitializerDivider:()=>u.Z$,SchemaInitializerItem:()=>u.rR,SchemaInitializerItemContext:()=>u.G8,SchemaInitializerItemGroup:()=>u.G0,SchemaInitializerItemGroupInternal:()=>u.JL,SchemaInitializerItemInternal:()=>u.KK,SchemaInitializerItems:()=>u.e1,SchemaInitializerManager:()=>u.FE,SchemaInitializerMenu:()=>u.$l,SchemaInitializerMenuProvider:()=>u.Ix,SchemaInitializerOpenModeSchemaItems:()=>R.yF,SchemaInitializerPlugin:()=>Y.X1,SchemaInitializerSelect:()=>u.S3,SchemaInitializerSelectInternal:()=>u.Vf,SchemaInitializerSubMenu:()=>u.zw,SchemaInitializerSubMenuInternal:()=>u.gc,SchemaInitializerSwitch:()=>u.qX,SchemaInitializerSwitchInternal:()=>u.NH,SchemaSettingAccessControl:()=>B.Xh,SchemaSettingItemContext:()=>u.KY,SchemaSettingOpenModeSchemaItems:()=>R.sm,SchemaSettings:()=>u.RT,SchemaSettingsActionLinkItem:()=>G.i,SchemaSettingsActionModalItem:()=>B.l,SchemaSettingsBlockHeightItem:()=>B._M,SchemaSettingsBlockTitleItem:()=>B.Pp,SchemaSettingsCascaderItem:()=>B.Wk,SchemaSettingsChild:()=>u.T2,SchemaSettingsChildren:()=>u.Ah,SchemaSettingsConnectDataBlocks:()=>B.$r,SchemaSettingsDataScope:()=>B.Zy,SchemaSettingsDataTemplates:()=>B.iJ,SchemaSettingsDateFormat:()=>B.AH,SchemaSettingsDefaultSortingRules:()=>B.lZ,SchemaSettingsDefaultValue:()=>B.Jw,SchemaSettingsDivider:()=>B.kT,SchemaSettingsDropdown:()=>B.QA,SchemaSettingsEnableChildCollections:()=>B.DE,SchemaSettingsFixed:()=>X.$e,SchemaSettingsFormItemTemplate:()=>B.Sm,SchemaSettingsItem:()=>B.iU,SchemaSettingsItemGroup:()=>B.NT,SchemaSettingsLayoutItem:()=>B.qj,SchemaSettingsLinkageRules:()=>B.f9,SchemaSettingsManager:()=>u.mh,SchemaSettingsModalItem:()=>B.fY,SchemaSettingsNumberFormat:()=>B.vv,SchemaSettingsPlugin:()=>B.SA,SchemaSettingsPopupItem:()=>B.QN,SchemaSettingsProvider:()=>B.Kd,SchemaSettingsRemove:()=>B.d$,SchemaSettingsRenderEngine:()=>B.Fs,SchemaSettingsSelectItem:()=>B.Al,SchemaSettingsSortingRule:()=>B.bO,SchemaSettingsSubMenu:()=>B.OO,SchemaSettingsSwitchItem:()=>B.Qd,SchemaSettingsTemplate:()=>B.lC,SchemaSettingsWrapper:()=>u.OD,SchemaTemplateManagerContext:()=>N.cC,SchemaToolbar:()=>B.Bw,SchemaToolbarContext:()=>u.OI,SchemaToolbarProvider:()=>u.y6,SchemaToolbarVisibleContext:()=>B.Oy,ScopeSelect:()=>r.dn,SearchCollections:()=>Y.Cl,SearchParamsContext:()=>u.yh,SecondConFirm:()=>D.VXI,Select:()=>D.l6P,SelectActionInitializer:()=>Y.J_,SelectFieldInterface:()=>h.ur,SelectWithTitle:()=>x.$d,SetDataLoadingMode:()=>Q.yz,SettingCenterPermissionProvider:()=>r.kL,SettingCenterProvider:()=>r.$k,SettingsCenterConfigure:()=>r.$S,SettingsCenterContext:()=>j.WS,SettingsCenterDropdown:()=>j.wj,SettingsMenuProvider:()=>O.mn,ShowFormData:()=>D.a1G,SkeletonFallback:()=>a.SkeletonFallback,SkipValidation:()=>D.zN,SnowflakeIdFieldInterface:()=>h.xS,Sortable:()=>D.L1H,SortableContext:()=>D.gBZ,SortableItem:()=>D.UqM,SortableProvider:()=>D.gBz,SourceCollection:()=>h.sN,SourceForeignKey:()=>h.l7,SourceKey:()=>h.D0,Space:()=>D.$xS,StablePopover:()=>D.$mi,StrategyActions:()=>r.T,SubFieldDataSourceProvider_deprecated:()=>h.Jq,SubTableColumnModel:()=>a.SubTableColumnModel,SubTableFieldInterface:()=>h.OA,SubTableFieldModel:()=>a.SubTableFieldModel,SubmitActionInitializer:()=>Y.pW,SwitchLanguage:()=>U.r,SyncFieldsAction:()=>h.xG,SyncFieldsActionCom:()=>h.Yy,SyncSQLFieldsAction:()=>h.BK,SystemSettingsPane:()=>$.nS,SystemSettingsPlugin:()=>$.Cz,SystemSettingsSource:()=>$.or,Table:()=>D.XIK,TableActionColumnInitializer:()=>Y.rb,TableAssociationFieldGroupModel:()=>a.TableAssociationFieldGroupModel,TableBlockContext:()=>m.V3,TableBlockDesigner:()=>D.v93,TableBlockInitializer:()=>X.IB,TableBlockModel:()=>a.TableBlockModel,TableBlockProvider:()=>m.to,TableColumnModel:()=>a.TableColumnModel,TableColumnSchemaToolbar:()=>X.lI,TableField:()=>D.Bmi,TableFieldContext:()=>m.G8,TableFieldProvider:()=>m.Cc,TableFieldResource:()=>m.vv,TableSelectorContext:()=>m.$1,TableSelectorDesigner:()=>D.p9h,TableSelectorInitializer:()=>Z.w,TableSelectorParamsProvider:()=>m.bp,TableSelectorProvider:()=>m.j4,TableV2:()=>D.Hi5,TableoidFieldInterface:()=>h.YK,Tabs:()=>D.tUM,TabsContextProvider:()=>D.hY7,TargetForeignKey:()=>h.Pg,TargetKey:()=>h.n0,TemplateBlockProvider:()=>m.lm,TemplateSummary:()=>h.N8,Templates:()=>D.I5x,TestDesigner:()=>D.qIn,TextAreaWithContextSelector:()=>a.TextAreaWithContextSelector,TextAreaWithGlobalScope:()=>D.Ur4,TextareaFieldInterface:()=>h.OK,ThroughCollection:()=>h.Uq,ThroughForeignKey:()=>h.P$,TimeFieldInterface:()=>h.ju,TimePicker:()=>D.AG,TreeSelect:()=>D.f7I,UUIDFieldInterface:()=>h.nF,UnSupportFields:()=>h.u6,UnixTimestamp:()=>D.zVE,UnixTimestampFieldInterface:()=>h.qT,UpdateRecordActionModel:()=>a.UpdateRecordActionModel,UpdatedAtFieldInterface:()=>h.A8,UpdatedByFieldInterface:()=>h.CT,Upload:()=>D._OO,Uploader:()=>D.d9b,UrlFieldInterface:()=>h.Nc,Variable:()=>D.rTt,VariableFilterItem:()=>a.VariableFilterItem,VariableInput:()=>B.P8,VariablePopupRecordProvider:()=>ea.P3,VariableScope:()=>q.j0,VariableScopeProvider:()=>D.sIN,VariableSelect:()=>D.PnP,VariablesContext:()=>q.jT,VariablesProvider:()=>q.fK,ViewCollectionField:()=>h.w7,ViewFieldAction:()=>h.YG,WithoutFormFieldResource:()=>m.vi,WithoutTableFieldResource:()=>m.nI,actionSettings:()=>D.Sh8,actionSettingsItems:()=>D.MoU,addCustomAlgorithmToTheme:()=>y._l,allowAddNew:()=>D.lE3,appendQueryStringToUrl:()=>m.gN,applyCollectionFieldUiSchemaToDefaultValueSchema:()=>B.Ux,applyMobilePaginationProps:()=>a.applyMobilePaginationProps,attachmentFileTypes:()=>D.lNX,autoFill:()=>h.l5,autoIncrement:()=>h.N1,canMakeAssociationBlock:()=>Y.xj,collectionDataSource:()=>h.C8,compatOldTheme:()=>y.Ne,completeURL:()=>m.Dg,compose:()=>u.Zz,constraintsProps:()=>h.jg,createCompactSimpleItemRender:()=>a.createCompactSimpleItemRender,createCreateFormBlockUISchema:()=>J.U9,createDesignable:()=>D.pxY,createDetailsBlockSchema:()=>Y.DJ,createFormActionInitializers:()=>J.CQ,createFormActionInitializers_deprecated:()=>J.E9,createFormBlockSchema:()=>Y.je,createFormBlockSettings:()=>J.NO,createModalSettingsItem:()=>u.IN,createReadPrettyFormBlockSchema:()=>Y.TA,createRouterManager:()=>u.xd,createSelectSchemaSettingsItem:()=>u.IF,createStyles:()=>E.r,createSwitchSettingsItem:()=>u.$c,createTableBlockSchema:()=>Y.JP,createTableBlockUISchema:()=>X.DJ,createTextSettingsItem:()=>u.pi,customAlgorithm:()=>y.ze,customFormItemInitializers:()=>Y.qf,customFormItemInitializers_deprecated:()=>Y.KL,dataSource:()=>h.Ex,dateTimeProps:()=>h.E2,defaultFieldNames:()=>D.KDQ,defaultInputStyle:()=>B.D0,defaultProps:()=>h.Gs,defaultTheme:()=>y.zQ,dispatchEventDeep:()=>a.dispatchEventDeep,ds:()=>h.ds,editFormBlockSettings:()=>J.RG,editMarkdownFlow:()=>a.editMarkdownFlow,fetchTemplateData:()=>D.rlt,fieldComponentSettingsItem:()=>_.I1,fieldSettingsFormItem:()=>J.ln,fileSizeSetting:()=>er.oc,fillParentFields:()=>m.Rg,filterFormItemSettings:()=>D.Dgp,findByUid:()=>D.X6x,findFilterTargets:()=>m.OP,findFirstPageRoute:()=>T.sj,findFormBlock:()=>m.r9,findKanbanFormItem:()=>_.SG,findKeysByUid:()=>D.VFg,findMenuItem:()=>D.OZ6,findParentFieldSchema:()=>B.Jq,findRouteBySchemaUid:()=>T.bl,formActionInitializers:()=>J.eI,formDetailsSettings:()=>D.QIX,formItemInitializers:()=>J.rj,formItemInitializers_deprecated:()=>J.Lm,formItemSettings:()=>D.DVX,formSettings:()=>D.UyB,formV1Settings:()=>D.$Eq,genStyleHook:()=>D.fDF,getAppends:()=>m.c3,getAssociationPath:()=>m.jh,getCardItemSchema:()=>m.Km,getCollectionTitle:()=>W.R,getConfigurableProperties:()=>h.TC,getCurrentOptions:()=>D.oMF,getDataSourceHeaders:()=>_.kb,getDateExact:()=>D.Q2z,getDatePickerLabels:()=>D.Mwt,getDateRanges:()=>D.fDM,getFieldDefaultValue:()=>B.lD,getFilterByTkByCollection:()=>m.g7,getFlowPageMenuSchema:()=>eu.g,getFormValues:()=>m.ru,getIdsWithChildren:()=>m.O6,getLabelFormatValue:()=>D.PB5,getLabelWithTooltip:()=>B.YO,getPageMenuSchema:()=>et.my,getPageSchema:()=>m.RN,getPinnedPluginListKeys:()=>P.k4,getPopupPathFromParams:()=>D.C5g,getRenderContent:()=>D.a2g,getSchemaSettingsConfirmZIndex:()=>B.rf,getSchemaSettingsDialogZIndex:()=>B.tN,getShouldChange:()=>B.io,getSimpleModePaginationClassName:()=>a.getSimpleModePaginationClassName,getStoredPopupContext:()=>D.lSn,getSupportFieldsByAssociation:()=>g.Lt,getSupportFieldsByForeignKey:()=>g.Rm,getSystemSettingsMutationData:()=>$.mY,getTabSchema:()=>D.jZb,getURLSearchParams:()=>B._V,getURLSearchParamsChildren:()=>B.B_,getUniqueKeyFromCollection:()=>h.$e,getUnknownCountPaginationTotal:()=>a.getUnknownCountPaginationTotal,getVariableComponentWithScope:()=>K.Iy,getVariableValue:()=>x.Wu,getVariablesFromExpression:()=>q.e3,getZIndex:()=>D.flR,gridRowColWrap:()=>Y.xH,handleDateChangeOnForm:()=>D.QD_,hasIcon:()=>C.cE,i18n:()=>k.Ru,icons:()=>C.Pt,inferPickerType:()=>D.Pnr,interfacesOfUnsupportedDefaultValue:()=>B.lM,interfacesProperties:()=>h.q,isAssocField:()=>g.W0,isBulkEditAction:()=>D.PSc,isDeleteButtonDisabled:()=>h.WL,isFileCollection:()=>D.XOn,isInFilterFormBlock:()=>g.vc,isInitializersSame:()=>u.qt,isMobile:()=>D.FrL,isPatternDisabled:()=>B.h2,isSameCollection:()=>g.TQ,isShowFilePicker:()=>D.GmQ,isSystemField:()=>B.kr,isTabPage:()=>D.nKd,isTitleField:()=>_.ji,isVariable:()=>q.DZ,isWriteEmailAction:()=>D.cWk,itemsMerge:()=>Y.jz,joinCollectionName:()=>h.Sv,joinUrlSearch:()=>a.joinUrlSearch,languageCodes:()=>w.XK,lazy:()=>M.RZ,locale:()=>w.Ay,mapDatePicker:()=>D.x1p,mapRangePicker:()=>D.UTu,mapTimeFormat:()=>D.JDj,matchMimetype:()=>D._bM,mergeFilter:()=>g.Dj,mergePaginationClassName:()=>a.mergePaginationClassName,mockAPIClient:()=>z.a,moment2str:()=>D.msY,navigateToTab:()=>D.s23,navigateWithinSelf:()=>m.Ff,normalizeContainer:()=>u.Bv,openViewFlow:()=>a.openViewFlow,operators:()=>h.II,pageSettings:()=>D.fM,pageTabSettings:()=>D.uUT,parseCollectionName:()=>h.Hu,parseVariablesAndChangeParamsToQueryString:()=>m.iz,primaryKey:()=>h.ie,readPrettyFormSettings:()=>D.ud$,recordBlockInitializers:()=>Y.o$,recordBlockInitializers_deprecated:()=>Y.GA,recordPickerViewer:()=>h.mK,recursiveParent:()=>m.H2,reduceValueSize:()=>m.hu,registerIcon:()=>C.pU,registerIcons:()=>C.K1,registerInitializerMenusGenerator:()=>Y.LR,relationshipType:()=>h.B1,removeNullCondition:()=>D.pA3,replaceVariableValue:()=>m.WY,replaceVariables:()=>B.qk,requestParentRecordData:()=>_.$G,resolveFilterPickerFormat:()=>D.CEt,reverseFieldProperties:()=>h.Mw,schemaSettingsLabelLayout:()=>B.jN,setDataLoadingModeSettingsItem:()=>Q.qm,setDefaultSortingRulesSchemaSettingsItem:()=>B.ez,setTheDataScopeSchemaSettingsItem:()=>B.dh,shouldRenderIconInTitle:()=>T.Uc,showFileName:()=>er.FU,splitWrapSchema:()=>D.kBD,storePopupContext:()=>D.NVg,subTableActionInitializers:()=>Y.cj,subTableActionInitializers_deprecated:()=>Y.m,systemKeys:()=>B.Kg,tabPaneInitializers:()=>Y.fq,tabPaneInitializersForBulkEditFormBlock:()=>Y.BM,tabPaneInitializersForRecordBlock:()=>Y.C6,tabPaneInitializers_deprecated:()=>Y.DP,tableActionColumnInitializers:()=>X.Wf,tableActionColumnInitializers_deprecated:()=>X.Wd,tableActionInitializers:()=>X.kL,tableActionInitializers_deprecated:()=>X.Wc,tableBlockSettings:()=>X.Fe,tableColumnInitializers:()=>X.Cg,tableColumnInitializers_deprecated:()=>X.UH,tableColumnSettings:()=>X._s,tableSelectorBlockSettings:()=>Z.A,timeProps:()=>h.kg,titleField:()=>a.titleField,toToolsMap:()=>ec.f,transformFilter:()=>ed.transformFilter,transformToFilter:()=>g.SU,transformVariableValue:()=>q.Ap,tval:()=>k.ul,type:()=>h.NW,unique:()=>h.Am,updateFilterTargets:()=>m.Ez,updateFormActionInitializers:()=>J.Zg,updateFormActionInitializers_deprecated:()=>J.T,useACLActionParamsContext:()=>r.Zj,useACLContext:()=>r.bq,useACLFieldWhitelist:()=>r.xy,useACLRoleContext:()=>r.v6,useACLRolesCheck:()=>r.X0,useAPIClient:()=>s.VB,useAPITokenVariable:()=>B.ff,useAclSnippets:()=>u.K3,useActionAvailable:()=>Q.$R,useActionBarContext:()=>D.MIq,useActionContext:()=>D.D50,useAdminSchemaUid:()=>S.w,useAfterSuccessOptions:()=>D.bZ4,useAllAccessDesktopRoutes:()=>T.nr,useAllCollectionsInheritChainGetter:()=>_.LQ,useAllDataBlocks:()=>D.dWC,useApp:()=>u.nm,useAppLangContext:()=>i.IK,useAppSpin:()=>u.vk,useAriaAttributeOfMenuItem:()=>u.yb,useAssociatedFields:()=>g.ze,useAssociatedFormItemInitializerFields:()=>Y.aY,useAssociatedTableColumnInitializerFields:()=>Y.vP,useAssociationCreateActionProps:()=>m.Pj,useAssociationFieldContext:()=>D.G2C,useAssociationFieldModeContext:()=>D.Xjr,useAssociationFilterBlockProps:()=>m.UN,useAssociationFilterProps:()=>m.L1,useAssociationName:()=>_.UJ,useAssociationNames:()=>m.Ry,useAsyncData:()=>c.e6,useAttach:()=>D.TDH,useBackButton:()=>D.zEg,useBaseVariable:()=>B.de,useBlockAssociationContext:()=>m.Ps,useBlockConfigs:()=>p.oL,useBlockContext:()=>m.MX,useBlockHeight:()=>D.a97,useBlockHeightProps:()=>m.es,useBlockRequestContext:()=>m.J6,useBlockResource:()=>m.V0,useBlockTemplateContext:()=>N.kU,useBuiltinVariables:()=>q.c7,useBulkDestroyAction:()=>h.ZC,useBulkDestroyActionAndRefreshCM:()=>h.uq,useBulkDestroyActionProps:()=>m.Y0,useCancelAction:()=>h.Y7,useCloseAction:()=>D.GjU,useCollectValuesToSubmit:()=>m.TJ,useCollection:()=>_.Ge,useCollectionDataSource:()=>h.LF,useCollectionDataSourceItems:()=>Y.nG,useCollectionField:()=>_.E1,useCollectionFieldFormValues:()=>h.mY,useCollectionField_deprecated:()=>h.gp,useCollectionFields:()=>_.$h,useCollectionFieldsOptions:()=>h.Tt,useCollectionFilterOptions:()=>h.OU,useCollectionHistory:()=>h.W,useCollectionManager:()=>_.r2,useCollectionManager_deprecated:()=>h.nj,useCollectionParentRecord:()=>_.Vm,useCollectionParentRecordData:()=>_.vt,useCollectionRecord:()=>_.PD,useCollectionRecordData:()=>_.zv,useCollectionState:()=>B.lI,useCollection_deprecated:()=>h.k7,useCollections:()=>_.Xd,useColumnSchema:()=>D.BCL,useColumnSettings:()=>D.dbD,useCompatOldVariables:()=>B.aw,useCompile:()=>D.lum,useComponent:()=>D.xZI,useContextAssociationFields:()=>B.JV,useContextVariable:()=>q.Rr,useCreateActionProps:()=>m.wx,useCreateAssociationDetailsBlock:()=>Y.ug,useCreateAssociationDetailsWithoutPagination:()=>Y.Xr,useCreateAssociationFormBlock:()=>Y.MG,useCreateAssociationGridCardBlock:()=>Y.EC,useCreateAssociationListBlock:()=>Y.Q9,useCreateAssociationTableBlock:()=>Y.m5,useCreateEditFormBlock:()=>J.fi,useCreateFormBlock:()=>J.tH,useCreateTableBlock:()=>X.Hb,useCurrentAppInfo:()=>d.gL,useCurrentDocumentTitle:()=>f.er,useCurrentPageUid:()=>u.es,useCurrentPopupContext:()=>D.IX0,useCurrentPopupRecord:()=>ea.EZ,useCurrentRoleMode:()=>r.GL,useCurrentRoleVariable:()=>B.TV,useCurrentRoles:()=>O._N,useCurrentRoute:()=>T.K7,useCurrentSchema:()=>Y.oK,useCurrentSearchParams:()=>u.dT,useCurrentTabUid:()=>u.CR,useCurrentUserContext:()=>O.BW,useCurrentUserSettingsMenu:()=>O.Gg,useCurrentUserVariable:()=>B.oW,useCustomizeBulkUpdateActionProps:()=>m.qj,useCustomizeRequestActionProps:()=>m.Bq,useCustomizeUpdateActionProps:()=>m.Gb,useDataBlock:()=>_.$$,useDataBlockHeight:()=>D.mhY,useDataBlockParentRecord:()=>m.Q7,useDataBlockProps:()=>_.h6,useDataBlockRequest:()=>_._J,useDataBlockRequestData:()=>_.YE,useDataBlockRequestGetter:()=>_.ZK,useDataBlockResource:()=>_.jz,useDataLoadingMode:()=>Q.fY,useDataSource:()=>_.xw,useDataSourceFromRAC:()=>h.PN,useDataSourceHeaders:()=>_.TF,useDataSourceKey:()=>_.Mp,useDataSourceManager:()=>_.m6,useDataTemplates:()=>B.dF,useDatePickerContext:()=>D.nxV,useDateVariable:()=>B.Yv,useDatetimeVariable:()=>B.hY,useDatetimeVariableContext:()=>B.U$,useDeleteRouteSchema:()=>T.NH,useDesignable:()=>D.erX,useDesigner:()=>D.Hbp,useDestroyAction:()=>h.YZ,useDestroyActionAndRefreshCM:()=>h.uk,useDestroyActionProps:()=>m.eZ,useDetailsBlockContext:()=>m.gU,useDetailsBlockProps:()=>m.nw,useDetailsDecoratorProps:()=>Q.DM,useDetailsPaginationProps:()=>m.EV,useDetailsParentRecord:()=>Q.lJ,useDetailsProps:()=>Q.Yb,useDetailsWithPaginationBlockParams:()=>Q.lO,useDetailsWithPaginationDecoratorProps:()=>Q.Bd,useDetailsWithPaginationProps:()=>Q.ys,useDisassociateActionProps:()=>m.wY,useDocumentTitle:()=>f.rN,useDownloadLogs:()=>D.nu1,useEditTableActionProps:()=>m.Il,useEnsureOperatorsValid:()=>D.lhV,useExactDateVariable:()=>B.vm,useExactDateVariableContext:()=>B.gQ,useExtendCollections:()=>_.h_,useFieldComponentName:()=>x.qA,useFieldComponentOptions:()=>D.xB5,useFieldInterfaceOptions:()=>h.nO,useFieldMode:()=>D.J1,useFieldModeOptions:()=>D.jE9,useFieldNames:()=>D.gZ,useFieldProps:()=>D.OJX,useFieldTitle:()=>D.Us6,useFilterAPI:()=>g.eB,useFilterActionProps:()=>D.Um,useFilterBlock:()=>g.xZ,useFilterBlockActionProps:()=>m.B6,useFilterByTk:()=>m.E6,useFilterFieldOptions:()=>D.g9w,useFilterFieldProps:()=>D.yGk,useFilterOptions:()=>D.uwA,useFindComponent:()=>D.QIi,useFlag:()=>b._P,useFormActiveFields:()=>m.dW,useFormBlockContext:()=>m.Es,useFormBlockProps:()=>m.xp,useFormBlockType:()=>m.zE,useFormDataTemplates:()=>D.nlx,useFormFieldContext:()=>m.bt,useFormFieldProps:()=>m.U5,useFormItemInitializerFields:()=>Y.g_,useGetAriaLabelOfAction:()=>D.U8O,useGetAriaLabelOfDesigner:()=>B.$X,useGetAriaLabelOfDrawer:()=>D.HPy,useGetAriaLabelOfModal:()=>D.tO8,useGetAriaLabelOfPopover:()=>D.l2i,useGetFilterFieldOptions:()=>D.OqW,useGetFilterOptions:()=>D.wnJ,useGetSchemaInitializerMenuItems:()=>u.q9,useGlobalTheme:()=>y.my,useGlobalVariable:()=>u.$q,useGlobalVariableCtx:()=>u.i0,useGridContext:()=>D.ZB7,useGridRowContext:()=>D.FVw,useHistoryCollectionsByNames:()=>h.gV,useInheritsTableColumnInitializerFields:()=>Y.FJ,useInsertPageSchema:()=>et.rP,useIsAddNewForm:()=>D.TNL,useIsAdminPage:()=>u.MJ,useIsAllowToSetDefaultValue:()=>B.eT,useIsAssociationField:()=>D.xq$,useIsDetailBlock:()=>m.yH,useIsFieldReadPretty:()=>D.U5u,useIsFileField:()=>D.oAT,useIsFormReadPretty:()=>D.q7s,useIsInSettingsPage:()=>u.JY,useIsLoggedIn:()=>O.DB,useIsSameOrChildCollection:()=>B.j6,useIsSelectFieldMode:()=>D.jeY,useIsSubPageClosedByPageMenu:()=>u.ol,useKeepAlive:()=>T.Y,useKeepAliveLocationSearch:()=>D.xAQ,useLabelUiSchema:()=>D.RB3,useLazy:()=>M._P,useLinkActionProps:()=>m.Su,useLinkageAction:()=>D.LtX,useLinkageCollectionFilterOptions:()=>h.NU,useListBlockContext:()=>D.cl6,useLocalVariables:()=>q.gp,useLocalVariablesWithoutCustomVariable:()=>q.T_,useLocationNoUpdate:()=>u.zd,useLocationSearch:()=>u.$Q,useMenuDragEnd:()=>D.yt2,useMenuSearch:()=>Y.Fh,useMenuTranslation:()=>D.Qgm,useMobileLayout:()=>T.mY,useNavigateNoUpdate:()=>u.vx,useNocoBaseRoutes:()=>D.Ob5,useOpenModeContext:()=>eo.k,useOptionalFieldList:()=>m._q,useParamsFromRecord:()=>m.DQ,useParentCollection:()=>_.KY,useParentRecordCommon:()=>ee.M,useParentRoute:()=>D.TrS,useParseDataScopeFilter:()=>B.hJ,useParseURLAndParams:()=>m.Zj,useParsedFilter:()=>m.jY,usePickActionProps:()=>m.RH,usePlugin:()=>u.nu,usePopupSettings:()=>D.X43,usePopupUtils:()=>en.H,usePopupVariable:()=>B.GL,usePopupVariableContext:()=>B.hK,useProps:()=>D.YYe,useRecord:()=>I.pE,useRecordCollectionDataSourceItems:()=>Y.aU,useRecordIndex:()=>I.Hg,useRecordIsOwn:()=>I.BH,useRecordPkValue:()=>r.fr,useRefreshActionProps:()=>m.tG,useRefreshFieldSchema:()=>ei.o8,useRemoteCollectionManagerLoading:()=>h.RH,useRemoveActionProps:()=>m.Gg,useRemoveGridFormItem:()=>Y.l,useRequest:()=>s.bP,useRerenderDataBlock:()=>_.Kx,useResetBlockActionProps:()=>m.yE,useResource:()=>s.qK,useResourceActionContext:()=>h.br,useResourceContext:()=>h.xh,useRoleRecheck:()=>r.N5,useRoleVariable:()=>B._K,useRolesResourcesScopesSelectedRowKeys:()=>r.OV,useRouter:()=>u.rd,useRouterBasename:()=>u.$y,useSchemaComponentContext:()=>D.Fag,useSchemaInitializer:()=>u.fx,useSchemaInitializerItem:()=>u.eL,useSchemaInitializerMenuItems:()=>u.AK,useSchemaInitializerRender:()=>u.vt,useSchemaInitializerStyles:()=>u.Lm,useSchemaInitializerSubMenuContext:()=>u.Zk,useSchemaOptionsContext:()=>D.MqW,useSchemaSettings:()=>B.KR,useSchemaSettingsItem:()=>u.vr,useSchemaSettingsRender:()=>u.y$,useSchemaTemplate:()=>N.D$,useSchemaTemplateManager:()=>N.ov,useSchemaToolbar:()=>u.C5,useSchemaToolbarRender:()=>u.s6,useSortFields:()=>h.lY,useSourceId:()=>Q.YF,useSourceIdFromParentRecord:()=>m.hY,useSourceIdFromRecord:()=>m.ZC,useStyles:()=>D.ISS,useSupportedBlocks:()=>g.Uf,useSyncFromForm:()=>B.r3,useSystemSettings:()=>$.e6,useSystemSettingsVariable:()=>B.G,useTableBlockContext:()=>m.El,useTableBlockContextBasicValue:()=>m.Vb,useTableBlockDecoratorProps:()=>X.Av,useTableBlockParams:()=>X.Lu,useTableBlockProps:()=>X.ZI,useTableColumnInitializerFields:()=>Y.HG,useTableColumnIntegration:()=>D.i_r,useTableColumns:()=>m.XS,useTableFieldContext:()=>m.tt,useTableFieldProps:()=>m.cY,useTableSelectorContext:()=>m.K8,useTableSelectorProps:()=>m.fX,useTableSize:()=>D.LjE,useTabsContext:()=>D.f2z,useTemplateBlockContext:()=>m.yn,useTitleFieldOptions:()=>D.kDr,useToken:()=>E.K,useUIConfigurationPermissions:()=>r.uM,useURLAndHTMLSchema:()=>K.my,useURLSearchParamsCtx:()=>B.yu,useURLSearchParamsVariable:()=>B.hx,useUpdateActionProps:()=>m.f2,useUpdateCollectionActionAndRefreshCM:()=>h.ry,useUploadStyles:()=>D.dF1,useUserVariable:()=>B.vY,useValidateSchema:()=>D.doK,useValuesFromRecord:()=>h.Jn,useVariableOptions:()=>B._R,useVariableScope:()=>D.ami,useVariableScopeInfo:()=>q.g5,useVariables:()=>q.$l,useViewport:()=>S.k,useZIndexContext:()=>D.$5j,withDynamicSchemaProps:()=>H.T,withInitializer:()=>u.Vr,withSearchParams:()=>D.tXY,withSkeletonComponent:()=>V.t,zIndexContext:()=>D.Eaz}),o(37260),o(60339),o(65132),o(43017),o(38694),o(95836),o(26362),o(45814),o(29663),o(36519);var l=o(10691),n={};for(let e in l)0>["EditFormModel","PopupSubTableFormActionGroupModel","AddChildActionModel","InputFieldModel","PopupContextProvider","usePopupUtils","LinkActionModel","BlockModel","FormSubmitActionModel","joinUrlSearch","FilterFormBlockModel","FormActionGroupModel","RecordSelectFieldModel","DetailsCustomItemModel","GridModel","RefreshActionModel","CollectionBlockModel","DetailsBlockModel","JSActionModel","PopupActionModel","getUnknownCountPaginationTotal","openViewFlow","OpenModeProvider","FormAssociationFieldGroupModel","withDynamicSchemaProps","FilterFormItemModel","languageCodes","getVariableComponentWithScope","AssignFormModel","DisplayTextFieldModel","FilterActionModel","transformFilter","useOpenModeContext","SubTableColumnModel","ActionModel","BlockGridModel","FieldModel","CollectionActionGroupModel","DetailsGridModel","CollectionActionModel","AddNewActionModel","ActionSceneEnum","ClickableFieldModel","editMarkdownFlow","FormItem","useInsertPageSchema","ChildPageModel","getSimpleModePaginationClassName","dispatchEventDeep","VariablePopupRecordProvider","CreateFormModel","IsInNocoBaseRecursionFieldContext","FieldModelRenderer","DisplayTitleFieldModel","locale","DataBlockModel","ActionGroupModel","CodeEditorExtension","withSkeletonComponent","RecordActionGroupModel","SubTableFieldModel","titleField","SwitchLanguage","getPageMenuSchema","FilterGroup","UpdateRecordActionModel","CollectionFieldUISchemaProvider","FormGridModel","TableColumnModel","NocoBaseRecursionField","ChildPageTabModel","FormBlockModel","VariableFilterItem","RefreshComponentProvider","MockFlowModelRepository","fileSizeSetting","default","FilterBlockModel","useRefreshFieldSchema","DetailsItemModel","TextAreaWithContextSelector","CommonItemModel","FormActionModel","FormComponent","CodeEditor","SkeletonFallback","applyMobilePaginationProps","createCompactSimpleItemRender","TableBlockModel","RecordPickerContent","TableAssociationFieldGroupModel","FilterFormActionGroupModel","DisplaySubTableFieldModel","BlockSceneEnum","useCurrentPopupRecord","FormItemModel","DetailsAssociationFieldGroupModel","SchemaSettingsActionLinkItem","showFileName","useURLAndHTMLSchema","mergePaginationClassName"].indexOf(e)&&(n[e]=()=>l[e]);o.d(t,n);var a=o(13975),r=o(41906),i=o(51771),s=o(16211),d=o(94702),u=o(17157),c=o(13274),p=o(29594),m=o(18111),h=o(43288),x=o(53770),v=o(25739),_=o(28227),f=o(50255),g=o(65613),b=o(69575),y=o(79980),S=o(18226),k=o(7271),C=o(60430),M=o(88448),w=o(28601),F=o(21676),P=o(6997),j=o(76028),A=o(92627),I=o(41944),T=o(93160),D=o(82924),L=o(2046),Y=o(5101),R=o(18272),B=o(99300),N=o(96932),E=o(49948),$=o(86393),z=o(48245),O=o(84693),q=o(43923),H=o(80461),V=o(99847),U=o(24943),G=o(39315),K=o(1590),W=o(56250),J=o(12416),X=o(77526),Z=o(92452),Q=o(97173),ee=o(14696),et=o(52973),eo=o(38693),el=o(47851),en=o(84313),ea=o(39888),er=o(15701),ei=o(30644),es=o(504),ed=o(63526),eu=o(40854),ec=o(83249)},88448(e,t,o){o.d(t,{PE:()=>i,RZ:()=>d,_P:()=>u});var l=o(71178),n=o(51649),a=o(52793),r=o(77583);let i=Symbol("LAZY_COMPONENT_KEY"),s=new Map;function d(e){for(var t=arguments.length,o=Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];if(0===o.length){let t=(0,n.lazy)(()=>e().then(e=>{let t=e.default;return o[i]=t,{default:t}})),o=e=>(0,l.jsx)(n.default.Suspense,{fallback:(0,l.jsx)(a.Spin,{}),children:(0,l.jsx)(t,{...e})});return o}return o.reduce((t,o)=>{let s=(0,n.lazy)(()=>e().then(e=>{let l=(0,r.get)(e,o);return t[o][i]=l,{default:l}}));return t[o]=e=>(0,l.jsx)(n.default.Suspense,{fallback:(0,l.jsx)(a.Spin,{}),children:(0,l.jsx)(s,{...e})}),t},{})}function u(e,t){let o="function"==typeof t?t:e=>e[t],l=e.toString(),n=s.get(l);if(null==n?void 0:n.error)throw n.error;if(null==n?void 0:n.module)return o(n.module);if(!(null==n?void 0:n.promise)){let t=n||{};throw t.promise=e().then(e=>(t.module=e,e)).catch(e=>{throw t.error=e,e}),s.set(l,t),t.promise}throw n.promise}},28601(e,t,o){o.d(t,{At:()=>l,Ay:()=>a,XK:()=>n});let l={"ar-EG":"ar","az-AZ":"az","bg-BG":"bg","bn-BD":"bn-bd","by-BY":"en","ca-ES":"ca","cs-CZ":"cs","da-DK":"da","de-DE":"de","el-GR":"el","en-GB":"en-gb","en-US":"en","es-ES":"es","et-EE":"et","fa-IR":"fa","fi-FI":"fi","fr-BE":"fr","fr-CA":"fr","fr-FR":"fr","ga-IE":"ga","gl-ES":"gl","he-IL":"he","hi-IN":"hi","hr-HR":"hr","hu-HU":"hu","hy-AM":"hy-am","id-ID":"id","is-IS":"is","it-IT":"it","ja-JP":"ja","ka-GE":"ka","kk-KZ":"kk","km-KH":"km","kn-IN":"kn","ko-KR":"ko","ku-IQ":"ku","lt-LT":"lt","lv-LV":"lv","mk-MK":"mk","ml-IN":"ml","mn-MN":"mn","ms-MY":"ms","nb-NO":"nb","ne-NP":"ne","nl-BE":"nl-be","nl-NL":"nl","pl-PL":"pl","pt-BR":"pt-br","pt-PT":"pt","ro-RO":"ro","ru-RU":"ru","si-LK":"si","sk-SK":"sk","sl-SI":"sl","sr-RS":"sr","sv-SE":"sv","ta-IN":"ta","th-TH":"th","tk-TK":"tk","tr-TR":"tr","uk-UA":"uk","ur-PK":"ur","vi-VN":"vi","zh-CN":"zh-cn","zh-HK":"zh-hk","zh-TW":"zh-tw"},n={"ar-EG":{label:"العربية"},"az-AZ":{label:"Azərbaycan dili"},"bg-BG":{label:"Български"},"bn-BD":{label:"Bengali"},"by-BY":{label:"Беларускі"},"ca-ES":{label:"Сatal\xe0/Espanya"},"cs-CZ":{label:"Česky"},"da-DK":{label:"Dansk"},"de-DE":{label:"Deutsch"},"el-GR":{label:"Ελληνικά"},"en-GB":{label:"English(GB)"},"en-US":{label:"English"},"es-ES":{label:"Espa\xf1ol"},"et-EE":{label:"Estonian (Eesti)"},"fa-IR":{label:"فارسی"},"fi-FI":{label:"Suomi"},"fr-BE":{label:"Fran\xe7ais(BE)"},"fr-CA":{label:"Fran\xe7ais(CA)"},"fr-FR":{label:"Fran\xe7ais"},"ga-IE":{label:"Gaeilge"},"gl-ES":{label:"Galego"},"he-IL":{label:"עברית"},"hi-IN":{label:"हिन्दी"},"hr-HR":{label:"Hrvatski jezik"},"hu-HU":{label:"Magyar"},"hy-AM":{label:"Հայերեն"},"id-ID":{label:"Bahasa Indonesia"},"is-IS":{label:"\xcdslenska"},"it-IT":{label:"Italiano"},"ja-JP":{label:"日本語"},"ka-GE":{label:"ქართული"},"kk-KZ":{label:"Қазақ тілі"},"km-KH":{label:"ភាសាខ្មែរ"},"kn-IN":{label:"ಕನ್ನಡ"},"ko-KR":{label:"한국어"},"ku-IQ":{label:"کوردی"},"lt-LT":{label:"lietuvių"},"lv-LV":{label:"Latviešu valoda"},"mk-MK":{label:"македонски јазик"},"ml-IN":{label:"മലയാളം"},"mn-MN":{label:"Монгол хэл"},"ms-MY":{label:"بهاس ملايو"},"nb-NO":{label:"Norsk bokm\xe5l"},"ne-NP":{label:"नेपाली"},"nl-BE":{label:"Vlaams"},"nl-NL":{label:"Nederlands"},"pl-PL":{label:"Polski"},"pt-BR":{label:"Portugu\xeas brasileiro"},"pt-PT":{label:"Portugu\xeas"},"ro-RO":{label:"Rom\xe2nia"},"ru-RU":{label:"Русский"},"si-LK":{label:"සිංහල"},"sk-SK":{label:"Slovenčina"},"sl-SI":{label:"Slovenščina"},"sr-RS":{label:"српски језик"},"sv-SE":{label:"Svenska"},"ta-IN":{label:"Tamil"},"th-TH":{label:"ภาษาไทย"},"tk-TK":{label:"Turkmen"},"tr-TR":{label:"T\xfcrk\xe7e"},"uk-UA":{label:"Українська"},"ur-PK":{label:"اردو"},"uz-UZ":{label:"Oʻzbekcha"},"vi-VN":{label:"Tiếng Việt"},"zh-CN":{label:"简体中文"},"zh-HK":{label:"繁體中文(香港)"},"zh-TW":{label:"繁體中文(台湾)"}},a=n},39315(e,t,o){o.d(t,{V:()=>v,i:()=>x});var l=o(71178),n=o(56220),a=o(56920);o(51649);var r=o(77843),i=o(44374),s=o(17157),d=o(38951),u=o(45036),c=o(43288),p=o(99300),m=o(1590),h=o(28227);let x=()=>{let e=(0,a.useField)(),t=(0,a.useFieldSchema)(),{dn:o}=(0,i.useDesignable)(),{t:s}=(0,r.useTranslation)(),{urlSchema:d,paramsSchema:u,openInNewWindowSchema:c}=(0,m.my)(),h=t["x-component-props"]||{},x={url:h.url,params:h.params||[{}],openInNewWindow:h.openInNewWindow};return(0,l.jsx)(p.fY,{title:s("Edit link"),components:{ArrayItems:n.ArrayItems},schema:{type:"object",title:s("Edit link"),properties:{url:{...d,required:!0},params:u,openInNewWindow:c}},onSubmit:l=>{let{url:n,params:a,openInNewWindow:r}=l;h.url=n,h.params=a,h.openInNewWindow=r,t["x-component-props"]=h,e.componentProps.url=n,e.componentProps.params=a,e.componentProps.openInNewWindow=r,o.emit("patch",{schema:{"x-uid":t["x-uid"],"x-component-props":h}}),o.refresh()},initialValues:x})},v=new d.R({name:"actionSettings:link",items:[{name:"editButton",Component:u.Yp,useComponentProps(){let{buttonEditorProps:e}=(0,s.C5)();return e}},{name:"editLink",Component:x},{name:"linkageRules",Component:p.f9,useComponentProps(){let{linkageRulesProps:e}=(0,s.C5)(),{association:t}=(0,h.h6)()||{},{getCollectionField:o}=(0,c.nj)();return o(t),{...e}}},p.Xh,{name:"remove",sort:100,Component:u.d0,useComponentProps(){let{removeButtonProps:e}=(0,s.C5)();return e}}]})},1590(e,t,o){o.d(t,{Iy:()=>m,my:()=>h});var l=o(71178),n=o(10691),a=o(56920),r=o(51649),i=o(77843),s=o(69412),d=o(41944),u=o(7122),c=o(96123),p=o(45560);let m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return o=>{let n=(0,a.useFieldSchema)(),{form:r}=(0,s.Es)(),i=(0,d.pE)(),u=(0,c._)({collectionField:{uiSchema:n},form:r,record:i,uiSchema:n,noDisabled:!0});return(0,l.jsx)(e,{...o,scope:t.concat(u).filter(Boolean)})}},h=()=>{let{t:e}=(0,i.useTranslation)(),t=(()=>{let e=(0,p.$)("$env"),t=(0,r.useMemo)(()=>e?JSON.stringify((e.children||[]).map(e=>({name:null==e?void 0:e.name,type:null==e?void 0:e.type,title:null==e?void 0:e.title}))):null,[e]),o=(0,r.useRef)(null),l=(0,r.useRef)(null);if(!e)return o.current=null,l.current=null,null;if(l.current!==t){let{children:n=[]}=e;o.current={...e,children:n.filter(e=>"default"===e.type)},l.current=t}return o.current})(),o=(0,r.useMemo)(()=>m(u.rT.TextArea,t?[t]:[]),[t]),l=(0,r.useMemo)(()=>({title:e("URL"),type:"string","x-decorator":"FormItem","x-component":o,description:e("Do not concatenate search params in the URL"),"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "html"}}'}}}}),[e,o]),a=(0,r.useMemo)(()=>({title:'{{t("Mode")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"url",enum:[{value:"url",label:e("URL")},{value:"html",label:e("HTML")}]}),[e]),s=(0,r.useMemo)(()=>({title:e("html"),type:"string","x-decorator":"FormItem","x-component":m(u.rT.RawTextArea),"x-component-props":{rows:10},"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "url"}}'}}}}),[e]);return{urlSchema:l,paramsSchema:(0,r.useMemo)(()=>({type:"array","x-component":"ArrayItems","x-decorator":"FormItem",title:'{{t("Search parameters")}}',items:{type:"object",properties:{space:{type:"void","x-component":"Space","x-component-props":{style:{flexWrap:"nowrap",maxWidth:"100%"},className:(0,n.css)`
140
140
  & > .ant-space-item:first-child,
141
141
  & > .ant-space-item:last-child {
142
142
  flex-shrink: 0;
143
143
  }
144
- `},properties:{name:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Name")}}'}},value:{type:"string","x-decorator":"FormItem","x-component":o,"x-component-props":{placeholder:'{{t("Value")}}',useTypedConstant:!0,changeOnSelect:!0}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "html"}}'}}},properties:{add:{type:"void",title:'{{t("Add parameter")}}',"x-component":"ArrayItems.Addition"}}}),[o]),openInNewWindowSchema:(0,r.useMemo)(()=>({type:"boolean","x-content":e("Open in new window"),"x-decorator":"FormItem","x-component":"Checkbox","x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "html"}}'}}}}),[e]),modeSchema:a,htmlSchema:s}}},27778(e,t,o){o.d(t,{K:()=>b,P:()=>g});var l=o(71178),n=o(56920),a=o(52793),r=o(51649),i=o(77843),s=o(17157),d=o(38951),u=o(43288),c=o(82924),p=o(45036),m=o(57593),h=o(77490),x=o(39888),v=o(28227),_=o(99300);let f=(0,n.connect)(a.Tree,(0,n.mapProps)((e,t)=>{(0,r.useEffect)(()=>{t.value=e.defaultCheckedKeys||[]},[]);let[o,l]=(0,r.useState)(e.defaultCheckedKeys||[]),n=e=>{l(e),t.value=e};return t.onCheck=n,{...e,checkedKeys:o,onCheck:n}}));function g(){let{dn:e}=(0,c.erX)(),{t}=(0,i.useTranslation)(),o=(0,n.useField)(),a=(0,n.useFieldSchema)(),{name:r}=(0,u.k7)(),{getEnableFieldTree:s,getOnLoadData:d}=(0,m.l)(r,!1,e=>["belongsTo","belongsToMany","hasOne","hasMany"].includes(e.type));return(0,l.jsx)(h.fY,{title:t("Save mode"),components:{Tree:f},scope:{getEnableFieldTree:s,name:r,getOnLoadData:d},schema:{type:"object",title:t("Save mode"),properties:{saveMode:{"x-decorator":"FormItem","x-component":"Radio.Group",default:o.componentProps.saveMode||"create",enum:[{value:"create",label:'{{t("Insert")}}'},{value:"firstOrCreate",label:'{{t("Insert if not exists")}}'},{value:"updateOrCreate",label:'{{t("Insert if not exists, or update")}}'}]},filterKeys:{type:"array",title:'{{ t("Determine whether a record exists by the following fields") }}',required:!0,default:o.componentProps.filterKeys,"x-decorator":"FormItem","x-component":"Tree","x-component-props":{treeData:[],checkable:!0,checkStrictly:!0,selectable:!1,loadData:"{{ getOnLoadData($self) }}",defaultCheckedKeys:o.componentProps.filterKeys,rootStyle:{padding:"8px 0",border:"1px solid #d9d9d9",borderRadius:"2px",maxHeight:"30vh",overflow:"auto",margin:"2px 0"}},"x-reactions":[{dependencies:[".saveMode"],fulfill:{state:{hidden:'{{ $deps[0]==="create"}}',componentProps:{treeData:"{{ getEnableFieldTree(name, $self) }}"}}}}]}}},onSubmit:t=>{let{saveMode:l,filterKeys:n}=t;o.componentProps.saveMode=l,o.componentProps.filterKeys=n,a["x-component-props"]=a["x-component-props"]||{},a["x-component-props"].saveMode=l,a["x-component-props"].filterKeys=n,e.emit("patch",{schema:{"x-uid":a["x-uid"],"x-component-props":{...a["x-component-props"]}}}),e.refresh()}})}let b=new d.R({name:"actionSettings:createSubmit",items:[{name:"editButton",Component:p.Yp,useComponentProps(){let{buttonEditorProps:e}=(0,s.C5)();return e}},{name:"linkageRules",Component:_.f9,useComponentProps(){let{linkageRulesProps:e}=(0,s.C5)();return{...e}}},{name:"secondConfirmation",Component:p.VX},{name:"saveMode",Component:g,useVisible(){let{type:e}=(0,v.h6)()||{};return"publicForm"!==e}},{name:"assignFieldValues",Component:p.TB},{name:"skipRequiredValidation",Component:p.zN},{name:"afterSuccessfulSubmission",Component:p.Kq,useVisible(){let{type:e}=(0,v.h6)()||{};return"publicForm"!==e}},{name:"refreshDataBlockRequest",Component:p.ud,useComponentProps:()=>({isPopupAction:!1}),useVisible:()=>!!(0,x.hd)()},{name:"remove",sort:100,Component:p.d0,useComponentProps(){let{removeButtonProps:e}=(0,s.C5)();return e}}]})},38892(e,t,o){o.d(t,{_:()=>_});var l=o(71178),n=o(51649),a=o(56920),r=o(77583),i=o(27404),s=o(2314),d=o(43923),u=o(59529),c=o(17157),p=o(28227);let m=async(e,t)=>{let{operator:o,condition:l,variables:n,localVariables:a,conditionType:r,displayResult:i}=e;switch(o){case"visible":return await (0,u._c)({ruleGroup:l,variables:n,localVariables:a,conditionType:r},t)&&i.push("visible"),i;case"hidden":return await (0,u._c)({ruleGroup:l,variables:n,localVariables:a,conditionType:r},t)&&i.push("hidden"),i;default:return null}};var h=o(95951),x=o(83006),v=o(4627);let _=e=>{let t=(0,a.useFieldSchema)(),o=(0,d.$l)(),u=(0,d.gp)(),{designable:_}=(0,h.er)(),f=(0,a.useForm)(),g=(0,n.useMemo)(()=>(e=>{if(!e)return[];let t=(null==e?void 0:e["x-block-linkage-rules"])||[];return e.mapProperties(e=>{e["x-block-linkage-rules"]&&(t=e["x-block-linkage-rules"])}),null==t?void 0:t.filter(e=>!e.disabled)})(t),[t]),[b,y]=(0,n.useState)(null),S=((e,t,o,l)=>{let a=(0,c.nm)().jsonLogic,[r,i]=(0,n.useState)(null),s=(0,p.PD)();return(0,n.useEffect)(()=>{(async()=>{let l=[];for(let n of e.filter(e=>!e.disabled))for(let e of n.actions||[])await m({operator:e.operator,condition:n.condition,variables:t,localVariables:o,conditionType:n.conditionType,displayResult:l},a);i(l)})()},[e,l,s]),r})(g,o,u,b),k=(null==t?void 0:t["x-decorator"])==="FormItem"&&!f.readPretty&&g.length;if((0,n.useEffect)(()=>{if(k){let e=(0,i.uid)();return setTimeout(()=>{f.addEffects(e,()=>{(0,x.o)(g,(e,t)=>(0,s.reaction)(()=>[(0,v.hL)({linkageRules:g,localVariables:u}),(0,v.Ou)({action:e,localVariables:u})].map(e=>JSON.stringify(e)).join(","),()=>{y((0,i.uid)())},{fireImmediately:!0,equals:r.isEqual}))})}),()=>{f.removeEffects(e)}}},[g,k]),!g.length)return e.children;if(null===S)return null;if("hidden"===(0,r.last)(S))if(_)return(0,l.jsx)("div",{style:{opacity:.3},children:e.children});else return null;return e.children}},56250(e,t,o){o.d(t,{C:()=>m,R:()=>h});var l=o(71178),n=o(51649),a=o(77843),r=o(26174),i=o(49621),s=o(32444),d=o(61013),u=o(23620),c=o(96932),p=o(90236);let m=e=>{let{t}=(0,a.useTranslation)(),o=(0,r.r2)(),{name:m,title:x}=(0,i.Ge)()||{},v=(0,c.D$)(),{association:_,collection:f}=(0,s.h6)()||{},g=(0,d.l)(),{isMobileLayout:b}=(0,p.mY)();if(_){let[e]=_.split("."),{name:t,title:l}=o.getCollection(e);m=t,x=l}let y=o.getCollectionField(_),S=o.getCollection(f||(null==y?void 0:y.target)),k=["FormItem","ReadPrettyFormItem"].includes(null==v?void 0:v.componentName)?`${null==v?void 0:v.name} ${t("(Fields only)")}`:null==v?void 0:v.name,C=(0,n.useMemo)(()=>[h({collectionTitle:x,collectionName:m,associationField:y,associationCollection:S,compile:g}),k].filter(Boolean),[x,m,y,S,g,k]);return(0,l.jsx)(u.Bw,{title:C,...e,draggable:!b})};function h(e){let{collectionTitle:t,collectionName:o,associationField:l,compile:n,associationCollection:a}=e;if(l){var r;return`${n(t||o)} > ${n((null==(r=l.uiSchema)?void 0:r.title)||l.name)} (${n((null==a?void 0:a.title)||(null==a?void 0:a.name))})`}return n(t||o)}},44845(e,t,o){o.d(t,{l:()=>a});var l=o(51649),n=o(68557);let a=e=>{let{params:t}=e,{filter:o,parseVariableLoading:a}=(0,n.j)({filterOption:null==t?void 0:t.filter});return{params:(0,l.useMemo)(()=>({...t,filter:o}),[JSON.stringify(o)]),parseVariableLoading:a}}},4017(e,t,o){o.d(t,{B:()=>a});var l=o(14696),n=o(44845);function a(e){let t,{params:o,parseVariableLoading:a}=(0,n.l)(e);return e.association&&(t=(0,l.M)(e.association)),{parentRecord:t,params:o,parseVariableLoading:a}}},76564(e,t,o){o.d(t,{y:()=>n});var l=o(76706);function n(){return(0,l.nw)()}},43873(e,t,o){o.d(t,{fY:()=>p,qm:()=>c,yz:()=>m});var l=o(71178),n=o(56920),a=o(77583);o(51649);var r=o(77843),i=o(28227),s=o(95951),d=o(57593),u=o(77490);let c={name:"setDataLoadingMode",Component:m};function p(){let{dataLoadingMode:e}=(0,i.h6)()||{};return e||"auto"}function m(){var e;let{dn:t}=(0,s.er)(),{t:o}=(0,r.useTranslation)(),c=(0,n.useField)(),p=(0,n.useFieldSchema)(),m=(0,i.Ge)(),{getEnableFieldTree:h,getOnLoadData:x}=(0,d.l)(null==m?void 0:m.name),{getDataBlockRequest:v}=(0,i.ZK)();return(0,l.jsx)(u.fY,{title:o("Set data loading mode"),scope:{getEnableFieldTree:h,name:null==m?void 0:m.name,getOnLoadData:x},schema:{type:"object",title:o("Data loading mode"),properties:{dataLoadingMode:{"x-decorator":"FormItem","x-component":"Radio.Group",default:(null==(e=p["x-decorator-props"])?void 0:e.dataLoadingMode)||"auto",enum:[{value:"auto",label:o("Load all data when filter is empty")},{value:"manual",label:o("Do not load data when filter is empty")}]}}},onSubmit:e=>{let{dataLoadingMode:o}=e,l=v();a.default.set(p,"x-decorator-props.dataLoadingMode",o),c.decoratorProps.dataLoadingMode=o,t.emit("patch",{schema:{"x-uid":p["x-uid"],"x-decorator-props":{...p["x-decorator-props"]}}}),t.refresh(),"auto"===o?l.run():l.mutate(void 0)}})}},11184(e,t,o){o.d(t,{D:()=>r,l:()=>i});var l=o(56920),n=o(11340),a=o(35432);function r(e){let t,o=(0,n.DQ)(e);return e.association&&(t=i(e.association)),{params:o,parentRecord:t}}function i(e){let t=(0,l.useFieldSchema)(),o=(0,a.zv)(),n=(0,a.vt)();if(e)return t["x-is-current"]?n:o}},1575(e,t,o){o.d(t,{Y:()=>n});var l=o(76706);function n(){return(0,l.nw)()}},54513(e,t,o){o.d(t,{t:()=>c,y:()=>u});var l=o(71178),n=o(82113),a=o(51649),r=o(17157),i=o(94138),s=o(3403),d=o(59682);let u=e=>{let{filterCollections:t,onlyCurrentDataSource:o,hideSearch:i,createBlockSchema:d,componentType:u="FormItem",templateWrap:p,showAssociationFields:m,hideChildrenIfSingleCollection:h,hideOtherRecordsInPopup:x,currentText:v,otherText:_}=e,f=(0,r.eL)(),{createFormBlock:g,templateWrap:b}=c(),y=(0,a.useCallback)(e=>{if(d)return d(e);g(e)},[d,g]),S=(0,a.useCallback)((e,t)=>p?p(e,t):b(e,t),[p,b]);return(0,l.jsx)(s.kq,{...f,icon:(0,l.jsx)(n.FormOutlined,{}),componentType:u,templateWrap:S,onCreateBlockSchema:y,filter:t,onlyCurrentDataSource:o,hideSearch:i,showAssociationFields:m,hideChildrenIfSingleCollection:h,hideOtherRecordsInPopup:x,currentText:v,otherText:_})},c=()=>{let{insert:e}=(0,r.fx)(),t=(0,i.UJ)(),{isCusomeizeCreate:o}=(0,r.eL)();return{createFormBlock:(0,a.useCallback)(l=>{let{item:n,fromOthersInPopup:a}=l;a?e((0,d.B)({collectionName:n.collectionName||n.name,dataSource:n.dataSource,isCusomeizeCreate:!0})):e((0,d.B)(t?{association:t,dataSource:n.dataSource,isCusomeizeCreate:o}:{collectionName:n.collectionName||n.name,dataSource:n.dataSource,isCusomeizeCreate:o}))},[t,e,o]),templateWrap:(0,a.useCallback)((e,l)=>{let n,{item:a,fromOthersInPopup:r}=l;return n=r?(0,d.B)({dataSource:a.dataSource,templateSchema:e,collectionName:a.name,isCusomeizeCreate:!0}):(0,d.B)(t?{dataSource:a.dataSource,templateSchema:e,collectionName:a.name,association:t,isCusomeizeCreate:o}:{dataSource:a.dataSource,templateSchema:e,collectionName:a.name,isCusomeizeCreate:o}),a.template&&"reference"===a.mode&&(n["x-template-key"]=a.template.key),n},[t,o])}}},92579(e,t,o){o.d(t,{i:()=>a});var l=o(71178);o(51649);var n=o(99300);let a=e=>(0,l.jsx)(n.Bw,{showBorder:!1,showBackground:!0,...e})},83232(e,t,o){o.d(t,{f:()=>h,B:()=>m});var l=o(71178),n=o(82113),a=o(51649),r=o(17157),i=o(43288),s=o(28227),d=o(81936),u=o(96932),c=o(27404);function p(e){let{collectionName:t,dataSource:o,association:l,templateSchema:n}=e,a=e.isCurrent?{"x-is-current":!0}:{};if(!o)throw Error("dataSource are required");return{type:"void","x-acl-action-props":{skipScopeCheck:!1},"x-acl-action":`${l||t}:update`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useEditFormBlockDecoratorProps","x-decorator-props":{action:"get",dataSource:o,collection:t,association:l},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:editForm","x-component":"CardItem",...a,properties:{[(0,c.uid)()]:{type:"void","x-component":"FormV2","x-use-component-props":"useEditFormBlockProps",properties:{grid:n||{type:"void","x-component":"Grid","x-initializer":"form:configureFields",properties:{}},[(0,c.uid)()]:{type:"void","x-initializer":"editForm:configureActions","x-component":"ActionBar","x-component-props":{layout:"one-column"}}}}}}}let m=()=>{let{targetCollection:e,...t}=(0,r.eL)(),{insert:o}=(0,r.fx)(),{getTemplateSchemaByMode:a}=(0,u.ov)(),s=(0,i.k7)(),c=e||s,{createEditFormBlock:p,templateWrap:m}=h();return(0,l.jsx)(r.rR,{icon:(0,l.jsx)(n.FormOutlined,{}),...t,onClick:async e=>{let{item:t}=e;t.template?o(m(await a(t),{item:t})):p({item:t})},items:(0,d.aU)("FormItem",null,null==c?void 0:c.name)})};function h(){let{insert:e}=(0,r.fx)(),t=(0,s.UJ)(),o=(0,s.r2)(),{componentNamePrefix:l}=(0,u.kU)();return{createEditFormBlock:(0,a.useCallback)(l=>{let{item:n}=l,a=n.collectionName||n.name,r=o.getCollection(a);e(p(t?{association:t,collectionName:r.isInherited()?a:void 0,dataSource:n.dataSource,isCurrent:!0}:{collectionName:a,dataSource:n.dataSource}))},[t,o,e]),templateWrap:(0,a.useCallback)((e,n)=>{let{item:a}=n;if(a.template.componentName!==`${l}FormItem`)return e;{let l=a.collectionName||a.name,n=o.getCollection(l),r=p(t?{association:t,collectionName:n.isInherited()?l:void 0,dataSource:a.dataSource,templateSchema:e,isCurrent:!0}:{collectionName:l,dataSource:a.dataSource,templateSchema:e});return"reference"===a.mode&&(r["x-template-key"]=a.template.key),r}},[t,o,l])}}},59682(e,t,o){o.d(t,{B:()=>n});var l=o(27404);function n(e){let{collectionName:t,association:o,dataSource:n,templateSchema:a,isCusomeizeCreate:r}=e;if(!n)throw Error("dataSource are required");return{type:"void","x-acl-action-props":{skipScopeCheck:!0},"x-acl-action":`${o||t}:create`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useCreateFormBlockDecoratorProps","x-decorator-props":{dataSource:n,collection:t,association:o,isCusomeizeCreate:r},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:createForm","x-component":"CardItem",properties:{[(0,l.uid)()]:{type:"void","x-component":"FormV2","x-use-component-props":"useCreateFormBlockProps",properties:{grid:a||{type:"void","x-component":"Grid","x-initializer":"form:configureFields",properties:{}},[(0,l.uid)()]:{type:"void","x-initializer":"createForm:configureActions","x-component":"ActionBar","x-component-props":{layout:"one-column"}}}}}}}},56181(e,t,o){o.d(t,{C:()=>i,E:()=>r});var l=o(65623),n=o(28227);let a={title:'{{t("Configure actions")}}',icon:"SettingOutlined",items:[{name:"submit",title:'{{t("Submit")}}',Component:"CreateSubmitActionInitializer",schema:{"x-action-settings":{}}},{name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer",useVisible(){let{type:e}=(0,n.h6)()||{};return"publicForm"!==e}}]},r=new l._({name:"CreateFormActionInitializers",...a}),i=new l._({name:"createForm:configureActions",...a},r)},8918(e,t,o){o.d(t,{N:()=>x});var l=o(56920),n=o(77843),a=o(38951),r=o(69412),i=o(43288),s=o(49621),d=o(99300),u=o(38131),c=o(17664),p=o(24768),m=o(23145),h=o(17961);let x=new a.R({name:"blockSettings:createForm",items:[{name:"title",Component:c.P},{name:"setTheBlockHeight",Component:u._},{name:"fieldLinkageRules",Component:d.f9,useComponentProps(){let{name:e}=(0,i.k7)(),{t}=(0,n.useTranslation)();return{collectionName:e,title:t("Field Linkage rules")}}},{name:"blockLinkageRules",Component:d.f9,useComponentProps(){let{name:e}=(0,i.k7)(),{t}=(0,n.useTranslation)();return{collectionName:e,title:t("Block Linkage rules"),category:h.Od.block}}},{name:"dataTemplates",Component:d.iJ,useVisible(){var e;let{action:t}=(0,r.Es)(),o=(0,l.useFieldSchema)();return!t&&(null==o||null==(e=o["x-acl-action"])?void 0:e.includes("create"))},useComponentProps(){let{name:e}=(0,i.k7)();return{collectionName:e}}},{name:"divider",type:"divider"},{name:"formItemTemplate",Component:d.Sm,useComponentProps(){var e,t;let{componentNamePrefix:o}=(0,p.kU)(),{name:n}=(0,s.Ge)(),a=(0,l.useFieldSchema)();return{componentName:`${o}FormItem`,collectionName:n,resourceName:(null==a||null==(e=a["x-decorator-props"])?void 0:e.resource)||(null==a||null==(t=a["x-decorator-props"])?void 0:t.association)}}},{name:"setBlockLayout",Component:m.q},{name:"divider2",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]})},64622(e,t,o){o.d(t,{R:()=>x});var l=o(56920),n=o(77843),a=o(38951),r=o(69412),i=o(43288),s=o(49621),d=o(99300),u=o(38131),c=o(17664),p=o(24768),m=o(23145),h=o(17961);let x=new a.R({name:"blockSettings:editForm",items:[{name:"title",Component:c.P},{name:"setTheBlockHeight",Component:u._},{name:"fieldLinkageRules",Component:d.f9,useComponentProps(){let{name:e}=(0,i.k7)(),{t}=(0,n.useTranslation)();return{collectionName:e,title:t("Field Linkage rules")}}},{name:"blockLinkageRules",Component:d.f9,useComponentProps(){let{name:e}=(0,i.k7)(),{t}=(0,n.useTranslation)();return{collectionName:e,title:t("Block Linkage rules"),category:h.Od.block}}},{name:"dataTemplates",Component:d.iJ,useVisible(){let{action:e}=(0,r.Es)();return!e},useComponentProps(){let{name:e}=(0,i.k7)();return{collectionName:e}}},{name:"divider",type:"divider"},{name:"formItemTemplate",Component:d.Sm,useComponentProps(){var e,t;let{componentNamePrefix:o}=(0,p.kU)(),{name:n}=(0,s.Ge)(),a=(0,l.useFieldSchema)();return{componentName:`${o}FormItem`,collectionName:n,resourceName:(null==a||null==(e=a["x-decorator-props"])?void 0:e.resource)||(null==a||null==(t=a["x-decorator-props"])?void 0:t.association)}}},{name:"setBlockLayout",Component:m.q},{name:"divider2",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]})},25564(e,t,o){o.d(t,{l:()=>C});var l=o(71178),n=o(56220),a=o(56920),r=o(77583);o(51649);var i=o(77843),s=o(17157),d=o(38951),u=o(69412),c=o(43288),p=o(57359),m=o(28227),h=o(92719),x=o(31574),v=o(61013),_=o(95951),f=o(99300),g=o(83508),b=o(4627),y=o(17961),S=o(33204),k=o(90732);let C=new d.R({name:"fieldSettings:FormItem",items:[{name:"decoratorOptions",type:"itemGroup",hideIfNoChildren:!0,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{title:e("Generic properties")}},useChildren:()=>[{name:"editFieldTitle",type:"modal",useComponentProps(){var e;let{t}=(0,i.useTranslation)(),{dn:o}=(0,_.er)(),l=(0,a.useField)(),n=(0,a.useFieldSchema)(),r=(0,v.l)(),{getCollectionJoinField:s}=(0,c.nj)(),{getField:d}=(0,c.k7)(),u=d(n.name)||s(n["x-collection-field"]);return{title:t("Edit field title"),schema:{type:"object",title:t("Edit field title"),properties:{title:{title:t("Field title"),default:null==l?void 0:l.title,description:`${t("Original field title: ")}${null==u||null==(e=u.uiSchema)?void 0:e.title}`,"x-decorator":"FormItem","x-component":"Input","x-component-props":{}}}},onSubmit(e){var t;let{title:a}=e,i=""===a.trim()?null==u||null==(t=u.uiSchema)?void 0:t.title:a;l.title=r(i),n.title=i,o.emit("patch",{schema:{"x-uid":n["x-uid"],title:n.title}}),o.refresh()}}}},{name:"displayTitle",type:"switch",useComponentProps(){let{t:e}=(0,i.useTranslation)(),{dn:t}=(0,_.er)(),o=(0,a.useField)(),l=(0,a.useFieldSchema)();return{title:e("Display title"),checked:o.decoratorProps.showTitle??!0,onChange(e){l["x-decorator-props"]=l["x-decorator-props"]||{},l["x-decorator-props"].showTitle=e,o.decoratorProps.showTitle=e,t.emit("patch",{schema:{"x-uid":l["x-uid"],"x-decorator-props":{...l["x-decorator-props"],showTitle:e}}}),t.refresh()}}}},{name:"editDescription",type:"modal",useComponentProps(){let{t:e}=(0,i.useTranslation)(),{dn:t}=(0,_.er)(),o=(0,a.useField)(),l=(0,a.useFieldSchema)();return{title:e("Edit description"),schema:{type:"object",title:e("Edit description"),properties:{description:{default:null==o?void 0:o.description,"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{}}}},onSubmit(e){let{description:n}=e;o.description=n,l.description=n,t.emit("patch",{schema:{"x-uid":l["x-uid"],description:l.description}})}}}},{name:"editTooltip",type:"modal",useComponentProps(){var e;let{t}=(0,i.useTranslation)(),{dn:o}=(0,_.er)(),l=(0,a.useField)(),n=(0,a.useFieldSchema)();return{title:t("Edit tooltip"),schema:{type:"object",title:t("Edit tooltip"),properties:{tooltip:{default:null==n||null==(e=n["x-decorator-props"])?void 0:e.tooltip,"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{}}}},onSubmit(e){let{tooltip:t}=e;l.decoratorProps.tooltip=t,n["x-decorator-props"]=n["x-decorator-props"]||{},n["x-decorator-props"].tooltip=t,o.emit("patch",{schema:{"x-uid":n["x-uid"],"x-decorator-props":n["x-decorator-props"]}}),o.refresh()}}}},{name:"required",type:"switch",useVisible(){let e=(0,a.useField)(),t=(0,a.useFieldSchema)(),{required:o=!0}=(0,s.C5)();return!e.readPretty&&"FormField"!==t["x-component"]&&o},useComponentProps(){let{t:e}=(0,i.useTranslation)(),t=(0,a.useField)(),o=(0,a.useFieldSchema)(),{dn:l,refresh:n}=(0,_.er)();return{title:e("Required"),checked:t.required,onChange(e){let a={"x-uid":o["x-uid"]};t.required=e,o.required=e,a.required=e,l.emit("patch",{schema:a}),n()}}}},{name:"setDefaultValue",useVisible(){let{isAllowToSetDefaultValue:e}=(0,g.eT)();return e()},Component:S.J},{name:"pattern",type:"select",useVisible(){let{form:e}=(0,u.Es)(),t=(0,a.useFieldSchema)();return e&&!(null==e?void 0:e.readPretty)&&!(0,f.h2)(t)},useComponentProps(){let{t:e}=(0,i.useTranslation)(),t=(0,a.useField)(),o=(0,a.useFieldSchema)(),{dn:l}=(0,_.er)(),n="editable";return!0===o["x-disabled"]&&(n="readonly"),!0===o["x-read-pretty"]&&(n="read-pretty"),{title:e("Pattern"),options:[{label:e("Editable"),value:"editable"},{label:e("Readonly"),value:"readonly"},{label:e("Easy-reading"),value:"read-pretty"}],value:n,onChange(e){let n={"x-uid":o["x-uid"]};switch(e){case"readonly":o["x-read-pretty"]=!1,o["x-disabled"]=!0,n["x-read-pretty"]=!1,n["x-disabled"]=!0,t.readPretty=!1,t.disabled=!0,r.default.set(t,"initStateOfLinkageRules.pattern",(0,b.qE)(!0,y.X2.ReadOnly));break;case"read-pretty":o["x-read-pretty"]=!0,o["x-disabled"]=!1,n["x-read-pretty"]=!0,n["x-disabled"]=!1,t.readPretty=!0,r.default.set(t,"initStateOfLinkageRules.pattern",(0,b.qE)(!0,y.X2.ReadPretty));break;default:o["x-read-pretty"]=!1,o["x-disabled"]=!1,n["x-read-pretty"]=!1,n["x-disabled"]=!1,t.readPretty=!1,t.disabled=!1,r.default.set(t,"initStateOfLinkageRules.pattern",(0,b.qE)(!0,y.X2.Editable))}l.emit("patch",{schema:n}),l.refresh()}}}},{name:"setValidationRules",type:"modal",useComponentProps(){let{t:e}=(0,i.useTranslation)(),t=(0,a.useField)(),o=(0,a.useFieldSchema)(),{dn:l,refresh:s}=(0,_.er)(),d=(0,x.do)(),{getCollectionJoinField:u}=(0,c.nj)(),{getField:p}=(0,c.k7)(),m=p(o.name)||u(o["x-collection-field"]),h=e=>null!=e&&!Number.isNaN(e);return{title:e("Set validation rules"),components:{ArrayCollapse:k.z,FormLayout:n.FormLayout},schema:{type:"object",title:e("Set validation rules"),properties:{rules:{type:"array",default:null==o?void 0:o["x-validator"],"x-component":"ArrayCollapse","x-decorator":"FormItem","x-component-props":{accordion:!0},maxItems:3,items:{type:"object","x-component":"ArrayCollapse.CollapsePanel","x-component-props":{header:e("Validation rule")},properties:{index:{type:"void","x-component":"ArrayCollapse.Index","x-component-props":{style:{lineHeight:"28px"}}},layout:{type:"void","x-component":"FormLayout","x-component-props":{labelStyle:{marginTop:"6px"},labelCol:8,wrapperCol:16},properties:{...d,message:{type:"string",title:'{{ t("Error message") }}',"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{autoSize:{minRows:2,maxRows:2}}}}},remove:{type:"void","x-component":"ArrayCollapse.Remove"},moveUp:{type:"void","x-component":"ArrayCollapse.MoveUp"},moveDown:{type:"void","x-component":"ArrayCollapse.MoveDown"}}},properties:{add:{type:"void",title:'{{ t("Add validation rule") }}',"x-component":"ArrayCollapse.Addition","x-reactions":{dependencies:["rules"],fulfill:{state:{disabled:"{{$deps[0].length >= 3}}"}}}}}}}},onSubmit(e){var n;let a=[];for(let t of e.rules)a.push(r.default.pickBy(t,h));let i={"x-uid":o["x-uid"]};if(["percent"].includes(null==m?void 0:m.interface))for(let e of a)(e.maxValue||e.minValue)&&(e.percentMode=!0),e.percentFormat&&(e.percentFormats=!0);t.validator=r.default.concat([],(null==m||null==(n=m.uiSchema)?void 0:n["x-validator"])||[],a),t.required=o.required,o["x-validator"]=a,i["x-validator"]=a,l.emit("patch",{schema:i}),s()}}},useVisible(){let{form:e}=(0,u.Es)(),t=(0,x.q7)(),o=(0,x.do)();return e&&!t&&o}},{name:"style",Component:e=>{let t={...e,category:"style"};return(0,l.jsx)(f.f9,{...t})},useVisible:()=>(0,x.U5)(),useComponentProps(){let{name:e}=(0,m.Ge)(),{linkageRulesProps:t}=(0,s.C5)();return{...t,collectionName:e}}},h.I]},{name:"componentOptions",type:"itemGroup",hideIfNoChildren:!0,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{title:e("Specific properties")}},useChildren(){let e=(0,s.nm)(),t=(0,p.q)(),o=e.schemaSettingsManager.get(`fieldSettings:component:${t}`);return(null==o?void 0:o.items)||[]}},{name:"divider",type:"divider"},{name:"delete",type:"remove",sort:100,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{removeParentsIfNoChildren:!0,confirm:{title:e("Delete field")},breakRemoveOn:{"x-component":"Grid"}}}}]})},75909(e,t,o){o.d(t,{e:()=>l});let l=new(o(51005)).I({name:"FormActionInitializers",title:'{{t("Configure actions")}}',icon:"SettingOutlined",items:[{name:"submit",title:'{{t("Submit")}}',Component:"CreateSubmitActionInitializer",schema:{"x-action-settings":{}}},{name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer"}]})},57482(e,t,o){o.d(t,{L:()=>i,r:()=>s});var l=o(65623),n=o(44517),a=o(81936);let r={wrap:a.xH,icon:"SettingOutlined",title:'{{t("Configure fields")}}',items:[{type:"itemGroup",name:"displayFields",title:'{{t("Display fields")}}',useChildren:a.g_},{name:"parentCollectionFields",Component:n.y8},{name:"associationFields",Component:n.Ag},{name:"divider",type:"divider"},{name:"addText",title:'{{t("Add Markdown")}}',Component:"MarkdownFormItemInitializer"},{name:"addDivider",title:'{{t("Add group")}}',Component:"DividerFormItemInitializer"}]},i=new l._({name:"FormItemInitializers",...r}),s=new l._({name:"form:configureFields",...r},i)},1451(e,t,o){o.d(t,{Z:()=>s});var l=o(35432),n=o(86577),a=o(69412),r=o(31475),i=o(92619);function s(){let e=(0,l.zv)(),{form:t}=(0,a.Es)(),o=(0,r.TP)(),{isInSubTable:s}=(0,i._)(),{valueMap:d}=(0,n.k)({category:"style",formValues:(null==o?void 0:o.formValue)||(null==t?void 0:t.values)||e,form:t});return{wrapperStyle:s?Object.fromEntries(Object.entries(d||{}).filter(e=>{let[t]=e;return"backgroundColor"!==t})):d}}},12416(e,t,o){o.d(t,{BM:()=>a.B,CQ:()=>i.C,E9:()=>i.E,Lm:()=>p.L,NO:()=>s.N,RG:()=>d.R,T:()=>m.T,U9:()=>r.B,Zg:()=>m.Z,eI:()=>c.e,fi:()=>a.f,iz:()=>n.i,ln:()=>u.l,rj:()=>p.r,tH:()=>l.t,yU:()=>l.y});var l=o(54513),n=o(92579),a=o(83232),r=o(59682),i=o(56181),s=o(8918),d=o(64622),u=o(25564),c=o(75909),p=o(57482),m=o(72606)},72606(e,t,o){o.d(t,{T:()=>a,Z:()=>r});var l=o(65623);let n={title:'{{t("Configure actions")}}',icon:"SettingOutlined",items:[{name:"submit",title:'{{t("Submit")}}',Component:"UpdateSubmitActionInitializer",schema:{"x-action-settings":{}}},{name:"popup",title:'{{t("Popup")}}',Component:"PopupActionInitializer",useComponentProps:()=>({"x-component":"Action"})},{type:"item",name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer"}]},a=new l._({name:"UpdateFormActionInitializers",...n}),r=new l._({name:"editForm:configureActions",...n},a)},78468(e,t,o){o.d(t,{y:()=>p});var l=o(71178),n=o(56920),a=o(77583),r=o(51649),i=o(77843),s=o(88337),d=o(11592),u=o(16319),c=o(99300);function p(){let{t:e}=(0,i.useTranslation)(),t=(0,n.useFieldSchema)(),o=(0,n.useField)(),{dn:p}=(0,u.er)(),m=o.decoratorProps.columnCount||d.$c,h=(0,r.useMemo)(()=>({"x-component":"Slider","x-decorator":"FormItem","x-component-props":{min:1,max:24,marks:s.I,tooltip:{formatter:t=>`${t}${e("Column")}`},step:null}}),[e]),x=(0,r.useMemo)(()=>d.pc.reduce((t,o)=>(t[o]={...h,title:e(d.H$[o]),description:`${e("Screen size")} ${d.zg[o]} ${e("pixels")}`},t),{}),[h,e]);return(0,l.jsx)(c.fY,{title:e("Set the count of columns displayed in a row"),initialValues:m,schema:{type:"object",title:e("Set the count of columns displayed in a row"),properties:x},onSubmit:e=>{a.default.set(t,"x-decorator-props.columnCount",e),o.decoratorProps.columnCount=e,p.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":t["x-decorator-props"]}})}})}},68106(e,t,o){o.d(t,{Z:()=>a});var l=o(51649),n=o(68557);function a(e){let{params:t}=e,{filter:o,parseVariableLoading:a}=(0,n.j)({filterOption:null==t?void 0:t.filter});return{params:(0,l.useMemo)(()=>({...t,filter:o}),[o,t]),parseVariableLoading:a}}},58206(e,t,o){o.d(t,{w:()=>s});var l=o(71178),n=o(82113);o(51649);var a=o(43288),r=o(27404),i=o(17157);let s=()=>{let{onCreateBlockSchema:e,componentType:t,createBlockSchema:o,...s}=(0,i.eL)(),{insert:d}=(0,i.fx)(),u=(0,a.k7)();return(0,l.jsx)(i.rR,{icon:(0,l.jsx)(n.FormOutlined,{}),...s,onClick:async()=>{d((e=>{let{collectionName:t,dataSource:o,rowKey:l}=e;if(!t||!o||!l)throw Error("collectionName, dataSource, rowKey is required");return{type:"void","x-acl-action":`${t}:list`,"x-decorator":"TableSelectorProvider","x-use-decorator-props":"useTableSelectorDecoratorProps","x-decorator-props":{collection:t,dataSource:o,action:"list",params:{pageSize:20},rowKey:l},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:tableSelector","x-component":"CardItem",properties:{[(0,r.uid)()]:{type:"void","x-initializer":"table:configureActions","x-component":"ActionBar","x-component-props":{style:{marginBottom:"var(--nb-spacing)"}}},value:{type:"array","x-initializer":"table:configureColumns","x-component":"TableV2.Selector","x-use-component-props":"useTableSelectorProps","x-component-props":{rowSelection:{type:"checkbox"}}}}}})({rowKey:u.filterTargetKey,collectionName:u.name,dataSource:u.dataSource}))}})}},92452(e,t,o){o.d(t,{A:()=>n.A,w:()=>l.w});var l=o(58206),n=o(81333)},81333(e,t,o){o.d(t,{A:()=>x});var l=o(56220),n=o(56920),a=o(77583),r=o(51649),i=o(77843),s=o(38951),d=o(18111),u=o(69412),c=o(43288),p=o(82924),m=o(79056),h=o(43873);let x=new s.R({name:"blockSettings:tableSelector",items:[{name:"SetTheDataScope",Component:m.Z,useComponentProps:()=>{var e,t;let{name:o}=(0,c.k7)(),l=(0,n.useField)(),i=(0,n.useFieldSchema)(),{form:s}=(0,u.Es)(),{service:m,extraFilter:x}=(0,d.K8)(),{dn:v}=(0,p.erX)(),_=(0,h.fY)(),f=(0,r.useCallback)(e=>{let{filter:t}=e;t=(0,p.pA3)(t);let o=l.decoratorProps.params||{};o.filter=t,l.decoratorProps.params=o,i["x-decorator-props"].params=o;let n=(0,a.cloneDeep)(t);x&&(n=n?{$and:[x,n]}:x),v.emit("patch",{schema:{"x-uid":i["x-uid"],"x-decorator-props":i["x-decorator-props"]}})},[l.decoratorProps,i,x,_,v,m]);return{collectionName:o,defaultFilter:(null==i||null==(t=i["x-decorator-props"])||null==(e=t.params)?void 0:e.filter)||{},form:s,onSubmit:f}}},{name:"treeTable",type:"switch",useComponentProps:()=>{let e=(0,n.useField)(),t=(0,n.useFieldSchema)(),{service:o}=(0,d.K8)(),{t:l}=(0,i.useTranslation)(),{dn:a}=(0,p.erX)();return{title:l("Tree table"),defaultChecked:!0,checked:e.decoratorProps.treeTable,onChange:l=>{var n;e.form.clearFormGraph(`${e.address}.*`),e.decoratorProps.treeTable=l,t["x-decorator-props"].treeTable=l;let r={...null==(n=o.params)?void 0:n[0],tree:!!l||null};a.emit("patch",{schema:t}),a.refresh(),o.run(r)}}},useVisible:()=>{let{getCollectionJoinField:e}=(0,c.nj)(),t=(0,n.useFieldSchema)(),o=(0,c.k7)(),l=(0,d.H2)(t,"CollectionField"),a=e(null==l?void 0:l["x-collection-field"]);return(null==o?void 0:o.tree)&&(null==a?void 0:a.target)===(null==a?void 0:a.collectionName)}},{name:"SetDefaultSortingRules",type:"modal",useComponentProps(){var e,t;let{name:o}=(0,c.k7)(),a=(0,n.useField)(),r=(0,n.useFieldSchema)(),s=(0,c.lY)(o),{service:u}=(0,d.K8)(),{t:m}=(0,i.useTranslation)(),{dn:h}=(0,p.erX)(),x=(null==r||null==(t=r["x-decorator-props"])||null==(e=t.params)?void 0:e.sort)||[],v=null==x?void 0:x.map(e=>e.startsWith("-")?{field:e.substring(1),direction:"desc"}:{field:e,direction:"asc"});return{title:m("Set default sorting rules"),components:{ArrayItems:l.ArrayItems},schema:{type:"object",title:m("Set default sorting rules"),properties:{sort:{type:"array",default:v,"x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:s,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260}}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:m("ASC"),value:"asc"},{label:m("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:m("Add sort field"),"x-component":"ArrayItems.Addition"}}}}},onSubmit:e=>{var t;let{sort:o}=e,l=o.map(e=>"desc"===e.direction?`-${e.field}`:e.field),n=a.decoratorProps.params||{};n.sort=l,a.decoratorProps.params=n,r["x-decorator-props"].params=n,h.emit("patch",{schema:{"x-uid":r["x-uid"],"x-decorator-props":r["x-decorator-props"]}}),u.run({...null==(t=u.params)?void 0:t[0],sort:l})}}},useVisible(){let{dragSort:e}=(0,n.useField)().decoratorProps;return!e}},h.qm,{name:"RecordsPerPage",type:"select",useComponentProps(){var e,t;let o=(0,n.useField)(),l=(0,n.useFieldSchema)(),{service:a}=(0,d.K8)(),{t:r}=(0,i.useTranslation)(),{dn:s}=(0,p.erX)();return{title:r("Records per page"),value:(null==(t=o.decoratorProps)||null==(e=t.params)?void 0:e.pageSize)||20,options:[{label:"5",value:5},{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100},{label:"200",value:200}],onChange:e=>{var t;let n=o.decoratorProps.params||{};n.pageSize=e,o.decoratorProps.params=n,l["x-decorator-props"].params=n,a.run({...null==(t=a.params)?void 0:t[0],pageSize:e,page:1}),s.emit("patch",{schema:{"x-uid":l["x-uid"],"x-decorator-props":l["x-decorator-props"]}})}}}},{name:"divider",type:"divider"},{name:"delete",type:"remove",useComponentProps:()=>({removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})}]})},94109(e,t,o){o.d(t,{$e:()=>g,Wd:()=>y,Wf:()=>S,cM:()=>f});var l=o(71178),n=o(82113),a=o(56920),r=o(77583),i=o(51649),s=o(77843),d=o(16211),u=o(65623),c=o(12765),p=o(82451),m=o(25180),h=o(28227),x=o(82924),v=o(77235),_=o(58555);let f=()=>{var e;let{t}=(0,s.useTranslation)(),{dn:o}=(0,x.erX)(),n=(0,a.useFieldSchema)();return(0,l.jsx)(c.z,{title:t("Column width"),component:i.default.forwardRef((e,o)=>{let{children:n,onClick:a,...r}=e;return(0,l.jsx)(p.r,{ref:o,onClick:e=>{let{event:t}=e;a(t)},...r,title:t("Column width")})}),schema:{type:"object",title:t("Column width"),properties:{width:{"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{},default:(null==n||null==(e=n["x-component-props"])?void 0:e.width)||100}}},onSubmit:e=>{let{width:t}=e,l=n["x-component-props"]||{};l.width=t;let a={"x-uid":n["x-uid"]};a["x-component-props"]=l,n["x-component-props"]=l,o.emit("patch",{schema:a}),o.refresh()}})},g=()=>{var e;let t=(0,a.useField)(),o=(0,a.useFieldSchema)(),{t:n}=(0,s.useTranslation)(),{dn:r}=(0,x.erX)(),i=[{label:n("Not fixed"),value:"none"},{label:n("Left fixed"),value:"left"},{label:n("Right fixed"),value:"right"}];return(0,l.jsx)(p.r,{children:(0,l.jsx)(m.$,{title:n("Fixed"),options:i,defaultValue:(null==(e=t.componentProps)?void 0:e.fixed)||"none",onChange:e=>{let l={"x-uid":o["x-uid"]};o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].fixed=e,l["x-component-props"]=o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.fixed=e,r.emit("patch",{schema:l}),r.refresh()}},"fixed")})},b={insertPosition:"beforeEnd",useInsert:function(){let{refresh:e}=(0,x.erX)(),t=(0,a.useFieldSchema)(),o=(0,d.VB)(),{t:l}=(0,s.useTranslation)();return function(n){let a=t.reduceProperties((e,t)=>"Space"===t["x-component"]?t:e,null);if(!a)return;r.default.set(n,"x-designer-props.linkageAction",!0);let i=(0,x.pxY)({t:l,api:o,refresh:e,current:a});i.loadAPIClientEvents(),i.insertBeforeEnd(n)}},Component:e=>{let{getAriaLabel:t}=(0,v.$)();return(0,l.jsx)(n.PlusOutlined,{...e,role:"button","aria-label":t("schema-initializer"),style:{cursor:"pointer"}})},items:[{type:"item",title:'{{t("View")}}',name:"view",Component:"ViewActionInitializer",schema:{"x-component":"Action.Link","x-action":"view","x-decorator":"ACLActionProvider"},useVisible:()=>(0,_.$)("get")},{type:"item",name:"edit",title:'{{t("Edit")}}',Component:"UpdateActionInitializer",schema:{"x-component":"Action.Link","x-action":"update","x-decorator":"ACLActionProvider"},useVisible:()=>(0,_.$)("update")},{type:"item",title:'{{t("Delete")}}',name:"delete",Component:"DestroyActionInitializer",schema:{"x-component":"Action.Link","x-action":"destroy","x-decorator":"ACLActionProvider"},useVisible:()=>(0,_.$)("destroy")},{type:"item",title:'{{t("Disassociate")}}',name:"disassociate",Component:"DisassociateActionInitializer",schema:{"x-component":"Action.Link","x-action":"disassociate","x-acl-action":"update","x-decorator":"ACLActionProvider"},useVisible(){var e,t;let o=(0,h.h6)(),l=(0,h.Ge)()||{},{unavailableActions:n,availableActions:a}=(null==l?void 0:l.options)||{};return a?!!(null==o?void 0:o.association)&&(null==(e=a.includes)?void 0:e.call(a,"update")):!n||!!(null==o?void 0:o.association)&&!(null==n||null==(t=n.includes)?void 0:t.call(n,"update"))}},{type:"item",title:'{{t("Add child")}}',name:"addChildren",Component:"CreateChildInitializer",schema:{"x-component":"Action.Link","x-action":"create","x-decorator":"ACLActionProvider"},useVisible(){var e;let t=(0,a.useFieldSchema)(),o=(0,h.Ge)(),{treeTable:l}=(null==t||null==(e=t.parent)?void 0:e.parent["x-decorator-props"])||{};return o.tree&&l}},{type:"item",title:'{{t("Popup")}}',name:"popup",Component:"PopupActionInitializer"},{type:"item",title:'{{t("Update record")}}',name:"updateRecord",Component:"UpdateRecordActionInitializer",useVisible:()=>(0,_.$)("update")},{name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer",schema:{"x-action":"customize:table:request"}},{name:"link",title:'{{t("Link")}}',Component:"LinkActionInitializer",useComponentProps:()=>({"x-component":"Action.Link"})}]},y=new u._({name:"TableActionColumnInitializers",...b}),S=new u._({name:"table:configureItemActions",...b},y)},42983(e,t,o){o.d(t,{W:()=>s,k:()=>d});var l=o(56920),n=o(65623),a=o(28227),r=o(58555);let i={title:"{{t('Configure actions')}}",icon:"SettingOutlined",style:{marginLeft:8},items:[{type:"item",name:"filter",title:"{{t('Filter')}}",Component:"FilterActionInitializer",schema:{"x-align":"left"}},{type:"item",title:"{{t('Add new')}}",name:"addNew",Component:"CreateActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0}},useVisible:()=>(0,r.$)("create")},{type:"item",title:'{{t("Associate")}}',name:"associate",Component:"AssociateActionInitializer",useVisible(){var e,t;let o=(0,a.h6)(),l=(0,a.Ge)()||{},{unavailableActions:n,availableActions:r}=(null==l?void 0:l.options)||{};return r?!!(null==o?void 0:o.association)&&(null==(e=r.includes)?void 0:e.call(r,"update")):!n||!!(null==o?void 0:o.association)&&!(null==n||null==(t=n.includes)?void 0:t.call(n,"update"))}},{type:"item",title:"{{t('Popup')}}",name:"popup",Component:"PopupActionInitializer",componentProps:{"x-component":"Action","x-initializer":"page:addBlock"},schema:{"x-align":"right"}},{type:"item",title:"{{t('Delete')}}",name:"delete",Component:"BulkDestroyActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider"},useVisible:()=>(0,r.$)("destroyMany")},{type:"item",title:"{{t('Refresh')}}",name:"refresh",Component:"RefreshActionInitializer",schema:{"x-align":"right"}},{type:"item",title:"{{t('Column Settings')}}",name:"editTable",Component:"EditTableActionInitializer",schema:{"x-align":"right"}},{type:"item",title:"{{t('Link')}}",name:"link",Component:"LinkActionInitializer",schema:{"x-align":"right"},useComponentProps:()=>({"x-component":"Action"})},{name:"toggle",title:"{{t('Expand/Collapse')}}",Component:"ExpandableActionInitializer",schema:{"x-align":"right"},useVisible(){var e;let t=(0,l.useFieldSchema)(),o=(0,a.Ge)(),{treeTable:n}=(null==t||null==(e=t.parent)?void 0:e["x-decorator-props"])||{};return o.tree&&n}},{name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer",schema:{"x-action":"customize:table:request:global"}}]},s=new n._({name:"TableActionInitializers",...i}),d=new n._({name:"table:configureActions",...i},s)},72235(e,t,o){o.d(t,{H:()=>d,I:()=>s});var l=o(71178),n=o(82113);o(51649);var a=o(65010),r=o(3403),i=o(27304);let s=e=>{let{filterCollections:t,onlyCurrentDataSource:o,hideSearch:i,createBlockSchema:s,templateWrap:u,showAssociationFields:c}=e,p=(0,a.eL)(),{createTableBlock:m}=d();return(0,l.jsx)(r.kq,{...p,icon:(0,l.jsx)(n.TableOutlined,{}),componentType:"Table",onCreateBlockSchema:async e=>{if(s)return s(e);m(e)},onlyCurrentDataSource:o,hideSearch:i,filter:t,showAssociationFields:c})},d=()=>{let{insert:e}=(0,a.fx)();return{createTableBlock:t=>{let{item:o}=t;e((0,i.D)({collectionName:o.name,dataSource:o.dataSource}))}}}},62431(e,t,o){o.d(t,{C:()=>m,U:()=>p});var l=o(71178),n=o(56920),a=o(51649),r=o(77843),i=o(65623),s=o(94003),d=o(61013),u=o(81936);let c={insertPosition:"beforeEnd",icon:"SettingOutlined",title:'{{t("Configure columns")}}',wrap:(e,t)=>{let{isInSubTable:o}=t;return e["x-action-column"]?e:{type:"void","x-decorator":"TableV2.Column.Decorator","x-toolbar":"TableColumnSchemaToolbar","x-settings":"fieldSettings:TableColumn","x-component":"TableV2.Column",properties:{[e.name]:{...e}}}},items:[{name:"displayFields",type:"itemGroup",title:'{{t("Display fields")}}',useChildren:u.HG},{name:"parentCollectionFields",Component:()=>{let e=(0,u.FJ)(),{t}=(0,r.useTranslation)(),o=(0,d.l)();if(!(null==e?void 0:e.length))return null;let n=[];return e.forEach(e=>{Object.values(e)[0].length&&n.push({type:"itemGroup",divider:!0,title:t("Parent collection fields")+"("+o(`${Object.keys(e)[0]}`)+")",children:Object.values(e)[0]})}),(0,l.jsx)(s.Z,{children:n})}},{name:"associationFields",Component:()=>{let e=(0,u.vP)(),t=(0,n.useFieldSchema)(),{t:o}=(0,r.useTranslation)(),i=(0,a.useMemo)(()=>[{type:"itemGroup",title:o("Display association fields"),children:e}],[e,o]);return(null==e?void 0:e.length)&&"AssociationField.SubTable"!==t["x-component"]?(0,l.jsx)(s.Z,{children:i}):null}},{name:"divider",type:"divider",useVisible:()=>"AssociationField.SubTable"!==(0,n.useFieldSchema)()["x-component"]},{type:"item",name:"add",title:'{{t("Action column")}}',Component:"TableActionColumnInitializer",useVisible:()=>"AssociationField.SubTable"!==(0,n.useFieldSchema)()["x-component"]}]},p=new i._({name:"TableColumnInitializers",...c}),m=new i._({name:"table:configureColumns",...c},p)},69744(e,t,o){o.d(t,{l:()=>s});var l=o(71178),n=o(77583),a=o(51649),r=o(29358),i=o(99300);let s=a.default.memo(e=>(0,l.jsx)(r.mz.Provider,{value:null,children:(0,l.jsx)(i.Bw,{initializer:e.initializer||!1,showBorder:!1,showBackground:!0,...n.default.omit(e,"initializer")})}));s.displayName="TableColumnSchemaToolbar"},65988(e,t,o){o.d(t,{n:()=>i,p:()=>r});var l=o(71178),n=o(51649);let a=(0,n.createContext)(null),r=e=>{let{children:t,parent:o}=e;return(0,l.jsx)(a.Provider,{value:{parent:o},children:t})},i=()=>{let e=n.default.useContext(a);return null==e?void 0:e.parent}},27304(e,t,o){o.d(t,{D:()=>n});var l=o(27404);let n=e=>{let{collectionName:t,dataSource:o,association:n}=e;if(!o)throw Error("dataSource is required");return{type:"void","x-decorator":"TableBlockProvider","x-acl-action":`${n||t}:list`,"x-use-decorator-props":"useTableBlockDecoratorProps","x-decorator-props":{collection:t,association:n,dataSource:o,action:"list",params:{pageSize:20},showIndex:!0,dragSort:!1},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:table","x-component":"CardItem","x-filter-targets":[],properties:{actions:{type:"void","x-initializer":"table:configureActions","x-component":"ActionBar","x-component-props":{style:{marginBottom:"var(--nb-spacing)"}},properties:{}},[(0,l.uid)()]:{type:"array","x-initializer":"table:configureColumns","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"}},properties:{actions:{type:"void",title:'{{ t("Actions") }}',"x-action-column":"actions","x-decorator":"TableV2.Column.ActionBar","x-component":"TableV2.Column","x-toolbar":"TableColumnSchemaToolbar","x-initializer":"table:configureItemActions","x-settings":"fieldSettings:TableColumn","x-toolbar-props":{initializer:"table:configureItemActions"},properties:{[(0,l.uid)()]:{type:"void","x-decorator":"DndContext","x-component":"Space","x-component-props":{split:"|"}}}}}}}}}},67722(e,t,o){o.d(t,{A:()=>s,L:()=>d});var l=o(56920),n=o(51649),a=o(68557),r=o(14696),i=o(28227);let s=e=>{var t;let{params:o,parseVariableLoading:l}=d(e),n=(0,r.M)(e.association),a=null==(t=(0,i.m6)().getDataSource(e.dataSource))?void 0:t.collectionManager.getCollection(e.collection);return{params:o,parentRecord:n,parseVariableLoading:l,rowKey:(null==a?void 0:a.filterTargetKey)||"id"}};function d(e){var t;let o=(0,l.useFieldSchema)(),{filter:r,parseVariableLoading:i}=(0,a.j)({filterOption:null==(t=e.params)?void 0:t.filter});return{params:(0,n.useMemo)(()=>{let t=e.params||{},{dragSortBy:l}=(null==o?void 0:o["x-decorator-props"])||{};return e.dragSort&&l&&(t.sort=l),{...t,filter:r}},[o,r,e.dragSort,e.params]),parseVariableLoading:i}}},46539(e,t,o){o.d(t,{Z:()=>h});var l=o(56920),n=o(77583),a=o(51649),r=o(35123),i=o(73761),s=o(14187),d=o(46776),u=o(11482),c=o(58980),p=o(82924),m=o(70808);let h=()=>{var e,t,o,h,x,v;let _=(0,l.useField)(),f=(0,l.useFieldSchema)(),g=(0,d.jz)(),b=(0,s._J)(),{getDataBlocks:y}=(0,u.xZ)(),S=(0,r.V)(),k=(0,a.useRef)(null);k.current={service:b,resource:g};let C=(null==b||null==(e=b.data)?void 0:e.meta)||{},M=(0,m.BY)(),w=(0,a.useCallback)(()=>{null==M||M.current},[M]),F=(0,a.useMemo)(()=>({pageSize:null==C?void 0:C.pageSize,total:null==C?void 0:C.count,current:null==C?void 0:C.page,onChange:w}),[null==C?void 0:C.count,null==C?void 0:C.page,null==C?void 0:C.pageSize,w]),P=(null==b||null==(t=b.data)?void 0:t.data)||[];return(0,a.useEffect)(()=>{if(!(null==b?void 0:b.loading)){var e,t;let o=null==(t=S.field)||null==(e=t.data)?void 0:e.selectedRowKeys;_.data=_.data||{},(0,n.isEqual)(_.data.selectedRowKeys,o)||(_.data.selectedRowKeys=o)}},[_,null==b?void 0:b.data,null==b?void 0:b.loading,null==(h=S.field)||null==(o=h.data)?void 0:o.selectedRowKeys]),{optimizeTextCellRender:!0,value:P,childrenColumnName:S.childrenColumnName,loading:null==b?void 0:b.loading,showIndex:S.showIndex,dragSort:S.dragSort&&S.dragSortBy,rowKey:S.rowKey||(null==f||null==(x=f["x-component-props"])?void 0:x.rowKey)||"id",pagination:(null==f||null==(v=f["x-component-props"])?void 0:v.pagination)!==!1&&F,onRowSelectionChange:(0,a.useCallback)((e,t)=>{if(S){var o,l,n;S.field.data=(null==(o=S.field)?void 0:o.data)||{},S.field.data.selectedRowKeys=e,S.field.data.selectedRowData=t,null==(n=S.field)||null==(l=n.onRowSelect)||l.call(n,e)}},[]),onRowDragEnd:(0,a.useCallback)(async e=>{let{from:t,to:o}=e;await k.current.resource.move({sourceId:t[S.rowKey||"id"],targetId:o[S.rowKey||"id"],sortField:S.dragSort&&S.dragSortBy}),k.current.service.refresh()},[S.rowKey,S.dragSort,S.dragSortBy]),onChange:(0,a.useCallback)((e,t,o)=>{var l,n,a,r,i,s,d,u,c,p;let{current:m,pageSize:h}=e,x=null==(a=f.parent)||null==(n=a["x-decorator-props"])||null==(l=n.params)?void 0:l.sort,v=o.order?"ascend"===o.order?[o.field]:[`-${o.field}`]:x||S.dragSortBy,_=h||(null==(s=f.parent)||null==(i=s["x-decorator-props"])||null==(r=i.params)?void 0:r.pageSize),g={...null==(c=k.current)||null==(u=c.service)||null==(d=u.params)?void 0:d[0],page:m||1,pageSize:_};v&&(g.sort=v),null==(p=k.current)||p.service.run(g)},[f.parent]),onClickRow:(0,a.useCallback)((e,t,o)=>{let{targets:l,uid:n}=(0,i.findFilterTargets)(f),a=y();if(!l||!l.some(e=>a.some(t=>t.uid===e.uid)))return void t(e=>e.length?[]:e);let r=a.find(e=>e.uid===f.parent["x-uid"]);a.forEach(t=>{var a,i,s,d,u,m,h,x,v;let _,f=l.find(e=>e.uid===t.uid);if(!f)return;let g=[e[u=r,m=f.field,(null==(_=null==u||null==(h=u.associatedFields)?void 0:h.find(e=>e.foreignKey===m))?void 0:_.sourceKey)||(null==m||null==(v=m.split)||null==(x=v.call(m,"."))?void 0:x[1])||S.rowKey||"id"]],b=(null==(a=t.service.params)?void 0:a[0])||{},y=(null==(s=t.service.params)||null==(i=s[1])?void 0:i.filters)||{};if(o.includes(e[S.rowKey])){if(null==(d=t.clearSelection)||d.call(t),"manual"===t.dataLoadingMode)return t.clearData();delete y[n]}else y[n]={$and:[{[f.field||S.rowKey]:{[f.field?"$in":"$eq"]:g}}]};let k=(0,c.Dj)([...Object.values(y).map(e=>(0,p.pA3)(e)),t.defaultFilter]);return t.doFilter({...b,page:1,filter:k},{filters:y})}),t(t=>(null==t?void 0:t.includes(e[S.rowKey]))?[]:[e[S.rowKey]])},[S.rowKey,f,y]),onExpand:(0,a.useCallback)((e,t)=>{var o,l;null==(o=(l=S.field).onExpandClick)||o.call(l,e,t)},[])}}},77526(e,t,o){o.d(t,{$e:()=>l.$e,Av:()=>c.A,Cg:()=>d.C,DJ:()=>u.D,Fe:()=>i.F,Hb:()=>a.H,IB:()=>a.I,Lu:()=>c.L,UH:()=>d.U,Wc:()=>n.W,Wd:()=>l.Wd,Wf:()=>l.Wf,ZI:()=>p.Z,_s:()=>s._,cM:()=>l.cM,kL:()=>n.k,lI:()=>r.l});var l=o(94109),n=o(42983),a=o(72235),r=o(69744),i=o(49142),s=o(70391),d=o(62431),u=o(27304),c=o(67722),p=o(46539)},49142(e,t,o){o.d(t,{F:()=>F});var l=o(56920),n=o(77843),a=o(16211),r=o(38951),i=o(43545),s=o(18111),d=o(43288),u=o(58980),c=o(95951),p=o(38131),m=o(17664),h=o(79029),x=o(71178);o(51649);var v=o(70892),_=o(61500),f=o(51281),g=o(61013),b=o(77490),y=o(25952),S=o(20349),k=o(71162),C=o(24768),M=o(43873),w=o(17961);let F=new r.R({name:"blockSettings:table",items:[{name:"editBlockTitle",Component:m.P},{name:"setTheBlockHeight",Component:p._},{name:"linkageRules",Component:b.f9,useComponentProps(){let{name:e}=(0,d.k7)(),{t}=(0,n.useTranslation)();return{collectionName:e,title:t("Block Linkage rules"),category:w.Od.block}}},{name:"treeTable",type:"switch",useComponentProps:()=>{var e;let{getCollectionField:t,getCollection:o}=(0,d.nj)(),a=(0,l.useField)(),r=(0,l.useFieldSchema)(),{service:i}=(0,s.El)(),{t:u}=(0,n.useTranslation)(),{dn:p}=(0,c.er)(),m=(0,d.k7)(),{resource:h}=a.decoratorProps,x=h&&t(h),v=(null==h?void 0:h.includes("."))?null==(e=o(null==x?void 0:x.target))?void 0:e.tree:!!(null==m?void 0:m.tree);return{title:u("Tree table"),defaultChecked:!0,checked:!!v&&a.decoratorProps.treeTable,onChange:e=>{var t;a.decoratorProps.treeTable=e,r["x-decorator-props"].treeTable=e,!1===e&&(r["x-decorator-props"].expandFlag=!1);let o={...null==(t=i.params)?void 0:t[0],tree:!!e||null};p.emit("patch",{schema:r}),p.refresh(),i.run(o)}}},useVisible:()=>{let{getCollectionField:e}=(0,d.nj)(),t=(0,l.useField)(),o=(0,d.k7)(),{resource:n}=t.decoratorProps,a=n&&e(n);return(null==o?void 0:o.tree)&&(null==a?void 0:a.collectionName)===(null==a?void 0:a.target)}},(0,i.$)({name:"expandFlag",title:e=>e("Expand All"),defaultValue:!1,schemaKey:"x-decorator-props.expandFlag",useVisible:()=>(0,l.useField)().decoratorProps.treeTable}),{name:"enableDragAndDropSorting",type:"switch",useComponentProps:()=>{let{getCollectionField:e}=(0,d.nj)(),t=(0,l.useField)(),o=(0,l.useFieldSchema)(),{service:r}=(0,s.El)(),{t:i}=(0,n.useTranslation)(),{dn:u}=(0,c.er)(),{resource:p}=t.decoratorProps,m=p&&e(p),h=(0,a.VB)();return{title:i("Enable drag and drop sorting"),checked:t.decoratorProps.dragSort,onChange:async e=>{var l,n,a;if(e&&m){let{data:e}=await h.resource("collections.fields",m.collectionName).update({filterByTk:m.name,values:{sortable:!0}}),t=null==e||null==(a=e.data)||null==(n=a[0])?void 0:n.sortBy;o["x-decorator-props"].dragSortBy=t}t.decoratorProps.dragSort=e,o["x-decorator-props"].dragSort=e,r.run({...null==(l=r.params)?void 0:l[0],sort:o["x-decorator-props"].dragSortBy}),u.emit("patch",{schema:{"x-uid":o["x-uid"],"x-decorator-props":o["x-decorator-props"]}})}}}},{name:"SortField",Component:function(){let{fields:e}=(0,f.k)(),t=(0,l.useField)(),o=(0,l.useFieldSchema)(),{t:a}=(0,n.useTranslation)(),{dn:r}=(0,c.er)(),i=(0,g.l)(),{service:s,association:d}=(0,v.El)(),{getCollectionJoinField:u}=(0,_.n)(),p=u(d),m=e.filter(e=>!(null==e?void 0:e.target)&&"sort"===e.interface).map(e=>{var t;return{value:null==e?void 0:e.name,label:i(null==e||null==(t=e.uiSchema)?void 0:t.title)||(null==e?void 0:e.name),disabled:(null==e?void 0:e.scopeKey)&&(null==p?void 0:p.foreignKey)!==e.scopeKey}});return(0,x.jsx)(b.Al,{title:a("Drag and drop sorting field"),options:m,value:t.decoratorProps.dragSortBy,onChange:e=>{var l;o["x-decorator-props"].dragSortBy=e,s.run({...null==(l=s.params)?void 0:l[0],sort:e}),t.decoratorProps.dragSortBy=e,r.emit("patch",{schema:{"x-uid":o["x-uid"],"x-decorator-props":o["x-decorator-props"]}}),r.refresh()}},"sort-field")},useVisible:()=>(0,l.useField)().decoratorProps.dragSort},{name:"enableIndexColumn",type:"switch",useComponentProps:()=>{let e=(0,l.useField)(),t=(0,l.useFieldSchema)(),{t:o}=(0,n.useTranslation)(),{dn:a}=(0,c.er)();return{title:o("Enable index column"),checked:!1!==e.decoratorProps.enableIndexColumn,onChange:async o=>{e.decoratorProps=e.decoratorProps||{},e.decoratorProps.enableIndexColumn=o,t["x-decorator-props"].enableIndexColumn=o,a.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":t["x-decorator-props"]}})}}}},k.d,S.e,M.qm,{name:"RecordsPerPage",type:"select",useComponentProps(){var e,t;let o=(0,l.useField)(),a=(0,l.useFieldSchema)(),{service:r}=(0,s.El)(),{t:i}=(0,n.useTranslation)(),{dn:d}=(0,c.er)();return{title:i("Records per page"),value:(null==(t=o.decoratorProps)||null==(e=t.params)?void 0:e.pageSize)||20,options:[{label:"5",value:5},{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100},{label:"200",value:200}],onChange:e=>{var t;let l=o.decoratorProps.params||{};l.pageSize=e,o.decoratorProps.params=l,a["x-decorator-props"].params=l,r.run({...null==(t=r.params)?void 0:t[0],pageSize:e,page:1}),d.emit("patch",{schema:{"x-uid":a["x-uid"],"x-decorator-props":a["x-decorator-props"]}})}}}},{name:"tableSize",type:"select",useComponentProps(){var e;(0,l.useField)();let t=(0,l.useFieldSchema)(),{t:o}=(0,n.useTranslation)(),{dn:a}=(0,c.er)(),r=t.reduceProperties((e,t)=>{if("TableV2"===t["x-component"])return t},null);return{title:o("Table size"),value:(null==r||null==(e=r["x-component-props"])?void 0:e.size)||"small",options:[{label:o("Large"),value:"large"},{label:o("Middle"),value:"middle"},{label:o("Small"),value:"small"}],onChange:e=>{r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].size=e,a.emit("patch",{schema:{"x-uid":r["x-uid"],"x-component-props":r["x-component-props"]}})}}}},{name:"ConnectDataBlocks",Component:h.$,useComponentProps(){let{t:e}=(0,n.useTranslation)();return{type:u.I1.TABLE,emptyDescription:e("No blocks to connect")}}},{name:"divider",type:"divider",sort:7e3,useVisible:()=>{var e;let t=(0,l.useFieldSchema)();return!(null==t||null==(e=t["x-decorator-props"])?void 0:e.disableTemplate)}},{name:"ConvertReferenceToDuplicate",sort:8e3,Component:y.l,useComponentProps(){var e,t;let{name:o}=(0,d.k7)(),n=(0,l.useFieldSchema)(),{componentNamePrefix:a}=(0,C.kU)();return{componentName:`${a}Table`,collectionName:o,resourceName:(null==n||null==(e=n["x-decorator-props"])?void 0:e.resource)||(null==n||null==(t=n["x-decorator-props"])?void 0:t.association)}},useVisible:()=>{var e;let t=(0,l.useFieldSchema)();return!(null==t||null==(e=t["x-decorator-props"])?void 0:e.disableTemplate)}},{name:"divider2",type:"divider",sort:9e3},{name:"delete",type:"remove",sort:1e4,useComponentProps:()=>({removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})}]})},70391(e,t,o){o.d(t,{_:()=>y});var l=o(71178),n=o(82113),a=o(56920),r=o(52793);o(51649);var i=o(77843),s=o(17157),d=o(38951),u=o(43288),c=o(57359),p=o(28227),m=o(92719),h=o(92619),x=o(82924),v=o(31475),_=o(32221),f=o(99300),g=o(33204),b=o(37208);let y=new d.R({name:"fieldSettings:TableColumn",items:[{name:"decoratorOptions",type:"itemGroup",hideIfNoChildren:!0,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{title:e("Generic properties")}},children:[{name:"customColumnTitle",type:"modal",useComponentProps(){var e;let{fieldSchema:t,collectionField:o}=(0,_.BC)(),l=(0,a.useField)(),{t:n}=(0,i.useTranslation)(),r=(0,a.useFieldSchema)(),{dn:s}=(0,x.erX)();return{title:n("Custom column title"),schema:{type:"object",title:n("Custom column title"),properties:{title:{title:n("Column title"),default:null==r?void 0:r.title,description:`${n("Original field title: ")}${(null==o||null==(e=o.uiSchema)?void 0:e.title)||(null==t?void 0:t.title)}`,"x-decorator":"FormItem","x-component":"Input","x-component-props":{}}}},onSubmit:e=>{let{title:t}=e;l.title=t,r.title=t,s.emit("patch",{schema:{"x-uid":r["x-uid"],title:r.title}}),s.refresh()}}}},{name:"editTooltip",type:"modal",useComponentProps(){var e;let{t}=(0,i.useTranslation)(),{dn:o}=(0,x.erX)(),l=(0,a.useField)(),n=(0,a.useFieldSchema)();return{title:t("Edit tooltip"),schema:{type:"object",title:t("Edit tooltip"),properties:{tooltip:{default:(null==n||null==(e=n["x-component-props"])?void 0:e.tooltip)||"","x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{}}}},onSubmit(e){let{tooltip:t}=e;l.componentProps.tooltip=t,n["x-component-props"]=n["x-component-props"]||{},n["x-component-props"].tooltip=t,o.emit("patch",{schema:{"x-uid":n["x-uid"],"x-component-props":n["x-component-props"]}})}}}},{name:"style",Component:e=>{let t={...e,category:"style"};return(0,l.jsx)(f.f9,{...t})},useVisible(){var e,t;let{fieldSchema:o}=(0,_.BC)(),{isInSubTable:l}=(0,h._)(),n=(0,a.useField)();if(!l)return!0;let r=null==(t=n.path)?void 0:t.splice((null==(e=n.path)?void 0:e.length)-1,1);return!!o&&n.form.query(`${r.concat("*."+o.name)}`).get("readPretty")},useComponentProps(){let{name:e}=(0,p.Ge)(),{linkageRulesProps:t}=(0,s.C5)();return{...t,collectionName:e}}},{name:"columnWidth",type:"modal",useComponentProps(){var e;let t=(0,a.useField)(),{t:o}=(0,i.useTranslation)(),l=(0,a.useFieldSchema)(),{dn:n}=(0,x.erX)();return{title:o("Column width"),schema:{type:"object",title:o("Column width"),properties:{width:{default:(null==l||null==(e=l["x-component-props"])?void 0:e.width)||100,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{}}}},onSubmit:e=>{let{width:o}=e,a=l["x-component-props"]||{};a.width=o;let r={"x-uid":l["x-uid"]};r["x-component-props"]=a,l["x-component-props"]=a,t.componentProps.width=o,n.emit("patch",{schema:r}),n.refresh()}}}},{name:"sortable",type:"switch",useVisible(){let e=(0,p.Ge)(),{collectionField:t}=(0,_.BC)(),{getInterface:o}=(0,u.nj)(),l=o(null==t?void 0:t.interface),{currentMode:n}=(0,v.G2)();return(null==l?void 0:l.sortable)===!0&&!n&&((null==e?void 0:e.name)===(null==t?void 0:t.collectionName)||!(null==t?void 0:t.collectionName)||(null==t?void 0:t.inherit))},useComponentProps(){let e=(0,a.useField)(),{t}=(0,i.useTranslation)(),o=(0,a.useFieldSchema)(),{dn:l}=(0,x.erX)();return{title:t("Sortable"),checked:e.componentProps.sorter,onChange:t=>{let n={"x-uid":o["x-uid"]};o["x-component-props"]={...o["x-component-props"],sorter:t},n["x-component-props"]=o["x-component-props"],e.componentProps.sorter=t,l.emit("patch",{schema:n}),l.refresh()}}}},{name:"setDefaultValue",useVisible(){let{fieldSchema:e}=(0,_.BC)();return!!e&&!(null==e?void 0:e["x-read-pretty"])},Component:g.J,useComponentProps(){let{fieldSchema:e}=(0,_.BC)();return{fieldSchema:e}}},{name:"required",type:"switch",useVisible(){let{uiSchema:e,fieldSchema:t}=(0,_.BC)(),o=(0,a.useField)();return!!t&&["QuickEdit","FormItem"].includes(t["x-decorator"])&&!o.readPretty&&!(null==e?void 0:e["x-read-pretty"])},useComponentProps(){let{fieldSchema:e}=(0,_.BC)(),t=(0,a.useField)(),{t:o}=(0,i.useTranslation)(),{dn:l}=(0,x.erX)();return{key:"required",title:o("Required"),checked:null==e?void 0:e.required,onChange:o=>{var n,a;if(!e)return console.error("fieldSchema is required");let r={"x-uid":e["x-uid"]};e.required=o,r.required=o;let i=null==(a=t.path)?void 0:a.splice((null==(n=t.path)?void 0:n.length)-1,1);t.form.query(`${i.concat("*."+e.name)}`).forEach(e=>{e.required=o}),l.emit("patch",{schema:r}),l.refresh()}}}},{name:"pattern",type:"select",useVisible(){let{fieldSchema:e,collectionField:t}=(0,_.BC)(),o=(0,a.useField)();return!!e&&["QuickEdit","FormItem"].includes(e["x-decorator"])&&!(null==o?void 0:o.readPretty)&&(null==t?void 0:t.interface)!=="o2m"&&!(0,b.h)(e)},useComponentProps(){let{fieldSchema:e}=(0,_.BC)(),t=(0,a.useField)(),{t:o}=(0,i.useTranslation)(),{dn:l}=(0,x.erX)(),n="editable";return e?(!0===e["x-disabled"]&&(n="readonly"),!0===e["x-read-pretty"]&&(n="read-pretty"),{key:"pattern",title:o("Pattern"),options:[{label:o("Editable"),value:"editable"},{label:o("Readonly"),value:"readonly"},{label:o("Easy-reading"),value:"read-pretty"}],value:n,onChange:o=>{var n,a;let r={"x-uid":e["x-uid"]},i=null==(a=t.path)?void 0:a.splice((null==(n=t.path)?void 0:n.length)-1,1);switch(o){case"readonly":e["x-read-pretty"]=!1,e["x-disabled"]=!0,r["x-read-pretty"]=!1,r["x-disabled"]=!0,t.form.query(`${i.concat("*."+e.name)}`).forEach(e=>{e.readonly=!0,e.disabled=!0});break;case"read-pretty":e["x-read-pretty"]=!0,e["x-disabled"]=!1,r["x-read-pretty"]=!0,r["x-disabled"]=!1,t.form.query(`${i.concat("*."+e.name)}`).forEach(e=>{e.readPretty=!0});break;default:e["x-read-pretty"]=!1,e["x-disabled"]=!1,r["x-read-pretty"]=!1,r["x-disabled"]=!1,t.form.query(`${i.concat("*."+e.name)}`).forEach(e=>{e.readPretty=!1,e.disabled})}l.emit("patch",{schema:r}),l.refresh()}}):console.error("fieldSchema is required")}},{name:"fixed",type:"select",useComponentProps(){var e;let{t}=(0,i.useTranslation)(),o=(0,a.useField)(),l=(0,a.useFieldSchema)(),{dn:n}=(0,x.erX)();return{title:t("Fixed"),options:[{label:t("Not fixed"),value:"none"},{label:t("Left fixed"),value:"left"},{label:t("Right fixed"),value:"right"}],value:(null==(e=o.componentProps)?void 0:e.fixed)||"none",onChange(e){let t={"x-uid":l["x-uid"]};l["x-component-props"]=l["x-component-props"]||{},l["x-component-props"].fixed=e,t["x-component-props"]=l["x-component-props"],o.componentProps=o.componentProps||{},o.componentProps.fixed=e,n.emit("patch",{schema:t}),n.refresh()}}}},{name:"hidden",type:"switch",useComponentProps(){let e=(0,a.useField)(),{t}=(0,i.useTranslation)(),o=(0,a.useFieldSchema)(),{columnSchema:s}=(0,_.BC)(),{fieldSchema:d}=(0,v.G2)()||{},{dn:u}=(0,x.erX)(),c=s||o;return{title:(0,l.jsxs)("span",{children:[t("Hide column"),(0,l.jsx)(r.Tooltip,{title:t("In configuration mode, the entire column becomes transparent. In non-configuration mode, the entire column will be hidden. Even if the entire column is hidden, its configured default values and other settings will still take effect."),children:(0,l.jsx)(n.QuestionCircleOutlined,{style:{marginLeft:4,opacity:.65}})})]}),checked:e.componentProps.columnHidden,onChange:t=>{let l={"x-uid":c["x-uid"]},n={...c["x-component-props"],columnHidden:t};c["x-component-props"]=n,o["x-component-props"]={...o["x-component-props"],columnHidden:t},function e(t,o,l){if(!t)return!1;if(t["x-uid"]===o)return t["x-component-props"]=l,!0;for(let n of Object.values(t.properties||{}))if(e(n,o,l))return!0;return!1}(d,c["x-uid"],n),l["x-component-props"]=n,e.componentProps.columnHidden=t,u.emit("patch",{schema:l}),u.refresh({refreshParentSchema:!0})}}}},m.I]},{name:"componentOptions",type:"itemGroup",hideIfNoChildren:!0,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{title:e("Specific properties")}},useChildren(){let e=(0,s.nm)(),t=(0,c.q)(),o=e.schemaSettingsManager.get(`fieldSettings:component:${{Select:"Select",DatePicker:"DatePicker",Nester:"Nester",SubTable:"SubTable",Picker:"Picker",PopoverNester:"PopoverNester",Tag:"Tag"}[t]||t}`);return(null==o?void 0:o.items)||[]}},{name:"divider",type:"divider"},{name:"delete",type:"remove",sort:100,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{removeParentsIfNoChildren:!1,confirm:{title:e("Delete field")},breakRemoveOn:{"x-component":"Grid"}}}}]})},34214(e,t,o){o.d(t,{e:()=>r});var l=o(56920),n=o(51649),a=o(6565);let r=()=>{let e=(0,l.useFieldSchema)(),{collectOperator:t,removeOperator:o}=(0,a.D)();(0,n.useEffect)(()=>()=>{o(e.name)},[e.name,o]),e["x-filter-operator"]&&t(e.name,e["x-filter-operator"])}},97173(e,t,o){o.d(t,{DM:()=>i.D,lJ:()=>i.l,Yb:()=>s.Y,lO:()=>l.l,YF:()=>u.Y,$R:()=>d.$,qm:()=>r.qm,fY:()=>r.fY,yz:()=>r.yz,Bd:()=>a.B,ys:()=>n.y});var l=o(44845),n=o(76564),a=o(4017),r=o(43873),i=o(11184),s=o(1575),d=o(58555),u=o(83736)},58555(e,t,o){o.d(t,{$:()=>n});var l=o(28227);let n=e=>{var t,o;let n=(0,l.Ge)()||{},{unavailableActions:a,availableActions:r}=(null==n?void 0:n.options)||{};return r?null==r||null==(t=r.includes)?void 0:t.call(r,e):!a||!(null==a||null==(o=a.includes)?void 0:o.call(a,e))}},14696(e,t,o){o.d(t,{M:()=>n});var l=o(35432);let n=e=>{let t=(0,l.zv)();if(e)return t}},83736(e,t,o){o.d(t,{Y:()=>r});var l=o(44374),n=o(8004),a=o(67242);let r=()=>{let{sourceId:e,association:t}=(0,l.useDataBlockProps)()||{},o=(0,a.i)(t),r=(0,n.Q)({association:t});return e||(null==r?void 0:r[o])}},67242(e,t,o){o.d(t,{i:()=>n});var l=o(26174);let n=e=>(0,l.r2)().getSourceKeyByAssociation(e)},15701(e,t,o){o.d(t,{FU:()=>_,oc:()=>v,yp:()=>f});var l=o(56920),n=o(77843),a=o(38951),r=o(57359),i=o(61013),s=o(95951),d=o(81547),u=o(60817),c=o(31574),p=o(32221),m=o(23867),h=o(463);let x=[{label:"{{t('Large')}}",value:"large"},{label:"{{t('Default')}}",value:"default"},{label:"{{t('Small')}}",value:"small"},{label:500,value:500},{label:400,value:400},{label:300,value:300}],v={name:"size",type:"select",useVisible(){let e=(0,c.U5)(),{fieldSchema:t}=(0,p.BC)();return e&&!t},useComponentProps(){var e;let{t}=(0,n.useTranslation)(),o=(0,l.useField)(),a=(0,l.useFieldSchema)(),{dn:r}=(0,s.er)(),d=(0,i.l)();return{title:t("Size"),options:d(x),value:(null==o||null==(e=o.componentProps)?void 0:e.size)||"default",onChange(e){let t={"x-uid":a["x-uid"]};a["x-component-props"]=a["x-component-props"]||{},a["x-component-props"].size=e,t["x-component-props"]=a["x-component-props"],o.componentProps=o.componentProps||{},o.componentProps.size=e,r.emit("patch",{schema:t}),r.refresh()}}}},_={name:"showFileName",type:"switch",useComponentProps(){var e;let{t}=(0,n.useTranslation)(),o=(0,l.useField)(),{fieldSchema:a}=(0,p.BC)(),r=(0,l.useFieldSchema)(),i=a||r,{dn:d,refresh:u}=(0,s.er)();return{title:t("Show file name"),checked:(null==(e=i["x-component-props"])?void 0:e.showFileName)!==!1,onChange(e){let t={"x-uid":i["x-uid"]};o.componentProps.showFileName=e,i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].showFileName=e,t["x-component-props"]=i["x-component-props"],d.emit("patch",{schema:t}),u()}}}},f=new a.R({name:"fieldSettings:component:FileManager",items:[{name:"fieldComponent",type:"select",useComponentProps(){let{t:e}=(0,n.useTranslation)(),t=(0,l.useField)(),o=(0,c.TN)(),a=(0,r.q)(),{fieldSchema:i,collectionField:m}=(0,p.BC)(),h=(0,l.useFieldSchema)(),x=i||h,v=(0,d.j)({fieldSchema:i,collectionField:m}),{dn:_}=(0,s.er)();return{title:e("Field component"),options:v,value:a,onChange(e){let l={"x-uid":x["x-uid"]};x["x-component-props"]=x["x-component-props"]||{},x["x-component-props"].mode=e,l["x-component-props"]=x["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=e,(0,u.WX)(x)&&o&&(l.default=null,x.default=null,t.setInitialValue(null),t.setValue(null)),_.emit("patch",{schema:l}),_.refresh()}}}},{name:"quickUpload",type:"switch",useComponentProps(){var e;let{t}=(0,n.useTranslation)(),o=(0,l.useField)(),{fieldSchema:a}=(0,p.BC)(),r=(0,l.useFieldSchema)(),i=a||r,{dn:d,refresh:u}=(0,s.er)();return{title:t("Quick upload"),checked:(null==(e=i["x-component-props"])?void 0:e.quickUpload)!==!1,onChange(e){let t={"x-uid":i["x-uid"]};o.componentProps.quickUpload=e,i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].quickUpload=e,t["x-component-props"]=i["x-component-props"],d.emit("patch",{schema:t}),u()}}},useVisible(){let{fieldSchema:e}=(0,p.BC)(),t=(0,l.useField)(),o=(0,l.useForm)();return!((null==e?void 0:e["x-read-pretty"])||t.readPretty||o.readPretty)}},{name:"selectFile",type:"switch",useComponentProps(){var e;let{t}=(0,n.useTranslation)(),o=(0,l.useField)(),{fieldSchema:a}=(0,p.BC)(),r=(0,l.useFieldSchema)(),i=a||r,{dn:d,refresh:u}=(0,s.er)();return{title:t("Select file"),checked:(null==(e=i["x-component-props"])?void 0:e.selectFile)!==!1,onChange(e){let t={"x-uid":i["x-uid"]};o.componentProps.selectFile=e,i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].selectFile=e,t["x-component-props"]=i["x-component-props"],d.emit("patch",{schema:t}),u()}}},useVisible(){let{fieldSchema:e}=(0,p.BC)(),t=(0,l.useField)(),o=(0,l.useForm)();return!((null==e?void 0:e["x-read-pretty"])||t.readPretty||o.readPretty)}},v,_,{...(0,h.Y3)(),useVisible(){let e=(0,c.xq)(),t=(0,m.z)();return e&&t()}}]})},98447(e,t,o){o.d(t,{Gi:()=>p,Pq:()=>v,Qd:()=>m,UD:()=>h,yW:()=>x});var l=o(56920),n=o(77583),a=o(77843),r=o(38951),i=o(11340),s=o(38693),d=o(32221),u=o(95951),c=o(18272);let p={name:"ellipsis",type:"switch",useComponentProps(){var e;let{fieldSchema:t}=(0,d.BC)(),o=(0,d.nS)(),r=(0,l.useFieldSchema)(),i=(0,l.useField)(),{dn:s}=(0,u.er)(),{t:c}=(0,a.useTranslation)(),p=t||r,m=t?o[0]?!o[0].readPretty:!t["x-read-pretty"]:!i.readPretty;return{title:c("Ellipsis overflow content"),checked:!!(null==(e=p["x-component-props"])?void 0:e.ellipsis),hidden:m,onChange:async e=>{t&&o?o.forEach(t=>{t.componentProps.ellipsis=e}):i.componentProps.ellipsis=e,n.default.set(p,"x-component-props.ellipsis",e),await s.emit("patch",{schema:{"x-uid":p["x-uid"],"x-component-props":{...p["x-component-props"],ellipsis:e}}})}}}},m={name:"enableLink",type:"switch",useVisible(){let e=(0,l.useField)(),{fieldSchema:t}=(0,d.BC)(),o=(0,l.useFieldSchema)(),n=t||o,{name:a}=(0,i.MX)()||{};return"kanban"!==a&&((null==n?void 0:n["x-read-pretty"])||e.readPretty)},useComponentProps(){var e;let{t}=(0,a.useTranslation)(),o=(0,l.useField)(),{fieldSchema:n}=(0,d.BC)(),r=(0,l.useFieldSchema)(),i=n||r,{dn:s}=(0,u.er)();return{title:t("Enable link"),checked:null==i||null==(e=i["x-component-props"])?void 0:e.enableLink,onChange(e){i["x-component-props"]={...null==i?void 0:i["x-component-props"],enableLink:e},o.componentProps.enableLink=e,s.emit("patch",{schema:{"x-uid":i["x-uid"],"x-component-props":{...null==i?void 0:i["x-component-props"]}}})}}}},h={name:"openMode",Component:c.sm,useComponentProps(){let{hideOpenMode:e}=(0,s.k)(),{fieldSchema:t}=(0,d.BC)(),o=(0,l.useFieldSchema)();return{openMode:!e,openSize:!e,targetSchema:t||o}},useVisible(){var e;let t=(0,l.useField)(),{fieldSchema:o}=(0,d.BC)(),n=(0,l.useFieldSchema)(),a=o||n;return((null==a?void 0:a["x-read-pretty"])||t.readPretty)&&(null==a||null==(e=a["x-component-props"])?void 0:e.enableLink)}},x={name:"autoFocus",type:"switch",useVisible(){let e=(0,l.useField)(),{fieldSchema:t}=(0,d.BC)(),o=(0,l.useFieldSchema)(),n=t||o;return!(null==n?void 0:n["x-read-pretty"])&&!e.readPretty},useComponentProps(){var e;let{t}=(0,a.useTranslation)(),o=(0,l.useField)(),{fieldSchema:n}=(0,d.BC)(),r=(0,l.useFieldSchema)(),i=n||r,{dn:s}=(0,u.er)();return{title:t("Auto focus"),checked:null==i||null==(e=i["x-component-props"])?void 0:e.autoFocus,onChange(e){i["x-component-props"]={...null==i?void 0:i["x-component-props"],autoFocus:e},o.componentProps.autoFocus=e,s.emit("patch",{schema:{"x-uid":i["x-uid"],"x-component-props":{...null==i?void 0:i["x-component-props"]}}})}}}},v=new r.R({name:"fieldSettings:component:Input",items:[p,m,h,{name:"enableScan",type:"switch",useVisible(){let e=(0,l.useField)(),{fieldSchema:t}=(0,d.BC)(),o=(0,l.useFieldSchema)(),n=t||o;return!(null==n?void 0:n["x-read-pretty"])&&!e.readPretty},useComponentProps(){var e;let{t}=(0,a.useTranslation)(),o=(0,l.useField)(),{fieldSchema:n}=(0,d.BC)(),r=(0,l.useFieldSchema)(),i=n||r,{dn:s}=(0,u.er)();return{title:t("Enable Scan"),checked:null==i||null==(e=i["x-component-props"])?void 0:e.enableScan,onChange(e){i["x-component-props"]={...null==i?void 0:i["x-component-props"],enableScan:e},o.componentProps.enableScan=e,s.emit("patch",{schema:{"x-uid":i["x-uid"],"x-component-props":{...null==i?void 0:i["x-component-props"]}}})}}}},{name:"disableManualInput",type:"switch",useVisible(){var e;let{fieldSchema:t}=(0,d.BC)(),o=(0,l.useFieldSchema)();return null==(e=(t||o)["x-component-props"])?void 0:e.enableScan},useComponentProps(){var e;let{t}=(0,a.useTranslation)(),o=(0,l.useField)(),{fieldSchema:n}=(0,d.BC)(),r=(0,l.useFieldSchema)(),i=n||r,{dn:s}=(0,u.er)();return{title:t("Disable manual input"),checked:null==i||null==(e=i["x-component-props"])?void 0:e.disableManualInput,onChange(e){i["x-component-props"]={...null==i?void 0:i["x-component-props"],disableManualInput:e},o.componentProps.disableManualInput=e,s.emit("patch",{schema:{"x-uid":i["x-uid"],"x-component-props":{...null==i?void 0:i["x-component-props"]}}})}}}},x]})},463(e,t,o){o.d(t,{NU:()=>T,Pq:()=>F,US:()=>A,Y3:()=>P,r0:()=>D});var l=o(71178),n=o(56920),a=o(77583);o(51649);var r=o(77843),i=o(38951),s=o(69412),d=o(43288),u=o(57359),c=o(28227),p=o(41944),m=o(60817),h=o(72548),x=o(31574),v=o(32221),_=o(95951),f=o(81547),g=o(99300),b=o(79056),y=o(6206),S=o(23867),k=o(43923),C=o(38693),M=o(98447);let w={name:"enableLink",type:"switch",useVisible:()=>(0,n.useField)().readPretty,useComponentProps(){var e;let{t}=(0,r.useTranslation)(),o=(0,n.useField)(),{fieldSchema:l}=(0,v.BC)(),a=(0,n.useFieldSchema)(),i=l||a,{dn:s}=(0,_.er)();return{title:t("Enable link"),checked:(null==(e=i["x-component-props"])?void 0:e.enableLink)!==!1,onChange(e){i["x-component-props"]={...null==i?void 0:i["x-component-props"],enableLink:e},o.componentProps.enableLink=e,s.emit("patch",{schema:{"x-uid":i["x-uid"],"x-component-props":{...null==i?void 0:i["x-component-props"]}}})}}}},F={name:"titleField",type:"select",useComponentProps(){var e,t,o,l;let{t:a}=(0,r.useTranslation)(),i=(0,n.useField)(),{dn:s}=(0,_.er)(),d=(0,x.kD)(),{uiSchema:u,fieldSchema:p,collectionField:m}=(0,v.BC)(),h=(0,n.useFieldSchema)(),f=p||h,g=(0,c.E1)(),b=m||g,y={...null==b||null==(t=b.uiSchema)||null==(e=t["x-component-props"])?void 0:e.fieldNames,...null==i||null==(o=i.componentProps)?void 0:o.fieldNames,...null==f||null==(l=f["x-component-props"])?void 0:l.fieldNames};return{title:a("Title field"),options:d,value:null==y?void 0:y.label,onChange(e){var t,o,l,n,a;let r={"x-uid":f["x-uid"]},d={...null==b||null==(o=b.uiSchema)||null==(t=o["x-component-props"])?void 0:t.fieldNames,...null==(l=f["x-component-props"])?void 0:l.fieldNames,label:e};f["x-component-props"]=f["x-component-props"]||{},f["x-component-props"].fieldNames=d,r["x-component-props"]=f["x-component-props"],i.componentProps.fieldNames=f["x-component-props"].fieldNames;let u=null==(a=i.path)?void 0:a.splice((null==(n=i.path)?void 0:n.length)-1,1);i.form.query(`${u.concat("*."+f.name)}`).forEach(e=>{e.componentProps.fieldNames=y}),s.emit("patch",{schema:r}),s.refresh()}}}},P=e=>{let t=(null==e?void 0:e.title)||"Allow multiple";return{name:"allowMultiple",type:"switch",useVisible:()=>(0,x.xq)(),useComponentProps(){var e;let{t:o}=(0,r.useTranslation)(),l=(0,n.useField)(),{fieldSchema:a}=(0,v.BC)(),i=(0,n.useFieldSchema)(),s=a||i,{dn:d,refresh:u}=(0,_.er)();return{title:o(t),checked:(null==(e=s["x-component-props"])?void 0:e.multiple)===void 0||s["x-component-props"].multiple,onChange(e){let t={"x-uid":s["x-uid"]};s["x-component-props"]=s["x-component-props"]||{},l.componentProps=l.componentProps||{},s["x-component-props"].multiple=e,l.componentProps.multiple=e,t["x-component-props"]=s["x-component-props"],d.emit("patch",{schema:t}),u()}}}}},j={name:"setDefaultSortingRules",Component:y.b},A={name:"setTheDataScope",Component:b.Z,useComponentProps(){var e,t,o;let{getCollectionJoinField:r,getAllCollectionsInheritChain:i}=(0,d.nj)(),{getField:u}=(0,d.k7)(),{form:c}=(0,s.Es)(),m=(0,p.pE)(),x=(0,n.useField)(),{fieldSchema:f,collectionField:b}=(0,v.BC)(),y=(0,n.useFieldSchema)(),S=f||y,C=b||u(S.name)||r(S["x-collection-field"]),M=(0,k.$l)(),w=(0,k.gp)(),{dn:F}=(0,_.er)();return{collectionName:null==C?void 0:C.target,defaultFilter:(null==S||null==(o=S["x-component-props"])||null==(t=o.service)||null==(e=t.params)?void 0:e.filter)||{},form:c,dynamicComponent:e=>(0,l.jsx)(g.P8,{...e,form:c,collectionField:e.collectionField,record:m,shouldChange:(0,g.io)({collectionField:e.collectionField,variables:M,localVariables:w,getAllCollectionsInheritChain:i})}),onSubmit:e=>{let{filter:t}=e;t=(0,h.pA)(t),a.default.set(S["x-component-props"],"service.params.filter",t),a.default.set(x.componentProps,"service.params.filter",t),F.emit("patch",{schema:{"x-uid":S["x-uid"],"x-component-props":S["x-component-props"]}})}}}},I={name:"fieldComponent",type:"select",useComponentProps(){let{t:e}=(0,r.useTranslation)(),t=(0,n.useField)(),{fieldSchema:o,collectionField:l}=(0,v.BC)(),a=(0,n.useFieldSchema)(),i=o||a,s=(0,f.j)({fieldSchema:o,collectionField:l}),d=(0,x.TN)(),c=(0,u.q)(),{dn:p}=(0,_.er)();return{title:e("Field component"),options:s,value:c,onChange(e){let o={"x-uid":i["x-uid"]};if(i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].mode=e,o["x-component-props"]=i["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=e,(0,m.WX)(i)&&d){var l,n;o.default=null,i.default=null,null==t||null==(l=t.setInitialValue)||l.call(t,null),null==t||null==(n=t.setValue)||n.call(t,null)}p.emit("patch",{schema:o}),p.refresh()}}}},T=new i.R({name:"fieldSettings:component:Select",items:[{...I,useVisible:x.xq},{...A,useVisible(){let e=(0,x.je)(),t=(0,x.U5)();return e&&!t}},{...j,useComponentProps(){let{fieldSchema:e}=(0,v.BC)();return{fieldSchema:e}},useVisible(){let e=(0,x.je)(),t=(0,x.U5)();return e&&!t}},{name:"quickCreate",type:"select",useComponentProps(){var e;let{defaultOpenMode:t}=(0,C.k)(),{t:o}=(0,r.useTranslation)(),l=(0,n.useField)(),a=(0,n.useFieldSchema)(),{dn:i,insertAdjacent:s}=(0,_.er)();return{title:o("Quick create"),options:[{label:o("None"),value:"none"},{label:o("Dropdown"),value:"quickAdd"},{label:o("Pop-up"),value:"modalAdd"}],value:(null==(e=l.componentProps)?void 0:e.addMode)||"none",onChange(e){"modalAdd"===e&&(a.reduceProperties((e,t)=>"Action"===t["x-component"]?t:e,null)||s("afterBegin",{"x-action":"create","x-acl-action":"create",title:"{{t('Add new')}}","x-toolbar":"ActionSchemaToolbar","x-toolbar-props":{draggable:!1},"x-settings":"actionSettings:addNew","x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{openMode:t,type:"default",component:"CreateRecordAction"}}));let o={"x-uid":a["x-uid"]};a["x-component-props"]=a["x-component-props"]||{},a["x-component-props"].addMode=e,o["x-component-props"]=a["x-component-props"],l.componentProps=l.componentProps||{},l.componentProps.addMode=e,i.emit("patch",{schema:o}),i.refresh()}}},useVisible(){let e=(0,x.xq)(),t=(0,x.U5)(),{fieldSchema:o}=(0,v.BC)(),{type:l}=(0,c.h6)()||{};return e&&!o&&!t&&"publicForm"!==l}},{...P(),useVisible(){let e=(0,x.U5)(),t=(0,x.xq)(),o=(0,S.z)();return!e&&t&&o()}},{...F,useVisible:x.xq},{...w,useVisible(){let e=(0,x.U5)();return(0,x.xq)()&&e}},M.Gi,{...M.Qd,useVisible(){let e=(0,c.E1)(),t=(0,x.U5)();return!(0,x.xq)()&&t&&"multipleSelect"!==e.interface}},{...M.UD,useVisible(){var e,t;let o=(0,n.useField)(),l=(0,x.xq)(),{fieldSchema:a}=(0,v.BC)(),r=(0,n.useFieldSchema)(),i=a||r;return((null==i?void 0:i["x-read-pretty"])||o.readPretty)&&((null==i||null==(e=i["x-component-props"])?void 0:e.enableLink)||l&&(null==i||null==(t=i["x-component-props"])?void 0:t.enableLink)!==!1)}}]}),D=new i.R({name:"fieldSettings:component:FilterSelect",items:[{...I,useVisible:x.xq},{...A,useVisible(){let e=(0,x.je)(),t=(0,x.U5)();return e&&!t}},{...j,useComponentProps(){let{fieldSchema:e}=(0,v.BC)();return{fieldSchema:e}},useVisible(){let e=(0,x.je)(),t=(0,x.U5)();return e&&!t}},P({title:"Allow multiple selection"}),{...F,useVisible:x.xq},{...w,useVisible(){let e=(0,x.U5)();return(0,x.xq)()&&e}}]})},38957(e,t,o){o.d(t,{g:()=>v,k:()=>x});var l=o(71178),n=o(56220),a=o(56920),r=o(27404),i=o(51649),s=o(77843),d=o(24),u=o(17157),c=o(13975),p=o(82924),m=o(79246),h=o(93160);let x=()=>{let e,{t}=(0,s.useTranslation)(),o=(0,i.useContext)(a.SchemaOptionsContext),{theme:x}=(0,c.useGlobalTheme)(),{componentCls:_,hashId:f}=(0,m.I)(),g=(0,p.TrS)(),{createRoute:b}=(0,p.Ob5)(),y=(e=(0,d.V)(),(0,i.useCallback)(async t=>{await e.request({method:"POST",url:"/uiSchemas:insert",data:t})},[e])),S=(0,i.useCallback)(async()=>{let e=await (0,p.RD4)(t("Add page"),()=>(0,l.jsx)(p.t6u,{scope:o.scope,components:{...o.components},children:(0,l.jsx)(n.FormLayout,{layout:"vertical",children:(0,l.jsx)(p.Eaz.Provider,{value:p.b6K,children:(0,l.jsx)(p.HvB,{schema:{properties:{title:{title:t("Menu item title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:t("Icon"),"x-component":"IconPicker","x-decorator":"FormItem"}}}})})})}),x).open({initialValues:{}}),a=(0,r.uid)(),i=(0,r.uid)(),s=(0,r.uid)(),d=(0,r.uid)();await b({type:h.q2.flowPage,title:e.title,icon:e.icon,parentId:null==g?void 0:g.id,schemaUid:i,menuSchemaUid:a,enableTabs:!1,children:[{type:h.q2.tabs,schemaUid:s,tabSchemaName:d,hidden:!0}]}),y(v({pageSchemaUid:i}))},[b,y,null==o?void 0:o.components,null==o?void 0:o.scope,null==g?void 0:g.id,t,x]);return(0,l.jsx)(u.rR,{title:t("Modern page (v2)"),onClick:S,className:`${_} ${f}`})};function v(e){let{pageSchemaUid:t}=e;return{type:"void","x-component":"FlowRoute","x-uid":t}}},52973(e,t,o){o.d(t,{my:()=>_,rP:()=>x,yD:()=>v});var l=o(71178),n=o(56220),a=o(56920),r=o(27404),i=o(51649),s=o(77843),d=o(24),u=o(17157),c=o(13975),p=o(82924),m=o(79246),h=o(93160);let x=()=>{let e=(0,d.V)();return(0,i.useCallback)(async t=>{await e.request({method:"POST",url:"/uiSchemas:insert",data:t})},[e])},v=()=>{let{t:e}=(0,s.useTranslation)(),t=(0,i.useContext)(a.SchemaOptionsContext),{theme:o}=(0,c.useGlobalTheme)(),{componentCls:d,hashId:v}=(0,m.I)(),f=(0,p.TrS)(),{createRoute:g}=(0,p.Ob5)(),b=x(),y=(0,i.useCallback)(async()=>{let a=await (0,p.RD4)(e("Add page"),()=>(0,l.jsx)(p.t6u,{scope:t.scope,components:{...t.components},children:(0,l.jsx)(n.FormLayout,{layout:"vertical",children:(0,l.jsx)(p.Eaz.Provider,{value:p.b6K,children:(0,l.jsx)(p.HvB,{schema:{properties:{title:{title:e("Menu item title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:e("Icon"),"x-component":"IconPicker","x-decorator":"FormItem"}}}})})})}),o).open({initialValues:{}}),i=(0,r.uid)(),s=(0,r.uid)(),d=(0,r.uid)(),u=(0,r.uid)();await g({type:h.q2.page,title:a.title,icon:a.icon,parentId:null==f?void 0:f.id,schemaUid:s,menuSchemaUid:i,enableTabs:!1,children:[{type:h.q2.tabs,schemaUid:d,tabSchemaName:u,hidden:!0}]}),b(_({pageSchemaUid:s,tabSchemaUid:d,tabSchemaName:u}))},[g,b,null==t?void 0:t.components,null==t?void 0:t.scope,null==f?void 0:f.id,e,o]);return(0,l.jsx)(u.rR,{title:e("Classic page (v1)"),onClick:y,className:`${d} ${v}`})};function _(e){let{pageSchemaUid:t,tabSchemaUid:o,tabSchemaName:l}=e;return{type:"void","x-component":"Page",properties:{[l]:{type:"void","x-component":"Grid","x-initializer":"page:addBlock",properties:{},"x-uid":o,"x-async":!0}},"x-uid":t}}},40854(e,t,o){o.d(t,{g:()=>l.g});var l=o(38957)},38693(e,t,o){o.d(t,{R:()=>u,k:()=>c});var l=o(71178),n=o(51649),a=o(45249),r=o(51223),i=o(70447);let s={defaultOpenMode:"drawer",openModeToComponent:{drawer:a.Ay,page:i.A,modal:r.Ay},hideOpenMode:!1},d=n.default.createContext(null),u=e=>{let t=(0,n.useMemo)(()=>{let t={...s};return void 0!==e.defaultOpenMode&&(t.defaultOpenMode=e.defaultOpenMode),void 0!==e.openModeToComponent&&(t.openModeToComponent=e.openModeToComponent),void 0!==e.hideOpenMode&&(t.hideOpenMode=e.hideOpenMode),e.isMobile&&(t.isMobile=e.isMobile),t},[e.defaultOpenMode,e.openModeToComponent,e.hideOpenMode]),o=(0,n.useCallback)(e=>{let o=t.openModeToComponent[e];return o||console.error(`OpenModeProvider: openModeToComponent[${e}] is not defined`),o},[t]),a=(0,n.useMemo)(()=>({defaultOpenMode:t.defaultOpenMode,hideOpenMode:t.hideOpenMode,getComponentByOpenMode:o,isMobile:t.isMobile}),[t.defaultOpenMode,t.hideOpenMode,o,t.isMobile]);return(0,l.jsx)(d.Provider,{value:a,children:e.children})},c=()=>n.default.useContext(d)},47851(e,t,o){o.d(t,{P:()=>s});var l=o(71178),n=o(56920),a=o(51649),r=o(82924),i=o(44388);let s=e=>{var t,o;let{visible:s,setVisible:d}=e,[u,c]=(0,a.useState)(!1),[p,m]=(0,a.useState)(!1),{visible:h,setVisible:x}=(0,a.useContext)(i.B9)||{visible:!1,setVisible:()=>{}},v=(0,n.useFieldSchema)(),_=(0,a.useCallback)(e=>{null==d||d(e),null==c||c(e),null==x||x(e)},[d,x]),f=e.openMode||(null==(t=v["x-component-props"])?void 0:t.openMode)||"drawer",g=e.openSize||(null==(o=v["x-component-props"])?void 0:o.openSize);return(0,l.jsx)(i.OC,{visible:!1,children:(0,l.jsx)(r.z45,{visible:s||u||h,setVisible:_,openMode:f,openSize:g,formValueChanged:p,setFormValueChanged:m,children:e.children})})}},84313(e,t,o){o.d(t,{H:()=>l.Hy});var l=o(3012)},39888(e,t,o){o.d(t,{EZ:()=>c,P3:()=>u,hd:()=>p});var l=o(71178),n=o(51649),a=o(77843),r=o(35432),i=o(49621);let s=n.default.createContext(null),d=n.default.createContext(null),u=n.default.memo(e=>{var t,o;let{t:n}=(0,a.useTranslation)(),u=(0,r.zv)(),p=(0,i.Ge)(),m=c();return(0,l.jsx)(d.Provider,{value:{name:"$nParentPopupRecord",title:n("Parent popup record"),value:(null==(t=e.parent)?void 0:t.recordData)||(null==m?void 0:m.value),collection:(null==(o=e.parent)?void 0:o.collection)||(null==m?void 0:m.collection)},children:(0,l.jsx)(s.Provider,{value:{name:"$nPopupRecord",title:n("Current popup record"),value:e.recordData||u,collection:e.collection||p},children:e.children})})});u.displayName="VariablePopupRecordProvider";let c=()=>n.default.useContext(s),p=()=>n.default.useContext(d)},21676(e,t,o){o.d(t,{x:()=>A});var l=o(71178),n=o(63526);o(51649);var a=o(38356),r=o(41906),i=o(83468),s=o(18111),d=o(43288),u=o(50255),c=o(16211),p=o(13975),m=o(6997),h=o(76028),x=o(93160),v=o(82924),_=o(57610),f=o(44388),g=o(5101),b=o(99300),y=o(96932),S=o(86393),k=o(84693),C=o(48849),M=o(52793),w=o(91815),F=o(60422),P=o(28601);class j extends i.k{async afterAdd(){let e=this.app.apiClient,t=e.auth.locale;try{var l,n,a,r,i,s,d,u;let c=await e.request({url:"app:getLang",params:{locale:t},headers:{"X-Role":"anonymous"}}),p=null==c?void 0:c.data;this.engine.context.defineProperty("locales",{value:(null==p?void 0:p.data)||{}}),this.app.use(M.App,{component:!1}),(null==p||null==(l=p.data)?void 0:l.lang)&&(e.auth.setLocale(null==p||null==(s=p.data)?void 0:s.lang),this.app.setDocumentLanguage(null==p||null==(d=p.data)?void 0:d.lang),this.app.i18n.changeLanguage(null==p||null==(u=p.data)?void 0:u.lang)),Object.keys((null==p||null==(n=p.data)?void 0:n.resources)||{}).forEach(e=>{var t,o;this.app.i18n.addResources(null==p||null==(t=p.data)?void 0:t.lang,e,(null==p||null==(o=p.data)?void 0:o.resources[e])||{})}),(0,C.setValidateLanguage)(null==p||null==(a=p.data)?void 0:a.lang),(0,F.M)(null==p?void 0:p.data);let m=P.At[null==p||null==(r=p.data)?void 0:r.lang]||"en";await o(68817)(`./${m}`),w.default.locale(m),window.cronLocale=null==p||null==(i=p.data)?void 0:i.cron}catch(e){throw e}}}class A extends i.k{async afterAdd(){await this.addPlugins()}async load(){this.addComponents(),this.addRoutes(),this.app.use(k.Qd),this.app.use(k.Y),this.app.pluginSettingsManager.add("security",{title:(0,n.tval)("Security"),icon:"SafetyOutlined"})}addRoutes(){this.router.add("root",{path:"/",element:(0,l.jsx)(A.RootRedirect,{})}),this.router.add("not-found",{path:"*",Component:p.AppNotFound}),this.router.add("admin",{path:"/admin",Component:"AdminLayout"}),this.router.add("admin.page",{path:"/admin/:name",Component:"AdminDynamicPage"}),this.router.add("admin.page.tabs",{path:"/admin/:name/tabs/:tabUid",Component:v.Y2j}),this.router.add("admin.page.popups",{path:"/admin/:name/popups/*",Component:f.rN}),this.router.add("admin.page.tabs.popups",{path:"/admin/:name/tabs/:tabUid/popups/*",Component:f.rN}),this.router.add("admin.page.tab",{path:"/admin/:name/tab/:tabUid",Component:"AdminDynamicPage"}),this.router.add("admin.page.view",{path:"/admin/:name/view/*",Component:"AdminDynamicPage"}),this.router.add("admin.page.tab.view",{path:"/admin/:name/tab/:tabUid/view/*",Component:"AdminDynamicPage"})}addComponents(){this.app.addComponents({ErrorFallback:_.x,RouteSchemaComponent:x.yU,BlockTemplatePage:y.BZ,BlockTemplateDetails:y.YU})}async addPlugins(){await this.app.pm.add(p.PluginFlowEngine),await this.app.pm.add(g.PB),await this.app.pm.add(j,{name:"builtin-locale"}),await this.app.pm.add(x.NC,{name:"admin-layout"}),await this.app.pm.add(S.Cz,{name:"system-setting"}),await this.app.pm.add(m._,{name:"pinned-list",config:{items:{ui:{order:100,component:"DesignableSwitch",pin:!0,snippet:"ui.*"},sc:{order:300,component:"SettingsCenterDropdown",pin:!0,snippet:"pm.*"}}}}),await this.app.pm.add(v.GD6,{name:"schema-component"}),await this.app.pm.add(g.X1,{name:"schema-initializer"}),await this.app.pm.add(b.SA,{name:"schema-settings"}),await this.app.pm.add(s.tv,{name:"block-schema-component"}),await this.app.pm.add(v.bkX,{name:"antd-schema-component"}),await this.app.pm.add(r.gt,{name:"builtin-acl"}),await this.app.pm.add(u.L2,{name:"remote-document-title"}),await this.app.pm.add(h.V_,{name:"builtin-pm"}),await this.app.pm.add(d.Kf,{name:"builtin-collection"})}}A.RootRedirect=()=>{var e;let t=(0,c.VB)(),o=!!(null==t||null==(e=t.auth)?void 0:e.token);return(0,l.jsx)(a.Navigate,{replace:!0,to:o?"/admin":"/signin?redirect=/admin"})}},6997(e,t,o){o.d(t,{i6:()=>C,DW:()=>l.PinnedPluginListContext,_:()=>w,k4:()=>l.getPinnedPluginListKeys,P7:()=>y});var l=o(13975),n=o(71178),a=o(10691),r=o(56920),i=o(52793),s=o(93656),d=o(51649),u=o(42536),c=o(78948),p=o(82113),m=o(504),h=o(63526),x=o(77843),v=o(44374),_=o(17103);let f=()=>{var e,t;let{t:o}=(0,x.useTranslation)(),l=(0,_.gL)(),{token:a}=(0,v.useToken)(),r=(null==l||null==(e=l.data)?void 0:e.lang)==="zh-CN",s=[{key:"nocobase",disabled:!0,label:(0,n.jsxs)("div",{style:{cursor:"text"},children:[(0,n.jsx)("div",{style:{color:a.colorText},children:"NocoBase"}),(0,n.jsxs)("div",{style:{fontSize:"0.8em",color:a.colorTextDescription},children:["v",null==l||null==(t=l.data)?void 0:t.version]})]})},{key:"divider_1",type:"divider"},{key:"homePage",label:(0,n.jsx)("a",{href:r?"https://www.nocobase.com/cn/":"https://www.nocobase.com",target:"_blank",rel:"noreferrer",children:o("Home page")})},{key:"userManual",label:(0,n.jsx)("a",{href:r?"https://docs.nocobase.com/cn/guide/":"https://docs.nocobase.com/guide/",target:"_blank",rel:"noreferrer",children:o("Handbook")})},{key:"license",label:(0,n.jsx)("a",{href:r?"https://www.nocobase.com/cn/agreement":"https://www.nocobase.com/en/agreement",target:"_blank",rel:"noreferrer",children:o("License")})}];return(0,n.jsx)(i.Menu,{items:s})},g=(0,a.css)`
144
+ `},properties:{name:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Name")}}'}},value:{type:"string","x-decorator":"FormItem","x-component":o,"x-component-props":{placeholder:'{{t("Value")}}',useTypedConstant:!0,changeOnSelect:!0}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "html"}}'}}},properties:{add:{type:"void",title:'{{t("Add parameter")}}',"x-component":"ArrayItems.Addition"}}}),[o]),openInNewWindowSchema:(0,r.useMemo)(()=>({type:"boolean","x-content":e("Open in new window"),"x-decorator":"FormItem","x-component":"Checkbox","x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "html"}}'}}}}),[e]),modeSchema:a,htmlSchema:s}}},27778(e,t,o){o.d(t,{K:()=>b,P:()=>g});var l=o(71178),n=o(56920),a=o(52793),r=o(51649),i=o(77843),s=o(17157),d=o(38951),u=o(43288),c=o(82924),p=o(45036),m=o(57593),h=o(77490),x=o(39888),v=o(28227),_=o(99300);let f=(0,n.connect)(a.Tree,(0,n.mapProps)((e,t)=>{(0,r.useEffect)(()=>{t.value=e.defaultCheckedKeys||[]},[]);let[o,l]=(0,r.useState)(e.defaultCheckedKeys||[]),n=e=>{l(e),t.value=e};return t.onCheck=n,{...e,checkedKeys:o,onCheck:n}}));function g(){let{dn:e}=(0,c.erX)(),{t}=(0,i.useTranslation)(),o=(0,n.useField)(),a=(0,n.useFieldSchema)(),{name:r}=(0,u.k7)(),{getEnableFieldTree:s,getOnLoadData:d}=(0,m.l)(r,!1,e=>["belongsTo","belongsToMany","hasOne","hasMany"].includes(e.type));return(0,l.jsx)(h.fY,{title:t("Save mode"),components:{Tree:f},scope:{getEnableFieldTree:s,name:r,getOnLoadData:d},schema:{type:"object",title:t("Save mode"),properties:{saveMode:{"x-decorator":"FormItem","x-component":"Radio.Group",default:o.componentProps.saveMode||"create",enum:[{value:"create",label:'{{t("Insert")}}'},{value:"firstOrCreate",label:'{{t("Insert if not exists")}}'},{value:"updateOrCreate",label:'{{t("Insert if not exists, or update")}}'}]},filterKeys:{type:"array",title:'{{ t("Determine whether a record exists by the following fields") }}',required:!0,default:o.componentProps.filterKeys,"x-decorator":"FormItem","x-component":"Tree","x-component-props":{treeData:[],checkable:!0,checkStrictly:!0,selectable:!1,loadData:"{{ getOnLoadData($self) }}",defaultCheckedKeys:o.componentProps.filterKeys,rootStyle:{padding:"8px 0",border:"1px solid #d9d9d9",borderRadius:"2px",maxHeight:"30vh",overflow:"auto",margin:"2px 0"}},"x-reactions":[{dependencies:[".saveMode"],fulfill:{state:{hidden:'{{ $deps[0]==="create"}}',componentProps:{treeData:"{{ getEnableFieldTree(name, $self) }}"}}}}]}}},onSubmit:t=>{let{saveMode:l,filterKeys:n}=t;o.componentProps.saveMode=l,o.componentProps.filterKeys=n,a["x-component-props"]=a["x-component-props"]||{},a["x-component-props"].saveMode=l,a["x-component-props"].filterKeys=n,e.emit("patch",{schema:{"x-uid":a["x-uid"],"x-component-props":{...a["x-component-props"]}}}),e.refresh()}})}let b=new d.R({name:"actionSettings:createSubmit",items:[{name:"editButton",Component:p.Yp,useComponentProps(){let{buttonEditorProps:e}=(0,s.C5)();return e}},{name:"linkageRules",Component:_.f9,useComponentProps(){let{linkageRulesProps:e}=(0,s.C5)();return{...e}}},{name:"secondConfirmation",Component:p.VX},{name:"saveMode",Component:g,useVisible(){let{type:e}=(0,v.h6)()||{};return"publicForm"!==e}},{name:"assignFieldValues",Component:p.TB},{name:"skipRequiredValidation",Component:p.zN},{name:"afterSuccessfulSubmission",Component:p.Kq,useVisible(){let{type:e}=(0,v.h6)()||{};return"publicForm"!==e}},{name:"refreshDataBlockRequest",Component:p.ud,useComponentProps:()=>({isPopupAction:!1}),useVisible:()=>!!(0,x.hd)()},{name:"remove",sort:100,Component:p.d0,useComponentProps(){let{removeButtonProps:e}=(0,s.C5)();return e}}]})},38892(e,t,o){o.d(t,{_:()=>_});var l=o(71178),n=o(51649),a=o(56920),r=o(77583),i=o(27404),s=o(2314),d=o(43923),u=o(59529),c=o(17157),p=o(28227);let m=async(e,t)=>{let{operator:o,condition:l,variables:n,localVariables:a,conditionType:r,displayResult:i}=e;switch(o){case"visible":return await (0,u._c)({ruleGroup:l,variables:n,localVariables:a,conditionType:r},t)&&i.push("visible"),i;case"hidden":return await (0,u._c)({ruleGroup:l,variables:n,localVariables:a,conditionType:r},t)&&i.push("hidden"),i;default:return null}};var h=o(95951),x=o(83006),v=o(4627);let _=e=>{let t=(0,a.useFieldSchema)(),o=(0,d.$l)(),u=(0,d.gp)(),{designable:_}=(0,h.er)(),f=(0,a.useForm)(),g=(0,n.useMemo)(()=>(e=>{if(!e)return[];let t=(null==e?void 0:e["x-block-linkage-rules"])||[];return e.mapProperties(e=>{e["x-block-linkage-rules"]&&(t=e["x-block-linkage-rules"])}),null==t?void 0:t.filter(e=>!e.disabled)})(t),[t]),[b,y]=(0,n.useState)(null),S=((e,t,o,l)=>{let a=(0,c.nm)().jsonLogic,[r,i]=(0,n.useState)(null),s=(0,p.PD)();return(0,n.useEffect)(()=>{(async()=>{let l=[];for(let n of e.filter(e=>!e.disabled))for(let e of n.actions||[])await m({operator:e.operator,condition:n.condition,variables:t,localVariables:o,conditionType:n.conditionType,displayResult:l},a);i(l)})()},[e,l,s]),r})(g,o,u,b),k=(null==t?void 0:t["x-decorator"])==="FormItem"&&!f.readPretty&&g.length;if((0,n.useEffect)(()=>{if(k){let e=(0,i.uid)();return setTimeout(()=>{f.addEffects(e,()=>{(0,x.o)(g,(e,t)=>(0,s.reaction)(()=>[(0,v.hL)({linkageRules:g,localVariables:u}),(0,v.Ou)({action:e,localVariables:u})].map(e=>JSON.stringify(e)).join(","),()=>{y((0,i.uid)())},{fireImmediately:!0,equals:r.isEqual}))})}),()=>{f.removeEffects(e)}}},[g,k]),!g.length)return e.children;if(null===S)return null;if("hidden"===(0,r.last)(S))if(_)return(0,l.jsx)("div",{style:{opacity:.3},children:e.children});else return null;return e.children}},56250(e,t,o){o.d(t,{C:()=>m,R:()=>h});var l=o(71178),n=o(51649),a=o(77843),r=o(26174),i=o(49621),s=o(32444),d=o(61013),u=o(23620),c=o(96932),p=o(7819);let m=e=>{let{t}=(0,a.useTranslation)(),o=(0,r.r2)(),{name:m,title:x}=(0,i.Ge)()||{},v=(0,c.D$)(),{association:_,collection:f}=(0,s.h6)()||{},g=(0,d.l)(),{isMobileLayout:b}=(0,p.mY)();if(_){let[e]=_.split("."),{name:t,title:l}=o.getCollection(e);m=t,x=l}let y=o.getCollectionField(_),S=o.getCollection(f||(null==y?void 0:y.target)),k=["FormItem","ReadPrettyFormItem"].includes(null==v?void 0:v.componentName)?`${null==v?void 0:v.name} ${t("(Fields only)")}`:null==v?void 0:v.name,C=(0,n.useMemo)(()=>[h({collectionTitle:x,collectionName:m,associationField:y,associationCollection:S,compile:g}),k].filter(Boolean),[x,m,y,S,g,k]);return(0,l.jsx)(u.Bw,{title:C,...e,draggable:!b})};function h(e){let{collectionTitle:t,collectionName:o,associationField:l,compile:n,associationCollection:a}=e;if(l){var r;return`${n(t||o)} > ${n((null==(r=l.uiSchema)?void 0:r.title)||l.name)} (${n((null==a?void 0:a.title)||(null==a?void 0:a.name))})`}return n(t||o)}},44845(e,t,o){o.d(t,{l:()=>a});var l=o(51649),n=o(68557);let a=e=>{let{params:t}=e,{filter:o,parseVariableLoading:a}=(0,n.j)({filterOption:null==t?void 0:t.filter});return{params:(0,l.useMemo)(()=>({...t,filter:o}),[JSON.stringify(o)]),parseVariableLoading:a}}},4017(e,t,o){o.d(t,{B:()=>a});var l=o(14696),n=o(44845);function a(e){let t,{params:o,parseVariableLoading:a}=(0,n.l)(e);return e.association&&(t=(0,l.M)(e.association)),{parentRecord:t,params:o,parseVariableLoading:a}}},76564(e,t,o){o.d(t,{y:()=>n});var l=o(76706);function n(){return(0,l.nw)()}},43873(e,t,o){o.d(t,{fY:()=>p,qm:()=>c,yz:()=>m});var l=o(71178),n=o(56920),a=o(77583);o(51649);var r=o(77843),i=o(28227),s=o(95951),d=o(57593),u=o(77490);let c={name:"setDataLoadingMode",Component:m};function p(){let{dataLoadingMode:e}=(0,i.h6)()||{};return e||"auto"}function m(){var e;let{dn:t}=(0,s.er)(),{t:o}=(0,r.useTranslation)(),c=(0,n.useField)(),p=(0,n.useFieldSchema)(),m=(0,i.Ge)(),{getEnableFieldTree:h,getOnLoadData:x}=(0,d.l)(null==m?void 0:m.name),{getDataBlockRequest:v}=(0,i.ZK)();return(0,l.jsx)(u.fY,{title:o("Set data loading mode"),scope:{getEnableFieldTree:h,name:null==m?void 0:m.name,getOnLoadData:x},schema:{type:"object",title:o("Data loading mode"),properties:{dataLoadingMode:{"x-decorator":"FormItem","x-component":"Radio.Group",default:(null==(e=p["x-decorator-props"])?void 0:e.dataLoadingMode)||"auto",enum:[{value:"auto",label:o("Load all data when filter is empty")},{value:"manual",label:o("Do not load data when filter is empty")}]}}},onSubmit:e=>{let{dataLoadingMode:o}=e,l=v();a.default.set(p,"x-decorator-props.dataLoadingMode",o),c.decoratorProps.dataLoadingMode=o,t.emit("patch",{schema:{"x-uid":p["x-uid"],"x-decorator-props":{...p["x-decorator-props"]}}}),t.refresh(),"auto"===o?l.run():l.mutate(void 0)}})}},11184(e,t,o){o.d(t,{D:()=>r,l:()=>i});var l=o(56920),n=o(11340),a=o(35432);function r(e){let t,o=(0,n.DQ)(e);return e.association&&(t=i(e.association)),{params:o,parentRecord:t}}function i(e){let t=(0,l.useFieldSchema)(),o=(0,a.zv)(),n=(0,a.vt)();if(e)return t["x-is-current"]?n:o}},1575(e,t,o){o.d(t,{Y:()=>n});var l=o(76706);function n(){return(0,l.nw)()}},54513(e,t,o){o.d(t,{t:()=>c,y:()=>u});var l=o(71178),n=o(82113),a=o(51649),r=o(17157),i=o(94138),s=o(3403),d=o(59682);let u=e=>{let{filterCollections:t,onlyCurrentDataSource:o,hideSearch:i,createBlockSchema:d,componentType:u="FormItem",templateWrap:p,showAssociationFields:m,hideChildrenIfSingleCollection:h,hideOtherRecordsInPopup:x,currentText:v,otherText:_}=e,f=(0,r.eL)(),{createFormBlock:g,templateWrap:b}=c(),y=(0,a.useCallback)(e=>{if(d)return d(e);g(e)},[d,g]),S=(0,a.useCallback)((e,t)=>p?p(e,t):b(e,t),[p,b]);return(0,l.jsx)(s.kq,{...f,icon:(0,l.jsx)(n.FormOutlined,{}),componentType:u,templateWrap:S,onCreateBlockSchema:y,filter:t,onlyCurrentDataSource:o,hideSearch:i,showAssociationFields:m,hideChildrenIfSingleCollection:h,hideOtherRecordsInPopup:x,currentText:v,otherText:_})},c=()=>{let{insert:e}=(0,r.fx)(),t=(0,i.UJ)(),{isCusomeizeCreate:o}=(0,r.eL)();return{createFormBlock:(0,a.useCallback)(l=>{let{item:n,fromOthersInPopup:a}=l;a?e((0,d.B)({collectionName:n.collectionName||n.name,dataSource:n.dataSource,isCusomeizeCreate:!0})):e((0,d.B)(t?{association:t,dataSource:n.dataSource,isCusomeizeCreate:o}:{collectionName:n.collectionName||n.name,dataSource:n.dataSource,isCusomeizeCreate:o}))},[t,e,o]),templateWrap:(0,a.useCallback)((e,l)=>{let n,{item:a,fromOthersInPopup:r}=l;return n=r?(0,d.B)({dataSource:a.dataSource,templateSchema:e,collectionName:a.name,isCusomeizeCreate:!0}):(0,d.B)(t?{dataSource:a.dataSource,templateSchema:e,collectionName:a.name,association:t,isCusomeizeCreate:o}:{dataSource:a.dataSource,templateSchema:e,collectionName:a.name,isCusomeizeCreate:o}),a.template&&"reference"===a.mode&&(n["x-template-key"]=a.template.key),n},[t,o])}}},92579(e,t,o){o.d(t,{i:()=>a});var l=o(71178);o(51649);var n=o(99300);let a=e=>(0,l.jsx)(n.Bw,{showBorder:!1,showBackground:!0,...e})},83232(e,t,o){o.d(t,{f:()=>h,B:()=>m});var l=o(71178),n=o(82113),a=o(51649),r=o(17157),i=o(43288),s=o(28227),d=o(81936),u=o(96932),c=o(27404);function p(e){let{collectionName:t,dataSource:o,association:l,templateSchema:n}=e,a=e.isCurrent?{"x-is-current":!0}:{};if(!o)throw Error("dataSource are required");return{type:"void","x-acl-action-props":{skipScopeCheck:!1},"x-acl-action":`${l||t}:update`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useEditFormBlockDecoratorProps","x-decorator-props":{action:"get",dataSource:o,collection:t,association:l},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:editForm","x-component":"CardItem",...a,properties:{[(0,c.uid)()]:{type:"void","x-component":"FormV2","x-use-component-props":"useEditFormBlockProps",properties:{grid:n||{type:"void","x-component":"Grid","x-initializer":"form:configureFields",properties:{}},[(0,c.uid)()]:{type:"void","x-initializer":"editForm:configureActions","x-component":"ActionBar","x-component-props":{layout:"one-column"}}}}}}}let m=()=>{let{targetCollection:e,...t}=(0,r.eL)(),{insert:o}=(0,r.fx)(),{getTemplateSchemaByMode:a}=(0,u.ov)(),s=(0,i.k7)(),c=e||s,{createEditFormBlock:p,templateWrap:m}=h();return(0,l.jsx)(r.rR,{icon:(0,l.jsx)(n.FormOutlined,{}),...t,onClick:async e=>{let{item:t}=e;t.template?o(m(await a(t),{item:t})):p({item:t})},items:(0,d.aU)("FormItem",null,null==c?void 0:c.name)})};function h(){let{insert:e}=(0,r.fx)(),t=(0,s.UJ)(),o=(0,s.r2)(),{componentNamePrefix:l}=(0,u.kU)();return{createEditFormBlock:(0,a.useCallback)(l=>{let{item:n}=l,a=n.collectionName||n.name,r=o.getCollection(a);e(p(t?{association:t,collectionName:r.isInherited()?a:void 0,dataSource:n.dataSource,isCurrent:!0}:{collectionName:a,dataSource:n.dataSource}))},[t,o,e]),templateWrap:(0,a.useCallback)((e,n)=>{let{item:a}=n;if(a.template.componentName!==`${l}FormItem`)return e;{let l=a.collectionName||a.name,n=o.getCollection(l),r=p(t?{association:t,collectionName:n.isInherited()?l:void 0,dataSource:a.dataSource,templateSchema:e,isCurrent:!0}:{collectionName:l,dataSource:a.dataSource,templateSchema:e});return"reference"===a.mode&&(r["x-template-key"]=a.template.key),r}},[t,o,l])}}},59682(e,t,o){o.d(t,{B:()=>n});var l=o(27404);function n(e){let{collectionName:t,association:o,dataSource:n,templateSchema:a,isCusomeizeCreate:r}=e;if(!n)throw Error("dataSource are required");return{type:"void","x-acl-action-props":{skipScopeCheck:!0},"x-acl-action":`${o||t}:create`,"x-decorator":"FormBlockProvider","x-use-decorator-props":"useCreateFormBlockDecoratorProps","x-decorator-props":{dataSource:n,collection:t,association:o,isCusomeizeCreate:r},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:createForm","x-component":"CardItem",properties:{[(0,l.uid)()]:{type:"void","x-component":"FormV2","x-use-component-props":"useCreateFormBlockProps",properties:{grid:a||{type:"void","x-component":"Grid","x-initializer":"form:configureFields",properties:{}},[(0,l.uid)()]:{type:"void","x-initializer":"createForm:configureActions","x-component":"ActionBar","x-component-props":{layout:"one-column"}}}}}}}},56181(e,t,o){o.d(t,{C:()=>i,E:()=>r});var l=o(65623),n=o(28227);let a={title:'{{t("Configure actions")}}',icon:"SettingOutlined",items:[{name:"submit",title:'{{t("Submit")}}',Component:"CreateSubmitActionInitializer",schema:{"x-action-settings":{}}},{name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer",useVisible(){let{type:e}=(0,n.h6)()||{};return"publicForm"!==e}}]},r=new l._({name:"CreateFormActionInitializers",...a}),i=new l._({name:"createForm:configureActions",...a},r)},8918(e,t,o){o.d(t,{N:()=>x});var l=o(56920),n=o(77843),a=o(38951),r=o(69412),i=o(43288),s=o(49621),d=o(99300),u=o(38131),c=o(17664),p=o(24768),m=o(23145),h=o(17961);let x=new a.R({name:"blockSettings:createForm",items:[{name:"title",Component:c.P},{name:"setTheBlockHeight",Component:u._},{name:"fieldLinkageRules",Component:d.f9,useComponentProps(){let{name:e}=(0,i.k7)(),{t}=(0,n.useTranslation)();return{collectionName:e,title:t("Field Linkage rules")}}},{name:"blockLinkageRules",Component:d.f9,useComponentProps(){let{name:e}=(0,i.k7)(),{t}=(0,n.useTranslation)();return{collectionName:e,title:t("Block Linkage rules"),category:h.Od.block}}},{name:"dataTemplates",Component:d.iJ,useVisible(){var e;let{action:t}=(0,r.Es)(),o=(0,l.useFieldSchema)();return!t&&(null==o||null==(e=o["x-acl-action"])?void 0:e.includes("create"))},useComponentProps(){let{name:e}=(0,i.k7)();return{collectionName:e}}},{name:"divider",type:"divider"},{name:"formItemTemplate",Component:d.Sm,useComponentProps(){var e,t;let{componentNamePrefix:o}=(0,p.kU)(),{name:n}=(0,s.Ge)(),a=(0,l.useFieldSchema)();return{componentName:`${o}FormItem`,collectionName:n,resourceName:(null==a||null==(e=a["x-decorator-props"])?void 0:e.resource)||(null==a||null==(t=a["x-decorator-props"])?void 0:t.association)}}},{name:"setBlockLayout",Component:m.q},{name:"divider2",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]})},64622(e,t,o){o.d(t,{R:()=>x});var l=o(56920),n=o(77843),a=o(38951),r=o(69412),i=o(43288),s=o(49621),d=o(99300),u=o(38131),c=o(17664),p=o(24768),m=o(23145),h=o(17961);let x=new a.R({name:"blockSettings:editForm",items:[{name:"title",Component:c.P},{name:"setTheBlockHeight",Component:u._},{name:"fieldLinkageRules",Component:d.f9,useComponentProps(){let{name:e}=(0,i.k7)(),{t}=(0,n.useTranslation)();return{collectionName:e,title:t("Field Linkage rules")}}},{name:"blockLinkageRules",Component:d.f9,useComponentProps(){let{name:e}=(0,i.k7)(),{t}=(0,n.useTranslation)();return{collectionName:e,title:t("Block Linkage rules"),category:h.Od.block}}},{name:"dataTemplates",Component:d.iJ,useVisible(){let{action:e}=(0,r.Es)();return!e},useComponentProps(){let{name:e}=(0,i.k7)();return{collectionName:e}}},{name:"divider",type:"divider"},{name:"formItemTemplate",Component:d.Sm,useComponentProps(){var e,t;let{componentNamePrefix:o}=(0,p.kU)(),{name:n}=(0,s.Ge)(),a=(0,l.useFieldSchema)();return{componentName:`${o}FormItem`,collectionName:n,resourceName:(null==a||null==(e=a["x-decorator-props"])?void 0:e.resource)||(null==a||null==(t=a["x-decorator-props"])?void 0:t.association)}}},{name:"setBlockLayout",Component:m.q},{name:"divider2",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]})},25564(e,t,o){o.d(t,{l:()=>C});var l=o(71178),n=o(56220),a=o(56920),r=o(77583);o(51649);var i=o(77843),s=o(17157),d=o(38951),u=o(69412),c=o(43288),p=o(57359),m=o(28227),h=o(92719),x=o(31574),v=o(61013),_=o(95951),f=o(99300),g=o(83508),b=o(4627),y=o(17961),S=o(33204),k=o(90732);let C=new d.R({name:"fieldSettings:FormItem",items:[{name:"decoratorOptions",type:"itemGroup",hideIfNoChildren:!0,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{title:e("Generic properties")}},useChildren:()=>[{name:"editFieldTitle",type:"modal",useComponentProps(){var e;let{t}=(0,i.useTranslation)(),{dn:o}=(0,_.er)(),l=(0,a.useField)(),n=(0,a.useFieldSchema)(),r=(0,v.l)(),{getCollectionJoinField:s}=(0,c.nj)(),{getField:d}=(0,c.k7)(),u=d(n.name)||s(n["x-collection-field"]);return{title:t("Edit field title"),schema:{type:"object",title:t("Edit field title"),properties:{title:{title:t("Field title"),default:null==l?void 0:l.title,description:`${t("Original field title: ")}${null==u||null==(e=u.uiSchema)?void 0:e.title}`,"x-decorator":"FormItem","x-component":"Input","x-component-props":{}}}},onSubmit(e){var t;let{title:a}=e,i=""===a.trim()?null==u||null==(t=u.uiSchema)?void 0:t.title:a;l.title=r(i),n.title=i,o.emit("patch",{schema:{"x-uid":n["x-uid"],title:n.title}}),o.refresh()}}}},{name:"displayTitle",type:"switch",useComponentProps(){let{t:e}=(0,i.useTranslation)(),{dn:t}=(0,_.er)(),o=(0,a.useField)(),l=(0,a.useFieldSchema)();return{title:e("Display title"),checked:o.decoratorProps.showTitle??!0,onChange(e){l["x-decorator-props"]=l["x-decorator-props"]||{},l["x-decorator-props"].showTitle=e,o.decoratorProps.showTitle=e,t.emit("patch",{schema:{"x-uid":l["x-uid"],"x-decorator-props":{...l["x-decorator-props"],showTitle:e}}}),t.refresh()}}}},{name:"editDescription",type:"modal",useComponentProps(){let{t:e}=(0,i.useTranslation)(),{dn:t}=(0,_.er)(),o=(0,a.useField)(),l=(0,a.useFieldSchema)();return{title:e("Edit description"),schema:{type:"object",title:e("Edit description"),properties:{description:{default:null==o?void 0:o.description,"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{}}}},onSubmit(e){let{description:n}=e;o.description=n,l.description=n,t.emit("patch",{schema:{"x-uid":l["x-uid"],description:l.description}})}}}},{name:"editTooltip",type:"modal",useComponentProps(){var e;let{t}=(0,i.useTranslation)(),{dn:o}=(0,_.er)(),l=(0,a.useField)(),n=(0,a.useFieldSchema)();return{title:t("Edit tooltip"),schema:{type:"object",title:t("Edit tooltip"),properties:{tooltip:{default:null==n||null==(e=n["x-decorator-props"])?void 0:e.tooltip,"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{}}}},onSubmit(e){let{tooltip:t}=e;l.decoratorProps.tooltip=t,n["x-decorator-props"]=n["x-decorator-props"]||{},n["x-decorator-props"].tooltip=t,o.emit("patch",{schema:{"x-uid":n["x-uid"],"x-decorator-props":n["x-decorator-props"]}}),o.refresh()}}}},{name:"required",type:"switch",useVisible(){let e=(0,a.useField)(),t=(0,a.useFieldSchema)(),{required:o=!0}=(0,s.C5)();return!e.readPretty&&"FormField"!==t["x-component"]&&o},useComponentProps(){let{t:e}=(0,i.useTranslation)(),t=(0,a.useField)(),o=(0,a.useFieldSchema)(),{dn:l,refresh:n}=(0,_.er)();return{title:e("Required"),checked:t.required,onChange(e){let a={"x-uid":o["x-uid"]};t.required=e,o.required=e,a.required=e,l.emit("patch",{schema:a}),n()}}}},{name:"setDefaultValue",useVisible(){let{isAllowToSetDefaultValue:e}=(0,g.eT)();return e()},Component:S.J},{name:"pattern",type:"select",useVisible(){let{form:e}=(0,u.Es)(),t=(0,a.useFieldSchema)();return e&&!(null==e?void 0:e.readPretty)&&!(0,f.h2)(t)},useComponentProps(){let{t:e}=(0,i.useTranslation)(),t=(0,a.useField)(),o=(0,a.useFieldSchema)(),{dn:l}=(0,_.er)(),n="editable";return!0===o["x-disabled"]&&(n="readonly"),!0===o["x-read-pretty"]&&(n="read-pretty"),{title:e("Pattern"),options:[{label:e("Editable"),value:"editable"},{label:e("Readonly"),value:"readonly"},{label:e("Easy-reading"),value:"read-pretty"}],value:n,onChange(e){let n={"x-uid":o["x-uid"]};switch(e){case"readonly":o["x-read-pretty"]=!1,o["x-disabled"]=!0,n["x-read-pretty"]=!1,n["x-disabled"]=!0,t.readPretty=!1,t.disabled=!0,r.default.set(t,"initStateOfLinkageRules.pattern",(0,b.qE)(!0,y.X2.ReadOnly));break;case"read-pretty":o["x-read-pretty"]=!0,o["x-disabled"]=!1,n["x-read-pretty"]=!0,n["x-disabled"]=!1,t.readPretty=!0,r.default.set(t,"initStateOfLinkageRules.pattern",(0,b.qE)(!0,y.X2.ReadPretty));break;default:o["x-read-pretty"]=!1,o["x-disabled"]=!1,n["x-read-pretty"]=!1,n["x-disabled"]=!1,t.readPretty=!1,t.disabled=!1,r.default.set(t,"initStateOfLinkageRules.pattern",(0,b.qE)(!0,y.X2.Editable))}l.emit("patch",{schema:n}),l.refresh()}}}},{name:"setValidationRules",type:"modal",useComponentProps(){let{t:e}=(0,i.useTranslation)(),t=(0,a.useField)(),o=(0,a.useFieldSchema)(),{dn:l,refresh:s}=(0,_.er)(),d=(0,x.do)(),{getCollectionJoinField:u}=(0,c.nj)(),{getField:p}=(0,c.k7)(),m=p(o.name)||u(o["x-collection-field"]),h=e=>null!=e&&!Number.isNaN(e);return{title:e("Set validation rules"),components:{ArrayCollapse:k.z,FormLayout:n.FormLayout},schema:{type:"object",title:e("Set validation rules"),properties:{rules:{type:"array",default:null==o?void 0:o["x-validator"],"x-component":"ArrayCollapse","x-decorator":"FormItem","x-component-props":{accordion:!0},maxItems:3,items:{type:"object","x-component":"ArrayCollapse.CollapsePanel","x-component-props":{header:e("Validation rule")},properties:{index:{type:"void","x-component":"ArrayCollapse.Index","x-component-props":{style:{lineHeight:"28px"}}},layout:{type:"void","x-component":"FormLayout","x-component-props":{labelStyle:{marginTop:"6px"},labelCol:8,wrapperCol:16},properties:{...d,message:{type:"string",title:'{{ t("Error message") }}',"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{autoSize:{minRows:2,maxRows:2}}}}},remove:{type:"void","x-component":"ArrayCollapse.Remove"},moveUp:{type:"void","x-component":"ArrayCollapse.MoveUp"},moveDown:{type:"void","x-component":"ArrayCollapse.MoveDown"}}},properties:{add:{type:"void",title:'{{ t("Add validation rule") }}',"x-component":"ArrayCollapse.Addition","x-reactions":{dependencies:["rules"],fulfill:{state:{disabled:"{{$deps[0].length >= 3}}"}}}}}}}},onSubmit(e){var n;let a=[];for(let t of e.rules)a.push(r.default.pickBy(t,h));let i={"x-uid":o["x-uid"]};if(["percent"].includes(null==m?void 0:m.interface))for(let e of a)(e.maxValue||e.minValue)&&(e.percentMode=!0),e.percentFormat&&(e.percentFormats=!0);t.validator=r.default.concat([],(null==m||null==(n=m.uiSchema)?void 0:n["x-validator"])||[],a),t.required=o.required,o["x-validator"]=a,i["x-validator"]=a,l.emit("patch",{schema:i}),s()}}},useVisible(){let{form:e}=(0,u.Es)(),t=(0,x.q7)(),o=(0,x.do)();return e&&!t&&o}},{name:"style",Component:e=>{let t={...e,category:"style"};return(0,l.jsx)(f.f9,{...t})},useVisible:()=>(0,x.U5)(),useComponentProps(){let{name:e}=(0,m.Ge)(),{linkageRulesProps:t}=(0,s.C5)();return{...t,collectionName:e}}},h.I]},{name:"componentOptions",type:"itemGroup",hideIfNoChildren:!0,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{title:e("Specific properties")}},useChildren(){let e=(0,s.nm)(),t=(0,p.q)(),o=e.schemaSettingsManager.get(`fieldSettings:component:${t}`);return(null==o?void 0:o.items)||[]}},{name:"divider",type:"divider"},{name:"delete",type:"remove",sort:100,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{removeParentsIfNoChildren:!0,confirm:{title:e("Delete field")},breakRemoveOn:{"x-component":"Grid"}}}}]})},75909(e,t,o){o.d(t,{e:()=>l});let l=new(o(51005)).I({name:"FormActionInitializers",title:'{{t("Configure actions")}}',icon:"SettingOutlined",items:[{name:"submit",title:'{{t("Submit")}}',Component:"CreateSubmitActionInitializer",schema:{"x-action-settings":{}}},{name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer"}]})},57482(e,t,o){o.d(t,{L:()=>i,r:()=>s});var l=o(65623),n=o(44517),a=o(81936);let r={wrap:a.xH,icon:"SettingOutlined",title:'{{t("Configure fields")}}',items:[{type:"itemGroup",name:"displayFields",title:'{{t("Display fields")}}',useChildren:a.g_},{name:"parentCollectionFields",Component:n.y8},{name:"associationFields",Component:n.Ag},{name:"divider",type:"divider"},{name:"addText",title:'{{t("Add Markdown")}}',Component:"MarkdownFormItemInitializer"},{name:"addDivider",title:'{{t("Add group")}}',Component:"DividerFormItemInitializer"}]},i=new l._({name:"FormItemInitializers",...r}),s=new l._({name:"form:configureFields",...r},i)},1451(e,t,o){o.d(t,{Z:()=>s});var l=o(35432),n=o(86577),a=o(69412),r=o(31475),i=o(92619);function s(){let e=(0,l.zv)(),{form:t}=(0,a.Es)(),o=(0,r.TP)(),{isInSubTable:s}=(0,i._)(),{valueMap:d}=(0,n.k)({category:"style",formValues:(null==o?void 0:o.formValue)||(null==t?void 0:t.values)||e,form:t});return{wrapperStyle:s?Object.fromEntries(Object.entries(d||{}).filter(e=>{let[t]=e;return"backgroundColor"!==t})):d}}},12416(e,t,o){o.d(t,{BM:()=>a.B,CQ:()=>i.C,E9:()=>i.E,Lm:()=>p.L,NO:()=>s.N,RG:()=>d.R,T:()=>m.T,U9:()=>r.B,Zg:()=>m.Z,eI:()=>c.e,fi:()=>a.f,iz:()=>n.i,ln:()=>u.l,rj:()=>p.r,tH:()=>l.t,yU:()=>l.y});var l=o(54513),n=o(92579),a=o(83232),r=o(59682),i=o(56181),s=o(8918),d=o(64622),u=o(25564),c=o(75909),p=o(57482),m=o(72606)},72606(e,t,o){o.d(t,{T:()=>a,Z:()=>r});var l=o(65623);let n={title:'{{t("Configure actions")}}',icon:"SettingOutlined",items:[{name:"submit",title:'{{t("Submit")}}',Component:"UpdateSubmitActionInitializer",schema:{"x-action-settings":{}}},{name:"popup",title:'{{t("Popup")}}',Component:"PopupActionInitializer",useComponentProps:()=>({"x-component":"Action"})},{type:"item",name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer"}]},a=new l._({name:"UpdateFormActionInitializers",...n}),r=new l._({name:"editForm:configureActions",...n},a)},78468(e,t,o){o.d(t,{y:()=>p});var l=o(71178),n=o(56920),a=o(77583),r=o(51649),i=o(77843),s=o(88337),d=o(11592),u=o(16319),c=o(99300);function p(){let{t:e}=(0,i.useTranslation)(),t=(0,n.useFieldSchema)(),o=(0,n.useField)(),{dn:p}=(0,u.er)(),m=o.decoratorProps.columnCount||d.$c,h=(0,r.useMemo)(()=>({"x-component":"Slider","x-decorator":"FormItem","x-component-props":{min:1,max:24,marks:s.I,tooltip:{formatter:t=>`${t}${e("Column")}`},step:null}}),[e]),x=(0,r.useMemo)(()=>d.pc.reduce((t,o)=>(t[o]={...h,title:e(d.H$[o]),description:`${e("Screen size")} ${d.zg[o]} ${e("pixels")}`},t),{}),[h,e]);return(0,l.jsx)(c.fY,{title:e("Set the count of columns displayed in a row"),initialValues:m,schema:{type:"object",title:e("Set the count of columns displayed in a row"),properties:x},onSubmit:e=>{a.default.set(t,"x-decorator-props.columnCount",e),o.decoratorProps.columnCount=e,p.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":t["x-decorator-props"]}})}})}},68106(e,t,o){o.d(t,{Z:()=>a});var l=o(51649),n=o(68557);function a(e){let{params:t}=e,{filter:o,parseVariableLoading:a}=(0,n.j)({filterOption:null==t?void 0:t.filter});return{params:(0,l.useMemo)(()=>({...t,filter:o}),[o,t]),parseVariableLoading:a}}},58206(e,t,o){o.d(t,{w:()=>s});var l=o(71178),n=o(82113);o(51649);var a=o(43288),r=o(27404),i=o(17157);let s=()=>{let{onCreateBlockSchema:e,componentType:t,createBlockSchema:o,...s}=(0,i.eL)(),{insert:d}=(0,i.fx)(),u=(0,a.k7)();return(0,l.jsx)(i.rR,{icon:(0,l.jsx)(n.FormOutlined,{}),...s,onClick:async()=>{d((e=>{let{collectionName:t,dataSource:o,rowKey:l}=e;if(!t||!o||!l)throw Error("collectionName, dataSource, rowKey is required");return{type:"void","x-acl-action":`${t}:list`,"x-decorator":"TableSelectorProvider","x-use-decorator-props":"useTableSelectorDecoratorProps","x-decorator-props":{collection:t,dataSource:o,action:"list",params:{pageSize:20},rowKey:l},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:tableSelector","x-component":"CardItem",properties:{[(0,r.uid)()]:{type:"void","x-initializer":"table:configureActions","x-component":"ActionBar","x-component-props":{style:{marginBottom:"var(--nb-spacing)"}}},value:{type:"array","x-initializer":"table:configureColumns","x-component":"TableV2.Selector","x-use-component-props":"useTableSelectorProps","x-component-props":{rowSelection:{type:"checkbox"}}}}}})({rowKey:u.filterTargetKey,collectionName:u.name,dataSource:u.dataSource}))}})}},92452(e,t,o){o.d(t,{A:()=>n.A,w:()=>l.w});var l=o(58206),n=o(81333)},81333(e,t,o){o.d(t,{A:()=>x});var l=o(56220),n=o(56920),a=o(77583),r=o(51649),i=o(77843),s=o(38951),d=o(18111),u=o(69412),c=o(43288),p=o(82924),m=o(79056),h=o(43873);let x=new s.R({name:"blockSettings:tableSelector",items:[{name:"SetTheDataScope",Component:m.Z,useComponentProps:()=>{var e,t;let{name:o}=(0,c.k7)(),l=(0,n.useField)(),i=(0,n.useFieldSchema)(),{form:s}=(0,u.Es)(),{service:m,extraFilter:x}=(0,d.K8)(),{dn:v}=(0,p.erX)(),_=(0,h.fY)(),f=(0,r.useCallback)(e=>{let{filter:t}=e;t=(0,p.pA3)(t);let o=l.decoratorProps.params||{};o.filter=t,l.decoratorProps.params=o,i["x-decorator-props"].params=o;let n=(0,a.cloneDeep)(t);x&&(n=n?{$and:[x,n]}:x),v.emit("patch",{schema:{"x-uid":i["x-uid"],"x-decorator-props":i["x-decorator-props"]}})},[l.decoratorProps,i,x,_,v,m]);return{collectionName:o,defaultFilter:(null==i||null==(t=i["x-decorator-props"])||null==(e=t.params)?void 0:e.filter)||{},form:s,onSubmit:f}}},{name:"treeTable",type:"switch",useComponentProps:()=>{let e=(0,n.useField)(),t=(0,n.useFieldSchema)(),{service:o}=(0,d.K8)(),{t:l}=(0,i.useTranslation)(),{dn:a}=(0,p.erX)();return{title:l("Tree table"),defaultChecked:!0,checked:e.decoratorProps.treeTable,onChange:l=>{var n;e.form.clearFormGraph(`${e.address}.*`),e.decoratorProps.treeTable=l,t["x-decorator-props"].treeTable=l;let r={...null==(n=o.params)?void 0:n[0],tree:!!l||null};a.emit("patch",{schema:t}),a.refresh(),o.run(r)}}},useVisible:()=>{let{getCollectionJoinField:e}=(0,c.nj)(),t=(0,n.useFieldSchema)(),o=(0,c.k7)(),l=(0,d.H2)(t,"CollectionField"),a=e(null==l?void 0:l["x-collection-field"]);return(null==o?void 0:o.tree)&&(null==a?void 0:a.target)===(null==a?void 0:a.collectionName)}},{name:"SetDefaultSortingRules",type:"modal",useComponentProps(){var e,t;let{name:o}=(0,c.k7)(),a=(0,n.useField)(),r=(0,n.useFieldSchema)(),s=(0,c.lY)(o),{service:u}=(0,d.K8)(),{t:m}=(0,i.useTranslation)(),{dn:h}=(0,p.erX)(),x=(null==r||null==(t=r["x-decorator-props"])||null==(e=t.params)?void 0:e.sort)||[],v=null==x?void 0:x.map(e=>e.startsWith("-")?{field:e.substring(1),direction:"desc"}:{field:e,direction:"asc"});return{title:m("Set default sorting rules"),components:{ArrayItems:l.ArrayItems},schema:{type:"object",title:m("Set default sorting rules"),properties:{sort:{type:"array",default:v,"x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:s,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260}}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:m("ASC"),value:"asc"},{label:m("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:m("Add sort field"),"x-component":"ArrayItems.Addition"}}}}},onSubmit:e=>{var t;let{sort:o}=e,l=o.map(e=>"desc"===e.direction?`-${e.field}`:e.field),n=a.decoratorProps.params||{};n.sort=l,a.decoratorProps.params=n,r["x-decorator-props"].params=n,h.emit("patch",{schema:{"x-uid":r["x-uid"],"x-decorator-props":r["x-decorator-props"]}}),u.run({...null==(t=u.params)?void 0:t[0],sort:l})}}},useVisible(){let{dragSort:e}=(0,n.useField)().decoratorProps;return!e}},h.qm,{name:"RecordsPerPage",type:"select",useComponentProps(){var e,t;let o=(0,n.useField)(),l=(0,n.useFieldSchema)(),{service:a}=(0,d.K8)(),{t:r}=(0,i.useTranslation)(),{dn:s}=(0,p.erX)();return{title:r("Records per page"),value:(null==(t=o.decoratorProps)||null==(e=t.params)?void 0:e.pageSize)||20,options:[{label:"5",value:5},{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100},{label:"200",value:200}],onChange:e=>{var t;let n=o.decoratorProps.params||{};n.pageSize=e,o.decoratorProps.params=n,l["x-decorator-props"].params=n,a.run({...null==(t=a.params)?void 0:t[0],pageSize:e,page:1}),s.emit("patch",{schema:{"x-uid":l["x-uid"],"x-decorator-props":l["x-decorator-props"]}})}}}},{name:"divider",type:"divider"},{name:"delete",type:"remove",useComponentProps:()=>({removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})}]})},94109(e,t,o){o.d(t,{$e:()=>g,Wd:()=>y,Wf:()=>S,cM:()=>f});var l=o(71178),n=o(82113),a=o(56920),r=o(77583),i=o(51649),s=o(77843),d=o(16211),u=o(65623),c=o(12765),p=o(82451),m=o(25180),h=o(28227),x=o(82924),v=o(77235),_=o(58555);let f=()=>{var e;let{t}=(0,s.useTranslation)(),{dn:o}=(0,x.erX)(),n=(0,a.useFieldSchema)();return(0,l.jsx)(c.z,{title:t("Column width"),component:i.default.forwardRef((e,o)=>{let{children:n,onClick:a,...r}=e;return(0,l.jsx)(p.r,{ref:o,onClick:e=>{let{event:t}=e;a(t)},...r,title:t("Column width")})}),schema:{type:"object",title:t("Column width"),properties:{width:{"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{},default:(null==n||null==(e=n["x-component-props"])?void 0:e.width)||100}}},onSubmit:e=>{let{width:t}=e,l=n["x-component-props"]||{};l.width=t;let a={"x-uid":n["x-uid"]};a["x-component-props"]=l,n["x-component-props"]=l,o.emit("patch",{schema:a}),o.refresh()}})},g=()=>{var e;let t=(0,a.useField)(),o=(0,a.useFieldSchema)(),{t:n}=(0,s.useTranslation)(),{dn:r}=(0,x.erX)(),i=[{label:n("Not fixed"),value:"none"},{label:n("Left fixed"),value:"left"},{label:n("Right fixed"),value:"right"}];return(0,l.jsx)(p.r,{children:(0,l.jsx)(m.$,{title:n("Fixed"),options:i,defaultValue:(null==(e=t.componentProps)?void 0:e.fixed)||"none",onChange:e=>{let l={"x-uid":o["x-uid"]};o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].fixed=e,l["x-component-props"]=o["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.fixed=e,r.emit("patch",{schema:l}),r.refresh()}},"fixed")})},b={insertPosition:"beforeEnd",useInsert:function(){let{refresh:e}=(0,x.erX)(),t=(0,a.useFieldSchema)(),o=(0,d.VB)(),{t:l}=(0,s.useTranslation)();return function(n){let a=t.reduceProperties((e,t)=>"Space"===t["x-component"]?t:e,null);if(!a)return;r.default.set(n,"x-designer-props.linkageAction",!0);let i=(0,x.pxY)({t:l,api:o,refresh:e,current:a});i.loadAPIClientEvents(),i.insertBeforeEnd(n)}},Component:e=>{let{getAriaLabel:t}=(0,v.$)();return(0,l.jsx)(n.PlusOutlined,{...e,role:"button","aria-label":t("schema-initializer"),style:{cursor:"pointer"}})},items:[{type:"item",title:'{{t("View")}}',name:"view",Component:"ViewActionInitializer",schema:{"x-component":"Action.Link","x-action":"view","x-decorator":"ACLActionProvider"},useVisible:()=>(0,_.$)("get")},{type:"item",name:"edit",title:'{{t("Edit")}}',Component:"UpdateActionInitializer",schema:{"x-component":"Action.Link","x-action":"update","x-decorator":"ACLActionProvider"},useVisible:()=>(0,_.$)("update")},{type:"item",title:'{{t("Delete")}}',name:"delete",Component:"DestroyActionInitializer",schema:{"x-component":"Action.Link","x-action":"destroy","x-decorator":"ACLActionProvider"},useVisible:()=>(0,_.$)("destroy")},{type:"item",title:'{{t("Disassociate")}}',name:"disassociate",Component:"DisassociateActionInitializer",schema:{"x-component":"Action.Link","x-action":"disassociate","x-acl-action":"update","x-decorator":"ACLActionProvider"},useVisible(){var e,t;let o=(0,h.h6)(),l=(0,h.Ge)()||{},{unavailableActions:n,availableActions:a}=(null==l?void 0:l.options)||{};return a?!!(null==o?void 0:o.association)&&(null==(e=a.includes)?void 0:e.call(a,"update")):!n||!!(null==o?void 0:o.association)&&!(null==n||null==(t=n.includes)?void 0:t.call(n,"update"))}},{type:"item",title:'{{t("Add child")}}',name:"addChildren",Component:"CreateChildInitializer",schema:{"x-component":"Action.Link","x-action":"create","x-decorator":"ACLActionProvider"},useVisible(){var e;let t=(0,a.useFieldSchema)(),o=(0,h.Ge)(),{treeTable:l}=(null==t||null==(e=t.parent)?void 0:e.parent["x-decorator-props"])||{};return o.tree&&l}},{type:"item",title:'{{t("Popup")}}',name:"popup",Component:"PopupActionInitializer"},{type:"item",title:'{{t("Update record")}}',name:"updateRecord",Component:"UpdateRecordActionInitializer",useVisible:()=>(0,_.$)("update")},{name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer",schema:{"x-action":"customize:table:request"}},{name:"link",title:'{{t("Link")}}',Component:"LinkActionInitializer",useComponentProps:()=>({"x-component":"Action.Link"})}]},y=new u._({name:"TableActionColumnInitializers",...b}),S=new u._({name:"table:configureItemActions",...b},y)},42983(e,t,o){o.d(t,{W:()=>s,k:()=>d});var l=o(56920),n=o(65623),a=o(28227),r=o(58555);let i={title:"{{t('Configure actions')}}",icon:"SettingOutlined",style:{marginLeft:8},items:[{type:"item",name:"filter",title:"{{t('Filter')}}",Component:"FilterActionInitializer",schema:{"x-align":"left"}},{type:"item",title:"{{t('Add new')}}",name:"addNew",Component:"CreateActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0}},useVisible:()=>(0,r.$)("create")},{type:"item",title:'{{t("Associate")}}',name:"associate",Component:"AssociateActionInitializer",useVisible(){var e,t;let o=(0,a.h6)(),l=(0,a.Ge)()||{},{unavailableActions:n,availableActions:r}=(null==l?void 0:l.options)||{};return r?!!(null==o?void 0:o.association)&&(null==(e=r.includes)?void 0:e.call(r,"update")):!n||!!(null==o?void 0:o.association)&&!(null==n||null==(t=n.includes)?void 0:t.call(n,"update"))}},{type:"item",title:"{{t('Popup')}}",name:"popup",Component:"PopupActionInitializer",componentProps:{"x-component":"Action","x-initializer":"page:addBlock"},schema:{"x-align":"right"}},{type:"item",title:"{{t('Delete')}}",name:"delete",Component:"BulkDestroyActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider"},useVisible:()=>(0,r.$)("destroyMany")},{type:"item",title:"{{t('Refresh')}}",name:"refresh",Component:"RefreshActionInitializer",schema:{"x-align":"right"}},{type:"item",title:"{{t('Column Settings')}}",name:"editTable",Component:"EditTableActionInitializer",schema:{"x-align":"right"}},{type:"item",title:"{{t('Link')}}",name:"link",Component:"LinkActionInitializer",schema:{"x-align":"right"},useComponentProps:()=>({"x-component":"Action"})},{name:"toggle",title:"{{t('Expand/Collapse')}}",Component:"ExpandableActionInitializer",schema:{"x-align":"right"},useVisible(){var e;let t=(0,l.useFieldSchema)(),o=(0,a.Ge)(),{treeTable:n}=(null==t||null==(e=t.parent)?void 0:e["x-decorator-props"])||{};return o.tree&&n}},{name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer",schema:{"x-action":"customize:table:request:global"}}]},s=new n._({name:"TableActionInitializers",...i}),d=new n._({name:"table:configureActions",...i},s)},72235(e,t,o){o.d(t,{H:()=>d,I:()=>s});var l=o(71178),n=o(82113);o(51649);var a=o(65010),r=o(3403),i=o(27304);let s=e=>{let{filterCollections:t,onlyCurrentDataSource:o,hideSearch:i,createBlockSchema:s,templateWrap:u,showAssociationFields:c}=e,p=(0,a.eL)(),{createTableBlock:m}=d();return(0,l.jsx)(r.kq,{...p,icon:(0,l.jsx)(n.TableOutlined,{}),componentType:"Table",onCreateBlockSchema:async e=>{if(s)return s(e);m(e)},onlyCurrentDataSource:o,hideSearch:i,filter:t,showAssociationFields:c})},d=()=>{let{insert:e}=(0,a.fx)();return{createTableBlock:t=>{let{item:o}=t;e((0,i.D)({collectionName:o.name,dataSource:o.dataSource}))}}}},62431(e,t,o){o.d(t,{C:()=>m,U:()=>p});var l=o(71178),n=o(56920),a=o(51649),r=o(77843),i=o(65623),s=o(94003),d=o(61013),u=o(81936);let c={insertPosition:"beforeEnd",icon:"SettingOutlined",title:'{{t("Configure columns")}}',wrap:(e,t)=>{let{isInSubTable:o}=t;return e["x-action-column"]?e:{type:"void","x-decorator":"TableV2.Column.Decorator","x-toolbar":"TableColumnSchemaToolbar","x-settings":"fieldSettings:TableColumn","x-component":"TableV2.Column",properties:{[e.name]:{...e}}}},items:[{name:"displayFields",type:"itemGroup",title:'{{t("Display fields")}}',useChildren:u.HG},{name:"parentCollectionFields",Component:()=>{let e=(0,u.FJ)(),{t}=(0,r.useTranslation)(),o=(0,d.l)();if(!(null==e?void 0:e.length))return null;let n=[];return e.forEach(e=>{Object.values(e)[0].length&&n.push({type:"itemGroup",divider:!0,title:t("Parent collection fields")+"("+o(`${Object.keys(e)[0]}`)+")",children:Object.values(e)[0]})}),(0,l.jsx)(s.Z,{children:n})}},{name:"associationFields",Component:()=>{let e=(0,u.vP)(),t=(0,n.useFieldSchema)(),{t:o}=(0,r.useTranslation)(),i=(0,a.useMemo)(()=>[{type:"itemGroup",title:o("Display association fields"),children:e}],[e,o]);return(null==e?void 0:e.length)&&"AssociationField.SubTable"!==t["x-component"]?(0,l.jsx)(s.Z,{children:i}):null}},{name:"divider",type:"divider",useVisible:()=>"AssociationField.SubTable"!==(0,n.useFieldSchema)()["x-component"]},{type:"item",name:"add",title:'{{t("Action column")}}',Component:"TableActionColumnInitializer",useVisible:()=>"AssociationField.SubTable"!==(0,n.useFieldSchema)()["x-component"]}]},p=new i._({name:"TableColumnInitializers",...c}),m=new i._({name:"table:configureColumns",...c},p)},69744(e,t,o){o.d(t,{l:()=>s});var l=o(71178),n=o(77583),a=o(51649),r=o(29358),i=o(99300);let s=a.default.memo(e=>(0,l.jsx)(r.mz.Provider,{value:null,children:(0,l.jsx)(i.Bw,{initializer:e.initializer||!1,showBorder:!1,showBackground:!0,...n.default.omit(e,"initializer")})}));s.displayName="TableColumnSchemaToolbar"},65988(e,t,o){o.d(t,{n:()=>i,p:()=>r});var l=o(71178),n=o(51649);let a=(0,n.createContext)(null),r=e=>{let{children:t,parent:o}=e;return(0,l.jsx)(a.Provider,{value:{parent:o},children:t})},i=()=>{let e=n.default.useContext(a);return null==e?void 0:e.parent}},27304(e,t,o){o.d(t,{D:()=>n});var l=o(27404);let n=e=>{let{collectionName:t,dataSource:o,association:n}=e;if(!o)throw Error("dataSource is required");return{type:"void","x-decorator":"TableBlockProvider","x-acl-action":`${n||t}:list`,"x-use-decorator-props":"useTableBlockDecoratorProps","x-decorator-props":{collection:t,association:n,dataSource:o,action:"list",params:{pageSize:20},showIndex:!0,dragSort:!1},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:table","x-component":"CardItem","x-filter-targets":[],properties:{actions:{type:"void","x-initializer":"table:configureActions","x-component":"ActionBar","x-component-props":{style:{marginBottom:"var(--nb-spacing)"}},properties:{}},[(0,l.uid)()]:{type:"array","x-initializer":"table:configureColumns","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"}},properties:{actions:{type:"void",title:'{{ t("Actions") }}',"x-action-column":"actions","x-decorator":"TableV2.Column.ActionBar","x-component":"TableV2.Column","x-toolbar":"TableColumnSchemaToolbar","x-initializer":"table:configureItemActions","x-settings":"fieldSettings:TableColumn","x-toolbar-props":{initializer:"table:configureItemActions"},properties:{[(0,l.uid)()]:{type:"void","x-decorator":"DndContext","x-component":"Space","x-component-props":{split:"|"}}}}}}}}}},67722(e,t,o){o.d(t,{A:()=>s,L:()=>d});var l=o(56920),n=o(51649),a=o(68557),r=o(14696),i=o(28227);let s=e=>{var t;let{params:o,parseVariableLoading:l}=d(e),n=(0,r.M)(e.association),a=null==(t=(0,i.m6)().getDataSource(e.dataSource))?void 0:t.collectionManager.getCollection(e.collection);return{params:o,parentRecord:n,parseVariableLoading:l,rowKey:(null==a?void 0:a.filterTargetKey)||"id"}};function d(e){var t;let o=(0,l.useFieldSchema)(),{filter:r,parseVariableLoading:i}=(0,a.j)({filterOption:null==(t=e.params)?void 0:t.filter});return{params:(0,n.useMemo)(()=>{let t=e.params||{},{dragSortBy:l}=(null==o?void 0:o["x-decorator-props"])||{};return e.dragSort&&l&&(t.sort=l),{...t,filter:r}},[o,r,e.dragSort,e.params]),parseVariableLoading:i}}},46539(e,t,o){o.d(t,{Z:()=>h});var l=o(56920),n=o(77583),a=o(51649),r=o(35123),i=o(73761),s=o(14187),d=o(46776),u=o(11482),c=o(58980),p=o(82924),m=o(70808);let h=()=>{var e,t,o,h,x,v;let _=(0,l.useField)(),f=(0,l.useFieldSchema)(),g=(0,d.jz)(),b=(0,s._J)(),{getDataBlocks:y}=(0,u.xZ)(),S=(0,r.V)(),k=(0,a.useRef)(null);k.current={service:b,resource:g};let C=(null==b||null==(e=b.data)?void 0:e.meta)||{},M=(0,m.BY)(),w=(0,a.useCallback)(()=>{null==M||M.current},[M]),F=(0,a.useMemo)(()=>({pageSize:null==C?void 0:C.pageSize,total:null==C?void 0:C.count,current:null==C?void 0:C.page,onChange:w}),[null==C?void 0:C.count,null==C?void 0:C.page,null==C?void 0:C.pageSize,w]),P=(null==b||null==(t=b.data)?void 0:t.data)||[];return(0,a.useEffect)(()=>{if(!(null==b?void 0:b.loading)){var e,t;let o=null==(t=S.field)||null==(e=t.data)?void 0:e.selectedRowKeys;_.data=_.data||{},(0,n.isEqual)(_.data.selectedRowKeys,o)||(_.data.selectedRowKeys=o)}},[_,null==b?void 0:b.data,null==b?void 0:b.loading,null==(h=S.field)||null==(o=h.data)?void 0:o.selectedRowKeys]),{optimizeTextCellRender:!0,value:P,childrenColumnName:S.childrenColumnName,loading:null==b?void 0:b.loading,showIndex:S.showIndex,dragSort:S.dragSort&&S.dragSortBy,rowKey:S.rowKey||(null==f||null==(x=f["x-component-props"])?void 0:x.rowKey)||"id",pagination:(null==f||null==(v=f["x-component-props"])?void 0:v.pagination)!==!1&&F,onRowSelectionChange:(0,a.useCallback)((e,t)=>{if(S){var o,l,n;S.field.data=(null==(o=S.field)?void 0:o.data)||{},S.field.data.selectedRowKeys=e,S.field.data.selectedRowData=t,null==(n=S.field)||null==(l=n.onRowSelect)||l.call(n,e)}},[]),onRowDragEnd:(0,a.useCallback)(async e=>{let{from:t,to:o}=e;await k.current.resource.move({sourceId:t[S.rowKey||"id"],targetId:o[S.rowKey||"id"],sortField:S.dragSort&&S.dragSortBy}),k.current.service.refresh()},[S.rowKey,S.dragSort,S.dragSortBy]),onChange:(0,a.useCallback)((e,t,o)=>{var l,n,a,r,i,s,d,u,c,p;let{current:m,pageSize:h}=e,x=null==(a=f.parent)||null==(n=a["x-decorator-props"])||null==(l=n.params)?void 0:l.sort,v=o.order?"ascend"===o.order?[o.field]:[`-${o.field}`]:x||S.dragSortBy,_=h||(null==(s=f.parent)||null==(i=s["x-decorator-props"])||null==(r=i.params)?void 0:r.pageSize),g={...null==(c=k.current)||null==(u=c.service)||null==(d=u.params)?void 0:d[0],page:m||1,pageSize:_};v&&(g.sort=v),null==(p=k.current)||p.service.run(g)},[f.parent]),onClickRow:(0,a.useCallback)((e,t,o)=>{let{targets:l,uid:n}=(0,i.findFilterTargets)(f),a=y();if(!l||!l.some(e=>a.some(t=>t.uid===e.uid)))return void t(e=>e.length?[]:e);let r=a.find(e=>e.uid===f.parent["x-uid"]);a.forEach(t=>{var a,i,s,d,u,m,h,x,v;let _,f=l.find(e=>e.uid===t.uid);if(!f)return;let g=[e[u=r,m=f.field,(null==(_=null==u||null==(h=u.associatedFields)?void 0:h.find(e=>e.foreignKey===m))?void 0:_.sourceKey)||(null==m||null==(v=m.split)||null==(x=v.call(m,"."))?void 0:x[1])||S.rowKey||"id"]],b=(null==(a=t.service.params)?void 0:a[0])||{},y=(null==(s=t.service.params)||null==(i=s[1])?void 0:i.filters)||{};if(o.includes(e[S.rowKey])){if(null==(d=t.clearSelection)||d.call(t),"manual"===t.dataLoadingMode)return t.clearData();delete y[n]}else y[n]={$and:[{[f.field||S.rowKey]:{[f.field?"$in":"$eq"]:g}}]};let k=(0,c.Dj)([...Object.values(y).map(e=>(0,p.pA3)(e)),t.defaultFilter]);return t.doFilter({...b,page:1,filter:k},{filters:y})}),t(t=>(null==t?void 0:t.includes(e[S.rowKey]))?[]:[e[S.rowKey]])},[S.rowKey,f,y]),onExpand:(0,a.useCallback)((e,t)=>{var o,l;null==(o=(l=S.field).onExpandClick)||o.call(l,e,t)},[])}}},77526(e,t,o){o.d(t,{$e:()=>l.$e,Av:()=>c.A,Cg:()=>d.C,DJ:()=>u.D,Fe:()=>i.F,Hb:()=>a.H,IB:()=>a.I,Lu:()=>c.L,UH:()=>d.U,Wc:()=>n.W,Wd:()=>l.Wd,Wf:()=>l.Wf,ZI:()=>p.Z,_s:()=>s._,cM:()=>l.cM,kL:()=>n.k,lI:()=>r.l});var l=o(94109),n=o(42983),a=o(72235),r=o(69744),i=o(49142),s=o(70391),d=o(62431),u=o(27304),c=o(67722),p=o(46539)},49142(e,t,o){o.d(t,{F:()=>F});var l=o(56920),n=o(77843),a=o(16211),r=o(38951),i=o(43545),s=o(18111),d=o(43288),u=o(58980),c=o(95951),p=o(38131),m=o(17664),h=o(79029),x=o(71178);o(51649);var v=o(70892),_=o(61500),f=o(51281),g=o(61013),b=o(77490),y=o(25952),S=o(20349),k=o(71162),C=o(24768),M=o(43873),w=o(17961);let F=new r.R({name:"blockSettings:table",items:[{name:"editBlockTitle",Component:m.P},{name:"setTheBlockHeight",Component:p._},{name:"linkageRules",Component:b.f9,useComponentProps(){let{name:e}=(0,d.k7)(),{t}=(0,n.useTranslation)();return{collectionName:e,title:t("Block Linkage rules"),category:w.Od.block}}},{name:"treeTable",type:"switch",useComponentProps:()=>{var e;let{getCollectionField:t,getCollection:o}=(0,d.nj)(),a=(0,l.useField)(),r=(0,l.useFieldSchema)(),{service:i}=(0,s.El)(),{t:u}=(0,n.useTranslation)(),{dn:p}=(0,c.er)(),m=(0,d.k7)(),{resource:h}=a.decoratorProps,x=h&&t(h),v=(null==h?void 0:h.includes("."))?null==(e=o(null==x?void 0:x.target))?void 0:e.tree:!!(null==m?void 0:m.tree);return{title:u("Tree table"),defaultChecked:!0,checked:!!v&&a.decoratorProps.treeTable,onChange:e=>{var t;a.decoratorProps.treeTable=e,r["x-decorator-props"].treeTable=e,!1===e&&(r["x-decorator-props"].expandFlag=!1);let o={...null==(t=i.params)?void 0:t[0],tree:!!e||null};p.emit("patch",{schema:r}),p.refresh(),i.run(o)}}},useVisible:()=>{let{getCollectionField:e}=(0,d.nj)(),t=(0,l.useField)(),o=(0,d.k7)(),{resource:n}=t.decoratorProps,a=n&&e(n);return(null==o?void 0:o.tree)&&(null==a?void 0:a.collectionName)===(null==a?void 0:a.target)}},(0,i.$)({name:"expandFlag",title:e=>e("Expand All"),defaultValue:!1,schemaKey:"x-decorator-props.expandFlag",useVisible:()=>(0,l.useField)().decoratorProps.treeTable}),{name:"enableDragAndDropSorting",type:"switch",useComponentProps:()=>{let{getCollectionField:e}=(0,d.nj)(),t=(0,l.useField)(),o=(0,l.useFieldSchema)(),{service:r}=(0,s.El)(),{t:i}=(0,n.useTranslation)(),{dn:u}=(0,c.er)(),{resource:p}=t.decoratorProps,m=p&&e(p),h=(0,a.VB)();return{title:i("Enable drag and drop sorting"),checked:t.decoratorProps.dragSort,onChange:async e=>{var l,n,a;if(e&&m){let{data:e}=await h.resource("collections.fields",m.collectionName).update({filterByTk:m.name,values:{sortable:!0}}),t=null==e||null==(a=e.data)||null==(n=a[0])?void 0:n.sortBy;o["x-decorator-props"].dragSortBy=t}t.decoratorProps.dragSort=e,o["x-decorator-props"].dragSort=e,r.run({...null==(l=r.params)?void 0:l[0],sort:o["x-decorator-props"].dragSortBy}),u.emit("patch",{schema:{"x-uid":o["x-uid"],"x-decorator-props":o["x-decorator-props"]}})}}}},{name:"SortField",Component:function(){let{fields:e}=(0,f.k)(),t=(0,l.useField)(),o=(0,l.useFieldSchema)(),{t:a}=(0,n.useTranslation)(),{dn:r}=(0,c.er)(),i=(0,g.l)(),{service:s,association:d}=(0,v.El)(),{getCollectionJoinField:u}=(0,_.n)(),p=u(d),m=e.filter(e=>!(null==e?void 0:e.target)&&"sort"===e.interface).map(e=>{var t;return{value:null==e?void 0:e.name,label:i(null==e||null==(t=e.uiSchema)?void 0:t.title)||(null==e?void 0:e.name),disabled:(null==e?void 0:e.scopeKey)&&(null==p?void 0:p.foreignKey)!==e.scopeKey}});return(0,x.jsx)(b.Al,{title:a("Drag and drop sorting field"),options:m,value:t.decoratorProps.dragSortBy,onChange:e=>{var l;o["x-decorator-props"].dragSortBy=e,s.run({...null==(l=s.params)?void 0:l[0],sort:e}),t.decoratorProps.dragSortBy=e,r.emit("patch",{schema:{"x-uid":o["x-uid"],"x-decorator-props":o["x-decorator-props"]}}),r.refresh()}},"sort-field")},useVisible:()=>(0,l.useField)().decoratorProps.dragSort},{name:"enableIndexColumn",type:"switch",useComponentProps:()=>{let e=(0,l.useField)(),t=(0,l.useFieldSchema)(),{t:o}=(0,n.useTranslation)(),{dn:a}=(0,c.er)();return{title:o("Enable index column"),checked:!1!==e.decoratorProps.enableIndexColumn,onChange:async o=>{e.decoratorProps=e.decoratorProps||{},e.decoratorProps.enableIndexColumn=o,t["x-decorator-props"].enableIndexColumn=o,a.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":t["x-decorator-props"]}})}}}},k.d,S.e,M.qm,{name:"RecordsPerPage",type:"select",useComponentProps(){var e,t;let o=(0,l.useField)(),a=(0,l.useFieldSchema)(),{service:r}=(0,s.El)(),{t:i}=(0,n.useTranslation)(),{dn:d}=(0,c.er)();return{title:i("Records per page"),value:(null==(t=o.decoratorProps)||null==(e=t.params)?void 0:e.pageSize)||20,options:[{label:"5",value:5},{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100},{label:"200",value:200}],onChange:e=>{var t;let l=o.decoratorProps.params||{};l.pageSize=e,o.decoratorProps.params=l,a["x-decorator-props"].params=l,r.run({...null==(t=r.params)?void 0:t[0],pageSize:e,page:1}),d.emit("patch",{schema:{"x-uid":a["x-uid"],"x-decorator-props":a["x-decorator-props"]}})}}}},{name:"tableSize",type:"select",useComponentProps(){var e;(0,l.useField)();let t=(0,l.useFieldSchema)(),{t:o}=(0,n.useTranslation)(),{dn:a}=(0,c.er)(),r=t.reduceProperties((e,t)=>{if("TableV2"===t["x-component"])return t},null);return{title:o("Table size"),value:(null==r||null==(e=r["x-component-props"])?void 0:e.size)||"small",options:[{label:o("Large"),value:"large"},{label:o("Middle"),value:"middle"},{label:o("Small"),value:"small"}],onChange:e=>{r["x-component-props"]=r["x-component-props"]||{},r["x-component-props"].size=e,a.emit("patch",{schema:{"x-uid":r["x-uid"],"x-component-props":r["x-component-props"]}})}}}},{name:"ConnectDataBlocks",Component:h.$,useComponentProps(){let{t:e}=(0,n.useTranslation)();return{type:u.I1.TABLE,emptyDescription:e("No blocks to connect")}}},{name:"divider",type:"divider",sort:7e3,useVisible:()=>{var e;let t=(0,l.useFieldSchema)();return!(null==t||null==(e=t["x-decorator-props"])?void 0:e.disableTemplate)}},{name:"ConvertReferenceToDuplicate",sort:8e3,Component:y.l,useComponentProps(){var e,t;let{name:o}=(0,d.k7)(),n=(0,l.useFieldSchema)(),{componentNamePrefix:a}=(0,C.kU)();return{componentName:`${a}Table`,collectionName:o,resourceName:(null==n||null==(e=n["x-decorator-props"])?void 0:e.resource)||(null==n||null==(t=n["x-decorator-props"])?void 0:t.association)}},useVisible:()=>{var e;let t=(0,l.useFieldSchema)();return!(null==t||null==(e=t["x-decorator-props"])?void 0:e.disableTemplate)}},{name:"divider2",type:"divider",sort:9e3},{name:"delete",type:"remove",sort:1e4,useComponentProps:()=>({removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})}]})},70391(e,t,o){o.d(t,{_:()=>y});var l=o(71178),n=o(82113),a=o(56920),r=o(52793);o(51649);var i=o(77843),s=o(17157),d=o(38951),u=o(43288),c=o(57359),p=o(28227),m=o(92719),h=o(92619),x=o(82924),v=o(31475),_=o(32221),f=o(99300),g=o(33204),b=o(37208);let y=new d.R({name:"fieldSettings:TableColumn",items:[{name:"decoratorOptions",type:"itemGroup",hideIfNoChildren:!0,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{title:e("Generic properties")}},children:[{name:"customColumnTitle",type:"modal",useComponentProps(){var e;let{fieldSchema:t,collectionField:o}=(0,_.BC)(),l=(0,a.useField)(),{t:n}=(0,i.useTranslation)(),r=(0,a.useFieldSchema)(),{dn:s}=(0,x.erX)();return{title:n("Custom column title"),schema:{type:"object",title:n("Custom column title"),properties:{title:{title:n("Column title"),default:null==r?void 0:r.title,description:`${n("Original field title: ")}${(null==o||null==(e=o.uiSchema)?void 0:e.title)||(null==t?void 0:t.title)}`,"x-decorator":"FormItem","x-component":"Input","x-component-props":{}}}},onSubmit:e=>{let{title:t}=e;l.title=t,r.title=t,s.emit("patch",{schema:{"x-uid":r["x-uid"],title:r.title}}),s.refresh()}}}},{name:"editTooltip",type:"modal",useComponentProps(){var e;let{t}=(0,i.useTranslation)(),{dn:o}=(0,x.erX)(),l=(0,a.useField)(),n=(0,a.useFieldSchema)();return{title:t("Edit tooltip"),schema:{type:"object",title:t("Edit tooltip"),properties:{tooltip:{default:(null==n||null==(e=n["x-component-props"])?void 0:e.tooltip)||"","x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{}}}},onSubmit(e){let{tooltip:t}=e;l.componentProps.tooltip=t,n["x-component-props"]=n["x-component-props"]||{},n["x-component-props"].tooltip=t,o.emit("patch",{schema:{"x-uid":n["x-uid"],"x-component-props":n["x-component-props"]}})}}}},{name:"style",Component:e=>{let t={...e,category:"style"};return(0,l.jsx)(f.f9,{...t})},useVisible(){var e,t;let{fieldSchema:o}=(0,_.BC)(),{isInSubTable:l}=(0,h._)(),n=(0,a.useField)();if(!l)return!0;let r=null==(t=n.path)?void 0:t.splice((null==(e=n.path)?void 0:e.length)-1,1);return!!o&&n.form.query(`${r.concat("*."+o.name)}`).get("readPretty")},useComponentProps(){let{name:e}=(0,p.Ge)(),{linkageRulesProps:t}=(0,s.C5)();return{...t,collectionName:e}}},{name:"columnWidth",type:"modal",useComponentProps(){var e;let t=(0,a.useField)(),{t:o}=(0,i.useTranslation)(),l=(0,a.useFieldSchema)(),{dn:n}=(0,x.erX)();return{title:o("Column width"),schema:{type:"object",title:o("Column width"),properties:{width:{default:(null==l||null==(e=l["x-component-props"])?void 0:e.width)||100,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{}}}},onSubmit:e=>{let{width:o}=e,a=l["x-component-props"]||{};a.width=o;let r={"x-uid":l["x-uid"]};r["x-component-props"]=a,l["x-component-props"]=a,t.componentProps.width=o,n.emit("patch",{schema:r}),n.refresh()}}}},{name:"sortable",type:"switch",useVisible(){let e=(0,p.Ge)(),{collectionField:t}=(0,_.BC)(),{getInterface:o}=(0,u.nj)(),l=o(null==t?void 0:t.interface),{currentMode:n}=(0,v.G2)();return(null==l?void 0:l.sortable)===!0&&!n&&((null==e?void 0:e.name)===(null==t?void 0:t.collectionName)||!(null==t?void 0:t.collectionName)||(null==t?void 0:t.inherit))},useComponentProps(){let e=(0,a.useField)(),{t}=(0,i.useTranslation)(),o=(0,a.useFieldSchema)(),{dn:l}=(0,x.erX)();return{title:t("Sortable"),checked:e.componentProps.sorter,onChange:t=>{let n={"x-uid":o["x-uid"]};o["x-component-props"]={...o["x-component-props"],sorter:t},n["x-component-props"]=o["x-component-props"],e.componentProps.sorter=t,l.emit("patch",{schema:n}),l.refresh()}}}},{name:"setDefaultValue",useVisible(){let{fieldSchema:e}=(0,_.BC)();return!!e&&!(null==e?void 0:e["x-read-pretty"])},Component:g.J,useComponentProps(){let{fieldSchema:e}=(0,_.BC)();return{fieldSchema:e}}},{name:"required",type:"switch",useVisible(){let{uiSchema:e,fieldSchema:t}=(0,_.BC)(),o=(0,a.useField)();return!!t&&["QuickEdit","FormItem"].includes(t["x-decorator"])&&!o.readPretty&&!(null==e?void 0:e["x-read-pretty"])},useComponentProps(){let{fieldSchema:e}=(0,_.BC)(),t=(0,a.useField)(),{t:o}=(0,i.useTranslation)(),{dn:l}=(0,x.erX)();return{key:"required",title:o("Required"),checked:null==e?void 0:e.required,onChange:o=>{var n,a;if(!e)return console.error("fieldSchema is required");let r={"x-uid":e["x-uid"]};e.required=o,r.required=o;let i=null==(a=t.path)?void 0:a.splice((null==(n=t.path)?void 0:n.length)-1,1);t.form.query(`${i.concat("*."+e.name)}`).forEach(e=>{e.required=o}),l.emit("patch",{schema:r}),l.refresh()}}}},{name:"pattern",type:"select",useVisible(){let{fieldSchema:e,collectionField:t}=(0,_.BC)(),o=(0,a.useField)();return!!e&&["QuickEdit","FormItem"].includes(e["x-decorator"])&&!(null==o?void 0:o.readPretty)&&(null==t?void 0:t.interface)!=="o2m"&&!(0,b.h)(e)},useComponentProps(){let{fieldSchema:e}=(0,_.BC)(),t=(0,a.useField)(),{t:o}=(0,i.useTranslation)(),{dn:l}=(0,x.erX)(),n="editable";return e?(!0===e["x-disabled"]&&(n="readonly"),!0===e["x-read-pretty"]&&(n="read-pretty"),{key:"pattern",title:o("Pattern"),options:[{label:o("Editable"),value:"editable"},{label:o("Readonly"),value:"readonly"},{label:o("Easy-reading"),value:"read-pretty"}],value:n,onChange:o=>{var n,a;let r={"x-uid":e["x-uid"]},i=null==(a=t.path)?void 0:a.splice((null==(n=t.path)?void 0:n.length)-1,1);switch(o){case"readonly":e["x-read-pretty"]=!1,e["x-disabled"]=!0,r["x-read-pretty"]=!1,r["x-disabled"]=!0,t.form.query(`${i.concat("*."+e.name)}`).forEach(e=>{e.readonly=!0,e.disabled=!0});break;case"read-pretty":e["x-read-pretty"]=!0,e["x-disabled"]=!1,r["x-read-pretty"]=!0,r["x-disabled"]=!1,t.form.query(`${i.concat("*."+e.name)}`).forEach(e=>{e.readPretty=!0});break;default:e["x-read-pretty"]=!1,e["x-disabled"]=!1,r["x-read-pretty"]=!1,r["x-disabled"]=!1,t.form.query(`${i.concat("*."+e.name)}`).forEach(e=>{e.readPretty=!1,e.disabled})}l.emit("patch",{schema:r}),l.refresh()}}):console.error("fieldSchema is required")}},{name:"fixed",type:"select",useComponentProps(){var e;let{t}=(0,i.useTranslation)(),o=(0,a.useField)(),l=(0,a.useFieldSchema)(),{dn:n}=(0,x.erX)();return{title:t("Fixed"),options:[{label:t("Not fixed"),value:"none"},{label:t("Left fixed"),value:"left"},{label:t("Right fixed"),value:"right"}],value:(null==(e=o.componentProps)?void 0:e.fixed)||"none",onChange(e){let t={"x-uid":l["x-uid"]};l["x-component-props"]=l["x-component-props"]||{},l["x-component-props"].fixed=e,t["x-component-props"]=l["x-component-props"],o.componentProps=o.componentProps||{},o.componentProps.fixed=e,n.emit("patch",{schema:t}),n.refresh()}}}},{name:"hidden",type:"switch",useComponentProps(){let e=(0,a.useField)(),{t}=(0,i.useTranslation)(),o=(0,a.useFieldSchema)(),{columnSchema:s}=(0,_.BC)(),{fieldSchema:d}=(0,v.G2)()||{},{dn:u}=(0,x.erX)(),c=s||o;return{title:(0,l.jsxs)("span",{children:[t("Hide column"),(0,l.jsx)(r.Tooltip,{title:t("In configuration mode, the entire column becomes transparent. In non-configuration mode, the entire column will be hidden. Even if the entire column is hidden, its configured default values and other settings will still take effect."),children:(0,l.jsx)(n.QuestionCircleOutlined,{style:{marginLeft:4,opacity:.65}})})]}),checked:e.componentProps.columnHidden,onChange:t=>{let l={"x-uid":c["x-uid"]},n={...c["x-component-props"],columnHidden:t};c["x-component-props"]=n,o["x-component-props"]={...o["x-component-props"],columnHidden:t},function e(t,o,l){if(!t)return!1;if(t["x-uid"]===o)return t["x-component-props"]=l,!0;for(let n of Object.values(t.properties||{}))if(e(n,o,l))return!0;return!1}(d,c["x-uid"],n),l["x-component-props"]=n,e.componentProps.columnHidden=t,u.emit("patch",{schema:l}),u.refresh({refreshParentSchema:!0})}}}},m.I]},{name:"componentOptions",type:"itemGroup",hideIfNoChildren:!0,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{title:e("Specific properties")}},useChildren(){let e=(0,s.nm)(),t=(0,c.q)(),o=e.schemaSettingsManager.get(`fieldSettings:component:${{Select:"Select",DatePicker:"DatePicker",Nester:"Nester",SubTable:"SubTable",Picker:"Picker",PopoverNester:"PopoverNester",Tag:"Tag"}[t]||t}`);return(null==o?void 0:o.items)||[]}},{name:"divider",type:"divider"},{name:"delete",type:"remove",sort:100,useComponentProps(){let{t:e}=(0,i.useTranslation)();return{removeParentsIfNoChildren:!1,confirm:{title:e("Delete field")},breakRemoveOn:{"x-component":"Grid"}}}}]})},34214(e,t,o){o.d(t,{e:()=>r});var l=o(56920),n=o(51649),a=o(6565);let r=()=>{let e=(0,l.useFieldSchema)(),{collectOperator:t,removeOperator:o}=(0,a.D)();(0,n.useEffect)(()=>()=>{o(e.name)},[e.name,o]),e["x-filter-operator"]&&t(e.name,e["x-filter-operator"])}},97173(e,t,o){o.d(t,{DM:()=>i.D,lJ:()=>i.l,Yb:()=>s.Y,lO:()=>l.l,YF:()=>u.Y,$R:()=>d.$,qm:()=>r.qm,fY:()=>r.fY,yz:()=>r.yz,Bd:()=>a.B,ys:()=>n.y});var l=o(44845),n=o(76564),a=o(4017),r=o(43873),i=o(11184),s=o(1575),d=o(58555),u=o(83736)},58555(e,t,o){o.d(t,{$:()=>n});var l=o(28227);let n=e=>{var t,o;let n=(0,l.Ge)()||{},{unavailableActions:a,availableActions:r}=(null==n?void 0:n.options)||{};return r?null==r||null==(t=r.includes)?void 0:t.call(r,e):!a||!(null==a||null==(o=a.includes)?void 0:o.call(a,e))}},14696(e,t,o){o.d(t,{M:()=>n});var l=o(35432);let n=e=>{let t=(0,l.zv)();if(e)return t}},83736(e,t,o){o.d(t,{Y:()=>r});var l=o(44374),n=o(8004),a=o(67242);let r=()=>{let{sourceId:e,association:t}=(0,l.useDataBlockProps)()||{},o=(0,a.i)(t),r=(0,n.Q)({association:t});return e||(null==r?void 0:r[o])}},67242(e,t,o){o.d(t,{i:()=>n});var l=o(26174);let n=e=>(0,l.r2)().getSourceKeyByAssociation(e)},15701(e,t,o){o.d(t,{FU:()=>_,oc:()=>v,yp:()=>f});var l=o(56920),n=o(77843),a=o(38951),r=o(57359),i=o(61013),s=o(95951),d=o(81547),u=o(60817),c=o(31574),p=o(32221),m=o(23867),h=o(463);let x=[{label:"{{t('Large')}}",value:"large"},{label:"{{t('Default')}}",value:"default"},{label:"{{t('Small')}}",value:"small"},{label:500,value:500},{label:400,value:400},{label:300,value:300}],v={name:"size",type:"select",useVisible(){let e=(0,c.U5)(),{fieldSchema:t}=(0,p.BC)();return e&&!t},useComponentProps(){var e;let{t}=(0,n.useTranslation)(),o=(0,l.useField)(),a=(0,l.useFieldSchema)(),{dn:r}=(0,s.er)(),d=(0,i.l)();return{title:t("Size"),options:d(x),value:(null==o||null==(e=o.componentProps)?void 0:e.size)||"default",onChange(e){let t={"x-uid":a["x-uid"]};a["x-component-props"]=a["x-component-props"]||{},a["x-component-props"].size=e,t["x-component-props"]=a["x-component-props"],o.componentProps=o.componentProps||{},o.componentProps.size=e,r.emit("patch",{schema:t}),r.refresh()}}}},_={name:"showFileName",type:"switch",useComponentProps(){var e;let{t}=(0,n.useTranslation)(),o=(0,l.useField)(),{fieldSchema:a}=(0,p.BC)(),r=(0,l.useFieldSchema)(),i=a||r,{dn:d,refresh:u}=(0,s.er)();return{title:t("Show file name"),checked:(null==(e=i["x-component-props"])?void 0:e.showFileName)!==!1,onChange(e){let t={"x-uid":i["x-uid"]};o.componentProps.showFileName=e,i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].showFileName=e,t["x-component-props"]=i["x-component-props"],d.emit("patch",{schema:t}),u()}}}},f=new a.R({name:"fieldSettings:component:FileManager",items:[{name:"fieldComponent",type:"select",useComponentProps(){let{t:e}=(0,n.useTranslation)(),t=(0,l.useField)(),o=(0,c.TN)(),a=(0,r.q)(),{fieldSchema:i,collectionField:m}=(0,p.BC)(),h=(0,l.useFieldSchema)(),x=i||h,v=(0,d.j)({fieldSchema:i,collectionField:m}),{dn:_}=(0,s.er)();return{title:e("Field component"),options:v,value:a,onChange(e){let l={"x-uid":x["x-uid"]};x["x-component-props"]=x["x-component-props"]||{},x["x-component-props"].mode=e,l["x-component-props"]=x["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=e,(0,u.WX)(x)&&o&&(l.default=null,x.default=null,t.setInitialValue(null),t.setValue(null)),_.emit("patch",{schema:l}),_.refresh()}}}},{name:"quickUpload",type:"switch",useComponentProps(){var e;let{t}=(0,n.useTranslation)(),o=(0,l.useField)(),{fieldSchema:a}=(0,p.BC)(),r=(0,l.useFieldSchema)(),i=a||r,{dn:d,refresh:u}=(0,s.er)();return{title:t("Quick upload"),checked:(null==(e=i["x-component-props"])?void 0:e.quickUpload)!==!1,onChange(e){let t={"x-uid":i["x-uid"]};o.componentProps.quickUpload=e,i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].quickUpload=e,t["x-component-props"]=i["x-component-props"],d.emit("patch",{schema:t}),u()}}},useVisible(){let{fieldSchema:e}=(0,p.BC)(),t=(0,l.useField)(),o=(0,l.useForm)();return!((null==e?void 0:e["x-read-pretty"])||t.readPretty||o.readPretty)}},{name:"selectFile",type:"switch",useComponentProps(){var e;let{t}=(0,n.useTranslation)(),o=(0,l.useField)(),{fieldSchema:a}=(0,p.BC)(),r=(0,l.useFieldSchema)(),i=a||r,{dn:d,refresh:u}=(0,s.er)();return{title:t("Select file"),checked:(null==(e=i["x-component-props"])?void 0:e.selectFile)!==!1,onChange(e){let t={"x-uid":i["x-uid"]};o.componentProps.selectFile=e,i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].selectFile=e,t["x-component-props"]=i["x-component-props"],d.emit("patch",{schema:t}),u()}}},useVisible(){let{fieldSchema:e}=(0,p.BC)(),t=(0,l.useField)(),o=(0,l.useForm)();return!((null==e?void 0:e["x-read-pretty"])||t.readPretty||o.readPretty)}},v,_,{...(0,h.Y3)(),useVisible(){let e=(0,c.xq)(),t=(0,m.z)();return e&&t()}}]})},98447(e,t,o){o.d(t,{Gi:()=>p,Pq:()=>v,Qd:()=>m,UD:()=>h,yW:()=>x});var l=o(56920),n=o(77583),a=o(77843),r=o(38951),i=o(11340),s=o(38693),d=o(32221),u=o(95951),c=o(18272);let p={name:"ellipsis",type:"switch",useComponentProps(){var e;let{fieldSchema:t}=(0,d.BC)(),o=(0,d.nS)(),r=(0,l.useFieldSchema)(),i=(0,l.useField)(),{dn:s}=(0,u.er)(),{t:c}=(0,a.useTranslation)(),p=t||r,m=t?o[0]?!o[0].readPretty:!t["x-read-pretty"]:!i.readPretty;return{title:c("Ellipsis overflow content"),checked:!!(null==(e=p["x-component-props"])?void 0:e.ellipsis),hidden:m,onChange:async e=>{t&&o?o.forEach(t=>{t.componentProps.ellipsis=e}):i.componentProps.ellipsis=e,n.default.set(p,"x-component-props.ellipsis",e),await s.emit("patch",{schema:{"x-uid":p["x-uid"],"x-component-props":{...p["x-component-props"],ellipsis:e}}})}}}},m={name:"enableLink",type:"switch",useVisible(){let e=(0,l.useField)(),{fieldSchema:t}=(0,d.BC)(),o=(0,l.useFieldSchema)(),n=t||o,{name:a}=(0,i.MX)()||{};return"kanban"!==a&&((null==n?void 0:n["x-read-pretty"])||e.readPretty)},useComponentProps(){var e;let{t}=(0,a.useTranslation)(),o=(0,l.useField)(),{fieldSchema:n}=(0,d.BC)(),r=(0,l.useFieldSchema)(),i=n||r,{dn:s}=(0,u.er)();return{title:t("Enable link"),checked:null==i||null==(e=i["x-component-props"])?void 0:e.enableLink,onChange(e){i["x-component-props"]={...null==i?void 0:i["x-component-props"],enableLink:e},o.componentProps.enableLink=e,s.emit("patch",{schema:{"x-uid":i["x-uid"],"x-component-props":{...null==i?void 0:i["x-component-props"]}}})}}}},h={name:"openMode",Component:c.sm,useComponentProps(){let{hideOpenMode:e}=(0,s.k)(),{fieldSchema:t}=(0,d.BC)(),o=(0,l.useFieldSchema)();return{openMode:!e,openSize:!e,targetSchema:t||o}},useVisible(){var e;let t=(0,l.useField)(),{fieldSchema:o}=(0,d.BC)(),n=(0,l.useFieldSchema)(),a=o||n;return((null==a?void 0:a["x-read-pretty"])||t.readPretty)&&(null==a||null==(e=a["x-component-props"])?void 0:e.enableLink)}},x={name:"autoFocus",type:"switch",useVisible(){let e=(0,l.useField)(),{fieldSchema:t}=(0,d.BC)(),o=(0,l.useFieldSchema)(),n=t||o;return!(null==n?void 0:n["x-read-pretty"])&&!e.readPretty},useComponentProps(){var e;let{t}=(0,a.useTranslation)(),o=(0,l.useField)(),{fieldSchema:n}=(0,d.BC)(),r=(0,l.useFieldSchema)(),i=n||r,{dn:s}=(0,u.er)();return{title:t("Auto focus"),checked:null==i||null==(e=i["x-component-props"])?void 0:e.autoFocus,onChange(e){i["x-component-props"]={...null==i?void 0:i["x-component-props"],autoFocus:e},o.componentProps.autoFocus=e,s.emit("patch",{schema:{"x-uid":i["x-uid"],"x-component-props":{...null==i?void 0:i["x-component-props"]}}})}}}},v=new r.R({name:"fieldSettings:component:Input",items:[p,m,h,{name:"enableScan",type:"switch",useVisible(){let e=(0,l.useField)(),{fieldSchema:t}=(0,d.BC)(),o=(0,l.useFieldSchema)(),n=t||o;return!(null==n?void 0:n["x-read-pretty"])&&!e.readPretty},useComponentProps(){var e;let{t}=(0,a.useTranslation)(),o=(0,l.useField)(),{fieldSchema:n}=(0,d.BC)(),r=(0,l.useFieldSchema)(),i=n||r,{dn:s}=(0,u.er)();return{title:t("Enable Scan"),checked:null==i||null==(e=i["x-component-props"])?void 0:e.enableScan,onChange(e){i["x-component-props"]={...null==i?void 0:i["x-component-props"],enableScan:e},o.componentProps.enableScan=e,s.emit("patch",{schema:{"x-uid":i["x-uid"],"x-component-props":{...null==i?void 0:i["x-component-props"]}}})}}}},{name:"disableManualInput",type:"switch",useVisible(){var e;let{fieldSchema:t}=(0,d.BC)(),o=(0,l.useFieldSchema)();return null==(e=(t||o)["x-component-props"])?void 0:e.enableScan},useComponentProps(){var e;let{t}=(0,a.useTranslation)(),o=(0,l.useField)(),{fieldSchema:n}=(0,d.BC)(),r=(0,l.useFieldSchema)(),i=n||r,{dn:s}=(0,u.er)();return{title:t("Disable manual input"),checked:null==i||null==(e=i["x-component-props"])?void 0:e.disableManualInput,onChange(e){i["x-component-props"]={...null==i?void 0:i["x-component-props"],disableManualInput:e},o.componentProps.disableManualInput=e,s.emit("patch",{schema:{"x-uid":i["x-uid"],"x-component-props":{...null==i?void 0:i["x-component-props"]}}})}}}},x]})},463(e,t,o){o.d(t,{NU:()=>T,Pq:()=>F,US:()=>A,Y3:()=>P,r0:()=>D});var l=o(71178),n=o(56920),a=o(77583);o(51649);var r=o(77843),i=o(38951),s=o(69412),d=o(43288),u=o(57359),c=o(28227),p=o(41944),m=o(60817),h=o(72548),x=o(31574),v=o(32221),_=o(95951),f=o(81547),g=o(99300),b=o(79056),y=o(6206),S=o(23867),k=o(43923),C=o(38693),M=o(98447);let w={name:"enableLink",type:"switch",useVisible:()=>(0,n.useField)().readPretty,useComponentProps(){var e;let{t}=(0,r.useTranslation)(),o=(0,n.useField)(),{fieldSchema:l}=(0,v.BC)(),a=(0,n.useFieldSchema)(),i=l||a,{dn:s}=(0,_.er)();return{title:t("Enable link"),checked:(null==(e=i["x-component-props"])?void 0:e.enableLink)!==!1,onChange(e){i["x-component-props"]={...null==i?void 0:i["x-component-props"],enableLink:e},o.componentProps.enableLink=e,s.emit("patch",{schema:{"x-uid":i["x-uid"],"x-component-props":{...null==i?void 0:i["x-component-props"]}}})}}}},F={name:"titleField",type:"select",useComponentProps(){var e,t,o,l;let{t:a}=(0,r.useTranslation)(),i=(0,n.useField)(),{dn:s}=(0,_.er)(),d=(0,x.kD)(),{uiSchema:u,fieldSchema:p,collectionField:m}=(0,v.BC)(),h=(0,n.useFieldSchema)(),f=p||h,g=(0,c.E1)(),b=m||g,y={...null==b||null==(t=b.uiSchema)||null==(e=t["x-component-props"])?void 0:e.fieldNames,...null==i||null==(o=i.componentProps)?void 0:o.fieldNames,...null==f||null==(l=f["x-component-props"])?void 0:l.fieldNames};return{title:a("Title field"),options:d,value:null==y?void 0:y.label,onChange(e){var t,o,l,n,a;let r={"x-uid":f["x-uid"]},d={...null==b||null==(o=b.uiSchema)||null==(t=o["x-component-props"])?void 0:t.fieldNames,...null==(l=f["x-component-props"])?void 0:l.fieldNames,label:e};f["x-component-props"]=f["x-component-props"]||{},f["x-component-props"].fieldNames=d,r["x-component-props"]=f["x-component-props"],i.componentProps.fieldNames=f["x-component-props"].fieldNames;let u=null==(a=i.path)?void 0:a.splice((null==(n=i.path)?void 0:n.length)-1,1);i.form.query(`${u.concat("*."+f.name)}`).forEach(e=>{e.componentProps.fieldNames=y}),s.emit("patch",{schema:r}),s.refresh()}}}},P=e=>{let t=(null==e?void 0:e.title)||"Allow multiple";return{name:"allowMultiple",type:"switch",useVisible:()=>(0,x.xq)(),useComponentProps(){var e;let{t:o}=(0,r.useTranslation)(),l=(0,n.useField)(),{fieldSchema:a}=(0,v.BC)(),i=(0,n.useFieldSchema)(),s=a||i,{dn:d,refresh:u}=(0,_.er)();return{title:o(t),checked:(null==(e=s["x-component-props"])?void 0:e.multiple)===void 0||s["x-component-props"].multiple,onChange(e){let t={"x-uid":s["x-uid"]};s["x-component-props"]=s["x-component-props"]||{},l.componentProps=l.componentProps||{},s["x-component-props"].multiple=e,l.componentProps.multiple=e,t["x-component-props"]=s["x-component-props"],d.emit("patch",{schema:t}),u()}}}}},j={name:"setDefaultSortingRules",Component:y.b},A={name:"setTheDataScope",Component:b.Z,useComponentProps(){var e,t,o;let{getCollectionJoinField:r,getAllCollectionsInheritChain:i}=(0,d.nj)(),{getField:u}=(0,d.k7)(),{form:c}=(0,s.Es)(),m=(0,p.pE)(),x=(0,n.useField)(),{fieldSchema:f,collectionField:b}=(0,v.BC)(),y=(0,n.useFieldSchema)(),S=f||y,C=b||u(S.name)||r(S["x-collection-field"]),M=(0,k.$l)(),w=(0,k.gp)(),{dn:F}=(0,_.er)();return{collectionName:null==C?void 0:C.target,defaultFilter:(null==S||null==(o=S["x-component-props"])||null==(t=o.service)||null==(e=t.params)?void 0:e.filter)||{},form:c,dynamicComponent:e=>(0,l.jsx)(g.P8,{...e,form:c,collectionField:e.collectionField,record:m,shouldChange:(0,g.io)({collectionField:e.collectionField,variables:M,localVariables:w,getAllCollectionsInheritChain:i})}),onSubmit:e=>{let{filter:t}=e;t=(0,h.pA)(t),a.default.set(S["x-component-props"],"service.params.filter",t),a.default.set(x.componentProps,"service.params.filter",t),F.emit("patch",{schema:{"x-uid":S["x-uid"],"x-component-props":S["x-component-props"]}})}}}},I={name:"fieldComponent",type:"select",useComponentProps(){let{t:e}=(0,r.useTranslation)(),t=(0,n.useField)(),{fieldSchema:o,collectionField:l}=(0,v.BC)(),a=(0,n.useFieldSchema)(),i=o||a,s=(0,f.j)({fieldSchema:o,collectionField:l}),d=(0,x.TN)(),c=(0,u.q)(),{dn:p}=(0,_.er)();return{title:e("Field component"),options:s,value:c,onChange(e){let o={"x-uid":i["x-uid"]};if(i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].mode=e,o["x-component-props"]=i["x-component-props"],t.componentProps=t.componentProps||{},t.componentProps.mode=e,(0,m.WX)(i)&&d){var l,n;o.default=null,i.default=null,null==t||null==(l=t.setInitialValue)||l.call(t,null),null==t||null==(n=t.setValue)||n.call(t,null)}p.emit("patch",{schema:o}),p.refresh()}}}},T=new i.R({name:"fieldSettings:component:Select",items:[{...I,useVisible:x.xq},{...A,useVisible(){let e=(0,x.je)(),t=(0,x.U5)();return e&&!t}},{...j,useComponentProps(){let{fieldSchema:e}=(0,v.BC)();return{fieldSchema:e}},useVisible(){let e=(0,x.je)(),t=(0,x.U5)();return e&&!t}},{name:"quickCreate",type:"select",useComponentProps(){var e;let{defaultOpenMode:t}=(0,C.k)(),{t:o}=(0,r.useTranslation)(),l=(0,n.useField)(),a=(0,n.useFieldSchema)(),{dn:i,insertAdjacent:s}=(0,_.er)();return{title:o("Quick create"),options:[{label:o("None"),value:"none"},{label:o("Dropdown"),value:"quickAdd"},{label:o("Pop-up"),value:"modalAdd"}],value:(null==(e=l.componentProps)?void 0:e.addMode)||"none",onChange(e){"modalAdd"===e&&(a.reduceProperties((e,t)=>"Action"===t["x-component"]?t:e,null)||s("afterBegin",{"x-action":"create","x-acl-action":"create",title:"{{t('Add new')}}","x-toolbar":"ActionSchemaToolbar","x-toolbar-props":{draggable:!1},"x-settings":"actionSettings:addNew","x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{openMode:t,type:"default",component:"CreateRecordAction"}}));let o={"x-uid":a["x-uid"]};a["x-component-props"]=a["x-component-props"]||{},a["x-component-props"].addMode=e,o["x-component-props"]=a["x-component-props"],l.componentProps=l.componentProps||{},l.componentProps.addMode=e,i.emit("patch",{schema:o}),i.refresh()}}},useVisible(){let e=(0,x.xq)(),t=(0,x.U5)(),{fieldSchema:o}=(0,v.BC)(),{type:l}=(0,c.h6)()||{};return e&&!o&&!t&&"publicForm"!==l}},{...P(),useVisible(){let e=(0,x.U5)(),t=(0,x.xq)(),o=(0,S.z)();return!e&&t&&o()}},{...F,useVisible:x.xq},{...w,useVisible(){let e=(0,x.U5)();return(0,x.xq)()&&e}},M.Gi,{...M.Qd,useVisible(){let e=(0,c.E1)(),t=(0,x.U5)();return!(0,x.xq)()&&t&&"multipleSelect"!==e.interface}},{...M.UD,useVisible(){var e,t;let o=(0,n.useField)(),l=(0,x.xq)(),{fieldSchema:a}=(0,v.BC)(),r=(0,n.useFieldSchema)(),i=a||r;return((null==i?void 0:i["x-read-pretty"])||o.readPretty)&&((null==i||null==(e=i["x-component-props"])?void 0:e.enableLink)||l&&(null==i||null==(t=i["x-component-props"])?void 0:t.enableLink)!==!1)}}]}),D=new i.R({name:"fieldSettings:component:FilterSelect",items:[{...I,useVisible:x.xq},{...A,useVisible(){let e=(0,x.je)(),t=(0,x.U5)();return e&&!t}},{...j,useComponentProps(){let{fieldSchema:e}=(0,v.BC)();return{fieldSchema:e}},useVisible(){let e=(0,x.je)(),t=(0,x.U5)();return e&&!t}},P({title:"Allow multiple selection"}),{...F,useVisible:x.xq},{...w,useVisible(){let e=(0,x.U5)();return(0,x.xq)()&&e}}]})},38957(e,t,o){o.d(t,{g:()=>v,k:()=>x});var l=o(71178),n=o(56220),a=o(56920),r=o(27404),i=o(51649),s=o(77843),d=o(24),u=o(17157),c=o(13975),p=o(82924),m=o(79246),h=o(93160);let x=()=>{let e,{t}=(0,s.useTranslation)(),o=(0,i.useContext)(a.SchemaOptionsContext),{theme:x}=(0,c.useGlobalTheme)(),{componentCls:_,hashId:f}=(0,m.I)(),g=(0,p.TrS)(),{createRoute:b}=(0,p.Ob5)(),y=(e=(0,d.V)(),(0,i.useCallback)(async t=>{await e.request({method:"POST",url:"/uiSchemas:insert",data:t})},[e])),S=(0,i.useCallback)(async()=>{let e=await (0,p.RD4)(t("Add page"),()=>(0,l.jsx)(p.t6u,{scope:o.scope,components:{...o.components},children:(0,l.jsx)(n.FormLayout,{layout:"vertical",children:(0,l.jsx)(p.Eaz.Provider,{value:p.b6K,children:(0,l.jsx)(p.HvB,{schema:{properties:{title:{title:t("Menu item title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:t("Icon"),"x-component":"IconPicker","x-decorator":"FormItem"}}}})})})}),x).open({initialValues:{}}),a=(0,r.uid)(),i=(0,r.uid)(),s=(0,r.uid)(),d=(0,r.uid)();await b({type:h.q2.flowPage,title:e.title,icon:e.icon,parentId:null==g?void 0:g.id,schemaUid:i,menuSchemaUid:a,enableTabs:!1,children:[{type:h.q2.tabs,schemaUid:s,tabSchemaName:d,hidden:!0}]}),y(v({pageSchemaUid:i}))},[b,y,null==o?void 0:o.components,null==o?void 0:o.scope,null==g?void 0:g.id,t,x]);return(0,l.jsx)(u.rR,{title:t("Modern page (v2)"),onClick:S,className:`${_} ${f}`})};function v(e){let{pageSchemaUid:t}=e;return{type:"void","x-component":"FlowRoute","x-uid":t}}},52973(e,t,o){o.d(t,{my:()=>_,rP:()=>x,yD:()=>v});var l=o(71178),n=o(56220),a=o(56920),r=o(27404),i=o(51649),s=o(77843),d=o(24),u=o(17157),c=o(13975),p=o(82924),m=o(79246),h=o(93160);let x=()=>{let e=(0,d.V)();return(0,i.useCallback)(async t=>{await e.request({method:"POST",url:"/uiSchemas:insert",data:t})},[e])},v=()=>{let{t:e}=(0,s.useTranslation)(),t=(0,i.useContext)(a.SchemaOptionsContext),{theme:o}=(0,c.useGlobalTheme)(),{componentCls:d,hashId:v}=(0,m.I)(),f=(0,p.TrS)(),{createRoute:g}=(0,p.Ob5)(),b=x(),y=(0,i.useCallback)(async()=>{let a=await (0,p.RD4)(e("Add page"),()=>(0,l.jsx)(p.t6u,{scope:t.scope,components:{...t.components},children:(0,l.jsx)(n.FormLayout,{layout:"vertical",children:(0,l.jsx)(p.Eaz.Provider,{value:p.b6K,children:(0,l.jsx)(p.HvB,{schema:{properties:{title:{title:e("Menu item title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:e("Icon"),"x-component":"IconPicker","x-decorator":"FormItem"}}}})})})}),o).open({initialValues:{}}),i=(0,r.uid)(),s=(0,r.uid)(),d=(0,r.uid)(),u=(0,r.uid)();await g({type:h.q2.page,title:a.title,icon:a.icon,parentId:null==f?void 0:f.id,schemaUid:s,menuSchemaUid:i,enableTabs:!1,children:[{type:h.q2.tabs,schemaUid:d,tabSchemaName:u,hidden:!0}]}),b(_({pageSchemaUid:s,tabSchemaUid:d,tabSchemaName:u}))},[g,b,null==t?void 0:t.components,null==t?void 0:t.scope,null==f?void 0:f.id,e,o]);return(0,l.jsx)(u.rR,{title:e("Classic page (v1)"),onClick:y,className:`${d} ${v}`})};function _(e){let{pageSchemaUid:t,tabSchemaUid:o,tabSchemaName:l}=e;return{type:"void","x-component":"Page",properties:{[l]:{type:"void","x-component":"Grid","x-initializer":"page:addBlock",properties:{},"x-uid":o,"x-async":!0}},"x-uid":t}}},40854(e,t,o){o.d(t,{g:()=>l.g});var l=o(38957)},38693(e,t,o){o.d(t,{R:()=>u,k:()=>c});var l=o(71178),n=o(51649),a=o(45249),r=o(51223),i=o(70447);let s={defaultOpenMode:"drawer",openModeToComponent:{drawer:a.Ay,page:i.A,modal:r.Ay},hideOpenMode:!1},d=n.default.createContext(null),u=e=>{let t=(0,n.useMemo)(()=>{let t={...s};return void 0!==e.defaultOpenMode&&(t.defaultOpenMode=e.defaultOpenMode),void 0!==e.openModeToComponent&&(t.openModeToComponent=e.openModeToComponent),void 0!==e.hideOpenMode&&(t.hideOpenMode=e.hideOpenMode),e.isMobile&&(t.isMobile=e.isMobile),t},[e.defaultOpenMode,e.openModeToComponent,e.hideOpenMode]),o=(0,n.useCallback)(e=>{let o=t.openModeToComponent[e];return o||console.error(`OpenModeProvider: openModeToComponent[${e}] is not defined`),o},[t]),a=(0,n.useMemo)(()=>({defaultOpenMode:t.defaultOpenMode,hideOpenMode:t.hideOpenMode,getComponentByOpenMode:o,isMobile:t.isMobile}),[t.defaultOpenMode,t.hideOpenMode,o,t.isMobile]);return(0,l.jsx)(d.Provider,{value:a,children:e.children})},c=()=>n.default.useContext(d)},47851(e,t,o){o.d(t,{P:()=>s});var l=o(71178),n=o(56920),a=o(51649),r=o(82924),i=o(44388);let s=e=>{var t,o;let{visible:s,setVisible:d}=e,[u,c]=(0,a.useState)(!1),[p,m]=(0,a.useState)(!1),{visible:h,setVisible:x}=(0,a.useContext)(i.B9)||{visible:!1,setVisible:()=>{}},v=(0,n.useFieldSchema)(),_=(0,a.useCallback)(e=>{null==d||d(e),null==c||c(e),null==x||x(e)},[d,x]),f=e.openMode||(null==(t=v["x-component-props"])?void 0:t.openMode)||"drawer",g=e.openSize||(null==(o=v["x-component-props"])?void 0:o.openSize);return(0,l.jsx)(i.OC,{visible:!1,children:(0,l.jsx)(r.z45,{visible:s||u||h,setVisible:_,openMode:f,openSize:g,formValueChanged:p,setFormValueChanged:m,children:e.children})})}},84313(e,t,o){o.d(t,{H:()=>l.Hy});var l=o(3012)},39888(e,t,o){o.d(t,{EZ:()=>c,P3:()=>u,hd:()=>p});var l=o(71178),n=o(51649),a=o(77843),r=o(35432),i=o(49621);let s=n.default.createContext(null),d=n.default.createContext(null),u=n.default.memo(e=>{var t,o;let{t:n}=(0,a.useTranslation)(),u=(0,r.zv)(),p=(0,i.Ge)(),m=c();return(0,l.jsx)(d.Provider,{value:{name:"$nParentPopupRecord",title:n("Parent popup record"),value:(null==(t=e.parent)?void 0:t.recordData)||(null==m?void 0:m.value),collection:(null==(o=e.parent)?void 0:o.collection)||(null==m?void 0:m.collection)},children:(0,l.jsx)(s.Provider,{value:{name:"$nPopupRecord",title:n("Current popup record"),value:e.recordData||u,collection:e.collection||p},children:e.children})})});u.displayName="VariablePopupRecordProvider";let c=()=>n.default.useContext(s),p=()=>n.default.useContext(d)},21676(e,t,o){o.d(t,{x:()=>A});var l=o(71178),n=o(63526);o(51649);var a=o(38356),r=o(41906),i=o(83468),s=o(18111),d=o(43288),u=o(50255),c=o(16211),p=o(13975),m=o(6997),h=o(76028),x=o(93160),v=o(82924),_=o(57610),f=o(44388),g=o(5101),b=o(99300),y=o(96932),S=o(86393),k=o(84693),C=o(48849),M=o(52793),w=o(91815),F=o(60422),P=o(28601);class j extends i.k{async afterAdd(){let e=this.app.apiClient,t=e.auth.locale;try{var l,n,a,r,i,s,d,u;let c=await e.request({url:"app:getLang",params:{locale:t},headers:{"X-Role":"anonymous"}}),p=null==c?void 0:c.data;this.engine.context.defineProperty("locales",{value:(null==p?void 0:p.data)||{}}),this.app.use(M.App,{component:!1}),(null==p||null==(l=p.data)?void 0:l.lang)&&(e.auth.setLocale(null==p||null==(s=p.data)?void 0:s.lang),this.app.setDocumentLanguage(null==p||null==(d=p.data)?void 0:d.lang),this.app.i18n.changeLanguage(null==p||null==(u=p.data)?void 0:u.lang)),Object.keys((null==p||null==(n=p.data)?void 0:n.resources)||{}).forEach(e=>{var t,o;this.app.i18n.addResources(null==p||null==(t=p.data)?void 0:t.lang,e,(null==p||null==(o=p.data)?void 0:o.resources[e])||{})}),(0,C.setValidateLanguage)(null==p||null==(a=p.data)?void 0:a.lang),(0,F.M)(null==p?void 0:p.data);let m=P.At[null==p||null==(r=p.data)?void 0:r.lang]||"en";await o(68817)(`./${m}`),w.default.locale(m),window.cronLocale=null==p||null==(i=p.data)?void 0:i.cron}catch(e){throw e}}}class A extends i.k{async afterAdd(){await this.addPlugins()}async load(){this.addComponents(),this.addRoutes(),this.app.use(k.Qd),this.app.use(k.Y),this.app.pluginSettingsManager.add("security",{title:(0,n.tval)("Security"),icon:"SafetyOutlined"})}addRoutes(){this.router.add("root",{path:"/",element:(0,l.jsx)(A.RootRedirect,{})}),this.router.add("not-found",{path:"*",Component:p.AppNotFound}),this.router.add("admin",{path:"/admin",Component:"AdminLayout"}),this.router.add("admin.page",{path:"/admin/:name",Component:"AdminDynamicPage"}),this.router.add("admin.page.tabs",{path:"/admin/:name/tabs/:tabUid",Component:v.Y2j}),this.router.add("admin.page.popups",{path:"/admin/:name/popups/*",Component:f.rN}),this.router.add("admin.page.tabs.popups",{path:"/admin/:name/tabs/:tabUid/popups/*",Component:f.rN}),this.router.add("admin.page.tab",{path:"/admin/:name/tab/:tabUid",Component:"AdminDynamicPage"}),this.router.add("admin.page.view",{path:"/admin/:name/view/*",Component:"AdminDynamicPage"}),this.router.add("admin.page.tab.view",{path:"/admin/:name/tab/:tabUid/view/*",Component:"AdminDynamicPage"})}addComponents(){this.app.addComponents({ErrorFallback:_.x,RouteSchemaComponent:x.yU,BlockTemplatePage:y.BZ,BlockTemplateDetails:y.YU})}async addPlugins(){await this.app.pm.add(p.PluginFlowEngine),await this.app.pm.add(g.PB),await this.app.pm.add(j,{name:"builtin-locale"}),await this.app.pm.add(x.NC,{name:"admin-layout"}),await this.app.pm.add(S.Cz,{name:"system-setting"}),await this.app.pm.add(m._,{name:"pinned-list",config:{items:{ui:{order:100,component:"DesignableSwitch",pin:!0,snippet:"ui.*"},sc:{order:300,component:"SettingsCenterDropdown",pin:!0,snippet:"pm.*"}}}}),await this.app.pm.add(v.GD6,{name:"schema-component"}),await this.app.pm.add(g.X1,{name:"schema-initializer"}),await this.app.pm.add(b.SA,{name:"schema-settings"}),await this.app.pm.add(s.tv,{name:"block-schema-component"}),await this.app.pm.add(v.bkX,{name:"antd-schema-component"}),await this.app.pm.add(r.gt,{name:"builtin-acl"}),await this.app.pm.add(u.L2,{name:"remote-document-title"}),await this.app.pm.add(h.V_,{name:"builtin-pm"}),await this.app.pm.add(d.Kf,{name:"builtin-collection"})}}A.RootRedirect=()=>{var e;let t=(0,c.VB)(),o=!!(null==t||null==(e=t.auth)?void 0:e.token);return(0,l.jsx)(a.Navigate,{replace:!0,to:o?"/admin":"/signin?redirect=/admin"})}},6997(e,t,o){o.d(t,{i6:()=>C,DW:()=>l.PinnedPluginListContext,_:()=>w,k4:()=>l.getPinnedPluginListKeys,P7:()=>y});var l=o(13975),n=o(71178),a=o(10691),r=o(56920),i=o(52793),s=o(93656),d=o(51649),u=o(42536),c=o(78948),p=o(82113),m=o(504),h=o(63526),x=o(77843),v=o(44374),_=o(17103);let f=()=>{var e,t;let{t:o}=(0,x.useTranslation)(),l=(0,_.gL)(),{token:a}=(0,v.useToken)(),r=(null==l||null==(e=l.data)?void 0:e.lang)==="zh-CN",s=[{key:"nocobase",disabled:!0,label:(0,n.jsxs)("div",{style:{cursor:"text"},children:[(0,n.jsx)("div",{style:{color:a.colorText},children:"NocoBase"}),(0,n.jsxs)("div",{style:{fontSize:"0.8em",color:a.colorTextDescription},children:["v",null==l||null==(t=l.data)?void 0:t.version]})]})},{key:"divider_1",type:"divider"},{key:"homePage",label:(0,n.jsx)("a",{href:r?"https://www.nocobase.com/cn/":"https://www.nocobase.com",target:"_blank",rel:"noreferrer",children:o("Home page")})},{key:"userManual",label:(0,n.jsx)("a",{href:r?"https://docs.nocobase.com/cn/guide/":"https://docs.nocobase.com/guide/",target:"_blank",rel:"noreferrer",children:o("Handbook")})},{key:"license",label:(0,n.jsx)("a",{href:r?"https://www.nocobase.com/cn/agreement":"https://www.nocobase.com/en/agreement",target:"_blank",rel:"noreferrer",children:o("License")})}];return(0,n.jsx)(i.Menu,{items:s})},g=(0,a.css)`
145
145
  display: inline-block;
146
146
  vertical-align: top;
147
147
  width: 46px;
@@ -215,7 +215,7 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
215
215
  .ant-btn-default {
216
216
  box-shadow: none;
217
217
  }
218
- `,k={token:{colorSplit:"rgba(255, 255, 255, 0.1)"}},C=d.default.memo(e=>{let{allowAll:t,snippets:o}=(0,u.v6)(),a=(0,d.useContext)(l.PinnedPluginListContext),{components:p}=(0,d.useContext)(r.SchemaOptionsContext);return(0,n.jsxs)("div",{className:S,children:[(0,n.jsx)("div",{onClick:e.onClick,children:(0,l.getPinnedPluginListKeys)(a.items).filter(e=>{var l;let n;return n=null==(l=a.items[e])?void 0:l.snippet,t||"*"===n||(null==o?void 0:o.includes(n))}).map(e=>{var t;let o=null==(t=a.items[e])?void 0:t.component;if(!o)return null;if("string"!=typeof o)return(0,n.jsx)(o,{},e);let l=(0,s.default)(p,o);return l?(0,n.jsx)(l,{},e):null})}),(0,n.jsx)(i.ConfigProvider,{theme:k,children:(0,n.jsx)(i.Divider,{type:"vertical"})}),(0,n.jsx)(b,{},"help"),(0,n.jsx)(c.v,{})]})});C.displayName="PinnedPluginList";var M=o(83468);class w extends M.k{async load(){this.app.use(y,this.options.config)}}},76028(e,t,o){o.d(t,{Q7:()=>G,wj:()=>_,C_:()=>E,X1:()=>v,R0:()=>B,V_:()=>W,dj:()=>K,WS:()=>H});var l=o(71178),n=o(51649),a=o(38356),r=o(17157),i=o(83468),s=o(86393),d=o(82113),u=o(52793),c=o(77843),p=o(41906),m=o(90236),h=o(82924),x=o(49948);let v=()=>{let{t:e}=(0,c.useTranslation)(),t=(0,r.vx)(),{token:o}=(0,x.K)(),{isMobileLayout:n}=(0,m.mY)();return n?null:(0,l.jsx)(u.Tooltip,{title:e("Plugin manager"),children:(0,l.jsx)(u.Button,{"data-testid":"plugin-manager-button",icon:(0,l.jsx)(d.ApiOutlined,{style:{color:o.colorTextHeaderMenu}}),title:e("Plugin manager"),onClick:()=>{t("/admin/pm/list")}})})},_=()=>{let e=(0,h.lum)(),{t}=(0,c.useTranslation)(),{token:o}=(0,x.K)(),i=(0,r.nm)(),{snippets:s=[]}=(0,p.v6)(),v=(0,n.useMemo)(()=>{let o=i.pluginSettingsManager.getList(),n=o.filter(e=>e.isPinned&&!e.hidden&&!1!==e.isTopLevel).map(t=>({key:t.name,icon:t.icon,label:t.link?(0,l.jsx)("div",{onClick:()=>window.open(t.link),children:e(t.title)}):(0,l.jsx)(a.Link,{to:t.path,children:e(t.title)})})),r=o.filter(e=>!e.isPinned&&!e.hidden&&!1!==e.isTopLevel).map(t=>({key:t.name,icon:t.icon,label:t.link?(0,l.jsx)("div",{onClick:()=>window.open(t.link),children:e(t.title)}):(0,l.jsx)(a.Link,{to:t.path,children:e(t.title)})}));return[s.includes("pm")&&{key:"plugin-manager",icon:(0,l.jsx)(d.ApiOutlined,{}),label:(0,l.jsx)(a.Link,{to:"/admin/settings/plugin-manager",children:t("Plugin manager")})},s.includes("pm")&&{type:"divider"},...n,{type:"divider"},...r].filter(Boolean)},[i,t]);(0,n.useEffect)(()=>()=>{i.pluginSettingsManager.clearCache()},[i.pluginSettingsManager]);let{isMobileLayout:_}=(0,m.mY)();return _?null:(0,l.jsx)(u.Dropdown,{menu:{style:{maxHeight:"70vh",overflow:"auto"},items:v},children:(0,l.jsx)(u.Button,{"data-testid":"plugin-settings-button",icon:(0,l.jsx)(d.SettingOutlined,{style:{color:o.colorTextHeaderMenu}})})})};var f=o(71883),g=o(77583),b=o(10691),y=o(16211),S=o(94046),k=o(91815);let C=(0,o(76821).createStyles)(e=>{let{token:t}=e;return{cardActionDisabled:{color:t.colorTextDisabled,cursor:"not-allowed"},pageHeader:{backgroundColor:t.colorBgContainer,paddingTop:t.paddingSM,paddingBottom:0,paddingInline:t.paddingLG,".ant-page-header-footer":{marginBlockStart:"0"},"& .ant-tabs-nav":{marginBottom:0},".ant-page-header-heading-title":{color:t.colorText}},pageContent:{margin:t.marginLG},PluginDetailBaseInfo:{display:"flex",flexDirection:"column",marginBottom:t.margin},PluginDocument:{background:t.colorBgContainer,padding:t.paddingLG,height:"60vh",overflowY:"auto"},avatar:{".ant-card-meta-avatar":{marginTop:"8px",".ant-avatar":{borderRadius:"2px"}}},version:{display:"block",color:t.colorTextDescription,fontWeight:"normal",fontSize:t.fontSize}}});k.default.extend(eR.default);let M=e=>{var t,o,a,r,i,s,d,p;let{plugin:m,onCancel:h}=e,{t:x}=(0,c.useTranslation)(),v=(0,n.useMemo)(()=>[{title:x("Name"),dataIndex:"name",key:"name"},{title:x("Version range"),dataIndex:"versionRange",key:"versionRange"},{title:x("Plugin's version"),dataIndex:"packageVersion",key:"packageVersion"},{title:x("Result"),dataIndex:"result",key:"result",render:e=>(0,l.jsx)(u.Tag,{color:e?"success":"error",children:e?"Yes":"No"})}],[x]),{data:_,loading:f}=(0,y.bP)({url:"pm:get",params:{filterByTk:m.name}},{refreshDeps:[m.name],ready:!!m.name}),g=(0,n.useMemo)(()=>{var e,t,o;if(!(null==_||null==(t=_.data)||null==(e=t.packageJson)?void 0:e.repository))return null;let l=null==_||null==(o=_.data)?void 0:o.packageJson.repository;return("string"==typeof l?l:l.url).replace(/\.git$/,"").replace(/^git\+/,"")},[_]),b=(0,n.useMemo)(()=>{var e;let t=null==_||null==(e=_.data)?void 0:e.packageJson.author;return t?"string"==typeof t?t:t.name:null},[_]),{styles:S,theme:k}=C(),M=[{key:"readme",label:x("Readme"),children:(0,l.jsxs)(u.Row,{gutter:20,children:[m.name&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Name")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:m.name})]})}),m.displayName&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("DisplayName")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:m.displayName})]})}),(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("PackageName")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:m.packageName})]})}),g&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Repository")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:g})]})}),(null==_||null==(t=_.data)?void 0:t.homepage)&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Homepage")}),(0,l.jsx)("a",{href:null==_||null==(o=_.data)?void 0:o.homepage,target:"_blank",rel:"noreferrer",children:null==_||null==(a=_.data)?void 0:a.homepage})]})}),m.description&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Description")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:m.description})]})}),(null==_||null==(r=_.data)?void 0:r.packageJson.license)&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("License")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:null==_||null==(i=_.data)?void 0:i.packageJson.license})]})}),b&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Author")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:b})]})}),(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Version")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:null==m?void 0:m.version})]})})]})},{key:"dependencies",label:x("Dependencies compatibility check"),children:(0,l.jsx)(l.Fragment,{children:(null==_||null==(s=_.data)?void 0:s.depsCompatible)===!1?(0,l.jsx)(u.Typography.Text,{type:"danger",children:x("`dist/externalVersion.js` not found or failed to `require`. Please rebuild this plugin.")}):(0,l.jsxs)(l.Fragment,{children:[!(null==_||null==(d=_.data)?void 0:d.isCompatible)&&(0,l.jsx)(u.Alert,{showIcon:!0,type:"error",message:x("Plugin dependencies check failed, you should change the dependent version to meet the version requirements.")}),(0,l.jsx)(u.Table,{style:{marginTop:k.margin},rowKey:"name",pagination:!1,columns:v,dataSource:null==_||null==(p=_.data)?void 0:p.depsCompatible})]})})}];return(0,l.jsx)(u.Modal,{open:!!m,footer:!1,destroyOnClose:!0,width:600,onCancel:h,children:f?(0,l.jsx)(u.Spin,{}):m&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.Typography.Title,{level:3,children:m.packageName}),(0,l.jsx)(u.Space,{split:(0,l.jsx)("span",{children:"\xa0•\xa0"}),children:(0,l.jsx)("span",{children:m.version})}),(0,l.jsx)(u.Tabs,{style:{minHeight:"50vh"},items:M,defaultActiveKey:m.isCompatible?void 0:"dependencies"})]})})};var w=o(56920),F=o(27404);let P=e=>{let{onClose:t,isUpgrade:o,pluginData:a}=e,{message:r}=u.App.useApp(),i=(0,n.useMemo)(()=>{let e=(0,F.uid)(),t={type:"object",properties:{[e]:{"x-decorator":"Form","x-component":"div",type:"void","x-decorator-props":{useValues:"{{ useValuesFromProps }}"},properties:{packageName:{type:"string",title:"{{t('Npm package name')}}","x-decorator":"FormItem","x-component":"Input",required:!0,"x-component-props":{disabled:!0}},registry:{type:"string",title:"{{t('Registry url')}}",default:"https://registry.npmjs.org/","x-decorator":"FormItem","x-component":"Input","x-decorator-props":{tooltip:"Example: https://registry.npmjs.org/"}},authToken:{type:"string",title:"{{t('Npm authToken')}}","x-decorator":"FormItem","x-component":"Input"},version:{type:"string",title:"{{t('Version')}}","x-decorator":"FormItem","x-component":"Input"},footer:{type:"void","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{justifyContent:"right"}},properties:{cancel:{title:"Cancel","x-component":"Action","x-component-props":{useAction:"{{ useCancel }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useSaveValues }}"}}}}}}}};return t.properties[e].properties.packageName["x-component-props"].disabled=o,o||delete t.properties[e].properties.version,t},[o]);return(0,l.jsx)(h.HvB,{scope:{useCancel:()=>({run(){t()}}),useSaveValues:()=>{let e=(0,y.VB)(),{t:l}=(0,c.useTranslation)(),n=(0,w.useForm)();return{async run(){await n.submit(),e.request({url:o?"pm:update":"pm:add",method:"post",data:{...n.values}}),t(!0)}}},versionList:[],useValuesFromProps:e=>(0,y.bP)(()=>Promise.resolve({data:o?(0,g.pick)(a,["name","packageName","version"]):{}}),e)},schema:i})};P.displayName="PluginNpmForm";let{confirm:j}=u.Modal,A=e=>{let{onClose:t,pluginData:o,isUpgrade:a}=e,{message:r}=u.App.useApp(),i=(0,n.useMemo)(()=>({type:"object",properties:{[(0,F.uid)()]:{"x-decorator":"Form","x-component":"div",type:"void",properties:{uploadFile:{type:"string","x-decorator":"FormItem","x-component":"Upload.Dragger",required:!0,"x-component-props":{action:"",multiple:!1,maxCount:1,height:"150px",tipContent:"{{t('Drag and drop the file here or click to upload, file size should not exceed 30M')}}",beforeUpload:e=>(/\.(zip|rar|tar|gz|bz2|tgz)$/.test(e.name)||r.error("File only support zip, rar, tar, gz, bz2!"),e.size/1024/1024<30||r.error("File must smaller than 30MB!"),!1)}},footer:{type:"void","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{justifyContent:"right"}},properties:{cancel:{title:"Cancel","x-component":"Action","x-component-props":{useAction:"{{ useCancel }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useSaveValues }}"}}}}}}}}),[r]);return(0,l.jsx)(h.HvB,{scope:{useCancel:()=>({run(){t()}}),useSaveValues:()=>{let e=(0,y.VB)(),{t:n}=(0,c.useTranslation)(),r=(0,w.useForm)();return{async run(){var i,s;await r.submit();let c=new FormData;c.append("file",null==(s=r.values.uploadFile)||null==(i=s[0])?void 0:i.originFileObj),(null==o?void 0:o.packageName)&&c.append("packageName",o.packageName),await e.request({url:`pm:${a?"update":"add"}`,method:"post",data:c}),u.Modal.info({icon:null,width:520,content:(0,l.jsx)(u.Result,{icon:(0,l.jsx)(d.LoadingOutlined,{}),title:n("Plugin uploading"),subTitle:n("Plugin is uploading, please wait...")}),footer:null}),t(!0),setInterval(function(){e.silent().request({url:"__health_check",method:"get"}).then(e=>{(null==e?void 0:e.data)==="ok"&&window.location.reload()}).catch(e=>{})},1e3)}}}},schema:i})},I=e=>{let{onClose:t,pluginData:o,isUpgrade:a}=e,{message:r}=u.App.useApp(),i=(0,n.useMemo)(()=>({type:"object",properties:{[(0,F.uid)()]:{"x-decorator":"Form","x-component":"div",type:"void","x-decorator-props":{useValues:"{{ useValuesFromProps }}"},properties:{compressedFileUrl:{type:"string","x-decorator":"FormItem","x-component":"Input",required:!0},footer:{type:"void","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{justifyContent:"right"}},properties:{cancel:{title:"Cancel","x-component":"Action","x-component-props":{useAction:"{{ useCancel }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useSaveValues }}"}}}}}}}}),[]);return(0,l.jsx)(h.HvB,{scope:{useCancel:()=>({run(){t()}}),useValuesFromProps:e=>(0,y.bP)(()=>Promise.resolve({data:{compressedFileUrl:o.compressedFileUrl}}),e),useSaveValues:()=>{let e=(0,y.VB)(),{t:l}=(0,c.useTranslation)(),n=(0,w.useForm)();return{async run(){let l=n.values.compressedFileUrl;if(!l)return;await n.submit();let r={compressedFileUrl:l};(null==o?void 0:o.packageName)&&(r.packageName=o.packageName),e.request({url:`pm:${a?"update":"add"}`,method:"post",data:r}),t(!0)}}}},schema:i})},T=e=>{let{onClose:t,isShow:o,pluginData:a}=e,{t:r}=(0,c.useTranslation)(),{theme:i}=C(),[s,d]=(0,n.useState)("npm");return(0,l.jsxs)(u.Modal,{onCancel:()=>t(),footer:null,destroyOnClose:!0,title:r("Update plugin"),width:580,open:o,children:[(0,l.jsx)("div",{style:{marginTop:i.marginLG,marginBottom:i.marginLG},children:(0,l.jsxs)(u.Radio.Group,{optionType:"button",defaultValue:s,onChange:e=>d(e.target.value),children:[(0,l.jsx)(u.Radio,{value:"npm",children:r("Npm package")}),(0,l.jsx)(u.Radio,{value:"upload",children:r("Upload plugin")}),(0,l.jsx)(u.Radio,{value:"url",children:r("Compressed file url")})]})}),"npm"===s&&(0,l.jsx)(P,{isUpgrade:!0,onClose:t,pluginData:a}),"upload"===s&&(0,l.jsx)(A,{isUpgrade:!0,onClose:t,pluginData:a}),"url"===s&&(0,l.jsx)(I,{isUpgrade:!0,onClose:t,pluginData:a})]})};function D(e){let{data:t,onClick:o}=e,i=(0,r.nm)(),{name:s,displayName:p,isCompatible:m,packageName:h,updatable:x,builtIn:v,enabled:_,removable:f,description:g,error:k,homepage:M}=t,{styles:w,theme:F}=C(),P=(0,a.useNavigate)(),{t:j}=(0,c.useTranslation)(),A=(0,y.VB)(),{modal:I}=u.App.useApp(),[D,L]=(0,n.useState)(!1),Y=p||s||h;return(0,l.jsxs)(l.Fragment,{children:[D&&(0,l.jsx)(T,{isShow:D,pluginData:t,onClose:e=>{L(!1)}}),(0,l.jsx)(u.Card,{role:"button","aria-label":Y,size:"small",variant:"borderless",onClick:()=>{k||o()},styles:{body:{paddingTop:10},header:{border:"none",minHeight:"inherit",paddingTop:14}},title:(0,l.jsxs)(u.Space,{children:[k?(0,l.jsx)(u.Tooltip,{title:j("Plugin loading failed. Please check the server logs."),children:(0,l.jsx)(u.Typography.Text,{type:"danger",children:(0,l.jsx)(d.CloseCircleFilled,{})})}):null,m?null:(0,l.jsx)(u.Tooltip,{title:j("Plugin dependencies check failed"),children:(0,l.jsx)(u.Typography.Text,{type:"warning",children:(0,l.jsx)(d.WarningFilled,{})})}),(0,l.jsx)("div",{children:Y})]}),hoverable:!0,className:(0,b.css)`
218
+ `,k={token:{colorSplit:"rgba(255, 255, 255, 0.1)"}},C=d.default.memo(e=>{let{allowAll:t,snippets:o}=(0,u.v6)(),a=(0,d.useContext)(l.PinnedPluginListContext),{components:p}=(0,d.useContext)(r.SchemaOptionsContext);return(0,n.jsxs)("div",{className:S,children:[(0,n.jsx)("div",{onClick:e.onClick,children:(0,l.getPinnedPluginListKeys)(a.items).filter(e=>{var l;let n;return n=null==(l=a.items[e])?void 0:l.snippet,t||"*"===n||(null==o?void 0:o.includes(n))}).map(e=>{var t;let o=null==(t=a.items[e])?void 0:t.component;if(!o)return null;if("string"!=typeof o)return(0,n.jsx)(o,{},e);let l=(0,s.default)(p,o);return l?(0,n.jsx)(l,{},e):null})}),(0,n.jsx)(i.ConfigProvider,{theme:k,children:(0,n.jsx)(i.Divider,{type:"vertical"})}),(0,n.jsx)(b,{},"help"),(0,n.jsx)(c.v,{})]})});C.displayName="PinnedPluginList";var M=o(83468);class w extends M.k{async load(){this.app.use(y,this.options.config)}}},76028(e,t,o){o.d(t,{Q7:()=>G,wj:()=>_,C_:()=>E,X1:()=>v,R0:()=>B,V_:()=>W,dj:()=>K,WS:()=>H});var l=o(71178),n=o(51649),a=o(38356),r=o(17157),i=o(83468),s=o(86393),d=o(82113),u=o(52793),c=o(77843),p=o(41906),m=o(7819),h=o(82924),x=o(49948);let v=()=>{let{t:e}=(0,c.useTranslation)(),t=(0,r.vx)(),{token:o}=(0,x.K)(),{isMobileLayout:n}=(0,m.mY)();return n?null:(0,l.jsx)(u.Tooltip,{title:e("Plugin manager"),children:(0,l.jsx)(u.Button,{"data-testid":"plugin-manager-button",icon:(0,l.jsx)(d.ApiOutlined,{style:{color:o.colorTextHeaderMenu}}),title:e("Plugin manager"),onClick:()=>{t("/admin/pm/list")}})})},_=()=>{let e=(0,h.lum)(),{t}=(0,c.useTranslation)(),{token:o}=(0,x.K)(),i=(0,r.nm)(),{snippets:s=[]}=(0,p.v6)(),v=(0,n.useMemo)(()=>{let o=i.pluginSettingsManager.getList(),n=o.filter(e=>e.isPinned&&!e.hidden&&!1!==e.isTopLevel).map(t=>({key:t.name,icon:t.icon,label:t.link?(0,l.jsx)("div",{onClick:()=>window.open(t.link),children:e(t.title)}):(0,l.jsx)(a.Link,{to:t.path,children:e(t.title)})})),r=o.filter(e=>!e.isPinned&&!e.hidden&&!1!==e.isTopLevel).map(t=>({key:t.name,icon:t.icon,label:t.link?(0,l.jsx)("div",{onClick:()=>window.open(t.link),children:e(t.title)}):(0,l.jsx)(a.Link,{to:t.path,children:e(t.title)})}));return[s.includes("pm")&&{key:"plugin-manager",icon:(0,l.jsx)(d.ApiOutlined,{}),label:(0,l.jsx)(a.Link,{to:"/admin/settings/plugin-manager",children:t("Plugin manager")})},s.includes("pm")&&{type:"divider"},...n,{type:"divider"},...r].filter(Boolean)},[i,t]);(0,n.useEffect)(()=>()=>{i.pluginSettingsManager.clearCache()},[i.pluginSettingsManager]);let{isMobileLayout:_}=(0,m.mY)();return _?null:(0,l.jsx)(u.Dropdown,{menu:{style:{maxHeight:"70vh",overflow:"auto"},items:v},children:(0,l.jsx)(u.Button,{"data-testid":"plugin-settings-button",icon:(0,l.jsx)(d.SettingOutlined,{style:{color:o.colorTextHeaderMenu}})})})};var f=o(71883),g=o(77583),b=o(10691),y=o(16211),S=o(94046),k=o(91815);let C=(0,o(76821).createStyles)(e=>{let{token:t}=e;return{cardActionDisabled:{color:t.colorTextDisabled,cursor:"not-allowed"},pageHeader:{backgroundColor:t.colorBgContainer,paddingTop:t.paddingSM,paddingBottom:0,paddingInline:t.paddingLG,".ant-page-header-footer":{marginBlockStart:"0"},"& .ant-tabs-nav":{marginBottom:0},".ant-page-header-heading-title":{color:t.colorText}},pageContent:{margin:t.marginLG},PluginDetailBaseInfo:{display:"flex",flexDirection:"column",marginBottom:t.margin},PluginDocument:{background:t.colorBgContainer,padding:t.paddingLG,height:"60vh",overflowY:"auto"},avatar:{".ant-card-meta-avatar":{marginTop:"8px",".ant-avatar":{borderRadius:"2px"}}},version:{display:"block",color:t.colorTextDescription,fontWeight:"normal",fontSize:t.fontSize}}});k.default.extend(eR.default);let M=e=>{var t,o,a,r,i,s,d,p;let{plugin:m,onCancel:h}=e,{t:x}=(0,c.useTranslation)(),v=(0,n.useMemo)(()=>[{title:x("Name"),dataIndex:"name",key:"name"},{title:x("Version range"),dataIndex:"versionRange",key:"versionRange"},{title:x("Plugin's version"),dataIndex:"packageVersion",key:"packageVersion"},{title:x("Result"),dataIndex:"result",key:"result",render:e=>(0,l.jsx)(u.Tag,{color:e?"success":"error",children:e?"Yes":"No"})}],[x]),{data:_,loading:f}=(0,y.bP)({url:"pm:get",params:{filterByTk:m.name}},{refreshDeps:[m.name],ready:!!m.name}),g=(0,n.useMemo)(()=>{var e,t,o;if(!(null==_||null==(t=_.data)||null==(e=t.packageJson)?void 0:e.repository))return null;let l=null==_||null==(o=_.data)?void 0:o.packageJson.repository;return("string"==typeof l?l:l.url).replace(/\.git$/,"").replace(/^git\+/,"")},[_]),b=(0,n.useMemo)(()=>{var e;let t=null==_||null==(e=_.data)?void 0:e.packageJson.author;return t?"string"==typeof t?t:t.name:null},[_]),{styles:S,theme:k}=C(),M=[{key:"readme",label:x("Readme"),children:(0,l.jsxs)(u.Row,{gutter:20,children:[m.name&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Name")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:m.name})]})}),m.displayName&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("DisplayName")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:m.displayName})]})}),(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("PackageName")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:m.packageName})]})}),g&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Repository")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:g})]})}),(null==_||null==(t=_.data)?void 0:t.homepage)&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Homepage")}),(0,l.jsx)("a",{href:null==_||null==(o=_.data)?void 0:o.homepage,target:"_blank",rel:"noreferrer",children:null==_||null==(a=_.data)?void 0:a.homepage})]})}),m.description&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Description")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:m.description})]})}),(null==_||null==(r=_.data)?void 0:r.packageJson.license)&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("License")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:null==_||null==(i=_.data)?void 0:i.packageJson.license})]})}),b&&(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Author")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:b})]})}),(0,l.jsx)(u.Col,{span:24,children:(0,l.jsxs)("div",{className:S.PluginDetailBaseInfo,children:[(0,l.jsx)(u.Typography.Text,{type:"secondary",children:x("Version")}),(0,l.jsx)(u.Typography.Text,{strong:!0,children:null==m?void 0:m.version})]})})]})},{key:"dependencies",label:x("Dependencies compatibility check"),children:(0,l.jsx)(l.Fragment,{children:(null==_||null==(s=_.data)?void 0:s.depsCompatible)===!1?(0,l.jsx)(u.Typography.Text,{type:"danger",children:x("`dist/externalVersion.js` not found or failed to `require`. Please rebuild this plugin.")}):(0,l.jsxs)(l.Fragment,{children:[!(null==_||null==(d=_.data)?void 0:d.isCompatible)&&(0,l.jsx)(u.Alert,{showIcon:!0,type:"error",message:x("Plugin dependencies check failed, you should change the dependent version to meet the version requirements.")}),(0,l.jsx)(u.Table,{style:{marginTop:k.margin},rowKey:"name",pagination:!1,columns:v,dataSource:null==_||null==(p=_.data)?void 0:p.depsCompatible})]})})}];return(0,l.jsx)(u.Modal,{open:!!m,footer:!1,destroyOnClose:!0,width:600,onCancel:h,children:f?(0,l.jsx)(u.Spin,{}):m&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.Typography.Title,{level:3,children:m.packageName}),(0,l.jsx)(u.Space,{split:(0,l.jsx)("span",{children:"\xa0•\xa0"}),children:(0,l.jsx)("span",{children:m.version})}),(0,l.jsx)(u.Tabs,{style:{minHeight:"50vh"},items:M,defaultActiveKey:m.isCompatible?void 0:"dependencies"})]})})};var w=o(56920),F=o(27404);let P=e=>{let{onClose:t,isUpgrade:o,pluginData:a}=e,{message:r}=u.App.useApp(),i=(0,n.useMemo)(()=>{let e=(0,F.uid)(),t={type:"object",properties:{[e]:{"x-decorator":"Form","x-component":"div",type:"void","x-decorator-props":{useValues:"{{ useValuesFromProps }}"},properties:{packageName:{type:"string",title:"{{t('Npm package name')}}","x-decorator":"FormItem","x-component":"Input",required:!0,"x-component-props":{disabled:!0}},registry:{type:"string",title:"{{t('Registry url')}}",default:"https://registry.npmjs.org/","x-decorator":"FormItem","x-component":"Input","x-decorator-props":{tooltip:"Example: https://registry.npmjs.org/"}},authToken:{type:"string",title:"{{t('Npm authToken')}}","x-decorator":"FormItem","x-component":"Input"},version:{type:"string",title:"{{t('Version')}}","x-decorator":"FormItem","x-component":"Input"},footer:{type:"void","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{justifyContent:"right"}},properties:{cancel:{title:"Cancel","x-component":"Action","x-component-props":{useAction:"{{ useCancel }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useSaveValues }}"}}}}}}}};return t.properties[e].properties.packageName["x-component-props"].disabled=o,o||delete t.properties[e].properties.version,t},[o]);return(0,l.jsx)(h.HvB,{scope:{useCancel:()=>({run(){t()}}),useSaveValues:()=>{let e=(0,y.VB)(),{t:l}=(0,c.useTranslation)(),n=(0,w.useForm)();return{async run(){await n.submit(),e.request({url:o?"pm:update":"pm:add",method:"post",data:{...n.values}}),t(!0)}}},versionList:[],useValuesFromProps:e=>(0,y.bP)(()=>Promise.resolve({data:o?(0,g.pick)(a,["name","packageName","version"]):{}}),e)},schema:i})};P.displayName="PluginNpmForm";let{confirm:j}=u.Modal,A=e=>{let{onClose:t,pluginData:o,isUpgrade:a}=e,{message:r}=u.App.useApp(),i=(0,n.useMemo)(()=>({type:"object",properties:{[(0,F.uid)()]:{"x-decorator":"Form","x-component":"div",type:"void",properties:{uploadFile:{type:"string","x-decorator":"FormItem","x-component":"Upload.Dragger",required:!0,"x-component-props":{action:"",multiple:!1,maxCount:1,height:"150px",tipContent:"{{t('Drag and drop the file here or click to upload, file size should not exceed 30M')}}",beforeUpload:e=>(/\.(zip|rar|tar|gz|bz2|tgz)$/.test(e.name)||r.error("File only support zip, rar, tar, gz, bz2!"),e.size/1024/1024<30||r.error("File must smaller than 30MB!"),!1)}},footer:{type:"void","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{justifyContent:"right"}},properties:{cancel:{title:"Cancel","x-component":"Action","x-component-props":{useAction:"{{ useCancel }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useSaveValues }}"}}}}}}}}),[r]);return(0,l.jsx)(h.HvB,{scope:{useCancel:()=>({run(){t()}}),useSaveValues:()=>{let e=(0,y.VB)(),{t:n}=(0,c.useTranslation)(),r=(0,w.useForm)();return{async run(){var i,s;await r.submit();let c=new FormData;c.append("file",null==(s=r.values.uploadFile)||null==(i=s[0])?void 0:i.originFileObj),(null==o?void 0:o.packageName)&&c.append("packageName",o.packageName),await e.request({url:`pm:${a?"update":"add"}`,method:"post",data:c}),u.Modal.info({icon:null,width:520,content:(0,l.jsx)(u.Result,{icon:(0,l.jsx)(d.LoadingOutlined,{}),title:n("Plugin uploading"),subTitle:n("Plugin is uploading, please wait...")}),footer:null}),t(!0),setInterval(function(){e.silent().request({url:"__health_check",method:"get"}).then(e=>{(null==e?void 0:e.data)==="ok"&&window.location.reload()}).catch(e=>{})},1e3)}}}},schema:i})},I=e=>{let{onClose:t,pluginData:o,isUpgrade:a}=e,{message:r}=u.App.useApp(),i=(0,n.useMemo)(()=>({type:"object",properties:{[(0,F.uid)()]:{"x-decorator":"Form","x-component":"div",type:"void","x-decorator-props":{useValues:"{{ useValuesFromProps }}"},properties:{compressedFileUrl:{type:"string","x-decorator":"FormItem","x-component":"Input",required:!0},footer:{type:"void","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{justifyContent:"right"}},properties:{cancel:{title:"Cancel","x-component":"Action","x-component-props":{useAction:"{{ useCancel }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useSaveValues }}"}}}}}}}}),[]);return(0,l.jsx)(h.HvB,{scope:{useCancel:()=>({run(){t()}}),useValuesFromProps:e=>(0,y.bP)(()=>Promise.resolve({data:{compressedFileUrl:o.compressedFileUrl}}),e),useSaveValues:()=>{let e=(0,y.VB)(),{t:l}=(0,c.useTranslation)(),n=(0,w.useForm)();return{async run(){let l=n.values.compressedFileUrl;if(!l)return;await n.submit();let r={compressedFileUrl:l};(null==o?void 0:o.packageName)&&(r.packageName=o.packageName),e.request({url:`pm:${a?"update":"add"}`,method:"post",data:r}),t(!0)}}}},schema:i})},T=e=>{let{onClose:t,isShow:o,pluginData:a}=e,{t:r}=(0,c.useTranslation)(),{theme:i}=C(),[s,d]=(0,n.useState)("npm");return(0,l.jsxs)(u.Modal,{onCancel:()=>t(),footer:null,destroyOnClose:!0,title:r("Update plugin"),width:580,open:o,children:[(0,l.jsx)("div",{style:{marginTop:i.marginLG,marginBottom:i.marginLG},children:(0,l.jsxs)(u.Radio.Group,{optionType:"button",defaultValue:s,onChange:e=>d(e.target.value),children:[(0,l.jsx)(u.Radio,{value:"npm",children:r("Npm package")}),(0,l.jsx)(u.Radio,{value:"upload",children:r("Upload plugin")}),(0,l.jsx)(u.Radio,{value:"url",children:r("Compressed file url")})]})}),"npm"===s&&(0,l.jsx)(P,{isUpgrade:!0,onClose:t,pluginData:a}),"upload"===s&&(0,l.jsx)(A,{isUpgrade:!0,onClose:t,pluginData:a}),"url"===s&&(0,l.jsx)(I,{isUpgrade:!0,onClose:t,pluginData:a})]})};function D(e){let{data:t,onClick:o}=e,i=(0,r.nm)(),{name:s,displayName:p,isCompatible:m,packageName:h,updatable:x,builtIn:v,enabled:_,removable:f,description:g,error:k,homepage:M}=t,{styles:w,theme:F}=C(),P=(0,a.useNavigate)(),{t:j}=(0,c.useTranslation)(),A=(0,y.VB)(),{modal:I}=u.App.useApp(),[D,L]=(0,n.useState)(!1),Y=p||s||h;return(0,l.jsxs)(l.Fragment,{children:[D&&(0,l.jsx)(T,{isShow:D,pluginData:t,onClose:e=>{L(!1)}}),(0,l.jsx)(u.Card,{role:"button","aria-label":Y,size:"small",variant:"borderless",onClick:()=>{k||o()},styles:{body:{paddingTop:10},header:{border:"none",minHeight:"inherit",paddingTop:14}},title:(0,l.jsxs)(u.Space,{children:[k?(0,l.jsx)(u.Tooltip,{title:j("Plugin loading failed. Please check the server logs."),children:(0,l.jsx)(u.Typography.Text,{type:"danger",children:(0,l.jsx)(d.CloseCircleFilled,{})})}):null,m?null:(0,l.jsx)(u.Tooltip,{title:j("Plugin dependencies check failed"),children:(0,l.jsx)(u.Typography.Text,{type:"warning",children:(0,l.jsx)(d.WarningFilled,{})})}),(0,l.jsx)("div",{children:Y})]}),hoverable:!0,className:(0,b.css)`
219
219
  display: flex;
220
220
  flex-direction: column;
221
221
 
@@ -291,7 +291,7 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
291
291
  line-height: 12px;
292
292
  white-space: nowrap;
293
293
  text-overflow: ellipsis;
294
- `,style:{cursor:"pointer",padding:"16px",color:e.colorTextHeaderMenu},children:(0,l.jsx)(n.UserOutlined,{})})})};function s(){let{render:e}=(0,r.useSchemaSettingsRender)("userCenterSettings");return(0,l.jsx)("div",{style:{display:"inline-block"},children:e()})}},59099(e,t,o){o.d(t,{A:()=>l});let l=(e,t)=>null!=e&&(0!==e&&"0"!==e||!!t)},90236(e,t,o){o.d(t,{Ui:()=>tp,nr:()=>h.nr,Uc:()=>es,yb:()=>h.yb,PR:()=>m.PR,K7:()=>h.K7,Y:()=>m.Y,dI:()=>h.dI,xF:()=>ek,q2:()=>x.q,NC:()=>tm,Y4:()=>b,NH:()=>tc.N,A1:()=>a.LayoutContent,mY:()=>a.useMobileLayout,X7:()=>eA,bl:()=>v.bl,sj:()=>v.sj});var l=o(71178),n=o(504),a=o(13975),r=o(51649),i=o(52793),s=o(38356),d=o(41897),u=o(85162),c=o(43353),p=o(82924);o(67285);var m=o(79647),h=o(55976),x=o(6821),v=o(40657);let _=e=>(0,a.getAdminLayoutModel)(e,{required:!0}),f=e=>(0,c.RH)()?(0,l.jsx)(i.Spin,{style:{width:"100%",marginTop:20},delay:void 0}):(0,l.jsx)(a.FlowRoute,{...e,getLayoutModel:_}),g=e=>{let{uid:t,allAccessRoutes:o}=e,{active:n}=(0,m.Y)(),a=(0,v.bl)(t,o);return(null==a?void 0:a.type)===x.q.flowPage?(0,l.jsx)(f,{pageUid:t,active:n}):(0,l.jsx)(p.DYS,{uid:t})},b=()=>{let e=(0,d.es)(),{allAccessRoutes:t}=(0,h.nr)();return((()=>{let e=(0,n.useFlowEngine)(),t=(0,s.useLocation)(),o=(0,s.useParams)(),{name:l,tabUid:i}=o,d=o["*"],u=(0,r.useRef)(0),c=(0,r.useMemo)(()=>({name:l,tabUid:i,"*":d}),[l,i,d]),p=(0,r.useMemo)(()=>({name:i?"admin.page.tab":"admin.page",pathname:t.pathname,params:c,layoutRouteName:"admin",layoutBasePathname:"/admin"}),[t.pathname,c,i]);(0,r.useEffect)(()=>{let t=++u.current,o=(0,a.getAdminLayoutModel)(e,{required:!1});if(o&&l)return o.syncLayoutRoute(p),()=>{Promise.resolve().then(()=>{u.current===t&&o.clearLayoutRoute(p)}).catch(()=>{})}},[e,l,p])})(),(0,v.IZ)(e,t))?null:e&&!(0,v.bl)(e,t)?(0,l.jsx)(u.b,{}):(0,l.jsx)(m.PR,{uid:e,children:e=>(0,l.jsx)(d.MR.Provider,{value:e,children:(0,l.jsx)(h.yb,{uid:e,children:(0,l.jsx)(g,{uid:e,allAccessRoutes:t})})})})};var y=o(44374),S=o(83468),k=o(63526),C=o(82113),M=o(42966),w=o(60430),F=o(59099);let P=e=>{let{isMobile:t,closeMobileMenu:o,callback:l,delayMs:n=220}=e;t?(o(),window.setTimeout(l,n)):l()};var j=o(79980);let A=e=>{let{theme:t}=(0,j.my)();return(0,l.jsx)(i.ConfigProvider,{theme:{...t,inherit:!1},children:e.children})};var I=o(73761),T=o(7775),D=o(60070),L=o(38957),Y=o(52973),R=o(76460),B=o(59896),N=o(14612);let E=(e,t)=>(0,D.J)(e);function $(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.origin;return e?(0,k.isURL)(e)?e:e.startsWith("/")?`${t}${e}`:`${t}/${e}`:""}let z=(e,t)=>`/admin/__admin_layout__/${e}/${encodeURIComponent(String(t))}`,O={display:"flex",alignItems:"center",justifyContent:"space-between"},q=[{pattern:/^\$user(?:\.(.+))?$/,resolve:e=>`ctx.user${e[1]?`.${e[1]}`:""}`},{pattern:/^currentUser(?:\.(.+))?$/,resolve:e=>`ctx.user${e[1]?`.${e[1]}`:""}`},{pattern:/^\$nRole$/,resolve:()=>"ctx.role"},{pattern:/^\$nToken$/,resolve:()=>"ctx.token"},{pattern:/^\$nURLSearchParams(?:\.(.+))?$/,resolve:e=>`ctx.urlSearchParams${e[1]?`.${e[1]}`:""}`}],H=e=>"string"==typeof e&&e.includes("{{")?e.replace(/\{\{\s*([\s\S]*?)\s*\}\}/g,(e,t)=>{let o=String(t||"").trim();for(let e of q){let t=o.match(e.pattern);if(t)return`{{ ${e.resolve(t)} }}`}return e}):e,V=async e=>{let{context:t,href:o,params:l=[]}=e,n="string"==typeof o?H(o):o,a=await t.resolveJsonTemplate(n),r={};for(let{name:e,value:o}of l)if(e)try{let l="string"==typeof o?await t.resolveJsonTemplate(H(o)):o;if(null==l)continue;r[e]=(0,I.reduceValueSize)(l)}catch(e){console.error(e)}return(0,I.appendQueryStringToUrl)(String(a??o??""),M.default.stringify(r))},U=async e=>{let{context:t,href:o,params:l,openInNewWindow:n,isMobile:a,closeMobileMenu:r,navigate:i,basenameOfCurrentRouter:s}=e;try{let e=await V({context:t,href:o,params:l||[]});if(!1!==n){a&&r(),window.open(e,"_blank","noopener,noreferrer");return}P({isMobile:!!a,closeMobileMenu:r,callback:()=>{!function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.origin;"string"!=typeof e?console.error("link should be a string"):(0,k.isURL)(e)?e.startsWith(o)?t($(e.replace(o,""),"")):window.open(e,"_self"):t($(e,""))}(e,i,window.location.origin+s)}})}catch(e){console.error(e),a&&r(),window.open(o,"_blank","noopener,noreferrer")}},G=e=>!!e&&"function"==typeof e.getRoute,K=(e,t)=>"function"==typeof e.context.t?e.context.t(t):t,W=[{key:"group",label:"Group",menuType:"group"},{key:"page",label:"Classic page (v1)",menuType:"page"},{key:"flow-page",label:"Modern page (v2)",menuType:"flowPage"},{key:"link",label:"Link",menuType:"link"}],J=e=>{var t,o;let a;return(0,l.jsx)(n.AddSubModelButton,{model:e.launcherModel,subModelKey:"menuItems",items:(t=e.launcherModel,a=(o=e.parentRoute)?"sider":"header",W.map(e=>({key:e.key,label:K(t,e.label),createModelOptions:()=>{let l;return l={menuType:e.menuType,source:a,parentRoute:o},{uid:`${t.uid}-menu-creation-${(0,k.uid)()}`,use:"AdminLayoutMenuItemModel",props:{creationMeta:l}}}}))),children:(0,l.jsx)(n.FlowSettingsButton,{"data-testid":e.testId,style:{background:"none"},icon:(0,l.jsx)(C.PlusOutlined,{}),children:K(e.launcherModel,"Add menu item")})})},X=e=>e.icon?(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,l.jsx)(w.In,{type:e.icon}),(0,l.jsx)("span",{children:e.title})]}):(0,l.jsx)(l.Fragment,{children:e.title}),Z=(0,T.L)(e=>(0,l.jsx)(l.Fragment,{children:e.children})),Q=r.default.createContext({closeMobileMenu:()=>{}}),ee=r.default.createContext({inHeader:!1}),et=(e,t,o)=>{var l;let[n,a]=(null==e||null==(l=e.split)?void 0:l.call(e,"||"))||[],r=[{label:o("Before"),value:"beforeBegin"},{label:o("After"),value:"afterEnd"}];return a!==x.q.group?r:[...r,{label:o("Inner"),value:"beforeEnd",disabled:void 0!==t&&String(t)===n}]};function eo(e,t,o){let l=[...e.subModels.menuItems||[]],n=new Map(l.map(e=>[e.uid,e])),a=[],r=new Set;t.forEach((t,l)=>{var i,s;let d,u=(i=e.uid,d=t.id??t.schemaUid??t.menuSchemaUid??t.pageSchemaUid??t.title??`${t.type}-${l}`,`${i}-menu-item-${t.type||"unknown"}-${d}`),c=n.get(u),p=!!c;c||(c=e.addSubModel("menuItems",{uid:u,use:"AdminLayoutMenuItemModel",props:{route:t,parentRoute:o}})),c.sortIndex=l+1,p&&(null==(s=c.syncFromRoute)||s.call(c,t,o)),a.push(c),r.add(u)}),l.forEach(t=>{r.has(t.uid)||e.flowEngine.removeModelWithSubModels(t.uid)}),e.subModels.menuItems=a}let el=e=>{var t,o,n,a,r,s,d,u,c,p;let{item:m}=e,x=E(null==(o=m._route.options)||null==(t=o.badge)?void 0:t.count,null==(n=m._model)?void 0:n.context),v=(0,F.A)(x,null==(r=m._route.options)||null==(a=r.badge)?void 0:a.showZero),_="string"==typeof m.name||"number"==typeof m.name?String(m.name):"string"==typeof(null==(s=m._route)?void 0:s.title)||"number"==typeof(null==(d=m._route)?void 0:d.title)?String(m._route.title):void 0;return(0,l.jsx)(N.Zy.Provider,{value:m._parentRoute,children:(0,l.jsx)(h.dI.Provider,{value:m._route,children:(0,l.jsxs)("div",{"aria-label":_,role:"none",style:O,children:[e.children,v&&(0,l.jsx)(i.Badge,{...null==(u=m._route.options)?void 0:u.badge,count:x,style:{marginLeft:4,color:null==(p=m._route.options)||null==(c=p.badge)?void 0:c.textColor,maxWidth:"10em"},dot:!1})]})})})},en=e=>{let{inHeader:t}=(0,r.useContext)(ee);return e.hidden||t?e.children:(0,l.jsx)(i.Tooltip,{title:e.title,placement:"right",children:e.badgeProps?(0,l.jsx)(i.Badge,{...e.badgeProps,style:{transform:"none",maxWidth:"10em"},dot:!1,children:e.children}):e.children})},ea=e=>{var t,o,n,a,u,c,p,m,v,_,f,g,b,y,S;let{item:k}=e,C=(0,s.useLocation)(),M=E(null==(o=k._route.options)||null==(t=o.badge)?void 0:t.count,null==(n=k._model)?void 0:n.context),w=(0,d.vx)(),j=(0,d.$y)(),{closeMobileMenu:A}=(0,r.useContext)(Q),I=k.redirect||k.path,T=(0,F.A)(M,null==(u=k._route.options)||null==(a=u.badge)?void 0:a.showZero),D={...null==(c=k._route.options)?void 0:c.badge,count:M},L=(0,r.useCallback)(async t=>{var o,l,n,a,r;let i=null==(o=k._route.options)?void 0:o.href,s=null==(l=k._route.options)?void 0:l.params,d=null==(n=k._route.options)?void 0:n.openInNewWindow;t.preventDefault(),t.stopPropagation(),await U({context:null==(a=k._model)?void 0:a.context,href:i,params:s,openInNewWindow:d,isMobile:!!(null==(r=e.options)?void 0:r.isMobile),closeMobileMenu:A,navigate:w,basenameOfCurrentRouter:j})},[k,null==(p=e.options)?void 0:p.isMobile,A,w,j]),Y=(0,r.useCallback)(t=>{var o,l;(t.preventDefault(),t.stopPropagation(),null==(o=e.options)?void 0:o.isMobile)?P({isMobile:!!(null==(l=e.options)?void 0:l.isMobile),closeMobileMenu:A,callback:()=>{w(I)}}):w(I)},[null==(m=e.options)?void 0:m.isMobile,A,w,I]);return(null==(v=k._route)?void 0:v.type)===x.q.link?(0,l.jsx)(N.Zy.Provider,{value:k._parentRoute,children:(0,l.jsx)(h.dI.Provider,{value:k._route,children:(0,l.jsxs)("div",{role:"none",style:O,children:[(0,l.jsx)("div",{onClick:L,children:(0,l.jsx)(s.Link,{to:C.pathname,"aria-label":"string"==typeof k.name?k.name:void 0,children:e.children})}),T&&(0,l.jsx)(i.Badge,{...null==(b=k._route.options)?void 0:b.badge,count:M,style:{marginLeft:4,color:null==(S=k._route.options)||null==(y=S.badge)?void 0:y.textColor,maxWidth:"10em"},dot:!1})]})})}):(0,l.jsx)(N.Zy.Provider,{value:k._parentRoute,children:(0,l.jsx)(h.dI.Provider,{value:k._route,children:(0,l.jsxs)("div",{role:"none",style:O,children:[(0,l.jsx)(en,{title:k.name,hidden:k._route.type===x.q.group||(k._depth||0)>0||!(null==(_=e.options)?void 0:_.collapsed),badgeProps:T?D:null,children:(0,l.jsx)(s.Link,{to:I,"aria-label":"string"==typeof k.name?k.name:void 0,onClick:Y,children:e.children})}),T&&(0,l.jsx)(i.Badge,{...D,style:{marginLeft:4,color:null==(g=k._route.options)||null==(f=g.badge)?void 0:f.textColor,maxWidth:"10em"},dot:!1})]})})})},er=e=>{var t;let{model:o}=e;if(!G(o))return null;let a=null==(t=o.getRoute)?void 0:t.call(o);return(null==a?void 0:a.id)?(0,l.jsx)(n.DragHandler,{model:o}):null},ei=e=>{var t;let{item:o,dom:n,options:a,renderType:r}=e;if(!o||!r)return null;let i=(0,l.jsx)(Z,{tooltip:null==(t=o._route)?void 0:t.tooltip,children:n});return"group"===r?(0,l.jsx)(R.j0,{scopeId:o._route.schemaUid,type:"groupItem",children:(0,l.jsx)(el,{item:o,children:i})}):(0,l.jsx)(R.j0,{scopeId:o._route.schemaUid,type:"menuItem",children:(0,l.jsx)(ea,{item:o,options:a,children:i})})},es=e=>{let{depth:t,isMobile:o}=e;return t>1||o&&t>0},ed=()=>(0,l.jsx)("span",{"data-nb-hidden-menu-item":"true"}),eu=(0,n.observer)(e=>{let{model:t,item:o,dom:a,renderType:i,options:s}=e,d=t.context.themeToken;return((0,r.useEffect)(()=>{t.setProps({item:o,dom:a,renderType:i,options:s})},[a,o,t,s,i]),!t.context.flowSettingsEnabled&&t.hidden)?(0,l.jsx)(ed,{}):(0,l.jsx)(A,{children:(0,l.jsx)(n.Droppable,{model:t,children:(0,l.jsx)(n.FlowModelRenderer,{model:t,showFlowSettings:{showBackground:!1,showBorder:!1,style:{left:-d.padding,right:-d.padding}},extraToolbarItems:[{key:"menu-drag-handler",component:er,sort:1}]})})})});function ec(e,t,o){let n=(null==o?void 0:o.id)??(null==o?void 0:o.schemaUid)??(null==o?void 0:o.menuSchemaUid)??(null==o?void 0:o.title)??t.uid;return{key:"x-designer-button",name:(0,l.jsx)(J,{testId:e,launcherModel:t,parentRoute:o}),path:z("designer",n),disabled:!0,_route:{},_parentRoute:o,_launcherModel:t,icon:(0,l.jsx)(w.In,{type:"setting"})}}let ep=e=>({href:{title:e("URL"),type:"string","x-decorator":"FormItem","x-component":"FlowSettingsVariableTextArea","x-component-props":{rows:1,maxRows:1},description:e("Do not concatenate search params in the URL")},params:{type:"array",title:e("Search parameters"),"x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{name:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:e("Name")}},value:{type:"string","x-decorator":"FormItem","x-component":"FlowSettingsVariableTextArea","x-component-props":{placeholder:e("Value"),rows:1,maxRows:1,useTypedConstant:!0,changeOnSelect:!0}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:e("Add parameter"),"x-component":"ArrayItems.Addition"}}},openInNewWindow:{type:"boolean","x-content":e("Open in new window"),"x-decorator":"FormItem","x-component":"Checkbox"}}),em=async(e,t)=>{await e.request({method:"POST",url:"/uiSchemas:insert",data:t})},eh=[{label:"Group",value:"group"},{label:"Classic page (v1)",value:"page"},{label:"Modern page (v2)",value:"flowPage"},{label:"Link",value:"link"}],ex=e=>({title:{title:e("Menu item title"),required:!0,"x-decorator":"FormItem","x-component":"Input"},icon:{title:e("Icon"),"x-decorator":"FormItem","x-component":"IconPicker"}}),ev=e=>({title:e.title,hideInSettings:e.hideInSettings,defaultParams:async()=>({menuType:"flowPage"}),uiSchema:async e=>{let t;return{menuType:{title:(t=e.t)("Menu type"),required:!0,enum:eh.map(e=>({label:t(e.label),value:e.value})),"x-decorator":"FormItem","x-component":"Radio.Group"},...ex(t),...Object.fromEntries(Object.entries(ep(t)).map(e=>{let[t,o]=e;return[t,{...o,"x-reactions":{dependencies:["menuType"],fulfill:{state:{hidden:'{{$deps[0] !== "link"}}'}}}}]}))}},beforeParamsSave:async(t,o)=>{let l=t.model,n=l.getRoute();if(!n||e.canCreate&&!e.canCreate(n))return;let a=e.resolveParentRoute(t,n);await l.createMenuFromMeta({menuType:o.menuType,source:"insert",insertPosition:e.insertPosition,targetRoute:n,parentRoute:a},o)}}),e_=async(e,t)=>Promise.all((e||[]).filter(e=>e.type!==x.q.tabs).map(async e=>{var o,l;return{label:"string"==typeof e.title&&(0,B.DZ)(e.title)?await (null==(o=t.resolveJsonTemplate)?void 0:o.call(t,e.title))??e.title:t.t(e.title),value:`${e.id}||${e.type}`,children:(null==(l=e.children)?void 0:l.length)?await e_(e.children,t):void 0}})),ef=(e,t)=>{if(t)for(let l=0;l<e.length;l++){var o;let n=e[l];if(n.id===t.id)return e[l-1];if(null==(o=n.children)?void 0:o.length){let e=ef(n.children,t);if(e)return e}}},eg=(e,t)=>{if(t)for(let l=0;l<e.length;l++){var o;let n=e[l];if(n.id===t.id)return e[l+1];if(null==(o=n.children)?void 0:o.length){let e=eg(n.children,t);if(e)return e}}},eb=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/";if(!e)return!1;let l=o&&"/"!==o?o.replace(/\/$/,""):"",n=l&&t.startsWith(l)?t.slice(l.length)||"/":t;return!![null!=e.id?`/admin/${e.id}`:null,e.schemaUid?`/admin/${e.schemaUid}`:null].filter(Boolean).some(e=>n===e||n.startsWith(`${e}/`))||!!Array.isArray(e.children)&&e.children.some(e=>eb(e,n,"/"))},ey={beforeBegin:"insertBefore",afterEnd:"insertAfter"},eS=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={...e};return delete t.item,delete t.dom,delete t.options,delete t.renderType,t};class ek extends n.FlowModel{onInit(e){super.onInit(e),this.syncFromRoute(this.props.route,this.props.parentRoute),this.shouldHydratePersistedState()&&this.hydratePersistedState()}syncFromRoute(e,t){(this.setProps({route:e,parentRoute:t}),(null==e?void 0:e.type)===x.q.group)?eo(this,Array.isArray(e.children)?e.children:[],e):((this.subModels.menuItems||[]).forEach(e=>{this.flowEngine.removeModelWithSubModels(e.uid)}),delete this.subModels.menuItems)}getRoute(){return this.props.route}getParentRoute(){return this.props.parentRoute}getCreationMeta(){return this.props.creationMeta}isCreationSession(){var e;return!!(null==(e=this.getCreationMeta())?void 0:e.menuType)}shouldHydratePersistedState(){return!this.isCreationSession()&&this.hasPersistedMenuInstanceFlowFlag()}async hydrateLegacyPersistedStateIfCurrentPath(e,t){return!!eb(this.getRoute(),e,t)&&(this.hasPersistedMenuInstanceFlowFlag()||await this.hydratePersistedState(),!0)}async openFlowSettings(e){return await this.hydratePersistedState(),await super.openFlowSettings(e)}getRouteRepository(){return this.context.routeRepository}hasPersistedMenuInstanceFlowFlag(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getRoute();return(null==t||null==(e=t.options)?void 0:e.hasPersistedMenuInstanceFlow)===!0}getCurrentPersistedInstanceFlowCount(){return this.flowRegistry.getFlows().size}hasPersistableMenuLinkageRules(){let e=this.getStepParams("menuSettings","linkageRules");return Array.isArray(null==e?void 0:e.value)&&e.value.length>0}hasCurrentPersistedMenuState(){return this.getCurrentPersistedInstanceFlowCount()>0||this.hasPersistableMenuLinkageRules()}buildRouteOptionsWithPersistedFlowFlag(e){let t=this.getRoute(),o={...(null==t?void 0:t.options)||{}};return e?o.hasPersistedMenuInstanceFlow=!0:delete o.hasPersistedMenuInstanceFlow,Object.keys(o).length>0?o:void 0}async syncPersistedFlowRouteFlag(){if(this.isCreationSession())return;let e=this.getRoute();if((null==e?void 0:e.id)==null)return;let t=this.hasCurrentPersistedMenuState();if(this.hasPersistedMenuInstanceFlowFlag(e)===t)return;let o=this.buildRouteOptionsWithPersistedFlowFlag(t);await this.getRouteRepository().updateRoute(e.id,{options:o}),this.setProps({route:{...e,options:o}})}async destroyPersistedState(){var e,t;this.isCreationSession()||await (null==(t=this.flowEngine.modelRepository)||null==(e=t.destroy)?void 0:e.call(t,this.uid))}async hydratePersistedState(){if(!this.persistedStateHydrated)return this.persistedStateHydrating||(this.persistedStateHydrating=(async()=>{if(this.isCreationSession())return;let e=!1,t=this.flowEngine.modelRepository;if(!(null==t?void 0:t.findOne))return;let o=await t.findOne({uid:this.uid});if(null==o?void 0:o.uid){if(o.stepParams&&"object"==typeof o.stepParams&&(this.setStepParams(o.stepParams),e=this.hasPersistableMenuLinkageRules()),o.flowRegistry&&"object"==typeof o.flowRegistry){for(let e of[...this.flowRegistry.getFlows().keys()])this.flowRegistry.removeFlow(e);this.flowRegistry.addFlows(o.flowRegistry);let t=Object.values(o.flowRegistry).some(e=>{var t;return!!e&&!0!==e.manual&&(!e.on||("string"==typeof e.on?"beforeRender"===e.on:(null==(t=e.on)?void 0:t.eventName)==="beforeRender"))});e=e||t}e&&this.rerender(),!this.hasPersistedMenuInstanceFlowFlag()&&this.hasCurrentPersistedMenuState()&&await this.syncPersistedFlowRouteFlag()}})().finally(()=>{this.persistedStateHydrated=!0,this.persistedStateHydrating=void 0})),await this.persistedStateHydrating}hasPersistableInstanceFlows(){var e;let t=this.flowRegistry.getFlows().size,o=Object.keys((null==(e=this._options)?void 0:e.flowRegistry)||{}).length;return t>0||o>0}serialize(){let e=super.serialize();return e.props=eS(e.props),e}setHidden(e){let t=this.hidden;if(super.setHidden(e),t!==this.hidden){var o,l,n,r;null==(n=(r=this.flowEngine).getModel)||null==(l=n.call(r,a.ADMIN_LAYOUT_MODEL_UID))||null==(o=l.refreshMenuRouteTree)||o.call(l)}}renderHiddenInConfig(){let{item:e,dom:t,options:o,renderType:n}=this.props;return e&&n?(0,l.jsx)("div",{style:{opacity:.3},children:(0,l.jsx)(ei,{item:e,dom:t,options:o,renderType:n})}):null}async insertRouteSchema(e){await em(this.context.api,e)}async createMenuRoute(e,t){let{parentId:o,refreshAfterMutation:l=!0}=t||{},n={...e,parentId:o??e.parentId??void 0},{data:a}=await this.getRouteRepository().createRoute(n,l?void 0:{refreshAfterMutation:!1});return null==a?void 0:a.data}async createRouteForInsert(e,t){var o;let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(null==(o=this.getCreationMeta())?void 0:o.targetRoute)||this.getRoute(),n=await this.createMenuRoute(e,{parentId:"beforeEnd"===t?(null==l?void 0:l.id)||void 0:(null==l?void 0:l.parentId)||void 0,refreshAfterMutation:!1}),a=ey[t];if(a){try{await this.getRouteRepository().moveRoute({sourceId:null==n?void 0:n.id,targetId:null==l?void 0:l.id,sortField:"sort",method:a})}catch(e){throw await this.getRouteRepository().refreshAccessible(),e}return null==n?void 0:n.id}return await this.getRouteRepository().refreshAccessible(),null==n?void 0:n.id}async createMenuFromMeta(e,t){let o,l="flowPage"===e.menuType?x.q.flowPage:"page"===e.menuType?x.q.page:"group"===e.menuType?x.q.group:x.q.link,n=async t=>{var o;return e.insertPosition?this.createRouteForInsert(t,e.insertPosition,e.targetRoute):this.createMenuRoute(t,{parentId:null==(o=e.parentRoute)?void 0:o.id})};if("group"===e.menuType)return void await n({type:l,title:t.title,icon:t.icon,schemaUid:(0,k.uid)()});if("link"===e.menuType)return void await n({type:l,title:t.title,icon:t.icon,schemaUid:(0,k.uid)(),options:{href:t.href,params:t.params,openInNewWindow:t.openInNewWindow}});let a=(0,k.uid)(),r=(0,k.uid)(),i=(0,k.uid)(),s=(0,k.uid)();await n({type:l,title:t.title,icon:t.icon,schemaUid:a,menuSchemaUid:r,enableTabs:!1,children:[{type:x.q.tabs,schemaUid:i,tabSchemaName:s,hidden:!0}]}),await this.insertRouteSchema((o=e.menuType,"flowPage"===o?(0,L.g)({pageSchemaUid:a}):(0,Y.my)({pageSchemaUid:a,tabSchemaUid:i,tabSchemaName:s})))}async persistMenuCreation(e){let t=this.getCreationMeta();t&&await this.createMenuFromMeta(t,e)}async updateMenuRoute(e){let t=this.getRoute();if((null==t?void 0:t.id)==null)return;let o={...e};e.options&&this.hasPersistedMenuInstanceFlowFlag(t)&&(o.options={...e.options,hasPersistedMenuInstanceFlow:!0}),await this.getRouteRepository().updateRoute(t.id,o),this.setProps({route:{...t,...o}})}async moveMenuRoute(e,t){var o,l,n,a,r;let i=this.getRoute(),[s,d]=(null==e||null==(o=e.split)?void 0:o.call(e,"||"))||[];if(s&&(null==i?void 0:i.id)!=null){if("beforeEnd"===t&&d!==x.q.group)throw Error((null==(n=this.context)||null==(l=n.t)?void 0:l.call(n,"Only groups support inner moves"))||"Only groups support inner moves");if("beforeEnd"===t&&String(i.id)===s)throw Error((null==(r=this.context)||null==(a=r.t)?void 0:a.call(r,"A menu group cannot be moved inside itself"))||"A menu group cannot be moved inside itself");await this.getRouteRepository().moveRoute({sourceId:i.id,sortField:"sort",method:"beforeEnd"===t?void 0:ey[t],..."beforeEnd"===t?{targetScope:{parentId:s}}:{targetId:s}})}}async saveStepParams(){if(this.isCreationSession()){if(this.creationPersisted)return!0;let e=this.getStepParams("menuCreation","basic");return await this.persistMenuCreation(e||{}),this.creationPersisted=!0,!0}return this.hasCurrentPersistedMenuState()?await super.saveStepParams():this.hasPersistedMenuInstanceFlowFlag()?await this.destroyPersistedState():this.hasPersistableInstanceFlows()&&await super.saveStepParams(),await this.syncPersistedFlowRouteFlag(),!0}async save(){if(this.isCreationSession()){if(!this.creationPersisted){let e=this.getStepParams("menuCreation","basic");await this.persistMenuCreation(e||{}),this.creationPersisted=!0}return this.remove(),!0}return await super.save(),await this.syncPersistedFlowRouteFlag(),!0}async destroy(){var e,t,o,l;if(this.isCreationSession())return this.remove();let n=this.getRoute();if(!(null==n?void 0:n.id))return!1;let a=this.getRouteRepository().listAccessible(),r=eb(n,(null==(e=this.context.location)?void 0:e.pathname)||window.location.pathname,null==(t=this.context.router)?void 0:t.basename),i=ef(a,n),s=eg(a,n);if(await Promise.all([this.getRouteRepository().deleteRoute(n.id),n.schemaUid?null==(o=(l=this.context.api.resource("uiSchemas"))[`remove/${n.schemaUid}`])?void 0:o.call(l):Promise.resolve(void 0)]),!r)return!0;let d=i||s,u=d?`/admin/${d.type===x.q.group?d.id:d.schemaUid}`:"/";return this.context.router.navigate(u),!0}toProLayoutRoute(e){var t,o,n;let a=this.props.route,r=this.props.parentRoute,i=e.depth||0;if(!a||"object"!=typeof a||!e.designable&&this.hidden)return null;let s=es({depth:i,isMobile:e.isMobile}),{name:d,icon:u}=(t=e.t,{name:s?(0,l.jsx)(X,{icon:a.icon,title:t(a.title)}):t(a.title),icon:s?null:a.icon?(0,l.jsx)(w.In,{type:a.icon}):null});if(a.type===x.q.link)return{name:d,icon:u,path:z("link",a.id??a.schemaUid??a.menuSchemaUid??a.title??this.uid),hideInMenu:a.hideInMenu,_route:a,_parentRoute:r,_depth:i,_model:this};if(a.type===x.q.page||a.type===x.q.flowPage)return{name:d,icon:u,path:`/admin/${a.schemaUid}`,redirect:`/admin/${a.schemaUid}`,hideInMenu:a.hideInMenu,_route:a,_parentRoute:r,_depth:i,_model:this};if(a.type===x.q.group){let t=Array.isArray(a.children)?a.children:[],l=(this.subModels.menuItems||[]).map(t=>t.toProLayoutRoute({...e,depth:i+1})).filter(Boolean)||[];e.designable&&0===i&&l.push(ec("schema-initializer-Menu-side",this,a));let s={name:d,icon:u,path:`/admin/${a.id}`,redirect:(null==(o=l[0])?void 0:o.key)==="x-designer-button"?void 0:`/admin/${(null==(n=(0,v.sj)(t))?void 0:n.schemaUid)||a.id}`,hideInMenu:a.hideInMenu,_route:a,_parentRoute:r,_depth:i,_model:this};return l.length>0&&(s.routes=l),s}return null}render(){return(0,l.jsx)(ei,{item:this.props.item,dom:this.props.dom,options:this.props.options,renderType:this.props.renderType})}constructor(...e){super(...e),this.creationPersisted=!1,this.persistedStateHydrated=!1}}ek.registerFlow({key:"menuCreation",title:"Add menu item",manual:!0,steps:{basic:{title:"Add menu item",preset:!0,hideInSettings:!0,defaultParams:async e=>{var t;return(t=e.model.getCreationMeta())&&"link"===t.menuType&&"insert"!==t.source?{openInNewWindow:!0}:{}},uiSchema:async e=>{var t,o;let l;return t=e.t,o=e.model.getCreationMeta(),l=ex(t),(null==o?void 0:o.menuType)==="link"&&Object.assign(l,ep(t)),l}}}}),ek.registerFlow({key:"menuSettings",title:"Menu settings",steps:{edit:{title:"Edit",defaultParams:async e=>{var t,o,l,n;return{title:null==(t=e.model.getRoute())?void 0:t.title,icon:null==t?void 0:t.icon,href:null==t||null==(o=t.options)?void 0:o.href,params:null==t||null==(l=t.options)?void 0:l.params,openInNewWindow:(null==t||null==(n=t.options)?void 0:n.openInNewWindow)!==!1}},uiSchema:async e=>{let t=e.model.getRoute(),o=ex(e.t);return(null==t?void 0:t.type)===x.q.link&&Object.assign(o,ep(e.t)),o},beforeParamsSave:async(e,t)=>{var o;await e.model.updateMenuRoute({title:t.title,icon:t.icon,options:(null==(o=e.model.getRoute())?void 0:o.type)===x.q.link?{href:t.href,params:t.params,openInNewWindow:t.openInNewWindow}:void 0})}},editTooltip:{title:"Edit tooltip",defaultParams:async e=>{var t;return{tooltip:null==(t=e.model.getRoute())?void 0:t.tooltip}},uiSchema:async e=>({tooltip:{title:e.t("Tooltip"),"x-decorator":"FormItem","x-component":"Input.TextArea"}}),beforeParamsSave:async(e,t)=>{await e.model.updateMenuRoute({tooltip:t.tooltip})}},linkageRules:{use:"menuLinkageRules",hideInSettings:async e=>e.model.isCreationSession()},moveTo:{title:"Move to",defaultParams:async()=>({position:"afterEnd"}),uiSchema:async e=>{var t;let o=await e_(e.routeRepository.listAccessible(),e),l=null==(t=e.model.getRoute())?void 0:t.id,n=et(void 0,l,e.t);return{target:{title:e.t("Target"),enum:o,required:!0,"x-decorator":"FormItem","x-component":"TreeSelect"},position:{title:e.t("Position"),required:!0,enum:n,"x-decorator":"FormItem","x-component":"Radio.Group","x-reactions":[t=>{var o;let n=et(null==(o=t.form.values)?void 0:o.target,l,e.t);t.dataSource=n,n.some(e=>e.value===t.value&&!e.disabled)||(t.value="afterEnd")}]}}},beforeParamsSave:async(e,t)=>{await e.model.moveMenuRoute(t.target,t.position)}},insertBefore:ev({title:"Insert before",insertPosition:"beforeBegin",resolveParentRoute:e=>e.model.getParentRoute()}),insertAfter:ev({title:"Insert after",insertPosition:"afterEnd",resolveParentRoute:e=>e.model.getParentRoute()}),insertInner:ev({title:"Insert inner",hideInSettings:async e=>{var t;return(null==(t=e.model.getRoute())?void 0:t.type)!==x.q.group},canCreate:e=>e.type===x.q.group,insertPosition:"beforeEnd",resolveParentRoute:(e,t)=>t.type===x.q.group?t:void 0})}});var eC=o(42536),eM=o(17103),ew=o(46909);let eF=(e,t)=>{if(t)for(let l of t){var o;if(l.menuSchemaUid===e)return l;if(null==(o=l.children)?void 0:o.length){let t=eF(e,l.children);if(t)return t}}},eP=e=>{var t;let{allAccessRoutes:o}=(0,h.nr)(),n=(0,d.zd)(),a=null==(t=(0,v.sj)(o))?void 0:t.schemaUid;return(0,l.jsxs)(l.Fragment,{children:[e.children,a&&("/admin"===n.pathname||"/admin/"===n.pathname)&&(0,l.jsx)(s.Navigate,{replace:!0,to:`/admin/${a}`})]})},ej=e=>{let t=(0,d.es)(),{allAccessRoutes:o}=(0,h.nr)(),n=(0,s.useLocation)(),a=(0,s.useNavigate)();return(0,r.useEffect)(()=>{let e=eF(t,o);e&&a(n.pathname.replace(t,e.schemaUid)+n.search)},[o,t,n.pathname,n.search,a]),(0,l.jsx)(l.Fragment,{children:e.children})},eA=e=>(0,l.jsx)(d.tu,{children:(0,l.jsx)(d.sn,{children:(0,l.jsx)(d.Cj,{children:(0,l.jsx)(eC.rR,{children:(0,l.jsx)(h.DR,{children:(0,l.jsx)(eP,{children:(0,l.jsx)(ej,{children:(0,l.jsx)(c.Ho,{children:(0,l.jsx)(eM.qm,{children:(0,l.jsx)(ew.sx,{children:e.children})})})})})})})})})});var eI=o(34829),eT=o(38533),eD=o(10691),eL=o(76821),eY=o(7516),eR=o(77843),eB=o(6997);let eN=(0,eD.css)`
294
+ `,style:{cursor:"pointer",padding:"16px",color:e.colorTextHeaderMenu},children:(0,l.jsx)(n.UserOutlined,{})})})};function s(){let{render:e}=(0,r.useSchemaSettingsRender)("userCenterSettings");return(0,l.jsx)("div",{style:{display:"inline-block"},children:e()})}},59099(e,t,o){o.d(t,{A:()=>l});let l=(e,t)=>null!=e&&(0!==e&&"0"!==e||!!t)},7819(e,t,o){o.d(t,{Ui:()=>tb,nr:()=>h.nr,Uc:()=>es,yb:()=>h.yb,PR:()=>m.PR,K7:()=>h.K7,Y:()=>m.Y,dI:()=>h.dI,xF:()=>ek,q2:()=>x.q,NC:()=>ty,Y4:()=>b,NH:()=>tg.N,A1:()=>a.LayoutContent,mY:()=>a.useMobileLayout,X7:()=>eA,bl:()=>v.bl,sj:()=>v.sj});var l=o(71178),n=o(504),a=o(13975),r=o(51649),i=o(52793),s=o(38356),d=o(41897),u=o(85162),c=o(43353),p=o(82924);o(67285);var m=o(79647),h=o(55976),x=o(6821),v=o(40657);let _=e=>(0,a.getAdminLayoutModel)(e,{required:!0}),f=e=>(0,c.RH)()?(0,l.jsx)(i.Spin,{style:{width:"100%",marginTop:20},delay:void 0}):(0,l.jsx)(a.FlowRoute,{...e,getLayoutModel:_}),g=e=>{let{uid:t,allAccessRoutes:o}=e,{active:n}=(0,m.Y)(),a=(0,v.bl)(t,o);return(null==a?void 0:a.type)===x.q.flowPage?(0,l.jsx)(f,{pageUid:t,active:n}):(0,l.jsx)(p.DYS,{uid:t})},b=()=>{let e=(0,d.es)(),{allAccessRoutes:t}=(0,h.nr)();return((()=>{var e;let t=(0,n.useFlowEngine)(),o=(0,s.useLocation)(),l=(0,s.useParams)(),{name:i,tabUid:d}=l,u=l["*"],c=(0,r.useRef)(0),p=(0,r.useMemo)(()=>({name:i,tabUid:d,"*":u}),[i,d,u]),m=o.state??(null==(e=window.history.state)?void 0:e.usr)??window.history.state,h=(0,r.useMemo)(()=>({name:d?"admin.page.tab":"admin.page",pathname:o.pathname,state:m,params:p,layoutRouteName:"admin",layoutBasePathname:"/admin"}),[o.pathname,p,m,d]);(0,r.useEffect)(()=>{let e=++c.current,o=(0,a.getAdminLayoutModel)(t,{required:!1});if(o&&i)return o.syncLayoutRoute(h),()=>{Promise.resolve().then(()=>{c.current===e&&o.clearLayoutRoute(h)}).catch(()=>{})}},[t,i,h])})(),(0,v.IZ)(e,t))?null:e&&!(0,v.bl)(e,t)?(0,l.jsx)(u.b,{}):(0,l.jsx)(m.PR,{uid:e,children:e=>(0,l.jsx)(d.MR.Provider,{value:e,children:(0,l.jsx)(h.yb,{uid:e,children:(0,l.jsx)(g,{uid:e,allAccessRoutes:t})})})})};var y=o(44374),S=o(83468),k=o(63526),C=o(82113),M=o(42966),w=o(60430),F=o(59099);let P=e=>{let{isMobile:t,closeMobileMenu:o,callback:l,delayMs:n=220}=e;t?(o(),window.setTimeout(l,n)):l()};var j=o(79980);let A=e=>{let{theme:t}=(0,j.my)();return(0,l.jsx)(i.ConfigProvider,{theme:{...t,inherit:!1},children:e.children})};var I=o(73761),T=o(7775),D=o(60070),L=o(38957),Y=o(52973),R=o(76460),B=o(59896),N=o(14612);let E=(e,t)=>(0,D.J)(e);function $(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.origin;return e?(0,k.isURL)(e)?e:e.startsWith("/")?`${t}${e}`:`${t}/${e}`:""}let z=(e,t)=>`/admin/__admin_layout__/${e}/${encodeURIComponent(String(t))}`,O={display:"flex",alignItems:"center",justifyContent:"space-between"},q=[{pattern:/^\$user(?:\.(.+))?$/,resolve:e=>`ctx.user${e[1]?`.${e[1]}`:""}`},{pattern:/^currentUser(?:\.(.+))?$/,resolve:e=>`ctx.user${e[1]?`.${e[1]}`:""}`},{pattern:/^\$nRole$/,resolve:()=>"ctx.role"},{pattern:/^\$nToken$/,resolve:()=>"ctx.token"},{pattern:/^\$nURLSearchParams(?:\.(.+))?$/,resolve:e=>`ctx.urlSearchParams${e[1]?`.${e[1]}`:""}`}],H=e=>"string"==typeof e&&e.includes("{{")?e.replace(/\{\{\s*([\s\S]*?)\s*\}\}/g,(e,t)=>{let o=String(t||"").trim();for(let e of q){let t=o.match(e.pattern);if(t)return`{{ ${e.resolve(t)} }}`}return e}):e,V=async e=>{let{context:t,href:o,params:l=[]}=e,n="string"==typeof o?H(o):o,a=await t.resolveJsonTemplate(n),r={};for(let{name:e,value:o}of l)if(e)try{let l="string"==typeof o?await t.resolveJsonTemplate(H(o)):o;if(null==l)continue;r[e]=(0,I.reduceValueSize)(l)}catch(e){console.error(e)}return(0,I.appendQueryStringToUrl)(String(a??o??""),M.default.stringify(r))},U=async e=>{let{context:t,href:o,params:l,openInNewWindow:n,isMobile:a,closeMobileMenu:r,navigate:i,basenameOfCurrentRouter:s}=e;try{let e=await V({context:t,href:o,params:l||[]});if(!1!==n){a&&r(),window.open(e,"_blank","noopener,noreferrer");return}P({isMobile:!!a,closeMobileMenu:r,callback:()=>{!function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.origin;"string"!=typeof e?console.error("link should be a string"):(0,k.isURL)(e)?e.startsWith(o)?t($(e.replace(o,""),"")):window.open(e,"_self"):t($(e,""))}(e,i,window.location.origin+s)}})}catch(e){console.error(e),a&&r(),window.open(o,"_blank","noopener,noreferrer")}},G=e=>!!e&&"function"==typeof e.getRoute,K=(e,t)=>"function"==typeof e.context.t?e.context.t(t):t,W=[{key:"group",label:"Group",menuType:"group"},{key:"page",label:"Classic page (v1)",menuType:"page"},{key:"flow-page",label:"Modern page (v2)",menuType:"flowPage"},{key:"link",label:"Link",menuType:"link"}],J=e=>{var t,o;let a;return(0,l.jsx)(n.AddSubModelButton,{model:e.launcherModel,subModelKey:"menuItems",items:(t=e.launcherModel,a=(o=e.parentRoute)?"sider":"header",W.map(e=>({key:e.key,label:K(t,e.label),createModelOptions:()=>{let l;return l={menuType:e.menuType,source:a,parentRoute:o},{uid:`${t.uid}-menu-creation-${(0,k.uid)()}`,use:"AdminLayoutMenuItemModel",props:{creationMeta:l}}}}))),children:(0,l.jsx)(n.FlowSettingsButton,{"data-testid":e.testId,style:{background:"none"},icon:(0,l.jsx)(C.PlusOutlined,{}),children:K(e.launcherModel,"Add menu item")})})},X=e=>e.icon?(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,l.jsx)(w.In,{type:e.icon}),(0,l.jsx)("span",{children:e.title})]}):(0,l.jsx)(l.Fragment,{children:e.title}),Z=(0,T.L)(e=>(0,l.jsx)(l.Fragment,{children:e.children})),Q=r.default.createContext({closeMobileMenu:()=>{}}),ee=r.default.createContext({inHeader:!1}),et=(e,t,o)=>{var l;let[n,a]=(null==e||null==(l=e.split)?void 0:l.call(e,"||"))||[],r=[{label:o("Before"),value:"beforeBegin"},{label:o("After"),value:"afterEnd"}];return a!==x.q.group?r:[...r,{label:o("Inner"),value:"beforeEnd",disabled:void 0!==t&&String(t)===n}]};function eo(e,t,o){let l=[...e.subModels.menuItems||[]],n=new Map(l.map(e=>[e.uid,e])),a=[],r=new Set;t.forEach((t,l)=>{var i,s;let d,u=(i=e.uid,d=t.id??t.schemaUid??t.menuSchemaUid??t.pageSchemaUid??t.title??`${t.type}-${l}`,`${i}-menu-item-${t.type||"unknown"}-${d}`),c=n.get(u),p=!!c;c||(c=e.addSubModel("menuItems",{uid:u,use:"AdminLayoutMenuItemModel",props:{route:t,parentRoute:o}})),c.sortIndex=l+1,p&&(null==(s=c.syncFromRoute)||s.call(c,t,o)),a.push(c),r.add(u)}),l.forEach(t=>{r.has(t.uid)||e.flowEngine.removeModelWithSubModels(t.uid)}),e.subModels.menuItems=a}let el=e=>{var t,o,n,a,r,s,d,u,c,p;let{item:m}=e,x=E(null==(o=m._route.options)||null==(t=o.badge)?void 0:t.count,null==(n=m._model)?void 0:n.context),v=(0,F.A)(x,null==(r=m._route.options)||null==(a=r.badge)?void 0:a.showZero),_="string"==typeof m.name||"number"==typeof m.name?String(m.name):"string"==typeof(null==(s=m._route)?void 0:s.title)||"number"==typeof(null==(d=m._route)?void 0:d.title)?String(m._route.title):void 0;return(0,l.jsx)(N.Zy.Provider,{value:m._parentRoute,children:(0,l.jsx)(h.dI.Provider,{value:m._route,children:(0,l.jsxs)("div",{"aria-label":_,role:"none",style:O,children:[e.children,v&&(0,l.jsx)(i.Badge,{...null==(u=m._route.options)?void 0:u.badge,count:x,style:{marginLeft:4,color:null==(p=m._route.options)||null==(c=p.badge)?void 0:c.textColor,maxWidth:"10em"},dot:!1})]})})})},en=e=>{let{inHeader:t}=(0,r.useContext)(ee);return e.hidden||t?e.children:(0,l.jsx)(i.Tooltip,{title:e.title,placement:"right",children:e.badgeProps?(0,l.jsx)(i.Badge,{...e.badgeProps,style:{transform:"none",maxWidth:"10em"},dot:!1,children:e.children}):e.children})},ea=e=>{var t,o,n,a,u,c,p,m,v,_,f,g,b,y,S;let{item:k}=e,C=(0,s.useLocation)(),M=E(null==(o=k._route.options)||null==(t=o.badge)?void 0:t.count,null==(n=k._model)?void 0:n.context),w=(0,d.vx)(),j=(0,d.$y)(),{closeMobileMenu:A}=(0,r.useContext)(Q),I=k.redirect||k.path,T=(0,F.A)(M,null==(u=k._route.options)||null==(a=u.badge)?void 0:a.showZero),D={...null==(c=k._route.options)?void 0:c.badge,count:M},L=(0,r.useCallback)(async t=>{var o,l,n,a,r;let i=null==(o=k._route.options)?void 0:o.href,s=null==(l=k._route.options)?void 0:l.params,d=null==(n=k._route.options)?void 0:n.openInNewWindow;t.preventDefault(),t.stopPropagation(),await U({context:null==(a=k._model)?void 0:a.context,href:i,params:s,openInNewWindow:d,isMobile:!!(null==(r=e.options)?void 0:r.isMobile),closeMobileMenu:A,navigate:w,basenameOfCurrentRouter:j})},[k,null==(p=e.options)?void 0:p.isMobile,A,w,j]),Y=(0,r.useCallback)(t=>{var o,l;(t.preventDefault(),t.stopPropagation(),null==(o=e.options)?void 0:o.isMobile)?P({isMobile:!!(null==(l=e.options)?void 0:l.isMobile),closeMobileMenu:A,callback:()=>{w(I)}}):w(I)},[null==(m=e.options)?void 0:m.isMobile,A,w,I]);return(null==(v=k._route)?void 0:v.type)===x.q.link?(0,l.jsx)(N.Zy.Provider,{value:k._parentRoute,children:(0,l.jsx)(h.dI.Provider,{value:k._route,children:(0,l.jsxs)("div",{role:"none",style:O,children:[(0,l.jsx)("div",{onClick:L,children:(0,l.jsx)(s.Link,{to:C.pathname,"aria-label":"string"==typeof k.name?k.name:void 0,children:e.children})}),T&&(0,l.jsx)(i.Badge,{...null==(b=k._route.options)?void 0:b.badge,count:M,style:{marginLeft:4,color:null==(S=k._route.options)||null==(y=S.badge)?void 0:y.textColor,maxWidth:"10em"},dot:!1})]})})}):(0,l.jsx)(N.Zy.Provider,{value:k._parentRoute,children:(0,l.jsx)(h.dI.Provider,{value:k._route,children:(0,l.jsxs)("div",{role:"none",style:O,children:[(0,l.jsx)(en,{title:k.name,hidden:k._route.type===x.q.group||(k._depth||0)>0||!(null==(_=e.options)?void 0:_.collapsed),badgeProps:T?D:null,children:(0,l.jsx)(s.Link,{to:I,"aria-label":"string"==typeof k.name?k.name:void 0,onClick:Y,children:e.children})}),T&&(0,l.jsx)(i.Badge,{...D,style:{marginLeft:4,color:null==(g=k._route.options)||null==(f=g.badge)?void 0:f.textColor,maxWidth:"10em"},dot:!1})]})})})},er=e=>{var t;let{model:o}=e;if(!G(o))return null;let a=null==(t=o.getRoute)?void 0:t.call(o);return(null==a?void 0:a.id)?(0,l.jsx)(n.DragHandler,{model:o}):null},ei=e=>{var t;let{item:o,dom:n,options:a,renderType:r}=e;if(!o||!r)return null;let i=(0,l.jsx)(Z,{tooltip:null==(t=o._route)?void 0:t.tooltip,children:n});return"group"===r?(0,l.jsx)(R.j0,{scopeId:o._route.schemaUid,type:"groupItem",children:(0,l.jsx)(el,{item:o,children:i})}):(0,l.jsx)(R.j0,{scopeId:o._route.schemaUid,type:"menuItem",children:(0,l.jsx)(ea,{item:o,options:a,children:i})})},es=e=>{let{depth:t,isMobile:o}=e;return t>1||o&&t>0},ed=()=>(0,l.jsx)("span",{"data-nb-hidden-menu-item":"true"}),eu=(0,n.observer)(e=>{let{model:t,item:o,dom:a,renderType:i,options:s}=e,d=t.context.themeToken;return((0,r.useEffect)(()=>{t.setProps({item:o,dom:a,renderType:i,options:s})},[a,o,t,s,i]),!t.context.flowSettingsEnabled&&t.hidden)?(0,l.jsx)(ed,{}):(0,l.jsx)(A,{children:(0,l.jsx)(n.Droppable,{model:t,children:(0,l.jsx)(n.FlowModelRenderer,{model:t,showFlowSettings:{showBackground:!1,showBorder:!1,style:{left:-d.padding,right:-d.padding}},extraToolbarItems:[{key:"menu-drag-handler",component:er,sort:1}]})})})});function ec(e,t,o){let n=(null==o?void 0:o.id)??(null==o?void 0:o.schemaUid)??(null==o?void 0:o.menuSchemaUid)??(null==o?void 0:o.title)??t.uid;return{key:"x-designer-button",name:(0,l.jsx)(J,{testId:e,launcherModel:t,parentRoute:o}),path:z("designer",n),disabled:!0,_route:{},_parentRoute:o,_launcherModel:t,icon:(0,l.jsx)(w.In,{type:"setting"})}}let ep=e=>({href:{title:e("URL"),type:"string","x-decorator":"FormItem","x-component":"FlowSettingsVariableTextArea","x-component-props":{rows:1,maxRows:1},description:e("Do not concatenate search params in the URL")},params:{type:"array",title:e("Search parameters"),"x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{name:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:e("Name")}},value:{type:"string","x-decorator":"FormItem","x-component":"FlowSettingsVariableTextArea","x-component-props":{placeholder:e("Value"),rows:1,maxRows:1,useTypedConstant:!0,changeOnSelect:!0}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:e("Add parameter"),"x-component":"ArrayItems.Addition"}}},openInNewWindow:{type:"boolean","x-content":e("Open in new window"),"x-decorator":"FormItem","x-component":"Checkbox"}}),em=async(e,t)=>{await e.request({method:"POST",url:"/uiSchemas:insert",data:t})},eh=[{label:"Group",value:"group"},{label:"Classic page (v1)",value:"page"},{label:"Modern page (v2)",value:"flowPage"},{label:"Link",value:"link"}],ex=e=>({title:{title:e("Menu item title"),required:!0,"x-decorator":"FormItem","x-component":"Input"},icon:{title:e("Icon"),"x-decorator":"FormItem","x-component":"IconPicker"}}),ev=e=>({title:e.title,hideInSettings:e.hideInSettings,defaultParams:async()=>({menuType:"flowPage"}),uiSchema:async e=>{let t;return{menuType:{title:(t=e.t)("Menu type"),required:!0,enum:eh.map(e=>({label:t(e.label),value:e.value})),"x-decorator":"FormItem","x-component":"Radio.Group"},...ex(t),...Object.fromEntries(Object.entries(ep(t)).map(e=>{let[t,o]=e;return[t,{...o,"x-reactions":{dependencies:["menuType"],fulfill:{state:{hidden:'{{$deps[0] !== "link"}}'}}}}]}))}},beforeParamsSave:async(t,o)=>{let l=t.model,n=l.getRoute();if(!n||e.canCreate&&!e.canCreate(n))return;let a=e.resolveParentRoute(t,n);await l.createMenuFromMeta({menuType:o.menuType,source:"insert",insertPosition:e.insertPosition,targetRoute:n,parentRoute:a},o)}}),e_=async(e,t)=>Promise.all((e||[]).filter(e=>e.type!==x.q.tabs).map(async e=>{var o,l;return{label:"string"==typeof e.title&&(0,B.DZ)(e.title)?await (null==(o=t.resolveJsonTemplate)?void 0:o.call(t,e.title))??e.title:t.t(e.title),value:`${e.id}||${e.type}`,children:(null==(l=e.children)?void 0:l.length)?await e_(e.children,t):void 0}})),ef=(e,t)=>{if(t)for(let l=0;l<e.length;l++){var o;let n=e[l];if(n.id===t.id)return e[l-1];if(null==(o=n.children)?void 0:o.length){let e=ef(n.children,t);if(e)return e}}},eg=(e,t)=>{if(t)for(let l=0;l<e.length;l++){var o;let n=e[l];if(n.id===t.id)return e[l+1];if(null==(o=n.children)?void 0:o.length){let e=eg(n.children,t);if(e)return e}}},eb=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/";if(!e)return!1;let l=o&&"/"!==o?o.replace(/\/$/,""):"",n=l&&t.startsWith(l)?t.slice(l.length)||"/":t;return!![null!=e.id?`/admin/${e.id}`:null,e.schemaUid?`/admin/${e.schemaUid}`:null].filter(Boolean).some(e=>n===e||n.startsWith(`${e}/`))||!!Array.isArray(e.children)&&e.children.some(e=>eb(e,n,"/"))},ey={beforeBegin:"insertBefore",afterEnd:"insertAfter"},eS=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={...e};return delete t.item,delete t.dom,delete t.options,delete t.renderType,t};class ek extends n.FlowModel{onInit(e){super.onInit(e),this.syncFromRoute(this.props.route,this.props.parentRoute),this.shouldHydratePersistedState()&&this.hydratePersistedState()}syncFromRoute(e,t){(this.setProps({route:e,parentRoute:t}),(null==e?void 0:e.type)===x.q.group)?eo(this,Array.isArray(e.children)?e.children:[],e):((this.subModels.menuItems||[]).forEach(e=>{this.flowEngine.removeModelWithSubModels(e.uid)}),delete this.subModels.menuItems)}getRoute(){return this.props.route}getParentRoute(){return this.props.parentRoute}getCreationMeta(){return this.props.creationMeta}isCreationSession(){var e;return!!(null==(e=this.getCreationMeta())?void 0:e.menuType)}shouldHydratePersistedState(){return!this.isCreationSession()&&this.hasPersistedMenuInstanceFlowFlag()}async hydrateLegacyPersistedStateIfCurrentPath(e,t){return!!eb(this.getRoute(),e,t)&&(this.hasPersistedMenuInstanceFlowFlag()||await this.hydratePersistedState(),!0)}async openFlowSettings(e){return await this.hydratePersistedState(),await super.openFlowSettings(e)}getRouteRepository(){return this.context.routeRepository}hasPersistedMenuInstanceFlowFlag(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getRoute();return(null==t||null==(e=t.options)?void 0:e.hasPersistedMenuInstanceFlow)===!0}getCurrentPersistedInstanceFlowCount(){return this.flowRegistry.getFlows().size}hasPersistableMenuLinkageRules(){let e=this.getStepParams("menuSettings","linkageRules");return Array.isArray(null==e?void 0:e.value)&&e.value.length>0}hasCurrentPersistedMenuState(){return this.getCurrentPersistedInstanceFlowCount()>0||this.hasPersistableMenuLinkageRules()}buildRouteOptionsWithPersistedFlowFlag(e){let t=this.getRoute(),o={...(null==t?void 0:t.options)||{}};return e?o.hasPersistedMenuInstanceFlow=!0:delete o.hasPersistedMenuInstanceFlow,Object.keys(o).length>0?o:void 0}async syncPersistedFlowRouteFlag(){if(this.isCreationSession())return;let e=this.getRoute();if((null==e?void 0:e.id)==null)return;let t=this.hasCurrentPersistedMenuState();if(this.hasPersistedMenuInstanceFlowFlag(e)===t)return;let o=this.buildRouteOptionsWithPersistedFlowFlag(t);await this.getRouteRepository().updateRoute(e.id,{options:o}),this.setProps({route:{...e,options:o}})}async destroyPersistedState(){var e,t;this.isCreationSession()||await (null==(t=this.flowEngine.modelRepository)||null==(e=t.destroy)?void 0:e.call(t,this.uid))}async hydratePersistedState(){if(!this.persistedStateHydrated)return this.persistedStateHydrating||(this.persistedStateHydrating=(async()=>{if(this.isCreationSession())return;let e=!1,t=this.flowEngine.modelRepository;if(!(null==t?void 0:t.findOne))return;let o=await t.findOne({uid:this.uid});if(null==o?void 0:o.uid){if(o.stepParams&&"object"==typeof o.stepParams&&(this.setStepParams(o.stepParams),e=this.hasPersistableMenuLinkageRules()),o.flowRegistry&&"object"==typeof o.flowRegistry){for(let e of[...this.flowRegistry.getFlows().keys()])this.flowRegistry.removeFlow(e);this.flowRegistry.addFlows(o.flowRegistry);let t=Object.values(o.flowRegistry).some(e=>{var t;return!!e&&!0!==e.manual&&(!e.on||("string"==typeof e.on?"beforeRender"===e.on:(null==(t=e.on)?void 0:t.eventName)==="beforeRender"))});e=e||t}e&&this.rerender(),!this.hasPersistedMenuInstanceFlowFlag()&&this.hasCurrentPersistedMenuState()&&await this.syncPersistedFlowRouteFlag()}})().finally(()=>{this.persistedStateHydrated=!0,this.persistedStateHydrating=void 0})),await this.persistedStateHydrating}hasPersistableInstanceFlows(){var e;let t=this.flowRegistry.getFlows().size,o=Object.keys((null==(e=this._options)?void 0:e.flowRegistry)||{}).length;return t>0||o>0}serialize(){let e=super.serialize();return e.props=eS(e.props),e}setHidden(e){let t=this.hidden;if(super.setHidden(e),t!==this.hidden){var o,l,n,r;null==(n=(r=this.flowEngine).getModel)||null==(l=n.call(r,a.ADMIN_LAYOUT_MODEL_UID))||null==(o=l.refreshMenuRouteTree)||o.call(l)}}renderHiddenInConfig(){let{item:e,dom:t,options:o,renderType:n}=this.props;return e&&n?(0,l.jsx)("div",{style:{opacity:.3},children:(0,l.jsx)(ei,{item:e,dom:t,options:o,renderType:n})}):null}async insertRouteSchema(e){await em(this.context.api,e)}async createMenuRoute(e,t){let{parentId:o,refreshAfterMutation:l=!0}=t||{},n={...e,parentId:o??e.parentId??void 0},{data:a}=await this.getRouteRepository().createRoute(n,l?void 0:{refreshAfterMutation:!1});return null==a?void 0:a.data}async createRouteForInsert(e,t){var o;let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(null==(o=this.getCreationMeta())?void 0:o.targetRoute)||this.getRoute(),n=await this.createMenuRoute(e,{parentId:"beforeEnd"===t?(null==l?void 0:l.id)||void 0:(null==l?void 0:l.parentId)||void 0,refreshAfterMutation:!1}),a=ey[t];if(a){try{await this.getRouteRepository().moveRoute({sourceId:null==n?void 0:n.id,targetId:null==l?void 0:l.id,sortField:"sort",method:a})}catch(e){throw await this.getRouteRepository().refreshAccessible(),e}return null==n?void 0:n.id}return await this.getRouteRepository().refreshAccessible(),null==n?void 0:n.id}async createMenuFromMeta(e,t){let o,l="flowPage"===e.menuType?x.q.flowPage:"page"===e.menuType?x.q.page:"group"===e.menuType?x.q.group:x.q.link,n=async t=>{var o;return e.insertPosition?this.createRouteForInsert(t,e.insertPosition,e.targetRoute):this.createMenuRoute(t,{parentId:null==(o=e.parentRoute)?void 0:o.id})};if("group"===e.menuType)return void await n({type:l,title:t.title,icon:t.icon,schemaUid:(0,k.uid)()});if("link"===e.menuType)return void await n({type:l,title:t.title,icon:t.icon,schemaUid:(0,k.uid)(),options:{href:t.href,params:t.params,openInNewWindow:t.openInNewWindow}});let a=(0,k.uid)(),r=(0,k.uid)(),i=(0,k.uid)(),s=(0,k.uid)();await n({type:l,title:t.title,icon:t.icon,schemaUid:a,menuSchemaUid:r,enableTabs:!1,children:[{type:x.q.tabs,schemaUid:i,tabSchemaName:s,hidden:!0}]}),await this.insertRouteSchema((o=e.menuType,"flowPage"===o?(0,L.g)({pageSchemaUid:a}):(0,Y.my)({pageSchemaUid:a,tabSchemaUid:i,tabSchemaName:s})))}async persistMenuCreation(e){let t=this.getCreationMeta();t&&await this.createMenuFromMeta(t,e)}async updateMenuRoute(e){let t=this.getRoute();if((null==t?void 0:t.id)==null)return;let o={...e};e.options&&this.hasPersistedMenuInstanceFlowFlag(t)&&(o.options={...e.options,hasPersistedMenuInstanceFlow:!0}),await this.getRouteRepository().updateRoute(t.id,o),this.setProps({route:{...t,...o}})}async moveMenuRoute(e,t){var o,l,n,a,r;let i=this.getRoute(),[s,d]=(null==e||null==(o=e.split)?void 0:o.call(e,"||"))||[];if(s&&(null==i?void 0:i.id)!=null){if("beforeEnd"===t&&d!==x.q.group)throw Error((null==(n=this.context)||null==(l=n.t)?void 0:l.call(n,"Only groups support inner moves"))||"Only groups support inner moves");if("beforeEnd"===t&&String(i.id)===s)throw Error((null==(r=this.context)||null==(a=r.t)?void 0:a.call(r,"A menu group cannot be moved inside itself"))||"A menu group cannot be moved inside itself");await this.getRouteRepository().moveRoute({sourceId:i.id,sortField:"sort",method:"beforeEnd"===t?void 0:ey[t],..."beforeEnd"===t?{targetScope:{parentId:s}}:{targetId:s}})}}async saveStepParams(){if(this.isCreationSession()){if(this.creationPersisted)return!0;let e=this.getStepParams("menuCreation","basic");return await this.persistMenuCreation(e||{}),this.creationPersisted=!0,!0}return this.hasCurrentPersistedMenuState()?await super.saveStepParams():this.hasPersistedMenuInstanceFlowFlag()?await this.destroyPersistedState():this.hasPersistableInstanceFlows()&&await super.saveStepParams(),await this.syncPersistedFlowRouteFlag(),!0}async save(){if(this.isCreationSession()){if(!this.creationPersisted){let e=this.getStepParams("menuCreation","basic");await this.persistMenuCreation(e||{}),this.creationPersisted=!0}return this.remove(),!0}return await super.save(),await this.syncPersistedFlowRouteFlag(),!0}async destroy(){var e,t,o,l;if(this.isCreationSession())return this.remove();let n=this.getRoute();if(!(null==n?void 0:n.id))return!1;let a=this.getRouteRepository().listAccessible(),r=eb(n,(null==(e=this.context.location)?void 0:e.pathname)||window.location.pathname,null==(t=this.context.router)?void 0:t.basename),i=ef(a,n),s=eg(a,n);if(await Promise.all([this.getRouteRepository().deleteRoute(n.id),n.schemaUid?null==(o=(l=this.context.api.resource("uiSchemas"))[`remove/${n.schemaUid}`])?void 0:o.call(l):Promise.resolve(void 0)]),!r)return!0;let d=i||s,u=d?`/admin/${d.type===x.q.group?d.id:d.schemaUid}`:"/";return this.context.router.navigate(u),!0}toProLayoutRoute(e){var t,o,n;let a=this.props.route,r=this.props.parentRoute,i=e.depth||0;if(!a||"object"!=typeof a||!e.designable&&this.hidden)return null;let s=es({depth:i,isMobile:e.isMobile}),{name:d,icon:u}=(t=e.t,{name:s?(0,l.jsx)(X,{icon:a.icon,title:t(a.title)}):t(a.title),icon:s?null:a.icon?(0,l.jsx)(w.In,{type:a.icon}):null});if(a.type===x.q.link)return{name:d,icon:u,path:z("link",a.id??a.schemaUid??a.menuSchemaUid??a.title??this.uid),hideInMenu:a.hideInMenu,_route:a,_parentRoute:r,_depth:i,_model:this};if(a.type===x.q.page||a.type===x.q.flowPage)return{name:d,icon:u,path:`/admin/${a.schemaUid}`,redirect:`/admin/${a.schemaUid}`,hideInMenu:a.hideInMenu,_route:a,_parentRoute:r,_depth:i,_model:this};if(a.type===x.q.group){let t=Array.isArray(a.children)?a.children:[],l=(this.subModels.menuItems||[]).map(t=>t.toProLayoutRoute({...e,depth:i+1})).filter(Boolean)||[];e.designable&&0===i&&l.push(ec("schema-initializer-Menu-side",this,a));let s={name:d,icon:u,path:`/admin/${a.id}`,redirect:(null==(o=l[0])?void 0:o.key)==="x-designer-button"?void 0:`/admin/${(null==(n=(0,v.sj)(t))?void 0:n.schemaUid)||a.id}`,hideInMenu:a.hideInMenu,_route:a,_parentRoute:r,_depth:i,_model:this};return l.length>0&&(s.routes=l),s}return null}render(){return(0,l.jsx)(ei,{item:this.props.item,dom:this.props.dom,options:this.props.options,renderType:this.props.renderType})}constructor(...e){super(...e),this.creationPersisted=!1,this.persistedStateHydrated=!1}}ek.registerFlow({key:"menuCreation",title:"Add menu item",manual:!0,steps:{basic:{title:"Add menu item",preset:!0,hideInSettings:!0,defaultParams:async e=>{var t;return(t=e.model.getCreationMeta())&&"link"===t.menuType&&"insert"!==t.source?{openInNewWindow:!0}:{}},uiSchema:async e=>{var t,o;let l;return t=e.t,o=e.model.getCreationMeta(),l=ex(t),(null==o?void 0:o.menuType)==="link"&&Object.assign(l,ep(t)),l}}}}),ek.registerFlow({key:"menuSettings",title:"Menu settings",steps:{edit:{title:"Edit",defaultParams:async e=>{var t,o,l,n;return{title:null==(t=e.model.getRoute())?void 0:t.title,icon:null==t?void 0:t.icon,href:null==t||null==(o=t.options)?void 0:o.href,params:null==t||null==(l=t.options)?void 0:l.params,openInNewWindow:(null==t||null==(n=t.options)?void 0:n.openInNewWindow)!==!1}},uiSchema:async e=>{let t=e.model.getRoute(),o=ex(e.t);return(null==t?void 0:t.type)===x.q.link&&Object.assign(o,ep(e.t)),o},beforeParamsSave:async(e,t)=>{var o;await e.model.updateMenuRoute({title:t.title,icon:t.icon,options:(null==(o=e.model.getRoute())?void 0:o.type)===x.q.link?{href:t.href,params:t.params,openInNewWindow:t.openInNewWindow}:void 0})}},editTooltip:{title:"Edit tooltip",defaultParams:async e=>{var t;return{tooltip:null==(t=e.model.getRoute())?void 0:t.tooltip}},uiSchema:async e=>({tooltip:{title:e.t("Tooltip"),"x-decorator":"FormItem","x-component":"Input.TextArea"}}),beforeParamsSave:async(e,t)=>{await e.model.updateMenuRoute({tooltip:t.tooltip})}},linkageRules:{use:"menuLinkageRules",hideInSettings:async e=>e.model.isCreationSession()},moveTo:{title:"Move to",defaultParams:async()=>({position:"afterEnd"}),uiSchema:async e=>{var t;let o=await e_(e.routeRepository.listAccessible(),e),l=null==(t=e.model.getRoute())?void 0:t.id,n=et(void 0,l,e.t);return{target:{title:e.t("Target"),enum:o,required:!0,"x-decorator":"FormItem","x-component":"TreeSelect"},position:{title:e.t("Position"),required:!0,enum:n,"x-decorator":"FormItem","x-component":"Radio.Group","x-reactions":[t=>{var o;let n=et(null==(o=t.form.values)?void 0:o.target,l,e.t);t.dataSource=n,n.some(e=>e.value===t.value&&!e.disabled)||(t.value="afterEnd")}]}}},beforeParamsSave:async(e,t)=>{await e.model.moveMenuRoute(t.target,t.position)}},insertBefore:ev({title:"Insert before",insertPosition:"beforeBegin",resolveParentRoute:e=>e.model.getParentRoute()}),insertAfter:ev({title:"Insert after",insertPosition:"afterEnd",resolveParentRoute:e=>e.model.getParentRoute()}),insertInner:ev({title:"Insert inner",hideInSettings:async e=>{var t;return(null==(t=e.model.getRoute())?void 0:t.type)!==x.q.group},canCreate:e=>e.type===x.q.group,insertPosition:"beforeEnd",resolveParentRoute:(e,t)=>t.type===x.q.group?t:void 0})}});var eC=o(42536),eM=o(17103),ew=o(46909);let eF=(e,t)=>{if(t)for(let l of t){var o;if(l.menuSchemaUid===e)return l;if(null==(o=l.children)?void 0:o.length){let t=eF(e,l.children);if(t)return t}}},eP=e=>{var t;let{allAccessRoutes:o}=(0,h.nr)(),n=(0,d.zd)(),a=null==(t=(0,v.sj)(o))?void 0:t.schemaUid;return(0,l.jsxs)(l.Fragment,{children:[e.children,a&&("/admin"===n.pathname||"/admin/"===n.pathname)&&(0,l.jsx)(s.Navigate,{replace:!0,to:`/admin/${a}`})]})},ej=e=>{let t=(0,d.es)(),{allAccessRoutes:o}=(0,h.nr)(),n=(0,s.useLocation)(),a=(0,s.useNavigate)();return(0,r.useEffect)(()=>{let e=eF(t,o);e&&a(n.pathname.replace(t,e.schemaUid)+n.search)},[o,t,n.pathname,n.search,a]),(0,l.jsx)(l.Fragment,{children:e.children})},eA=e=>(0,l.jsx)(d.tu,{children:(0,l.jsx)(d.sn,{children:(0,l.jsx)(d.Cj,{children:(0,l.jsx)(eC.rR,{children:(0,l.jsx)(h.DR,{children:(0,l.jsx)(eP,{children:(0,l.jsx)(ej,{children:(0,l.jsx)(c.Ho,{children:(0,l.jsx)(eM.qm,{children:(0,l.jsx)(ew.sx,{children:e.children})})})})})})})})})});var eI=o(34829),eT=o(38533),eD=o(10691),eL=o(76821),eY=o(7516),eR=o(77843),eB=o(38693),eN=o(45249),eE=o(51223),e$=o(70447),ez=o(44388),eO=o(8724);let eq=(e,t)=>o=>(e=>{let{isPopupVisibleControlledByURL:t}=(0,eO.X)(),{params:o,currentLevel:l}=(0,ez.IX)();return t()&&!!(null==o?void 0:o.popupuid)&&e===l})(o.level)?(0,l.jsx)(t,{...o}):(0,l.jsx)(e,{...o}),eH=e=>{let t=(0,eB.k)(),o=(0,r.useMemo)(()=>{let e=(null==t?void 0:t.getComponentByOpenMode("page"))||e$.A,o=(null==t?void 0:t.getComponentByOpenMode("drawer"))||eN.Ay,l=(null==t?void 0:t.getComponentByOpenMode("modal"))||eE.Ay;return{page:e,drawer:eq(o,e),modal:eq(l,e)}},[t]);return e.responsive?(0,l.jsx)(eB.R,{defaultOpenMode:null==t?void 0:t.defaultOpenMode,hideOpenMode:null==t?void 0:t.hideOpenMode,isMobile:null==t?void 0:t.isMobile,openModeToComponent:o,children:e.children}):(0,l.jsx)(l.Fragment,{children:e.children})};var eV=o(6997);let eU=(0,eD.css)`
295
295
  height: var(--nb-header-height);
296
296
  margin-right: 4px;
297
297
  display: inline-flex;
@@ -299,18 +299,18 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
299
299
  color: #fff;
300
300
  padding: 0;
301
301
  align-items: center;
302
- `,eE=(0,eD.css)`
303
- ${eN}
302
+ `,eG=(0,eD.css)`
303
+ ${eU}
304
304
  width: 168px;
305
- `,e$=(0,eD.css)`
306
- ${eN}
305
+ `,eK=(0,eD.css)`
306
+ ${eU}
307
307
  width: auto;
308
308
  min-width: 168px;
309
- `,ez=(0,eD.css)`
309
+ `,eW=(0,eD.css)`
310
310
  object-fit: contain;
311
311
  width: 100%;
312
312
  height: 100%;
313
- `,eO=(0,eD.css)`
313
+ `,eJ=(0,eD.css)`
314
314
  width: 100%;
315
315
  height: 100%;
316
316
  font-weight: 500;
@@ -318,7 +318,7 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
318
318
  overflow: hidden;
319
319
  text-overflow: ellipsis;
320
320
  white-space: nowrap;
321
- `,eq=(0,n.observer)(()=>{var e,t,o,n,s,d,u,c;let{token:p}=i.theme.useToken(),m=(0,a.useSystemSettings)(),{t:h}=(0,eR.useTranslation)("lm-collections"),x=(0,r.useMemo)(()=>({fontSize:p.fontSizeHeading3}),[p.fontSizeHeading3]),v=null==m||null==(o=m.data)||null==(t=o.data)||null==(e=t.logo)?void 0:e.url,_=v?(0,l.jsx)("img",{className:ez,src:null==m||null==(d=m.data)||null==(s=d.data)||null==(n=s.logo)?void 0:n.url}):(0,l.jsx)("span",{style:x,className:eO,children:h(null==m||null==(c=m.data)||null==(u=c.data)?void 0:u.title)});return(0,l.jsx)("div",{className:v?eE:e$,children:(null==m?void 0:m.loading)?null:_})}),eH=(0,eD.css)`
321
+ `,eX=(0,n.observer)(()=>{var e,t,o,n,s,d,u,c;let{token:p}=i.theme.useToken(),m=(0,a.useSystemSettings)(),{t:h}=(0,eR.useTranslation)("lm-collections"),x=(0,r.useMemo)(()=>({fontSize:p.fontSizeHeading3}),[p.fontSizeHeading3]),v=null==m||null==(o=m.data)||null==(t=o.data)||null==(e=t.logo)?void 0:e.url,_=v?(0,l.jsx)("img",{className:eW,src:null==m||null==(d=m.data)||null==(s=d.data)||null==(n=s.logo)?void 0:n.url}):(0,l.jsx)("span",{style:x,className:eJ,children:h(null==m||null==(c=m.data)||null==(u=c.data)?void 0:u.title)});return(0,l.jsx)("div",{className:v?eG:eK,children:(null==m?void 0:m.loading)?null:_})}),eZ=(0,eD.css)`
322
322
  .ant-layout-sider-children {
323
323
  margin-inline-end: 0 !important;
324
324
  }
@@ -342,12 +342,12 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
342
342
  .ant-menu-submenu:has([data-nb-hidden-menu-item='true']) {
343
343
  display: none !important;
344
344
  }
345
- `,eV={paddingBlock:0,paddingInline:0},eU=(0,eD.css)`
345
+ `,eQ={paddingBlock:0,paddingInline:0},e0=(0,eD.css)`
346
346
  .ant-popover-inner {
347
347
  padding: 0;
348
348
  overflow: hidden;
349
349
  }
350
- `,eG=e=>{let{token:t}=i.theme.useToken(),[o,n]=(0,r.useState)(null);return((0,r.useEffect)(()=>{n(document.querySelector("#nocobase-app-container"))},[]),o)?(0,l.jsx)(eI.RouteContext.Consumer,{children:n=>n.isMobile?(0,l.jsx)(l.Fragment,{children:e.children}):eY.default.createPortal((0,l.jsx)("div",{className:(0,eD.css)`
350
+ `,e1=e=>{let{token:t}=i.theme.useToken(),[o,n]=(0,r.useState)(null);return((0,r.useEffect)(()=>{n(document.querySelector("#nocobase-app-container"))},[]),o)?(0,l.jsx)(eI.RouteContext.Consumer,{children:n=>n.isMobile?(0,l.jsx)(l.Fragment,{children:e.children}):eY.default.createPortal((0,l.jsx)("div",{className:(0,eD.css)`
351
351
  // Fix the issue where the collapse/expand button is covered by subpages
352
352
  .ant-pro-sider-collapsed-button {
353
353
  top: 64px;
@@ -355,7 +355,7 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
355
355
  z-index: 200;
356
356
  transition: left 0.2s;
357
357
  }
358
- `,children:e.children}),o)}):null},eK=(e,t)=>(0,l.jsx)(eG,{collapsed:e,children:t}),eW=(0,eL.createStyles)(e=>{let{token:t}=e;return{headerPopup:{"&.ant-menu-submenu-popup>.ant-menu":{backgroundColor:`${t.colorBgHeader}`}},headerMenuActive:{"& .ant-menu-submenu-selected>.ant-menu-submenu-title":{color:t.colorTextHeaderMenuActive}}}}),eJ={inHeader:!0},eX=e=>{let{styles:t}=eW();return(0,l.jsx)("span",{className:t.headerMenuActive,children:(0,l.jsx)(ee.Provider,{value:eJ,children:e.children})})},eZ=(e,t)=>(0,l.jsx)(eX,{children:t}),eQ=e=>e.isMobile?[(0,l.jsx)(e8,{},"mobile-actions")]:[(0,l.jsx)(eB.i6,{},"pinned-plugin-list")],e0={display:"flex",height:"100vh"},e1={flex:1,transform:"translateZ(0)",overflow:"hidden",scrollPaddingTop:"var(--nb-header-height)"},e2={width:"fit-content",position:"relative"},e5=(0,eD.css)`
358
+ `,children:e.children}),o)}):null},e2=(e,t)=>(0,l.jsx)(e1,{collapsed:e,children:t}),e5=(0,eL.createStyles)(e=>{let{token:t}=e;return{headerPopup:{"&.ant-menu-submenu-popup>.ant-menu":{backgroundColor:`${t.colorBgHeader}`}},headerMenuActive:{"& .ant-menu-submenu-selected>.ant-menu-submenu-title":{color:t.colorTextHeaderMenuActive}}}}),e4={inHeader:!0},e7=e=>{let{styles:t}=e5();return(0,l.jsx)("span",{className:t.headerMenuActive,children:(0,l.jsx)(ee.Provider,{value:e4,children:e.children})})},e6=(e,t)=>(0,l.jsx)(e7,{children:t}),e9=e=>e.isMobile?[(0,l.jsx)(tr,{},"mobile-actions")]:[(0,l.jsx)(eV.i6,{},"pinned-plugin-list")],e8={display:"flex",height:"100vh"},e3={flex:1,transform:"translateZ(0)",overflow:"hidden",scrollPaddingTop:"var(--nb-header-height)"},te={width:"fit-content",position:"relative"},tt=(0,eD.css)`
359
359
  display: flex;
360
360
  flex-direction: column;
361
361
  position: relative;
@@ -371,7 +371,7 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
371
371
  z-index: 0;
372
372
  padding: 0px 50px;
373
373
  }
374
- `,e4={flex:1,overflowY:"auto"},e7={height:"calc(100dvh - var(--nb-header-height))"},e6=e=>{let{allAccessRoutes:t}=e,o=(0,n.useFlowEngine)(),{token:a}=i.theme.useToken(),{t:r}=(0,eR.useTranslation)(),d=(0,s.useLocation)(),u=!!o.context.flowSettingsEnabled;return 0===t.length&&!u&&["/admin","/admin/"].includes(d.pathname)?(0,l.jsx)(i.Result,{icon:(0,l.jsx)(C.HighlightOutlined,{style:{fontSize:"8em",color:a.colorText}}),title:r("No pages yet, please configure first"),subTitle:r('Click the "UI Editor" icon in the upper right corner to enter the UI Editor mode')}):null},e9=()=>{let{token:e}=i.theme.useToken(),t=(0,r.useMemo)(()=>e.globalStyle?(0,eL.createGlobalStyle)`${e.globalStyle}`:()=>null,[e.globalStyle]);return(0,l.jsx)(t,{})},e8=()=>{let{token:e}=i.theme.useToken(),[t,o]=(0,r.useState)(!1),n=(0,r.useCallback)(()=>{o(!1)},[]);return(0,l.jsx)(i.Popover,{rootClassName:eU,content:(0,l.jsx)(eB.i6,{onClick:n}),color:e.colorBgHeader,trigger:"click",open:t,onOpenChange:o,children:(0,l.jsx)("div",{style:{padding:"0 16px",display:"flex",alignItems:"center",height:"100%",marginRight:-16},children:(0,l.jsx)(C.EllipsisOutlined,{style:{color:e.colorTextHeaderMenu,fontSize:20}})})})};function e3(e){let t=(0,n.useFlowEngine)().getModel(a.ADMIN_LAYOUT_MODEL_UID);return(0,r.useEffect)(()=>{null==t||t.setIsMobileLayout(e.isMobile)},[t,e.isMobile]),e.children}let te=e=>{let{allAccessRoutes:t,onContentElementChange:o}=e,n=(0,r.useMemo)(()=>!function(){if("u"<typeof document)return!1;let e=document.createElement("div");return e.style.height="1dvh","1dvh"===e.style.height}()?void 0:e7,[]),a=(0,r.useCallback)(e=>{null==o||o(e)},[o]);return(0,l.jsx)("div",{ref:a,className:`${e5} nb-subpages-slot-without-header-and-side`,style:n,children:(0,l.jsxs)("div",{style:e4,children:[(0,l.jsx)(s.Outlet,{}),(0,l.jsx)(e6,{allAccessRoutes:t})]})})},tt=e=>{let t=(0,r.useRef)(null),o=!(e.item._parentRoute||e.fallbackParentRoute);return(0,r.useEffect)(()=>{var e;t.current&&o&&(null==(e=t.current.parentElement)?void 0:e.parentElement)&&(t.current.parentElement.parentElement.style.order="999",t.current.parentElement.parentElement.style.paddingLeft="0",t.current.parentElement.parentElement.style.padding="0")},[o]),(0,l.jsx)("div",{ref:t,children:(0,l.jsx)(A,{children:e.item.name})})},to=(e,t)=>!!e&&(!![null!=e.id?`/admin/${e.id}`:null,e.schemaUid?`/admin/${e.schemaUid}`:null].filter(Boolean).some(e=>t===e||t.startsWith(`${e}/`))||!!Array.isArray(e.children)&&e.children.some(e=>to(e,t))),tl=async(e,t,o)=>{for(let l of e||[]){let e=await tl(l.subModels.menuItems,t,o),n=await l.hydrateLegacyPersistedStateIfCurrentPath(t,o);if(e||n)return!0}return!1},tn=(e,t,o,n,a)=>{var r,i;return(null==e?void 0:e.key)!=="x-designer-button"&&(null==e||!e.disabled||!e._launcherModel||(null==e||null==(r=e._route)?void 0:r.id)||(null==e||null==(i=e._route)?void 0:i.schemaUid))?(null==e?void 0:e._model)?(0,l.jsx)(eu,{model:e._model,item:e,dom:t,options:n,renderType:o},`admin-layout-menu-${o}-${e._model.uid}-${e.path}-${null==n?void 0:n.isMobile}-${null==n?void 0:n.collapsed}`):t:(0,l.jsx)(tt,{item:e,fallbackParentRoute:a})},ta=(0,n.observer)(e=>{let t=(0,n.useFlowEngine)(),o=t.getModel(a.ADMIN_LAYOUT_MODEL_UID),[d,u]=(0,r.useState)(()=>{var e,o;return(null==(o=t.context.routeRepository)||null==(e=o.listAccessible)?void 0:e.call(o))||[]}),c=i.Grid.useBreakpoint(),p=!1===c.md||void 0===c.md&&"u">typeof window&&window.innerWidth<768,m=(0,s.useLocation)(),{token:h}=i.theme.useToken(),v=!!(null==o?void 0:o.isMobileLayout)||p,_=(null==o?void 0:o.menuRouteRefreshVersion)||0,[f,g]=(0,r.useState)(v),[b,y]=(0,r.useState)({path:"/",children:[]}),S=(0,r.useRef)(!1),k=(0,r.useCallback)(e=>"function"==typeof t.context.t?t.context.t(e,{ns:"lm-desktop-routes"}):e,[t]),C=!v&&!!t.context.flowSettingsEnabled,{styles:M}=eW(),{appList:w}=(0,a.useApplications)(),F=(0,a.useAppListRender)(),P=(0,r.useRef)(0),j=(0,r.useRef)(!1),A=(0,r.useCallback)(e=>{null==o||o.setLayoutContentElement(e)},[o]),I=(0,r.useMemo)(()=>{let e;return e=m.pathname,d.find(t=>t.type===x.q.group&&to(t,e))},[d,m.pathname]),T=(0,r.useCallback)(e=>{let o=function(e,t){var o,l;if((null==(o=t.active)?void 0:o.id)&&(null==(l=t.over)?void 0:l.id))return function(e,t){var o,l;if(!G(e)||!G(t))return;let n=null==(o=e.getRoute)?void 0:o.call(e),a=null==(l=t.getRoute)?void 0:l.call(t);if((null==n?void 0:n.id)&&(null==a?void 0:a.id)&&n.id!==a.id)return{sourceId:n.id,targetId:a.id,sortField:"sort"}}(e.getModel(String(t.active.id)),e.getModel(String(t.over.id)))}(t,e);o&&t.context.routeRepository.moveRoute(o).catch(e=>{console.error("[NocoBase] AdminLayoutShell failed to move menu route.",e)})},[t]),D=(0,r.useCallback)(e=>{let{droppableContainers:t,pointerCoordinates:o,...l}=e;if(o&&"u">typeof document){var n;let e=document.elementFromPoint(o.x,o.y),l=null==e||null==(n=e.closest('[data-has-float-menu="true"][data-float-menu-model-uid]'))?void 0:n.getAttribute("data-float-menu-model-uid");if(l){let e=t.find(e=>String(e.id)===l);if(e)return[{id:e.id,data:{droppableContainer:e,value:Number.MAX_SAFE_INTEGER}}]}}let a=(0,eT.pointerWithin)({droppableContainers:t,pointerCoordinates:o,...l});return a.length>0?a:(0,eT.closestCenter)({droppableContainers:t,pointerCoordinates:o,...l})},[]);(0,r.useEffect)(()=>{var e;let o=t.context.routeRepository,l=()=>{u((null==o?void 0:o.listAccessible())||[])};return null==o||o.subscribe(l),null==o||null==(e=o.ensureAccessibleLoaded)||e.call(o).catch(e=>{console.error("[NocoBase] AdminLayoutComponent failed to initialize accessible routes.",e)}),()=>{null==o||o.unsubscribe(l)}},[t]),(0,r.useLayoutEffect)(()=>{null==o||o.syncMenuRoutes(d),y((null==o?void 0:o.toProLayoutRoute({designable:C,isMobile:v,t:k}))||{path:"/",children:[]})},[o,d,C,v,_,k]),(0,r.useEffect)(()=>{let e=++P.current,o=C&&!v;j.current=o;let l=async e=>{e?await t.flowSettings.enable():await t.flowSettings.disable()};return(async()=>{try{await l(o),e!==P.current&&await l(j.current)}catch(e){console.error("[NocoBase] AdminLayoutShell failed to sync flow settings state.",e)}})(),()=>{P.current===e&&(P.current+=1)}},[C,t,v]),(0,r.useEffect)(()=>{var e;tl((null==o?void 0:o.subModels.menuItems)||[],m.pathname,null==(e=t.context.router)?void 0:e.basename)},[o,d,t,m.pathname]);let L=(0,r.useMemo)(()=>({header:{colorBgHeader:h.colorBgHeader,colorTextMenu:h.colorTextHeaderMenu,colorTextMenuSelected:h.colorTextHeaderMenuActive,colorTextMenuActive:h.colorTextHeaderMenuHover,colorBgMenuItemHover:h.colorBgHeaderMenuHover,colorBgMenuItemSelected:h.colorBgHeaderMenuActive,heightLayoutHeader:46,colorHeaderTitle:h.colorTextHeaderMenu},sider:{colorMenuBackground:h.colorBgSider,colorTextMenu:h.colorTextSiderMenu,colorTextMenuSelected:h.colorTextSiderMenuActive,colorBgMenuItemSelected:h.colorBgSiderMenuActive,colorBgMenuItemActive:h.colorBgSiderMenuActive,colorBgMenuItemHover:h.colorBgSiderMenuHover},bgLayout:h.colorBgLayout}),[h]),{theme:Y,isDarkTheme:R}=(0,a.useGlobalTheme)(),B=(0,r.useMemo)(()=>({...Y,token:{...Y.token,paddingPageHorizontal:8,paddingPageVertical:8,marginBlock:12,borderRadiusBlock:8,fontSize:16},algorithm:R?[i.theme.compactAlgorithm,i.theme.darkAlgorithm]:i.theme.compactAlgorithm}),[Y,R]),N=(0,r.useCallback)(e=>{S.current||g(e)},[]),E=(0,r.useCallback)(()=>{S.current=!0,setTimeout(()=>{S.current=!1})},[]),$=(0,r.useMemo)(()=>({overflowedIndicatorPopupClassName:M.headerPopup}),[M.headerPopup]),z=(0,r.useMemo)(()=>(0,eD.css)`
374
+ `,to={flex:1,overflowY:"auto"},tl={height:"calc(100dvh - var(--nb-header-height))"},tn=e=>{let{allAccessRoutes:t}=e,o=(0,n.useFlowEngine)(),{token:a}=i.theme.useToken(),{t:r}=(0,eR.useTranslation)(),d=(0,s.useLocation)(),u=!!o.context.flowSettingsEnabled;return 0===t.length&&!u&&["/admin","/admin/"].includes(d.pathname)?(0,l.jsx)(i.Result,{icon:(0,l.jsx)(C.HighlightOutlined,{style:{fontSize:"8em",color:a.colorText}}),title:r("No pages yet, please configure first"),subTitle:r('Click the "UI Editor" icon in the upper right corner to enter the UI Editor mode')}):null},ta=()=>{let{token:e}=i.theme.useToken(),t=(0,r.useMemo)(()=>e.globalStyle?(0,eL.createGlobalStyle)`${e.globalStyle}`:()=>null,[e.globalStyle]);return(0,l.jsx)(t,{})},tr=()=>{let{token:e}=i.theme.useToken(),[t,o]=(0,r.useState)(!1),n=(0,r.useCallback)(()=>{o(!1)},[]);return(0,l.jsx)(i.Popover,{rootClassName:e0,content:(0,l.jsx)(eV.i6,{onClick:n}),color:e.colorBgHeader,trigger:"click",open:t,onOpenChange:o,children:(0,l.jsx)("div",{style:{padding:"0 16px",display:"flex",alignItems:"center",height:"100%",marginRight:-16},children:(0,l.jsx)(C.EllipsisOutlined,{style:{color:e.colorTextHeaderMenu,fontSize:20}})})})};function ti(e){let t=(0,n.useFlowEngine)().getModel(a.ADMIN_LAYOUT_MODEL_UID);return(0,r.useEffect)(()=>{null==t||t.setIsMobileLayout(e.isMobile)},[t,e.isMobile]),e.children}let ts=e=>{let{allAccessRoutes:t,onContentElementChange:o}=e,n=(0,r.useMemo)(()=>!function(){if("u"<typeof document)return!1;let e=document.createElement("div");return e.style.height="1dvh","1dvh"===e.style.height}()?void 0:tl,[]),a=(0,r.useCallback)(e=>{null==o||o(e)},[o]);return(0,l.jsx)("div",{ref:a,className:`${tt} nb-subpages-slot-without-header-and-side`,style:n,children:(0,l.jsxs)("div",{style:to,children:[(0,l.jsx)(s.Outlet,{}),(0,l.jsx)(tn,{allAccessRoutes:t})]})})},td=e=>{let t=(0,r.useRef)(null),o=!(e.item._parentRoute||e.fallbackParentRoute);return(0,r.useEffect)(()=>{var e;t.current&&o&&(null==(e=t.current.parentElement)?void 0:e.parentElement)&&(t.current.parentElement.parentElement.style.order="999",t.current.parentElement.parentElement.style.paddingLeft="0",t.current.parentElement.parentElement.style.padding="0")},[o]),(0,l.jsx)("div",{ref:t,children:(0,l.jsx)(A,{children:e.item.name})})},tu=(e,t)=>!!e&&(!![null!=e.id?`/admin/${e.id}`:null,e.schemaUid?`/admin/${e.schemaUid}`:null].filter(Boolean).some(e=>t===e||t.startsWith(`${e}/`))||!!Array.isArray(e.children)&&e.children.some(e=>tu(e,t))),tc=async(e,t,o)=>{for(let l of e||[]){let e=await tc(l.subModels.menuItems,t,o),n=await l.hydrateLegacyPersistedStateIfCurrentPath(t,o);if(e||n)return!0}return!1},tp=(e,t,o,n,a)=>{var r,i;return(null==e?void 0:e.key)!=="x-designer-button"&&(null==e||!e.disabled||!e._launcherModel||(null==e||null==(r=e._route)?void 0:r.id)||(null==e||null==(i=e._route)?void 0:i.schemaUid))?(null==e?void 0:e._model)?(0,l.jsx)(eu,{model:e._model,item:e,dom:t,options:n,renderType:o},`admin-layout-menu-${o}-${e._model.uid}-${e.path}-${null==n?void 0:n.isMobile}-${null==n?void 0:n.collapsed}`):t:(0,l.jsx)(td,{item:e,fallbackParentRoute:a})},tm=(0,n.observer)(e=>{let t=(0,n.useFlowEngine)(),o=t.getModel(a.ADMIN_LAYOUT_MODEL_UID),[d,u]=(0,r.useState)(()=>{var e,o;return(null==(o=t.context.routeRepository)||null==(e=o.listAccessible)?void 0:e.call(o))||[]}),c=i.Grid.useBreakpoint(),p=!1===c.md||void 0===c.md&&"u">typeof window&&window.innerWidth<768,m=(0,s.useLocation)(),{token:h}=i.theme.useToken(),v=!!(null==o?void 0:o.isMobileLayout)||p,_=(null==o?void 0:o.menuRouteRefreshVersion)||0,[f,g]=(0,r.useState)(v),[b,y]=(0,r.useState)({path:"/",children:[]}),S=(0,r.useRef)(!1),k=(0,r.useCallback)(e=>"function"==typeof t.context.t?t.context.t(e,{ns:"lm-desktop-routes"}):e,[t]),C=!v&&!!t.context.flowSettingsEnabled,{styles:M}=e5(),{appList:w}=(0,a.useApplications)(),F=(0,a.useAppListRender)(),P=(0,r.useRef)(0),j=(0,r.useRef)(!1),A=(0,r.useCallback)(e=>{null==o||o.setLayoutContentElement(e)},[o]),I=(0,r.useMemo)(()=>{let e;return e=m.pathname,d.find(t=>t.type===x.q.group&&tu(t,e))},[d,m.pathname]),T=(0,r.useCallback)(e=>{let o=function(e,t){var o,l;if((null==(o=t.active)?void 0:o.id)&&(null==(l=t.over)?void 0:l.id))return function(e,t){var o,l;if(!G(e)||!G(t))return;let n=null==(o=e.getRoute)?void 0:o.call(e),a=null==(l=t.getRoute)?void 0:l.call(t);if((null==n?void 0:n.id)&&(null==a?void 0:a.id)&&n.id!==a.id)return{sourceId:n.id,targetId:a.id,sortField:"sort"}}(e.getModel(String(t.active.id)),e.getModel(String(t.over.id)))}(t,e);o&&t.context.routeRepository.moveRoute(o).catch(e=>{console.error("[NocoBase] AdminLayoutShell failed to move menu route.",e)})},[t]),D=(0,r.useCallback)(e=>{let{droppableContainers:t,pointerCoordinates:o,...l}=e;if(o&&"u">typeof document){var n;let e=document.elementFromPoint(o.x,o.y),l=null==e||null==(n=e.closest('[data-has-float-menu="true"][data-float-menu-model-uid]'))?void 0:n.getAttribute("data-float-menu-model-uid");if(l){let e=t.find(e=>String(e.id)===l);if(e)return[{id:e.id,data:{droppableContainer:e,value:Number.MAX_SAFE_INTEGER}}]}}let a=(0,eT.pointerWithin)({droppableContainers:t,pointerCoordinates:o,...l});return a.length>0?a:(0,eT.closestCenter)({droppableContainers:t,pointerCoordinates:o,...l})},[]);(0,r.useEffect)(()=>{var e;let o=t.context.routeRepository,l=()=>{u((null==o?void 0:o.listAccessible())||[])};return null==o||o.subscribe(l),null==o||null==(e=o.ensureAccessibleLoaded)||e.call(o).catch(e=>{console.error("[NocoBase] AdminLayoutComponent failed to initialize accessible routes.",e)}),()=>{null==o||o.unsubscribe(l)}},[t]),(0,r.useLayoutEffect)(()=>{null==o||o.syncMenuRoutes(d),y((null==o?void 0:o.toProLayoutRoute({designable:C,isMobile:v,t:k}))||{path:"/",children:[]})},[o,d,C,v,_,k]),(0,r.useEffect)(()=>{let e=++P.current,o=C&&!v;j.current=o;let l=async e=>{e?await t.flowSettings.enable():await t.flowSettings.disable()};return(async()=>{try{await l(o),e!==P.current&&await l(j.current)}catch(e){console.error("[NocoBase] AdminLayoutShell failed to sync flow settings state.",e)}})(),()=>{P.current===e&&(P.current+=1)}},[C,t,v]),(0,r.useEffect)(()=>{var e;tc((null==o?void 0:o.subModels.menuItems)||[],m.pathname,null==(e=t.context.router)?void 0:e.basename)},[o,d,t,m.pathname]);let L=(0,r.useMemo)(()=>({header:{colorBgHeader:h.colorBgHeader,colorTextMenu:h.colorTextHeaderMenu,colorTextMenuSelected:h.colorTextHeaderMenuActive,colorTextMenuActive:h.colorTextHeaderMenuHover,colorBgMenuItemHover:h.colorBgHeaderMenuHover,colorBgMenuItemSelected:h.colorBgHeaderMenuActive,heightLayoutHeader:46,colorHeaderTitle:h.colorTextHeaderMenu},sider:{colorMenuBackground:h.colorBgSider,colorTextMenu:h.colorTextSiderMenu,colorTextMenuSelected:h.colorTextSiderMenuActive,colorBgMenuItemSelected:h.colorBgSiderMenuActive,colorBgMenuItemActive:h.colorBgSiderMenuActive,colorBgMenuItemHover:h.colorBgSiderMenuHover},bgLayout:h.colorBgLayout}),[h]),{theme:Y,isDarkTheme:R}=(0,a.useGlobalTheme)(),B=(0,r.useMemo)(()=>({...Y,token:{...Y.token,paddingPageHorizontal:8,paddingPageVertical:8,marginBlock:12,borderRadiusBlock:8,fontSize:16},algorithm:R?[i.theme.compactAlgorithm,i.theme.darkAlgorithm]:i.theme.compactAlgorithm}),[Y,R]),N=(0,r.useCallback)(e=>{S.current||g(e)},[]),E=(0,r.useCallback)(()=>{S.current=!0,setTimeout(()=>{S.current=!1})},[]),$=(0,r.useMemo)(()=>({overflowedIndicatorPopupClassName:M.headerPopup}),[M.headerPopup]),z=(0,r.useMemo)(()=>(0,eD.css)`
375
375
  .ant-layout-header.ant-pro-layout-header,
376
376
  .ant-pro-top-nav-header {
377
377
  z-index: 101 !important;
@@ -390,7 +390,7 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
390
390
  color: ${h.colorTextHeaderMenuHover||h.colorTextHeaderMenu||"rgba(255, 255, 255, 0.85)"};
391
391
  background: ${h.colorBgHeaderMenuHover||"rgba(255, 255, 255, 0.12)"};
392
392
  }
393
- `,[h.colorBgHeaderMenuHover,h.colorTextHeaderMenu,h.colorTextHeaderMenuHover]),O=(0,r.useCallback)(()=>{v&&g(!0)},[v]),q=(0,r.useCallback)((e,t,o)=>{let l=(null==o?void 0:o.menuRenderType)==="header"?void 0:I;return tn(e,t,"item",o,l)},[I]),H=(0,r.useCallback)((e,t)=>tn(e,t,"group",void 0,I),[I]);return(0,l.jsxs)("div",{style:e0,children:[(0,l.jsx)("div",{id:"nocobase-app-container",style:e1,children:(0,l.jsx)(Q.Provider,{value:{closeMobileMenu:O},children:(0,l.jsx)(n.DndProvider,{collisionDetection:D,onDragEnd:T,children:(0,l.jsx)(eI.default,{...e,contentStyle:eV,siderWidth:h.siderWidth||200,className:`${eH} ${z}`,location:m,route:b,actionsRender:eQ,logo:(0,l.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,l.jsx)(eq,{})}),appList:w,appListRender:F,title:"",layout:"mix",splitMenus:!0,token:L,headerRender:eZ,menuItemRender:q,subMenuItemRender:H,collapsedButtonRender:eK,onCollapse:N,collapsed:f,onPageChange:E,menu:{autoClose:!1},menuProps:$,children:(0,l.jsx)(eI.RouteContext.Consumer,{children:e=>{let{isMobile:t}=e;return(0,l.jsx)(e3,{isMobile:t,children:(0,l.jsxs)(i.ConfigProvider,{theme:t?B:Y,children:[(0,l.jsx)(e9,{}),(0,l.jsx)(te,{allAccessRoutes:d,onContentElementChange:A})]})})}})},`admin-layout-menu-${_}`)})})}),(0,l.jsx)("div",{id:"nocobase-embed-container",style:e2})]})});class tr extends a.AdminLayoutModel{syncMenuRoutes(e){eo(this,Array.isArray(e)?e:[])}toProLayoutRoute(e){let t=(this.subModels.menuItems||[]).map(t=>t.toProLayoutRoute({...e,depth:0})).filter(Boolean)||[];return e.designable&&(e.isMobile?t.push(ec("schema-initializer-Menu-header",this)):t.unshift(ec("schema-initializer-Menu-header",this))),{path:"/",children:t}}render(){return(0,l.jsx)(eA,{children:(0,l.jsx)(ta,{...this.props})})}}var ti=o(78948),ts=o(38951),td=o(28601);let tu=new ts.R({name:"userCenterSettings",Component:ti.f,items:[{name:"langue",Component:()=>{var e;let{t,i18n:o}=(0,eR.useTranslation)(),n=(0,y.useAPIClient)(),{data:a}=(0,y.useSystemSettings)()||{},i=(0,r.useMemo)(()=>{var e;return(null==a||null==(e=a.data)?void 0:e.enabledLanguages)||[]},[null==a||null==(e=a.data)?void 0:e.enabledLanguages]);return i.length<2?null:(0,l.jsx)(y.SchemaSettingsSelectItem,{title:t("Language"),options:Object.keys(td.Ay).filter(e=>i.includes(e)).map(e=>({label:td.Ay[e].label,value:e})),value:o.language,onChange:async e=>{await n.resource("users").updateLang({values:{appLang:e}}),n.auth.setLocale(e),window.location.reload()}})},sort:350}]});var tc=o(88136);let tp=e=>{let t=(0,n.useFlowEngine)(),o=(0,a.getAdminLayoutModel)(t,{create:!0,props:e,use:tr});if(!o)throw Error("[NocoBase] Failed to create admin-layout-model.");return(0,l.jsx)(n.FlowModelRenderer,{model:o})};class tm extends S.k{async afterAdd(){await this.app.pm.add(y.RemoteSchemaTemplateManagerPlugin)}async load(){this.app.flowEngine.registerModels({AdminLayoutModel:tr,AdminLayoutMenuItemModel:ek}),this.app.schemaSettingsManager.add(tu),this.app.addComponents({AdminLayout:tp,AdminDynamicPage:b})}}},55976(e,t,o){o.d(t,{DR:()=>m,K7:()=>u,dI:()=>s,nr:()=>p,yb:()=>d});var l=o(71178),n=o(504),a=o(51649),r=o(40657);let i=[],s=(0,a.createContext)(null);s.displayName="NocoBaseRouteContext";let d=(0,a.memo)(e=>{let{children:t,uid:o}=e,{allAccessRoutes:n}=p(),i=(0,a.useMemo)(()=>(0,r.bl)(o,n),[o,n]);return(0,l.jsx)(s.Provider,{value:i,children:t})}),u=()=>(0,a.useContext)(s)||{},c=(0,a.createContext)({allAccessRoutes:i,refresh:async()=>i});c.displayName="AllAccessDesktopRoutesContext";let p=()=>(0,a.useContext)(c),m=e=>{let{children:t}=e,o=(0,n.useFlowEngineContext)().routeRepository,r=(0,a.useSyncExternalStore)(e=>o.subscribe(e),()=>o.listAccessible(),()=>i),[s,d]=(0,a.useState)(r.length>0);(0,a.useEffect)(()=>{let e=!0;return(async()=>{try{await o.refreshAccessible()}catch(e){console.error("[NocoBase] RoutesRequestProvider failed to refresh accessible routes.",e)}finally{e&&d(!0)}})(),()=>{e=!1}},[o]);let u=a.default.useCallback(async()=>{let e=await o.refreshAccessible();return d(!0),e},[o]),p=(0,a.useMemo)(()=>({allAccessRoutes:r,refresh:u}),[r,u]);return s?(0,l.jsx)(c.Provider,{value:p,children:t}):null}},6821(e,t,o){o.d(t,{q:()=>n});var l,n=((l={}).group="group",l.page="page",l.flowRoute="flowRoute",l.link="link",l.tabs="tabs",l.flowPage="flowPage",l)},40657(e,t,o){o.d(t,{IZ:()=>n,bl:()=>function e(t,o){if(o){for(let n of o){var l;if(t===n.schemaUid||t===n.menuSchemaUid)return n;if(null==(l=n.children)?void 0:l.length){let o=e(t,n.children);if(o)return o}}return null}},sj:()=>function e(t){if(t)for(let n of t.filter(e=>!e.hideInMenu)){var o;if(n.type===l.q.page||n.type===l.q.flowPage)return n;if(n.type===l.q.group&&(null==(o=n.children)?void 0:o.length)){let t=e(n.children);if(t)return t}}}});var l=o(6821);function n(e,t){let o=function e(t,o){for(let n of o){var l;if(Number(t)===Number(n.id))return n;if(null==(l=n.children)?void 0:l.length){let o=e(t,n.children);if(o)return o}}return null}(e,t);return(null==o?void 0:o.type)===l.q.group}},88136(e,t,o){o.d(t,{N:()=>r});var l=o(51649),n=o(90236),a=o(24);function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"uiSchemas",t=(0,a.V)(),o=(0,l.useMemo)(()=>t.resource(e),[t,e]),{refresh:r}=(0,n.nr)();return{deleteRouteSchema:(0,l.useCallback)(async e=>{if(!e)return;let t=await o[`remove/${e}`]();return r(),t},[o,r])}}},93160(e,t,o){o.d(t,{Ui:()=>l.Ui,nr:()=>l.nr,mY:()=>l.mY,Uc:()=>l.Uc,yb:()=>l.yb,PR:()=>l.PR,K7:()=>l.K7,Y:()=>l.Y,dI:()=>l.dI,xF:()=>l.xF,q2:()=>l.q2,NC:()=>l.NC,Y4:()=>l.Y4,NH:()=>l.NH,A1:()=>l.A1,yU:()=>r,X7:()=>l.X7,bl:()=>l.bl,sj:()=>l.sj});var l=o(90236),n=o(71178);o(51649);var a=o(44374);function r(){let e=(0,a.useCurrentPageUid)();return(0,n.jsx)(a.RemoteSchemaComponent,{onlyRenderProperties:!0,uid:e})}},77548(e,t,o){o.d(t,{Uv:()=>i,UK:()=>r,rd:()=>s});var l=o(52793),n=o(51649);let{ConfigContext:a}=l.ConfigProvider,r=()=>(0,n.useContext)(a),i=(e,t)=>{let{getPrefixCls:o}=(0,n.useContext)(l.ConfigProvider.ConfigContext)||{};if("ConfigContext"in l.ConfigProvider)return(null==o?void 0:o(e,null==t?void 0:t.prefixCls))||"";{let o=(null==t?void 0:t.prefixCls)??"ant-";return`${o}${e??""}`}},s=()=>l.theme.useToken()},54969(e,t,o){let l;o.d(t,{Dq:()=>y,fD:()=>S.f,i9:()=>b,Uv:()=>n.Uv,Lq:()=>r,rd:()=>n.rd});var n=o(77548),a=o(52793);let r=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Loading...",t=arguments.length>1?arguments[1]:void 0,o=null,l=setTimeout(()=>{o=a.message.loading(e)},100);try{return await t()}finally{null==o||o(),clearTimeout(l)}};var i=o(71178),s=o(56920),d=o(2314),u=o(51649),c=o(7516);let p={...c},{version:m,render:h,unmountComponentAtNode:x}=p;try{Number((m||"").split(".")[0])>=18&&p.createRoot&&(l=p.createRoot)}catch(e){}function v(e){let{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:t}=p;t&&"object"==typeof t&&(t.usingClientEntryPoint=e)}let _="__antd_mobile_root__";async function f(e){return Promise.resolve().then(()=>{var t;null==(t=e[_])||t.unmount(),delete e[_]})}let g=(0,d.observable)(new Map),b=e=>{let t=e=>(e.id&&!g.has(e.id)&&g.set(e.id,null),(0,i.jsxs)(u.Fragment,{children:[e.children,(0,i.jsx)(s.Observer,{children:()=>{if(!e.id)return(0,i.jsx)(i.Fragment,{});let t=g.get(e.id);return t?(0,c.createPortal)(t,document.body):(0,i.jsx)(i.Fragment,{})}})]}));return t.defaultProps={id:e},t};function y(e,t){return{render:function(o){g.has(t)?g.set(t,null==o?void 0:o()):e&&function(e,t){if(l){let o;return v(!0),o=t[_]||l(t),v(!1),o.render(e),t[_]=o}h(e,t)}((0,i.jsx)(u.Fragment,{children:null==o?void 0:o()}),e)},unmount:function(){var o,n;if(g.has(t)&&g.set(t,null),e&&(o=e,l?f(o):x(o))&&e.parentNode){null==(n=e.parentNode)||n.removeChild(e)}}}}var S=o(54944)},54944(e,t,o){o.d(t,{f:()=>i});var l=o(41196),n=o(27404),a=o(77548),r=o(51649);let i=(e,t)=>o=>{let{theme:i,token:s,hashId:d}=(0,a.rd)(),{getPrefixCls:u,iconPrefixCls:c}=(0,a.UK)(),p=(0,a.Uv)(e),m=u(),h=(0,l.useStyleRegister)({theme:i,token:s,hashId:d,path:["formily-antd",e,p,c]},()=>{let e=`.${p}`,l=t((0,n.merge)(s,{componentCls:e,prefixCls:p,iconCls:`.${c}`,antCls:`.${m}`}),o,{hashId:d,prefixCls:p,rootPrefixCls:m,iconPrefixCls:c});return[((e,t)=>{let{fontFamily:o,fontSize:l}=e,n=`[class^="${t}"], [class*=" ${t}"]`;return{[n]:{fontFamily:o,fontSize:l,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[n]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}})(s,p),l]});return{wrapSSR:(0,r.useMemo)(()=>h,[i,s,d,p,c,m,o]),hashId:d,componentCls:p,rootPrefixCls:m}}},65136(e,t,o){o.d(t,{A:()=>p});var l=o(71178),n=o(56920),a=o(51649),r=o(78562),i=o(30644),s=o(38693),d=o(45249);let u=a.default.createContext(0),c=(0,n.observer)(e=>{let{getComponentByOpenMode:t,defaultOpenMode:o}=(0,s.k)()||{},{openMode:n=e.openMode||o}=(0,r.D5)(),i=a.default.useContext(u)+1,c=t(n)||d.sC;return(0,l.jsx)(u.Provider,{value:i,children:(0,l.jsx)(c,{footerNodeName:"Action.Container.Footer",level:i||1,...e})})},{displayName:"ActionContainer"});c.Footer=(0,n.observer)(()=>{let e=(0,n.useField)(),t=(0,n.useFieldSchema)();return(0,l.jsx)(i.dw,{basePath:e.address,schema:t,onlyRenderProperties:!0})},{displayName:"ActionContainer.Footer"});let p=c},45036(e,t,o){o.d(t,{zN:()=>D,TB:()=>I,d0:()=>B,Kq:()=>R,Yp:()=>A,ud:()=>q,VX:()=>$,U6:()=>O,Sh:()=>z,Mo:()=>N,Rh:()=>T,Gj:()=>Y});var l=o(71178),n=o(56920),a=o(27404),r=o(52793),i=o(51649),s=o(77843),d=o(61013),u=o(95951),c=o(17157),p=o(45560),m=o(31675),h=o(49629),x=o(43288);let v=null;var _=o(69575),f=o(27778),g=o(38693),b=o(18272),y=o(23620),S=o(77490),k=o(83508),C=o(50570),M=o(51275),w=o(59155),F=o(91198),P=o(96123),j=o(28227);function A(e){var t,o,a,r,i;let d=(0,n.useField)(),c=(0,n.useFieldSchema)(),{dn:p}=(0,u.er)(),{t:m}=(0,s.useTranslation)(),h=(null==e?void 0:e.isLink)||"Action.Link"===c["x-component"];return(0,l.jsx)(S.fY,{title:m("Edit button"),schema:{type:"object",title:m("Edit button"),properties:{title:{"x-decorator":"FormItem","x-component":"Input",title:m("Button title"),default:c.title,"x-component-props":{}},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:m("Button icon"),default:null==c||null==(t=c["x-component-props"])?void 0:t.icon,"x-component-props":{}},onlyIcon:{"x-decorator":"FormItem","x-component":"Checkbox",title:m("Icon only"),default:null==c||null==(o=c["x-component-props"])?void 0:o.onlyIcon,"x-component-props":{},"x-visible":h,"x-reactions":[{dependencies:["icon"],fulfill:{state:{hidden:"{{!$deps[0]}}"}}}]},iconColor:{title:m("Color"),required:!0,default:(null==c||null==(a=c["x-component-props"])?void 0:a.iconColor)||"#1677FF","x-hidden":!e.hasIconColor,"x-component":"ColorPicker","x-decorator":"FormItem"},type:{"x-decorator":"FormItem","x-component":"Radio.Group",title:m("Button background color"),default:(null==c||null==(r=c["x-component-props"])?void 0:r.danger)?"danger":(null==c||null==(i=c["x-component-props"])?void 0:i.type)==="primary"?"primary":"default",enum:[{value:"default",label:'{{t("Default")}}'},{value:"primary",label:'{{t("Highlight")}}'},{value:"danger",label:'{{t("Danger red")}}'}],"x-visible":!e.hasIconColor&&!h}}},onSubmit:e=>{let{title:t,icon:o,type:l,iconColor:n,onlyIcon:a}=e;d.address.toString()===c.name?(d.title=t,d.componentProps.iconColor=n,d.componentProps.icon=o,d.componentProps.danger="danger"===l,d.componentProps.type=l||d.componentProps.type,d.componentProps.onlyIcon=a):d.form.query(RegExp(`.${c.name}$`)).forEach(e=>{e.title=t,e.componentProps.iconColor=n,e.componentProps.icon=o,e.componentProps.danger="danger"===l,e.componentProps.type=l||e.componentProps.type,e.componentProps.onlyIcon=a}),c.title=t,c["x-component-props"]=c["x-component-props"]||{},c["x-component-props"].iconColor=n,c["x-component-props"].icon=o,c["x-component-props"].danger="danger"===l,c["x-component-props"].type=l||d.componentProps.type,c["x-component-props"].onlyIcon=a,p.emit("patch",{schema:{"x-uid":c["x-uid"],title:t,"x-component-props":{...c["x-component-props"]}}}),p.refresh()}})}function I(){var e,t;let{dn:o}=(0,u.er)(),{t:r}=(0,s.useTranslation)(),d=(0,n.useFieldSchema)(),c={type:"void","x-uid":(0,a.uid)(),"x-component":"Grid","x-initializer":"assignFieldValuesForm:configureFields"};d["x-template-uid"]&&(c["x-template-root-ref"]={"x-template-uid":d["x-template-uid"],"x-path":"x-action-settings.schemaUid"});let p={"customize:update":r("After clicking the custom button, the following fields of the current record will be saved according to the following form."),"customize:save":r("After clicking the custom button, the following fields of the current record will be saved according to the following form.")},m=d["x-action"]??"",h=(0,i.useCallback)(e=>{d["x-action-settings"].assignedValues=e,o.emit("patch",{schema:{"x-uid":d["x-uid"],"x-action-settings":d["x-action-settings"]}})},[o,d]);return(0,l.jsx)(_.UU,{isInAssignFieldValues:!0,children:(0,l.jsx)(k.UY,{isAllowToSetDefaultValue:()=>!1,children:(0,l.jsx)(S.l,{title:r("Assign field values"),initialSchema:c,initialValues:null==d||null==(e=d["x-action-settings"])?void 0:e.assignedValues,modalTip:p[m],uid:null==d||null==(t=d["x-action-settings"])?void 0:t.schemaUid,onSubmit:h})})})}function T(){var e;let{dn:t}=(0,u.er)(),{t:o}=(0,s.useTranslation)(),a=(0,n.useFieldSchema)();return(0,l.jsx)(S.l,{title:o("Request settings"),schema:F.K_,initialValues:null==a||null==(e=a["x-action-settings"])?void 0:e.requestSettings,onSubmit:e=>{a["x-action-settings"].requestSettings=e,t.emit("patch",{schema:{"x-uid":a["x-uid"],"x-action-settings":a["x-action-settings"]}}),t.refresh()}})}function D(){var e;let{dn:t}=(0,u.er)(),{t:o}=(0,s.useTranslation)(),a=(0,n.useFieldSchema)();return(0,l.jsx)(S.Qd,{title:o("Skip required validation"),checked:!!(null==a||null==(e=a["x-action-settings"])?void 0:e.skipValidator),onChange:e=>{a["x-action-settings"].skipValidator=e,t.emit("patch",{schema:{"x-uid":a["x-uid"],"x-action-settings":{...a["x-action-settings"]}}})}})}let L={value:"value",label:"label"},Y=e=>{let{getAllDataBlocks:t}=(0,C.dW)(),o=t(),n=(0,d.l)(),{t:a}=(0,s.useTranslation)(),u=(0,i.useMemo)(()=>o.map(e=>{var t;return(null==(t=e.dom)?void 0:t.isConnected)?{label:`${n(e.collection.title)} #${e.uid.slice(0,4)}`,value:e.uid,onMouseEnter(){var t;let o,l;e.highlightBlock(),o=document.querySelector(".dialog-after-successful-submission > .ant-modal-mask"),l=document.querySelector(".dialog-after-successful-submission > .ant-modal-wrap"),o&&(o.style.opacity="0",o.style.transition="opacity 0.5s ease"),l&&(l.style.opacity="0",l.style.transition="opacity 0.5s ease"),t=e.dom,t._timer=setInterval(()=>{let o=t._prevRect,l=t.getBoundingClientRect();o&&l.top===o.top?(clearInterval(t._timer),(()=>{var t,o;t=e.dom.cloneNode(!0),o=e.dom.getBoundingClientRect(),v||(v=document.createElement("div"),document.body.appendChild(v),v.style.position="absolute",v.style.transition="opacity 0.3s ease",v.style.pointerEvents="none"),v.appendChild(t),v.style.opacity="1",v.style.width=`${o.width}px`,v.style.height=`${o.height}px`,v.style.top=`${o.top}px`,v.style.left=`${o.left}px`,v.style.zIndex="2000"})()):t._prevRect=l},100)},onMouseLeave(){var t;let o,l;e.unhighlightBlock(),o=document.querySelector(".dialog-after-successful-submission > .ant-modal-mask"),l=document.querySelector(".dialog-after-successful-submission > .ant-modal-wrap"),o&&(o.style.opacity="1",o.style.transition="opacity 0.5s ease"),l&&(l.style.opacity="1",l.style.transition="opacity 0.5s ease"),(t=e.dom)._timer&&(clearInterval(t._timer),t._timer=null),v&&(v.style.opacity="0",v.innerHTML="")}}:null}).filter(Boolean),[o,a]);return(0,l.jsx)(r.Select,{value:e.value,mode:"multiple",allowClear:!0,placeholder:a("Select data blocks to refresh"),options:u,onChange:e.onChange})};function R(){var e;let{dn:t}=(0,u.er)(),{t:o}=(0,s.useTranslation)(),a=(0,n.useFieldSchema)(),{onSuccess:r}=(null==a?void 0:a["x-action-settings"])||{},i=(0,p.$)("$env"),d=(0,c.nu)("@nocobase/plugin-block-template"),m=null==d||null==(e=d.isInBlockTemplateConfigPage)?void 0:e.call(d);return(0,l.jsx)(S.fY,{dialogRootClassName:"dialog-after-successful-submission",width:700,title:o("After successful submission"),initialValues:r?{actionAfterSuccess:(null==r?void 0:r.redirecting)?"redirect":"previous",...r}:{manualClose:!1,redirecting:!1,successMessage:'{{t("Saved successfully")}}',actionAfterSuccess:"previous"},schema:{type:"object",title:o("After successful submission"),properties:{successMessage:{title:o("Popup message"),"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{}},manualClose:{title:o("Message popup close method"),enum:[{label:o("Automatic close"),value:!1},{label:o("Manually close"),value:!0}],"x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{}},redirecting:{title:o("Then"),"x-hidden":!0,enum:[{label:o("Stay on current page"),value:!1},{label:o("Redirect to"),value:!0}],"x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{},"x-reactions":{target:"redirectTo",fulfill:{state:{visible:"{{!!$self.value}}"}}}},actionAfterSuccess:{title:o("Action after successful submission"),enum:[{label:o("Stay on the current popup or page"),value:"stay"},{label:o("Return to the previous popup or page"),value:"previous"},{label:o("Redirect to"),value:"redirect"}],"x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{},"x-reactions":{target:"redirectTo",fulfill:{state:{visible:"{{$self.value==='redirect'}}"}}}},redirectTo:{title:o("Link"),"x-decorator":"FormItem","x-component":"Variable.TextArea","x-use-component-props":()=>({scope:[i,...(0,w.b)()].filter(Boolean),fieldNames:L})},blocksToRefresh:{type:"array",title:o("Refresh data blocks"),"x-decorator":"FormItem","x-use-decorator-props":()=>({tooltip:o("After successful submission, the selected data blocks will be automatically refreshed.")}),"x-component":Y,"x-hidden":m}}},onSubmit:e=>{a["x-action-settings"].onSuccess=e,t.emit("patch",{schema:{"x-uid":a["x-uid"],"x-action-settings":a["x-action-settings"]}})}})}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{t}=(0,s.useTranslation)(),o=(0,n.useFieldSchema)();return(null==o?void 0:o.parent["x-component"])!=="CollectionField"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(S.kT,{}),(0,l.jsx)(S.d$,{removeParentsIfNoChildren:!0,breakRemoveOn:e=>"Space"===e["x-component"]||e["x-component"].endsWith("ActionBar"),disabled:e.disabled,confirm:{title:t("Delete action"),onOk:e.onConfirmOk}})]})}let N=[{name:"Customize",Component:e=>e.children,children:[{name:"editButton",Component:A,useComponentProps(){let{buttonEditorProps:e}=(0,h.C5)();return e}},{name:"linkageRules",Component:e=>(0,l.jsx)(S.f9,{...e}),useVisible(){let e=(0,M.Lt)(),{linkageAction:t}=(0,h.C5)();return t||e},useComponentProps(){let{name:e}=(0,x.k7)(),{linkageRulesProps:t}=(0,h.C5)();return{...t,collectionName:e}}},{name:"openMode",Component:b.sm,useComponentProps(){let{hideOpenMode:e}=(0,g.k)(),t=["create","update","view","customize:popup","duplicate","customize:create"].includes((0,n.useFieldSchema)()["x-action"]||"");return{openMode:t&&!e,openSize:t&&!e}}},{name:"secondConFirm",Component:$,useVisible(){var e;let t=(0,n.useFieldSchema)();return!["create","update","view","customize:popup","duplicate","customize:create"].includes(t["x-action"]||"")&&!(null==t||null==(e=t["x-action-settings"])?void 0:e.disableSecondConFirm)}},{name:"assignFieldValues",Component:I,useVisible(){var e;let t=(0,n.useFieldSchema)();return(0,a.isValid)(null==t||null==(e=t["x-action-settings"])?void 0:e.assignedValues)}},{name:"requestSettings",Component:T,useVisible(){var e;let t=(0,n.useFieldSchema)();return(0,a.isValid)(null==t||null==(e=t["x-action-settings"])?void 0:e.requestSettings)}},{name:"skipValidator",Component:D,useVisible(){var e;let t=(0,n.useFieldSchema)();return(0,a.isValid)(null==t||null==(e=t["x-action-settings"])?void 0:e.skipValidator)}},{name:"afterSuccess",Component:R,useVisible(){var e;let t=(0,n.useFieldSchema)();return(0,a.isValid)(null==t||null==(e=t["x-action-settings"])?void 0:e.onSuccess)}},{name:"saveMode",Component:f.P,useVisible(){var e;let t=(0,n.useFieldSchema)();return"submit"===t["x-action"]&&(0,c.qt)(null==(e=t.parent)?void 0:e["x-initializer"],"createForm:configureActions")}},{name:"enableChildCollections",Component:S.DE,useVisible(){let e=(0,n.useFieldSchema)(),{name:t}=(0,x.k7)(),{getChildrenCollections:o}=(0,x.nj)();return o(t).length>0&&"create"===e["x-action"]},useComponentProps(){let{name:e}=(0,x.k7)();return{collectionName:e}}},{name:"refreshDataBlockRequest",Component:q,useComponentProps:()=>({isPopupAction:!1}),useVisible(){var e;let t=(0,n.useFieldSchema)();return(0,a.isValid)(null==t||null==(e=t["x-action-settings"])?void 0:e.triggerWorkflows)}},{type:"switch",name:"clearDefaultValue",useComponentProps(){var e;let{t}=(0,s.useTranslation)(),o=(0,n.useFieldSchema)(),{dn:l}=(0,u.er)();return{title:t("Clear default value"),checked:null==o||null==(e=o["x-component-props"])?void 0:e.clearDefaultValue,onChange:e=>{l.deepMerge({"x-uid":o["x-uid"],"x-component-props":{clearDefaultValue:e}})}}},useVisible:()=>"useResetBlockActionProps"===(0,n.useFieldSchema)()["x-use-component-props"]},{name:"remove",sort:100,Component:B,useComponentProps(){let{removeButtonProps:e}=(0,h.C5)();return e},useVisible(){var e;let t=(0,n.useFieldSchema)();return(null==t||null==(e=t["x-action-settings"])?void 0:e.removable)!==!1}}]}],E=()=>{let e=(0,n.useFieldSchema)(),t=(0,n.useForm)(),o=(0,j.zv)();return(0,P._)({collectionField:{uiSchema:e},form:t,record:o,uiSchema:e,noDisabled:!0})};function $(){var e,t,o,a,r,i,c,p,m,h,x,v;let{dn:_}=(0,u.er)(),f=(0,n.useFieldSchema)(),{t:g}=(0,s.useTranslation)(),b=(0,n.useField)(),y=(0,d.l)();return(0,l.jsx)(S.fY,{title:g("Secondary confirmation"),initialValues:{title:g(null==f||null==(t=f["x-component-props"])||null==(e=t.confirm)?void 0:e.title,{title:y(f.title)})||y(null==f||null==(a=f["x-component-props"])||null==(o=a.confirm)?void 0:o.title)||g("Perform the {{title}}",{title:y(f.title)}),content:g(null==f||null==(i=f["x-component-props"])||null==(r=i.confirm)?void 0:r.content,{title:y(f.title)})||y(null==f||null==(p=f["x-component-props"])||null==(c=p.confirm)?void 0:c.content)||g("Are you sure you want to perform the {{title}} action?",{title:y(f.title)})},schema:{type:"object",title:g("Secondary confirmation"),properties:{enable:{"x-decorator":"FormItem","x-component":"Checkbox","x-content":g("Enable secondary confirmation"),default:(null==f||null==(h=f["x-component-props"])||null==(m=h.confirm)?void 0:m.enable)!==!1&&!!(null==f||null==(v=f["x-component-props"])||null==(x=v.confirm)?void 0:x.content),"x-component-props":{}},title:{"x-decorator":"FormItem","x-component":"Variable.RawTextArea",title:g("Title"),"x-component-props":{scope:E},"x-reactions":{dependencies:["enable"],fulfill:{state:{required:"{{$deps[0]}}"}}}},content:{"x-decorator":"FormItem","x-component":"Variable.RawTextArea",title:g("Content"),"x-component-props":{scope:E},"x-reactions":{dependencies:["enable"],fulfill:{state:{required:"{{$deps[0]}}"}}}}}},onSubmit:e=>{var t;let{enable:o,title:l,content:n}=e;f["x-component-props"]=f["x-component-props"]||{},f["x-component-props"].confirm={},f["x-component-props"].confirm.enable=o,f["x-component-props"].confirm.title=l,f["x-component-props"].confirm.content=n,b.componentProps.confirm={...null==(t=f["x-component-props"])?void 0:t.confirm},_.emit("patch",{schema:{"x-uid":f["x-uid"],"x-component-props":{...f["x-component-props"]}}}),_.refresh()}})}let z=new m.RT({name:"ActionSettings",items:N}),O=e=>{let{modalTip:t,linkageAction:o,removeButtonProps:a,buttonEditorProps:r,linkageRulesProps:i,schemaSettings:s="ActionSettings",enableDrag:d=!0,...u}=e,p=(0,c.nm)(),m=(0,n.useFieldSchema)(),h=(null==m?void 0:m.parent["x-component"])!=="CollectionField"&&d,x=`ActionSettings:${m["x-action"]}`,v=p.schemaSettingsManager.has(x);return(0,l.jsx)(y.xK,{schemaSettings:v?x:s||"ActionSettings",contextValue:{modalTip:t,linkageAction:o,removeButtonProps:a,buttonEditorProps:r,linkageRulesProps:i},...u,disableInitializer:!0,draggable:h})};function q(e){let{dn:t}=(0,u.er)(),o=(0,n.useFieldSchema)(),{t:a}=(0,s.useTranslation)(),{refreshDataBlockRequest:r}=(null==o?void 0:o["x-component-props"])||{};return(0,l.jsx)(S.Qd,{title:a("Refresh data on action"),checked:!1!==r,onChange:e=>{o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].refreshDataBlockRequest=e,t.emit("patch",{schema:{"x-uid":o["x-uid"],"x-component-props":{...o["x-component-props"]}}})}})}O.ButtonEditor=A,O.RemoveButton=B},45249(e,t,o){o.d(t,{Ay:()=>M,sC:()=>C});var l=o(71178),n=o(56920),a=o(52793),r=o(94046),i=o(77843),s=o(51649),d=o(64679),u=o(30644),c=o(57610),p=o(44388),m=o(87498);let h=(0,o(54969).fD)("nb-action-drawer",e=>{let{componentCls:t}=e;return{[t]:{overflow:"hidden","&.reset":{"&.nb-action-popup":{".ant-drawer-header":{display:"none"},".ant-drawer-body":{paddingTop:e.paddingContentVerticalLG,backgroundColor:e.colorBgLayout,paddingBottom:0}},"&.nb-record-picker-selector":{".ant-drawer-content":{backgroundColor:e.colorBgLayout},".nb-block-item":{marginBottom:e.marginBlock,".general-schema-designer":{top:-e.sizeXS,bottom:-e.sizeXS,left:-e.sizeXS,right:-e.sizeXS}}}},".footer":{display:"flex",justifyContent:"flex-end",width:"100%",".ant-btn":{marginRight:e.marginXS}},".ant-drawer-content-wrapper":{borderLeft:"1px solid rgba(255, 255, 255, 0.1)"},".ant-tabs-nav":{paddingLeft:e.paddingLG-e.paddingPageHorizontal,paddingRight:e.paddingLG-e.paddingPageHorizontal,marginLeft:e.paddingPageHorizontal-e.paddingLG,marginRight:e.paddingPageHorizontal-e.paddingLG}}}});var x=o(22204),v=o(51275);o(69926);var _=o(76058),f=o(839);let g=s.default.memo(n.RecursionField);g.displayName="MemoizeRecursionField";let b=e=>{let{visible:t,setVisible:o}=(0,v.D5)();return(0,l.jsx)(a.Drawer,{open:t,onClose:()=>o(!1,!0),width:"50%",children:(0,l.jsx)(c.x,{...e})})},y=new Map([["small","30%"],["middle","50%"],["large","70%"]]),S=s.default.memo(e=>{let{footerNodeName:t,field:o,schema:n}=e,[a,r]=(0,s.useState)(!1),i=(0,s.useCallback)(e=>e["x-component"]!==t,[t]);return((0,s.useEffect)(()=>{(0,s.startTransition)(()=>{r(!0)})},[]),a)?(0,l.jsx)(u.dw,{basePath:o.address,schema:n,onlyRenderProperties:!0,filterProperties:i}):null});S.displayName="ActionDrawerContent";let k=(0,n.observer)(e=>{let{footerNodeName:t="Action.Drawer.Footer",zIndex:o,onClose:d,...u}=e,{visible:c,setVisible:b,openSize:k="middle",drawerProps:C}=(0,v.D5)(),M=(0,n.useFieldSchema)(),w=(0,n.useField)(),{t:F}=(0,i.useTranslation)(),{componentCls:P,hashId:j}=h(),A=(0,m.f)(),I=(0,_.$5)(),T=M.reduceProperties((e,o)=>o["x-component"]===t?o:e),{hidden:D}=(0,p.IX)(),L=(0,s.useMemo)(()=>({...null==C?void 0:C.style,...null==u?void 0:u.style,display:D?"none":"block"}),[D,null==C?void 0:C.style,null==u?void 0:u.style]),Y=s.default.useMemo(()=>document.querySelector("#nocobase-app-container")||document.body,[]),R=(0,_.fl)("drawer",o||I,e.level||0),B=(0,s.useCallback)(e=>{b(!1,!0),null==d||d(e)},[b,d]),N=(0,s.useCallback)(e=>e["x-component"]===t,[t]);return(0,l.jsx)(x.Wi,{children:(0,l.jsx)(_.E.Provider,{value:R,children:(0,l.jsx)(m.h,{...A,tabBarExtraContent:null,children:(0,l.jsx)(a.Drawer,{getContainer:Y,zIndex:R,width:y.get(k),title:"string"==typeof w.title?F(w.title,{ns:f.z}):w.title,...u,...C,rootStyle:L,destroyOnClose:!0,open:c,onClose:B,rootClassName:(0,r.default)(P,j,null==C?void 0:C.className,u.className,"reset"),footer:T&&(0,l.jsx)("div",{className:"footer",children:(0,l.jsx)(g,{basePath:w.address,schema:M,onlyRenderProperties:!0,filterProperties:N})}),children:(0,l.jsx)(S,{footerNodeName:t,field:w,schema:M})})})})})},{displayName:"InternalActionDrawer"}),C=s.default.memo(e=>(0,l.jsx)(d.ErrorBoundary,{FallbackComponent:b,onError:console.log,children:(0,l.jsx)(k,{...e})}));C.displayName="ActionDrawer",C.Footer=(0,n.observer)(()=>{let e=(0,n.useField)(),t=(0,n.useFieldSchema)();return(0,l.jsx)(g,{basePath:e.address,schema:t,onlyRenderProperties:!0})},{displayName:"ActionDrawer.Footer"}),C.FootBar=(0,n.observer)(()=>{let e=(0,n.useField)(),t=(0,n.useFieldSchema)();return(0,l.jsx)("div",{className:"ant-drawer-footer",style:{position:"absolute",bottom:0,right:0,left:0},children:(0,l.jsx)("div",{className:"footer",children:(0,l.jsx)(g,{basePath:e.address,schema:t,onlyRenderProperties:!0})})})},{displayName:"ActionDrawer.FootBar"});let M=C},51223(e,t,o){o.d(t,{cX:()=>S,Ay:()=>k});var l=o(71178),n=o(10691),a=o(56920),r=o(52793),i=o(94046),s=o(51649),d=o(64679),u=o(30644),c=o(49948),p=o(57610),m=o(44388),h=o(87498),x=o(22204),v=o(51275);o(77014);var _=o(76058);let f=e=>{let{visible:t,setVisible:o}=(0,v.D5)();return(0,l.jsx)(r.Modal,{open:t,onCancel:()=>o(!1,!0),width:"60%",children:(0,l.jsx)(p.x,{...e})})},g=new Map([["small","40%"],["middle","60%"],["large","80%"]]),b=s.default.memo(e=>{let{footerNodeName:t,field:o,schema:n}=e,[a,r]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{(0,s.startTransition)(()=>{r(!0)})},[]),a)?(0,l.jsx)(u.dw,{basePath:o.address,schema:n,onlyRenderProperties:!0,filterProperties:e=>e["x-component"]!==t}):null}),y=(0,a.observer)(e=>{let{footerNodeName:t="Action.Modal.Footer",width:o,zIndex:d,delay:p=200,...f}=e,{visible:y,setVisible:S,openSize:k="middle",modalProps:C}=(0,v.D5)(),M=o??g.get(k),w=(0,a.useFieldSchema)(),F=(0,a.useField)(),{token:P}=(0,c.K)(),j=(0,h.f)(),A=(0,_.$5)(),I=w.reduceProperties((e,o)=>o["x-component"]===t?o:e),{hidden:T}=(0,m.IX)(),D=!!I,L=s.default.useMemo(()=>document.querySelector("#nocobase-app-container")||document.body,[]),Y=(0,_.fl)("modal",d||A,e.level||0),R=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,[o,l]=(0,s.useState)(0===t);return(0,s.useEffect)(()=>{if(!o)if(e){let e=setTimeout(()=>l(!0),t);return()=>clearTimeout(e)}else l(!1)},[t,o,e]),o}(y,p);return(0,l.jsx)(x.Wi,{children:(0,l.jsx)(_.E.Provider,{value:Y,children:(0,l.jsx)(h.h,{...j,tabBarExtraContent:null,children:(0,l.jsx)(r.Modal,{getContainer:L,zIndex:T?-1:Y,width:M,title:F.title,...f,...C,style:{...null==C?void 0:C.style,...null==f?void 0:f.style},destroyOnClose:!0,open:y,onCancel:()=>{S(!1,!0)},className:(0,i.default)(f.className,null==C?void 0:C.className,(0,n.css)`
393
+ `,[h.colorBgHeaderMenuHover,h.colorTextHeaderMenu,h.colorTextHeaderMenuHover]),O=(0,r.useCallback)(()=>{v&&g(!0)},[v]),q=(0,r.useCallback)((e,t,o)=>{let l=(null==o?void 0:o.menuRenderType)==="header"?void 0:I;return tp(e,t,"item",o,l)},[I]),H=(0,r.useCallback)((e,t)=>tp(e,t,"group",void 0,I),[I]);return(0,l.jsxs)("div",{style:e8,children:[(0,l.jsx)("div",{id:"nocobase-app-container",style:e3,children:(0,l.jsx)(Q.Provider,{value:{closeMobileMenu:O},children:(0,l.jsx)(n.DndProvider,{collisionDetection:D,onDragEnd:T,children:(0,l.jsx)(eI.default,{...e,contentStyle:eQ,siderWidth:h.siderWidth||200,className:`${eZ} ${z}`,location:m,route:b,actionsRender:e9,logo:(0,l.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,l.jsx)(eX,{})}),appList:w,appListRender:F,title:"",layout:"mix",splitMenus:!0,token:L,headerRender:e6,menuItemRender:q,subMenuItemRender:H,collapsedButtonRender:e2,onCollapse:N,collapsed:f,onPageChange:E,menu:{autoClose:!1},menuProps:$,children:(0,l.jsx)(eI.RouteContext.Consumer,{children:e=>{let{isMobile:t}=e,o=t||p;return(0,l.jsx)(ti,{isMobile:t,children:(0,l.jsxs)(i.ConfigProvider,{theme:t?B:Y,children:[(0,l.jsx)(ta,{}),(0,l.jsx)(eH,{responsive:o,children:(0,l.jsx)(ts,{allAccessRoutes:d,onContentElementChange:A})})]})})}})},`admin-layout-menu-${_}`)})})}),(0,l.jsx)("div",{id:"nocobase-embed-container",style:te})]})});class th extends a.AdminLayoutModel{syncMenuRoutes(e){eo(this,Array.isArray(e)?e:[])}toProLayoutRoute(e){let t=(this.subModels.menuItems||[]).map(t=>t.toProLayoutRoute({...e,depth:0})).filter(Boolean)||[];return e.designable&&(e.isMobile?t.push(ec("schema-initializer-Menu-header",this)):t.unshift(ec("schema-initializer-Menu-header",this))),{path:"/",children:t}}render(){return(0,l.jsx)(eA,{children:(0,l.jsx)(tm,{...this.props})})}}var tx=o(78948),tv=o(38951),t_=o(28601);let tf=new tv.R({name:"userCenterSettings",Component:tx.f,items:[{name:"langue",Component:()=>{var e;let{t,i18n:o}=(0,eR.useTranslation)(),n=(0,y.useAPIClient)(),{data:a}=(0,y.useSystemSettings)()||{},i=(0,r.useMemo)(()=>{var e;return(null==a||null==(e=a.data)?void 0:e.enabledLanguages)||[]},[null==a||null==(e=a.data)?void 0:e.enabledLanguages]);return i.length<2?null:(0,l.jsx)(y.SchemaSettingsSelectItem,{title:t("Language"),options:Object.keys(t_.Ay).filter(e=>i.includes(e)).map(e=>({label:t_.Ay[e].label,value:e})),value:o.language,onChange:async e=>{await n.resource("users").updateLang({values:{appLang:e}}),n.auth.setLocale(e),window.location.reload()}})},sort:350}]});var tg=o(88136);let tb=e=>{let t=(0,n.useFlowEngine)(),o=(0,a.getAdminLayoutModel)(t,{create:!0,props:e,use:th});if(!o)throw Error("[NocoBase] Failed to create admin-layout-model.");return(0,l.jsx)(n.FlowModelRenderer,{model:o})};class ty extends S.k{async afterAdd(){await this.app.pm.add(y.RemoteSchemaTemplateManagerPlugin)}async load(){this.app.flowEngine.registerModels({AdminLayoutModel:th,AdminLayoutMenuItemModel:ek}),this.app.schemaSettingsManager.add(tf),this.app.addComponents({AdminLayout:tb,AdminDynamicPage:b})}}},55976(e,t,o){o.d(t,{DR:()=>m,K7:()=>u,dI:()=>s,nr:()=>p,yb:()=>d});var l=o(71178),n=o(504),a=o(51649),r=o(40657);let i=[],s=(0,a.createContext)(null);s.displayName="NocoBaseRouteContext";let d=(0,a.memo)(e=>{let{children:t,uid:o}=e,{allAccessRoutes:n}=p(),i=(0,a.useMemo)(()=>(0,r.bl)(o,n),[o,n]);return(0,l.jsx)(s.Provider,{value:i,children:t})}),u=()=>(0,a.useContext)(s)||{},c=(0,a.createContext)({allAccessRoutes:i,refresh:async()=>i});c.displayName="AllAccessDesktopRoutesContext";let p=()=>(0,a.useContext)(c),m=e=>{let{children:t}=e,o=(0,n.useFlowEngineContext)().routeRepository,r=(0,a.useSyncExternalStore)(e=>o.subscribe(e),()=>o.listAccessible(),()=>i),[s,d]=(0,a.useState)(r.length>0);(0,a.useEffect)(()=>{let e=!0;return(async()=>{try{await o.refreshAccessible()}catch(e){console.error("[NocoBase] RoutesRequestProvider failed to refresh accessible routes.",e)}finally{e&&d(!0)}})(),()=>{e=!1}},[o]);let u=a.default.useCallback(async()=>{let e=await o.refreshAccessible();return d(!0),e},[o]),p=(0,a.useMemo)(()=>({allAccessRoutes:r,refresh:u}),[r,u]);return s?(0,l.jsx)(c.Provider,{value:p,children:t}):null}},6821(e,t,o){o.d(t,{q:()=>n});var l,n=((l={}).group="group",l.page="page",l.flowRoute="flowRoute",l.link="link",l.tabs="tabs",l.flowPage="flowPage",l)},40657(e,t,o){o.d(t,{IZ:()=>n,bl:()=>function e(t,o){if(o){for(let n of o){var l;if(t===n.schemaUid||t===n.menuSchemaUid)return n;if(null==(l=n.children)?void 0:l.length){let o=e(t,n.children);if(o)return o}}return null}},sj:()=>function e(t){if(t)for(let n of t.filter(e=>!e.hideInMenu)){var o;if(n.type===l.q.page||n.type===l.q.flowPage)return n;if(n.type===l.q.group&&(null==(o=n.children)?void 0:o.length)){let t=e(n.children);if(t)return t}}}});var l=o(6821);function n(e,t){let o=function e(t,o){for(let n of o){var l;if(Number(t)===Number(n.id))return n;if(null==(l=n.children)?void 0:l.length){let o=e(t,n.children);if(o)return o}}return null}(e,t);return(null==o?void 0:o.type)===l.q.group}},88136(e,t,o){o.d(t,{N:()=>r});var l=o(51649),n=o(7819),a=o(24);function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"uiSchemas",t=(0,a.V)(),o=(0,l.useMemo)(()=>t.resource(e),[t,e]),{refresh:r}=(0,n.nr)();return{deleteRouteSchema:(0,l.useCallback)(async e=>{if(!e)return;let t=await o[`remove/${e}`]();return r(),t},[o,r])}}},93160(e,t,o){o.d(t,{Ui:()=>l.Ui,nr:()=>l.nr,mY:()=>l.mY,Uc:()=>l.Uc,yb:()=>l.yb,PR:()=>l.PR,K7:()=>l.K7,Y:()=>l.Y,dI:()=>l.dI,xF:()=>l.xF,q2:()=>l.q2,NC:()=>l.NC,Y4:()=>l.Y4,NH:()=>l.NH,A1:()=>l.A1,yU:()=>r,X7:()=>l.X7,bl:()=>l.bl,sj:()=>l.sj});var l=o(7819),n=o(71178);o(51649);var a=o(44374);function r(){let e=(0,a.useCurrentPageUid)();return(0,n.jsx)(a.RemoteSchemaComponent,{onlyRenderProperties:!0,uid:e})}},77548(e,t,o){o.d(t,{Uv:()=>i,UK:()=>r,rd:()=>s});var l=o(52793),n=o(51649);let{ConfigContext:a}=l.ConfigProvider,r=()=>(0,n.useContext)(a),i=(e,t)=>{let{getPrefixCls:o}=(0,n.useContext)(l.ConfigProvider.ConfigContext)||{};if("ConfigContext"in l.ConfigProvider)return(null==o?void 0:o(e,null==t?void 0:t.prefixCls))||"";{let o=(null==t?void 0:t.prefixCls)??"ant-";return`${o}${e??""}`}},s=()=>l.theme.useToken()},54969(e,t,o){let l;o.d(t,{Dq:()=>y,fD:()=>S.f,i9:()=>b,Uv:()=>n.Uv,Lq:()=>r,rd:()=>n.rd});var n=o(77548),a=o(52793);let r=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Loading...",t=arguments.length>1?arguments[1]:void 0,o=null,l=setTimeout(()=>{o=a.message.loading(e)},100);try{return await t()}finally{null==o||o(),clearTimeout(l)}};var i=o(71178),s=o(56920),d=o(2314),u=o(51649),c=o(7516);let p={...c},{version:m,render:h,unmountComponentAtNode:x}=p;try{Number((m||"").split(".")[0])>=18&&p.createRoot&&(l=p.createRoot)}catch(e){}function v(e){let{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:t}=p;t&&"object"==typeof t&&(t.usingClientEntryPoint=e)}let _="__antd_mobile_root__";async function f(e){return Promise.resolve().then(()=>{var t;null==(t=e[_])||t.unmount(),delete e[_]})}let g=(0,d.observable)(new Map),b=e=>{let t=e=>(e.id&&!g.has(e.id)&&g.set(e.id,null),(0,i.jsxs)(u.Fragment,{children:[e.children,(0,i.jsx)(s.Observer,{children:()=>{if(!e.id)return(0,i.jsx)(i.Fragment,{});let t=g.get(e.id);return t?(0,c.createPortal)(t,document.body):(0,i.jsx)(i.Fragment,{})}})]}));return t.defaultProps={id:e},t};function y(e,t){return{render:function(o){g.has(t)?g.set(t,null==o?void 0:o()):e&&function(e,t){if(l){let o;return v(!0),o=t[_]||l(t),v(!1),o.render(e),t[_]=o}h(e,t)}((0,i.jsx)(u.Fragment,{children:null==o?void 0:o()}),e)},unmount:function(){var o,n;if(g.has(t)&&g.set(t,null),e&&(o=e,l?f(o):x(o))&&e.parentNode){null==(n=e.parentNode)||n.removeChild(e)}}}}var S=o(54944)},54944(e,t,o){o.d(t,{f:()=>i});var l=o(41196),n=o(27404),a=o(77548),r=o(51649);let i=(e,t)=>o=>{let{theme:i,token:s,hashId:d}=(0,a.rd)(),{getPrefixCls:u,iconPrefixCls:c}=(0,a.UK)(),p=(0,a.Uv)(e),m=u(),h=(0,l.useStyleRegister)({theme:i,token:s,hashId:d,path:["formily-antd",e,p,c]},()=>{let e=`.${p}`,l=t((0,n.merge)(s,{componentCls:e,prefixCls:p,iconCls:`.${c}`,antCls:`.${m}`}),o,{hashId:d,prefixCls:p,rootPrefixCls:m,iconPrefixCls:c});return[((e,t)=>{let{fontFamily:o,fontSize:l}=e,n=`[class^="${t}"], [class*=" ${t}"]`;return{[n]:{fontFamily:o,fontSize:l,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[n]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}})(s,p),l]});return{wrapSSR:(0,r.useMemo)(()=>h,[i,s,d,p,c,m,o]),hashId:d,componentCls:p,rootPrefixCls:m}}},65136(e,t,o){o.d(t,{A:()=>p});var l=o(71178),n=o(56920),a=o(51649),r=o(78562),i=o(30644),s=o(38693),d=o(45249);let u=a.default.createContext(0),c=(0,n.observer)(e=>{let{getComponentByOpenMode:t,defaultOpenMode:o}=(0,s.k)()||{},{openMode:n=e.openMode||o}=(0,r.D5)(),i=a.default.useContext(u)+1,c=t(n)||d.sC;return(0,l.jsx)(u.Provider,{value:i,children:(0,l.jsx)(c,{footerNodeName:"Action.Container.Footer",level:i||1,...e})})},{displayName:"ActionContainer"});c.Footer=(0,n.observer)(()=>{let e=(0,n.useField)(),t=(0,n.useFieldSchema)();return(0,l.jsx)(i.dw,{basePath:e.address,schema:t,onlyRenderProperties:!0})},{displayName:"ActionContainer.Footer"});let p=c},45036(e,t,o){o.d(t,{zN:()=>D,TB:()=>I,d0:()=>B,Kq:()=>R,Yp:()=>A,ud:()=>q,VX:()=>$,U6:()=>O,Sh:()=>z,Mo:()=>N,Rh:()=>T,Gj:()=>Y});var l=o(71178),n=o(56920),a=o(27404),r=o(52793),i=o(51649),s=o(77843),d=o(61013),u=o(95951),c=o(17157),p=o(45560),m=o(31675),h=o(49629),x=o(43288);let v=null;var _=o(69575),f=o(27778),g=o(38693),b=o(18272),y=o(23620),S=o(77490),k=o(83508),C=o(50570),M=o(51275),w=o(59155),F=o(91198),P=o(96123),j=o(28227);function A(e){var t,o,a,r,i;let d=(0,n.useField)(),c=(0,n.useFieldSchema)(),{dn:p}=(0,u.er)(),{t:m}=(0,s.useTranslation)(),h=(null==e?void 0:e.isLink)||"Action.Link"===c["x-component"];return(0,l.jsx)(S.fY,{title:m("Edit button"),schema:{type:"object",title:m("Edit button"),properties:{title:{"x-decorator":"FormItem","x-component":"Input",title:m("Button title"),default:c.title,"x-component-props":{}},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:m("Button icon"),default:null==c||null==(t=c["x-component-props"])?void 0:t.icon,"x-component-props":{}},onlyIcon:{"x-decorator":"FormItem","x-component":"Checkbox",title:m("Icon only"),default:null==c||null==(o=c["x-component-props"])?void 0:o.onlyIcon,"x-component-props":{},"x-visible":h,"x-reactions":[{dependencies:["icon"],fulfill:{state:{hidden:"{{!$deps[0]}}"}}}]},iconColor:{title:m("Color"),required:!0,default:(null==c||null==(a=c["x-component-props"])?void 0:a.iconColor)||"#1677FF","x-hidden":!e.hasIconColor,"x-component":"ColorPicker","x-decorator":"FormItem"},type:{"x-decorator":"FormItem","x-component":"Radio.Group",title:m("Button background color"),default:(null==c||null==(r=c["x-component-props"])?void 0:r.danger)?"danger":(null==c||null==(i=c["x-component-props"])?void 0:i.type)==="primary"?"primary":"default",enum:[{value:"default",label:'{{t("Default")}}'},{value:"primary",label:'{{t("Highlight")}}'},{value:"danger",label:'{{t("Danger red")}}'}],"x-visible":!e.hasIconColor&&!h}}},onSubmit:e=>{let{title:t,icon:o,type:l,iconColor:n,onlyIcon:a}=e;d.address.toString()===c.name?(d.title=t,d.componentProps.iconColor=n,d.componentProps.icon=o,d.componentProps.danger="danger"===l,d.componentProps.type=l||d.componentProps.type,d.componentProps.onlyIcon=a):d.form.query(RegExp(`.${c.name}$`)).forEach(e=>{e.title=t,e.componentProps.iconColor=n,e.componentProps.icon=o,e.componentProps.danger="danger"===l,e.componentProps.type=l||e.componentProps.type,e.componentProps.onlyIcon=a}),c.title=t,c["x-component-props"]=c["x-component-props"]||{},c["x-component-props"].iconColor=n,c["x-component-props"].icon=o,c["x-component-props"].danger="danger"===l,c["x-component-props"].type=l||d.componentProps.type,c["x-component-props"].onlyIcon=a,p.emit("patch",{schema:{"x-uid":c["x-uid"],title:t,"x-component-props":{...c["x-component-props"]}}}),p.refresh()}})}function I(){var e,t;let{dn:o}=(0,u.er)(),{t:r}=(0,s.useTranslation)(),d=(0,n.useFieldSchema)(),c={type:"void","x-uid":(0,a.uid)(),"x-component":"Grid","x-initializer":"assignFieldValuesForm:configureFields"};d["x-template-uid"]&&(c["x-template-root-ref"]={"x-template-uid":d["x-template-uid"],"x-path":"x-action-settings.schemaUid"});let p={"customize:update":r("After clicking the custom button, the following fields of the current record will be saved according to the following form."),"customize:save":r("After clicking the custom button, the following fields of the current record will be saved according to the following form.")},m=d["x-action"]??"",h=(0,i.useCallback)(e=>{d["x-action-settings"].assignedValues=e,o.emit("patch",{schema:{"x-uid":d["x-uid"],"x-action-settings":d["x-action-settings"]}})},[o,d]);return(0,l.jsx)(_.UU,{isInAssignFieldValues:!0,children:(0,l.jsx)(k.UY,{isAllowToSetDefaultValue:()=>!1,children:(0,l.jsx)(S.l,{title:r("Assign field values"),initialSchema:c,initialValues:null==d||null==(e=d["x-action-settings"])?void 0:e.assignedValues,modalTip:p[m],uid:null==d||null==(t=d["x-action-settings"])?void 0:t.schemaUid,onSubmit:h})})})}function T(){var e;let{dn:t}=(0,u.er)(),{t:o}=(0,s.useTranslation)(),a=(0,n.useFieldSchema)();return(0,l.jsx)(S.l,{title:o("Request settings"),schema:F.K_,initialValues:null==a||null==(e=a["x-action-settings"])?void 0:e.requestSettings,onSubmit:e=>{a["x-action-settings"].requestSettings=e,t.emit("patch",{schema:{"x-uid":a["x-uid"],"x-action-settings":a["x-action-settings"]}}),t.refresh()}})}function D(){var e;let{dn:t}=(0,u.er)(),{t:o}=(0,s.useTranslation)(),a=(0,n.useFieldSchema)();return(0,l.jsx)(S.Qd,{title:o("Skip required validation"),checked:!!(null==a||null==(e=a["x-action-settings"])?void 0:e.skipValidator),onChange:e=>{a["x-action-settings"].skipValidator=e,t.emit("patch",{schema:{"x-uid":a["x-uid"],"x-action-settings":{...a["x-action-settings"]}}})}})}let L={value:"value",label:"label"},Y=e=>{let{getAllDataBlocks:t}=(0,C.dW)(),o=t(),n=(0,d.l)(),{t:a}=(0,s.useTranslation)(),u=(0,i.useMemo)(()=>o.map(e=>{var t;return(null==(t=e.dom)?void 0:t.isConnected)?{label:`${n(e.collection.title)} #${e.uid.slice(0,4)}`,value:e.uid,onMouseEnter(){var t;let o,l;e.highlightBlock(),o=document.querySelector(".dialog-after-successful-submission > .ant-modal-mask"),l=document.querySelector(".dialog-after-successful-submission > .ant-modal-wrap"),o&&(o.style.opacity="0",o.style.transition="opacity 0.5s ease"),l&&(l.style.opacity="0",l.style.transition="opacity 0.5s ease"),t=e.dom,t._timer=setInterval(()=>{let o=t._prevRect,l=t.getBoundingClientRect();o&&l.top===o.top?(clearInterval(t._timer),(()=>{var t,o;t=e.dom.cloneNode(!0),o=e.dom.getBoundingClientRect(),v||(v=document.createElement("div"),document.body.appendChild(v),v.style.position="absolute",v.style.transition="opacity 0.3s ease",v.style.pointerEvents="none"),v.appendChild(t),v.style.opacity="1",v.style.width=`${o.width}px`,v.style.height=`${o.height}px`,v.style.top=`${o.top}px`,v.style.left=`${o.left}px`,v.style.zIndex="2000"})()):t._prevRect=l},100)},onMouseLeave(){var t;let o,l;e.unhighlightBlock(),o=document.querySelector(".dialog-after-successful-submission > .ant-modal-mask"),l=document.querySelector(".dialog-after-successful-submission > .ant-modal-wrap"),o&&(o.style.opacity="1",o.style.transition="opacity 0.5s ease"),l&&(l.style.opacity="1",l.style.transition="opacity 0.5s ease"),(t=e.dom)._timer&&(clearInterval(t._timer),t._timer=null),v&&(v.style.opacity="0",v.innerHTML="")}}:null}).filter(Boolean),[o,a]);return(0,l.jsx)(r.Select,{value:e.value,mode:"multiple",allowClear:!0,placeholder:a("Select data blocks to refresh"),options:u,onChange:e.onChange})};function R(){var e;let{dn:t}=(0,u.er)(),{t:o}=(0,s.useTranslation)(),a=(0,n.useFieldSchema)(),{onSuccess:r}=(null==a?void 0:a["x-action-settings"])||{},i=(0,p.$)("$env"),d=(0,c.nu)("@nocobase/plugin-block-template"),m=null==d||null==(e=d.isInBlockTemplateConfigPage)?void 0:e.call(d);return(0,l.jsx)(S.fY,{dialogRootClassName:"dialog-after-successful-submission",width:700,title:o("After successful submission"),initialValues:r?{actionAfterSuccess:(null==r?void 0:r.redirecting)?"redirect":"previous",...r}:{manualClose:!1,redirecting:!1,successMessage:'{{t("Saved successfully")}}',actionAfterSuccess:"previous"},schema:{type:"object",title:o("After successful submission"),properties:{successMessage:{title:o("Popup message"),"x-decorator":"FormItem","x-component":"Input.TextArea","x-component-props":{}},manualClose:{title:o("Message popup close method"),enum:[{label:o("Automatic close"),value:!1},{label:o("Manually close"),value:!0}],"x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{}},redirecting:{title:o("Then"),"x-hidden":!0,enum:[{label:o("Stay on current page"),value:!1},{label:o("Redirect to"),value:!0}],"x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{},"x-reactions":{target:"redirectTo",fulfill:{state:{visible:"{{!!$self.value}}"}}}},actionAfterSuccess:{title:o("Action after successful submission"),enum:[{label:o("Stay on the current popup or page"),value:"stay"},{label:o("Return to the previous popup or page"),value:"previous"},{label:o("Redirect to"),value:"redirect"}],"x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{},"x-reactions":{target:"redirectTo",fulfill:{state:{visible:"{{$self.value==='redirect'}}"}}}},redirectTo:{title:o("Link"),"x-decorator":"FormItem","x-component":"Variable.TextArea","x-use-component-props":()=>({scope:[i,...(0,w.b)()].filter(Boolean),fieldNames:L})},blocksToRefresh:{type:"array",title:o("Refresh data blocks"),"x-decorator":"FormItem","x-use-decorator-props":()=>({tooltip:o("After successful submission, the selected data blocks will be automatically refreshed.")}),"x-component":Y,"x-hidden":m}}},onSubmit:e=>{a["x-action-settings"].onSuccess=e,t.emit("patch",{schema:{"x-uid":a["x-uid"],"x-action-settings":a["x-action-settings"]}})}})}function B(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{t}=(0,s.useTranslation)(),o=(0,n.useFieldSchema)();return(null==o?void 0:o.parent["x-component"])!=="CollectionField"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(S.kT,{}),(0,l.jsx)(S.d$,{removeParentsIfNoChildren:!0,breakRemoveOn:e=>"Space"===e["x-component"]||e["x-component"].endsWith("ActionBar"),disabled:e.disabled,confirm:{title:t("Delete action"),onOk:e.onConfirmOk}})]})}let N=[{name:"Customize",Component:e=>e.children,children:[{name:"editButton",Component:A,useComponentProps(){let{buttonEditorProps:e}=(0,h.C5)();return e}},{name:"linkageRules",Component:e=>(0,l.jsx)(S.f9,{...e}),useVisible(){let e=(0,M.Lt)(),{linkageAction:t}=(0,h.C5)();return t||e},useComponentProps(){let{name:e}=(0,x.k7)(),{linkageRulesProps:t}=(0,h.C5)();return{...t,collectionName:e}}},{name:"openMode",Component:b.sm,useComponentProps(){let{hideOpenMode:e}=(0,g.k)(),t=["create","update","view","customize:popup","duplicate","customize:create"].includes((0,n.useFieldSchema)()["x-action"]||"");return{openMode:t&&!e,openSize:t&&!e}}},{name:"secondConFirm",Component:$,useVisible(){var e;let t=(0,n.useFieldSchema)();return!["create","update","view","customize:popup","duplicate","customize:create"].includes(t["x-action"]||"")&&!(null==t||null==(e=t["x-action-settings"])?void 0:e.disableSecondConFirm)}},{name:"assignFieldValues",Component:I,useVisible(){var e;let t=(0,n.useFieldSchema)();return(0,a.isValid)(null==t||null==(e=t["x-action-settings"])?void 0:e.assignedValues)}},{name:"requestSettings",Component:T,useVisible(){var e;let t=(0,n.useFieldSchema)();return(0,a.isValid)(null==t||null==(e=t["x-action-settings"])?void 0:e.requestSettings)}},{name:"skipValidator",Component:D,useVisible(){var e;let t=(0,n.useFieldSchema)();return(0,a.isValid)(null==t||null==(e=t["x-action-settings"])?void 0:e.skipValidator)}},{name:"afterSuccess",Component:R,useVisible(){var e;let t=(0,n.useFieldSchema)();return(0,a.isValid)(null==t||null==(e=t["x-action-settings"])?void 0:e.onSuccess)}},{name:"saveMode",Component:f.P,useVisible(){var e;let t=(0,n.useFieldSchema)();return"submit"===t["x-action"]&&(0,c.qt)(null==(e=t.parent)?void 0:e["x-initializer"],"createForm:configureActions")}},{name:"enableChildCollections",Component:S.DE,useVisible(){let e=(0,n.useFieldSchema)(),{name:t}=(0,x.k7)(),{getChildrenCollections:o}=(0,x.nj)();return o(t).length>0&&"create"===e["x-action"]},useComponentProps(){let{name:e}=(0,x.k7)();return{collectionName:e}}},{name:"refreshDataBlockRequest",Component:q,useComponentProps:()=>({isPopupAction:!1}),useVisible(){var e;let t=(0,n.useFieldSchema)();return(0,a.isValid)(null==t||null==(e=t["x-action-settings"])?void 0:e.triggerWorkflows)}},{type:"switch",name:"clearDefaultValue",useComponentProps(){var e;let{t}=(0,s.useTranslation)(),o=(0,n.useFieldSchema)(),{dn:l}=(0,u.er)();return{title:t("Clear default value"),checked:null==o||null==(e=o["x-component-props"])?void 0:e.clearDefaultValue,onChange:e=>{l.deepMerge({"x-uid":o["x-uid"],"x-component-props":{clearDefaultValue:e}})}}},useVisible:()=>"useResetBlockActionProps"===(0,n.useFieldSchema)()["x-use-component-props"]},{name:"remove",sort:100,Component:B,useComponentProps(){let{removeButtonProps:e}=(0,h.C5)();return e},useVisible(){var e;let t=(0,n.useFieldSchema)();return(null==t||null==(e=t["x-action-settings"])?void 0:e.removable)!==!1}}]}],E=()=>{let e=(0,n.useFieldSchema)(),t=(0,n.useForm)(),o=(0,j.zv)();return(0,P._)({collectionField:{uiSchema:e},form:t,record:o,uiSchema:e,noDisabled:!0})};function $(){var e,t,o,a,r,i,c,p,m,h,x,v;let{dn:_}=(0,u.er)(),f=(0,n.useFieldSchema)(),{t:g}=(0,s.useTranslation)(),b=(0,n.useField)(),y=(0,d.l)();return(0,l.jsx)(S.fY,{title:g("Secondary confirmation"),initialValues:{title:g(null==f||null==(t=f["x-component-props"])||null==(e=t.confirm)?void 0:e.title,{title:y(f.title)})||y(null==f||null==(a=f["x-component-props"])||null==(o=a.confirm)?void 0:o.title)||g("Perform the {{title}}",{title:y(f.title)}),content:g(null==f||null==(i=f["x-component-props"])||null==(r=i.confirm)?void 0:r.content,{title:y(f.title)})||y(null==f||null==(p=f["x-component-props"])||null==(c=p.confirm)?void 0:c.content)||g("Are you sure you want to perform the {{title}} action?",{title:y(f.title)})},schema:{type:"object",title:g("Secondary confirmation"),properties:{enable:{"x-decorator":"FormItem","x-component":"Checkbox","x-content":g("Enable secondary confirmation"),default:(null==f||null==(h=f["x-component-props"])||null==(m=h.confirm)?void 0:m.enable)!==!1&&!!(null==f||null==(v=f["x-component-props"])||null==(x=v.confirm)?void 0:x.content),"x-component-props":{}},title:{"x-decorator":"FormItem","x-component":"Variable.RawTextArea",title:g("Title"),"x-component-props":{scope:E},"x-reactions":{dependencies:["enable"],fulfill:{state:{required:"{{$deps[0]}}"}}}},content:{"x-decorator":"FormItem","x-component":"Variable.RawTextArea",title:g("Content"),"x-component-props":{scope:E},"x-reactions":{dependencies:["enable"],fulfill:{state:{required:"{{$deps[0]}}"}}}}}},onSubmit:e=>{var t;let{enable:o,title:l,content:n}=e;f["x-component-props"]=f["x-component-props"]||{},f["x-component-props"].confirm={},f["x-component-props"].confirm.enable=o,f["x-component-props"].confirm.title=l,f["x-component-props"].confirm.content=n,b.componentProps.confirm={...null==(t=f["x-component-props"])?void 0:t.confirm},_.emit("patch",{schema:{"x-uid":f["x-uid"],"x-component-props":{...f["x-component-props"]}}}),_.refresh()}})}let z=new m.RT({name:"ActionSettings",items:N}),O=e=>{let{modalTip:t,linkageAction:o,removeButtonProps:a,buttonEditorProps:r,linkageRulesProps:i,schemaSettings:s="ActionSettings",enableDrag:d=!0,...u}=e,p=(0,c.nm)(),m=(0,n.useFieldSchema)(),h=(null==m?void 0:m.parent["x-component"])!=="CollectionField"&&d,x=`ActionSettings:${m["x-action"]}`,v=p.schemaSettingsManager.has(x);return(0,l.jsx)(y.xK,{schemaSettings:v?x:s||"ActionSettings",contextValue:{modalTip:t,linkageAction:o,removeButtonProps:a,buttonEditorProps:r,linkageRulesProps:i},...u,disableInitializer:!0,draggable:h})};function q(e){let{dn:t}=(0,u.er)(),o=(0,n.useFieldSchema)(),{t:a}=(0,s.useTranslation)(),{refreshDataBlockRequest:r}=(null==o?void 0:o["x-component-props"])||{};return(0,l.jsx)(S.Qd,{title:a("Refresh data on action"),checked:!1!==r,onChange:e=>{o["x-component-props"]=o["x-component-props"]||{},o["x-component-props"].refreshDataBlockRequest=e,t.emit("patch",{schema:{"x-uid":o["x-uid"],"x-component-props":{...o["x-component-props"]}}})}})}O.ButtonEditor=A,O.RemoveButton=B},45249(e,t,o){o.d(t,{Ay:()=>M,sC:()=>C});var l=o(71178),n=o(56920),a=o(52793),r=o(94046),i=o(77843),s=o(51649),d=o(64679),u=o(30644),c=o(57610),p=o(44388),m=o(87498);let h=(0,o(54969).fD)("nb-action-drawer",e=>{let{componentCls:t}=e;return{[t]:{overflow:"hidden","&.reset":{"&.nb-action-popup":{".ant-drawer-header":{display:"none"},".ant-drawer-body":{paddingTop:e.paddingContentVerticalLG,backgroundColor:e.colorBgLayout,paddingBottom:0}},"&.nb-record-picker-selector":{".ant-drawer-content":{backgroundColor:e.colorBgLayout},".nb-block-item":{marginBottom:e.marginBlock,".general-schema-designer":{top:-e.sizeXS,bottom:-e.sizeXS,left:-e.sizeXS,right:-e.sizeXS}}}},".footer":{display:"flex",justifyContent:"flex-end",width:"100%",".ant-btn":{marginRight:e.marginXS}},".ant-drawer-content-wrapper":{borderLeft:"1px solid rgba(255, 255, 255, 0.1)"},".ant-tabs-nav":{paddingLeft:e.paddingLG-e.paddingPageHorizontal,paddingRight:e.paddingLG-e.paddingPageHorizontal,marginLeft:e.paddingPageHorizontal-e.paddingLG,marginRight:e.paddingPageHorizontal-e.paddingLG}}}});var x=o(22204),v=o(51275);o(69926);var _=o(76058),f=o(839);let g=s.default.memo(n.RecursionField);g.displayName="MemoizeRecursionField";let b=e=>{let{visible:t,setVisible:o}=(0,v.D5)();return(0,l.jsx)(a.Drawer,{open:t,onClose:()=>o(!1,!0),width:"50%",children:(0,l.jsx)(c.x,{...e})})},y=new Map([["small","30%"],["middle","50%"],["large","70%"]]),S=s.default.memo(e=>{let{footerNodeName:t,field:o,schema:n}=e,[a,r]=(0,s.useState)(!1),i=(0,s.useCallback)(e=>e["x-component"]!==t,[t]);return((0,s.useEffect)(()=>{(0,s.startTransition)(()=>{r(!0)})},[]),a)?(0,l.jsx)(u.dw,{basePath:o.address,schema:n,onlyRenderProperties:!0,filterProperties:i}):null});S.displayName="ActionDrawerContent";let k=(0,n.observer)(e=>{let{footerNodeName:t="Action.Drawer.Footer",zIndex:o,onClose:d,...u}=e,{visible:c,setVisible:b,openSize:k="middle",drawerProps:C}=(0,v.D5)(),M=(0,n.useFieldSchema)(),w=(0,n.useField)(),{t:F}=(0,i.useTranslation)(),{componentCls:P,hashId:j}=h(),A=(0,m.f)(),I=(0,_.$5)(),T=M.reduceProperties((e,o)=>o["x-component"]===t?o:e),{hidden:D}=(0,p.IX)(),L=(0,s.useMemo)(()=>({...null==C?void 0:C.style,...null==u?void 0:u.style,display:D?"none":"block"}),[D,null==C?void 0:C.style,null==u?void 0:u.style]),Y=s.default.useMemo(()=>document.querySelector("#nocobase-app-container")||document.body,[]),R=(0,_.fl)("drawer",o||I,e.level||0),B=(0,s.useCallback)(e=>{b(!1,!0),null==d||d(e)},[b,d]),N=(0,s.useCallback)(e=>e["x-component"]===t,[t]);return(0,l.jsx)(x.Wi,{children:(0,l.jsx)(_.E.Provider,{value:R,children:(0,l.jsx)(m.h,{...A,tabBarExtraContent:null,children:(0,l.jsx)(a.Drawer,{getContainer:Y,zIndex:R,width:y.get(k),title:"string"==typeof w.title?F(w.title,{ns:f.z}):w.title,...u,...C,rootStyle:L,destroyOnClose:!0,open:c,onClose:B,rootClassName:(0,r.default)(P,j,null==C?void 0:C.className,u.className,"reset"),footer:T&&(0,l.jsx)("div",{className:"footer",children:(0,l.jsx)(g,{basePath:w.address,schema:M,onlyRenderProperties:!0,filterProperties:N})}),children:(0,l.jsx)(S,{footerNodeName:t,field:w,schema:M})})})})})},{displayName:"InternalActionDrawer"}),C=s.default.memo(e=>(0,l.jsx)(d.ErrorBoundary,{FallbackComponent:b,onError:console.log,children:(0,l.jsx)(k,{...e})}));C.displayName="ActionDrawer",C.Footer=(0,n.observer)(()=>{let e=(0,n.useField)(),t=(0,n.useFieldSchema)();return(0,l.jsx)(g,{basePath:e.address,schema:t,onlyRenderProperties:!0})},{displayName:"ActionDrawer.Footer"}),C.FootBar=(0,n.observer)(()=>{let e=(0,n.useField)(),t=(0,n.useFieldSchema)();return(0,l.jsx)("div",{className:"ant-drawer-footer",style:{position:"absolute",bottom:0,right:0,left:0},children:(0,l.jsx)("div",{className:"footer",children:(0,l.jsx)(g,{basePath:e.address,schema:t,onlyRenderProperties:!0})})})},{displayName:"ActionDrawer.FootBar"});let M=C},51223(e,t,o){o.d(t,{cX:()=>S,Ay:()=>k});var l=o(71178),n=o(10691),a=o(56920),r=o(52793),i=o(94046),s=o(51649),d=o(64679),u=o(30644),c=o(49948),p=o(57610),m=o(44388),h=o(87498),x=o(22204),v=o(51275);o(77014);var _=o(76058);let f=e=>{let{visible:t,setVisible:o}=(0,v.D5)();return(0,l.jsx)(r.Modal,{open:t,onCancel:()=>o(!1,!0),width:"60%",children:(0,l.jsx)(p.x,{...e})})},g=new Map([["small","40%"],["middle","60%"],["large","80%"]]),b=s.default.memo(e=>{let{footerNodeName:t,field:o,schema:n}=e,[a,r]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{(0,s.startTransition)(()=>{r(!0)})},[]),a)?(0,l.jsx)(u.dw,{basePath:o.address,schema:n,onlyRenderProperties:!0,filterProperties:e=>e["x-component"]!==t}):null}),y=(0,a.observer)(e=>{let{footerNodeName:t="Action.Modal.Footer",width:o,zIndex:d,delay:p=200,...f}=e,{visible:y,setVisible:S,openSize:k="middle",modalProps:C}=(0,v.D5)(),M=o??g.get(k),w=(0,a.useFieldSchema)(),F=(0,a.useField)(),{token:P}=(0,c.K)(),j=(0,h.f)(),A=(0,_.$5)(),I=w.reduceProperties((e,o)=>o["x-component"]===t?o:e),{hidden:T}=(0,m.IX)(),D=!!I,L=s.default.useMemo(()=>document.querySelector("#nocobase-app-container")||document.body,[]),Y=(0,_.fl)("modal",d||A,e.level||0),R=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,[o,l]=(0,s.useState)(0===t);return(0,s.useEffect)(()=>{if(!o)if(e){let e=setTimeout(()=>l(!0),t);return()=>clearTimeout(e)}else l(!1)},[t,o,e]),o}(y,p);return(0,l.jsx)(x.Wi,{children:(0,l.jsx)(_.E.Provider,{value:Y,children:(0,l.jsx)(h.h,{...j,tabBarExtraContent:null,children:(0,l.jsx)(r.Modal,{getContainer:L,zIndex:T?-1:Y,width:M,title:F.title,...f,...C,style:{...null==C?void 0:C.style,...null==f?void 0:f.style},destroyOnClose:!0,open:y,onCancel:()=>{S(!1,!0)},className:(0,i.default)(f.className,null==C?void 0:C.className,(0,n.css)`
394
394
  &.nb-action-popup {
395
395
  .ant-modal-header {
396
396
  display: none;
@@ -428,7 +428,7 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
428
428
  console.error(error);
429
429
  return false;
430
430
  }
431
- }}}`,message:'{{t("Invalid JSON format")}}'},i={type:"object",properties:{url:{type:"string",title:'{{t("Request URL")}}',required:!0,"x-decorator":"FormItem","x-component":"Input"},method:{type:"string",title:'{{t("Request method")}}',"x-decorator":"FormItem","x-component":"Select",default:"POST",enum:[{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"PUT",value:"PUT"},{label:"PATCH",value:"PATCH"},{label:"DELETE",value:"DELETE"}]},headers:{type:"string",title:'{{t("Request headers")}}',"x-decorator":"FormItem","x-component":"Input.TextArea","x-validator":r},params:{type:"string",title:'{{t("Request query parameters")}}',"x-decorator":"FormItem","x-component":"Input.TextArea","x-validator":r},data:{type:"string",title:'{{t("Request body")}}',"x-decorator":"FormItem","x-component":"Input.TextArea","x-validator":r}}},s=async(e,t)=>{var o,r,i;let{operator:s,field:d,condition:u,variables:c,localVariables:p,conditionType:m,variableNameOfLeftCondition:h}=e,x=(null==d||null==(o=d.stateOfLinkageRules)?void 0:o.disabled)||[!1],v=(null==d||null==(r=d.stateOfLinkageRules)?void 0:r.display)||["visible"];switch(s){case n.X2.Visible:await (0,a._c)({ruleGroup:u,variables:c,localVariables:p,conditionType:m,variableNameOfLeftCondition:h},t)&&(v.push(s),d.data=d.data||{},d.data.hidden=!1),d.stateOfLinkageRules={...d.stateOfLinkageRules,display:v},d.display=(0,l.last)(v);break;case n.X2.Hidden:await (0,a._c)({ruleGroup:u,variables:c,localVariables:p,conditionType:m,variableNameOfLeftCondition:h},t)?(d.data=d.data||{},d.data.hidden=!0):(d.data=d.data||{},d.data.hidden=!1);break;case n.X2.Disabled:await (0,a._c)({ruleGroup:u,variables:c,localVariables:p,conditionType:m,variableNameOfLeftCondition:h},t)&&x.push(!0),d.stateOfLinkageRules={...d.stateOfLinkageRules,disabled:x},d.data=d.data||{},d.data.disabled=(0,l.last)(x),d.componentProps.disabled=(0,l.last)(x);break;case n.X2.Active:await (0,a._c)({ruleGroup:u,variables:c,localVariables:p,conditionType:m,variableNameOfLeftCondition:h},t)?x.push(!1):x.push(!!(null==(i=d.componentProps)?void 0:i.disabled)),d.stateOfLinkageRules={...d.stateOfLinkageRules,disabled:x},d.data=d.data||{},d.data.disabled=(0,l.last)(x),d.componentProps.disabled=(0,l.last)(x);break;default:return null}},d=e=>{e.data=e.data||{},e.display="visible",e.data.hidden=!1,e.data.disabled=!1,e.componentProps.disabled=!1}},76058(e,t,o){o.d(t,{$5:()=>a,E:()=>n,fl:()=>r});var l=o(51649);let n=l.default.createContext(100),a=()=>l.default.useContext(n),r=(e,t,o)=>{let l=t;return"page"!==e||window.location.pathname.includes("/embed/")?(l=t+o)<200?l+200:l:(l=t+o)>200?l-200:l}},16246(e,t,o){o.d(t,{t:()=>l});let l=(0,o(51649).createContext)({});l.displayName="AssociationFieldContext"},31475(e,t,o){o.d(t,{Ay:()=>g,G2:()=>f,TP:()=>k,gZ:()=>b,sy:()=>S,uR:()=>_});var l=o(71178),n=o(56920),a=o(77583),r=o(13791),i=o(51649),s=o(68557),d=o(43288),u=o(35432),c=o(65613),p=o(58980),m=o(41944),h=o(90236),x=o(95951),v=o(16246);let _=e=>{let t=(0,n.useFieldSchema)(),{insertAfterBegin:o}=(0,x.er)(),{isMobileLayout:l}=(0,h.mY)();return(0,i.useCallback)(n=>{l||t.reduceProperties((t,o)=>o["x-component"]==="AssociationField."+e?o:t,null)||o((0,r.default)(n))},[e,t,o,l])};function f(){return(0,i.useContext)(v.t)}function g(e){var t,o,l,r,h,x,v,_,f,g;let{action:b="list",service:y,useOriginalFilter:S}=e,k=(0,n.useFieldSchema)(),C=(0,n.useField)(),{getField:M}=(0,d.k7)(),{getCollectionJoinField:w}=(0,d.nj)(),F=(0,m.pE)(),{isNew:P}=(0,u.PD)()||{},j=((0,a.isString)(null==k||null==(l=k["x-component-props"])||null==(o=l.service)||null==(t=o.params)?void 0:t.filter)?null==(x=C.componentProps)||null==(h=x.service)||null==(r=h.params)?void 0:r.filter:null==k||null==(f=k["x-component-props"])||null==(_=f.service)||null==(v=_.params)?void 0:v.filter)||(null==y||null==(g=y.params)?void 0:g.filter),{filter:A}=(0,s.j)({filterOption:j,onFilterChange:()=>{P&&C.reset()}}),I=(0,i.useMemo)(()=>M(k.name)||w(null==k?void 0:k["x-collection-field"]),[k]),T=null==F?void 0:F[null==I?void 0:I.sourceKey],D=(0,i.useMemo)(()=>{let e=["oho","o2m"].includes(null==I?void 0:I.interface);return(0,p.Dj)([(0,p.Dj)([e&&!(0,c.vc)(k)&&(null==I?void 0:I.foreignKey)&&!S?{[I.foreignKey]:{$is:null}}:null,A]),e&&null!=T&&!(0,c.vc)(k)&&(null==I?void 0:I.foreignKey)&&!S?{[I.foreignKey]:{$eq:T}}:null],"$or")},[null==I?void 0:I.interface,null==I?void 0:I.foreignKey,k,A,T,S]);return(0,i.useMemo)(()=>({resource:null==I?void 0:I.target,action:b,...y,params:{...null==y?void 0:y.params,filter:D}}),[null==I?void 0:I.target,b,D,y])}let b=function(){var e,t,o,l,a;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=(0,n.useFieldSchema)();return{label:"label",value:"value",...(null==(l=i["x-component-props"])||null==(o=l.field)||null==(t=o.uiSchema)||null==(e=t["x-component-props"])?void 0:e.fieldNames)||(null==(a=i["x-component-props"])?void 0:a.fieldNames)||r.fieldNames}},y=(0,i.createContext)(null);y.displayName="SubFormContext";let S=e=>{let t=(0,i.useContext)(y),{value:o,collection:n,fieldSchema:r,parent:s,skip:d}=e.value,u=(0,i.useMemo)(()=>a.default.omitBy({value:o,collection:n,fieldSchema:r,skip:d,parent:s||((null==t?void 0:t.skip)?t.parent:t)},a.default.isUndefined),[o,n,r,d,s,t]);return(0,l.jsx)(y.Provider,{value:u,children:e.children})},k=()=>{let{value:e,collection:t,fieldSchema:o,parent:l}=(0,i.useContext)(y)||{};return{formValue:e,collection:t,fieldSchema:o,parent:l}}},60817(e,t,o){o.d(t,{Hi:()=>s,PB:()=>p,RB:()=>d,WX:()=>h,kk:()=>m,qT:()=>function e(t){let o=[];for(let l=0;l<t.length;l++){let n=t[l].children;Array.isArray(n)&&o.push(...e(n)),o.push({...t[l]})}return o}});var l=o(27404),n=o(63526),a=o(52793),r=o(51649),i=o(26174);let s=()=>{let e=(0,i.r2)();return(t,o)=>{if(!t)return;let l=null==e?void 0:e.getCollectionField(`${t}.${o}`);return null==l?void 0:l.uiSchema}},d=(e,t)=>{let o=(0,i.r2)();if(!e)return;let l=null==o?void 0:o.getCollectionField(`${e}.${t}`);return null==l?void 0:l.uiSchema},u=e=>{let t=(0,n.getDefaultFormat)(e),o=(0,n.str2moment)(e.value,e),a=o&&o.isValid()?o.format(t):e.value;return(0,l.isArr)(a)?a.join("~"):a},c=e=>e?Array.isArray(e)?e:[e]:[],p=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=null==e?void 0:e.enum;if(Array.isArray(l)&&t){let e=c(t).map(e=>{let t=l.find(t=>t.value===e);return o?r.default.createElement(a.Tag,{color:null==t?void 0:t.color},null==t?void 0:t.label):null==t?void 0:t.label});return o?e:e.join(", ")}return(null==e?void 0:e["x-component"])==="DatePicker"?u({...null==e?void 0:e["x-component-props"],value:t}):t},m=(e,t,o)=>{let l=null==e?void 0:e.enum;return Array.isArray(l)&&t?c(t).map(e=>{let t=l.find(t=>t.value===e);return r.default.createElement(a.Tag,{color:o||(null==t?void 0:t.color)},null==t?void 0:t.label)}):(null==e?void 0:e["x-component"])==="DatePicker"?r.default.createElement(a.Tag,{color:o},u({...null==e?void 0:e["x-component-props"],value:t})):r.default.createElement(a.Tag,{color:o},t)};function h(e){var t,o;return["Nester","SubTable","PopoverNester"].includes((null==(t=e["x-component-props"])?void 0:t.mode)||(null==(o=e.componentProps)?void 0:o.mode))}},71226(e,t,o){o.d(t,{A:()=>p,t:()=>m});var l=o(71178),n=o(56920),a=o(52793),r=o(51649),i=o(77843),s=o(839),d=o(38892),u=o(49948),c=o(12637);let p=(0,r.createContext)({}),m=r.default.forwardRef((e,t)=>{let{children:o,...m}=e,{token:h}=(0,u.K)(),{title:x,description:v,..._}=m,f=(0,r.useMemo)(()=>({marginBottom:h.marginBlock,height:"100%"}),[h.marginBlock]),[g,b]=(0,r.useState)(0),y=(0,r.useRef)(null),{t:S}=(0,i.useTranslation)(),k=(0,n.useFieldSchema)(),C=null==k?void 0:k["x-block-linkage-rules"];(0,r.useEffect)(()=>{let e=setTimeout(()=>{y.current?b(v?y.current.parentElement.parentElement.parentElement.offsetHeight:h.fontSizeLG*h.lineHeightLG+2*h.padding-1):g&&b(0)},500);return()=>clearTimeout(e)},[x,v]);let M=(x||v)&&(0,l.jsxs)("div",{ref:y,style:{padding:"8px 0px 8px"},children:[(0,l.jsxs)("span",{children:[" ",S(x,{ns:s.z})]}),v&&(0,l.jsx)(c.w,{value:S(v,{ns:s.z}),style:{overflowWrap:"break-word",whiteSpace:"normal",fontWeight:400,color:h.colorTextDescription,borderRadius:"4px"}})]}),w=(0,l.jsx)(p.Provider,{value:{titleHeight:g},children:(0,l.jsx)(a.Card,{ref:t,variant:"borderless",style:f,..._,title:M,children:o})});return C?(0,l.jsx)(d._,{children:w}):w});m.displayName="BlockItemCard"},8179(e,t,o){o.d(t,{Z0:()=>f,AQ:()=>b.A,qI:()=>g,tn:()=>b.t});var l=o(71178),n=o(51649),a=o(56920),r=o(94046),i=o(64679),s=o(17157),d=o(80461),u=o(91032),c=o(16319),p=o(57610);let m=(0,o(54944).f)("nb-block-item",e=>{let{componentCls:t}=e;return{[t]:{position:"relative","&:hover":{"> .general-schema-designer":{display:"block"}},"&.nb-form-item:hover":{"> .general-schema-designer":{background:"var(--colorBgSettingsHover) !important",border:"0 !important",top:"-5px !important",bottom:"-5px !important",left:"-5px !important",right:"-5px !important"}},"> .general-schema-designer":{position:"absolute",zIndex:999,top:0,bottom:0,left:0,right:0,display:"none",border:"2px solid var(--colorBorderSettingsHover)",pointerEvents:"none","> .general-schema-designer-icons":{position:"absolute",right:"2px",top:"2px",lineHeight:"16px",pointerEvents:"all",".ant-space-item":{backgroundColor:"var(--colorSettings)",color:"#fff",lineHeight:"16px",width:"16px",paddingLeft:"1px",alignSelf:"stretch"}}},".ant-card":{borderRadius:e.borderRadiusBlock}}}});var h=o(11340),x=o(43288),v=o(28227),_=o(38892);let f=(0,d.T)(e=>{let{className:t,children:o,style:d}=(0,c.YY)(e),{componentCls:f,hashId:g}=m(),b=(0,a.useFieldSchema)(),{render:y}=(0,s.s6)(b),{getAriaLabel:S}=(e=>{var t,o;let l=(0,a.useFieldSchema)(),r=(0,c.lu)(),i=l["x-component"],s="string"==typeof i?i:null==i?void 0:i.displayName,d=r(l["x-collection-field"]),{name:u}=(0,h.MX)()||{},{name:p,getField:m}=(0,x.k7)();u=e||("action"!==u?u:"");let v=r(l.title)||r(null==(o=m(l.name))||null==(t=o.uiSchema)?void 0:t.title);return{getAriaLabel:(0,n.useCallback)(e=>(e=e?`-${e}`:"",["block-item",s,p,u,d,v,e].filter(Boolean).join("-")),[s,p,u,d,v])}})(e.name),k=(0,n.useMemo)(()=>S(),[S]),C=(0,v.Ge)(),M="FormItem"===b["x-decorator"]&&b["x-block-linkage-rules"],w="Iframe"===b["x-component"]&&b["x-block-linkage-rules"],F=(0,l.jsxs)(u.SortableItem,{role:"button","aria-label":k,className:(0,r.default)("nb-block-item",t,f,g),style:d,children:[y(),(0,l.jsx)(i.ErrorBoundary,{FallbackComponent:p.x,onError:console.log,children:o})]});return!C||M||w?(0,l.jsx)(_._,{children:F}):F},{displayName:"BlockItem"}),g=()=>{let{remove:e}=(0,c.er)();return(0,l.jsxs)("div",{children:[(0,l.jsx)("a",{onClick:()=>{e()},children:"删除"}),(0,l.jsx)(u.DragHandler,{})]})};var b=o(71226)},64575(e,t,o){o.d(t,{nx:()=>S,CE:()=>b,lr:()=>w,Qo:()=>k});var l=o(71178),n=o(56920),a=o(52793),r=o(91815),i=o(77583),s=o(51649),d=o(63526),u=o(77843),c=o(64613),p=o(27404),m=o(94046),h=o(84951);let x=()=>null;x.DatePicker=function(e){let t,o,n,{value:a,picker:i="date"}=e,s=(0,c.usePrefixCls)("description-date-picker",e);return a?(0,l.jsx)("div",{className:(0,m.default)(s,e.className),children:(t=(0,d.getDefaultFormat)(e),o=(0,d.str2moment)(a,e),n=r.default.isDayjs(o)?o.format(t):"",(0,p.isArr)(n)?n.join("~"):n)}):(0,l.jsx)("div",{})},x.DateRangePicker=function(e){let t=(0,c.usePrefixCls)("description-text",e),o=(0,d.getDefaultFormat)(e);return(0,l.jsx)("div",{className:(0,m.default)(t,e.className),style:e.style,children:(()=>{let t=(0,d.str2moment)(e.value,e);if(!t)return"";let l=t.map(e=>e.format(o));return(0,p.isArr)(l)?l.join("~"):l})()})},x.DatePicker=(0,h.A)(x.DatePicker);var v=o(64004),_=o(82924),f=o(43923),g=o(2314);let b=e=>{let{targetPicker:t,picker:o="date",format:l,dateFormat:n,showTime:a,timeFormat:r}=e,i=n||l,s=t===o&&i?i:(0,d.getPickerFormat)(t),u="date"===t&&s?s.replace(/\s*[Hh]{1,2}:mm(?::ss)?(?:\.SSS)?(?:\s*[aA])?/g,"").trim():s;return(0,d.getDateTimeFormat)(t,u,a,r)},y=s.default.createContext({utc:!0}),S=()=>s.default.useContext(y),k=y.Provider,C=(0,n.connect)(a.DatePicker,(0,n.mapProps)((0,v.x1)()),(0,n.mapReadPretty)(x.DatePicker)),M=(0,n.connect)(a.DatePicker.RangePicker,(0,n.mapProps)((0,v.UT)()),(0,n.mapReadPretty)(x.DateRangePicker)),w=e=>{let{utc:t=!0}=S(),o=Array.isArray(e.value)?e.value[0]:e.value,{parseVariable:n}=(0,f.$l)()||{},a=(0,f.gp)(),[d,u]=(0,s.useState)(null),[c,p]=(0,s.useState)(null),m=(0,s.useRef)(null);(0,s.useEffect)(()=>(m.current&&m.current(),m.current=(0,g.autorun)(()=>{h()}),()=>{m.current()}),[e._maxDate,e._minDate,a,n]);let h=async()=>{let t=e._minDate?Promise.resolve((0,r.default)(e._minDate)):Promise.resolve(null),o=e._maxDate?Promise.resolve((0,r.default)(e._maxDate)):Promise.resolve(null);(0,f.DZ)(e._maxDate)&&(o=n(e._maxDate,a).then(e=>(0,r.default)(Array.isArray(e.value)?(0,i.last)(e.value):e.value))),(0,f.DZ)(e._minDate)&&(t=n(e._minDate,a).then(e=>(0,r.default)(Array.isArray(e.value)?(0,i.first)(e.value):e.value)));let[l,s]=await Promise.all([t,o]),d=Array.from({length:60},(e,t)=>t),c=e=>{if(!r.default.isDayjs(e))return!1;let t=l?l.startOf("day"):null,o=s?s.endOf("day"):null;return!!(t&&e.startOf("day").isBefore(t)||o&&e.startOf("day").isAfter(o))},m=e=>{if(!e||!l&&!s)return{disabledHours:()=>[],disabledMinutes:()=>[],disabledSeconds:()=>[]};let t=l&&e.isSame(l,"day"),o=s&&e.isSame(s,"day");return{disabledHours:()=>{let e=[];if(t)for(let t=0;t<l.hour();t++)e.push(t);if(o)for(let t=s.hour()+1;t<24;t++)e.push(t);return e},disabledMinutes:e=>t&&e===l.hour()?d.filter(e=>e<l.minute()):o&&e===s.hour()?d.filter(e=>e>s.minute()):[],disabledSeconds:(e,n)=>t&&e===l.hour()&&n===l.minute()?d.filter(e=>e<l.second()):o&&e===s.hour()&&n===s.minute()?d.filter(e=>e>s.second()):[]}};u(()=>c),p(()=>m)},x={utc:t,...e,disabledDate:d,disabledTime:c,showTime:!!e.showTime&&{defaultValue:(0,r.default)("00:00:00","HH:mm:ss")}};return(0,l.jsx)(C,{...x,value:o})};w.ReadPretty=x.DatePicker,w.RangePicker=function(e){let{value:t,picker:o="date",format:i,dateFormat:s,showTime:c,timeFormat:p}=e,{t:m}=(0,u.useTranslation)(),h=(0,n.useFieldSchema)(),x=(0,n.useField)(),{utc:f=!0}=S(),g=(0,v.fD)(),y=(0,_.lum)(),k=!(null==h?void 0:h["x-filter-operator"]),C=[{label:m("Today"),value:g.today},{label:m("Last week"),value:g.lastWeek},{label:m("This week"),value:g.thisWeek},{label:m("Next week"),value:g.nextWeek},{label:m("Last month"),value:g.lastMonth},{label:m("This month"),value:g.thisMonth},{label:m("Next month"),value:g.nextMonth},{label:m("Last quarter"),value:g.lastQuarter},{label:m("This quarter"),value:g.thisQuarter},{label:m("Next quarter"),value:g.nextQuarter},{label:m("Last year"),value:g.lastYear},{label:m("This year"),value:g.thisYear},{label:m("Next year"),value:g.nextYear},{label:m("Last 7 days"),value:g.last7Days},{label:m("Next 7 days"),value:g.next7Days},{label:m("Last 30 days"),value:g.last30Days},{label:m("Next 30 days"),value:g.next30Days},{label:m("Last 90 days"),value:g.last90Days},{label:m("Next 90 days"),value:g.next90Days}],w=t?(0,v.Pn)(null==t?void 0:t[0],o):o,F={utc:f,presets:C,...e,format:b({targetPicker:w,picker:o,format:i,dateFormat:s,showTime:c,timeFormat:p}),picker:w,showTime:!!c&&{defaultValue:[(0,r.default)("00:00:00","HH:mm:ss"),(0,r.default)("23:59:59","HH:mm:ss")]}};return k?(0,l.jsxs)(a.Space.Compact,{children:[(0,l.jsx)(a.Select,{role:"button","data-testid":"select-picker",style:{width:"100px"},popupMatchSelectWidth:!1,defaultValue:w,options:y([{label:m("Date"),value:"date"},{label:m("Month"),value:"month"},{label:m("Quarter"),value:"quarter"},{label:m("Year"),value:"year"}]),onChange:t=>{let o=(0,d.getPickerFormat)(t),l=(0,d.getDateTimeFormat)(t,o,c,p);null==x||x.setComponentProps({picker:t,dateFormat:o,format:l}),h&&(h["x-component-props"]={...e,picker:t,dateFormat:o,format:l}),x&&(x.value=void 0)}}),(0,l.jsx)(M,{...F,value:t})]}):(0,l.jsx)(M,{...F})},w.FilterWithPicker=function(e){var t;let{picker:o="date",format:i,dateFormat:c,showTime:p,timeFormat:m}=e,h=(0,v.Fr)(),{utc:x=!0}=S(),_=Array.isArray(e.value)?e.value[0]:e.value,f=(0,n.useFieldSchema)(),g=_?(0,v.Pn)(_,o):o,[y,k]=(0,s.useState)(g),{t:M}=(0,u.useTranslation)();(0,s.useEffect)(()=>{k(g)},[g]);let w={utc:x,inputReadOnly:h,...e,underFilter:!0,showTime:!!p&&{defaultValue:(0,r.default)("00:00:00","HH:mm:ss")},format:b({targetPicker:y,picker:o,format:i,dateFormat:c,showTime:p,timeFormat:m}),picker:y,onChange:t=>{e.onChange(void 0),setTimeout(()=>{e.onChange(t)})}},F=(0,n.useField)();return(0,l.jsxs)(a.Space.Compact,{style:{width:"100%"},children:[(0,l.jsx)(a.Select,{role:"button","data-testid":"select-picker",style:{width:"100px"},popupMatchSelectWidth:!1,value:y,options:[{label:M("Date"),value:"date"},{label:M("Month"),value:"month"},{label:M("Quarter"),value:"quarter"},{label:M("Year"),value:"year"}],onChange:t=>{k(t);let o=(0,d.getPickerFormat)(t),l=(0,d.getDateTimeFormat)(t,o,p,m);null==F||F.setComponentProps({picker:t,dateFormat:o,format:l}),(null==f?void 0:f["x-component-props"])&&(f["x-component-props"]={...e,picker:t,dateFormat:o,format:l}),F&&(F.value=null)}}),(0,l.jsx)(C,{...w,value:(t=w.format,_&&_.endsWith("Z")?(0,r.default)(_).format(t):_)})]})}},54158(e,t,o){o.d(t,{CE:()=>l.CE,Fr:()=>n.Fr,Pn:()=>n.Pn,Q2:()=>n.Q2,QD:()=>n.QD,Qo:()=>l.Qo,UT:()=>n.UT,fD:()=>n.fD,lr:()=>l.lr,ms:()=>n.ms,nx:()=>l.nx,x1:()=>n.x1});var l=o(64575),n=o(64004)},64004(e,t,o){o.d(t,{Fr:()=>p,Pn:()=>g,Q2:()=>_,QD:()=>u,UT:()=>m,fD:()=>v,ms:()=>s,x1:()=>c});var l=o(63526),n=o(91815),a=o(64613);let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"date",o=arguments.length>2?arguments[2]:void 0;if(!n.default.isDayjs(e))return e;if("local"===o){let o=new Date().getTimezoneOffset();return(0,n.default)(r(e,t,"gmt")).add(o,"minutes").toISOString()}return"year"===t?e.format("YYYY")+"-01-01T00:00:00.000Z":"month"===t?e.format("YYYY-MM")+"-01T00:00:00.000Z":"quarter"===t?e.startOf("quarter").format("YYYY-MM")+"-01T00:00:00.000Z":"week"===t?e.startOf("week").add(1,"day").format("YYYY-MM-DD")+"T00:00:00.000Z":e.format("YYYY-MM-DDTHH:mm:ss.SSS")+"Z"},i=(e,t)=>e&&n.default.isDayjs(e)?r(e,t,"local"):e,s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{showTime:o,gmt:a,picker:s="date",utc:d=!0}=t;if(!e)return e;if(!d)return e.format(o?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD");if(o)return a?(0,l.toGmt)(e):(0,l.toLocal)(e);if("boolean"==typeof a)return a?e&&n.default.isDayjs(e)?r(e,s,"gmt"):e:i(e,s);return i(e,s)},d=(e,t,o)=>{let a=o&&"date"===t?"YYYY-MM-DD HH:mm:ss":(0,l.getPickerFormat)(t);return e?(0,n.default)(e).format(a):e},u=(e,t,o,r,i,s)=>{let d=n.default.tz.guess(),u=i?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(!e)return e;if(t)return(0,a.formatDayjsValue)(e,"YYYY-MM-DD");if(o){if(s)return(0,l.toGmt)(e);if("date"!==r)return(0,n.default)(e).startOf(r).toISOString();let t=(0,n.default)(e).format(u);return(0,n.default)(t).tz(d,!0).toISOString()}return i?(0,n.default)(e).format(u):(0,n.default)(e).startOf(r).format(u)},c=function(){let e=p();return t=>{let{dateOnly:o,showTime:n,picker:a="date",utc:r,gmt:i,underFilter:s}=t,c=(0,l.getDefaultFormat)(t),p=t.onChange;return{...t,inputReadOnly:e,format:c,value:(0,l.str2moment)(t.value,t),onChange:(e,t)=>{p&&(s?p(d(e,a,n)):p(u(e,o,r,a,n,i)))}}}};function p(){return window.matchMedia("(max-width: 768px)").matches}let m=function(){let e=p();return t=>{let o=(0,l.getDefaultFormat)(t),n=t.onChange,{dateOnly:a,showTime:r,picker:i="date",utc:u,gmt:c,underFilter:p}=t;return{...t,format:o,value:(0,l.str2moment)(t.value,t),inputReadOnly:e,onChange:e=>{n&&(p?n(e?[d(e[0],i,r),d(e[1],i,r)]:[]):n(e?[s(function(e,t){let{showTime:o}=t;return o?e:e.startOf("day")}(e[0],t),t),s(function(e,t){let{showTime:o}=t;return o?e:e.endOf("day")}(e[1],t),t)]:[]))}}}},h=(e,t)=>(0,n.default)().add(e,"isoWeek"===t?"week":t).startOf(t),x=(e,t)=>(0,n.default)().add(e,"isoWeek"===t?"week":t).endOf(t),v=e=>{if(null==e?void 0:e.shouldBeString){let t=t=>Array.isArray(t)?t.map(t=>s(t,{utc:null==e?void 0:e.utc})):s(t,{utc:null==e?void 0:e.utc});return{now:()=>t((0,n.default)()),today:e=>f(t([h(0,"day"),x(0,"day")]),e),yesterday:e=>f(t([h(-1,"day"),x(-1,"day")]),e),dayBeforeYesterday:e=>f(t([h(-2,"day"),x(-2,"day")]),e),tomorrow:e=>f(t([h(1,"day"),x(1,"day")]),e),thisWeek:e=>f(t([h(0,"isoWeek"),x(0,"isoWeek")]),e),lastWeek:e=>f(t([h(-1,"isoWeek"),x(-1,"isoWeek")]),e),nextWeek:e=>f(t([h(1,"isoWeek"),x(1,"isoWeek")]),e),thisIsoWeek:e=>f(t([h(0,"isoWeek"),x(0,"isoWeek")]),e),lastIsoWeek:e=>f(t([h(-1,"isoWeek"),x(-1,"isoWeek")]),e),nextIsoWeek:e=>f(t([h(1,"isoWeek"),x(1,"isoWeek")]),e),thisMonth:e=>f(t([h(0,"month"),x(0,"month")]),e),lastMonth:e=>f(t([h(-1,"month"),x(-1,"month")]),e),nextMonth:e=>f(t([h(1,"month"),x(1,"month")]),e),thisQuarter:e=>f(t([h(0,"quarter"),x(0,"quarter")]),e),lastQuarter:e=>f(t([h(-1,"quarter"),x(-1,"quarter")]),e),nextQuarter:e=>f(t([h(1,"quarter"),x(1,"quarter")]),e),thisYear:e=>f(t([h(0,"year"),x(0,"year")]),e),lastYear:e=>f(t([h(-1,"year"),x(-1,"year")]),e),nextYear:e=>f(t([h(1,"year"),x(1,"year")]),e),last7Days:e=>f(t([h(-6,"days"),x(0,"days")]),e),next7Days:e=>f(t([h(1,"day"),x(7,"days")]),e),last30Days:e=>f(t([h(-29,"days"),x(0,"days")]),e),next30Days:e=>f(t([h(1,"day"),x(30,"days")]),e),last90Days:e=>f(t([h(-89,"days"),x(0,"days")]),e),next90Days:e=>f(t([h(1,"day"),x(90,"days")]),e)}}return{now:()=>(0,n.default)().toISOString(),today:e=>f([h(0,"day"),x(0,"day")],e),yesterday:e=>f([h(-1,"day"),x(-1,"day")],e),dayBeforeYesterday:e=>f([h(-2,"day"),x(-2,"day")],e),tomorrow:e=>f([h(1,"day"),x(1,"day")],e),thisWeek:e=>f([h(0,"isoWeek"),x(0,"isoWeek")],e),lastWeek:e=>f([h(-1,"isoWeek"),x(-1,"isoWeek")],e),nextWeek:e=>f([h(1,"isoWeek"),x(1,"isoWeek")],e),thisIsoWeek:e=>f([h(0,"isoWeek"),x(0,"isoWeek")],e),lastIsoWeek:e=>f([h(-1,"isoWeek"),x(-1,"isoWeek")],e),nextIsoWeek:e=>f([h(1,"isoWeek"),x(1,"isoWeek")],e),thisMonth:e=>f([h(0,"month"),x(0,"month")],e),lastMonth:e=>f([h(-1,"month"),x(-1,"month")],e),nextMonth:e=>f([h(1,"month"),x(1,"month")],e),thisQuarter:e=>f([h(0,"quarter"),x(0,"quarter")],e),lastQuarter:e=>f([h(-1,"quarter"),x(-1,"quarter")],e),nextQuarter:e=>f([h(1,"quarter"),x(1,"quarter")],e),thisYear:e=>f([h(0,"year"),x(0,"year")],e),lastYear:e=>f([h(-1,"year"),x(-1,"year")],e),nextYear:e=>f([h(1,"year"),x(1,"year")],e),last7Days:e=>f([h(-6,"days"),x(0,"days")],e),next7Days:e=>f([h(1,"day"),x(7,"days")],e),last30Days:e=>f([h(-29,"days"),x(0,"days")],e),next30Days:e=>f([h(1,"day"),x(30,"days")],e),last90Days:e=>f([h(-89,"days"),x(0,"days")],e),next90Days:e=>f([h(1,"day"),x(90,"days")],e)}},_=()=>({nowUtc:()=>(0,n.default)().toISOString(),nowLocal:()=>(0,n.default)().format("YYYY-MM-DD HH:mm:ss"),todayUtc:()=>(0,n.default)().startOf("day").utc().toISOString(),todayLocal:()=>(0,n.default)().startOf("day").format("YYYY-MM-DD HH:mm:ss"),todayDate:()=>(0,n.default)().format("YYYY-MM-DD"),yesterdayUtc:()=>(0,n.default)().subtract(1,"day").startOf("day").utc().toISOString(),yesterdayLocal:()=>(0,n.default)().subtract(1,"day").startOf("day").format("YYYY-MM-DD HH:mm:ss"),yesterdayDate:()=>(0,n.default)().subtract(1,"day").format("YYYY-MM-DD"),tomorrowUtc:()=>(0,n.default)().add(1,"day").startOf("day").utc().toISOString(),tomorrowLocal:()=>(0,n.default)().add(1,"day").startOf("day").format("YYYY-MM-DD HH:mm:ss"),tomorrowDate:()=>(0,n.default)().add(1,"day").format("YYYY-MM-DD")});function f(e,t){return(null==t?void 0:t.isParsingVariable)&&(null==t?void 0:t.fieldOperator)&&"$dateBetween"!==t.fieldOperator?e[0]:e}function g(e,t){return/^\d{4}$/.test(e)?"year":/^\d{4}-\d{2}$/.test(e)?"month":/^\d{4}Q[1-4]$/.test(e)?"quarter":/^\d{4}-\d{2}-\d{2}$/.test(e)?"date":t||"date"}},10683(e,t,o){o.d(t,{d:()=>i});var l=o(52793),n=o(51649),a=o(77843),r=o(46457);let i=e=>{let{t}=(0,a.useTranslation)(),o=(0,n.useContext)(r._),i=`nocobase_table_column_settings_${o}`,s=(0,n.useCallback)(()=>{try{let e=localStorage.getItem(i);return e?JSON.parse(e):null}catch(e){return console.warn("Failed to parse table column settings from localStorage:",e),null}},[i]);return{getSettings:s,saveSettings:(0,n.useCallback)(e=>{try{let t=JSON.stringify(e);localStorage.setItem(i,t);let l=new CustomEvent("nocobase-table-settings-changed",{detail:{key:i,tableId:o,settings:e}});window.dispatchEvent(l)}catch(e){console.warn("Failed to save table column settings to localStorage:",e),l.message.error(t("Failed to save table settings"))}},[i,o,t]),clearSettings:(0,n.useCallback)(()=>{try{localStorage.removeItem(i);let e=new CustomEvent("nocobase-table-settings-changed",{detail:{key:i,tableId:o,settings:null}});window.dispatchEvent(e)}catch(e){console.warn("Failed to clear table column settings from localStorage:",e),l.message.error(t("Failed to clear table settings"))}},[i,o,t])}}},41428(e,t,o){o.d(t,{i:()=>r});var l=o(51649),n=o(46457),a=o(10683);let r=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],o=(0,l.useContext)(n._),{getSettings:r}=(0,a.d)(o),[i,s]=(0,l.useState)(0);(0,l.useEffect)(()=>{let e=e=>{let{key:t,tableId:l}=e.detail;(t.includes(o)||l===o)&&s(e=>e+1)};return window.addEventListener("nocobase-table-settings-changed",e),()=>{window.removeEventListener("nocobase-table-settings-changed",e)}},[o]);let d=(0,l.useMemo)(()=>r(),[r,i]);return{columns:(0,l.useMemo)(()=>{if(!t||!d||0===d.length)return e;let o=new Map;d.forEach(e=>{o.set(e.key,e)});let l=e.map(e=>{let t=o.get(e.key);if(t){let o=e.columnHidden||!t.visible,l=t.width||e.width,n=t.fixed||e.fixed;return{...e,columnHidden:o,fixed:n,width:l,_orderIndex:t.order}}return e}),n=[],a=[];l.forEach(e=>{void 0!==e._orderIndex?n.push(e):a.push(e)}),n.sort((e,t)=>(e._orderIndex||0)-(t._orderIndex||0));let r=[...n,...a];return r.forEach(e=>{delete e._orderIndex}),r},[e,d])}}},45943(e,t,o){o.d(t,{x:()=>v,n:()=>x});var l=o(71178),n=o(56920),a=o(52793),r=o(51649),i=o(77843),s=o(16211),d=o(17157);let{Paragraph:u,Text:c}=a.Typography,{Paragraph:p,Text:m,Link:h}=a.Typography,x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,d.zd)(),[l,n]=r.default.useState(!1),a=(0,s.VB)();return{loading:l,download:async()=>{n(!0);try{let l=await a.request({url:"logger:collect",method:"post",responseType:"blob",data:{error:{message:e.message,stack:e.stack},location:o,...t}}),n=window.URL.createObjectURL(new Blob([l.data],{type:"application/gzip"})),r=document.createElement("a");r.setAttribute("href",n),r.setAttribute("download","logs.tar.gz"),r.click(),r.remove()}catch(e){console.log(e)}n(!1)}}},v=e=>{let{error:t}=e,o=(0,n.useFieldSchema)(),{t:r}=(0,i.useTranslation)(),{loading:s,download:d}=x(t,{schema:o}),u=(0,l.jsxs)(i.Trans,{children:["This is likely a NocoBase internals bug. Please open an issue at ",(0,l.jsx)(h,{href:"https://github.com/nocobase/nocobase/issues",target:"_blank",children:"here"})]});return(0,l.jsx)("div",{style:{backgroundColor:"white"},children:(0,l.jsx)(a.Result,{style:{maxWidth:"60vw",margin:"auto"},status:"error",title:r("Render Failed"),subTitle:u,extra:[(0,l.jsx)(a.Button,{type:"primary",href:"https://github.com/nocobase/nocobase/issues",target:"_blank",children:r("Feedback")},"feedback"),(0,l.jsx)(a.Button,{loading:s,onClick:d,children:r("Download logs")},"log")],children:(0,l.jsx)(p,{copyable:{text:t.stack},children:(0,l.jsx)(m,{type:"danger",style:{whiteSpace:"pre-line",textAlign:"center"},children:t.stack})})})})};v.Modal=e=>{let[t,o]=r.default.useState(!1),n=(0,l.jsx)(u,{style:{display:"flex",marginBottom:0},copyable:{text:e.error.message},children:(0,l.jsxs)(c,{type:"danger",style:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",display:"inline-block",maxWidth:"200px"},children:["Error: ",e.error.message]})});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{onMouseOver:()=>o(!0),children:e.children||n}),(0,l.jsx)(a.Modal,{zIndex:1e4,open:t,footer:null,onCancel:()=>o(!1),width:"60%",children:(0,l.jsx)(v,{...e})})]})}},57610(e,t,o){o.d(t,{n:()=>l.n,x:()=>l.x});var l=o(45943)},36090(e,t,o){o.d(t,{S:()=>x,b:()=>m});var l=o(71178),n=o(10691),a=o(91815),r=o(56920),i=o(71883),s=o(52793),d=o(51649),u=o(44374);let c=(0,a.default)(),p=(0,n.css)`
431
+ }}}`,message:'{{t("Invalid JSON format")}}'},i={type:"object",properties:{url:{type:"string",title:'{{t("Request URL")}}',required:!0,"x-decorator":"FormItem","x-component":"Input"},method:{type:"string",title:'{{t("Request method")}}',"x-decorator":"FormItem","x-component":"Select",default:"POST",enum:[{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"PUT",value:"PUT"},{label:"PATCH",value:"PATCH"},{label:"DELETE",value:"DELETE"}]},headers:{type:"string",title:'{{t("Request headers")}}',"x-decorator":"FormItem","x-component":"Input.TextArea","x-validator":r},params:{type:"string",title:'{{t("Request query parameters")}}',"x-decorator":"FormItem","x-component":"Input.TextArea","x-validator":r},data:{type:"string",title:'{{t("Request body")}}',"x-decorator":"FormItem","x-component":"Input.TextArea","x-validator":r}}},s=async(e,t)=>{var o,r,i;let{operator:s,field:d,condition:u,variables:c,localVariables:p,conditionType:m,variableNameOfLeftCondition:h}=e,x=(null==d||null==(o=d.stateOfLinkageRules)?void 0:o.disabled)||[!1],v=(null==d||null==(r=d.stateOfLinkageRules)?void 0:r.display)||["visible"];switch(s){case n.X2.Visible:await (0,a._c)({ruleGroup:u,variables:c,localVariables:p,conditionType:m,variableNameOfLeftCondition:h},t)&&(v.push(s),d.data=d.data||{},d.data.hidden=!1),d.stateOfLinkageRules={...d.stateOfLinkageRules,display:v},d.display=(0,l.last)(v);break;case n.X2.Hidden:await (0,a._c)({ruleGroup:u,variables:c,localVariables:p,conditionType:m,variableNameOfLeftCondition:h},t)?(d.data=d.data||{},d.data.hidden=!0):(d.data=d.data||{},d.data.hidden=!1);break;case n.X2.Disabled:await (0,a._c)({ruleGroup:u,variables:c,localVariables:p,conditionType:m,variableNameOfLeftCondition:h},t)&&x.push(!0),d.stateOfLinkageRules={...d.stateOfLinkageRules,disabled:x},d.data=d.data||{},d.data.disabled=(0,l.last)(x),d.componentProps.disabled=(0,l.last)(x);break;case n.X2.Active:await (0,a._c)({ruleGroup:u,variables:c,localVariables:p,conditionType:m,variableNameOfLeftCondition:h},t)?x.push(!1):x.push(!!(null==(i=d.componentProps)?void 0:i.disabled)),d.stateOfLinkageRules={...d.stateOfLinkageRules,disabled:x},d.data=d.data||{},d.data.disabled=(0,l.last)(x),d.componentProps.disabled=(0,l.last)(x);break;default:return null}},d=e=>{e.data=e.data||{},e.display="visible",e.data.hidden=!1,e.data.disabled=!1,e.componentProps.disabled=!1}},76058(e,t,o){o.d(t,{$5:()=>a,E:()=>n,fl:()=>r});var l=o(51649);let n=l.default.createContext(100),a=()=>l.default.useContext(n),r=(e,t,o)=>{let l=t;return"page"!==e||window.location.pathname.includes("/embed/")?(l=t+o)<200?l+200:l:(l=t+o)>200?l-200:l}},16246(e,t,o){o.d(t,{t:()=>l});let l=(0,o(51649).createContext)({});l.displayName="AssociationFieldContext"},31475(e,t,o){o.d(t,{Ay:()=>g,G2:()=>f,TP:()=>k,gZ:()=>b,sy:()=>S,uR:()=>_});var l=o(71178),n=o(56920),a=o(77583),r=o(13791),i=o(51649),s=o(68557),d=o(43288),u=o(35432),c=o(65613),p=o(58980),m=o(41944),h=o(7819),x=o(95951),v=o(16246);let _=e=>{let t=(0,n.useFieldSchema)(),{insertAfterBegin:o}=(0,x.er)(),{isMobileLayout:l}=(0,h.mY)();return(0,i.useCallback)(n=>{l||t.reduceProperties((t,o)=>o["x-component"]==="AssociationField."+e?o:t,null)||o((0,r.default)(n))},[e,t,o,l])};function f(){return(0,i.useContext)(v.t)}function g(e){var t,o,l,r,h,x,v,_,f,g;let{action:b="list",service:y,useOriginalFilter:S}=e,k=(0,n.useFieldSchema)(),C=(0,n.useField)(),{getField:M}=(0,d.k7)(),{getCollectionJoinField:w}=(0,d.nj)(),F=(0,m.pE)(),{isNew:P}=(0,u.PD)()||{},j=((0,a.isString)(null==k||null==(l=k["x-component-props"])||null==(o=l.service)||null==(t=o.params)?void 0:t.filter)?null==(x=C.componentProps)||null==(h=x.service)||null==(r=h.params)?void 0:r.filter:null==k||null==(f=k["x-component-props"])||null==(_=f.service)||null==(v=_.params)?void 0:v.filter)||(null==y||null==(g=y.params)?void 0:g.filter),{filter:A}=(0,s.j)({filterOption:j,onFilterChange:()=>{P&&C.reset()}}),I=(0,i.useMemo)(()=>M(k.name)||w(null==k?void 0:k["x-collection-field"]),[k]),T=null==F?void 0:F[null==I?void 0:I.sourceKey],D=(0,i.useMemo)(()=>{let e=["oho","o2m"].includes(null==I?void 0:I.interface);return(0,p.Dj)([(0,p.Dj)([e&&!(0,c.vc)(k)&&(null==I?void 0:I.foreignKey)&&!S?{[I.foreignKey]:{$is:null}}:null,A]),e&&null!=T&&!(0,c.vc)(k)&&(null==I?void 0:I.foreignKey)&&!S?{[I.foreignKey]:{$eq:T}}:null],"$or")},[null==I?void 0:I.interface,null==I?void 0:I.foreignKey,k,A,T,S]);return(0,i.useMemo)(()=>({resource:null==I?void 0:I.target,action:b,...y,params:{...null==y?void 0:y.params,filter:D}}),[null==I?void 0:I.target,b,D,y])}let b=function(){var e,t,o,l,a;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=(0,n.useFieldSchema)();return{label:"label",value:"value",...(null==(l=i["x-component-props"])||null==(o=l.field)||null==(t=o.uiSchema)||null==(e=t["x-component-props"])?void 0:e.fieldNames)||(null==(a=i["x-component-props"])?void 0:a.fieldNames)||r.fieldNames}},y=(0,i.createContext)(null);y.displayName="SubFormContext";let S=e=>{let t=(0,i.useContext)(y),{value:o,collection:n,fieldSchema:r,parent:s,skip:d}=e.value,u=(0,i.useMemo)(()=>a.default.omitBy({value:o,collection:n,fieldSchema:r,skip:d,parent:s||((null==t?void 0:t.skip)?t.parent:t)},a.default.isUndefined),[o,n,r,d,s,t]);return(0,l.jsx)(y.Provider,{value:u,children:e.children})},k=()=>{let{value:e,collection:t,fieldSchema:o,parent:l}=(0,i.useContext)(y)||{};return{formValue:e,collection:t,fieldSchema:o,parent:l}}},60817(e,t,o){o.d(t,{Hi:()=>s,PB:()=>p,RB:()=>d,WX:()=>h,kk:()=>m,qT:()=>function e(t){let o=[];for(let l=0;l<t.length;l++){let n=t[l].children;Array.isArray(n)&&o.push(...e(n)),o.push({...t[l]})}return o}});var l=o(27404),n=o(63526),a=o(52793),r=o(51649),i=o(26174);let s=()=>{let e=(0,i.r2)();return(t,o)=>{if(!t)return;let l=null==e?void 0:e.getCollectionField(`${t}.${o}`);return null==l?void 0:l.uiSchema}},d=(e,t)=>{let o=(0,i.r2)();if(!e)return;let l=null==o?void 0:o.getCollectionField(`${e}.${t}`);return null==l?void 0:l.uiSchema},u=e=>{let t=(0,n.getDefaultFormat)(e),o=(0,n.str2moment)(e.value,e),a=o&&o.isValid()?o.format(t):e.value;return(0,l.isArr)(a)?a.join("~"):a},c=e=>e?Array.isArray(e)?e:[e]:[],p=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=null==e?void 0:e.enum;if(Array.isArray(l)&&t){let e=c(t).map(e=>{let t=l.find(t=>t.value===e);return o?r.default.createElement(a.Tag,{color:null==t?void 0:t.color},null==t?void 0:t.label):null==t?void 0:t.label});return o?e:e.join(", ")}return(null==e?void 0:e["x-component"])==="DatePicker"?u({...null==e?void 0:e["x-component-props"],value:t}):t},m=(e,t,o)=>{let l=null==e?void 0:e.enum;return Array.isArray(l)&&t?c(t).map(e=>{let t=l.find(t=>t.value===e);return r.default.createElement(a.Tag,{color:o||(null==t?void 0:t.color)},null==t?void 0:t.label)}):(null==e?void 0:e["x-component"])==="DatePicker"?r.default.createElement(a.Tag,{color:o},u({...null==e?void 0:e["x-component-props"],value:t})):r.default.createElement(a.Tag,{color:o},t)};function h(e){var t,o;return["Nester","SubTable","PopoverNester"].includes((null==(t=e["x-component-props"])?void 0:t.mode)||(null==(o=e.componentProps)?void 0:o.mode))}},71226(e,t,o){o.d(t,{A:()=>p,t:()=>m});var l=o(71178),n=o(56920),a=o(52793),r=o(51649),i=o(77843),s=o(839),d=o(38892),u=o(49948),c=o(12637);let p=(0,r.createContext)({}),m=r.default.forwardRef((e,t)=>{let{children:o,...m}=e,{token:h}=(0,u.K)(),{title:x,description:v,..._}=m,f=(0,r.useMemo)(()=>({marginBottom:h.marginBlock,height:"100%"}),[h.marginBlock]),[g,b]=(0,r.useState)(0),y=(0,r.useRef)(null),{t:S}=(0,i.useTranslation)(),k=(0,n.useFieldSchema)(),C=null==k?void 0:k["x-block-linkage-rules"];(0,r.useEffect)(()=>{let e=setTimeout(()=>{y.current?b(v?y.current.parentElement.parentElement.parentElement.offsetHeight:h.fontSizeLG*h.lineHeightLG+2*h.padding-1):g&&b(0)},500);return()=>clearTimeout(e)},[x,v]);let M=(x||v)&&(0,l.jsxs)("div",{ref:y,style:{padding:"8px 0px 8px"},children:[(0,l.jsxs)("span",{children:[" ",S(x,{ns:s.z})]}),v&&(0,l.jsx)(c.w,{value:S(v,{ns:s.z}),style:{overflowWrap:"break-word",whiteSpace:"normal",fontWeight:400,color:h.colorTextDescription,borderRadius:"4px"}})]}),w=(0,l.jsx)(p.Provider,{value:{titleHeight:g},children:(0,l.jsx)(a.Card,{ref:t,variant:"borderless",style:f,..._,title:M,children:o})});return C?(0,l.jsx)(d._,{children:w}):w});m.displayName="BlockItemCard"},8179(e,t,o){o.d(t,{Z0:()=>f,AQ:()=>b.A,qI:()=>g,tn:()=>b.t});var l=o(71178),n=o(51649),a=o(56920),r=o(94046),i=o(64679),s=o(17157),d=o(80461),u=o(91032),c=o(16319),p=o(57610);let m=(0,o(54944).f)("nb-block-item",e=>{let{componentCls:t}=e;return{[t]:{position:"relative","&:hover":{"> .general-schema-designer":{display:"block"}},"&.nb-form-item:hover":{"> .general-schema-designer":{background:"var(--colorBgSettingsHover) !important",border:"0 !important",top:"-5px !important",bottom:"-5px !important",left:"-5px !important",right:"-5px !important"}},"> .general-schema-designer":{position:"absolute",zIndex:999,top:0,bottom:0,left:0,right:0,display:"none",border:"2px solid var(--colorBorderSettingsHover)",pointerEvents:"none","> .general-schema-designer-icons":{position:"absolute",right:"2px",top:"2px",lineHeight:"16px",pointerEvents:"all",".ant-space-item":{backgroundColor:"var(--colorSettings)",color:"#fff",lineHeight:"16px",width:"16px",paddingLeft:"1px",alignSelf:"stretch"}}},".ant-card":{borderRadius:e.borderRadiusBlock}}}});var h=o(11340),x=o(43288),v=o(28227),_=o(38892);let f=(0,d.T)(e=>{let{className:t,children:o,style:d}=(0,c.YY)(e),{componentCls:f,hashId:g}=m(),b=(0,a.useFieldSchema)(),{render:y}=(0,s.s6)(b),{getAriaLabel:S}=(e=>{var t,o;let l=(0,a.useFieldSchema)(),r=(0,c.lu)(),i=l["x-component"],s="string"==typeof i?i:null==i?void 0:i.displayName,d=r(l["x-collection-field"]),{name:u}=(0,h.MX)()||{},{name:p,getField:m}=(0,x.k7)();u=e||("action"!==u?u:"");let v=r(l.title)||r(null==(o=m(l.name))||null==(t=o.uiSchema)?void 0:t.title);return{getAriaLabel:(0,n.useCallback)(e=>(e=e?`-${e}`:"",["block-item",s,p,u,d,v,e].filter(Boolean).join("-")),[s,p,u,d,v])}})(e.name),k=(0,n.useMemo)(()=>S(),[S]),C=(0,v.Ge)(),M="FormItem"===b["x-decorator"]&&b["x-block-linkage-rules"],w="Iframe"===b["x-component"]&&b["x-block-linkage-rules"],F=(0,l.jsxs)(u.SortableItem,{role:"button","aria-label":k,className:(0,r.default)("nb-block-item",t,f,g),style:d,children:[y(),(0,l.jsx)(i.ErrorBoundary,{FallbackComponent:p.x,onError:console.log,children:o})]});return!C||M||w?(0,l.jsx)(_._,{children:F}):F},{displayName:"BlockItem"}),g=()=>{let{remove:e}=(0,c.er)();return(0,l.jsxs)("div",{children:[(0,l.jsx)("a",{onClick:()=>{e()},children:"删除"}),(0,l.jsx)(u.DragHandler,{})]})};var b=o(71226)},64575(e,t,o){o.d(t,{nx:()=>S,CE:()=>b,lr:()=>w,Qo:()=>k});var l=o(71178),n=o(56920),a=o(52793),r=o(91815),i=o(77583),s=o(51649),d=o(63526),u=o(77843),c=o(64613),p=o(27404),m=o(94046),h=o(84951);let x=()=>null;x.DatePicker=function(e){let t,o,n,{value:a,picker:i="date"}=e,s=(0,c.usePrefixCls)("description-date-picker",e);return a?(0,l.jsx)("div",{className:(0,m.default)(s,e.className),children:(t=(0,d.getDefaultFormat)(e),o=(0,d.str2moment)(a,e),n=r.default.isDayjs(o)?o.format(t):"",(0,p.isArr)(n)?n.join("~"):n)}):(0,l.jsx)("div",{})},x.DateRangePicker=function(e){let t=(0,c.usePrefixCls)("description-text",e),o=(0,d.getDefaultFormat)(e);return(0,l.jsx)("div",{className:(0,m.default)(t,e.className),style:e.style,children:(()=>{let t=(0,d.str2moment)(e.value,e);if(!t)return"";let l=t.map(e=>e.format(o));return(0,p.isArr)(l)?l.join("~"):l})()})},x.DatePicker=(0,h.A)(x.DatePicker);var v=o(64004),_=o(82924),f=o(43923),g=o(2314);let b=e=>{let{targetPicker:t,picker:o="date",format:l,dateFormat:n,showTime:a,timeFormat:r}=e,i=n||l,s=t===o&&i?i:(0,d.getPickerFormat)(t),u="date"===t&&s?s.replace(/\s*[Hh]{1,2}:mm(?::ss)?(?:\.SSS)?(?:\s*[aA])?/g,"").trim():s;return(0,d.getDateTimeFormat)(t,u,a,r)},y=s.default.createContext({utc:!0}),S=()=>s.default.useContext(y),k=y.Provider,C=(0,n.connect)(a.DatePicker,(0,n.mapProps)((0,v.x1)()),(0,n.mapReadPretty)(x.DatePicker)),M=(0,n.connect)(a.DatePicker.RangePicker,(0,n.mapProps)((0,v.UT)()),(0,n.mapReadPretty)(x.DateRangePicker)),w=e=>{let{utc:t=!0}=S(),o=Array.isArray(e.value)?e.value[0]:e.value,{parseVariable:n}=(0,f.$l)()||{},a=(0,f.gp)(),[d,u]=(0,s.useState)(null),[c,p]=(0,s.useState)(null),m=(0,s.useRef)(null);(0,s.useEffect)(()=>(m.current&&m.current(),m.current=(0,g.autorun)(()=>{h()}),()=>{m.current()}),[e._maxDate,e._minDate,a,n]);let h=async()=>{let t=e._minDate?Promise.resolve((0,r.default)(e._minDate)):Promise.resolve(null),o=e._maxDate?Promise.resolve((0,r.default)(e._maxDate)):Promise.resolve(null);(0,f.DZ)(e._maxDate)&&(o=n(e._maxDate,a).then(e=>(0,r.default)(Array.isArray(e.value)?(0,i.last)(e.value):e.value))),(0,f.DZ)(e._minDate)&&(t=n(e._minDate,a).then(e=>(0,r.default)(Array.isArray(e.value)?(0,i.first)(e.value):e.value)));let[l,s]=await Promise.all([t,o]),d=Array.from({length:60},(e,t)=>t),c=e=>{if(!r.default.isDayjs(e))return!1;let t=l?l.startOf("day"):null,o=s?s.endOf("day"):null;return!!(t&&e.startOf("day").isBefore(t)||o&&e.startOf("day").isAfter(o))},m=e=>{if(!e||!l&&!s)return{disabledHours:()=>[],disabledMinutes:()=>[],disabledSeconds:()=>[]};let t=l&&e.isSame(l,"day"),o=s&&e.isSame(s,"day");return{disabledHours:()=>{let e=[];if(t)for(let t=0;t<l.hour();t++)e.push(t);if(o)for(let t=s.hour()+1;t<24;t++)e.push(t);return e},disabledMinutes:e=>t&&e===l.hour()?d.filter(e=>e<l.minute()):o&&e===s.hour()?d.filter(e=>e>s.minute()):[],disabledSeconds:(e,n)=>t&&e===l.hour()&&n===l.minute()?d.filter(e=>e<l.second()):o&&e===s.hour()&&n===s.minute()?d.filter(e=>e>s.second()):[]}};u(()=>c),p(()=>m)},x={utc:t,...e,disabledDate:d,disabledTime:c,showTime:!!e.showTime&&{defaultValue:(0,r.default)("00:00:00","HH:mm:ss")}};return(0,l.jsx)(C,{...x,value:o})};w.ReadPretty=x.DatePicker,w.RangePicker=function(e){let{value:t,picker:o="date",format:i,dateFormat:s,showTime:c,timeFormat:p}=e,{t:m}=(0,u.useTranslation)(),h=(0,n.useFieldSchema)(),x=(0,n.useField)(),{utc:f=!0}=S(),g=(0,v.fD)(),y=(0,_.lum)(),k=!(null==h?void 0:h["x-filter-operator"]),C=[{label:m("Today"),value:g.today},{label:m("Last week"),value:g.lastWeek},{label:m("This week"),value:g.thisWeek},{label:m("Next week"),value:g.nextWeek},{label:m("Last month"),value:g.lastMonth},{label:m("This month"),value:g.thisMonth},{label:m("Next month"),value:g.nextMonth},{label:m("Last quarter"),value:g.lastQuarter},{label:m("This quarter"),value:g.thisQuarter},{label:m("Next quarter"),value:g.nextQuarter},{label:m("Last year"),value:g.lastYear},{label:m("This year"),value:g.thisYear},{label:m("Next year"),value:g.nextYear},{label:m("Last 7 days"),value:g.last7Days},{label:m("Next 7 days"),value:g.next7Days},{label:m("Last 30 days"),value:g.last30Days},{label:m("Next 30 days"),value:g.next30Days},{label:m("Last 90 days"),value:g.last90Days},{label:m("Next 90 days"),value:g.next90Days}],w=t?(0,v.Pn)(null==t?void 0:t[0],o):o,F={utc:f,presets:C,...e,format:b({targetPicker:w,picker:o,format:i,dateFormat:s,showTime:c,timeFormat:p}),picker:w,showTime:!!c&&{defaultValue:[(0,r.default)("00:00:00","HH:mm:ss"),(0,r.default)("23:59:59","HH:mm:ss")]}};return k?(0,l.jsxs)(a.Space.Compact,{children:[(0,l.jsx)(a.Select,{role:"button","data-testid":"select-picker",style:{width:"100px"},popupMatchSelectWidth:!1,defaultValue:w,options:y([{label:m("Date"),value:"date"},{label:m("Month"),value:"month"},{label:m("Quarter"),value:"quarter"},{label:m("Year"),value:"year"}]),onChange:t=>{let o=(0,d.getPickerFormat)(t),l=(0,d.getDateTimeFormat)(t,o,c,p);null==x||x.setComponentProps({picker:t,dateFormat:o,format:l}),h&&(h["x-component-props"]={...e,picker:t,dateFormat:o,format:l}),x&&(x.value=void 0)}}),(0,l.jsx)(M,{...F,value:t})]}):(0,l.jsx)(M,{...F})},w.FilterWithPicker=function(e){var t;let{picker:o="date",format:i,dateFormat:c,showTime:p,timeFormat:m}=e,h=(0,v.Fr)(),{utc:x=!0}=S(),_=Array.isArray(e.value)?e.value[0]:e.value,f=(0,n.useFieldSchema)(),g=_?(0,v.Pn)(_,o):o,[y,k]=(0,s.useState)(g),{t:M}=(0,u.useTranslation)();(0,s.useEffect)(()=>{k(g)},[g]);let w={utc:x,inputReadOnly:h,...e,underFilter:!0,showTime:!!p&&{defaultValue:(0,r.default)("00:00:00","HH:mm:ss")},format:b({targetPicker:y,picker:o,format:i,dateFormat:c,showTime:p,timeFormat:m}),picker:y,onChange:t=>{e.onChange(void 0),setTimeout(()=>{e.onChange(t)})}},F=(0,n.useField)();return(0,l.jsxs)(a.Space.Compact,{style:{width:"100%"},children:[(0,l.jsx)(a.Select,{role:"button","data-testid":"select-picker",style:{width:"100px"},popupMatchSelectWidth:!1,value:y,options:[{label:M("Date"),value:"date"},{label:M("Month"),value:"month"},{label:M("Quarter"),value:"quarter"},{label:M("Year"),value:"year"}],onChange:t=>{k(t);let o=(0,d.getPickerFormat)(t),l=(0,d.getDateTimeFormat)(t,o,p,m);null==F||F.setComponentProps({picker:t,dateFormat:o,format:l}),(null==f?void 0:f["x-component-props"])&&(f["x-component-props"]={...e,picker:t,dateFormat:o,format:l}),F&&(F.value=null)}}),(0,l.jsx)(C,{...w,value:(t=w.format,_&&_.endsWith("Z")?(0,r.default)(_).format(t):_)})]})}},54158(e,t,o){o.d(t,{CE:()=>l.CE,Fr:()=>n.Fr,Pn:()=>n.Pn,Q2:()=>n.Q2,QD:()=>n.QD,Qo:()=>l.Qo,UT:()=>n.UT,fD:()=>n.fD,lr:()=>l.lr,ms:()=>n.ms,nx:()=>l.nx,x1:()=>n.x1});var l=o(64575),n=o(64004)},64004(e,t,o){o.d(t,{Fr:()=>p,Pn:()=>g,Q2:()=>_,QD:()=>u,UT:()=>m,fD:()=>v,ms:()=>s,x1:()=>c});var l=o(63526),n=o(91815),a=o(64613);let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"date",o=arguments.length>2?arguments[2]:void 0;if(!n.default.isDayjs(e))return e;if("local"===o){let o=new Date().getTimezoneOffset();return(0,n.default)(r(e,t,"gmt")).add(o,"minutes").toISOString()}return"year"===t?e.format("YYYY")+"-01-01T00:00:00.000Z":"month"===t?e.format("YYYY-MM")+"-01T00:00:00.000Z":"quarter"===t?e.startOf("quarter").format("YYYY-MM")+"-01T00:00:00.000Z":"week"===t?e.startOf("week").add(1,"day").format("YYYY-MM-DD")+"T00:00:00.000Z":e.format("YYYY-MM-DDTHH:mm:ss.SSS")+"Z"},i=(e,t)=>e&&n.default.isDayjs(e)?r(e,t,"local"):e,s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{showTime:o,gmt:a,picker:s="date",utc:d=!0}=t;if(!e)return e;if(!d)return e.format(o?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD");if(o)return a?(0,l.toGmt)(e):(0,l.toLocal)(e);if("boolean"==typeof a)return a?e&&n.default.isDayjs(e)?r(e,s,"gmt"):e:i(e,s);return i(e,s)},d=(e,t,o)=>{let a=o&&"date"===t?"YYYY-MM-DD HH:mm:ss":(0,l.getPickerFormat)(t);return e?(0,n.default)(e).format(a):e},u=(e,t,o,r,i,s)=>{let d=n.default.tz.guess(),u=i?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(!e)return e;if(t)return(0,a.formatDayjsValue)(e,"YYYY-MM-DD");if(o){if(s)return(0,l.toGmt)(e);if("date"!==r)return(0,n.default)(e).startOf(r).toISOString();let t=(0,n.default)(e).format(u);return(0,n.default)(t).tz(d,!0).toISOString()}return i?(0,n.default)(e).format(u):(0,n.default)(e).startOf(r).format(u)},c=function(){let e=p();return t=>{let{dateOnly:o,showTime:n,picker:a="date",utc:r,gmt:i,underFilter:s}=t,c=(0,l.getDefaultFormat)(t),p=t.onChange;return{...t,inputReadOnly:e,format:c,value:(0,l.str2moment)(t.value,t),onChange:(e,t)=>{p&&(s?p(d(e,a,n)):p(u(e,o,r,a,n,i)))}}}};function p(){return window.matchMedia("(max-width: 768px)").matches}let m=function(){let e=p();return t=>{let o=(0,l.getDefaultFormat)(t),n=t.onChange,{dateOnly:a,showTime:r,picker:i="date",utc:u,gmt:c,underFilter:p}=t;return{...t,format:o,value:(0,l.str2moment)(t.value,t),inputReadOnly:e,onChange:e=>{n&&(p?n(e?[d(e[0],i,r),d(e[1],i,r)]:[]):n(e?[s(function(e,t){let{showTime:o}=t;return o?e:e.startOf("day")}(e[0],t),t),s(function(e,t){let{showTime:o}=t;return o?e:e.endOf("day")}(e[1],t),t)]:[]))}}}},h=(e,t)=>(0,n.default)().add(e,"isoWeek"===t?"week":t).startOf(t),x=(e,t)=>(0,n.default)().add(e,"isoWeek"===t?"week":t).endOf(t),v=e=>{if(null==e?void 0:e.shouldBeString){let t=t=>Array.isArray(t)?t.map(t=>s(t,{utc:null==e?void 0:e.utc})):s(t,{utc:null==e?void 0:e.utc});return{now:()=>t((0,n.default)()),today:e=>f(t([h(0,"day"),x(0,"day")]),e),yesterday:e=>f(t([h(-1,"day"),x(-1,"day")]),e),dayBeforeYesterday:e=>f(t([h(-2,"day"),x(-2,"day")]),e),tomorrow:e=>f(t([h(1,"day"),x(1,"day")]),e),thisWeek:e=>f(t([h(0,"isoWeek"),x(0,"isoWeek")]),e),lastWeek:e=>f(t([h(-1,"isoWeek"),x(-1,"isoWeek")]),e),nextWeek:e=>f(t([h(1,"isoWeek"),x(1,"isoWeek")]),e),thisIsoWeek:e=>f(t([h(0,"isoWeek"),x(0,"isoWeek")]),e),lastIsoWeek:e=>f(t([h(-1,"isoWeek"),x(-1,"isoWeek")]),e),nextIsoWeek:e=>f(t([h(1,"isoWeek"),x(1,"isoWeek")]),e),thisMonth:e=>f(t([h(0,"month"),x(0,"month")]),e),lastMonth:e=>f(t([h(-1,"month"),x(-1,"month")]),e),nextMonth:e=>f(t([h(1,"month"),x(1,"month")]),e),thisQuarter:e=>f(t([h(0,"quarter"),x(0,"quarter")]),e),lastQuarter:e=>f(t([h(-1,"quarter"),x(-1,"quarter")]),e),nextQuarter:e=>f(t([h(1,"quarter"),x(1,"quarter")]),e),thisYear:e=>f(t([h(0,"year"),x(0,"year")]),e),lastYear:e=>f(t([h(-1,"year"),x(-1,"year")]),e),nextYear:e=>f(t([h(1,"year"),x(1,"year")]),e),last7Days:e=>f(t([h(-6,"days"),x(0,"days")]),e),next7Days:e=>f(t([h(1,"day"),x(7,"days")]),e),last30Days:e=>f(t([h(-29,"days"),x(0,"days")]),e),next30Days:e=>f(t([h(1,"day"),x(30,"days")]),e),last90Days:e=>f(t([h(-89,"days"),x(0,"days")]),e),next90Days:e=>f(t([h(1,"day"),x(90,"days")]),e)}}return{now:()=>(0,n.default)().toISOString(),today:e=>f([h(0,"day"),x(0,"day")],e),yesterday:e=>f([h(-1,"day"),x(-1,"day")],e),dayBeforeYesterday:e=>f([h(-2,"day"),x(-2,"day")],e),tomorrow:e=>f([h(1,"day"),x(1,"day")],e),thisWeek:e=>f([h(0,"isoWeek"),x(0,"isoWeek")],e),lastWeek:e=>f([h(-1,"isoWeek"),x(-1,"isoWeek")],e),nextWeek:e=>f([h(1,"isoWeek"),x(1,"isoWeek")],e),thisIsoWeek:e=>f([h(0,"isoWeek"),x(0,"isoWeek")],e),lastIsoWeek:e=>f([h(-1,"isoWeek"),x(-1,"isoWeek")],e),nextIsoWeek:e=>f([h(1,"isoWeek"),x(1,"isoWeek")],e),thisMonth:e=>f([h(0,"month"),x(0,"month")],e),lastMonth:e=>f([h(-1,"month"),x(-1,"month")],e),nextMonth:e=>f([h(1,"month"),x(1,"month")],e),thisQuarter:e=>f([h(0,"quarter"),x(0,"quarter")],e),lastQuarter:e=>f([h(-1,"quarter"),x(-1,"quarter")],e),nextQuarter:e=>f([h(1,"quarter"),x(1,"quarter")],e),thisYear:e=>f([h(0,"year"),x(0,"year")],e),lastYear:e=>f([h(-1,"year"),x(-1,"year")],e),nextYear:e=>f([h(1,"year"),x(1,"year")],e),last7Days:e=>f([h(-6,"days"),x(0,"days")],e),next7Days:e=>f([h(1,"day"),x(7,"days")],e),last30Days:e=>f([h(-29,"days"),x(0,"days")],e),next30Days:e=>f([h(1,"day"),x(30,"days")],e),last90Days:e=>f([h(-89,"days"),x(0,"days")],e),next90Days:e=>f([h(1,"day"),x(90,"days")],e)}},_=()=>({nowUtc:()=>(0,n.default)().toISOString(),nowLocal:()=>(0,n.default)().format("YYYY-MM-DD HH:mm:ss"),todayUtc:()=>(0,n.default)().startOf("day").utc().toISOString(),todayLocal:()=>(0,n.default)().startOf("day").format("YYYY-MM-DD HH:mm:ss"),todayDate:()=>(0,n.default)().format("YYYY-MM-DD"),yesterdayUtc:()=>(0,n.default)().subtract(1,"day").startOf("day").utc().toISOString(),yesterdayLocal:()=>(0,n.default)().subtract(1,"day").startOf("day").format("YYYY-MM-DD HH:mm:ss"),yesterdayDate:()=>(0,n.default)().subtract(1,"day").format("YYYY-MM-DD"),tomorrowUtc:()=>(0,n.default)().add(1,"day").startOf("day").utc().toISOString(),tomorrowLocal:()=>(0,n.default)().add(1,"day").startOf("day").format("YYYY-MM-DD HH:mm:ss"),tomorrowDate:()=>(0,n.default)().add(1,"day").format("YYYY-MM-DD")});function f(e,t){return(null==t?void 0:t.isParsingVariable)&&(null==t?void 0:t.fieldOperator)&&"$dateBetween"!==t.fieldOperator?e[0]:e}function g(e,t){return/^\d{4}$/.test(e)?"year":/^\d{4}-\d{2}$/.test(e)?"month":/^\d{4}Q[1-4]$/.test(e)?"quarter":/^\d{4}-\d{2}-\d{2}$/.test(e)?"date":t||"date"}},10683(e,t,o){o.d(t,{d:()=>i});var l=o(52793),n=o(51649),a=o(77843),r=o(46457);let i=e=>{let{t}=(0,a.useTranslation)(),o=(0,n.useContext)(r._),i=`nocobase_table_column_settings_${o}`,s=(0,n.useCallback)(()=>{try{let e=localStorage.getItem(i);return e?JSON.parse(e):null}catch(e){return console.warn("Failed to parse table column settings from localStorage:",e),null}},[i]);return{getSettings:s,saveSettings:(0,n.useCallback)(e=>{try{let t=JSON.stringify(e);localStorage.setItem(i,t);let l=new CustomEvent("nocobase-table-settings-changed",{detail:{key:i,tableId:o,settings:e}});window.dispatchEvent(l)}catch(e){console.warn("Failed to save table column settings to localStorage:",e),l.message.error(t("Failed to save table settings"))}},[i,o,t]),clearSettings:(0,n.useCallback)(()=>{try{localStorage.removeItem(i);let e=new CustomEvent("nocobase-table-settings-changed",{detail:{key:i,tableId:o,settings:null}});window.dispatchEvent(e)}catch(e){console.warn("Failed to clear table column settings from localStorage:",e),l.message.error(t("Failed to clear table settings"))}},[i,o,t])}}},41428(e,t,o){o.d(t,{i:()=>r});var l=o(51649),n=o(46457),a=o(10683);let r=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],o=(0,l.useContext)(n._),{getSettings:r}=(0,a.d)(o),[i,s]=(0,l.useState)(0);(0,l.useEffect)(()=>{let e=e=>{let{key:t,tableId:l}=e.detail;(t.includes(o)||l===o)&&s(e=>e+1)};return window.addEventListener("nocobase-table-settings-changed",e),()=>{window.removeEventListener("nocobase-table-settings-changed",e)}},[o]);let d=(0,l.useMemo)(()=>r(),[r,i]);return{columns:(0,l.useMemo)(()=>{if(!t||!d||0===d.length)return e;let o=new Map;d.forEach(e=>{o.set(e.key,e)});let l=e.map(e=>{let t=o.get(e.key);if(t){let o=e.columnHidden||!t.visible,l=t.width||e.width,n=t.fixed||e.fixed;return{...e,columnHidden:o,fixed:n,width:l,_orderIndex:t.order}}return e}),n=[],a=[];l.forEach(e=>{void 0!==e._orderIndex?n.push(e):a.push(e)}),n.sort((e,t)=>(e._orderIndex||0)-(t._orderIndex||0));let r=[...n,...a];return r.forEach(e=>{delete e._orderIndex}),r},[e,d])}}},45943(e,t,o){o.d(t,{x:()=>v,n:()=>x});var l=o(71178),n=o(56920),a=o(52793),r=o(51649),i=o(77843),s=o(16211),d=o(17157);let{Paragraph:u,Text:c}=a.Typography,{Paragraph:p,Text:m,Link:h}=a.Typography,x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,d.zd)(),[l,n]=r.default.useState(!1),a=(0,s.VB)();return{loading:l,download:async()=>{n(!0);try{let l=await a.request({url:"logger:collect",method:"post",responseType:"blob",data:{error:{message:e.message,stack:e.stack},location:o,...t}}),n=window.URL.createObjectURL(new Blob([l.data],{type:"application/gzip"})),r=document.createElement("a");r.setAttribute("href",n),r.setAttribute("download","logs.tar.gz"),r.click(),r.remove()}catch(e){console.log(e)}n(!1)}}},v=e=>{let{error:t}=e,o=(0,n.useFieldSchema)(),{t:r}=(0,i.useTranslation)(),{loading:s,download:d}=x(t,{schema:o}),u=(0,l.jsxs)(i.Trans,{children:["This is likely a NocoBase internals bug. Please open an issue at ",(0,l.jsx)(h,{href:"https://github.com/nocobase/nocobase/issues",target:"_blank",children:"here"})]});return(0,l.jsx)("div",{style:{backgroundColor:"white"},children:(0,l.jsx)(a.Result,{style:{maxWidth:"60vw",margin:"auto"},status:"error",title:r("Render Failed"),subTitle:u,extra:[(0,l.jsx)(a.Button,{type:"primary",href:"https://github.com/nocobase/nocobase/issues",target:"_blank",children:r("Feedback")},"feedback"),(0,l.jsx)(a.Button,{loading:s,onClick:d,children:r("Download logs")},"log")],children:(0,l.jsx)(p,{copyable:{text:t.stack},children:(0,l.jsx)(m,{type:"danger",style:{whiteSpace:"pre-line",textAlign:"center"},children:t.stack})})})})};v.Modal=e=>{let[t,o]=r.default.useState(!1),n=(0,l.jsx)(u,{style:{display:"flex",marginBottom:0},copyable:{text:e.error.message},children:(0,l.jsxs)(c,{type:"danger",style:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",display:"inline-block",maxWidth:"200px"},children:["Error: ",e.error.message]})});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{onMouseOver:()=>o(!0),children:e.children||n}),(0,l.jsx)(a.Modal,{zIndex:1e4,open:t,footer:null,onCancel:()=>o(!1),width:"60%",children:(0,l.jsx)(v,{...e})})]})}},57610(e,t,o){o.d(t,{n:()=>l.n,x:()=>l.x});var l=o(45943)},36090(e,t,o){o.d(t,{S:()=>x,b:()=>m});var l=o(71178),n=o(10691),a=o(91815),r=o(56920),i=o(71883),s=o(52793),d=o(51649),u=o(44374);let c=(0,a.default)(),p=(0,n.css)`
432
432
  width: 100%;
433
433
  & > .ant-space-item {
434
434
  flex: 1;
@@ -501,7 +501,7 @@ import*as e from"@ant-design/cssinjs";import*as t from"@ant-design/icons";import
501
501
  margin-bottom: 0;
502
502
  line-height: 1.5;
503
503
  font-size: 90%;
504
- `;x.JSON=e=>{let t=(0,a.usePrefixCls)("json",e),o=(0,u.useMemo)(()=>null!=e.value?JSON.stringify(e.value,null,e.space??2):"",[e.space,e.value]),r=(0,l.jsx)("pre",{className:(0,n.cx)(t,e.className,k),style:e.style,children:o});return e.ellipsis?(0,l.jsx)(m.R,{ellipsis:e.ellipsis,popoverContent:r,children:o}):r},x.Input=(0,c.A)(x.Input),x.TextArea=(0,c.A)(x.TextArea),x.Html=(0,c.A)(x.Html),x.Preview=(0,c.A)(x.Preview),x.JSON=(0,c.A)(x.JSON)},28823(e,t,o){o.d(t,{FZ:()=>l.FZ,LM:()=>a.L,R_:()=>r.R,hq:()=>n.h,mJ:()=>i.m,pd:()=>l.pd});var l=o(42717),n=o(13829),a=o(68704),r=o(81607),i=o(9526)},9526(e,t,o){o.d(t,{m:()=>l});function l(e){let t=document.createElement("div");null!=t.textContent?t.textContent=e:t.innerText=e;let o=t.innerHTML;return t=null,o}},12637(e,t,o){o.d(t,{w:()=>Y,o:()=>L});var l=o(71178),n=o(82113),a=o(56920),r=o(52793),i=o(51649),s=o(13975),d=o(28823),u=o(2314),c=o(27404),p=o(94046),m=o(77583),h=o(77843),x=o(28227),v=o(69575),_=o(80461),f=o(96123),g=o(43923),b=o(59529),y=o(62152),S=o(95951),k=o(96758),C=o(99300),M=o(38131);class w extends HTMLElement{getProps(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[...e].filter(e=>"style"!==e.name).map(e=>this.convert(t,e.name,e.value)).reduce((e,t)=>({...e,[t.name]:t.value}),{})}convert(e,t,o){let l=Object.keys(e).find(e=>e.toLowerCase()==t),n=o;return"true"===o||"false"===o?n="true"==o:isNaN(o)||""===o?/^{.*}/.exec(o)&&(n=JSON.parse(o)):n=+o,{name:l||t,value:n}}connectedCallback(){let e={...this.getProps(this.attributes)};this.root=(0,ex.createRoot)(this.shadowRoot),this.root.render((0,l.jsx)(r.QRCode,{...e}))}disconnectedCallback(){this.root.unmount()}constructor(){super(),this.attachShadow({mode:"open"}),this.root=null}}var F=o(72741);let P=(0,o(54969).fD)("nb-markdown",(e,t)=>{let{isDarkTheme:o}=t,{componentCls:l}=e,n=new F.TinyColor(e.colorFillAlter).onBackground(e.colorBgContainer).toHexShortString(),a={lineHeight:"inherit","&.nb-markdown-default":{"pre code.hljs":{display:"block",overflowX:"auto",padding:"1em"},"code.hljs":{padding:"3px 5px"},":not(pre) code":{padding:"2px 5px",color:"#d56161",background:e.colorFillQuaternary,border:`1px solid ${e.colorBorder}`,borderRadius:e.borderRadiusSM},blockquote:{borderLeft:"4px solid #ccc",paddingLeft:"20px",marginLeft:"0",color:"#666",fontStyle:"italic"},img:{maxWidth:"100%"},".hljs":{background:"#f8f8f8",color:"#444"},".hljs-comment":{color:"#697070"},".hljs-punctuation,.hljs-tag":{color:"#444a"},".hljs-tag .hljs-attr,.hljs-tag .hljs-name":{color:"#444"},".hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag":{fontWeight:700},".hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type":{color:"#800"},".hljs-section,.hljs-title":{color:"#800",fontWeight:700},".hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable":{color:"#ab5656"},".hljs-literal":{color:"#695"},".hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code":{color:"#397300"},".hljs-meta":{color:"#1f7199"},".hljs-meta .hljs-string":{color:"#38a"},".hljs-emphasis":{fontStyle:"italic"},".hljs-strong":{fontWeight:700}},"&.nb-markdown-table":{table:{borderCollapse:"collapse",width:"100%",fontFamily:"Arial, sans-serif",marginBottom:"1.5rem"},"th, td":{borderBottom:`1px solid ${e.colorBorderSecondary}`,padding:`${e.paddingContentVertical}px ${e.paddingContentHorizontal}px`,textAlign:"left"},th:{backgroundColor:n,fontWeight:"bold",color:e.colorText},"tr:hover":{backgroundColor:e.colorFillTertiary},"tr:last-child td":{borderBottom:"none"},"tr:first-child th":{borderTop:"none"}}},r={"&.nb-markdown-default":{"pre code.hljs":{display:"block",overflowX:"auto",padding:"1em"},"code.hljs":{padding:"3px 5px"},":not(pre) code":{padding:"2px 5px",color:"#d56161",background:e.colorFillQuaternary,border:`1px solid ${e.colorBorder}`,borderRadius:e.borderRadiusSM},".hljs":{color:"#adbac7",background:"#22272e"},".hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_":{color:"#f47067"},".hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_":{color:"#dcbdfb"},".hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable":{color:"#6cb6ff"},".hljs-meta .hljs-string,.hljs-regexp,.hljs-string":{color:"#96d0ff"},".hljs-built_in,.hljs-symbol":{color:"#f69d50"},".hljs-code,.hljs-comment,.hljs-formula":{color:"#768390"},".hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag":{color:"#8ddb8c"},".hljs-subst":{color:"#adbac7"},".hljs-section":{color:"#316dca",fontWeight:700},".hljs-bullet":{color:"#eac55f"},".hljs-emphasis":{color:"#adbac7",fontStyle:"italic"},".hljs-strong":{color:"#adbac7",fontWeight:700},".hljs-addition":{color:"#b4f1b4",backgroundColor:"#1b4721"},".hljs-deletion":{color:"#ffd8d3",backgroundColor:"#78191b"}},"&.nb-markdown-table":{table:{borderCollapse:"collapse",width:"100%",fontFamily:"Arial, sans-serif",marginBottom:"1.5rem"},"th, td":{borderBottom:`1px solid ${e.colorBorderSecondary}`,padding:`${e.paddingContentVertical}px ${e.paddingContentHorizontal}px`,textAlign:"left"},th:{backgroundColor:n,fontWeight:"bold",color:e.colorText},"tr:hover":{backgroundColor:e.colorFillTertiary},"tr:last-child td":{borderBottom:"none"},"tr:first-child th":{borderTop:"none"}}};return{[l]:{lineHeight:e.lineHeight,"& > *:last-child":{marginBottom:"0"},".ant-description-textarea, .ant-description-input":{lineHeight:e.lineHeight},".field-interface-datetime":{minWidth:"100px"},...o?r:a}}}),j=m.default.memoize(async e=>e?(await Promise.resolve().then(o.bind(o,62070))).default.render(e):e);var A=o(76460);let I=e=>{let{scope:t}=e,{t:o,i18n:n}=(0,h.useTranslation)(),[a,s]=(0,i.useState)(e.defaultValue),d=(0,i.useRef)(null),[u,c]=(0,i.useState)([]),[p,m]=(0,i.useState)(null);(0,i.useEffect)(()=>{c(t)},[t]),(0,i.useEffect)(()=>{var e,t;let o=null==d||null==(t=d.current)||null==(e=t.resizableTextArea)?void 0:e.textArea;p&&o&&o.setSelectionRange(p,p)},[p]);let x=(0,i.useCallback)(function(e){var t;let o=e.filter(e=>!!e.trim()),{current:l}=d,n=null==l||null==(t=l.resizableTextArea)?void 0:t.textArea;if(!n||!o)return;l.focus();let r=`{{${e.join(".")}}}`,i=n.selectionStart||0,u=a.substring(0,i)+r+a.substring(i,a.length),c=i+r.length;s(u),m(c)},[a]);return(0,l.jsxs)("div",{className:"mb-markdown",style:{position:"relative",paddingTop:"20px"},children:[(0,l.jsx)(r.Input.TextArea,{ref:d,autoSize:{minRows:3},...e,value:a,onChange:e=>{s(e.target.value)},style:{paddingBottom:"40px"}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("span",{style:{marginLeft:".25em"},className:"ant-formily-item-extra",children:[o("Syntax references"),":"]}),(0,l.jsx)("a",{href:`https://${"zh-CN"===n.language?"docs-cn":"docs"}.nocobase.com/handbook/template-handlebars`,target:"_blank",rel:"noreferrer",children:"Handlebars.js"})]}),(0,l.jsx)("div",{style:{position:"absolute",top:21,right:1},children:(0,l.jsx)(k.P,{options:u,setOptions:c,onInsert:x})}),(0,l.jsxs)(r.Space,{style:{position:"absolute",bottom:30,right:5},children:[(0,l.jsx)(r.Button,{onClick:t=>{var o;null==(o=e.onCancel)||o.call(e,t)},children:o("Cancel")}),(0,l.jsx)(r.Button,{type:"primary",onClick:()=>{var t;null==(t=e.onSubmit)||t.call(e,a)},children:o("Save")})]})]})},T=(0,_.T)((0,a.observer)(e=>{let{isDarkTheme:t}=(0,s.useGlobalTheme)(),{componentCls:o,hashId:n}=P({isDarkTheme:t}),{content:d,className:v}=e,_=(0,a.useField)(),k=(0,a.useFieldSchema)(),{dn:C}=(0,S.er)(),{onSave:M,onCancel:F,form:A}=e,T=(0,x.PD)(),[D,L]=(0,i.useState)(""),Y=(0,g.$l)(),R=(0,g.gp)(),{engine:B}=(null==k?void 0:k["x-decorator-props"])||{},[N,E]=(0,i.useState)(!1),{t:$,i18n:z}=(0,h.useTranslation)(),O=(0,a.useForm)(),q=[...d.matchAll(/\{\{\$nForm\.([\w.]+)\}\}/g)].map(e=>e[1]),[H,V]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(q.length>0){let e=(0,c.uid)();return setTimeout(()=>{O.addEffects(e,()=>(0,u.reaction)(()=>JSON.stringify(function(e,t){let o={};for(let l of t){let t=l.split("."),n=e;for(let e of t)if(n&&"object"==typeof n&&e in n)n=n[e];else{n=void 0;break}o[l]=n}return o}(O.values,q)),()=>{V((0,c.uid)())},{fireImmediately:!0,equals:m.isEqual}))}),()=>{O.removeEffects(e)}}},[]),(0,i.useEffect)(()=>{E(!0),(async()=>{setTimeout(async()=>{L(await (0,b.a2)(B,d,Y,R,j,$))}),E(!1)})()},[d,Y,R,B,H]);let U=(()=>{let{token:e}=r.theme.useToken(),t=(0,y.a9)();if(t)return t-2*e.paddingLG})(),G=(0,f._)({collectionField:{uiSchema:k},form:A,record:T,uiSchema:k,noDisabled:!0});return((0,i.useEffect)(()=>{customElements.get("qr-code")||customElements.define("qr-code",w)},[]),N)?(0,l.jsx)(r.Spin,{}):(null==_?void 0:_.editable)?(0,l.jsx)(I,{scope:G,...e,className:!0,defaultValue:d,onCancel:()=>{_.editable=!1,null==F||F()},onSubmit:async e=>{_.editable=!1,k["x-component-props"]??(k["x-component-props"]={}),k["x-component-props"].content=e,_.componentProps.content=e,null==M||M(k),C.emit("patch",{schema:{"x-uid":k["x-uid"],"x-component-props":{content:e}}})}}):(0,l.jsx)("div",{className:(0,p.default)([o,n,"nb-markdown nb-markdown-default nb-markdown-table",v]),style:{...e.style,height:U||"100%",overflowY:U?"auto":"null"},dangerouslySetInnerHTML:{__html:D}})}),{displayName:"MarkdownVoid"}),D=e=>{let t=(0,v._P)(),o=(0,a.useFieldSchema)();return(0,l.jsx)(A.j0,{scopeId:null==o?void 0:o["x-uid"],type:"markdownBlock",children:(0,l.jsx)(v.UU,{...t,collectionField:!0,children:(0,l.jsx)(T,{...e})})})};D.Designer=()=>{let e=(0,a.useField)(),{t}=(0,h.useTranslation)();return(0,l.jsxs)(C.xK,{children:[(0,l.jsx)(C.iU,{title:t("Edit markdown"),onClick:()=>{e.editable=!0}}),(0,l.jsx)(C.Fs,{}),(0,l.jsx)(M._,{}),(0,l.jsx)(C.kT,{}),(0,l.jsx)(C.d$,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};let L=(0,a.connect)(r.Input.TextArea,(0,a.mapProps)((e,t)=>({autoSize:{maxRows:10,minRows:3},...e,suffix:(0,l.jsx)("span",{children:(null==t?void 0:t.loading)||(null==t?void 0:t.validating)?(0,l.jsx)(n.LoadingOutlined,{}):e.suffix})})),(0,a.mapReadPretty)(e=>(0,l.jsx)(Y,{...e}))),Y=e=>{let{isDarkTheme:t}=(0,s.useGlobalTheme)(),{wrapSSR:o,hashId:n,componentCls:a}=P({isDarkTheme:t}),{html:u="",loading:c}=function(e){let[t,o]=(0,i.useState)(""),[l,n]=(0,i.useState)(!0);return(0,i.useEffect)(()=>{n(!0),j(e).then(e=>{o(e),n(!1)}).catch(e=>console.log(e))},[e]),{html:t,loading:l}}(e.value),p=(0,i.useMemo)(()=>{let e,t;return(e=document.createElement("div")).innerHTML=u,t=e.innerText,e=null,(null==t?void 0:t.replace(/[\n\r]/g,""))||""},[u]);if(c)return o((0,l.jsx)(r.Spin,{}));let m=(0,l.jsx)("div",{className:`${n} ${a} nb-markdown nb-markdown-default nb-markdown-table`,dangerouslySetInnerHTML:{__html:u}});return o((0,l.jsx)(d.hq.TextArea,{...e,autop:!1,text:p,value:m}))};L.Void=D},62070(e,t,o){o.d(t,{default:()=>n});let l=new ev.default({html:!0,linkify:!0,typographer:!0,breaks:!0});l.use(e_.default),l.use(function(e,t){ef.default.initialize({securityLevel:"loose",...t});let o=e.renderer.rules.fence;e.renderer.rules.fence=function(e,t,l,n,a){let r=e[t],i=r.info.trim();if(-1===["mermaid","{mermaid}"].indexOf(i?i.split(/\s+/g)[0]:""))return void 0!==o?o(e,t,l,n,a):"";let s="",d=[],u=document.createElement("div");document.body.appendChild(u);try{let e="mermaid-container";ef.default.mermaidAPI.render(e,r.content,t=>{let o=document.getElementById(e);null!==o&&d.push(["style",`max-width:${o.style.maxWidth};max-height:${o.style.maxHeight}`]),s=t},u)}catch(e){return`<div class="alert alert-danger">${e}</div>`}finally{u.remove()}return d.push(["src",`data:image/svg+xml,${encodeURIComponent(s)}`]),`<img ${a.renderAttrs({attrs:d})}>`}});let n=l},14612(e,t,o){o.d(t,{Ob:()=>K,yt:()=>Q,Zy:()=>U,W1:()=>ee,Tr:()=>G});var l=o(71178),n=o(10691),a=o(56920),r=o(27404),i=o(504),s=o(63526),d=o(52793),u=o(71883),c=o(51649),p=o(7516),m=o(77843),h=o(24),x=o(73907),v=o(73761),_=o(30644),f=o(33750),g=o(37679),b=o(55976),y=o(70715),S=o(87382),k=o(63557),C=o(95951),M=o(87463),w=o(4922),F=o(15578),P=o(56220),j=o(44814),A=o(17278),I=o(82924),T=o(44374),D=o(52973);let L={beforeBegin:"insertBefore",afterEnd:"insertAfter"},Y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{t,compile:o}=arguments.length>1?arguments[1]:void 0,l=[];for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let a=e[n],r={label:(0,T.isVariable)(a.title)?o(a.title):t(a.title),value:`${a["x-uid"]}||${a["x-component"]}`};if(a.properties){let e=Y(a.properties,{t,compile:o});(null==e?void 0:e.length)&&(r.children=e)}l.push(r)}return l},R=e=>{let{eventKey:t,title:o,insertPosition:n}=e,{t:i}=(0,m.useTranslation)(),s=(0,a.useFieldSchema)(),{urlSchema:d,paramsSchema:u}=(0,T.useURLAndHTMLSchema)(),c="Menu.SubMenu"===s["x-component"],{createRoute:p,moveRoute:h}=(0,I.Ob5)(),x=(0,D.rP)();return c||"beforeEnd"!==n?(0,l.jsxs)(T.SchemaSettingsSubMenu,{eventKey:t,title:o,children:[(0,l.jsx)(T.SchemaSettingsModalItem,{eventKey:`${n}group`,title:i("Group"),schema:{type:"object",title:i("Add group"),properties:{title:{"x-decorator":"FormItem","x-component":"Input",title:i("Menu item title"),required:!0,"x-component-props":{}},icon:{title:i("Icon"),"x-component":"IconPicker","x-decorator":"FormItem"}}},onSubmit:async e=>{var t,o;let{title:l,icon:a}=e,i=s.__route__,d=null==(t=s.parent)?void 0:t.__route__,u=(0,r.uid)(),{data:c}=await p({type:T.NocoBaseDesktopRouteType.group,title:l,icon:a,parentId:"beforeEnd"===n?null==i?void 0:i.id:null==d?void 0:d.id,schemaUid:u});L[n]&&await h({sourceId:null==c||null==(o=c.data)?void 0:o.id,targetId:null==i?void 0:i.id,sortField:"sort",method:L[n]})}}),(0,l.jsx)(T.SchemaSettingsModalItem,{eventKey:`${n}page`,title:i("Page"),schema:{type:"object",title:i("Add page"),properties:{title:{"x-decorator":"FormItem","x-component":"Input",title:i("Menu item title"),required:!0,"x-component-props":{}},icon:{title:i("Icon"),"x-component":"IconPicker","x-decorator":"FormItem"}}},onSubmit:async e=>{var t,o;let{title:l,icon:a}=e,i=s.__route__,d=null==(t=s.parent)?void 0:t.__route__,u=(0,r.uid)(),c=(0,r.uid)(),m=(0,r.uid)(),v=(0,r.uid)(),{data:_}=await p({type:T.NocoBaseDesktopRouteType.page,title:l,icon:a,parentId:"beforeEnd"===n?null==i?void 0:i.id:null==d?void 0:d.id,schemaUid:c,menuSchemaUid:u,enableTabs:!1,children:[{type:T.NocoBaseDesktopRouteType.tabs,schemaUid:m,tabSchemaName:v,hidden:!0}]});L[n]&&await h({sourceId:null==_||null==(o=_.data)?void 0:o.id,targetId:null==i?void 0:i.id,sortField:"sort",method:L[n]}),x((0,T.getPageMenuSchema)({pageSchemaUid:c,tabSchemaUid:m,tabSchemaName:v}))}}),(0,l.jsx)(T.SchemaSettingsModalItem,{eventKey:`${n}link`,title:i("Link"),schema:{type:"object",title:i("Add link"),properties:{title:{title:i("Menu item title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:i("Icon"),"x-component":"IconPicker","x-decorator":"FormItem"},href:d,params:u}},onSubmit:async e=>{var t,o;let{title:l,icon:a,href:i,params:d}=e,u=s.__route__,c=null==(t=s.parent)?void 0:t.__route__,m=(0,r.uid)(),{data:x}=await p({type:T.NocoBaseDesktopRouteType.link,title:l,icon:a,parentId:"beforeEnd"===n?null==u?void 0:u.id:null==c?void 0:c.id,schemaUid:m,options:{href:i,params:d}},!1);L[n]&&await h({sourceId:null==x||null==(o=x.data)?void 0:o.id,targetId:null==u?void 0:u.id,sortField:"sort",method:L[n]})}})]}):null},B={TreeSelect:P.TreeSelect};var N=o(25460),E=o(7775);let $=(0,n.css)`
504
+ `;x.JSON=e=>{let t=(0,a.usePrefixCls)("json",e),o=(0,u.useMemo)(()=>null!=e.value?JSON.stringify(e.value,null,e.space??2):"",[e.space,e.value]),r=(0,l.jsx)("pre",{className:(0,n.cx)(t,e.className,k),style:e.style,children:o});return e.ellipsis?(0,l.jsx)(m.R,{ellipsis:e.ellipsis,popoverContent:r,children:o}):r},x.Input=(0,c.A)(x.Input),x.TextArea=(0,c.A)(x.TextArea),x.Html=(0,c.A)(x.Html),x.Preview=(0,c.A)(x.Preview),x.JSON=(0,c.A)(x.JSON)},28823(e,t,o){o.d(t,{FZ:()=>l.FZ,LM:()=>a.L,R_:()=>r.R,hq:()=>n.h,mJ:()=>i.m,pd:()=>l.pd});var l=o(42717),n=o(13829),a=o(68704),r=o(81607),i=o(9526)},9526(e,t,o){o.d(t,{m:()=>l});function l(e){let t=document.createElement("div");null!=t.textContent?t.textContent=e:t.innerText=e;let o=t.innerHTML;return t=null,o}},12637(e,t,o){o.d(t,{w:()=>Y,o:()=>L});var l=o(71178),n=o(82113),a=o(56920),r=o(52793),i=o(51649),s=o(13975),d=o(28823),u=o(2314),c=o(27404),p=o(94046),m=o(77583),h=o(77843),x=o(28227),v=o(69575),_=o(80461),f=o(96123),g=o(43923),b=o(59529),y=o(62152),S=o(95951),k=o(96758),C=o(99300),M=o(38131);class w extends HTMLElement{getProps(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[...e].filter(e=>"style"!==e.name).map(e=>this.convert(t,e.name,e.value)).reduce((e,t)=>({...e,[t.name]:t.value}),{})}convert(e,t,o){let l=Object.keys(e).find(e=>e.toLowerCase()==t),n=o;return"true"===o||"false"===o?n="true"==o:isNaN(o)||""===o?/^{.*}/.exec(o)&&(n=JSON.parse(o)):n=+o,{name:l||t,value:n}}connectedCallback(){let e={...this.getProps(this.attributes)};this.root=(0,ex.createRoot)(this.shadowRoot),this.root.render((0,l.jsx)(r.QRCode,{...e}))}disconnectedCallback(){this.root.unmount()}constructor(){super(),this.attachShadow({mode:"open"}),this.root=null}}var F=o(72741);let P=(0,o(54969).fD)("nb-markdown",(e,t)=>{let{isDarkTheme:o}=t,{componentCls:l}=e,n=new F.TinyColor(e.colorFillAlter).onBackground(e.colorBgContainer).toHexShortString(),a={lineHeight:"inherit","&.nb-markdown-default":{"pre code.hljs":{display:"block",overflowX:"auto",padding:"1em"},"code.hljs":{padding:"3px 5px"},":not(pre) code":{padding:"2px 5px",color:"#d56161",background:e.colorFillQuaternary,border:`1px solid ${e.colorBorder}`,borderRadius:e.borderRadiusSM},blockquote:{borderLeft:"4px solid #ccc",paddingLeft:"20px",marginLeft:"0",color:"#666",fontStyle:"italic"},img:{maxWidth:"100%"},".hljs":{background:"#f8f8f8",color:"#444"},".hljs-comment":{color:"#697070"},".hljs-punctuation,.hljs-tag":{color:"#444a"},".hljs-tag .hljs-attr,.hljs-tag .hljs-name":{color:"#444"},".hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag":{fontWeight:700},".hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type":{color:"#800"},".hljs-section,.hljs-title":{color:"#800",fontWeight:700},".hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable":{color:"#ab5656"},".hljs-literal":{color:"#695"},".hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code":{color:"#397300"},".hljs-meta":{color:"#1f7199"},".hljs-meta .hljs-string":{color:"#38a"},".hljs-emphasis":{fontStyle:"italic"},".hljs-strong":{fontWeight:700}},"&.nb-markdown-table":{table:{borderCollapse:"collapse",width:"100%",fontFamily:"Arial, sans-serif",marginBottom:"1.5rem"},"th, td":{borderBottom:`1px solid ${e.colorBorderSecondary}`,padding:`${e.paddingContentVertical}px ${e.paddingContentHorizontal}px`,textAlign:"left"},th:{backgroundColor:n,fontWeight:"bold",color:e.colorText},"tr:hover":{backgroundColor:e.colorFillTertiary},"tr:last-child td":{borderBottom:"none"},"tr:first-child th":{borderTop:"none"}}},r={"&.nb-markdown-default":{"pre code.hljs":{display:"block",overflowX:"auto",padding:"1em"},"code.hljs":{padding:"3px 5px"},":not(pre) code":{padding:"2px 5px",color:"#d56161",background:e.colorFillQuaternary,border:`1px solid ${e.colorBorder}`,borderRadius:e.borderRadiusSM},".hljs":{color:"#adbac7",background:"#22272e"},".hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_":{color:"#f47067"},".hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_":{color:"#dcbdfb"},".hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable":{color:"#6cb6ff"},".hljs-meta .hljs-string,.hljs-regexp,.hljs-string":{color:"#96d0ff"},".hljs-built_in,.hljs-symbol":{color:"#f69d50"},".hljs-code,.hljs-comment,.hljs-formula":{color:"#768390"},".hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag":{color:"#8ddb8c"},".hljs-subst":{color:"#adbac7"},".hljs-section":{color:"#316dca",fontWeight:700},".hljs-bullet":{color:"#eac55f"},".hljs-emphasis":{color:"#adbac7",fontStyle:"italic"},".hljs-strong":{color:"#adbac7",fontWeight:700},".hljs-addition":{color:"#b4f1b4",backgroundColor:"#1b4721"},".hljs-deletion":{color:"#ffd8d3",backgroundColor:"#78191b"}},"&.nb-markdown-table":{table:{borderCollapse:"collapse",width:"100%",fontFamily:"Arial, sans-serif",marginBottom:"1.5rem"},"th, td":{borderBottom:`1px solid ${e.colorBorderSecondary}`,padding:`${e.paddingContentVertical}px ${e.paddingContentHorizontal}px`,textAlign:"left"},th:{backgroundColor:n,fontWeight:"bold",color:e.colorText},"tr:hover":{backgroundColor:e.colorFillTertiary},"tr:last-child td":{borderBottom:"none"},"tr:first-child th":{borderTop:"none"}}};return{[l]:{lineHeight:e.lineHeight,"& > *:last-child":{marginBottom:"0"},".ant-description-textarea, .ant-description-input":{lineHeight:e.lineHeight},".field-interface-datetime":{minWidth:"100px"},...o?r:a}}}),j=m.default.memoize(async e=>{if(!e)return e;let t=await Promise.resolve().then(o.bind(o,62070));return(0,s.stripMarkdownIframes)(t.default.render(e))});var A=o(76460);let I=e=>{let{scope:t}=e,{t:o,i18n:n}=(0,h.useTranslation)(),[a,s]=(0,i.useState)(e.defaultValue),d=(0,i.useRef)(null),[u,c]=(0,i.useState)([]),[p,m]=(0,i.useState)(null);(0,i.useEffect)(()=>{c(t)},[t]),(0,i.useEffect)(()=>{var e,t;let o=null==d||null==(t=d.current)||null==(e=t.resizableTextArea)?void 0:e.textArea;p&&o&&o.setSelectionRange(p,p)},[p]);let x=(0,i.useCallback)(function(e){var t;let o=e.filter(e=>!!e.trim()),{current:l}=d,n=null==l||null==(t=l.resizableTextArea)?void 0:t.textArea;if(!n||!o)return;l.focus();let r=`{{${e.join(".")}}}`,i=n.selectionStart||0,u=a.substring(0,i)+r+a.substring(i,a.length),c=i+r.length;s(u),m(c)},[a]);return(0,l.jsxs)("div",{className:"mb-markdown",style:{position:"relative",paddingTop:"20px"},children:[(0,l.jsx)(r.Input.TextArea,{ref:d,autoSize:{minRows:3},...e,value:a,onChange:e=>{s(e.target.value)},style:{paddingBottom:"40px"}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("span",{style:{marginLeft:".25em"},className:"ant-formily-item-extra",children:[o("Syntax references"),":"]}),(0,l.jsx)("a",{href:`https://${"zh-CN"===n.language?"docs-cn":"docs"}.nocobase.com/handbook/template-handlebars`,target:"_blank",rel:"noreferrer",children:"Handlebars.js"})]}),(0,l.jsx)("div",{style:{position:"absolute",top:21,right:1},children:(0,l.jsx)(k.P,{options:u,setOptions:c,onInsert:x})}),(0,l.jsxs)(r.Space,{style:{position:"absolute",bottom:30,right:5},children:[(0,l.jsx)(r.Button,{onClick:t=>{var o;null==(o=e.onCancel)||o.call(e,t)},children:o("Cancel")}),(0,l.jsx)(r.Button,{type:"primary",onClick:()=>{var t;null==(t=e.onSubmit)||t.call(e,a)},children:o("Save")})]})]})},T=(0,_.T)((0,a.observer)(e=>{let{isDarkTheme:t}=(0,s.useGlobalTheme)(),{componentCls:o,hashId:n}=P({isDarkTheme:t}),{content:d,className:v}=e,_=(0,a.useField)(),k=(0,a.useFieldSchema)(),{dn:C}=(0,S.er)(),{onSave:M,onCancel:F,form:A}=e,T=(0,x.PD)(),[D,L]=(0,i.useState)(""),Y=(0,g.$l)(),R=(0,g.gp)(),{engine:B}=(null==k?void 0:k["x-decorator-props"])||{},[N,E]=(0,i.useState)(!1),{t:$,i18n:z}=(0,h.useTranslation)(),O=(0,a.useForm)(),q=[...d.matchAll(/\{\{\$nForm\.([\w.]+)\}\}/g)].map(e=>e[1]),[H,V]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(q.length>0){let e=(0,c.uid)();return setTimeout(()=>{O.addEffects(e,()=>(0,u.reaction)(()=>JSON.stringify(function(e,t){let o={};for(let l of t){let t=l.split("."),n=e;for(let e of t)if(n&&"object"==typeof n&&e in n)n=n[e];else{n=void 0;break}o[l]=n}return o}(O.values,q)),()=>{V((0,c.uid)())},{fireImmediately:!0,equals:m.isEqual}))}),()=>{O.removeEffects(e)}}},[]),(0,i.useEffect)(()=>{E(!0),(async()=>{setTimeout(async()=>{L(await (0,b.a2)(B,d,Y,R,j,$))}),E(!1)})()},[d,Y,R,B,H]);let U=(()=>{let{token:e}=r.theme.useToken(),t=(0,y.a9)();if(t)return t-2*e.paddingLG})(),G=(0,f._)({collectionField:{uiSchema:k},form:A,record:T,uiSchema:k,noDisabled:!0});return((0,i.useEffect)(()=>{customElements.get("qr-code")||customElements.define("qr-code",w)},[]),N)?(0,l.jsx)(r.Spin,{}):(null==_?void 0:_.editable)?(0,l.jsx)(I,{scope:G,...e,className:!0,defaultValue:d,onCancel:()=>{_.editable=!1,null==F||F()},onSubmit:async e=>{_.editable=!1,k["x-component-props"]??(k["x-component-props"]={}),k["x-component-props"].content=e,_.componentProps.content=e,null==M||M(k),C.emit("patch",{schema:{"x-uid":k["x-uid"],"x-component-props":{content:e}}})}}):(0,l.jsx)("div",{className:(0,p.default)([o,n,"nb-markdown nb-markdown-default nb-markdown-table",v]),style:{...e.style,height:U||"100%",overflowY:U?"auto":"null"},dangerouslySetInnerHTML:{__html:D}})}),{displayName:"MarkdownVoid"}),D=e=>{let t=(0,v._P)(),o=(0,a.useFieldSchema)();return(0,l.jsx)(A.j0,{scopeId:null==o?void 0:o["x-uid"],type:"markdownBlock",children:(0,l.jsx)(v.UU,{...t,collectionField:!0,children:(0,l.jsx)(T,{...e})})})};D.Designer=()=>{let e=(0,a.useField)(),{t}=(0,h.useTranslation)();return(0,l.jsxs)(C.xK,{children:[(0,l.jsx)(C.iU,{title:t("Edit markdown"),onClick:()=>{e.editable=!0}}),(0,l.jsx)(C.Fs,{}),(0,l.jsx)(M._,{}),(0,l.jsx)(C.kT,{}),(0,l.jsx)(C.d$,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};let L=(0,a.connect)(r.Input.TextArea,(0,a.mapProps)((e,t)=>({autoSize:{maxRows:10,minRows:3},...e,suffix:(0,l.jsx)("span",{children:(null==t?void 0:t.loading)||(null==t?void 0:t.validating)?(0,l.jsx)(n.LoadingOutlined,{}):e.suffix})})),(0,a.mapReadPretty)(e=>(0,l.jsx)(Y,{...e}))),Y=e=>{let{isDarkTheme:t}=(0,s.useGlobalTheme)(),{wrapSSR:o,hashId:n,componentCls:a}=P({isDarkTheme:t}),{html:u="",loading:c}=function(e){let[t,o]=(0,i.useState)(""),[l,n]=(0,i.useState)(!0);return(0,i.useEffect)(()=>{n(!0),j(e).then(e=>{o(e),n(!1)}).catch(e=>console.log(e))},[e]),{html:t,loading:l}}(e.value),p=(0,i.useMemo)(()=>{let e,t;return(e=document.createElement("div")).innerHTML=u,t=e.innerText,e=null,(null==t?void 0:t.replace(/[\n\r]/g,""))||""},[u]);if(c)return o((0,l.jsx)(r.Spin,{}));let m=(0,l.jsx)("div",{className:`${n} ${a} nb-markdown nb-markdown-default nb-markdown-table`,dangerouslySetInnerHTML:{__html:u}});return o((0,l.jsx)(d.hq.TextArea,{...e,autop:!1,text:p,value:m}))};L.Void=D},62070(e,t,o){o.d(t,{default:()=>n});let l=new ev.default({html:!0,linkify:!0,typographer:!0,breaks:!0});l.use(e_.default),l.use(function(e,t){ef.default.initialize({securityLevel:"loose",...t});let o=e.renderer.rules.fence;e.renderer.rules.fence=function(e,t,l,n,a){let r=e[t],i=r.info.trim();if(-1===["mermaid","{mermaid}"].indexOf(i?i.split(/\s+/g)[0]:""))return void 0!==o?o(e,t,l,n,a):"";let s="",d=[],u=document.createElement("div");document.body.appendChild(u);try{let e="mermaid-container";ef.default.mermaidAPI.render(e,r.content,t=>{let o=document.getElementById(e);null!==o&&d.push(["style",`max-width:${o.style.maxWidth};max-height:${o.style.maxHeight}`]),s=t},u)}catch(e){return`<div class="alert alert-danger">${e}</div>`}finally{u.remove()}return d.push(["src",`data:image/svg+xml,${encodeURIComponent(s)}`]),`<img ${a.renderAttrs({attrs:d})}>`}});let n=l},14612(e,t,o){o.d(t,{Ob:()=>K,yt:()=>Q,Zy:()=>U,W1:()=>ee,Tr:()=>G});var l=o(71178),n=o(10691),a=o(56920),r=o(27404),i=o(504),s=o(63526),d=o(52793),u=o(71883),c=o(51649),p=o(7516),m=o(77843),h=o(24),x=o(73907),v=o(73761),_=o(30644),f=o(33750),g=o(37679),b=o(55976),y=o(70715),S=o(87382),k=o(63557),C=o(95951),M=o(87463),w=o(4922),F=o(15578),P=o(56220),j=o(44814),A=o(17278),I=o(82924),T=o(44374),D=o(52973);let L={beforeBegin:"insertBefore",afterEnd:"insertAfter"},Y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{t,compile:o}=arguments.length>1?arguments[1]:void 0,l=[];for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let a=e[n],r={label:(0,T.isVariable)(a.title)?o(a.title):t(a.title),value:`${a["x-uid"]}||${a["x-component"]}`};if(a.properties){let e=Y(a.properties,{t,compile:o});(null==e?void 0:e.length)&&(r.children=e)}l.push(r)}return l},R=e=>{let{eventKey:t,title:o,insertPosition:n}=e,{t:i}=(0,m.useTranslation)(),s=(0,a.useFieldSchema)(),{urlSchema:d,paramsSchema:u}=(0,T.useURLAndHTMLSchema)(),c="Menu.SubMenu"===s["x-component"],{createRoute:p,moveRoute:h}=(0,I.Ob5)(),x=(0,D.rP)();return c||"beforeEnd"!==n?(0,l.jsxs)(T.SchemaSettingsSubMenu,{eventKey:t,title:o,children:[(0,l.jsx)(T.SchemaSettingsModalItem,{eventKey:`${n}group`,title:i("Group"),schema:{type:"object",title:i("Add group"),properties:{title:{"x-decorator":"FormItem","x-component":"Input",title:i("Menu item title"),required:!0,"x-component-props":{}},icon:{title:i("Icon"),"x-component":"IconPicker","x-decorator":"FormItem"}}},onSubmit:async e=>{var t,o;let{title:l,icon:a}=e,i=s.__route__,d=null==(t=s.parent)?void 0:t.__route__,u=(0,r.uid)(),{data:c}=await p({type:T.NocoBaseDesktopRouteType.group,title:l,icon:a,parentId:"beforeEnd"===n?null==i?void 0:i.id:null==d?void 0:d.id,schemaUid:u});L[n]&&await h({sourceId:null==c||null==(o=c.data)?void 0:o.id,targetId:null==i?void 0:i.id,sortField:"sort",method:L[n]})}}),(0,l.jsx)(T.SchemaSettingsModalItem,{eventKey:`${n}page`,title:i("Page"),schema:{type:"object",title:i("Add page"),properties:{title:{"x-decorator":"FormItem","x-component":"Input",title:i("Menu item title"),required:!0,"x-component-props":{}},icon:{title:i("Icon"),"x-component":"IconPicker","x-decorator":"FormItem"}}},onSubmit:async e=>{var t,o;let{title:l,icon:a}=e,i=s.__route__,d=null==(t=s.parent)?void 0:t.__route__,u=(0,r.uid)(),c=(0,r.uid)(),m=(0,r.uid)(),v=(0,r.uid)(),{data:_}=await p({type:T.NocoBaseDesktopRouteType.page,title:l,icon:a,parentId:"beforeEnd"===n?null==i?void 0:i.id:null==d?void 0:d.id,schemaUid:c,menuSchemaUid:u,enableTabs:!1,children:[{type:T.NocoBaseDesktopRouteType.tabs,schemaUid:m,tabSchemaName:v,hidden:!0}]});L[n]&&await h({sourceId:null==_||null==(o=_.data)?void 0:o.id,targetId:null==i?void 0:i.id,sortField:"sort",method:L[n]}),x((0,T.getPageMenuSchema)({pageSchemaUid:c,tabSchemaUid:m,tabSchemaName:v}))}}),(0,l.jsx)(T.SchemaSettingsModalItem,{eventKey:`${n}link`,title:i("Link"),schema:{type:"object",title:i("Add link"),properties:{title:{title:i("Menu item title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{title:i("Icon"),"x-component":"IconPicker","x-decorator":"FormItem"},href:d,params:u}},onSubmit:async e=>{var t,o;let{title:l,icon:a,href:i,params:d}=e,u=s.__route__,c=null==(t=s.parent)?void 0:t.__route__,m=(0,r.uid)(),{data:x}=await p({type:T.NocoBaseDesktopRouteType.link,title:l,icon:a,parentId:"beforeEnd"===n?null==u?void 0:u.id:null==c?void 0:c.id,schemaUid:m,options:{href:i,params:d}},!1);L[n]&&await h({sourceId:null==x||null==(o=x.data)?void 0:o.id,targetId:null==u?void 0:u.id,sortField:"sort",method:L[n]})}})]}):null},B={TreeSelect:P.TreeSelect};var N=o(25460),E=o(7775);let $=(0,n.css)`
505
505
  position: relative;
506
506
  display: inline-block;
507
507
  margin-left: -24px;
@@ -898,12 +898,12 @@ ${JSON.stringify(s,null,2)}`)},[j,F,w,S,y,V,t,M,C,R,o,B,z,U,O,q,Y]),K=(0,a.useCa
898
898
  .ReactModal__Overlay.ReactModal__Overlay--after-open {
899
899
  z-index: 3000 !important; // 避免预览图片时被遮挡
900
900
  }
901
- `;_.lN.add({match:e=>(0,_._b)(e,"image/*"),getThumbnailURL:e=>e.preview?e.preview:e.url?e.url:e.originFileObj?URL.createObjectURL(e.originFileObj):null,Previewer(e){var t,o,a,r;let{index:i,list:s,onSwitchIndex:d}=e,[p,m]=(0,c.useState)(0),h=(0,c.useRef)(!1),x=(0,c.useCallback)((e,t)=>{if(!e)return;let o=e.style.transform||"",l=o.replace(/rotate\([^)]*\)/g,"").trim(),n=`${l} rotate(${(t%360+360)%360}deg)`.trim();o!==n&&(h.current=!0,e.style.transform=n,e.style.transformOrigin="center center",setTimeout(()=>{h.current=!1},0))},[]),v=(0,c.useCallback)(e=>{e.preventDefault();let t=s[i];(0,u.saveAs)(t.url,(0,_.AK)(t))},[i,s]),f=(0,c.useCallback)(()=>{m(e=>(e-90)%360)},[]),b=(0,c.useCallback)(()=>{m(e=>(e+90)%360)},[]);return(0,c.useEffect)(()=>{x(document.querySelector(".ril-image-current"),p)},[p,x]),(0,c.useEffect)(()=>{let e=document.querySelector(".ril-image-current");if(!e)return;x(e,p);let t=new MutationObserver(t=>{!h.current&&t.some(e=>"style"===e.attributeName)&&x(e,p)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>t.disconnect()},[x,p,i]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g,{}),(0,l.jsx)(ew.default,{mainSrc:null==(t=s[i])?void 0:t.url,nextSrc:null==(o=s[(i+1)%s.length])?void 0:o.url,prevSrc:null==(a=s[(i+s.length-1)%s.length])?void 0:a.url,onCloseRequest:()=>d(null),onMovePrevRequest:()=>{m(0),d((i+s.length-1)%s.length)},onMoveNextRequest:()=>{m(0),d((i+1)%s.length)},onAfterOpen:()=>{x(document.querySelector(".ril-image-current"),p)},imageTitle:null==(r=s[i])?void 0:r.title,toolbarButtons:[(0,l.jsx)("button",{type:"button","aria-label":"Download",title:"Download",className:"ril-zoom-in ril__toolbarItemChild ril__builtinButton",style:{fontSize:22,background:"none",lineHeight:1},onClick:v,children:(0,l.jsx)(n.DownloadOutlined,{})},"preview-img"),(0,l.jsx)("button",{type:"button",className:"ril-zoom-in ril__toolbarItemChild ril__builtinButton",style:{fontSize:22,background:"none",lineHeight:1},onClick:f,children:(0,l.jsx)(n.UndoOutlined,{})},"rotate-left"),(0,l.jsx)("button",{type:"button",className:"ril-zoom-in ril__toolbarItemChild ril__builtinButton",style:{fontSize:22,background:"none",lineHeight:1},onClick:b,children:(0,l.jsx)(n.RedoOutlined,{})},"rotate-right")]})]})}});let b=["audio/*","image/*","video/*","text/plain"];function y(e){let{index:t,list:o,onSwitchIndex:n}=e,{t:a}=(0,p.useTranslation)(),r=o[t],s=r.url,d=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),window.open(s)},[s]),m=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),(0,u.saveAs)(s,(0,_.AK)(r))},[r,s]),h=(0,c.useCallback)(()=>{n(null)},[n]);return(0,l.jsx)(i.Modal,{open:null!=t,title:r.title,onCancel:h,footer:[(0,l.jsx)(i.Button,{onClick:d,children:a("Open in new window")},"open"),(0,l.jsx)(i.Button,{onClick:m,children:a("Download")},"download"),(0,l.jsx)(i.Button,{onClick:h,children:a("Close")},"close")],width:"85vw",centered:!0,children:(0,l.jsx)("div",{style:{maxWidth:"100%",maxHeight:"calc(100vh - 256px)",height:"90vh",width:"100%",background:"white",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",overflowY:"auto"},children:b.some(e=>(0,_._b)(r,e))?(0,l.jsx)("iframe",{src:s,style:{width:"100%",maxHeight:"90vh",flex:"1 1 auto",border:"none"}}):(0,l.jsx)(i.Alert,{type:"warning",description:a("File type is not supported for previewing, please download it to preview."),showIcon:!0})})})}function S(e){let{value:t,onChange:o,disabled:n,multiple:r,size:i,...s}=e,{wrapSSR:u,hashId:p,componentCls:h}=(0,f.I)();(eC.default.default?eC.default.default:eC.default)(h);let{isInTableCell:x}=(0,m._P)(),v=(0,c.useMemo)(()=>x?{display:"inline-block"}:{},[x]);return u((0,l.jsx)("div",{className:(0,d.default)(`${h}-wrapper`,`${h}-picture-card-wrapper`,"nb-upload",i?`nb-upload-${i}`:null,p,(0,a.css)`
901
+ `;_.lN.add({match:e=>(0,_._b)(e,"image/*"),getThumbnailURL(e){let t=(0,_.nY)(e);return t||(e.preview?e.preview:e.url?e.url:null)},Previewer(e){var t;let{index:o,list:a,onSwitchIndex:r}=e,[i,s]=(0,c.useState)(0),d=(0,c.useRef)(!1),p=(0,c.useCallback)((e,t)=>{if(!e)return;let o=e.style.transform||"",l=o.replace(/rotate\([^)]*\)/g,"").trim(),n=`${l} rotate(${(t%360+360)%360}deg)`.trim();o!==n&&(d.current=!0,e.style.transform=n,e.style.transformOrigin="center center",setTimeout(()=>{d.current=!1},0))},[]),m=(0,c.useCallback)(e=>(0,_.nY)(e)||(null==e?void 0:e.url),[]),h=(0,c.useCallback)(e=>{e.preventDefault();let t=a[o];(0,u.saveAs)(t.url,(0,_.AK)(t))},[o,a]),x=(0,c.useCallback)(()=>{s(e=>(e-90)%360)},[]),v=(0,c.useCallback)(()=>{s(e=>(e+90)%360)},[]);return(0,c.useEffect)(()=>{p(document.querySelector(".ril-image-current"),i)},[i,p]),(0,c.useEffect)(()=>{let e=document.querySelector(".ril-image-current");if(!e)return;p(e,i);let t=new MutationObserver(t=>{!d.current&&t.some(e=>"style"===e.attributeName)&&p(e,i)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>t.disconnect()},[p,i,o]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g,{}),(0,l.jsx)(ew.default,{mainSrc:m(a[o]),nextSrc:m(a[(o+1)%a.length]),prevSrc:m(a[(o+a.length-1)%a.length]),onCloseRequest:()=>r(null),onMovePrevRequest:()=>{s(0),r((o+a.length-1)%a.length)},onMoveNextRequest:()=>{s(0),r((o+1)%a.length)},onAfterOpen:()=>{p(document.querySelector(".ril-image-current"),i)},imageTitle:null==(t=a[o])?void 0:t.title,toolbarButtons:[(0,l.jsx)("button",{type:"button","aria-label":"Download",title:"Download",className:"ril-zoom-in ril__toolbarItemChild ril__builtinButton",style:{fontSize:22,background:"none",lineHeight:1},onClick:h,children:(0,l.jsx)(n.DownloadOutlined,{})},"preview-img"),(0,l.jsx)("button",{type:"button",className:"ril-zoom-in ril__toolbarItemChild ril__builtinButton",style:{fontSize:22,background:"none",lineHeight:1},onClick:x,children:(0,l.jsx)(n.UndoOutlined,{})},"rotate-left"),(0,l.jsx)("button",{type:"button",className:"ril-zoom-in ril__toolbarItemChild ril__builtinButton",style:{fontSize:22,background:"none",lineHeight:1},onClick:v,children:(0,l.jsx)(n.RedoOutlined,{})},"rotate-right")]})]})}});let b=["audio/*","image/*","video/*","text/plain"];function y(e){let{index:t,list:o,onSwitchIndex:n}=e,{t:a}=(0,p.useTranslation)(),r=o[t],s=(0,_.nY)(r)||r.url,d=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),window.open(s)},[s]),m=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),(0,u.saveAs)(s,(0,_.AK)(r))},[r,s]),h=(0,c.useCallback)(()=>{n(null)},[n]);return(0,l.jsx)(i.Modal,{open:null!=t,title:r.title,onCancel:h,footer:[(0,l.jsx)(i.Button,{onClick:d,children:a("Open in new window")},"open"),(0,l.jsx)(i.Button,{onClick:m,children:a("Download")},"download"),(0,l.jsx)(i.Button,{onClick:h,children:a("Close")},"close")],width:"85vw",centered:!0,children:(0,l.jsx)("div",{style:{maxWidth:"100%",maxHeight:"calc(100vh - 256px)",height:"90vh",width:"100%",background:"white",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",overflowY:"auto"},children:b.some(e=>(0,_._b)(r,e))?(0,l.jsx)("iframe",{src:s,style:{width:"100%",maxHeight:"90vh",flex:"1 1 auto",border:"none"}}):(0,l.jsx)(i.Alert,{type:"warning",description:a("File type is not supported for previewing, please download it to preview."),showIcon:!0})})})}function S(e){let{value:t,onChange:o,disabled:n,multiple:r,size:i,...s}=e,{wrapSSR:u,hashId:p,componentCls:h}=(0,f.I)();(eC.default.default?eC.default.default:eC.default)(h);let{isInTableCell:x}=(0,m._P)(),v=(0,c.useMemo)(()=>x?{display:"inline-block"}:{},[x]);return u((0,l.jsx)("div",{className:(0,d.default)(`${h}-wrapper`,`${h}-picture-card-wrapper`,"nb-upload",i?`nb-upload-${i}`:null,p,(0,a.css)`
902
902
  .ant-upload-list-picture-card-container {
903
903
  width: ${i}px !important;
904
904
  height: ${i}px !important;
905
905
  }
906
- `),style:v,children:(0,l.jsx)("div",{className:(0,d.default)(`${h}-list`,`${h}-list-picture-card`),style:v,children:(0,l.jsx)(P,{disabled:n,readPretty:!0,multiple:r,value:t,onChange:o,...s})})}))}let k=(0,r.connect)(function(e){let{onChange:t,...o}=e,n=(0,c.useCallback)(e=>{null==t||t((0,_.eb)(e.fileList))},[t]);return(0,l.jsx)(i.Upload,{...(0,_.Zy)(o),onChange:n})},(0,r.mapProps)({value:"fileList"}),(0,r.mapReadPretty)(S));function C(e){let t=e??_.ZH,{t:o,i18n:l}=(0,p.useTranslation)(),n=(0,eM.default)(t,{base:2,standard:"jedec",locale:l.language});return 0!==t?o("File size should not exceed {{size}}.",{size:n}):""}function M(e){let{file:t}=e,{componentCls:o}=(0,f.I)(),{getThumbnailURL:n=_.n2}=_.lN.getTypeByFile(t)??{},a=n(t);return(0,l.jsx)("img",{src:a,alt:t.title,className:`${o}-list-item-image`})}function w(e){let{file:t,disabled:o,onPreview:a,onDelete:r,readPretty:s,showFileName:m}=e,{componentCls:h}=(0,f.I)(),{t:x}=(0,p.useTranslation)(),v=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),null==a||a(t)},[t,a]),g=(0,c.useCallback)(()=>{null==r||r(t)},[t,r]),b=(0,c.useCallback)(()=>{(0,u.saveAs)(t.url,(0,_.AK)(t))},[t]),{ThumbnailPreviewer:y=M}=_.lN.getTypeByFile(t)??{},S=[(0,l.jsx)("span",{className:`${h}-list-item-thumbnail`,children:(0,l.jsx)(y,{file:t})},"thumbnail"),!1!==m&&t.title?(0,l.jsx)("span",{className:`${h}-list-item-name`,title:t.title,children:"uploading"===t.status?x("Uploading"):t.title},"title"):null],k=t.url?(0,l.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:t.url,onClick:v,children:S}):(0,l.jsx)("span",{className:`${h}-span`,children:S}),C=(0,l.jsxs)("div",{className:(0,d.default)(`${h}-list-item`,`${h}-list-item-${t.status??"done"}`,`${h}-list-item-list-type-picture-card`),children:[(0,l.jsx)("div",{className:`${h}-list-item-info`,children:k}),(0,l.jsx)("span",{className:`${h}-list-item-actions`,children:(0,l.jsxs)(i.Space,{size:3,children:[!s&&t.url&&(0,l.jsx)(i.Button,{size:"small",type:"text",icon:(0,l.jsx)(n.DownloadOutlined,{}),onClick:b}),!s&&!o&&"uploading"!==t.status&&(0,l.jsx)(i.Button,{size:"small",type:"text",icon:(0,l.jsx)(n.DeleteOutlined,{}),onClick:g})]})}),"uploading"===t.status&&(0,l.jsx)("div",{className:`${h}-list-item-progress`,children:(0,l.jsx)(i.Progress,{strokeWidth:4,type:"line",showInfo:!1,percent:Number(t.percent)})})]});return(0,l.jsx)("div",{style:{marginBottom:!1!==m&&t.title?"28px":"0px"},className:`${h}-list-picture-card-container ${h}-list-item-container`,children:"error"===t.status?(0,l.jsx)(i.Tooltip,{title:t.response,getPopupContainer:e=>e.parentNode,children:C}):C})}function F(e){let{index:t,onSwitchIndex:o,list:n}=e;if(null==t)return null;let a=n[t],{Previewer:r=y}=_.lN.getTypeByFile(a)??{};return(0,l.jsx)(r,{index:t,list:n,onSwitchIndex:o})}function P(e){let{disabled:t,multiple:o,value:n,onChange:a,readPretty:r,showFileName:i}=e,[s,d]=(0,c.useState)([]),[u,p]=(0,c.useState)(null);(0,c.useEffect)(()=>{d((0,_.eb)(n))},[n]);let m=(0,c.useCallback)(e=>{p(s.findIndex(t=>t.id===e.id))},[s]),h=(0,c.useCallback)(e=>{if(o){let t=n.filter(t=>t.id!==e.id);0===t.length?a(null):a(t)}else a(null)},[o,a,n]);return(0,l.jsxs)(l.Fragment,{children:[s.map((e,o)=>(0,l.jsx)(w,{file:e,index:o,disabled:t,onPreview:m,onDelete:h,readPretty:r,showFileName:i},e.id||e.url)),(0,l.jsx)(F,{index:u,onSwitchIndex:p,list:s})]})}function j(e){let{rules:t,...o}=e,{disabled:a,multiple:s,value:u,onChange:m,toValueItem:h=_.ej}=o,[v,g]=(0,c.useState)([]),[b,y]=(0,c.useState)([]),{t:S}=(0,p.useTranslation)(),{componentCls:k}=(0,f.I)(),M=(0,r.useField)(),F=(0,_.Zy)(o),P=(0,_.yL)(t);(0,c.useEffect)(()=>{if(b.length){let e=b.filter(e=>"error"===e.status);M.setFeedback({type:"error",code:"ValidateError",messages:[e.length?S("Some files are not uploaded correctly, please check."):" "]})}else M.setFeedback({})},[M,b,S]);let j=(0,c.useCallback)(e=>{let t=e.fileList.filter(e=>"done"!==e.status).map(_.qv);if(y(t),s){let o=e.fileList.filter(e=>"done"===e.status);if(o.length){let e=[...v,...o.map(e=>{var t;return h(null==(t=e.response)?void 0:t.data)})];t.length?g(e):(null==m||m([...u||[],...e]),g([]))}}else{let t=e.fileList.find(t=>t.uid===e.file.uid);if("done"===t.status){var o;null==m||m(h(null==(o=t.response)?void 0:o.data)),y([])}}},[s,u,v,h,m]),A=(0,c.useCallback)(e=>{y(t=>{let o=t.indexOf(e);return t.splice(o,1),[...t]})},[]),I=(0,c.useCallback)(e=>{g(t=>{let o=t.indexOf(e);return t.splice(o,1),[...t]})},[]),T=(0,x.xZ)("QRCodeUploader"),{mimetype:D,size:L}=t??{},Y=C(L),R=!a&&(s||(!u||Array.isArray(u)&&!u.length)&&!b.length);return(0,l.jsxs)(l.Fragment,{children:[v.map((e,t)=>(0,l.jsx)(w,{file:e,index:t,disabled:a,onDelete:I},e.id)),b.map((e,t)=>(0,l.jsx)(w,{file:e,index:t,disabled:a,onDelete:A},e.uid)),(0,l.jsx)("div",{className:(0,d.default)(`${k}-list-picture-card-container`,`${k}-list-item-container`),style:R?{}:{display:"none"},children:(0,l.jsx)(i.Tooltip,{title:Y,children:(0,l.jsx)(i.Upload,{accept:D,...F,disabled:a,multiple:s,listType:"picture-card",fileList:b,beforeUpload:P,onChange:j,showUploadList:!1,children:R?(0,l.jsxs)("span",{children:[(0,l.jsx)(n.PlusOutlined,{}),(0,l.jsx)("br",{})," ",S("Upload")]}):null})})}),R&&T&&(0,l.jsx)(T,{disabled:a,multiple:s,value:u,onChange:m})]})}function A(e){let{wrapSSR:t,hashId:o,componentCls:n}=(0,f.I)();return t((0,l.jsx)("div",{className:(0,d.default)(`${n}-wrapper`,`${n}-picture-card-wrapper`,"nb-upload",o),children:(0,l.jsxs)("div",{className:(0,d.default)(`${n}-list`,`${n}-list-picture-card`),children:[(0,l.jsx)(P,{...e}),(0,l.jsx)(j,{...e})]})}))}k.ReadPretty=S,A.ReadPretty=S,k.Attachment=(0,h.T)((0,r.connect)(A,(0,r.mapReadPretty)(A.ReadPretty)),{displayName:"Upload.Attachment"}),k.Dragger=(0,r.connect)(e=>{let{tipContent:t,onChange:o,...n}=e,{wrapSSR:a,hashId:r,componentCls:s}=(0,f.I)(),u=(0,c.useCallback)(e=>{null==o||o((0,_.eb)(e.fileList))},[o]);return a((0,l.jsx)("div",{className:(0,d.default)(`${s}-dragger`,r),children:(0,l.jsxs)(i.Upload.Dragger,{...(0,_.Zy)(n),onChange:u,children:[t,e.children]})}))},(0,r.mapProps)({value:"fileList"})),k.DraggerV2=(0,h.T)((0,r.connect)(e=>{let{rules:t,...o}=e,{t:a}=(0,p.useTranslation)(),r=a("Click or drag file to this area to upload"),{title:s=r,...u}=(0,v.Y)(o),[m,h]=(0,c.useState)(!1),{wrapSSR:x,hashId:g,componentCls:b}=(0,f.I)(),y=(0,_.yL)(t),{size:S,mimetype:k}=t??{},M=C(S),w=(0,c.useCallback)(e=>{let{fileList:t}=e,{onChange:o}=u;null==o||o(t),t.some(e=>"uploading"===e.status)?h(!0):h(!1)},[u]);return x((0,l.jsx)("div",{className:(0,d.default)(`${b}-dragger`,g),children:(0,l.jsxs)(i.Upload.Dragger,{...(0,_.Zy)({...o,...u,accept:k,onChange:w,beforeUpload:y}),children:[(0,l.jsx)("p",{className:`${b}-drag-icon`,children:m?(0,l.jsx)(n.LoadingOutlined,{style:{fontSize:36},spin:!0}):(0,l.jsx)(n.InboxOutlined,{})}),(0,l.jsx)("p",{className:`${b}-text`,children:s}),(0,l.jsxs)("ul",{children:[(0,l.jsx)("li",{className:`${b}-hint`,children:a("Support for a single or bulk upload.")}),(0,l.jsx)("li",{className:`${b}-hint`,children:M})]})]})}))},(0,r.mapProps)({value:"fileList"})),{displayName:"Upload.DraggerV2"})},13704(e,t,o){o.d(t,{_O:()=>a._O,_b:()=>l._b,_s:()=>a._s,d9:()=>a.d9,dF:()=>n.d,lN:()=>l.lN});var l=o(61808),n=o(48989),a=o(57949)},61808(e,t,o){o.d(t,{ZH:()=>u,qv:()=>b,AK:()=>x,_b:()=>_,ej:()=>S,yL:()=>w,lN:()=>v,Zy:()=>y,eb:()=>C,n2:()=>g});var l=o(27404),n=o(51649),a=o(77843),r=o(16211);let i=window.__nocobase_dev_public_path__||window.__nocobase_public_path__||"/",s=[{ext:/\.docx?$/i,icon:"/file-placeholder/docx-200-200.png"},{ext:/\.pptx?$/i,icon:"/file-placeholder/pptx-200-200.png"},{ext:/\.jpe?g$/i,icon:"/file-placeholder/jpeg-200-200.png"},{ext:/\.pdf$/i,icon:"/file-placeholder/pdf-200-200.png"},{ext:/\.png$/i,icon:"/file-placeholder/png-200-200.png"},{ext:/\.eps$/i,icon:"/file-placeholder/eps-200-200.png"},{ext:/\.ai$/i,icon:"/file-placeholder/ai-200-200.png"},{ext:/\.gif$/i,icon:"/file-placeholder/gif-200-200.png"},{ext:/\.svg$/i,icon:"/file-placeholder/svg-200-200.png"},{ext:/\.xlsx?$/i,icon:"/file-placeholder/xlsx-200-200.png"},{ext:/\.psd?$/i,icon:"/file-placeholder/psd-200-200.png"},{ext:/\.(wav|aif|aiff|au|mp1|mp2|mp3|ra|rm|ram|mid|rmi)$/i,icon:"/file-placeholder/audio-200-200.png"},{ext:/\.(avi|wmv|mpg|mpeg|vob|dat|3gp|mp4|mkv|rm|rmvb|mov|flv)$/i,icon:"/file-placeholder/video-200-200.png"},{ext:/\.(zip|rar|arj|z|gz|iso|jar|ace|tar|uue|dmg|pkg|lzh|cab)$/i,icon:"/file-placeholder/zip-200-200.png"}].map(e=>({ext:e.ext,icon:i+e.icon.slice(1)})),d=i+"file-placeholder/unknown-200-200.png",u=0x1400000,c=e=>(null==e?void 0:e.split("?")[0].split("#")[0])||"",p=e=>{if(!e)return"";let t=c(e),o=t.lastIndexOf("/");var l=-1===o?t:t.slice(o+1);try{return decodeURIComponent(l)}catch(e){return l}},m=e=>{if(!e)return"";let t=c(e),o=t.lastIndexOf(".");return -1===o?"":t.slice(o)},h=e=>{if(!e)return"";let t=m(e);return t?e.slice(0,-t.length):e},x=e=>{let t=(null==e?void 0:e.filename)||p(null==e?void 0:e.url),o=(null==e?void 0:e.extname)||m(t||(null==e?void 0:e.name)),l=(null==e?void 0:e.title)||h(t||(null==e?void 0:e.name));return t||`${l||"file"}${o}`},v=new class{add(e){this.types.unshift(e)}getTypeByFile(e){return this.types.find(t=>t.match(e))}constructor(){this.types=[]}};function _(e,t){if(!e)return!1;if(e.originFileObj)return(0,ek.default)(e.type,t);if(e.mimetype)return(0,ek.default)(e.mimetype,t);if(e.url){let[o]=e.url.split("?");return(0,ek.default)(eS.default.getType(o)||"",t)}return!1}let f=(e,t)=>t&&(0,l.isArr)(t.include)?t.include.some(t=>e.test(t)):!(t&&(0,l.isArr)(t.exclude))||!t.exclude.some(t=>e.test(t));function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(let o=0;o<s.length;o++){let l=e.url?new URL(e.url.startsWith("http://")||e.url.startsWith("https://")?e.url:`${location.origin}/${e.url.replace(/^\//,"")}`):{pathname:e.filename};if(s[o].ext.test(e.extname||e.filename||l.pathname||e.name))if(f(s[o].ext,t))return s[o].icon||d;else return e.name}return d}function b(e){let t=function(e){let{error:t,response:o}=e;if(t instanceof Error&&"isAxiosError"in t)if(!t.response)return t.message;else{var l,n,a;return null==(a=t.response.data)||null==(n=a.errors)||null==(l=n.map)?void 0:l.call(n,e=>null==e?void 0:e.message).join(", ")}if(!o)return"";if("string"==typeof o)return o;let{errors:r}=o.data??{};return(null==r?void 0:r.length)?r.map(e=>null==e?void 0:e.message).join(", "):""}(e);return{...e,title:e.name,response:t}}function y(e){let t=(0,r.VB)();return{customRequest(e){let{action:o,data:l,file:n,filename:a,headers:r,onError:i,onProgress:s,onSuccess:d,withCredentials:u}=e,c=new FormData;return l&&Object.keys(l).forEach(e=>{c.append(e,l[e])}),c.append(a,n),t.axios.post(o,c,{withCredentials:u,headers:r,onUploadProgress:e=>{let{total:t,loaded:o}=e;s({percent:Math.round(o/t*100).toFixed(2)},n)}}).then(e=>{let{data:t}=e;d(t,n)}).catch(i).finally(()=>{}),{abort(){console.log("upload progress is aborted.")}}},...e}}function S(e){return e}let k=e=>{var t;"string"==typeof e&&(e={url:e}),(null==e||null==(t=e.response)?void 0:t.data)&&(e={uid:e.uid,...e.response.data});let o={...e,id:e.id||e.uid,title:e.title||h(e.filename||e.name||p(e.url)),filename:e.filename||e.name||p(e.url),extname:e.extname||m(e.filename||e.name||p(e.url))};return e.url&&(o.url=e.url.startsWith("https://")||e.url.startsWith("http://")?e.url:`${location.origin}/${e.url.replace(/^\//,"")}`),o},C=e=>(!(0,l.isValid)(e)||0===Object.keys(e).length?[]:(0,l.toArr)(e)).filter(Boolean).map(k),M={size(e,t){let o=t??u;return 0===o||e.size<=o?null:"File size exceeds the limit"},mimetype(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*",o=t.toString().trim();return o&&"*"!==o?o.split(",").filter(Boolean).some((0,ek.default)(e.type))?null:"File type is not allowed":null}};function w(e){let{t}=(0,a.useTranslation)();return(0,n.useCallback)((o,l)=>{let n=o;if(!o.type){var a,r;let e=null==(r=o.name)||null==(a=r.match(/\.[^.]+$/))?void 0:a[0];e&&(n=new File([o],o.name,{type:eS.default.getType(e)||"application/octet-stream",lastModified:o.lastModified}))}let i=function(e,t){if(!t)return null;let o=Object.keys(t);if(!o.length)return null;for(let l of o){let o=M[l](e,t[l]);if(o)return o}return null}(n,e);return i?(o.status="error",o.response=t(i)):"error"===o.status&&(delete n.status,delete n.response),!i&&Promise.resolve(n)},[e])}},48989(e,t,o){o.d(t,{I:()=>l,d:()=>n});let l=(0,o(54969).fD)("upload",e=>{let{componentCls:t,antCls:o}=e;return{[`${t}-wrapper`]:{"&.nb-upload.nb-upload-small":{[`${t}-list-picture-card-container`]:{margin:"0 3px 3px 0 !important",height:"32px !important",width:"32px !important",marginBlock:"0 !important"},[`${t}-list-picture-card ${t}-list-item-name${t}-list-item-name`]:{display:"none !important"},[`${t}-list-picture ${t}-list-item, ${t}-list-picture-card ${t}-list-item`]:{borderRadius:"4px",padding:"1px !important",[`${t}-list-item-image`]:{borderRadius:"2px"}}},"&.nb-upload-large":{[`${t}-list-picture-card-container`]:{margin:"0 3px 3px 0 !important",height:"160px !important",width:"160px !important",marginBlock:"0 28px !important"}},"&.nb-upload":{[`${t}-list-item, ${t}-list-item-list-type-picture-card`]:{padding:"3px !important"},[`${t}-list-item-thumbnail`]:{img:{objectFit:"cover !important"}},[`${t}-list-item-actions`]:{left:"auto !important",right:"2px !important",top:"2px !important",transform:"none !important",width:"fit-content !important",[`${o}-btn-text:hover, ${o}-btn-text:focus`]:{background:"rgba(0, 0, 0, 0.4)"}},[`${t}-list-picture-card ${t}-list-item-info`]:{overflow:"inherit",width:"100%",height:"100%"},[`${t}-list-picture-card ${t}-list-item-name`]:{display:"block !important",marginTop:"5px",fontSize:"13px",color:"#636363"},[`${t}-list-picture-card ${t}-list-item::before`]:{display:"none !important"},[`${t}-list-picture-card ${t}-list-item-progress`]:{bottom:"calc(50% - 11px)",left:`${e.margin/2}px`,pointerEvents:"none"},[`${o}-btn`]:{background:"rgba(0, 0, 0, 0.5)"},[`${t}-list-picture-card-container`]:{}},[`${t}-list-item-error`]:{[`${t}-list-item-info img`]:{opacity:.6}},[`${t}-drag`]:{[`${t}-drag-container`]:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%",ul:{color:e.colorTextSecondary,[`${t}-hint`]:{textAlign:"left"}}}}}}}),n=l},73047(e,t,o){o.d(t,{B:()=>s});var l=o(71178),n=o(10691),a=o(52793),r=o(51649),i=o(96758);function s(e){let t=(0,r.useRef)(null),{changeOnSelect:o,component:s=a.Input.TextArea,fieldNames:d,scope:u,buttonClass:c,delimiters:p=["{{","}}"],...m}=e,h="function"==typeof u?u():u,[x,v]=(0,r.useState)(h||[]);return(0,l.jsxs)("div",{className:(0,n.css)`
906
+ `),style:v,children:(0,l.jsx)("div",{className:(0,d.default)(`${h}-list`,`${h}-list-picture-card`),style:v,children:(0,l.jsx)(P,{disabled:n,readPretty:!0,multiple:r,value:t,onChange:o,...s})})}))}let k=(0,r.connect)(function(e){let{onChange:t,...o}=e,n=(0,c.useCallback)(e=>{null==t||t((0,_.eb)(e.fileList))},[t]);return(0,l.jsx)(i.Upload,{...(0,_.Zy)(o),onChange:n})},(0,r.mapProps)({value:"fileList"}),(0,r.mapReadPretty)(S));function C(e){let t=e??_.ZH,{t:o,i18n:l}=(0,p.useTranslation)(),n=(0,eM.default)(t,{base:2,standard:"jedec",locale:l.language});return 0!==t?o("File size should not exceed {{size}}.",{size:n}):""}function M(e){let{file:t}=e,{componentCls:o}=(0,f.I)(),{getThumbnailURL:n=_.n2}=_.lN.getTypeByFile(t)??{},a=n(t);return(0,l.jsx)("img",{src:a,alt:t.title,className:`${o}-list-item-image`})}function w(e){let{file:t,disabled:o,onPreview:a,onDelete:r,readPretty:s,showFileName:m}=e,{componentCls:h}=(0,f.I)(),{t:x}=(0,p.useTranslation)(),v=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),null==a||a(t)},[t,a]),g=(0,c.useCallback)(()=>{null==r||r(t)},[t,r]),b=(0,c.useCallback)(()=>{(0,u.saveAs)(t.url,(0,_.AK)(t))},[t]),{ThumbnailPreviewer:y=M}=_.lN.getTypeByFile(t)??{},S=[(0,l.jsx)("span",{className:`${h}-list-item-thumbnail`,children:(0,l.jsx)(y,{file:t})},"thumbnail"),!1!==m&&t.title?(0,l.jsx)("span",{className:`${h}-list-item-name`,title:t.title,children:"uploading"===t.status?x("Uploading"):t.title},"title"):null],k=t.url?(0,l.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:t.url,onClick:v,children:S}):(0,l.jsx)("span",{className:`${h}-span`,children:S}),C=(0,l.jsxs)("div",{className:(0,d.default)(`${h}-list-item`,`${h}-list-item-${t.status??"done"}`,`${h}-list-item-list-type-picture-card`),children:[(0,l.jsx)("div",{className:`${h}-list-item-info`,children:k}),(0,l.jsx)("span",{className:`${h}-list-item-actions`,children:(0,l.jsxs)(i.Space,{size:3,children:[!s&&t.url&&(0,l.jsx)(i.Button,{size:"small",type:"text",icon:(0,l.jsx)(n.DownloadOutlined,{}),onClick:b}),!s&&!o&&"uploading"!==t.status&&(0,l.jsx)(i.Button,{size:"small",type:"text",icon:(0,l.jsx)(n.DeleteOutlined,{}),onClick:g})]})}),"uploading"===t.status&&(0,l.jsx)("div",{className:`${h}-list-item-progress`,children:(0,l.jsx)(i.Progress,{strokeWidth:4,type:"line",showInfo:!1,percent:Number(t.percent)})})]});return(0,l.jsx)("div",{style:{marginBottom:!1!==m&&t.title?"28px":"0px"},className:`${h}-list-picture-card-container ${h}-list-item-container`,children:"error"===t.status?(0,l.jsx)(i.Tooltip,{title:t.response,getPopupContainer:e=>e.parentNode,children:C}):C})}function F(e){let{index:t,onSwitchIndex:o,list:n,fileCollection:a}=e;if(null==t)return null;let r=n[t],{Previewer:i=y}=_.lN.getTypeByFile(r)??{};return(0,l.jsx)(i,{index:t,list:n,fileCollection:a,onSwitchIndex:o})}function P(e){let{disabled:t,multiple:o,value:n,onChange:a,readPretty:r,showFileName:i,fileCollection:s}=e,[d,u]=(0,c.useState)([]),p=(0,c.useRef)([]),[m,h]=(0,c.useState)(null);(0,c.useEffect)(()=>{p.current=d},[d]),(0,c.useEffect)(()=>()=>{(0,_.kZ)(p.current)},[]),(0,c.useEffect)(()=>{u((0,_.eb)(n))},[n]);let x=(0,c.useCallback)(e=>{h(d.findIndex(t=>t.id===e.id))},[d]),v=(0,c.useCallback)(e=>{if((0,_.Zh)(e),o){let t=n.filter(t=>t.id!==e.id);0===t.length?a(null):a(t)}else a(null)},[o,a,n]);return(0,l.jsxs)(l.Fragment,{children:[d.map((e,o)=>(0,l.jsx)(w,{file:e,index:o,disabled:t,onPreview:x,onDelete:v,readPretty:r,showFileName:i},e.id||e.url)),(0,l.jsx)(F,{index:m,onSwitchIndex:h,list:d,fileCollection:s})]})}function j(e){let{rules:t,...o}=e,{disabled:a,multiple:s,value:u,onChange:m,toValueItem:h=_.ej}=o,[v,g]=(0,c.useState)([]),[b,y]=(0,c.useState)([]),S=(0,c.useRef)([]),k=(0,c.useRef)([]),{t:M}=(0,p.useTranslation)(),{componentCls:F}=(0,f.I)(),P=(0,r.useField)(),j=(0,_.Zy)(o),A=(0,_.yL)(t);(0,c.useEffect)(()=>{S.current=v},[v]),(0,c.useEffect)(()=>{k.current=b},[b]),(0,c.useEffect)(()=>()=>{(0,_.kZ)([...S.current,...k.current])},[]),(0,c.useEffect)(()=>{if(b.length){let e=b.filter(e=>"error"===e.status);P.setFeedback({type:"error",code:"ValidateError",messages:[e.length?M("Some files are not uploaded correctly, please check."):" "]})}else P.setFeedback({})},[P,b,M]);let I=(0,c.useCallback)(e=>{let t=e.fileList.filter(e=>"done"!==e.status).map(_.qv);if(y(t),s){let o=e.fileList.filter(e=>"done"===e.status);if(o.length){let e=[...v,...o.map(e=>{var t;let o=h(null==(t=e.response)?void 0:t.data);return(0,_._8)(o,e),o})];t.length?g(e):(null==m||m([...u||[],...e]),g([]))}}else{let t=e.fileList.find(t=>t.uid===e.file.uid);if("done"===t.status){var o;let e=h(null==(o=t.response)?void 0:o.data);(0,_._8)(e,t),null==m||m(e),y([])}}},[s,u,v,h,m]),T=(0,c.useCallback)(e=>{(0,_.Zh)(e),y(t=>{let o=t.indexOf(e);return t.splice(o,1),[...t]})},[]),D=(0,c.useCallback)(e=>{(0,_.Zh)(e),g(t=>{let o=t.indexOf(e);return t.splice(o,1),[...t]})},[]),L=(0,x.xZ)("QRCodeUploader"),{mimetype:Y,size:R}=t??{},B=C(R),N=!a&&(s||(!u||Array.isArray(u)&&!u.length)&&!b.length);return(0,l.jsxs)(l.Fragment,{children:[v.map((e,t)=>(0,l.jsx)(w,{file:e,index:t,disabled:a,onDelete:D},e.id)),b.map((e,t)=>(0,l.jsx)(w,{file:e,index:t,disabled:a,onDelete:T},e.uid)),(0,l.jsx)("div",{className:(0,d.default)(`${F}-list-picture-card-container`,`${F}-list-item-container`),style:N?{}:{display:"none"},children:(0,l.jsx)(i.Tooltip,{title:B,children:(0,l.jsx)(i.Upload,{accept:Y,...j,disabled:a,multiple:s,listType:"picture-card",fileList:b,beforeUpload:A,onChange:I,showUploadList:!1,children:N?(0,l.jsxs)("span",{children:[(0,l.jsx)(n.PlusOutlined,{}),(0,l.jsx)("br",{})," ",M("Upload")]}):null})})}),N&&L&&(0,l.jsx)(L,{disabled:a,multiple:s,value:u,onChange:m})]})}function A(e){let{fileCollection:t,...o}=e,{wrapSSR:n,hashId:a,componentCls:r}=(0,f.I)();return n((0,l.jsx)("div",{className:(0,d.default)(`${r}-wrapper`,`${r}-picture-card-wrapper`,"nb-upload",a),children:(0,l.jsxs)("div",{className:(0,d.default)(`${r}-list`,`${r}-list-picture-card`),children:[(0,l.jsx)(P,{...e,fileCollection:t}),(0,l.jsx)(j,{...o})]})}))}k.ReadPretty=S,A.ReadPretty=S,k.Attachment=(0,h.T)((0,r.connect)(A,(0,r.mapReadPretty)(A.ReadPretty)),{displayName:"Upload.Attachment"}),k.Dragger=(0,r.connect)(e=>{let{tipContent:t,onChange:o,...n}=e,{wrapSSR:a,hashId:r,componentCls:s}=(0,f.I)(),u=(0,c.useCallback)(e=>{null==o||o((0,_.eb)(e.fileList))},[o]);return a((0,l.jsx)("div",{className:(0,d.default)(`${s}-dragger`,r),children:(0,l.jsxs)(i.Upload.Dragger,{...(0,_.Zy)(n),onChange:u,children:[t,e.children]})}))},(0,r.mapProps)({value:"fileList"})),k.DraggerV2=(0,h.T)((0,r.connect)(e=>{let{rules:t,...o}=e,{t:a}=(0,p.useTranslation)(),r=a("Click or drag file to this area to upload"),{title:s=r,...u}=(0,v.Y)(o),[m,h]=(0,c.useState)(!1),{wrapSSR:x,hashId:g,componentCls:b}=(0,f.I)(),y=(0,_.yL)(t),{size:S,mimetype:k}=t??{},M=C(S),w=(0,c.useCallback)(e=>{let{fileList:t}=e,{onChange:o}=u;null==o||o(t),t.some(e=>"uploading"===e.status)?h(!0):h(!1)},[u]);return x((0,l.jsx)("div",{className:(0,d.default)(`${b}-dragger`,g),children:(0,l.jsxs)(i.Upload.Dragger,{...(0,_.Zy)({...o,...u,accept:k,onChange:w,beforeUpload:y}),children:[(0,l.jsx)("p",{className:`${b}-drag-icon`,children:m?(0,l.jsx)(n.LoadingOutlined,{style:{fontSize:36},spin:!0}):(0,l.jsx)(n.InboxOutlined,{})}),(0,l.jsx)("p",{className:`${b}-text`,children:s}),(0,l.jsxs)("ul",{children:[(0,l.jsx)("li",{className:`${b}-hint`,children:a("Support for a single or bulk upload.")}),(0,l.jsx)("li",{className:`${b}-hint`,children:M})]})]})}))},(0,r.mapProps)({value:"fileList"})),{displayName:"Upload.DraggerV2"})},13704(e,t,o){o.d(t,{_O:()=>a._O,_b:()=>l._b,_s:()=>a._s,d9:()=>a.d9,dF:()=>n.d,lN:()=>l.lN});var l=o(61808),n=o(48989),a=o(57949)},61808(e,t,o){o.d(t,{ZH:()=>u,nY:()=>k,qv:()=>j,AK:()=>x,_b:()=>_,_8:()=>C,Zh:()=>M,lN:()=>v,kZ:()=>w,eb:()=>D,ej:()=>I,yL:()=>Y,Zy:()=>A,n2:()=>P});var l=o(27404),n=o(51649),a=o(77843),r=o(16211);function i(e,t){let o=t||("u"<typeof window?void 0:window),l=null==o?void 0:o.__webpack_public_path__,n=null==o?void 0:o.__nocobase_public_path__;return`${(l&&"/"!==l?l:n||l||"/").replace(/\/+$/g,"")}/${e.replace(/^\//,"")}`}let s=[{ext:/\.docx?$/i,icon:"/file-placeholder/docx-200-200.png"},{ext:/\.pptx?$/i,icon:"/file-placeholder/pptx-200-200.png"},{ext:/\.jpe?g$/i,icon:"/file-placeholder/jpeg-200-200.png"},{ext:/\.pdf$/i,icon:"/file-placeholder/pdf-200-200.png"},{ext:/\.png$/i,icon:"/file-placeholder/png-200-200.png"},{ext:/\.eps$/i,icon:"/file-placeholder/eps-200-200.png"},{ext:/\.ai$/i,icon:"/file-placeholder/ai-200-200.png"},{ext:/\.gif$/i,icon:"/file-placeholder/gif-200-200.png"},{ext:/\.svg$/i,icon:"/file-placeholder/svg-200-200.png"},{ext:/\.xlsx?$/i,icon:"/file-placeholder/xlsx-200-200.png"},{ext:/\.psd?$/i,icon:"/file-placeholder/psd-200-200.png"},{ext:/\.(wav|aif|aiff|au|mp1|mp2|mp3|ra|rm|ram|mid|rmi)$/i,icon:"/file-placeholder/audio-200-200.png"},{ext:/\.(avi|wmv|mpg|mpeg|vob|dat|3gp|mp4|mkv|rm|rmvb|mov|flv)$/i,icon:"/file-placeholder/video-200-200.png"},{ext:/\.(zip|rar|arj|z|gz|iso|jar|ace|tar|uue|dmg|pkg|lzh|cab)$/i,icon:"/file-placeholder/zip-200-200.png"}].map(e=>({ext:e.ext,icon:i(e.icon)})),d=i("/file-placeholder/unknown-200-200.png"),u=0x1400000,c=e=>(null==e?void 0:e.split("?")[0].split("#")[0])||"",p=e=>{if(!e)return"";let t=c(e),o=t.lastIndexOf("/");var l=-1===o?t:t.slice(o+1);try{return decodeURIComponent(l)}catch(e){return l}},m=e=>{if(!e)return"";let t=c(e),o=t.lastIndexOf(".");return -1===o?"":t.slice(o)},h=e=>{if(!e)return"";let t=m(e);return t?e.slice(0,-t.length):e},x=e=>{let t=(null==e?void 0:e.filename)||p(null==e?void 0:e.url),o=(null==e?void 0:e.extname)||m(t||(null==e?void 0:e.name)),l=(null==e?void 0:e.title)||h(t||(null==e?void 0:e.name));return t||`${l||"file"}${o}`},v=new class{add(e){this.types.unshift(e)}getTypeByFile(e){return this.types.find(t=>t.match(e))}constructor(){this.types=[]}};function _(e,t){if(!e)return!1;if(e.originFileObj){var o;return(0,ek.default)(e.type||(null==(o=e.originFileObj)?void 0:o.type)||"",t)}let l=e.mimetype||e.type;if(l)return(0,ek.default)(l,t);let n=e.thumbUrl||e.preview||e.url;if(n){let[e]=n.split("?");return(0,ek.default)(eS.default.getType(e)||"",t)}return!1}let f=new WeakMap,g=new Map,b=e=>(null==e?void 0:e.originFileObj)?e.originFileObj:"u">typeof Blob&&e instanceof Blob?e:null,y=(e,t)=>{if(!t)return[];let o=[`${e}:${t}`];if("u">typeof location)try{let l=new URL(t,location.origin);o.push(`${e}:${l.toString()}`),l.origin===location.origin&&o.push(`${e}:${l.pathname}${l.search}${l.hash}`)}catch(e){}return[...new Set(o)]},S=e=>e&&"object"==typeof e?[...y("url",e.url),...y("preview",e.preview),null!=e.id?`id:${String(e.id)}`:""].filter(Boolean):[];function k(e){if(!e||!_(e,"image/*")||"u"<typeof URL)return"";let t=b(e);if(t){let e=f.get(t);if(e)return e;if("function"==typeof URL.createObjectURL){let e=URL.createObjectURL(t);return f.set(t,e),e}}for(let t of S(e)){let e=g.get(t);if(e)return e}return""}function C(e,t){let o=k(t);o&&S(e).forEach(e=>{g.set(e,o)})}function M(e){let t=new Set,o=b(e);if(o){let e=f.get(o);e&&(t.add(e),f.delete(o))}if(S(e).forEach(e=>{let o=g.get(e);o&&(t.add(o),g.delete(e))}),t.size){for(let[e,o]of g.entries())t.has(o)&&g.delete(e);"u">typeof URL&&"function"==typeof URL.revokeObjectURL&&t.forEach(e=>URL.revokeObjectURL(e))}}function w(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach(e=>M(e))}let F=(e,t)=>t&&(0,l.isArr)(t.include)?t.include.some(t=>e.test(t)):!(t&&(0,l.isArr)(t.exclude))||!t.exclude.some(t=>e.test(t));function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(let o=0;o<s.length;o++){let l=e.url?new URL(e.url.startsWith("http://")||e.url.startsWith("https://")?e.url:`${location.origin}/${e.url.replace(/^\//,"")}`):{pathname:e.filename};if(s[o].ext.test(e.extname||e.filename||l.pathname||e.name))if(F(s[o].ext,t))return s[o].icon||d;else return e.name}return d}function j(e){let t=function(e){let{error:t,response:o}=e;if(t instanceof Error&&"isAxiosError"in t)if(!t.response)return t.message;else{var l,n,a;return null==(a=t.response.data)||null==(n=a.errors)||null==(l=n.map)?void 0:l.call(n,e=>null==e?void 0:e.message).join(", ")}if(!o)return"";if("string"==typeof o)return o;let{errors:r}=o.data??{};return(null==r?void 0:r.length)?r.map(e=>null==e?void 0:e.message).join(", "):""}(e);return{...e,title:e.name,response:t}}function A(e){let t=(0,r.VB)();return{customRequest(e){let{action:o,data:l,file:n,filename:a,headers:r,onError:i,onProgress:s,onSuccess:d}=e,u=new FormData;return l&&Object.keys(l).forEach(e=>{u.append(e,l[e])}),u.append(a,n),t.axios.post(o,u,{headers:r,onUploadProgress:e=>{let{total:t,loaded:o}=e;s({percent:Math.round(o/t*100).toFixed(2)},n)}}).then(e=>{let{data:t}=e;d(t,n)}).catch(i).finally(()=>{}),{abort(){console.log("upload progress is aborted.")}}},...e}}function I(e){return e}let T=e=>{var t;"string"==typeof e&&(e={url:e}),(null==e||null==(t=e.response)?void 0:t.data)&&(e={uid:e.uid,...e.response.data});let o={...e,id:e.id||e.uid,title:e.title||h(e.filename||e.name||p(e.url)),filename:e.filename||e.name||p(e.url),extname:e.extname||m(e.filename||e.name||p(e.url))};return e.url&&(o.url=e.url.startsWith("https://")||e.url.startsWith("http://")?e.url:`${location.origin}/${e.url.replace(/^\//,"")}`),o},D=e=>(!(0,l.isValid)(e)||0===Object.keys(e).length?[]:(0,l.toArr)(e)).filter(Boolean).map(T),L={size(e,t){let o=t??u;return 0===o||e.size<=o?null:"File size exceeds the limit"},mimetype(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*",o=t.toString().trim();return o&&"*"!==o?o.split(",").filter(Boolean).some((0,ek.default)(e.type))?null:"File type is not allowed":null}};function Y(e){let{t}=(0,a.useTranslation)();return(0,n.useCallback)((o,l)=>{let n=o;if(!o.type){var a,r;let e=null==(r=o.name)||null==(a=r.match(/\.[^.]+$/))?void 0:a[0];e&&(n=new File([o],o.name,{type:eS.default.getType(e)||"application/octet-stream",lastModified:o.lastModified}))}let i=function(e,t){if(!t)return null;let o=Object.keys(t);if(!o.length)return null;for(let l of o){let o=L[l](e,t[l]);if(o)return o}return null}(n,e);return i?(o.status="error",o.response=t(i)):"error"===o.status&&(delete n.status,delete n.response),!i&&Promise.resolve(n)},[e,t])}},48989(e,t,o){o.d(t,{I:()=>l,d:()=>n});let l=(0,o(54969).fD)("upload",e=>{let{componentCls:t,antCls:o}=e;return{[`${t}-wrapper`]:{"&.nb-upload.nb-upload-small":{[`${t}-list-picture-card-container`]:{margin:"0 3px 3px 0 !important",height:"32px !important",width:"32px !important",marginBlock:"0 !important"},[`${t}-list-picture-card ${t}-list-item-name${t}-list-item-name`]:{display:"none !important"},[`${t}-list-picture ${t}-list-item, ${t}-list-picture-card ${t}-list-item`]:{borderRadius:"4px",padding:"1px !important",[`${t}-list-item-image`]:{borderRadius:"2px"}}},"&.nb-upload-large":{[`${t}-list-picture-card-container`]:{margin:"0 3px 3px 0 !important",height:"160px !important",width:"160px !important",marginBlock:"0 28px !important"}},"&.nb-upload":{[`${t}-list-item, ${t}-list-item-list-type-picture-card`]:{padding:"3px !important"},[`${t}-list-item-thumbnail`]:{img:{objectFit:"cover !important"}},[`${t}-list-item-actions`]:{left:"auto !important",right:"2px !important",top:"2px !important",transform:"none !important",width:"fit-content !important",[`${o}-btn-text:hover, ${o}-btn-text:focus`]:{background:"rgba(0, 0, 0, 0.4)"}},[`${t}-list-picture-card ${t}-list-item-info`]:{overflow:"inherit",width:"100%",height:"100%"},[`${t}-list-picture-card ${t}-list-item-name`]:{display:"block !important",marginTop:"5px",fontSize:"13px",color:"#636363"},[`${t}-list-picture-card ${t}-list-item::before`]:{display:"none !important"},[`${t}-list-picture-card ${t}-list-item-progress`]:{bottom:"calc(50% - 11px)",left:`${e.margin/2}px`,pointerEvents:"none"},[`${o}-btn`]:{background:"rgba(0, 0, 0, 0.5)"},[`${t}-list-picture-card-container`]:{}},[`${t}-list-item-error`]:{[`${t}-list-item-info img`]:{opacity:.6}},[`${t}-drag`]:{[`${t}-drag-container`]:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%",ul:{color:e.colorTextSecondary,[`${t}-hint`]:{textAlign:"left"}}}}}}}),n=l},73047(e,t,o){o.d(t,{B:()=>s});var l=o(71178),n=o(10691),a=o(52793),r=o(51649),i=o(96758);function s(e){let t=(0,r.useRef)(null),{changeOnSelect:o,component:s=a.Input.TextArea,fieldNames:d,scope:u,buttonClass:c,delimiters:p=["{{","}}"],...m}=e,h="function"==typeof u?u():u,[x,v]=(0,r.useState)(h||[]);return(0,l.jsxs)("div",{className:(0,n.css)`
907
907
  position: relative;
908
908
  .ant-input {
909
909
  width: 100%;
@@ -1013,11 +1013,11 @@ ${JSON.stringify(s,null,2)}`)},[j,F,w,S,y,V,t,M,C,R,o,B,z,U,O,q,Y]),K=(0,a.useCa
1013
1013
  &:hover {
1014
1014
  background-color: ${i.colorFillSecondary};
1015
1015
  }
1016
- `;return(0,a.jsxs)("div",{style:{maxHeight:300,overflowY:"auto"},children:[e.map(e=>(0,a.jsx)("div",{role:"option",onClick:()=>v(e.value),className:o,children:l(e.label)},e.value)),(0,a.jsx)(u.Divider,{style:{margin:"4px 0"}}),t.map(e=>(0,a.jsx)("div",{role:"option",className:o,onClick:()=>v(e.value),title:l(e.label),children:l(e.label)},e.value))]})}}),["past","next"].includes(null==t?void 0:t.type)&&[(0,a.jsx)(u.InputNumber,{value:null==t?void 0:t.number,onChange:e=>{o({...t,number:e})}},"number"),(0,a.jsx)(u.Select,{value:null==t?void 0:t.unit,style:{minWidth:130,maxWidth:140},onChange:e=>{o({...t,unit:e})},options:[{value:"day",label:n("Day")},{value:"week",label:n("Calendar week")},{value:"month",label:n("Calendar Month")},{value:"year",label:n("Calendar Year")}],popupMatchSelectWidth:!0},"unit")],((null==t?void 0:t.type)==="exact"||!(null==t?void 0:t.type))&&(0,a.jsx)(x,{...e})]})}},87382(e,t,o){o.d(t,{L1:()=>x,L3:()=>f,Pd:()=>h,Uq:()=>_,X_:()=>p,gB:()=>m});var l=o(71178),n=o(72741),a=o(38533),r=o(10691),i=o(56920),s=o(77583),d=o(51649),u=o(54969),c=o(95951);let p=(0,d.createContext)(null);p.displayName="DraggableContext";let m=(0,d.createContext)(null);m.displayName="SortableContext";let h=e=>{let{id:t,data:o,children:n}=e,r=(0,a.useDraggable)({id:t,data:o}),i=(0,a.useDroppable)({id:t,data:o}),s=(0,d.useMemo)(()=>({draggable:r,droppable:i}),[r,i]);return(0,l.jsx)(m.Provider,{value:s,children:n})},x=e=>{var t,o;let{component:l,overStyle:a,style:s,children:c,openMode:p,...h}=e,{token:x}=(0,u.rd)(),{draggable:v,droppable:_}=(0,d.useContext)(m),{isOver:f,setNodeRef:g}=_,b={...s},y=(0,i.useFieldSchema)(),S=(null==y?void 0:y["x-component"])==="Action.Link"||"a"===l;if(f&&(null==v||null==(t=v.active)?void 0:t.id)!==(null==_||null==(o=_.over)?void 0:o.id)){let e;b[S?"color":"background"]=(e=x.colorSettings,new n.TinyColor(e).setAlpha(.15).toHex8String()),Object.assign(b,a)}return d.default.createElement(l||"div",{role:"none",...h,className:(0,r.cx)("nb-sortable-designer",e.className),ref:g,style:b},c)},v=(0,i.observer)(e=>{var t,o;let n,a,r,{schema:s,id:u,eid:c,removeParentsIfNoChildren:p,...m}=(t=e,n=(0,i.useField)(),a=t.id?t.id:null==n||null==(o=n.address)?void 0:o.toString(),r=(0,i.useFieldSchema)(),e.schema?{...e,id:a}:{...e,id:a,schema:r}),v=(0,d.useMemo)(()=>{var e,t,o;return{insertAdjacent:"afterEnd",schema:(null==(t=s.parent)||null==(e=t.parent)?void 0:e["x-component"])==="BlockTemplate"?null==(o=s.parent)?void 0:o.parent:s,removeParentsIfNoChildren:p??!0}},[s,p]);return(0,l.jsx)(h,{id:u,data:v,children:(0,l.jsx)(x,{id:c,...m,children:e.children})})},{displayName:"InternalSortableItem"}),_=d.default.memo(e=>{let{component:t,...o}=e,{designable:n}=(0,c.er)();return n?(0,l.jsx)(v,{...e}):d.default.createElement(t||"div",s.default.omit(o,["children","schema","overStyle","openMode","id","eid","removeParentsIfNoChildren"]),e.children)});_.displayName="SortableItem";let f=e=>{let{draggable:t}=(0,d.useContext)(m)||{};if(!t)return null;let{attributes:o,listeners:n,setNodeRef:a}=t;return(0,l.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,l.jsx)("div",{ref:a,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"},...n,...o,role:"none",children:(0,l.jsx)("span",{style:{cursor:"move",fontSize:14},children:e.children})})})}},37845(e,t,o){o.d(t,{L1:()=>l.L1,L3:()=>l.L3,Pd:()=>l.Pd,Uq:()=>l.Uq,X_:()=>l.X_,gB:()=>l.gB});var l=o(87382)},59529(e,t,o){o.d(t,{KX:()=>p,_c:()=>h,a2:()=>f,bc:()=>c,rf:()=>u});var l=o(63526),n=o(77583),a=o(73761),r=o(839),i=o(59896),s=o(32665),d=o(64004);let u=(e,t)=>{var o;let l=null==e||null==(o=e.match)?void 0:o.call(e,/{{(.*?)}}/);if(!l)return e;{let e=n.default.get(t,l[1]);return n.default.isFunction(e)?e():e}};function c(e){if("object"!=typeof e||null===e)return null;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))if("[object Object]"===Object.prototype.toString.call(e[t])&&null!==e[t])return c(e[t]);else return{key:t,value:e[t]};return null}let p=e=>{let t,o=(t=[],!function e(o){Object.keys(o).sort().forEach(function(l){t.push(l),o[l]&&"object"==typeof o[l]&&e(o[l])})}(e),t),l=(0,n.findIndex)(o,(e,t,o)=>{if(e.includes("$")&&t>0)return!0});return o.slice(0,l)},m=async(e,t,o)=>{let l=(0,i.DZ)(e)?[t.parseVariable(e,o).then(e=>{let{value:t}=e;return t})]:[e];try{let[e]=await Promise.all(l);return e}catch(e){throw console.error("Error in parseVariableValue:",e),e}},h=async(e,t)=>{let{ruleGroup:o,variables:l,localVariables:a,variableNameOfLeftCondition:r,conditionType:i}=e,s=Object.keys(o)[0]||"$and",d=o[s]||[],u=await Promise.all(d.filter(Boolean).map(e=>x(e,l,a,r,i,t)));return"$and"===s?(0,n.every)(u,e=>e):!u.length||(0,n.some)(u,e=>e)},x=async(e,t,o,l,n,a)=>"$and"in e||"$or"in e?await h({ruleGroup:e,variables:t,localVariables:o,conditionType:n},a):"advanced"===n?v(e,t,o,a):_(e,t,o,l,a),v=async(e,t,o,l)=>{let n=e.op,a=await m(e.rightVar,t,o),r=await m(e.leftVar,t,o);return!n||l.apply({[n]:[r,a]})},_=async(e,t,o,n,a)=>{let r=c(e),u=null==r?void 0:r.key;if(!u)return!0;let m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$nForm";return`{{ ${t}.${e.join(".")} }}`}(p(e),n),h=t.parseVariable(m,o,{doNotRequest:!0}).then(e=>{let{value:t}=e;return t}),x=(0,i.DZ)(null==r?void 0:r.value)?[t.parseVariable(null==r?void 0:r.value,o).then(e=>{let{value:t}=e;return t}),h]:[null==r?void 0:r.value,h];try{let[e,n]=await Promise.all(x),r=await t.getCollectionField(m,o),i=(0,s.A)(n,{targetCollectionField:r}),c=(0,s.A)(e,{targetCollectionField:r});if((null==r?void 0:r.type)&&["datetime","date","datetimeNoTz","dateOnly","unixTimestamp"].includes(r.type)&&i){let e=(0,d.Pn)(c),t=(0,l.getPickerFormat)(e);i=(0,l.dayjs)(i).format(t)}return a.apply({[u]:[i,c]})}catch(e){throw e}};async function f(e,t,o,n,i,s){if(t&&"handlebars"===e){l.Handlebars.registerHelper("t",function(e){if("string"==typeof e)return s(e,{ns:r.z})});try{var d,u;let e,a=t.replace(/{{\s*}}/g,'{{"{{}}"}}'),r=l.Handlebars.compile(a),s=(e={},n.map(t=>{e[t.name]=t.ctx}),e),{$nDate:c}=(null==o||null==(d=o.ctxRef)?void 0:d.current)||{},p={};Object.keys(c||{}).map(e=>{p[e]=c[e]()});let m=r({...null==o||null==(u=o.ctxRef)?void 0:u.current,...s,$nDate:p});return console.log(m),await i(m)}catch(e){return/VariablesProvider: .* is not found/.test(e.message)||console.log(e),console.log(t),t}}try{let e=await (0,a.replaceVariableValue)(t,o,n);return await i(e)}catch(e){return/VariablesProvider: .* is not found/.test(e.message)||console.log(e),t}}},84951(e,t,o){o.d(t,{A:()=>g});var l=o(71178),n=o(56920),a=o(77583),r=o(51649),i=o(44388),s=o(51275),d=o(22204),u=o(3012),c=o(52570),p=o(95951);let m={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:{}}}}}}}};var h=o(49621),x=o(30644),v=o(39888);let _=e=>"Action.Container"===e["x-component"],f=e=>{let{WrappedComponent:t,...o}=e,i=(0,n.useFieldSchema)(),{openPopup:s}=(0,u.Hy)(),d=(0,r.useRef)(!1),c=(()=>{let e=(0,n.useFieldSchema)(),{insertAfterBegin:t}=(0,p.er)();return(0,r.useCallback)(o=>{e.reduceProperties((e,t)=>"Action.Container"===t["x-component"]?t:e,null)||t((0,a.cloneDeep)(o))},[e,t])})(),h=(0,r.useRef)(i);h.current=i;let x=(0,r.useRef)(c);x.current=c;let v=(0,r.useRef)(s);v.current=s;let _=(0,r.useCallback)(()=>h.current,[]),f=(0,r.useCallback)(()=>{h.current.properties||(x.current(m),d.current=!0),d.current?(setTimeout(()=>{v.current({customActionSchema:_()})}),d.current=!1):h.current.properties&&v.current()},[_]),g=(0,r.useMemo)(()=>(0,a.debounce)(f,600,{leading:!0,trailing:!1}),[f]);return(0,r.useEffect)(()=>()=>{g.cancel()},[g]),(0,l.jsx)("a",{onClick:g,children:(0,l.jsx)(t,{...o})})};function g(e){return t=>{let[o,a]=(0,r.useState)(!1),[p,m]=(0,r.useState)(!1),g=(0,h.Ge)(),b=(0,s.D5)(),y=(0,n.useField)(),S=(0,n.useFieldSchema)(),{enableLink:k,openMode:C,openSize:M}=(null==S?void 0:S["x-component-props"])||{},{visibleWithURL:w,setVisibleWithURL:F}=(0,u.Hy)(),P=(0,r.useCallback)(e=>{null==a||a(e),null==F||F(e)},[F]);(0,r.useRef)(S).current=S;let{setSubmitted:j}=b;return k?(0,l.jsx)(i.OC,{visible:!1,children:(0,l.jsxs)(d.z4,{button:(0,l.jsx)(e,{...t}),visible:o||w,setVisible:P,formValueChanged:p,setFormValueChanged:m,openMode:C,openSize:M,containerRefKey:"field-popup",fieldSchema:S,setSubmitted:j,children:[(0,l.jsx)(h.Yz,{name:g.name,children:(0,l.jsx)(c.t,{children:(0,l.jsx)(v.P3,{children:(0,l.jsx)(x.dw,{onlyRenderProperties:!0,basePath:null==y?void 0:y.address,schema:S,filterProperties:_})})})}),(0,l.jsx)(f,{...t,WrappedComponent:e})]})}):(0,l.jsx)(e,{...t})}}},63557(e,t,o){o.d(t,{u:()=>l});let l=(0,o(51649).createContext)({});l.displayName="SchemaComponentContext.Provider"},71915(e,t,o){o.d(t,{O:()=>u});var l=o(71178),n=o(44814),a=o(56920),r=o(51649),i=o(52570);let s=e=>{let{children:t,form:o,...n}=e,s=(0,r.useContext)(a.SchemaOptionsContext),d=(0,r.useContext)(a.SchemaExpressionScopeContext),u={...null==s?void 0:s.scope,...d},c={...null==s?void 0:s.components};return(0,l.jsx)(a.FormProvider,{...n,form:o,children:(0,l.jsx)(i.t,{components:c,scope:u,children:t})})},d=e=>{let{children:t,...o}=e,s=(0,r.useContext)(a.SchemaOptionsContext),d=(0,r.useContext)(a.SchemaExpressionScopeContext),u={...null==s?void 0:s.scope,...d},c={...null==s?void 0:s.components},p=(0,r.useMemo)(()=>(0,n.createForm)(),[]);return(0,l.jsx)(a.FormProvider,{...o,form:p,children:(0,l.jsx)(i.t,{components:c,scope:u,children:t})})},u=e=>e.form?(0,l.jsx)(s,{...e}):(0,l.jsx)(d,{...e})},86073(e,t,o){o.d(t,{D:()=>x});var l=o(71178),n=o(44814),a=o(56920),r=o(52793),i=o(51649),s=o(43353);o(67285);var d=o(16319),u=o(71915),c=o(93726),p=o(16211);let m=e=>e,h=e=>{let{noForm:t,onlyRenderProperties:o,hidden:h,scope:x,uid:v,components:_,onSuccess:f,NotFoundPage:g,schemaTransform:b=m,onPageNotFind:y}=e,S=(0,i.useMemo)(()=>(0,n.createForm)(),[v]),{schema:k,loading:C}=(e=>{let{uid:t,type:o="getJsonSchema",onSuccess:l}=e,n={url:`/uiSchemas:${o}/${t}`},{data:a,loading:r}=(0,p.bP)(n,{refreshDeps:[t],onSuccess(e){l&&l(e)}});return{schema:null==a?void 0:a.data,loading:r}})({uid:v,type:o?"getProperties":"getJsonSchema",onSuccess:e=>{f&&f(e)}}),M=(0,d.xZ)(g),w=(0,s.RH)(),F=(0,a.useFieldSchema)(),P=(0,i.useMemo)(()=>b(k||{}),[k,b]),j=!k||0===Object.keys(k).length;return((0,i.useEffect)(()=>{w||C||h||!j||!y||y()},[w,h,C,y,j]),w||C||h)?(0,l.jsx)(r.Spin,{style:{width:"100%",marginTop:20},delay:void 0}):j?M?(0,l.jsx)(M,{}):null:t?(0,l.jsx)(c.H,{components:_,scope:x,schema:P,parentSchema:F}):(0,l.jsx)(u.O,{form:S,children:(0,l.jsx)(c.H,{components:_,scope:x,schema:P,parentSchema:F})})},x=(0,i.memo)(e=>e.uid?(0,l.jsx)(h,{...e}):null);x.displayName="RemoteSchemaComponent"},93726(e,t,o){o.d(t,{D:()=>c,H:()=>h});var l=o(71178),n=o(56920),a=o(77583),r=o(51649),i=o(30644),s=o(63557),d=o(52570);function u(e){return n.Schema.isSchemaInstance(e)?e:new n.Schema((null==e?void 0:e.name)?{type:"object",properties:{[e.name]:e},name:`p_${e.name}`}:e)}let c=(0,r.createContext)({onChange:a.default.noop}),p=(0,r.memo)(e=>{let{components:t,scope:o,schema:n,distributed:p,onChange:m,parentSchema:h,...x}=e,v=(0,r.useContext)(s.u),_=(0,r.useMemo)(()=>u(n),[n]),f=(0,r.useMemo)(()=>({...v,distributed:!1!=v.distributed&&p,refresh:v.refresh||a.default.noop}),[v,p]),{onChange:g}=(0,r.useContext)(c),b=(0,r.useMemo)(()=>({onChange:()=>{null==m||m(_),null==g||g()}}),[m,g,_]);return(0,l.jsx)(c.Provider,{value:b,children:(0,l.jsx)(s.u.Provider,{value:f,children:(0,l.jsx)(d.t,{inherit:!0,components:t,scope:o,children:(0,l.jsx)(i.dw,{...x,schema:_,isUseFormilyField:!0,parentSchema:h})})})})});p.displayName="RecursionSchemaComponent";let m=(0,r.memo)(e=>{let{schema:t,parentSchema:o,...n}=e,a=(0,r.useMemo)(()=>u(t),[]);return(0,l.jsx)(p,{...n,schema:a,parentSchema:o})});m.displayName="MemoizedSchemaComponent";let h=(0,r.memo)(e=>{let{memoized:t,...o}=e;return t?(0,l.jsx)(m,{...o}):(0,l.jsx)(p,{...o})});h.displayName="SchemaComponent"},52570(e,t,o){o.d(t,{M:()=>r,t:()=>i});var l=o(71178),n=o(56920),a=o(51649);let r=()=>(0,a.useContext)(n.SchemaOptionsContext)||{},i=(0,a.memo)(e=>{let{children:t}=e,o=r(),i=(0,a.useMemo)(()=>({...o.components,...e.components}),[o.components,e.components]),s=(0,a.useMemo)(()=>({...o.scope,...e.scope}),[o.scope,e.scope]),d=(0,a.useMemo)(()=>({scope:s,components:i}),[s,i]);return(0,l.jsx)(n.SchemaOptionsContext.Provider,{value:d,children:(0,l.jsx)(n.SchemaComponentsContext.Provider,{value:i,children:(0,l.jsx)(n.ExpressionScope,{value:s,children:t})})})});i.displayName="SchemaComponentOptions"},90995(e,t,o){o.d(t,{OA:()=>P,DY:()=>v.D,GD:()=>A,Do:()=>_.D,Mq:()=>f.M,t6:()=>f.t,Hv:()=>_.H,Op:()=>x.O,N3:()=>h});var l=o(71178),n=o(82113),a=o(52793),r=o(51649),i=o(77843),s=o(82924),d=o(49948),u=o(90236),c=o(504);let p={backgroundColor:"var(--colorSettings) !important"},m={backgroundColor:"transparent"},h=e=>{let{designable:t,setDesignable:o}=(0,s.erX)(),{t:r}=(0,i.useTranslation)(),{token:h}=(0,d.K)(),{isMobileLayout:x}=(0,u.mY)(),v=(0,c.useFlowEngine)();return((0,ec.useHotkeys)("Ctrl+Shift+U",()=>o(!t),[t]),x)?null:(0,l.jsx)(a.Tooltip,{title:r("UI Editor"),children:(0,l.jsx)(a.Button,{"data-testid":"ui-editor-button",icon:(0,l.jsx)(n.HighlightOutlined,{style:{color:h.colorTextHeaderMenu}}),title:r("UI Editor"),style:{...t?p:m,...e.style},onClick:async()=>{let e=!t;o(e),x||!e?await v.flowSettings.disable():await v.flowSettings.enable()}})})};var x=o(71915),v=o(86073),_=o(93726),f=o(52570),g=o(44814),b=o(56920),y=o(27404),S=o(77583),k=o(63557),C=o(17157);let M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return`${e}${(0,y.uid)()}`};b.Schema.silent(!0);let w={},F={silent:!0,compile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=()=>{if(!F.silent)return Function("$root",`with($root) { return (${e}); }`)(t);try{return Function("$root",`with($root) { return (${e}); }`)(t)}catch{return`{{${e}}}`}};return w[e]?w[e]:e.trim().startsWith("t(")?(w[e]=o(),w[e]):o()}};b.Schema.registerCompiler(F.compile);let P=e=>{let{designable:t,onDesignableChange:o,components:n,children:a}=e,s=(0,r.useContext)(k.u),d=(0,f.M)(),[u,c]=(0,r.useState)(()=>(0,y.uid)()),p=(0,r.useMemo)(()=>e.form||(0,g.createForm)(),[u]),{t:m}=(0,i.useTranslation)(),h=(0,C.nm)(),x=(0,r.useMemo)(()=>({...e.scope,t:m,randomString:M}),[e.scope,m,null==d?void 0:d.scope]),[v,_]=(0,r.useState)(t),w=(0,r.useMemo)(()=>"boolean"==typeof t?t:v,[t,v,s.designable]),F=(0,r.useMemo)(()=>e=>{"boolean"!=typeof w&&_(e),null==o||o(e)},[w,o]);(0,r.useEffect)(()=>{let e=!1;return(async()=>{var t,o,l,n;if(!w)return await (null==(o=h.flowEngine)||null==(t=o.flowSettings)?void 0:t.disable());e||await (null==(n=h.flowEngine)||null==(l=n.flowSettings)?void 0:l.enable())})(),()=>{e=!0}},[h,w]);let P=(0,r.useCallback)(()=>{c((0,y.uid)())},[]),j=(0,r.useMemo)(()=>({scope:x,components:n,reset:P,refresh:S.default.noop,designable:w,setDesignable:F}),[n,w,P,x,F]);return(0,l.jsx)(k.u.Provider,{value:j,children:(0,l.jsx)(b.FormProvider,{form:p,children:(0,l.jsx)(f.t,{inherit:!0,scope:x,components:n,children:a})})})};P.displayName="SchemaComponentProvider";var j=o(83468);class A extends j.k{async load(){this.addComponents()}addComponents(){this.app.addComponents({DesignableSwitch:h})}}},16319(e,t,o){o.d(t,{Us:()=>_,TD:()=>n,F:()=>c.F,px:()=>i.px,QI:()=>i.QI,d1:()=>i.d1,xB:()=>h,YY:()=>f.Y,Lj:()=>g.Lj,er:()=>i.er,xZ:()=>r.x,OJ:()=>u,mh:()=>g.mh,lu:()=>a.l,kB:()=>i.kB,Hb:()=>s.H,a9:()=>g.a9,jE:()=>b.j});var l=o(51649);let n=e=>{let t=(0,l.useRef)(null);return(0,l.useEffect)(()=>(t.current&&e!==t.current&&t.current.onUnmount(),t.current=e,e.onMount(),()=>{e.onUnmount()}),[e]),e};var a=o(61013),r=o(57619),i=o(95951),s=o(87463),d=o(56920);let u=e=>{let t=(0,l.useContext)(d.SchemaOptionsContext),o=(0,l.useContext)(d.SchemaExpressionScopeContext),n=(0,l.useRef)();return n.current=o,e.toFieldProps({...t,get scope(){return{...t.scope,...n.current}}})};var c=o(39247),p=o(77843),m=o(43288);let h=()=>{var e;let{getCollectionJoinField:t,getCollection:o}=(0,m.nj)(),n=(0,d.useFieldSchema)(),{getField:a}=(0,m.k7)(),r=a(n.name)||t(n["x-collection-field"]),{t:i}=(0,p.useTranslation)(),{label:s}=(null==(e=n["x-component-props"])?void 0:e.fieldNames)||{};return(0,l.useMemo)(()=>{if(!r||!(null==r?void 0:r.interface)||!["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(r.interface))return;let e=o(r.target);if((null==e?void 0:e.template)==="file")return[{label:i("Record picker"),value:"CollectionField"},{label:i("Select"),value:"AssociationSelect"}];switch(r.interface){case"o2m":return[{label:i("Record picker"),value:"CollectionField"},{label:i("Subtable"),value:"TableField"},{label:i("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:i("Record picker"),value:"CollectionField"},{label:i("Select"),value:"AssociationSelect"}];default:return[{label:i("Record picker"),value:"CollectionField"},{label:i("Subform"),value:"FormField"},{label:i("Select"),value:"AssociationSelect"}]}},[i,null==r?void 0:r.interface,s])};var x=o(26174),v=o(49621);let _=()=>{var e;let t=(0,d.useField)(),o=(0,d.useFieldSchema)(),n=(0,v.Ge)(),r=(0,x.r2)(),i=(null==n?void 0:n.getField(o.name))||(null==r?void 0:r.getCollectionField(o["x-collection-field"])),s=(0,a.l)();(0,l.useEffect)(()=>{if(!(null==t?void 0:t.title)){var e;t.title=s(null==i||null==(e=i.uiSchema)?void 0:e.title)}},[null==i||null==(e=i.uiSchema)?void 0:e.title])};var f=o(4922),g=o(62152),b=o(81547)},62152(e,t,o){o.d(t,{Lj:()=>f,a9:()=>_,mh:()=>v});var l=o(56920),n=o(71883),a=o(52793),r=o(77583),i=o(51649),s=o(38356),d=o(95951),u=o(44374),c=o(73761),p=o(70892),m=o(38131);let h=e=>{let t=g((0,l.useFieldSchema)()),o=(e=>{var t,o,l,n;let{token:r}=a.theme.useToken(),{designable:i}=(0,d.er)(),{heightProps:u}=(0,c.useBlockHeightProps)(),p=(0,s.useLocation)(),{disablePageHeader:m,enablePageTabs:h,hidePageTitle:x}=e||u||{},v=r.sizeXXL-2,_=i?r.controlHeight+2*r.paddingContentHorizontalLG:+r.paddingContentHorizontalLG;return v+(t=m,o=h,l=x,n=r,p.pathname.includes("/popups/")?2*n.paddingContentVertical+22+n.paddingPageVertical:t?n.paddingContentHorizontalLG:l?o?n.controlPaddingHorizontal+3*n.controlPaddingHorizontalSM+22+n.paddingContentHorizontalLG:n.paddingContentHorizontalLG+12:o?n.paddingSM+n.controlHeight+n.marginXS+2*n.controlPaddingHorizontalSM+22+n.paddingContentHorizontalLG:n.controlHeight+n.marginXS+(n.paddingContentVertical+2)*2+n.paddingContentHorizontalLG)+_})(e),n=(()=>{let{token:e}=a.theme.useToken(),{designable:t}=(0,d.er)();return e.paddingContentVerticalLG+e.margin+2*e.paddingContentVertical+24+(t?e.controlHeight+2*e.paddingContentHorizontalLG:+e.paddingContentHorizontalLG)})();return t?n:o},x=["workflowManualTasks","approvals","approvalRecords"],v=e=>{let{heightProps:t}=(0,c.useBlockHeightProps)(),o=h(),{heightMode:l,height:n,title:a,titleHeight:r}=t||{};if((null==t?void 0:t.heightMode)&&l!==m.D.DEFAULT){if(l===m.D.FULL_HEIGHT){let t=window.innerHeight-o;return(null==e?void 0:e.removeBlockHeaderHeight)&&(t-=a?r:0),(null==e?void 0:e.innerExtraHeight)&&(t-=e.innerExtraHeight),t}return n}},_=()=>{let e=(0,l.useFieldSchema)(),t=(0,i.useMemo)(()=>(0,c.getPageSchema)(e),[]),{disablePageHeader:o,enablePageTabs:n,hidePageTitle:a}=(null==t?void 0:t["x-component-props"])||{},r={...null==e?void 0:e["x-component-props"],disablePageHeader:o,enablePageTabs:n,hidePageTitle:a},s=h(r),{heightMode:d,height:u}=r||{};if((null==r?void 0:r.heightMode)&&d!==m.D.DEFAULT)return d===m.D.FULL_HEIGHT?window.innerHeight-s:u},f=()=>{let[e,t]=(0,i.useState)(),o=(0,i.useRef)(null),s=(()=>{var e;let{token:t}=a.theme.useToken(),{heightProps:o}=(0,c.useBlockHeightProps)(),{heightProps:n}=(0,p.El)(),{designable:r}=(0,d.er)(),i=(0,l.useFieldSchema)(),s=n||o,{titleHeight:v}=o,_=h(s),{name:f}=(0,u.useCollection)(),{heightMode:g,height:b,title:y}=s;if(!(null==s?void 0:s.heightMode)||g===m.D.DEFAULT)return;let S=Object.keys((null==(e=i.parent.properties.actions)?void 0:e.properties)||{}).length>0,k=t.controlHeight+t.padding+t.marginLG,C=S||r?t.controlHeight+2*t.marginLG:t.marginLG,M=(r&&!x.includes(f)?t.controlHeight:22)+2*t.padding+1,w=y?v:0;return g===m.D.FULL_HEIGHT?window.innerHeight-_-w-M-C-k:b-w-C-M-k})(),v=(0,i.useCallback)((0,r.debounce)(()=>{var e;if(!o.current)return;let l=o.current.getBoundingClientRect();(null==(e=o.current.querySelector(".ant-table"))?void 0:e.getBoundingClientRect())&&t(l.width)},100),[s]),_=(0,i.useCallback)(e=>{o.current=e&&e.children?e.children[0]:null,v()},[v]);return(0,n.useEventListener)("resize",v),{height:s,width:e,tableSizeRefCallback:_}},g=e=>{if(!e)return null;if("Action.Container"===e["x-component"]){var t,o;return(null==e||null==(o=e.parent)||null==(t=o["x-component-props"])?void 0:t.openMode)!=="page"}return g(e.parent)}},61013(e,t,o){o.d(t,{l:()=>r});var l=o(56920),n=o(51649);let a={},r=function(){let{noCache:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{noCache:!1},t=(0,n.useContext)(l.SchemaOptionsContext),o=(0,n.useContext)(l.SchemaExpressionScopeContext);return(r,i)=>{var s,d;let u,c=!1;if("string"==typeof r&&r.startsWith("{{")&&(c=!0,u=r),r&&"object"==typeof r&&!(0,n.isValidElement)(r)){try{u=JSON.stringify(r)}catch(e){return console.warn("Failed to stringify:",e),r}if(a[u])return a[u];s=u,c=/{{.*?}}/g.test(s)}if(Array.isArray(r)){try{u=JSON.stringify(r)}catch(e){return console.warn("Failed to stringify:",e),r}if(a[u])return a[u];d=u,c=/{{.*?}}/g.test(d)}if(c){let n={...null==t?void 0:t.scope,...o,...i};if(!u)return l.Schema.compile(r,n);try{if(e)return l.Schema.compile(r,n);return a[u]=a[u]||l.Schema.compile(r,n),a[u]}catch(e){return console.log("useCompile error",r,e),l.Schema.compile(r,n)}}return r}}},57619(e,t,o){o.d(t,{x:()=>r});var l=o(56920),n=o(77583),a=o(51649);let r=(e,t)=>{let{components:o}=(0,a.useContext)(l.SchemaOptionsContext);return e?"string"!=typeof e?e:(0,n.get)(o,e)||t:t}},95951(e,t,o){o.d(t,{er:()=>F,px:()=>g,QI:()=>w,d1:()=>M,kB:()=>k});var l=o(71178),n=o(56920),a=o(27404),r=o(71883),i=o(52793),s=o(13791),d=o(93656),u=o(20148),c=o(51649),p=o(77843),m=o(16211),h=o(30644),x=o(88448),v=o(63557),_=JSON.parse('{"rE":"2.2.0-beta.8"}'),f=o(13975);function g(e){return new M(e)}let b=e=>{e&&(e["x-uid"]||(e["x-uid"]=(0,a.uid)()),Object.keys(e.properties||{}).forEach(t=>{b(e.properties[t])}))},y=e=>e,S=(e,t)=>{if(e&&t){for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&t[o]!==(null==e?void 0:e[o]))return!1;return!0}},k=(e,t)=>{if(e["x-uid"]&&e["x-uid"]===t["x-uid"])return[null,e.toJSON()];let o=e.toJSON(),l={...o,properties:{}},n=null,a=(e,o)=>{Object.keys(e||{}).forEach(l=>{let r=e[l];if(r["x-uid"]===t["x-uid"]){n=e[l];return}o.properties[l]={...r,properties:{}},a(null==r?void 0:r.properties,o.properties[l])})};return a(o.properties,l),[l,n]},C=e=>e;class M{get model(){return this.options.model}get query(){return this.options.query}loadAPIClientEvents(){let{api:e,t=C}=this.options;if(!e)return;let o=e=>{if(!e)return[];let t=Object.values(e.properties).length,o=[];return(e.mapProperties(e=>{e["x-component-props"]=e["x-component-props"]||{},e["x-component-props"].width=100/t,e["x-uid"]&&o.push({"x-uid":e["x-uid"],"x-component-props":e["x-component-props"]})}),e["x-uid"]&&o.length)?o:[]};this.on("insertAdjacent",async l=>{var n;let{onSuccess:a,current:r,position:s,schema:d,wrap:u,wrapped:c,removed:p}=l,m=[];if((null==c?void 0:c["x-component"])==="Grid.Col"&&(m=m.concat(o(c.parent))),(null==p?void 0:p["x-component"])==="Grid.Col"&&(m=m.concat(o(p.parent))),this.refresh(),!r["x-uid"])return;let h=await e.request({url:`/uiSchemas:insertAdjacent/${r["x-uid"]}?position=${s}`,method:"post",data:{schema:function e(t,o){if(t)return t["x-app-version"]||(t["x-app-version"]=o),Object.keys(t.properties||{}).forEach(l=>{var n;e(null==(n=t.properties)?void 0:n[l],o)}),t}(d,this.appVersion),wrap:u}});m.length&&await e.request({url:"/uiSchemas:batchPatch",method:"post",data:m}),(null==p?void 0:p["x-uid"])&&await e.request({url:`/uiSchemas:remove/${p["x-uid"]}`,method:"post"}),null==a||a(null==h||null==(n=h.data)?void 0:n.data),i.message.success(t("Saved successfully"),.2)}),this.on("patch",async o=>{let{schema:l}=o;this.refresh(),(null==l?void 0:l["x-uid"])&&(await e.request({url:"/uiSchemas:patch",method:"post",data:{...l}}),i.message.success(t("Saved successfully"),.2))}),this.on("initializeActionContext",async t=>{let{schema:o}=t;(null==o?void 0:o["x-uid"])&&await e.request({url:"/uiSchemas:initializeActionContext",method:"post",data:{...o}})}),this.on("batchPatch",async o=>{let{schemas:l}=o;this.refresh(),await e.request({url:"/uiSchemas:batchPatch",method:"post",data:l}),i.message.success(t("Saved successfully"),.2)}),this.on("remove",async l=>{let{removed:n}=l,a=[];(null==n?void 0:n["x-component"])==="Grid.Col"&&(a=o(n.parent)),this.refresh(),(null==n?void 0:n["x-uid"])&&(await e.request({url:`/uiSchemas:remove/${n["x-uid"]}`,method:"post"}),a.length&&await e.request({url:"/uiSchemas:batchPatch",method:"post",data:a}),i.message.success(t("Saved successfully"),.2))})}prepareProperty(e){e.type||(e.type="void"),e.name||(e.name=(0,a.uid)()),this.current["x-uid"]&&b(e)}on(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}async emit(e){for(var t=arguments.length,o=Array(t>1?t-1:0),l=1;l<t;l++)o[l-1]=arguments[l];if(!this.events[e])return;let[n,...a]=o;return Promise.all(this.events[e].map(e=>e.bind(this)({current:this.current,...n},...a)))}parentsIn(e){if(!e||!n.Schema.isSchemaInstance(e))return!1;let t=this.current;for(;null==t?void 0:t.parent;){if(t.parent===e)return!0;t=t.parent}return!1}refresh(e){let{refresh:t}=this.options;return null==t?void 0:t(e)}deepMerge(e){let t={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"},o={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(e).forEach(l=>{t[l]?(this.current[l]=e[l],this.updateModel(t[l],e[l])):o[l]?Object.keys(e[l]).forEach(t=>{(0,u.default)(this.current,[l,t],e[l][t]),this.updateModel([o[l],t],e[l][t])}):this.current[l]=e[l]}),this.emit("patch",{schema:e})}getSchemaAttribute(e,t){return(0,d.default)(this.current,e,t)}shallowMerge(e){let t={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(e).forEach(o=>{this.current[o]=e[o],t[o]&&this.updateModel(t[o],e[o])}),this.emit("patch",{schema:e})}updateModel(e,t){let o=o=>{(0,u.default)(o,e,t)};this.model&&o(this.model),this.query&&this.query.take(o)}insertAdjacent(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};switch(e){case"beforeBegin":return this.insertBeforeBegin(t,o);case"afterBegin":return this.insertAfterBegin(t,o);case"beforeEnd":return this.insertBeforeEnd(t,o);case"afterEnd":return this.insertAfterEnd(t,o)}}recursiveRemoveIfNoChildren(e,t){let o;if(!e)return;let l=e,n=null==t?void 0:t.breakRemoveOn;for(;l;){if("function"==typeof n){if(n(l))break}else if(S(l,n))break;if(Object.keys(l.properties||{}).length>0)break;l.parent&&(o=l.parent.removeProperty(l.name)),l=l.parent}return o}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{breakRemoveOn:o,removeParentsIfNoChildren:l}=t,n=e||this.current,a=n.parent.removeProperty(n.name);if(l){let e=this.recursiveRemoveIfNoChildren(n.parent,{breakRemoveOn:o});e&&(a=e)}return this.emit("remove",{removed:a})}removeWithoutEmit(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{breakRemoveOn:o,removeParentsIfNoChildren:l}=t,n=e||this.current,a=n.parent.removeProperty(n.name);if(l){let e=this.recursiveRemoveIfNoChildren(n.parent,{breakRemoveOn:o});e&&(a=e)}return a}insertBeforeBeginOrAfterEnd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.Schema.isSchemaInstance(this.current)||!n.Schema.isSchemaInstance(e)||this.current.parent!==e.parent)return;let o=0,l=0;return this.current.parent.mapProperties((t,n,a)=>{this.current.name===n&&(l=a),e.name===n&&(o=a)}),o>l?this.insertBeforeBegin(e,t):this.insertAfterEnd(e,t)}insertBeforeBegin(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.Schema.isSchemaInstance(this.current))return;let o={onSuccess:t.onSuccess},{wrap:l=y,breakRemoveOn:r,removeParentsIfNoChildren:i}=t;if(n.Schema.isSchemaInstance(e)){if(this.parentsIn(e))return void this.emit("error",{code:"parent_is_not_allowed",schema:e});e.parent.removeProperty(e.name),i&&(o.removed=this.recursiveRemoveIfNoChildren(e.parent,{breakRemoveOn:r}))}else e&&(e=(0,s.default)(e));let d={},u=!1,c=0,p=0;this.current.parent.mapProperties((e,t)=>{t===this.current.name&&(p=c,u=!0,++c),e["x-index"]=c,++c,u&&(d[t]=e,this.current.parent.removeProperty(t))}),this.prepareProperty(e);let m=l(e),h=this.current.parent.addProperty(m.name||(0,a.uid)(),m);h["x-index"]=p,h.parent=this.current.parent,this.current.parent.setProperties(d);let[x,v]=k(h,e);this.emit("insertAdjacent",{position:"beforeBegin",schema:v,wrapped:m,wrap:x,...o})}insertAfterBegin(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.Schema.isSchemaInstance(this.current))return;let o={onSuccess:t.onSuccess},{wrap:l=y,breakRemoveOn:r,removeParentsIfNoChildren:i}=t;if(n.Schema.isSchemaInstance(e)){if(this.parentsIn(e))return void this.emit("error",{code:"parent_is_not_allowed",schema:e});e.parent.removeProperty(e.name),i&&(o.removed=this.recursiveRemoveIfNoChildren(e.parent,{breakRemoveOn:r}))}else e&&(e=(0,s.default)(e));let d={},u=1;this.current.mapProperties((e,t)=>{e["x-index"]=u,++u,d[t]=e}),this.current.properties={},this.prepareProperty(e);let c=l(e),p=this.current.addProperty(c.name||(0,a.uid)(),c);p["x-index"]=0,p.parent=this.current,this.current.setProperties(d);let[m,h]=k(p,e);this.emit("insertAdjacent",{position:"afterBegin",schema:h,wrap:m,wrapped:c,...o})}insertBeforeEnd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.Schema.isSchemaInstance(this.current))return;delete e["x-index"];let o={onSuccess:t.onSuccess},{wrap:l=y,breakRemoveOn:r,removeParentsIfNoChildren:i}=t;if(n.Schema.isSchemaInstance(e)){if(this.parentsIn(e))return void this.emit("error",{code:"parent_is_not_allowed",schema:e});e.parent.removeProperty(e.name),i&&(o.removed=this.recursiveRemoveIfNoChildren(e.parent,{breakRemoveOn:r}))}else e&&(e=(0,s.default)(e));this.prepareProperty(e);let d=l(e),u=this.current.addProperty(d.name||(0,a.uid)(),d);u.parent=this.current;let[c,p]=k(u,e);return this.emit("insertAdjacent",{position:"beforeEnd",schema:p,wrap:c,wrapped:d,...o})}insertAfterEnd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.Schema.isSchemaInstance(this.current))return;let o={onSuccess:null==t?void 0:t.onSuccess},{wrap:l=y,breakRemoveOn:r,removeParentsIfNoChildren:i}=t,d=0,u=0,c=!1,p={};if(this.current.parent.mapProperties((e,t)=>{e["x-index"]=d,t===this.current.name&&(u=++d,c=!0),++d,c&&t!==this.current.name&&(p[t]=e,this.current.parent.removeProperty(t))}),n.Schema.isSchemaInstance(e)){if(this.parentsIn(e))return void this.emit("error",{code:"parent_is_not_allowed",schema:e});e.parent.removeProperty(e.name),i&&(o.removed=this.recursiveRemoveIfNoChildren(e.parent,{breakRemoveOn:r})),e.parent=null}else e&&(e=(0,s.default)(e));this.prepareProperty(e);let m=l(e),h=this.current.parent.addProperty(m.name||(0,a.uid)(),m);h.parent=this.current.parent,h["x-index"]=u,this.current.parent.setProperties(p);let[x,v]=k(h,e);this.emit("insertAdjacent",{position:"afterEnd",schema:v,wrap:x,wrapped:m,...o})}constructor(e){this.events={},this.options=e,this.current=e.current,this.appVersion=e.appVersion}}function w(){let e=(0,c.useContext)(n.SchemaOptionsContext),t=(0,c.useMemo)(()=>(null==e?void 0:e.components)||{},[e]);return e=>{if(!e)return null;if("string"!=typeof e)return e;let o=(0,d.default)(t,e);return o||console.error(`[nocobase]: Component "${e}" not found`),o}}function F(){let{designable:e,setDesignable:t,refresh:o,reset:a}=(0,c.useContext)(v.u),i=(0,c.useContext)(n.SchemaOptionsContext),s=(0,c.useMemo)(()=>(null==i?void 0:i.components)||{},[i]),b=(0,c.useMemo)(()=>()=>(0,l.jsx)(l.Fragment,{}),[]),y=(0,r.useUpdate)(),S=(0,h.o8)(),k=(0,h.cQ)(),C=(0,c.useCallback)(e=>{null==o||o(),y(),null==S||S(e),null==k||k()},[o,y,S,k]),M=(0,n.useField)(),w=(0,n.useFieldSchema)(),F=(0,m.VB)(),{t:P}=(0,p.useTranslation)(),j=(0,c.useMemo)(()=>g({t:P,api:F,refresh:C,current:w,model:M,appVersion:_.rE}),[P,F,C,w,M]);(0,c.useEffect)(()=>{j.loadAPIClientEvents()},[j]);let{isMobileLayout:A}=(0,f.useMobileLayout)();return{dn:j,designable:!A&&e,reset:a,refresh:C,setDesignable:t,DesignableBar:b,findComponent:(0,c.useCallback)(e=>{if(!e)return null;if("string"!=typeof e)return e;let t=(0,d.default)(s,e);return(null==t?void 0:t[x.PE])??t},[d.default]),on:j.on.bind(j),patch:(0,c.useCallback)((e,t)=>{let o=e=>{Object.keys(e).forEach(t=>{let o=e[t];"title"===t&&(M.title=o,w.title=o),"x-decorator-props"===t&&(M.decoratorProps||(M.decoratorProps={}),w["x-decorator-props"]||(w["x-decorator-props"]={}),Object.keys(o).forEach(e=>{M.decoratorProps[e]=o[e],w["x-decorator-props"][e]=o[e]})),"x-component-props"===t&&(M.componentProps||(M.componentProps={}),w["x-component-props"]||(w["x-component-props"]={}),Object.keys(o).forEach(e=>{M.componentProps[e]=o[e],w["x-component-props"][e]=o[e]}))})};if("string"==typeof e){let l={};return(0,u.default)(l,e,t),o(l)}o(e),C()},[j]),shallowMerge:(0,c.useCallback)(e=>{j.shallowMerge(e)},[j]),deepMerge:(0,c.useCallback)(e=>{j.deepMerge(e)},[j]),remove:(0,c.useCallback)((e,t)=>{j.remove(e,t)},[j]),insertAdjacent:(0,c.useCallback)((e,t,o)=>{j.insertAdjacent(e,t,o)},[j]),insertBeforeBegin:(0,c.useCallback)(e=>{j.insertBeforeBegin(e)},[j]),insertAfterBegin:(0,c.useCallback)(e=>{j.insertAfterBegin(e)},[j]),insertBeforeEnd:(0,c.useCallback)(e=>{j.insertBeforeEnd(e)},[j]),insertAfterEnd:(0,c.useCallback)(e=>{j.insertAfterEnd(e)},[j])}}},87463(e,t,o){o.d(t,{H:()=>d});var l=o(56920),n=o(51649),a=o(99300),r=o(57619),i=o(95951);let s=()=>null;s.isNullComponent=!0;let d=()=>{let{designable:e}=(0,i.er)(),t=(0,l.useFieldSchema)(),o=(0,n.useMemo)(()=>t["x-designer"]||t["x-toolbar"]?t["x-designer"]||t["x-toolbar"]:t["x-settings"]?a.Bw:s,[t]),d=(0,r.x)(o);return e&&d||s}},81547(e,t,o){o.d(t,{j:()=>i});var l=o(56920),n=o(51649),a=o(77843),r=o(43288);let i=e=>{var t;let{t:o}=(0,a.useTranslation)(),{getCollectionJoinField:i,getCollection:s}=(0,r.nj)(),d=(0,l.useFieldSchema)(),u=(null==e?void 0:e.fieldSchema)||d,c=(0,l.useField)(),p=(0,l.useForm)(),m=(null==u?void 0:u["x-read-pretty"])||c.readPretty||p.readPretty,h=null==e?void 0:e.fieldSchema,{getField:x}=(0,r.k7)(),v=(null==e?void 0:e.collectionField)||x(u.name)||i(u["x-collection-field"]),{label:_}=(null==(t=u["x-component-props"])?void 0:t.fieldNames)||{};return((0,n.useMemo)(()=>{if(!v||!(null==v?void 0:v.interface)||!["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(v.type))return;let e=s(v.target);if((null==e?void 0:e.template)==="file")return m?[{label:o("Title"),value:"Select"},{label:o("File manager"),value:"FileManager"},{label:o("Tag"),value:"Tag"}]:[{label:o("Select"),value:"Select"},{label:o("Record picker"),value:"Picker"},{label:o("File manager"),value:"FileManager"}];if((null==e?void 0:e.template)==="tree"&&["m2m","o2m","m2o"].includes(v.interface))return m?[{label:o("Title"),value:"Select"},{label:o("Tag"),value:"Tag"},!h&&{label:o("Sub-details"),value:"Nester"},!h&&{label:o("Sub-table"),value:"SubTable"}]:[{label:o("Select"),value:"Select"},{label:o("Record picker"),value:"Picker"},!h&&["m2m","o2m"].includes(v.interface)&&{label:o("Sub-table"),value:"SubTable"},!h&&{label:o("Cascader Select"),value:"CascadeSelect"},!h&&{label:o("Sub-form"),value:"Nester"},{label:o("Sub-form(Popover)"),value:"PopoverNester"}];switch(v.interface){case"o2m":return m?[{label:o("Title"),value:"Select"},{label:o("Tag"),value:"Tag"},!h&&{label:o("Sub-table"),value:"SubTable"},!h&&{label:o("Sub-details"),value:"Nester"}]:[{label:o("Select"),value:"Select"},{label:o("Record picker"),value:"Picker"},!h&&{label:o("Sub-form"),value:"Nester"},{label:o("Sub-form(Popover)"),value:"PopoverNester"},!h&&{label:o("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return m?[{label:o("Title"),value:"Select"},{label:o("Tag"),value:"Tag"},!h&&{label:o("Sub-details"),value:"Nester"},!h&&{label:o("Sub-table"),value:"SubTable"}]:[{label:o("Select"),value:"Select"},{label:o("Record picker"),value:"Picker"},!h&&{label:o("Sub-table"),value:"SubTable"},!h&&{label:o("Sub-form"),value:"Nester"},{label:o("Sub-form(Popover)"),value:"PopoverNester"}];default:return m?[{label:o("Title"),value:"Select"},{label:o("Tag"),value:"Tag"},!h&&{label:o("Sub-details"),value:"Nester"}]:[{label:o("Select"),value:"Select"},{label:o("Record picker"),value:"Picker"},!h&&{label:o("Sub-form"),value:"Nester"},{label:o("Sub-form(Popover)"),value:"PopoverNester"}]}},[o,null==v?void 0:v.interface,_,m,h])||[]).filter(Boolean)}},4922(e,t,o){o.d(t,{Y:()=>n});let l=()=>({}),n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{useProps:t=l,...o}=e,n=t;"function"!=typeof t&&(n=l);let a=n();return{...o,...a}}},39247(e,t,o){o.d(t,{F:()=>a});var l=o(51649),n=o(63557);function a(){return(0,l.useContext)(n.u)}},82924(e,t,o){o.d(t,{iI7:()=>D.iI,a1G:()=>u.ShowFormData,yt2:()=>th.yt,flR:()=>r.fl,FVw:()=>nX.FV,FrL:()=>nv.Fr,CqQ:()=>L,$Eq:()=>T,ZB7:()=>nX.ZB,TrS:()=>th.Tr,sIN:()=>rk.sI,a2g:()=>u.getRenderContent,t6u:()=>c.t6,qIn:()=>lQ.qI,HPy:()=>r.HP,R_2:()=>lX.R_,doK:()=>D.do,bZ4:()=>r.bZ,pxY:()=>eu.px,pde:()=>lX.pd,CEt:()=>nv.CE,lum:()=>eu.lu,OpO:()=>c.Op,tO8:()=>r.tO,nxV:()=>nv.nx,TDj:()=>tG,xA9:()=>nX.xA,lNE:()=>aE.l,ud$:()=>e5,l46:()=>nh,X_:()=>u.DraggableContext,QD_:()=>nv.QD,ud1:()=>r.ud,Dgp:()=>D.Dg,tvd:()=>D.tv,QEB:()=>aN,X6x:()=>aF.X6,jZb:()=>tB,tn0:()=>lQ.tn,dF1:()=>oo.dF,kBD:()=>eu.kB,Gjn:()=>r.Gj,VFg:()=>aF.VF,Pnr:()=>nv.Pn,zN:()=>r.zN,dKS:()=>aj,LMh:()=>lX.LM,lTd:()=>ew,rlt:()=>eB,dWC:()=>tx.dW,cWk:()=>r.cW,Zy6:()=>th.Zy,PB5:()=>aO.PB,UTu:()=>nv.UT,jeY:()=>D.je,TB2:()=>r.TB,D6h:()=>nW,d9b:()=>oo.d9,fM:()=>tz,X43:()=>tU.X,uc_:()=>nT,pEl:()=>aO.pE,T$Q:()=>tU.T,GD6:()=>c.GD,mJi:()=>lX.mJ,C5g:()=>tq.C5,OJX:()=>eu.OJ,Bmi:()=>rs,u4V:()=>rz.u,lrV:()=>nv.lr,fDF:()=>a.fD,N$k:()=>e1.N$,_sT:()=>oo._s,rNg:()=>tO.rN,RhU:()=>r.Rh,Bnf:()=>oH,UyB:()=>e2,xq$:()=>D.xq,RB3:()=>aO.RB,I5x:()=>eR,hqJ:()=>lX.hq,XIK:()=>a8,m2w:()=>lO,ccy:()=>r$,NVg:()=>tq.NV,kDr:()=>D.kD,J3t:()=>tx.J3,d09:()=>r.d0,AG:()=>rg,Xjr:()=>oK,uwA:()=>e1.uw,KDQ:()=>em,$mi:()=>oT.$,L1H:()=>u.Sortable,QoO:()=>nv.Qo,q7s:()=>D.q7,Mp5:()=>u.DndContext,xB5:()=>eu.xB,B4G:()=>D.B4,YIz:()=>ap,$xS:()=>aU,o8F:()=>oG,qKt:()=>aO.qK,_OO:()=>oo._O,qy$:()=>nn,W1t:()=>th.W1,Z0V:()=>lQ.Z0,cGx:()=>nf,Q2z:()=>nv.Q2,YW0:()=>tF,HvB:()=>c.Hv,ic7:()=>nK,QpY:()=>D.Qp,tUM:()=>rx,oAT:()=>D.oA,zBI:()=>e7,gBz:()=>u.SortableProvider,eIh:()=>D.eI,i_r:()=>nN.i,DVX:()=>D.DV,b7u:()=>e1.b7,Mwt:()=>aO.Mw,Kql:()=>r.Kq,XOn:()=>D.XO,ozN:()=>aw.o,nu1:()=>tm.n,rTt:()=>rk.rT,eBw:()=>nJ,xZI:()=>eu.xZ,MIq:()=>r.MI,JaO:()=>nO,htN:()=>eU,Eaz:()=>r.E,qy5:()=>nc,IX0:()=>tO.IX,lSn:()=>tq.lS,BsJ:()=>e1.Bs,_22:()=>aR,sxL:()=>oC,xPi:()=>tm.x,b2W:()=>nq.b,sDQ:()=>aV,Xzy:()=>D.Xz,gt0:()=>az,QIX:()=>e4,i_F:()=>lJ,Ypd:()=>r.Yp,SOm:()=>e1.SO,VXI:()=>r.VX,nKd:()=>tR,N3p:()=>c.N3,dJT:()=>e1.dJ,vPC:()=>D.vP,a97:()=>eu.a9,TNL:()=>D.TN,xAQ:()=>tw,Qgm:()=>aF.Qg,RLS:()=>ar,OqW:()=>e1.Oq,j0_:()=>nM,zVE:()=>rS,yVm:()=>r.yV,B_g:()=>n_,Hbp:()=>eu.Hb,lhV:()=>D.lh,yGk:()=>e1.yG,QIi:()=>eu.QI,Q00:()=>aP,OAH:()=>c.OA,JQe:()=>D.JQ,xqq:()=>r.xq,zEg:()=>e6.z,wN6:()=>aw.w,fDM:()=>nv.fD,uUT:()=>tV,BCL:()=>rt.BC,D50:()=>r.D5,Fag:()=>eu.F,MoU:()=>r.Mo,wnJ:()=>e1.wn,ISS:()=>aF.IS,m$h:()=>t2,c_d:()=>e1.c_,Hi5:()=>rc,x1p:()=>nv.x1,DYS:()=>c.DY,U6o:()=>r.U6,LjE:()=>eu.Lj,l2i:()=>r.l2,Um:()=>e1.Um,Y2j:()=>tP,O$4:()=>aO.O$,G2C:()=>t9.G2,wA7:()=>rA,$t1:()=>D.$t,_bM:()=>oo._b,b6K:()=>oT.b,vzL:()=>nl,lNX:()=>oo.lN,rcl:()=>r.rc,gZ:()=>aO.gZ,msY:()=>nv.ms,U8O:()=>r.U8,Sh8:()=>r.Sh,mhY:()=>eu.mh,tXY:()=>tq.tX,Sc0:()=>oF,p9h:()=>ru,gBZ:()=>u.SortableContext,JDj:()=>rf,hbv:()=>nx,RD4:()=>nV.R,bee:()=>aO.be,PSc:()=>r.PS,hsK:()=>e6.h,oVU:()=>l7,IJ7:()=>D.IJ,f2z:()=>o1.f,OZ6:()=>aF.OZ,pA3:()=>e1.pA,$5j:()=>r.$5,J1:()=>D.J1,dVP:()=>u.DateFilterDynamicComponent,E76:()=>r.E7,j9R:()=>lZ,vjx:()=>nL,mz8:()=>nX.mz,Doh:()=>c.Do,vxQ:()=>l3,Us6:()=>eu.Us,UqM:()=>u.SortableItem,lVW:()=>A,f7I:()=>ry,ARu:()=>t1,TDH:()=>eu.TD,l6P:()=>ek,g9w:()=>e1.g9,s23:()=>tY,GjU:()=>r.nY,GmQ:()=>aO.Gm,skP:()=>ns,C4D:()=>nr,arW:()=>as,v93:()=>ri,Wis:()=>r.Wi,jE9:()=>eu.jE,dbD:()=>nB.d,Ff5:()=>D.Ff,gM2:()=>e1.gM,FZR:()=>lX.FZ,PnP:()=>rC.P,nlx:()=>eY,AQf:()=>lQ.AQ,FoY:()=>a$,w2W:()=>aO.w2,z45:()=>r.z4,bkX:()=>tK,jgC:()=>rr,Ur4:()=>rP,lE3:()=>D.lE,U5u:()=>D.U5,LtX:()=>r.Lt,cl6:()=>a_,d1R:()=>eu.d1,rrz:()=>tx.rr,B8B:()=>aM,hY7:()=>o1.h,Ob5:()=>th.Ob,erX:()=>eu.er,MqW:()=>c.Mq,S5r:()=>nq.S,YYe:()=>eu.YY,ami:()=>rk.am,LBS:()=>nH,L3t:()=>u.DragHandler,oMF:()=>eh});var l,n={};o.r(n),o.d(n,{Action:()=>r.rc,ActionBar:()=>r.E7,ActionBarProvider:()=>r.xq,ActionContext:()=>r.yV,ActionContextNoRerender:()=>r.Wi,ActionContextProvider:()=>r.z4,ActionDesigner:()=>r.U6,AfterSuccess:()=>r.Kq,AllDataBlocksContext:()=>tx.rr,AllDataBlocksProvider:()=>tx.J3,AntdSchemaComponentPlugin:()=>tK,AntdSchemaComponentProvider:()=>tG,AppendsTreeSelect:()=>t2,AssignedFieldValues:()=>r.TB,AssociationField:()=>lO,AssociationFieldMode:()=>oH,AssociationFieldModeProvider:()=>oG,AssociationSelect:()=>lJ,AttachmentList:()=>oo._s,AutoComplete:()=>lZ,BackButtonUsedInSubPage:()=>e6.h,Block:()=>nJ,BlockItem:()=>lQ.Z0,BlockItemCard:()=>lQ.tn,BlockItemCardContext:()=>lQ.AQ,BlocksSelector:()=>r.Gj,ButtonEditor:()=>r.Yp,CardItem:()=>l7,Cascader:()=>l3,Checkbox:()=>oF,CollectionSelect:()=>nl,ColorPicker:()=>ns,ColorSelect:()=>nc,Cron:()=>nh,CronSet:()=>nx,DataSourceCollectionCascader:()=>nr,DataSourceSelect:()=>nn,DateFormatCom:()=>nq.b,DatePicker:()=>nv.lr,DatePickerProvider:()=>nv.Qo,Details:()=>n_,DetailsDesigner:()=>L,Divider:()=>nf,EditComponent:()=>D.iI,EditDefaultValue:()=>D.tv,EditDescription:()=>D.JQ,EditOperator:()=>D.B4,EditPattern:()=>D.$t,EditRequired:()=>D.Qp,EditSortField:()=>rr,EditTable:()=>nM,EditTableAction:()=>nL,EditTableActionContext:()=>nT,EditTitle:()=>D.Xz,EditTitleField:()=>D.Ff,EditTooltip:()=>D.IJ,EditValidationRules:()=>D.vP,Editable:()=>a$,EllipsisWithTooltip:()=>lX.R_,ErrorFallback:()=>tm.x,Expand:()=>nO,ExpiresRadio:()=>nq.S,FieldsTreeSelect:()=>t1,Fieldset:()=>nH,Filter:()=>e1.dJ,FilterAction:()=>e1.Bs,FilterActionContext:()=>e1.SO,FilterContext:()=>e1.gM,FilterDynamicComponent:()=>e1.N$,FilterLogicContext:()=>e1.c_,Form:()=>A,FormDialog:()=>nV.R,FormDrawer:()=>rA,FormField:()=>e7,FormItem:()=>D.eI,FormV2:()=>eU,G2Plot:()=>nW,G2PlotRenderer:()=>nK,Grid:()=>nX.xA,GridCard:()=>ar,GridRowContext:()=>nX.mz,HTMLEncode:()=>lX.mJ,ICON_POPUP_Z_INDEX:()=>oT.b,IconPicker:()=>as,Input:()=>lX.pd,InputNumber:()=>ap,InputReadPretty:()=>lX.FZ,InputRecordPicker:()=>aO.qK,Json:()=>lX.LM,LinkageFilter:()=>r$,List:()=>aM,Markdown:()=>aw.o,MarkdownReadPretty:()=>aw.w,Menu:()=>th.W1,NanoIDInput:()=>aP,Page:()=>tF,PagePopups:()=>tO.rN,PageTabs:()=>tP,Pagination:()=>aj,ParentRouteContext:()=>th.Zy,Password:()=>aR,Percent:()=>aN,PopupSettingsProvider:()=>tU.T,Preview:()=>aE.l,QuickEdit:()=>az,Radio:()=>oC,ReadPretty:()=>lX.hq,ReadPrettyRecordPicker:()=>aO.w2,RecordPicker:()=>aO.O$,RecordPickerContext:()=>aO.pE,RecordPickerProvider:()=>aO.be,RefreshDataBlockRequest:()=>r.ud,RemoteSelect:()=>ew,RemoveButton:()=>r.d0,RemoveConditionContext:()=>e1.b7,RequestSettings:()=>r.Rh,RichText:()=>aV,SecondConFirm:()=>r.VX,Select:()=>ek,SkipValidation:()=>r.zN,Space:()=>aU,StablePopover:()=>oT.$,Table:()=>a8,TableBlockDesigner:()=>ri,TableField:()=>rs,TableSelectorDesigner:()=>ru,TableV2:()=>rc,Tabs:()=>rx,TabsContextProvider:()=>o1.h,Templates:()=>eR,TestDesigner:()=>lQ.qI,TextAreaWithGlobalScope:()=>rP,TimePicker:()=>rg,TreeSelect:()=>ry,UnixTimestamp:()=>rS,Upload:()=>oo._O,Uploader:()=>oo.d9,Variable:()=>rk.rT,VariableScopeProvider:()=>rk.sI,VariableSelect:()=>rC.P,actionSettings:()=>r.Sh,actionSettingsItems:()=>r.Mo,allowAddNew:()=>D.lE,attachmentFileTypes:()=>oo.lN,defaultFieldNames:()=>em,fetchTemplateData:()=>eB,filterFormItemSettings:()=>D.Dg,findByUid:()=>aF.X6,findKeysByUid:()=>aF.VF,findMenuItem:()=>aF.OZ,formDetailsSettings:()=>e4,formItemSettings:()=>D.DV,formSettings:()=>e2,formV1Settings:()=>T,genStyleHook:()=>a.fD,getCurrentOptions:()=>eh,getDateExact:()=>nv.Q2,getDatePickerLabels:()=>aO.Mw,getDateRanges:()=>nv.fD,getLabelFormatValue:()=>aO.PB,getPopupPathFromParams:()=>tq.C5,getStoredPopupContext:()=>tq.lS,getTabSchema:()=>tB,getZIndex:()=>r.fl,handleDateChangeOnForm:()=>nv.QD,inferPickerType:()=>nv.Pn,isBulkEditAction:()=>r.PS,isFileCollection:()=>D.XO,isMobile:()=>nv.Fr,isShowFilePicker:()=>aO.Gm,isTabPage:()=>tR,isWriteEmailAction:()=>r.cW,mapDatePicker:()=>nv.x1,mapRangePicker:()=>nv.UT,mapTimeFormat:()=>rf,matchMimetype:()=>oo._b,moment2str:()=>nv.ms,navigateToTab:()=>tY,pageSettings:()=>tz,pageTabSettings:()=>tV,readPrettyFormSettings:()=>e5,removeNullCondition:()=>e1.pA,resolveFilterPickerFormat:()=>nv.CE,storePopupContext:()=>tq.NV,useActionBarContext:()=>r.MI,useActionContext:()=>r.D5,useAfterSuccessOptions:()=>r.bZ,useAllDataBlocks:()=>tx.dW,useAssociationFieldContext:()=>t9.G2,useAssociationFieldModeContext:()=>oK,useBackButton:()=>e6.z,useCloseAction:()=>r.nY,useColumnSchema:()=>rt.BC,useColumnSettings:()=>nB.d,useCurrentPopupContext:()=>tO.IX,useDatePickerContext:()=>nv.nx,useDownloadLogs:()=>tm.n,useEnsureOperatorsValid:()=>D.lh,useFieldMode:()=>D.J1,useFieldNames:()=>aO.gZ,useFilterActionProps:()=>e1.Um,useFilterFieldOptions:()=>e1.g9,useFilterFieldProps:()=>e1.yG,useFilterOptions:()=>e1.uw,useFormDataTemplates:()=>eY,useGetAriaLabelOfAction:()=>r.U8,useGetAriaLabelOfDrawer:()=>r.HP,useGetAriaLabelOfModal:()=>r.tO,useGetAriaLabelOfPopover:()=>r.l2,useGetFilterFieldOptions:()=>e1.Oq,useGetFilterOptions:()=>e1.wn,useGridContext:()=>nX.ZB,useGridRowContext:()=>nX.FV,useIsAddNewForm:()=>D.TN,useIsAssociationField:()=>D.xq,useIsFieldReadPretty:()=>D.U5,useIsFileField:()=>D.oA,useIsFormReadPretty:()=>D.q7,useIsSelectFieldMode:()=>D.je,useKeepAliveLocationSearch:()=>tw,useLabelUiSchema:()=>aO.RB,useLinkageAction:()=>r.Lt,useListBlockContext:()=>a_,useMenuDragEnd:()=>th.yt,useMenuTranslation:()=>aF.Qg,useNocoBaseRoutes:()=>th.Ob,useParentRoute:()=>th.Tr,usePopupSettings:()=>tU.X,useStyles:()=>aF.IS,useTableColumnIntegration:()=>nN.i,useTabsContext:()=>o1.f,useTitleFieldOptions:()=>D.kD,useUploadStyles:()=>oo.dF,useValidateSchema:()=>D.do,useVariableScope:()=>rk.am,useZIndexContext:()=>r.$5,withSearchParams:()=>tq.tX,zIndexContext:()=>r.E});var a=o(54969),r=o(78562),i=o(71178),s=o(51649),d=o(83468),u=o(91032),c=o(90995),p=o(72548);let m=e=>async function(){try{var t;let o=await this.api.request(e);return null==o||null==(t=o.data)?void 0:t.data}catch(e){return[]}};var h=o(56220),x=o(44814),v=o(56920),_=o(52793),f=o(16211),g=o(43288),b=o(30644),y=o(99300),S=o(25952),k=o(96932),C=o(24768);let M=e=>{let{form:t,children:o,...l}=e,n=(0,v.useField)(),a=(0,v.useFieldSchema)(),r=(0,eu.TD)(t.createVoidField({...n.props,basePath:""}));return(0,i.jsx)(v.FieldContext.Provider,{value:void 0,children:(0,i.jsx)(v.FormContext.Provider,{value:t,children:(0,i.jsx)(h.FormLayout,{layout:"vertical",...l,children:(0,i.jsx)(b.dw,{basePath:r.address,schema:a,onlyRenderProperties:!0})})})})},w=e=>e.children,F=e=>{let{form:t,children:o,disabled:l,...n}=e,a=(0,v.useField)(),r=(0,v.useFieldSchema)(),d=(0,eu.TD)(t.createVoidField({...a.props,basePath:""})),u=(0,eu.xZ)(r["x-component"],w);return(0,s.useEffect)(()=>{t.disabled=l||a.disabled},[l,a.disabled]),(0,i.jsx)(_.ConfigProvider,{componentDisabled:l,children:(0,i.jsx)(v.FieldContext.Provider,{value:void 0,children:(0,i.jsx)(v.FormContext.Provider,{value:t,children:(0,i.jsx)(h.FormLayout,{layout:"vertical",...n,children:(0,i.jsx)(v.FieldContext.Provider,{value:d,children:(0,i.jsx)(u,{...a.componentProps,children:(0,i.jsx)(b.dw,{basePath:d.address,schema:r,onlyRenderProperties:!0})})})})})})})},P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,f.bP)((e=>{let{request:t,initialValue:o}=e;return t||(()=>Promise.resolve({data:o}))})(t),e)},j=(0,s.createContext)(null);j.displayName="FormBlockContext";let A=(0,v.observer)(e=>{let{request:t,effects:o,initialValue:l,useValues:n=P,...a}=e,r=(0,v.useFieldSchema)(),d=(0,v.useField)(),u=(0,s.useMemo)(()=>(0,x.createForm)({effects:o}),[]),c=n({uid:r["x-uid"],async onSuccess(e){await u.reset(),u.setValues(null==e?void 0:e.data),u.setInitialValues(null==e?void 0:e.data)}},e),p=(0,s.useContext)(j);return(0,i.jsx)(j.Provider,{value:{parent:p,form:u,result:c,field:d,fieldSchema:r},children:(0,i.jsx)(_.Spin,{spinning:(null==c?void 0:c.loading)||!1,children:"Form"===r["x-decorator"]?(0,i.jsx)(F,{form:u,...a}):(0,i.jsx)(M,{form:u,...a})})})},{displayName:"Form"});A.Designer=function(){let{name:e,title:t}=(0,g.k7)(),o=(0,k.D$)(),{componentNamePrefix:l}=(0,C.kU)();return(0,i.jsxs)(y.xK,{template:o,title:t||e,children:[(0,i.jsx)(S.l,{componentName:`${l}Form`,collectionName:e}),(0,i.jsx)(y.kT,{}),(0,i.jsx)(y.d$,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var I=o(31675);let T=new I.RT({name:"FormV1Settings",items:[{name:"template",Component:S.l,useComponentProps(){let{name:e}=(0,g.k7)(),{componentNamePrefix:t}=(0,C.kU)();return{componentName:`${t}Form`,collectionName:e}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]});var D=o(60929);let L=()=>{let{name:e,title:t}=(0,g.k7)(),o=(0,k.D$)();return(0,i.jsx)(y.xK,{schemaSettings:"FormDetailsSettings",template:o,title:t||e})};var Y=o(69412),R=o(80461),B=o(99847),N=o(49948),E=o(10691),$=o(27404),z=o(77583),O=o(17157),q=o(18111),H=o(70136),V=o(28227),U=o(14187),G=o(92619),K=o(4627),W=o(83006),J=o(43923),X=o(4922),Z=o(95951),Q=o(95210),ee=o(62152),et=o(63526),eo=o(77843),el=o(69575),en=o(65457),ea=o(82113),er=o(91815),ei=o(23460),es=o(29558),ed=o(58980),eu=o(16319),ec=o(46724),ep=o(81607);let em={label:"label",value:"value",color:"color",options:"children"};function eh(e,t,o){let l=function e(t,o){let l=[];if(!Array.isArray(t))return l;for(let n=0;n<t.length;n++){let a=t[n][o.options];Array.isArray(a)&&l.push(...e(a,o)),l.push({...t[n]})}return l}(t,o),n=(0,z.castArray)(e).map(e=>(0,et.isPlainObject)(e)?e[o.value]:e);if(!l)return[];let a=[];for(let e of n){let t=l.find(t=>t[o.value]==e)||{value:e,label:e?e.toString():e};a.push(t)}return a}var ex=o(84951),ev=o(60430);let e_=(0,v.observer)(e=>{let[t,o]=(0,s.useState)(!0),[l,n]=(0,s.useState)([]),a=(0,v.useField)(),r=(0,ec.E1)();return((0,s.useEffect)(()=>{var t;let l={...em,...e.fieldNames},s=a.dataSource||e.options||(null==r?void 0:r.uiSchema.enum)||[],d=eh(a.value,s,l);!(0,$.isValid)(e.value)&&!d.length||(0,x.isArrayField)(a)&&(null==a||null==(t=a.value)?void 0:t.length)===0||(n(null!==a.value&&d.map((e,t)=>(0,i.jsx)(_.Tag,{color:e[l.color],icon:"string"==typeof e.icon?(0,i.jsx)(ev.In,{type:e.icon}):e.icon,children:e[l.label]},t))),o(!1))},[null==r?void 0:r.uiSchema.enum,a,a.dataSource,a.value,e.fieldNames,e.options,e.value]),t)?null:(0,i.jsx)(ep.R,{ellipsis:e.ellipsis,children:l})},{displayName:"SelectReadPretty"}),ef=(0,ex.A)(e_),eg=e=>{let{value:t,options:o,onChange:l,fieldNames:n,mode:a,loading:r,rawOptions:s,defaultValue:d,...u}=e,c=ey.isDesktop?"":eS,p=ey.isDesktop?void 0:"topLeft",m=t=>{var l;if(!(0,$.isValid)(t)||"object"==typeof t&&0===Object.keys(t).length)return;let r=null==(l=eh((0,$.toArr)(t).filter(e=>e).map(e=>(0,et.isPlainObject)(e)?e[n.value]:e),o,n))?void 0:l.map(e=>({label:e[n.label],value:e[n.value]}));return["tags","multiple"].includes(a)||e.multiple?r:r.shift()};return(0,i.jsx)(_.Select,{rootClassName:c,placement:p,role:"button","data-testid":`select-object-${a||"single"}`,value:m(t),defaultValue:m(d),allowClear:{clearIcon:(0,i.jsx)(ea.CloseCircleFilled,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:r?(0,i.jsx)(_.Spin,{}):(0,i.jsx)(_.Empty,{image:_.Empty.PRESENTED_IMAGE_SIMPLE}),options:o,fieldNames:n,showSearch:!0,popupMatchSelectWidth:!1,filterOption:(e,t)=>((null==t?void 0:t[n.label||"label"])??"").includes(e),filterSort:(e,t)=>((null==e?void 0:e[n.label||"label"])??"").toLowerCase().localeCompare(((null==t?void 0:t[n.label||"label"])??"").toLowerCase()),onChange:t=>{let r=eh((0,$.toArr)(t).map(e=>e.value),s||o,n);["tags","multiple"].includes(a)||e.multiple?null==l||l(r):null==l||l(r.shift()||null)},mode:a,tagRender:e=>(0,i.jsx)(_.Tag,{role:"button","aria-label":e.label,closeIcon:(0,i.jsx)(ea.CloseOutlined,{role:"button","aria-label":"icon-close-tag"}),...e,children:e.label}),maxTagCount:"responsive",maxTagPlaceholder:e=>(0,i.jsxs)(_.Tooltip,{title:(0,i.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6,maxWidth:"100%"},children:e.map(e=>(0,i.jsx)(_.Tag,{style:{margin:0,background:"#fafafa",border:"1px solid #d9d9d9",whiteSpace:"normal",wordBreak:"break-word",maxWidth:"100%"},children:e.label},e.value))}),overlayInnerStyle:{background:"#fff",color:"#000",padding:8,maxWidth:"100%"},color:"#fff",overlayStyle:{pointerEvents:"auto",maxWidth:300},children:["+",e.length,"..."]}),...u})},eb=(e,t)=>((null==t?void 0:t.label)??"").toLowerCase().includes((e||"").toLowerCase()),eS=(0,E.css)`
1016
+ `;return(0,a.jsxs)("div",{style:{maxHeight:300,overflowY:"auto"},children:[e.map(e=>(0,a.jsx)("div",{role:"option",onClick:()=>v(e.value),className:o,children:l(e.label)},e.value)),(0,a.jsx)(u.Divider,{style:{margin:"4px 0"}}),t.map(e=>(0,a.jsx)("div",{role:"option",className:o,onClick:()=>v(e.value),title:l(e.label),children:l(e.label)},e.value))]})}}),["past","next"].includes(null==t?void 0:t.type)&&[(0,a.jsx)(u.InputNumber,{value:null==t?void 0:t.number,onChange:e=>{o({...t,number:e})}},"number"),(0,a.jsx)(u.Select,{value:null==t?void 0:t.unit,style:{minWidth:130,maxWidth:140},onChange:e=>{o({...t,unit:e})},options:[{value:"day",label:n("Day")},{value:"week",label:n("Calendar week")},{value:"month",label:n("Calendar Month")},{value:"year",label:n("Calendar Year")}],popupMatchSelectWidth:!0},"unit")],((null==t?void 0:t.type)==="exact"||!(null==t?void 0:t.type))&&(0,a.jsx)(x,{...e})]})}},87382(e,t,o){o.d(t,{L1:()=>x,L3:()=>f,Pd:()=>h,Uq:()=>_,X_:()=>p,gB:()=>m});var l=o(71178),n=o(72741),a=o(38533),r=o(10691),i=o(56920),s=o(77583),d=o(51649),u=o(54969),c=o(95951);let p=(0,d.createContext)(null);p.displayName="DraggableContext";let m=(0,d.createContext)(null);m.displayName="SortableContext";let h=e=>{let{id:t,data:o,children:n}=e,r=(0,a.useDraggable)({id:t,data:o}),i=(0,a.useDroppable)({id:t,data:o}),s=(0,d.useMemo)(()=>({draggable:r,droppable:i}),[r,i]);return(0,l.jsx)(m.Provider,{value:s,children:n})},x=e=>{var t,o;let{component:l,overStyle:a,style:s,children:c,openMode:p,...h}=e,{token:x}=(0,u.rd)(),{draggable:v,droppable:_}=(0,d.useContext)(m),{isOver:f,setNodeRef:g}=_,b={...s},y=(0,i.useFieldSchema)(),S=(null==y?void 0:y["x-component"])==="Action.Link"||"a"===l;if(f&&(null==v||null==(t=v.active)?void 0:t.id)!==(null==_||null==(o=_.over)?void 0:o.id)){let e;b[S?"color":"background"]=(e=x.colorSettings,new n.TinyColor(e).setAlpha(.15).toHex8String()),Object.assign(b,a)}return d.default.createElement(l||"div",{role:"none",...h,className:(0,r.cx)("nb-sortable-designer",e.className),ref:g,style:b},c)},v=(0,i.observer)(e=>{var t,o;let n,a,r,{schema:s,id:u,eid:c,removeParentsIfNoChildren:p,...m}=(t=e,n=(0,i.useField)(),a=t.id?t.id:null==n||null==(o=n.address)?void 0:o.toString(),r=(0,i.useFieldSchema)(),e.schema?{...e,id:a}:{...e,id:a,schema:r}),v=(0,d.useMemo)(()=>{var e,t,o;return{insertAdjacent:"afterEnd",schema:(null==(t=s.parent)||null==(e=t.parent)?void 0:e["x-component"])==="BlockTemplate"?null==(o=s.parent)?void 0:o.parent:s,removeParentsIfNoChildren:p??!0}},[s,p]);return(0,l.jsx)(h,{id:u,data:v,children:(0,l.jsx)(x,{id:c,...m,children:e.children})})},{displayName:"InternalSortableItem"}),_=d.default.memo(e=>{let{component:t,...o}=e,{designable:n}=(0,c.er)();return n?(0,l.jsx)(v,{...e}):d.default.createElement(t||"div",s.default.omit(o,["children","schema","overStyle","openMode","id","eid","removeParentsIfNoChildren"]),e.children)});_.displayName="SortableItem";let f=e=>{let{draggable:t}=(0,d.useContext)(m)||{};if(!t)return null;let{attributes:o,listeners:n,setNodeRef:a}=t;return(0,l.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,l.jsx)("div",{ref:a,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"},...n,...o,role:"none",children:(0,l.jsx)("span",{style:{cursor:"move",fontSize:14},children:e.children})})})}},37845(e,t,o){o.d(t,{L1:()=>l.L1,L3:()=>l.L3,Pd:()=>l.Pd,Uq:()=>l.Uq,X_:()=>l.X_,gB:()=>l.gB});var l=o(87382)},59529(e,t,o){o.d(t,{KX:()=>p,_c:()=>h,a2:()=>f,bc:()=>c,rf:()=>u});var l=o(63526),n=o(77583),a=o(73761),r=o(839),i=o(59896),s=o(32665),d=o(64004);let u=(e,t)=>{var o;let l=null==e||null==(o=e.match)?void 0:o.call(e,/{{(.*?)}}/);if(!l)return e;{let e=n.default.get(t,l[1]);return n.default.isFunction(e)?e():e}};function c(e){if("object"!=typeof e||null===e)return null;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))if("[object Object]"===Object.prototype.toString.call(e[t])&&null!==e[t])return c(e[t]);else return{key:t,value:e[t]};return null}let p=e=>{let t,o=(t=[],!function e(o){Object.keys(o).sort().forEach(function(l){t.push(l),o[l]&&"object"==typeof o[l]&&e(o[l])})}(e),t),l=(0,n.findIndex)(o,(e,t,o)=>{if(e.includes("$")&&t>0)return!0});return o.slice(0,l)},m=async(e,t,o)=>{let l=(0,i.DZ)(e)?[t.parseVariable(e,o).then(e=>{let{value:t}=e;return t})]:[e];try{let[e]=await Promise.all(l);return e}catch(e){throw console.error("Error in parseVariableValue:",e),e}},h=async(e,t)=>{let{ruleGroup:o,variables:l,localVariables:a,variableNameOfLeftCondition:r,conditionType:i}=e,s=Object.keys(o)[0]||"$and",d=o[s]||[],u=await Promise.all(d.filter(Boolean).map(e=>x(e,l,a,r,i,t)));return"$and"===s?(0,n.every)(u,e=>e):!u.length||(0,n.some)(u,e=>e)},x=async(e,t,o,l,n,a)=>"$and"in e||"$or"in e?await h({ruleGroup:e,variables:t,localVariables:o,conditionType:n},a):"advanced"===n?v(e,t,o,a):_(e,t,o,l,a),v=async(e,t,o,l)=>{let n=e.op,a=await m(e.rightVar,t,o),r=await m(e.leftVar,t,o);return!n||l.apply({[n]:[r,a]})},_=async(e,t,o,n,a)=>{let r=c(e),u=null==r?void 0:r.key;if(!u)return!0;let m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$nForm";return`{{ ${t}.${e.join(".")} }}`}(p(e),n),h=t.parseVariable(m,o,{doNotRequest:!0}).then(e=>{let{value:t}=e;return t}),x=(0,i.DZ)(null==r?void 0:r.value)?[t.parseVariable(null==r?void 0:r.value,o).then(e=>{let{value:t}=e;return t}),h]:[null==r?void 0:r.value,h];try{let[e,n]=await Promise.all(x),r=await t.getCollectionField(m,o),i=(0,s.A)(n,{targetCollectionField:r}),c=(0,s.A)(e,{targetCollectionField:r});if((null==r?void 0:r.type)&&["datetime","date","datetimeNoTz","dateOnly","unixTimestamp"].includes(r.type)&&i){let e=(0,d.Pn)(c),t=(0,l.getPickerFormat)(e);i=(0,l.dayjs)(i).format(t)}return a.apply({[u]:[i,c]})}catch(e){throw e}};async function f(e,t,o,n,i,s){if(t&&"handlebars"===e){l.Handlebars.registerHelper("t",function(e){if("string"==typeof e)return s(e,{ns:r.z})});try{var d,u;let e,a=t.replace(/{{\s*}}/g,'{{"{{}}"}}'),r=l.Handlebars.compile(a),s=(e={},n.map(t=>{e[t.name]=t.ctx}),e),{$nDate:c}=(null==o||null==(d=o.ctxRef)?void 0:d.current)||{},p={};Object.keys(c||{}).map(e=>{p[e]=c[e]()});let m=r({...null==o||null==(u=o.ctxRef)?void 0:u.current,...s,$nDate:p});return console.log(m),await i(m)}catch(e){return/VariablesProvider: .* is not found/.test(e.message)||console.log(e),console.log(t),t}}try{let e=await (0,a.replaceVariableValue)(t,o,n);return await i(e)}catch(e){return/VariablesProvider: .* is not found/.test(e.message)||console.log(e),t}}},84951(e,t,o){o.d(t,{A:()=>g});var l=o(71178),n=o(56920),a=o(77583),r=o(51649),i=o(44388),s=o(51275),d=o(22204),u=o(3012),c=o(52570),p=o(95951);let m={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:{}}}}}}}};var h=o(49621),x=o(30644),v=o(39888);let _=e=>"Action.Container"===e["x-component"],f=e=>{let{WrappedComponent:t,...o}=e,i=(0,n.useFieldSchema)(),{openPopup:s}=(0,u.Hy)(),d=(0,r.useRef)(!1),c=(()=>{let e=(0,n.useFieldSchema)(),{insertAfterBegin:t}=(0,p.er)();return(0,r.useCallback)(o=>{e.reduceProperties((e,t)=>"Action.Container"===t["x-component"]?t:e,null)||t((0,a.cloneDeep)(o))},[e,t])})(),h=(0,r.useRef)(i);h.current=i;let x=(0,r.useRef)(c);x.current=c;let v=(0,r.useRef)(s);v.current=s;let _=(0,r.useCallback)(()=>h.current,[]),f=(0,r.useCallback)(()=>{h.current.properties||(x.current(m),d.current=!0),d.current?(setTimeout(()=>{v.current({customActionSchema:_()})}),d.current=!1):h.current.properties&&v.current()},[_]),g=(0,r.useMemo)(()=>(0,a.debounce)(f,600,{leading:!0,trailing:!1}),[f]);return(0,r.useEffect)(()=>()=>{g.cancel()},[g]),(0,l.jsx)("a",{onClick:g,children:(0,l.jsx)(t,{...o})})};function g(e){return t=>{let[o,a]=(0,r.useState)(!1),[p,m]=(0,r.useState)(!1),g=(0,h.Ge)(),b=(0,s.D5)(),y=(0,n.useField)(),S=(0,n.useFieldSchema)(),{enableLink:k,openMode:C,openSize:M}=(null==S?void 0:S["x-component-props"])||{},{visibleWithURL:w,setVisibleWithURL:F}=(0,u.Hy)(),P=(0,r.useCallback)(e=>{null==a||a(e),null==F||F(e)},[F]);(0,r.useRef)(S).current=S;let{setSubmitted:j}=b;return k?(0,l.jsx)(i.OC,{visible:!1,children:(0,l.jsxs)(d.z4,{button:(0,l.jsx)(e,{...t}),visible:o||w,setVisible:P,formValueChanged:p,setFormValueChanged:m,openMode:C,openSize:M,containerRefKey:"field-popup",fieldSchema:S,setSubmitted:j,children:[(0,l.jsx)(h.Yz,{name:g.name,children:(0,l.jsx)(c.t,{children:(0,l.jsx)(v.P3,{children:(0,l.jsx)(x.dw,{onlyRenderProperties:!0,basePath:null==y?void 0:y.address,schema:S,filterProperties:_})})})}),(0,l.jsx)(f,{...t,WrappedComponent:e})]})}):(0,l.jsx)(e,{...t})}}},63557(e,t,o){o.d(t,{u:()=>l});let l=(0,o(51649).createContext)({});l.displayName="SchemaComponentContext.Provider"},71915(e,t,o){o.d(t,{O:()=>u});var l=o(71178),n=o(44814),a=o(56920),r=o(51649),i=o(52570);let s=e=>{let{children:t,form:o,...n}=e,s=(0,r.useContext)(a.SchemaOptionsContext),d=(0,r.useContext)(a.SchemaExpressionScopeContext),u={...null==s?void 0:s.scope,...d},c={...null==s?void 0:s.components};return(0,l.jsx)(a.FormProvider,{...n,form:o,children:(0,l.jsx)(i.t,{components:c,scope:u,children:t})})},d=e=>{let{children:t,...o}=e,s=(0,r.useContext)(a.SchemaOptionsContext),d=(0,r.useContext)(a.SchemaExpressionScopeContext),u={...null==s?void 0:s.scope,...d},c={...null==s?void 0:s.components},p=(0,r.useMemo)(()=>(0,n.createForm)(),[]);return(0,l.jsx)(a.FormProvider,{...o,form:p,children:(0,l.jsx)(i.t,{components:c,scope:u,children:t})})},u=e=>e.form?(0,l.jsx)(s,{...e}):(0,l.jsx)(d,{...e})},86073(e,t,o){o.d(t,{D:()=>x});var l=o(71178),n=o(44814),a=o(56920),r=o(52793),i=o(51649),s=o(43353);o(67285);var d=o(16319),u=o(71915),c=o(93726),p=o(16211);let m=e=>e,h=e=>{let{noForm:t,onlyRenderProperties:o,hidden:h,scope:x,uid:v,components:_,onSuccess:f,NotFoundPage:g,schemaTransform:b=m,onPageNotFind:y}=e,S=(0,i.useMemo)(()=>(0,n.createForm)(),[v]),{schema:k,loading:C}=(e=>{let{uid:t,type:o="getJsonSchema",onSuccess:l}=e,n={url:`/uiSchemas:${o}/${t}`},{data:a,loading:r}=(0,p.bP)(n,{refreshDeps:[t],onSuccess(e){l&&l(e)}});return{schema:null==a?void 0:a.data,loading:r}})({uid:v,type:o?"getProperties":"getJsonSchema",onSuccess:e=>{f&&f(e)}}),M=(0,d.xZ)(g),w=(0,s.RH)(),F=(0,a.useFieldSchema)(),P=(0,i.useMemo)(()=>b(k||{}),[k,b]),j=!k||0===Object.keys(k).length;return((0,i.useEffect)(()=>{w||C||h||!j||!y||y()},[w,h,C,y,j]),w||C||h)?(0,l.jsx)(r.Spin,{style:{width:"100%",marginTop:20},delay:void 0}):j?M?(0,l.jsx)(M,{}):null:t?(0,l.jsx)(c.H,{components:_,scope:x,schema:P,parentSchema:F}):(0,l.jsx)(u.O,{form:S,children:(0,l.jsx)(c.H,{components:_,scope:x,schema:P,parentSchema:F})})},x=(0,i.memo)(e=>e.uid?(0,l.jsx)(h,{...e}):null);x.displayName="RemoteSchemaComponent"},93726(e,t,o){o.d(t,{D:()=>c,H:()=>h});var l=o(71178),n=o(56920),a=o(77583),r=o(51649),i=o(30644),s=o(63557),d=o(52570);function u(e){return n.Schema.isSchemaInstance(e)?e:new n.Schema((null==e?void 0:e.name)?{type:"object",properties:{[e.name]:e},name:`p_${e.name}`}:e)}let c=(0,r.createContext)({onChange:a.default.noop}),p=(0,r.memo)(e=>{let{components:t,scope:o,schema:n,distributed:p,onChange:m,parentSchema:h,...x}=e,v=(0,r.useContext)(s.u),_=(0,r.useMemo)(()=>u(n),[n]),f=(0,r.useMemo)(()=>({...v,distributed:!1!=v.distributed&&p,refresh:v.refresh||a.default.noop}),[v,p]),{onChange:g}=(0,r.useContext)(c),b=(0,r.useMemo)(()=>({onChange:()=>{null==m||m(_),null==g||g()}}),[m,g,_]);return(0,l.jsx)(c.Provider,{value:b,children:(0,l.jsx)(s.u.Provider,{value:f,children:(0,l.jsx)(d.t,{inherit:!0,components:t,scope:o,children:(0,l.jsx)(i.dw,{...x,schema:_,isUseFormilyField:!0,parentSchema:h})})})})});p.displayName="RecursionSchemaComponent";let m=(0,r.memo)(e=>{let{schema:t,parentSchema:o,...n}=e,a=(0,r.useMemo)(()=>u(t),[]);return(0,l.jsx)(p,{...n,schema:a,parentSchema:o})});m.displayName="MemoizedSchemaComponent";let h=(0,r.memo)(e=>{let{memoized:t,...o}=e;return t?(0,l.jsx)(m,{...o}):(0,l.jsx)(p,{...o})});h.displayName="SchemaComponent"},52570(e,t,o){o.d(t,{M:()=>r,t:()=>i});var l=o(71178),n=o(56920),a=o(51649);let r=()=>(0,a.useContext)(n.SchemaOptionsContext)||{},i=(0,a.memo)(e=>{let{children:t}=e,o=r(),i=(0,a.useMemo)(()=>({...o.components,...e.components}),[o.components,e.components]),s=(0,a.useMemo)(()=>({...o.scope,...e.scope}),[o.scope,e.scope]),d=(0,a.useMemo)(()=>({scope:s,components:i}),[s,i]);return(0,l.jsx)(n.SchemaOptionsContext.Provider,{value:d,children:(0,l.jsx)(n.SchemaComponentsContext.Provider,{value:i,children:(0,l.jsx)(n.ExpressionScope,{value:s,children:t})})})});i.displayName="SchemaComponentOptions"},90995(e,t,o){o.d(t,{OA:()=>P,DY:()=>v.D,GD:()=>A,Do:()=>_.D,Mq:()=>f.M,t6:()=>f.t,Hv:()=>_.H,Op:()=>x.O,N3:()=>h});var l=o(71178),n=o(82113),a=o(52793),r=o(51649),i=o(77843),s=o(82924),d=o(49948),u=o(7819),c=o(504);let p={backgroundColor:"var(--colorSettings) !important"},m={backgroundColor:"transparent"},h=e=>{let{designable:t,setDesignable:o}=(0,s.erX)(),{t:r}=(0,i.useTranslation)(),{token:h}=(0,d.K)(),{isMobileLayout:x}=(0,u.mY)(),v=(0,c.useFlowEngine)();return((0,ec.useHotkeys)("Ctrl+Shift+U",()=>o(!t),[t]),x)?null:(0,l.jsx)(a.Tooltip,{title:r("UI Editor"),children:(0,l.jsx)(a.Button,{"data-testid":"ui-editor-button",icon:(0,l.jsx)(n.HighlightOutlined,{style:{color:h.colorTextHeaderMenu}}),title:r("UI Editor"),style:{...t?p:m,...e.style},onClick:async()=>{let e=!t;o(e),x||!e?await v.flowSettings.disable():await v.flowSettings.enable()}})})};var x=o(71915),v=o(86073),_=o(93726),f=o(52570),g=o(44814),b=o(56920),y=o(27404),S=o(77583),k=o(63557),C=o(17157);let M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return`${e}${(0,y.uid)()}`};b.Schema.silent(!0);let w={},F={silent:!0,compile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=()=>{if(!F.silent)return Function("$root",`with($root) { return (${e}); }`)(t);try{return Function("$root",`with($root) { return (${e}); }`)(t)}catch{return`{{${e}}}`}};return w[e]?w[e]:e.trim().startsWith("t(")?(w[e]=o(),w[e]):o()}};b.Schema.registerCompiler(F.compile);let P=e=>{let{designable:t,onDesignableChange:o,components:n,children:a}=e,s=(0,r.useContext)(k.u),d=(0,f.M)(),[u,c]=(0,r.useState)(()=>(0,y.uid)()),p=(0,r.useMemo)(()=>e.form||(0,g.createForm)(),[u]),{t:m}=(0,i.useTranslation)(),h=(0,C.nm)(),x=(0,r.useMemo)(()=>({...e.scope,t:m,randomString:M}),[e.scope,m,null==d?void 0:d.scope]),[v,_]=(0,r.useState)(t),w=(0,r.useMemo)(()=>"boolean"==typeof t?t:v,[t,v,s.designable]),F=(0,r.useMemo)(()=>e=>{"boolean"!=typeof w&&_(e),null==o||o(e)},[w,o]);(0,r.useEffect)(()=>{let e=!1;return(async()=>{var t,o,l,n;if(!w)return await (null==(o=h.flowEngine)||null==(t=o.flowSettings)?void 0:t.disable());e||await (null==(n=h.flowEngine)||null==(l=n.flowSettings)?void 0:l.enable())})(),()=>{e=!0}},[h,w]);let P=(0,r.useCallback)(()=>{c((0,y.uid)())},[]),j=(0,r.useMemo)(()=>({scope:x,components:n,reset:P,refresh:S.default.noop,designable:w,setDesignable:F}),[n,w,P,x,F]);return(0,l.jsx)(k.u.Provider,{value:j,children:(0,l.jsx)(b.FormProvider,{form:p,children:(0,l.jsx)(f.t,{inherit:!0,scope:x,components:n,children:a})})})};P.displayName="SchemaComponentProvider";var j=o(83468);class A extends j.k{async load(){this.addComponents()}addComponents(){this.app.addComponents({DesignableSwitch:h})}}},16319(e,t,o){o.d(t,{Us:()=>_,TD:()=>n,F:()=>c.F,px:()=>i.px,QI:()=>i.QI,d1:()=>i.d1,xB:()=>h,YY:()=>f.Y,Lj:()=>g.Lj,er:()=>i.er,xZ:()=>r.x,OJ:()=>u,mh:()=>g.mh,lu:()=>a.l,kB:()=>i.kB,Hb:()=>s.H,a9:()=>g.a9,jE:()=>b.j});var l=o(51649);let n=e=>{let t=(0,l.useRef)(null);return(0,l.useEffect)(()=>(t.current&&e!==t.current&&t.current.onUnmount(),t.current=e,e.onMount(),()=>{e.onUnmount()}),[e]),e};var a=o(61013),r=o(57619),i=o(95951),s=o(87463),d=o(56920);let u=e=>{let t=(0,l.useContext)(d.SchemaOptionsContext),o=(0,l.useContext)(d.SchemaExpressionScopeContext),n=(0,l.useRef)();return n.current=o,e.toFieldProps({...t,get scope(){return{...t.scope,...n.current}}})};var c=o(39247),p=o(77843),m=o(43288);let h=()=>{var e;let{getCollectionJoinField:t,getCollection:o}=(0,m.nj)(),n=(0,d.useFieldSchema)(),{getField:a}=(0,m.k7)(),r=a(n.name)||t(n["x-collection-field"]),{t:i}=(0,p.useTranslation)(),{label:s}=(null==(e=n["x-component-props"])?void 0:e.fieldNames)||{};return(0,l.useMemo)(()=>{if(!r||!(null==r?void 0:r.interface)||!["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(r.interface))return;let e=o(r.target);if((null==e?void 0:e.template)==="file")return[{label:i("Record picker"),value:"CollectionField"},{label:i("Select"),value:"AssociationSelect"}];switch(r.interface){case"o2m":return[{label:i("Record picker"),value:"CollectionField"},{label:i("Subtable"),value:"TableField"},{label:i("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:i("Record picker"),value:"CollectionField"},{label:i("Select"),value:"AssociationSelect"}];default:return[{label:i("Record picker"),value:"CollectionField"},{label:i("Subform"),value:"FormField"},{label:i("Select"),value:"AssociationSelect"}]}},[i,null==r?void 0:r.interface,s])};var x=o(26174),v=o(49621);let _=()=>{var e;let t=(0,d.useField)(),o=(0,d.useFieldSchema)(),n=(0,v.Ge)(),r=(0,x.r2)(),i=(null==n?void 0:n.getField(o.name))||(null==r?void 0:r.getCollectionField(o["x-collection-field"])),s=(0,a.l)();(0,l.useEffect)(()=>{if(!(null==t?void 0:t.title)){var e;t.title=s(null==i||null==(e=i.uiSchema)?void 0:e.title)}},[null==i||null==(e=i.uiSchema)?void 0:e.title])};var f=o(4922),g=o(62152),b=o(81547)},62152(e,t,o){o.d(t,{Lj:()=>f,a9:()=>_,mh:()=>v});var l=o(56920),n=o(71883),a=o(52793),r=o(77583),i=o(51649),s=o(38356),d=o(95951),u=o(44374),c=o(73761),p=o(70892),m=o(38131);let h=e=>{let t=g((0,l.useFieldSchema)()),o=(e=>{var t,o,l,n;let{token:r}=a.theme.useToken(),{designable:i}=(0,d.er)(),{heightProps:u}=(0,c.useBlockHeightProps)(),p=(0,s.useLocation)(),{disablePageHeader:m,enablePageTabs:h,hidePageTitle:x}=e||u||{},v=r.sizeXXL-2,_=i?r.controlHeight+2*r.paddingContentHorizontalLG:+r.paddingContentHorizontalLG;return v+(t=m,o=h,l=x,n=r,p.pathname.includes("/popups/")?2*n.paddingContentVertical+22+n.paddingPageVertical:t?n.paddingContentHorizontalLG:l?o?n.controlPaddingHorizontal+3*n.controlPaddingHorizontalSM+22+n.paddingContentHorizontalLG:n.paddingContentHorizontalLG+12:o?n.paddingSM+n.controlHeight+n.marginXS+2*n.controlPaddingHorizontalSM+22+n.paddingContentHorizontalLG:n.controlHeight+n.marginXS+(n.paddingContentVertical+2)*2+n.paddingContentHorizontalLG)+_})(e),n=(()=>{let{token:e}=a.theme.useToken(),{designable:t}=(0,d.er)();return e.paddingContentVerticalLG+e.margin+2*e.paddingContentVertical+24+(t?e.controlHeight+2*e.paddingContentHorizontalLG:+e.paddingContentHorizontalLG)})();return t?n:o},x=["workflowManualTasks","approvals","approvalRecords"],v=e=>{let{heightProps:t}=(0,c.useBlockHeightProps)(),o=h(),{heightMode:l,height:n,title:a,titleHeight:r}=t||{};if((null==t?void 0:t.heightMode)&&l!==m.D.DEFAULT){if(l===m.D.FULL_HEIGHT){let t=window.innerHeight-o;return(null==e?void 0:e.removeBlockHeaderHeight)&&(t-=a?r:0),(null==e?void 0:e.innerExtraHeight)&&(t-=e.innerExtraHeight),t}return n}},_=()=>{let e=(0,l.useFieldSchema)(),t=(0,i.useMemo)(()=>(0,c.getPageSchema)(e),[]),{disablePageHeader:o,enablePageTabs:n,hidePageTitle:a}=(null==t?void 0:t["x-component-props"])||{},r={...null==e?void 0:e["x-component-props"],disablePageHeader:o,enablePageTabs:n,hidePageTitle:a},s=h(r),{heightMode:d,height:u}=r||{};if((null==r?void 0:r.heightMode)&&d!==m.D.DEFAULT)return d===m.D.FULL_HEIGHT?window.innerHeight-s:u},f=()=>{let[e,t]=(0,i.useState)(),o=(0,i.useRef)(null),s=(()=>{var e;let{token:t}=a.theme.useToken(),{heightProps:o}=(0,c.useBlockHeightProps)(),{heightProps:n}=(0,p.El)(),{designable:r}=(0,d.er)(),i=(0,l.useFieldSchema)(),s=n||o,{titleHeight:v}=o,_=h(s),{name:f}=(0,u.useCollection)(),{heightMode:g,height:b,title:y}=s;if(!(null==s?void 0:s.heightMode)||g===m.D.DEFAULT)return;let S=Object.keys((null==(e=i.parent.properties.actions)?void 0:e.properties)||{}).length>0,k=t.controlHeight+t.padding+t.marginLG,C=S||r?t.controlHeight+2*t.marginLG:t.marginLG,M=(r&&!x.includes(f)?t.controlHeight:22)+2*t.padding+1,w=y?v:0;return g===m.D.FULL_HEIGHT?window.innerHeight-_-w-M-C-k:b-w-C-M-k})(),v=(0,i.useCallback)((0,r.debounce)(()=>{var e;if(!o.current)return;let l=o.current.getBoundingClientRect();(null==(e=o.current.querySelector(".ant-table"))?void 0:e.getBoundingClientRect())&&t(l.width)},100),[s]),_=(0,i.useCallback)(e=>{o.current=e&&e.children?e.children[0]:null,v()},[v]);return(0,n.useEventListener)("resize",v),{height:s,width:e,tableSizeRefCallback:_}},g=e=>{if(!e)return null;if("Action.Container"===e["x-component"]){var t,o;return(null==e||null==(o=e.parent)||null==(t=o["x-component-props"])?void 0:t.openMode)!=="page"}return g(e.parent)}},61013(e,t,o){o.d(t,{l:()=>r});var l=o(56920),n=o(51649);let a={},r=function(){let{noCache:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{noCache:!1},t=(0,n.useContext)(l.SchemaOptionsContext),o=(0,n.useContext)(l.SchemaExpressionScopeContext);return(r,i)=>{var s,d;let u,c=!1;if("string"==typeof r&&r.startsWith("{{")&&(c=!0,u=r),r&&"object"==typeof r&&!(0,n.isValidElement)(r)){try{u=JSON.stringify(r)}catch(e){return console.warn("Failed to stringify:",e),r}if(a[u])return a[u];s=u,c=/{{.*?}}/g.test(s)}if(Array.isArray(r)){try{u=JSON.stringify(r)}catch(e){return console.warn("Failed to stringify:",e),r}if(a[u])return a[u];d=u,c=/{{.*?}}/g.test(d)}if(c){let n={...null==t?void 0:t.scope,...o,...i};if(!u)return l.Schema.compile(r,n);try{if(e)return l.Schema.compile(r,n);return a[u]=a[u]||l.Schema.compile(r,n),a[u]}catch(e){return console.log("useCompile error",r,e),l.Schema.compile(r,n)}}return r}}},57619(e,t,o){o.d(t,{x:()=>r});var l=o(56920),n=o(77583),a=o(51649);let r=(e,t)=>{let{components:o}=(0,a.useContext)(l.SchemaOptionsContext);return e?"string"!=typeof e?e:(0,n.get)(o,e)||t:t}},95951(e,t,o){o.d(t,{er:()=>F,px:()=>g,QI:()=>w,d1:()=>M,kB:()=>k});var l=o(71178),n=o(56920),a=o(27404),r=o(71883),i=o(52793),s=o(13791),d=o(93656),u=o(20148),c=o(51649),p=o(77843),m=o(16211),h=o(30644),x=o(88448),v=o(63557),_=JSON.parse('{"rE":"2.3.0-alpha.1"}'),f=o(13975);function g(e){return new M(e)}let b=e=>{e&&(e["x-uid"]||(e["x-uid"]=(0,a.uid)()),Object.keys(e.properties||{}).forEach(t=>{b(e.properties[t])}))},y=e=>e,S=(e,t)=>{if(e&&t){for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&t[o]!==(null==e?void 0:e[o]))return!1;return!0}},k=(e,t)=>{if(e["x-uid"]&&e["x-uid"]===t["x-uid"])return[null,e.toJSON()];let o=e.toJSON(),l={...o,properties:{}},n=null,a=(e,o)=>{Object.keys(e||{}).forEach(l=>{let r=e[l];if(r["x-uid"]===t["x-uid"]){n=e[l];return}o.properties[l]={...r,properties:{}},a(null==r?void 0:r.properties,o.properties[l])})};return a(o.properties,l),[l,n]},C=e=>e;class M{get model(){return this.options.model}get query(){return this.options.query}loadAPIClientEvents(){let{api:e,t=C}=this.options;if(!e)return;let o=e=>{if(!e)return[];let t=Object.values(e.properties).length,o=[];return(e.mapProperties(e=>{e["x-component-props"]=e["x-component-props"]||{},e["x-component-props"].width=100/t,e["x-uid"]&&o.push({"x-uid":e["x-uid"],"x-component-props":e["x-component-props"]})}),e["x-uid"]&&o.length)?o:[]};this.on("insertAdjacent",async l=>{var n;let{onSuccess:a,current:r,position:s,schema:d,wrap:u,wrapped:c,removed:p}=l,m=[];if((null==c?void 0:c["x-component"])==="Grid.Col"&&(m=m.concat(o(c.parent))),(null==p?void 0:p["x-component"])==="Grid.Col"&&(m=m.concat(o(p.parent))),this.refresh(),!r["x-uid"])return;let h=await e.request({url:`/uiSchemas:insertAdjacent/${r["x-uid"]}?position=${s}`,method:"post",data:{schema:function e(t,o){if(t)return t["x-app-version"]||(t["x-app-version"]=o),Object.keys(t.properties||{}).forEach(l=>{var n;e(null==(n=t.properties)?void 0:n[l],o)}),t}(d,this.appVersion),wrap:u}});m.length&&await e.request({url:"/uiSchemas:batchPatch",method:"post",data:m}),(null==p?void 0:p["x-uid"])&&await e.request({url:`/uiSchemas:remove/${p["x-uid"]}`,method:"post"}),null==a||a(null==h||null==(n=h.data)?void 0:n.data),i.message.success(t("Saved successfully"),.2)}),this.on("patch",async o=>{let{schema:l}=o;this.refresh(),(null==l?void 0:l["x-uid"])&&(await e.request({url:"/uiSchemas:patch",method:"post",data:{...l}}),i.message.success(t("Saved successfully"),.2))}),this.on("initializeActionContext",async t=>{let{schema:o}=t;(null==o?void 0:o["x-uid"])&&await e.request({url:"/uiSchemas:initializeActionContext",method:"post",data:{...o}})}),this.on("batchPatch",async o=>{let{schemas:l}=o;this.refresh(),await e.request({url:"/uiSchemas:batchPatch",method:"post",data:l}),i.message.success(t("Saved successfully"),.2)}),this.on("remove",async l=>{let{removed:n}=l,a=[];(null==n?void 0:n["x-component"])==="Grid.Col"&&(a=o(n.parent)),this.refresh(),(null==n?void 0:n["x-uid"])&&(await e.request({url:`/uiSchemas:remove/${n["x-uid"]}`,method:"post"}),a.length&&await e.request({url:"/uiSchemas:batchPatch",method:"post",data:a}),i.message.success(t("Saved successfully"),.2))})}prepareProperty(e){e.type||(e.type="void"),e.name||(e.name=(0,a.uid)()),this.current["x-uid"]&&b(e)}on(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}async emit(e){for(var t=arguments.length,o=Array(t>1?t-1:0),l=1;l<t;l++)o[l-1]=arguments[l];if(!this.events[e])return;let[n,...a]=o;return Promise.all(this.events[e].map(e=>e.bind(this)({current:this.current,...n},...a)))}parentsIn(e){if(!e||!n.Schema.isSchemaInstance(e))return!1;let t=this.current;for(;null==t?void 0:t.parent;){if(t.parent===e)return!0;t=t.parent}return!1}refresh(e){let{refresh:t}=this.options;return null==t?void 0:t(e)}deepMerge(e){let t={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"},o={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(e).forEach(l=>{t[l]?(this.current[l]=e[l],this.updateModel(t[l],e[l])):o[l]?Object.keys(e[l]).forEach(t=>{(0,u.default)(this.current,[l,t],e[l][t]),this.updateModel([o[l],t],e[l][t])}):this.current[l]=e[l]}),this.emit("patch",{schema:e})}getSchemaAttribute(e,t){return(0,d.default)(this.current,e,t)}shallowMerge(e){let t={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(e).forEach(o=>{this.current[o]=e[o],t[o]&&this.updateModel(t[o],e[o])}),this.emit("patch",{schema:e})}updateModel(e,t){let o=o=>{(0,u.default)(o,e,t)};this.model&&o(this.model),this.query&&this.query.take(o)}insertAdjacent(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};switch(e){case"beforeBegin":return this.insertBeforeBegin(t,o);case"afterBegin":return this.insertAfterBegin(t,o);case"beforeEnd":return this.insertBeforeEnd(t,o);case"afterEnd":return this.insertAfterEnd(t,o)}}recursiveRemoveIfNoChildren(e,t){let o;if(!e)return;let l=e,n=null==t?void 0:t.breakRemoveOn;for(;l;){if("function"==typeof n){if(n(l))break}else if(S(l,n))break;if(Object.keys(l.properties||{}).length>0)break;l.parent&&(o=l.parent.removeProperty(l.name)),l=l.parent}return o}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{breakRemoveOn:o,removeParentsIfNoChildren:l}=t,n=e||this.current,a=n.parent.removeProperty(n.name);if(l){let e=this.recursiveRemoveIfNoChildren(n.parent,{breakRemoveOn:o});e&&(a=e)}return this.emit("remove",{removed:a})}removeWithoutEmit(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{breakRemoveOn:o,removeParentsIfNoChildren:l}=t,n=e||this.current,a=n.parent.removeProperty(n.name);if(l){let e=this.recursiveRemoveIfNoChildren(n.parent,{breakRemoveOn:o});e&&(a=e)}return a}insertBeforeBeginOrAfterEnd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.Schema.isSchemaInstance(this.current)||!n.Schema.isSchemaInstance(e)||this.current.parent!==e.parent)return;let o=0,l=0;return this.current.parent.mapProperties((t,n,a)=>{this.current.name===n&&(l=a),e.name===n&&(o=a)}),o>l?this.insertBeforeBegin(e,t):this.insertAfterEnd(e,t)}insertBeforeBegin(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.Schema.isSchemaInstance(this.current))return;let o={onSuccess:t.onSuccess},{wrap:l=y,breakRemoveOn:r,removeParentsIfNoChildren:i}=t;if(n.Schema.isSchemaInstance(e)){if(this.parentsIn(e))return void this.emit("error",{code:"parent_is_not_allowed",schema:e});e.parent.removeProperty(e.name),i&&(o.removed=this.recursiveRemoveIfNoChildren(e.parent,{breakRemoveOn:r}))}else e&&(e=(0,s.default)(e));let d={},u=!1,c=0,p=0;this.current.parent.mapProperties((e,t)=>{t===this.current.name&&(p=c,u=!0,++c),e["x-index"]=c,++c,u&&(d[t]=e,this.current.parent.removeProperty(t))}),this.prepareProperty(e);let m=l(e),h=this.current.parent.addProperty(m.name||(0,a.uid)(),m);h["x-index"]=p,h.parent=this.current.parent,this.current.parent.setProperties(d);let[x,v]=k(h,e);this.emit("insertAdjacent",{position:"beforeBegin",schema:v,wrapped:m,wrap:x,...o})}insertAfterBegin(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.Schema.isSchemaInstance(this.current))return;let o={onSuccess:t.onSuccess},{wrap:l=y,breakRemoveOn:r,removeParentsIfNoChildren:i}=t;if(n.Schema.isSchemaInstance(e)){if(this.parentsIn(e))return void this.emit("error",{code:"parent_is_not_allowed",schema:e});e.parent.removeProperty(e.name),i&&(o.removed=this.recursiveRemoveIfNoChildren(e.parent,{breakRemoveOn:r}))}else e&&(e=(0,s.default)(e));let d={},u=1;this.current.mapProperties((e,t)=>{e["x-index"]=u,++u,d[t]=e}),this.current.properties={},this.prepareProperty(e);let c=l(e),p=this.current.addProperty(c.name||(0,a.uid)(),c);p["x-index"]=0,p.parent=this.current,this.current.setProperties(d);let[m,h]=k(p,e);this.emit("insertAdjacent",{position:"afterBegin",schema:h,wrap:m,wrapped:c,...o})}insertBeforeEnd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.Schema.isSchemaInstance(this.current))return;delete e["x-index"];let o={onSuccess:t.onSuccess},{wrap:l=y,breakRemoveOn:r,removeParentsIfNoChildren:i}=t;if(n.Schema.isSchemaInstance(e)){if(this.parentsIn(e))return void this.emit("error",{code:"parent_is_not_allowed",schema:e});e.parent.removeProperty(e.name),i&&(o.removed=this.recursiveRemoveIfNoChildren(e.parent,{breakRemoveOn:r}))}else e&&(e=(0,s.default)(e));this.prepareProperty(e);let d=l(e),u=this.current.addProperty(d.name||(0,a.uid)(),d);u.parent=this.current;let[c,p]=k(u,e);return this.emit("insertAdjacent",{position:"beforeEnd",schema:p,wrap:c,wrapped:d,...o})}insertAfterEnd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.Schema.isSchemaInstance(this.current))return;let o={onSuccess:null==t?void 0:t.onSuccess},{wrap:l=y,breakRemoveOn:r,removeParentsIfNoChildren:i}=t,d=0,u=0,c=!1,p={};if(this.current.parent.mapProperties((e,t)=>{e["x-index"]=d,t===this.current.name&&(u=++d,c=!0),++d,c&&t!==this.current.name&&(p[t]=e,this.current.parent.removeProperty(t))}),n.Schema.isSchemaInstance(e)){if(this.parentsIn(e))return void this.emit("error",{code:"parent_is_not_allowed",schema:e});e.parent.removeProperty(e.name),i&&(o.removed=this.recursiveRemoveIfNoChildren(e.parent,{breakRemoveOn:r})),e.parent=null}else e&&(e=(0,s.default)(e));this.prepareProperty(e);let m=l(e),h=this.current.parent.addProperty(m.name||(0,a.uid)(),m);h.parent=this.current.parent,h["x-index"]=u,this.current.parent.setProperties(p);let[x,v]=k(h,e);this.emit("insertAdjacent",{position:"afterEnd",schema:v,wrap:x,wrapped:m,...o})}constructor(e){this.events={},this.options=e,this.current=e.current,this.appVersion=e.appVersion}}function w(){let e=(0,c.useContext)(n.SchemaOptionsContext),t=(0,c.useMemo)(()=>(null==e?void 0:e.components)||{},[e]);return e=>{if(!e)return null;if("string"!=typeof e)return e;let o=(0,d.default)(t,e);return o||console.error(`[nocobase]: Component "${e}" not found`),o}}function F(){let{designable:e,setDesignable:t,refresh:o,reset:a}=(0,c.useContext)(v.u),i=(0,c.useContext)(n.SchemaOptionsContext),s=(0,c.useMemo)(()=>(null==i?void 0:i.components)||{},[i]),b=(0,c.useMemo)(()=>()=>(0,l.jsx)(l.Fragment,{}),[]),y=(0,r.useUpdate)(),S=(0,h.o8)(),k=(0,h.cQ)(),C=(0,c.useCallback)(e=>{null==o||o(),y(),null==S||S(e),null==k||k()},[o,y,S,k]),M=(0,n.useField)(),w=(0,n.useFieldSchema)(),F=(0,m.VB)(),{t:P}=(0,p.useTranslation)(),j=(0,c.useMemo)(()=>g({t:P,api:F,refresh:C,current:w,model:M,appVersion:_.rE}),[P,F,C,w,M]);(0,c.useEffect)(()=>{j.loadAPIClientEvents()},[j]);let{isMobileLayout:A}=(0,f.useMobileLayout)();return{dn:j,designable:!A&&e,reset:a,refresh:C,setDesignable:t,DesignableBar:b,findComponent:(0,c.useCallback)(e=>{if(!e)return null;if("string"!=typeof e)return e;let t=(0,d.default)(s,e);return(null==t?void 0:t[x.PE])??t},[d.default]),on:j.on.bind(j),patch:(0,c.useCallback)((e,t)=>{let o=e=>{Object.keys(e).forEach(t=>{let o=e[t];"title"===t&&(M.title=o,w.title=o),"x-decorator-props"===t&&(M.decoratorProps||(M.decoratorProps={}),w["x-decorator-props"]||(w["x-decorator-props"]={}),Object.keys(o).forEach(e=>{M.decoratorProps[e]=o[e],w["x-decorator-props"][e]=o[e]})),"x-component-props"===t&&(M.componentProps||(M.componentProps={}),w["x-component-props"]||(w["x-component-props"]={}),Object.keys(o).forEach(e=>{M.componentProps[e]=o[e],w["x-component-props"][e]=o[e]}))})};if("string"==typeof e){let l={};return(0,u.default)(l,e,t),o(l)}o(e),C()},[j]),shallowMerge:(0,c.useCallback)(e=>{j.shallowMerge(e)},[j]),deepMerge:(0,c.useCallback)(e=>{j.deepMerge(e)},[j]),remove:(0,c.useCallback)((e,t)=>{j.remove(e,t)},[j]),insertAdjacent:(0,c.useCallback)((e,t,o)=>{j.insertAdjacent(e,t,o)},[j]),insertBeforeBegin:(0,c.useCallback)(e=>{j.insertBeforeBegin(e)},[j]),insertAfterBegin:(0,c.useCallback)(e=>{j.insertAfterBegin(e)},[j]),insertBeforeEnd:(0,c.useCallback)(e=>{j.insertBeforeEnd(e)},[j]),insertAfterEnd:(0,c.useCallback)(e=>{j.insertAfterEnd(e)},[j])}}},87463(e,t,o){o.d(t,{H:()=>d});var l=o(56920),n=o(51649),a=o(99300),r=o(57619),i=o(95951);let s=()=>null;s.isNullComponent=!0;let d=()=>{let{designable:e}=(0,i.er)(),t=(0,l.useFieldSchema)(),o=(0,n.useMemo)(()=>t["x-designer"]||t["x-toolbar"]?t["x-designer"]||t["x-toolbar"]:t["x-settings"]?a.Bw:s,[t]),d=(0,r.x)(o);return e&&d||s}},81547(e,t,o){o.d(t,{j:()=>i});var l=o(56920),n=o(51649),a=o(77843),r=o(43288);let i=e=>{var t;let{t:o}=(0,a.useTranslation)(),{getCollectionJoinField:i,getCollection:s}=(0,r.nj)(),d=(0,l.useFieldSchema)(),u=(null==e?void 0:e.fieldSchema)||d,c=(0,l.useField)(),p=(0,l.useForm)(),m=(null==u?void 0:u["x-read-pretty"])||c.readPretty||p.readPretty,h=null==e?void 0:e.fieldSchema,{getField:x}=(0,r.k7)(),v=(null==e?void 0:e.collectionField)||x(u.name)||i(u["x-collection-field"]),{label:_}=(null==(t=u["x-component-props"])?void 0:t.fieldNames)||{};return((0,n.useMemo)(()=>{if(!v||!(null==v?void 0:v.interface)||!["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(v.type))return;let e=s(v.target);if((null==e?void 0:e.template)==="file")return m?[{label:o("Title"),value:"Select"},{label:o("File manager"),value:"FileManager"},{label:o("Tag"),value:"Tag"}]:[{label:o("Select"),value:"Select"},{label:o("Record picker"),value:"Picker"},{label:o("File manager"),value:"FileManager"}];if((null==e?void 0:e.template)==="tree"&&["m2m","o2m","m2o"].includes(v.interface))return m?[{label:o("Title"),value:"Select"},{label:o("Tag"),value:"Tag"},!h&&{label:o("Sub-details"),value:"Nester"},!h&&{label:o("Sub-table"),value:"SubTable"}]:[{label:o("Select"),value:"Select"},{label:o("Record picker"),value:"Picker"},!h&&["m2m","o2m"].includes(v.interface)&&{label:o("Sub-table"),value:"SubTable"},!h&&{label:o("Cascader Select"),value:"CascadeSelect"},!h&&{label:o("Sub-form"),value:"Nester"},{label:o("Sub-form(Popover)"),value:"PopoverNester"}];switch(v.interface){case"o2m":return m?[{label:o("Title"),value:"Select"},{label:o("Tag"),value:"Tag"},!h&&{label:o("Sub-table"),value:"SubTable"},!h&&{label:o("Sub-details"),value:"Nester"}]:[{label:o("Select"),value:"Select"},{label:o("Record picker"),value:"Picker"},!h&&{label:o("Sub-form"),value:"Nester"},{label:o("Sub-form(Popover)"),value:"PopoverNester"},!h&&{label:o("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return m?[{label:o("Title"),value:"Select"},{label:o("Tag"),value:"Tag"},!h&&{label:o("Sub-details"),value:"Nester"},!h&&{label:o("Sub-table"),value:"SubTable"}]:[{label:o("Select"),value:"Select"},{label:o("Record picker"),value:"Picker"},!h&&{label:o("Sub-table"),value:"SubTable"},!h&&{label:o("Sub-form"),value:"Nester"},{label:o("Sub-form(Popover)"),value:"PopoverNester"}];default:return m?[{label:o("Title"),value:"Select"},{label:o("Tag"),value:"Tag"},!h&&{label:o("Sub-details"),value:"Nester"}]:[{label:o("Select"),value:"Select"},{label:o("Record picker"),value:"Picker"},!h&&{label:o("Sub-form"),value:"Nester"},{label:o("Sub-form(Popover)"),value:"PopoverNester"}]}},[o,null==v?void 0:v.interface,_,m,h])||[]).filter(Boolean)}},4922(e,t,o){o.d(t,{Y:()=>n});let l=()=>({}),n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{useProps:t=l,...o}=e,n=t;"function"!=typeof t&&(n=l);let a=n();return{...o,...a}}},39247(e,t,o){o.d(t,{F:()=>a});var l=o(51649),n=o(63557);function a(){return(0,l.useContext)(n.u)}},82924(e,t,o){o.d(t,{iI7:()=>D.iI,a1G:()=>u.ShowFormData,yt2:()=>th.yt,flR:()=>r.fl,FVw:()=>nX.FV,FrL:()=>nv.Fr,CqQ:()=>L,$Eq:()=>T,ZB7:()=>nX.ZB,TrS:()=>th.Tr,sIN:()=>rk.sI,a2g:()=>u.getRenderContent,t6u:()=>c.t6,qIn:()=>lQ.qI,HPy:()=>r.HP,R_2:()=>lX.R_,doK:()=>D.do,bZ4:()=>r.bZ,pxY:()=>eu.px,pde:()=>lX.pd,CEt:()=>nv.CE,lum:()=>eu.lu,OpO:()=>c.Op,tO8:()=>r.tO,nxV:()=>nv.nx,TDj:()=>tG,xA9:()=>nX.xA,lNE:()=>aE.l,ud$:()=>e5,l46:()=>nh,X_:()=>u.DraggableContext,QD_:()=>nv.QD,ud1:()=>r.ud,Dgp:()=>D.Dg,tvd:()=>D.tv,QEB:()=>aN,X6x:()=>aF.X6,jZb:()=>tB,tn0:()=>lQ.tn,dF1:()=>oo.dF,kBD:()=>eu.kB,Gjn:()=>r.Gj,VFg:()=>aF.VF,Pnr:()=>nv.Pn,zN:()=>r.zN,dKS:()=>aj,LMh:()=>lX.LM,lTd:()=>ew,rlt:()=>eB,dWC:()=>tx.dW,cWk:()=>r.cW,Zy6:()=>th.Zy,PB5:()=>aO.PB,UTu:()=>nv.UT,jeY:()=>D.je,TB2:()=>r.TB,D6h:()=>nW,d9b:()=>oo.d9,fM:()=>tz,X43:()=>tU.X,uc_:()=>nT,pEl:()=>aO.pE,T$Q:()=>tU.T,GD6:()=>c.GD,mJi:()=>lX.mJ,C5g:()=>tq.C5,OJX:()=>eu.OJ,Bmi:()=>rs,u4V:()=>rz.u,lrV:()=>nv.lr,fDF:()=>a.fD,N$k:()=>e1.N$,_sT:()=>oo._s,rNg:()=>tO.rN,RhU:()=>r.Rh,Bnf:()=>oH,UyB:()=>e2,xq$:()=>D.xq,RB3:()=>aO.RB,I5x:()=>eR,hqJ:()=>lX.hq,XIK:()=>a8,m2w:()=>lO,ccy:()=>r$,NVg:()=>tq.NV,kDr:()=>D.kD,J3t:()=>tx.J3,d09:()=>r.d0,AG:()=>rg,Xjr:()=>oK,uwA:()=>e1.uw,KDQ:()=>em,$mi:()=>oT.$,L1H:()=>u.Sortable,QoO:()=>nv.Qo,q7s:()=>D.q7,Mp5:()=>u.DndContext,xB5:()=>eu.xB,B4G:()=>D.B4,YIz:()=>ap,$xS:()=>aU,o8F:()=>oG,qKt:()=>aO.qK,_OO:()=>oo._O,qy$:()=>nn,W1t:()=>th.W1,Z0V:()=>lQ.Z0,cGx:()=>nf,Q2z:()=>nv.Q2,YW0:()=>tF,HvB:()=>c.Hv,ic7:()=>nK,QpY:()=>D.Qp,tUM:()=>rx,oAT:()=>D.oA,zBI:()=>e7,gBz:()=>u.SortableProvider,eIh:()=>D.eI,i_r:()=>nN.i,DVX:()=>D.DV,b7u:()=>e1.b7,Mwt:()=>aO.Mw,Kql:()=>r.Kq,XOn:()=>D.XO,ozN:()=>aw.o,nu1:()=>tm.n,rTt:()=>rk.rT,eBw:()=>nJ,xZI:()=>eu.xZ,MIq:()=>r.MI,JaO:()=>nO,htN:()=>eU,Eaz:()=>r.E,qy5:()=>nc,IX0:()=>tO.IX,lSn:()=>tq.lS,BsJ:()=>e1.Bs,_22:()=>aR,sxL:()=>oC,xPi:()=>tm.x,b2W:()=>nq.b,sDQ:()=>aV,Xzy:()=>D.Xz,gt0:()=>az,QIX:()=>e4,i_F:()=>lJ,Ypd:()=>r.Yp,SOm:()=>e1.SO,VXI:()=>r.VX,nKd:()=>tR,N3p:()=>c.N3,dJT:()=>e1.dJ,vPC:()=>D.vP,a97:()=>eu.a9,TNL:()=>D.TN,xAQ:()=>tw,Qgm:()=>aF.Qg,RLS:()=>ar,OqW:()=>e1.Oq,j0_:()=>nM,zVE:()=>rS,yVm:()=>r.yV,B_g:()=>n_,Hbp:()=>eu.Hb,lhV:()=>D.lh,yGk:()=>e1.yG,QIi:()=>eu.QI,Q00:()=>aP,OAH:()=>c.OA,JQe:()=>D.JQ,xqq:()=>r.xq,zEg:()=>e6.z,wN6:()=>aw.w,fDM:()=>nv.fD,uUT:()=>tV,BCL:()=>rt.BC,D50:()=>r.D5,Fag:()=>eu.F,MoU:()=>r.Mo,wnJ:()=>e1.wn,ISS:()=>aF.IS,m$h:()=>t2,c_d:()=>e1.c_,Hi5:()=>rc,x1p:()=>nv.x1,DYS:()=>c.DY,U6o:()=>r.U6,LjE:()=>eu.Lj,l2i:()=>r.l2,Um:()=>e1.Um,Y2j:()=>tP,O$4:()=>aO.O$,G2C:()=>t9.G2,wA7:()=>rA,$t1:()=>D.$t,_bM:()=>oo._b,b6K:()=>oT.b,vzL:()=>nl,lNX:()=>oo.lN,rcl:()=>r.rc,gZ:()=>aO.gZ,msY:()=>nv.ms,U8O:()=>r.U8,Sh8:()=>r.Sh,mhY:()=>eu.mh,tXY:()=>tq.tX,Sc0:()=>oF,p9h:()=>ru,gBZ:()=>u.SortableContext,JDj:()=>rf,hbv:()=>nx,RD4:()=>nV.R,bee:()=>aO.be,PSc:()=>r.PS,hsK:()=>e6.h,oVU:()=>l7,IJ7:()=>D.IJ,f2z:()=>o1.f,OZ6:()=>aF.OZ,pA3:()=>e1.pA,$5j:()=>r.$5,J1:()=>D.J1,dVP:()=>u.DateFilterDynamicComponent,E76:()=>r.E7,j9R:()=>lZ,vjx:()=>nL,mz8:()=>nX.mz,Doh:()=>c.Do,vxQ:()=>l3,Us6:()=>eu.Us,UqM:()=>u.SortableItem,lVW:()=>A,f7I:()=>ry,ARu:()=>t1,TDH:()=>eu.TD,l6P:()=>ek,g9w:()=>e1.g9,s23:()=>tY,GjU:()=>r.nY,GmQ:()=>aO.Gm,skP:()=>ns,C4D:()=>nr,arW:()=>as,v93:()=>ri,Wis:()=>r.Wi,jE9:()=>eu.jE,dbD:()=>nB.d,Ff5:()=>D.Ff,gM2:()=>e1.gM,FZR:()=>lX.FZ,PnP:()=>rC.P,nlx:()=>eY,AQf:()=>lQ.AQ,FoY:()=>a$,w2W:()=>aO.w2,z45:()=>r.z4,bkX:()=>tK,jgC:()=>rr,Ur4:()=>rP,lE3:()=>D.lE,U5u:()=>D.U5,LtX:()=>r.Lt,cl6:()=>a_,d1R:()=>eu.d1,rrz:()=>tx.rr,B8B:()=>aM,hY7:()=>o1.h,Ob5:()=>th.Ob,erX:()=>eu.er,MqW:()=>c.Mq,S5r:()=>nq.S,YYe:()=>eu.YY,ami:()=>rk.am,LBS:()=>nH,L3t:()=>u.DragHandler,oMF:()=>eh});var l,n={};o.r(n),o.d(n,{Action:()=>r.rc,ActionBar:()=>r.E7,ActionBarProvider:()=>r.xq,ActionContext:()=>r.yV,ActionContextNoRerender:()=>r.Wi,ActionContextProvider:()=>r.z4,ActionDesigner:()=>r.U6,AfterSuccess:()=>r.Kq,AllDataBlocksContext:()=>tx.rr,AllDataBlocksProvider:()=>tx.J3,AntdSchemaComponentPlugin:()=>tK,AntdSchemaComponentProvider:()=>tG,AppendsTreeSelect:()=>t2,AssignedFieldValues:()=>r.TB,AssociationField:()=>lO,AssociationFieldMode:()=>oH,AssociationFieldModeProvider:()=>oG,AssociationSelect:()=>lJ,AttachmentList:()=>oo._s,AutoComplete:()=>lZ,BackButtonUsedInSubPage:()=>e6.h,Block:()=>nJ,BlockItem:()=>lQ.Z0,BlockItemCard:()=>lQ.tn,BlockItemCardContext:()=>lQ.AQ,BlocksSelector:()=>r.Gj,ButtonEditor:()=>r.Yp,CardItem:()=>l7,Cascader:()=>l3,Checkbox:()=>oF,CollectionSelect:()=>nl,ColorPicker:()=>ns,ColorSelect:()=>nc,Cron:()=>nh,CronSet:()=>nx,DataSourceCollectionCascader:()=>nr,DataSourceSelect:()=>nn,DateFormatCom:()=>nq.b,DatePicker:()=>nv.lr,DatePickerProvider:()=>nv.Qo,Details:()=>n_,DetailsDesigner:()=>L,Divider:()=>nf,EditComponent:()=>D.iI,EditDefaultValue:()=>D.tv,EditDescription:()=>D.JQ,EditOperator:()=>D.B4,EditPattern:()=>D.$t,EditRequired:()=>D.Qp,EditSortField:()=>rr,EditTable:()=>nM,EditTableAction:()=>nL,EditTableActionContext:()=>nT,EditTitle:()=>D.Xz,EditTitleField:()=>D.Ff,EditTooltip:()=>D.IJ,EditValidationRules:()=>D.vP,Editable:()=>a$,EllipsisWithTooltip:()=>lX.R_,ErrorFallback:()=>tm.x,Expand:()=>nO,ExpiresRadio:()=>nq.S,FieldsTreeSelect:()=>t1,Fieldset:()=>nH,Filter:()=>e1.dJ,FilterAction:()=>e1.Bs,FilterActionContext:()=>e1.SO,FilterContext:()=>e1.gM,FilterDynamicComponent:()=>e1.N$,FilterLogicContext:()=>e1.c_,Form:()=>A,FormDialog:()=>nV.R,FormDrawer:()=>rA,FormField:()=>e7,FormItem:()=>D.eI,FormV2:()=>eU,G2Plot:()=>nW,G2PlotRenderer:()=>nK,Grid:()=>nX.xA,GridCard:()=>ar,GridRowContext:()=>nX.mz,HTMLEncode:()=>lX.mJ,ICON_POPUP_Z_INDEX:()=>oT.b,IconPicker:()=>as,Input:()=>lX.pd,InputNumber:()=>ap,InputReadPretty:()=>lX.FZ,InputRecordPicker:()=>aO.qK,Json:()=>lX.LM,LinkageFilter:()=>r$,List:()=>aM,Markdown:()=>aw.o,MarkdownReadPretty:()=>aw.w,Menu:()=>th.W1,NanoIDInput:()=>aP,Page:()=>tF,PagePopups:()=>tO.rN,PageTabs:()=>tP,Pagination:()=>aj,ParentRouteContext:()=>th.Zy,Password:()=>aR,Percent:()=>aN,PopupSettingsProvider:()=>tU.T,Preview:()=>aE.l,QuickEdit:()=>az,Radio:()=>oC,ReadPretty:()=>lX.hq,ReadPrettyRecordPicker:()=>aO.w2,RecordPicker:()=>aO.O$,RecordPickerContext:()=>aO.pE,RecordPickerProvider:()=>aO.be,RefreshDataBlockRequest:()=>r.ud,RemoteSelect:()=>ew,RemoveButton:()=>r.d0,RemoveConditionContext:()=>e1.b7,RequestSettings:()=>r.Rh,RichText:()=>aV,SecondConFirm:()=>r.VX,Select:()=>ek,SkipValidation:()=>r.zN,Space:()=>aU,StablePopover:()=>oT.$,Table:()=>a8,TableBlockDesigner:()=>ri,TableField:()=>rs,TableSelectorDesigner:()=>ru,TableV2:()=>rc,Tabs:()=>rx,TabsContextProvider:()=>o1.h,Templates:()=>eR,TestDesigner:()=>lQ.qI,TextAreaWithGlobalScope:()=>rP,TimePicker:()=>rg,TreeSelect:()=>ry,UnixTimestamp:()=>rS,Upload:()=>oo._O,Uploader:()=>oo.d9,Variable:()=>rk.rT,VariableScopeProvider:()=>rk.sI,VariableSelect:()=>rC.P,actionSettings:()=>r.Sh,actionSettingsItems:()=>r.Mo,allowAddNew:()=>D.lE,attachmentFileTypes:()=>oo.lN,defaultFieldNames:()=>em,fetchTemplateData:()=>eB,filterFormItemSettings:()=>D.Dg,findByUid:()=>aF.X6,findKeysByUid:()=>aF.VF,findMenuItem:()=>aF.OZ,formDetailsSettings:()=>e4,formItemSettings:()=>D.DV,formSettings:()=>e2,formV1Settings:()=>T,genStyleHook:()=>a.fD,getCurrentOptions:()=>eh,getDateExact:()=>nv.Q2,getDatePickerLabels:()=>aO.Mw,getDateRanges:()=>nv.fD,getLabelFormatValue:()=>aO.PB,getPopupPathFromParams:()=>tq.C5,getStoredPopupContext:()=>tq.lS,getTabSchema:()=>tB,getZIndex:()=>r.fl,handleDateChangeOnForm:()=>nv.QD,inferPickerType:()=>nv.Pn,isBulkEditAction:()=>r.PS,isFileCollection:()=>D.XO,isMobile:()=>nv.Fr,isShowFilePicker:()=>aO.Gm,isTabPage:()=>tR,isWriteEmailAction:()=>r.cW,mapDatePicker:()=>nv.x1,mapRangePicker:()=>nv.UT,mapTimeFormat:()=>rf,matchMimetype:()=>oo._b,moment2str:()=>nv.ms,navigateToTab:()=>tY,pageSettings:()=>tz,pageTabSettings:()=>tV,readPrettyFormSettings:()=>e5,removeNullCondition:()=>e1.pA,resolveFilterPickerFormat:()=>nv.CE,storePopupContext:()=>tq.NV,useActionBarContext:()=>r.MI,useActionContext:()=>r.D5,useAfterSuccessOptions:()=>r.bZ,useAllDataBlocks:()=>tx.dW,useAssociationFieldContext:()=>t9.G2,useAssociationFieldModeContext:()=>oK,useBackButton:()=>e6.z,useCloseAction:()=>r.nY,useColumnSchema:()=>rt.BC,useColumnSettings:()=>nB.d,useCurrentPopupContext:()=>tO.IX,useDatePickerContext:()=>nv.nx,useDownloadLogs:()=>tm.n,useEnsureOperatorsValid:()=>D.lh,useFieldMode:()=>D.J1,useFieldNames:()=>aO.gZ,useFilterActionProps:()=>e1.Um,useFilterFieldOptions:()=>e1.g9,useFilterFieldProps:()=>e1.yG,useFilterOptions:()=>e1.uw,useFormDataTemplates:()=>eY,useGetAriaLabelOfAction:()=>r.U8,useGetAriaLabelOfDrawer:()=>r.HP,useGetAriaLabelOfModal:()=>r.tO,useGetAriaLabelOfPopover:()=>r.l2,useGetFilterFieldOptions:()=>e1.Oq,useGetFilterOptions:()=>e1.wn,useGridContext:()=>nX.ZB,useGridRowContext:()=>nX.FV,useIsAddNewForm:()=>D.TN,useIsAssociationField:()=>D.xq,useIsFieldReadPretty:()=>D.U5,useIsFileField:()=>D.oA,useIsFormReadPretty:()=>D.q7,useIsSelectFieldMode:()=>D.je,useKeepAliveLocationSearch:()=>tw,useLabelUiSchema:()=>aO.RB,useLinkageAction:()=>r.Lt,useListBlockContext:()=>a_,useMenuDragEnd:()=>th.yt,useMenuTranslation:()=>aF.Qg,useNocoBaseRoutes:()=>th.Ob,useParentRoute:()=>th.Tr,usePopupSettings:()=>tU.X,useStyles:()=>aF.IS,useTableColumnIntegration:()=>nN.i,useTabsContext:()=>o1.f,useTitleFieldOptions:()=>D.kD,useUploadStyles:()=>oo.dF,useValidateSchema:()=>D.do,useVariableScope:()=>rk.am,useZIndexContext:()=>r.$5,withSearchParams:()=>tq.tX,zIndexContext:()=>r.E});var a=o(54969),r=o(78562),i=o(71178),s=o(51649),d=o(83468),u=o(91032),c=o(90995),p=o(72548);let m=e=>async function(){try{var t;let o=await this.api.request(e);return null==o||null==(t=o.data)?void 0:t.data}catch(e){return[]}};var h=o(56220),x=o(44814),v=o(56920),_=o(52793),f=o(16211),g=o(43288),b=o(30644),y=o(99300),S=o(25952),k=o(96932),C=o(24768);let M=e=>{let{form:t,children:o,...l}=e,n=(0,v.useField)(),a=(0,v.useFieldSchema)(),r=(0,eu.TD)(t.createVoidField({...n.props,basePath:""}));return(0,i.jsx)(v.FieldContext.Provider,{value:void 0,children:(0,i.jsx)(v.FormContext.Provider,{value:t,children:(0,i.jsx)(h.FormLayout,{layout:"vertical",...l,children:(0,i.jsx)(b.dw,{basePath:r.address,schema:a,onlyRenderProperties:!0})})})})},w=e=>e.children,F=e=>{let{form:t,children:o,disabled:l,...n}=e,a=(0,v.useField)(),r=(0,v.useFieldSchema)(),d=(0,eu.TD)(t.createVoidField({...a.props,basePath:""})),u=(0,eu.xZ)(r["x-component"],w);return(0,s.useEffect)(()=>{t.disabled=l||a.disabled},[l,a.disabled]),(0,i.jsx)(_.ConfigProvider,{componentDisabled:l,children:(0,i.jsx)(v.FieldContext.Provider,{value:void 0,children:(0,i.jsx)(v.FormContext.Provider,{value:t,children:(0,i.jsx)(h.FormLayout,{layout:"vertical",...n,children:(0,i.jsx)(v.FieldContext.Provider,{value:d,children:(0,i.jsx)(u,{...a.componentProps,children:(0,i.jsx)(b.dw,{basePath:d.address,schema:r,onlyRenderProperties:!0})})})})})})})},P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,f.bP)((e=>{let{request:t,initialValue:o}=e;return t||(()=>Promise.resolve({data:o}))})(t),e)},j=(0,s.createContext)(null);j.displayName="FormBlockContext";let A=(0,v.observer)(e=>{let{request:t,effects:o,initialValue:l,useValues:n=P,...a}=e,r=(0,v.useFieldSchema)(),d=(0,v.useField)(),u=(0,s.useMemo)(()=>(0,x.createForm)({effects:o}),[]),c=n({uid:r["x-uid"],async onSuccess(e){await u.reset(),u.setValues(null==e?void 0:e.data),u.setInitialValues(null==e?void 0:e.data)}},e),p=(0,s.useContext)(j);return(0,i.jsx)(j.Provider,{value:{parent:p,form:u,result:c,field:d,fieldSchema:r},children:(0,i.jsx)(_.Spin,{spinning:(null==c?void 0:c.loading)||!1,children:"Form"===r["x-decorator"]?(0,i.jsx)(F,{form:u,...a}):(0,i.jsx)(M,{form:u,...a})})})},{displayName:"Form"});A.Designer=function(){let{name:e,title:t}=(0,g.k7)(),o=(0,k.D$)(),{componentNamePrefix:l}=(0,C.kU)();return(0,i.jsxs)(y.xK,{template:o,title:t||e,children:[(0,i.jsx)(S.l,{componentName:`${l}Form`,collectionName:e}),(0,i.jsx)(y.kT,{}),(0,i.jsx)(y.d$,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var I=o(31675);let T=new I.RT({name:"FormV1Settings",items:[{name:"template",Component:S.l,useComponentProps(){let{name:e}=(0,g.k7)(),{componentNamePrefix:t}=(0,C.kU)();return{componentName:`${t}Form`,collectionName:e}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]});var D=o(60929);let L=()=>{let{name:e,title:t}=(0,g.k7)(),o=(0,k.D$)();return(0,i.jsx)(y.xK,{schemaSettings:"FormDetailsSettings",template:o,title:t||e})};var Y=o(69412),R=o(80461),B=o(99847),N=o(49948),E=o(10691),$=o(27404),z=o(77583),O=o(17157),q=o(18111),H=o(70136),V=o(28227),U=o(14187),G=o(92619),K=o(4627),W=o(83006),J=o(43923),X=o(4922),Z=o(95951),Q=o(95210),ee=o(62152),et=o(63526),eo=o(77843),el=o(69575),en=o(65457),ea=o(82113),er=o(91815),ei=o(23460),es=o(29558),ed=o(58980),eu=o(16319),ec=o(46724),ep=o(81607);let em={label:"label",value:"value",color:"color",options:"children"};function eh(e,t,o){let l=function e(t,o){let l=[];if(!Array.isArray(t))return l;for(let n=0;n<t.length;n++){let a=t[n][o.options];Array.isArray(a)&&l.push(...e(a,o)),l.push({...t[n]})}return l}(t,o),n=(0,z.castArray)(e).map(e=>(0,et.isPlainObject)(e)?e[o.value]:e);if(!l)return[];let a=[];for(let e of n){let t=l.find(t=>t[o.value]==e)||{value:e,label:e?e.toString():e};a.push(t)}return a}var ex=o(84951),ev=o(60430);let e_=(0,v.observer)(e=>{let[t,o]=(0,s.useState)(!0),[l,n]=(0,s.useState)([]),a=(0,v.useField)(),r=(0,ec.E1)();return((0,s.useEffect)(()=>{var t;let l={...em,...e.fieldNames},s=a.dataSource||e.options||(null==r?void 0:r.uiSchema.enum)||[],d=eh(a.value,s,l);!(0,$.isValid)(e.value)&&!d.length||(0,x.isArrayField)(a)&&(null==a||null==(t=a.value)?void 0:t.length)===0||(n(null!==a.value&&d.map((e,t)=>(0,i.jsx)(_.Tag,{color:e[l.color],icon:"string"==typeof e.icon?(0,i.jsx)(ev.In,{type:e.icon}):e.icon,children:e[l.label]},t))),o(!1))},[null==r?void 0:r.uiSchema.enum,a,a.dataSource,a.value,e.fieldNames,e.options,e.value]),t)?null:(0,i.jsx)(ep.R,{ellipsis:e.ellipsis,children:l})},{displayName:"SelectReadPretty"}),ef=(0,ex.A)(e_),eg=e=>{let{value:t,options:o,onChange:l,fieldNames:n,mode:a,loading:r,rawOptions:s,defaultValue:d,...u}=e,c=ey.isDesktop?"":eS,p=ey.isDesktop?void 0:"topLeft",m=t=>{var l;if(!(0,$.isValid)(t)||"object"==typeof t&&0===Object.keys(t).length)return;let r=null==(l=eh((0,$.toArr)(t).filter(e=>e).map(e=>(0,et.isPlainObject)(e)?e[n.value]:e),o,n))?void 0:l.map(e=>({label:e[n.label],value:e[n.value]}));return["tags","multiple"].includes(a)||e.multiple?r:r.shift()};return(0,i.jsx)(_.Select,{rootClassName:c,placement:p,role:"button","data-testid":`select-object-${a||"single"}`,value:m(t),defaultValue:m(d),allowClear:{clearIcon:(0,i.jsx)(ea.CloseCircleFilled,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:r?(0,i.jsx)(_.Spin,{}):(0,i.jsx)(_.Empty,{image:_.Empty.PRESENTED_IMAGE_SIMPLE}),options:o,fieldNames:n,showSearch:!0,popupMatchSelectWidth:!1,filterOption:(e,t)=>((null==t?void 0:t[n.label||"label"])??"").includes(e),filterSort:(e,t)=>((null==e?void 0:e[n.label||"label"])??"").toLowerCase().localeCompare(((null==t?void 0:t[n.label||"label"])??"").toLowerCase()),onChange:t=>{let r=eh((0,$.toArr)(t).map(e=>e.value),s||o,n);["tags","multiple"].includes(a)||e.multiple?null==l||l(r):null==l||l(r.shift()||null)},mode:a,tagRender:e=>(0,i.jsx)(_.Tag,{role:"button","aria-label":e.label,closeIcon:(0,i.jsx)(ea.CloseOutlined,{role:"button","aria-label":"icon-close-tag"}),...e,children:e.label}),maxTagCount:"responsive",maxTagPlaceholder:e=>(0,i.jsxs)(_.Tooltip,{title:(0,i.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6,maxWidth:"100%"},children:e.map(e=>(0,i.jsx)(_.Tag,{style:{margin:0,background:"#fafafa",border:"1px solid #d9d9d9",whiteSpace:"normal",wordBreak:"break-word",maxWidth:"100%"},children:e.label},e.value))}),overlayInnerStyle:{background:"#fff",color:"#000",padding:8,maxWidth:"100%"},color:"#fff",overlayStyle:{pointerEvents:"auto",maxWidth:300},children:["+",e.length,"..."]}),...u})},eb=(e,t)=>((null==t?void 0:t.label)??"").toLowerCase().includes((e||"").toLowerCase()),eS=(0,E.css)`
1017
1017
  & .ant-select-selection-search-input {
1018
1018
  opacity: 0.1 !important;
1019
1019
  }
1020
- `,ek=(0,v.connect)(e=>{let{objectValue:t,loading:o,value:l,rawOptions:n,defaultValue:a,...r}=e,d=(0,eu.lu)(),u=ey.isDesktop?"":eS,c=ey.isDesktop?void 0:"topLeft",p=e.multiple?"multiple":e.mode;if(p&&!["multiple","tags"].includes(p)&&(p=void 0),(0,s.useEffect)(()=>{if(null!=l&&!Array.isArray(l)&&(["tags","multiple"].includes(e.mode)||e.multiple)){var t;null==(t=e.onChange)||t.call(e,[l])}},[l,e.mode,e.multiple,e.onChange]),t)return(0,i.jsx)(eg,{rawOptions:n,...r,defaultValue:a,value:l,mode:p,loading:o});let m=t=>["tags","multiple"].includes(e.mode)||e.multiple?t?(0,$.toArr)(t):void 0:t;return(0,i.jsx)(_.Select,{rootClassName:u,placement:c,role:"button","data-testid":`select-${p||"single"}`,showSearch:!0,filterOption:eb,allowClear:{clearIcon:(0,i.jsx)(ea.CloseCircleFilled,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:o?(0,i.jsx)(_.Spin,{}):(0,i.jsx)(_.Empty,{image:_.Empty.PRESENTED_IMAGE_SIMPLE}),value:m(l),defaultValue:m(a),tagRender:e=>(0,i.jsx)(_.Tag,{role:"button","aria-label":e.label,closeIcon:(0,i.jsx)(ea.CloseOutlined,{role:"button","aria-label":"icon-close-tag"}),...e,children:e.label}),...d(r),onChange:t=>{var o;null==(o=e.onChange)||o.call(e,void 0===t?null:t)},mode:p,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,i.jsxs)(_.Tooltip,{title:(0,i.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6,maxWidth:"100%"},children:e.map(e=>(0,i.jsx)(_.Tag,{style:{margin:0,background:"#fafafa",border:"1px solid #d9d9d9",whiteSpace:"normal",wordBreak:"break-word",maxWidth:"100%"},children:e.label},e.value))}),overlayInnerStyle:{background:"#fff",color:"#000",padding:8,maxWidth:"100%"},color:"#fff",overlayStyle:{pointerEvents:"auto",maxWidth:300},children:["+",e.length,"..."]})})},(0,v.mapProps)({dataSource:"options"},(e,t)=>{var o,l,n,a;let{value:r,options:s}=e,d=(0,z.every)(s,e=>e.value!==r)&&(null==t||null==(a=t.data)||null==(n=a.dataSource)||null==(l=n.find)||null==(o=l.call(n,e=>e.value===r))?void 0:o.label)||r;return{...e,value:d,fieldNames:{...em,...e.fieldNames},suffixIcon:(null==t?void 0:t.loading)||(null==t?void 0:t.validating)?(0,i.jsx)(ea.LoadingOutlined,{}):e.suffixIcon}}),(0,v.mapReadPretty)(ef));ek.ReadPretty=ef;var eC=o(41944);let eM=(0,v.observer)(e=>{let t,o={...em,...e.fieldNames},l=(0,v.useField)(),n=(0,v.useFieldSchema)(),a=(0,eC.pE)(),{snapshot:s}=(0,r.D5)(),{data:d}=(0,f.bP)(s?async()=>({data:a[n.name]}):{action:"list",...e.service,params:{paginate:!1,filter:{[o.value]:{$in:(t=l.value,(0,z.castArray)(t).filter(e=>null!=e).map(e=>"object"==typeof e?e[o.value]:e))}}}},{refreshDeps:[e.service,l.value]});return(0,i.jsx)(ek.ReadPretty,{...e,options:null==d?void 0:d.data})},{displayName:"ReadPretty"}),ew=(0,R.T)((0,v.connect)(e=>{var t,o;let{fieldNames:l={},service:n={},wait:a=300,value:r,defaultValue:d,objectValue:u,manual:c=!0,mapOptions:p,targetField:m,CustomDropdownRender:h,optionFilter:x,dataSource:b,toOptionsItem:y=e=>e,popupMatchSelectWidth:S=!1,onSuccess:k,...C}=e,M=(0,ei.Mp)(),w=(0,es.TF)(b||M),F=(0,s.useRef)(!1),P=(0,v.useFieldSchema)(),j=(null==(t=P["x-component-props"])?void 0:t.addMode)==="quickAdd",{getField:A}=(0,g.k7)(),I=(0,s.useRef)(null),{getCollectionJoinField:T,getInterface:D}=(0,g.nj)(),L=P["x-collection-field"]||P.name,Y=A(L)||T(L),R=m||(null==Y?void 0:Y.target)&&(null==l?void 0:l.label)&&T(`${Y.target}.${l.label}`),B=(0,s.useMemo)(()=>{if(null==R?void 0:R.interface){var e;let t=D(R.interface),o=(null==t||null==(e=t.filterable)?void 0:e.operators[0].value)||"$includes";return"string"===R.type||"string"===R.dataType?"$includes":o}return"$includes"},[D,null==R?void 0:R.dataType,null==R?void 0:R.interface,null==R?void 0:R.type]),N=(0,eu.lu)(),E=(0,s.useCallback)(e=>{try{return e.filter(e=>["number","string"].includes(typeof e[l.value])||!e[l.value]).map(e=>{var t;let o=N(e[l.label]);if(null==R||null==(t=R.uiSchema)?void 0:t.enum)if(Array.isArray(o))o=o.map((e,t)=>{let o=R.uiSchema.enum.find(t=>t.value===e);return o?(0,i.jsx)(_.Tag,{role:"button",color:o.color,style:{marginRight:3},children:(null==o?void 0:o.label)||e},t):(0,i.jsx)(_.Tag,{role:"button",children:e},e)}).reverse();else{let e=R.uiSchema.enum.find(e=>e.value===o);e&&(o=(0,i.jsx)(_.Tag,{role:"button",color:e.color,children:e.label}))}return((null==R?void 0:R.type)==="date"&&(o=(0,er.default)(o).format("YYYY-MM-DD")),p)?p({[l.label]:o||"N/A",[l.value]:e[l.value]}):{...(0,z.omit)(e,"style"),[l.label]:o||"N/A",[l.value]:e[l.value]}}).filter(Boolean)}catch(t){return console.error(t),e}},[l.value,l.label,N,null==R?void 0:R.uiSchema.enum,null==R?void 0:R.type,p]),{data:$,run:O,loading:q}=(0,f.bP)({action:"list",...n,headers:w,params:{pageSize:200,...null==n?void 0:n.params,filter:null==n||null==(o=n.params)?void 0:o.filter}},{manual:c,debounceWait:a,onSuccess:k,...n.defaultParams?{defaultParams:[n.defaultParams]}:{}}),{data:H,run:V,loading:U}=(0,f.bP)({action:"get",...n,headers:w},{manual:!0,debounceWait:a}),G=(0,s.useMemo)(()=>JSON.stringify({service:n,fieldNames:l}),[n,l]),K=(0,s.useCallback)(()=>I.current&&h?(0,i.jsx)(h,{search:I.current,callBack:()=>{I.current=null}}):null,[h]);(0,s.useEffect)(()=>{F.current&&O()},[O,G]),(0,s.useEffect)(()=>{!u&&(null==$?void 0:$.data)&&(Array.isArray(r)?r.length:null!=r)&&!(null==$?void 0:$.data.some(e=>e[l.value]===r))&&V({filterByTk:r})},[r,null==$?void 0:$.data,u,l.value,V]);let W=async e=>{var t;O({filter:(0,ed.Dj)([e?{[l.label]:{[B]:e}}:{},null==n||null==(t=n.params)?void 0:t.filter])}),I.current=e},J=(0,s.useMemo)(()=>{var e;let t=u?r||d:null==H?void 0:H.data;if(!(null==$||null==(e=$.data)?void 0:e.length))return null!=t?Array.isArray(t)?t:[t]:[];let o=null!=t&&(Array.isArray(t)?t.map(e=>({...e,[l.value]:e[l.value]||e})):[{...t,[l.value]:t[l.value]||t}])||[],n="function"==typeof x?$.data.filter(x):$.data;return(0,z.uniqBy)(n.concat(o??[]),l.value)},[u,r,d,null==H?void 0:H.data,null==$?void 0:$.data,l.value,x]),X=(0,s.useMemo)(()=>y(E(J)),[E,J,y]);return(0,i.jsx)(ek,{popupMatchSelectWidth:S,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:l,onSearch:W,onDropdownVisibleChange:e=>{I.current=null,e&&O(),F.current=!0},objectValue:u,value:r,defaultValue:d,...C,loading:!$||q,options:X,rawOptions:J,dropdownRender:e=>{let t=J.some(e=>e[l.label]===I.current);return(0,i.jsx)(i.Fragment,{children:j?(0,i.jsxs)(i.Fragment,{children:[!((null==$?void 0:$.data.length)===0&&(null==I?void 0:I.current))&&e,(null==$?void 0:$.data.length)>0&&(null==I?void 0:I.current)&&!t&&(0,i.jsx)(_.Divider,{style:{margin:0}}),!t&&(0,i.jsx)(K,{})]}):e})}})},(0,v.mapProps)({dataSource:"options"},(e,t)=>{var o;let l=(0,v.useFieldSchema)();return{...e,fieldNames:{...em,...e.fieldNames,...t.componentProps.fieldNames,...null==(o=l["x-component-props"])?void 0:o.fieldNames},suffixIcon:(null==t?void 0:t.loading)||(null==t?void 0:t.validating)?(0,i.jsx)(ea.LoadingOutlined,{}):e.suffixIcon}}),(0,v.mapReadPretty)(eM)));ew.ReadPretty=eM;let eY=()=>{var e;let t,o=(0,v.useFieldSchema)(),{t:l}=(0,eo.useTranslation)(),{duplicateData:n}=(0,Y.Es)(),{getCollectionJoinField:a}=(0,g.nj)();if(n)return n;let{items:r=[],display:i=!0}=(e=o,(t=(0,Y.r9)(e))&&z.default.cloneDeep(t["x-data-templates"])||{});return r.forEach(e=>{try{var t;e.fields=null==(t=e.fields)?void 0:t.map(t=>a(`${e.collection}.${t}`)?t:"").filter(Boolean)}catch(t){(0,et.error)(t),e.fields=[]}}),{templates:[{key:"none",title:l("None")}].concat(r.map((e,t)=>({key:t,...e,isLeaf:null!==e.dataId&&void 0!==e.dataId,titleCollectionField:(null==e?void 0:e.titleField)&&a(`${e.collection}.${e.titleField}`)}))),display:i,defaultTemplate:r.find(e=>e.default),enabled:r.length>0&&r.every(e=>e.dataId||e.dataScope)}},eR=s.default.memo(e=>{let{style:t={},form:o}=e,{token:l}=(0,a.rd)(),{templates:n,display:r,enabled:d,defaultTemplate:u}=eY(),{getCollectionJoinField:c}=(0,g.nj)(),p=(0,en.gc)(n),[m,h]=(0,s.useState)((null==u?void 0:u.key)||"none"),[x,v]=(0,s.useState)(null),b=(0,f.VB)(),{t:y}=(0,eo.useTranslation)(),S=(0,V.Mp)(),k=(0,V.TF)(S),{isInFilterFormBlock:C}=(0,el._P)();(0,s.useEffect)(()=>{d&&u&&o&&!C&&(o.__template=!0,"duplicate"===u.key&&P(u.dataId,u,k))},[]),(0,s.useEffect)(()=>{(null==p?void 0:p.some(e=>e.key===m))||F("none")},[p]);let M=(0,s.useMemo)(()=>({display:"flex",alignItems:"center",backgroundColor:l.colorFillAlter,padding:l.padding,...t}),[t,l.colorFillAlter]),w=(0,s.useMemo)(()=>({fontSize:l.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:l.marginXS}),[l.fontSize,l.marginXS]),F=(0,s.useCallback)(async e=>{h(e),v(null),null==o||o.reset()},[]),P=(0,s.useCallback)(async(e,t,l)=>{let n={...t,dataId:e};v(t),eB(b,n,l).then(e=>(o&&e&&(o.reset(),o.__template=!0,(0,et.forEach)(e,(e,t)=>{if(e){var l;o.values[t]=e,null==o||null==(l=o.setInitialValuesIn)||l.call(o,t,e)}})),e)).catch(e=>{console.error(e)})},[]);if(!d||!r)return null;let j=null==p?void 0:p.find(e=>e.key===m);return(0,i.jsx)("div",{style:M,children:(0,i.jsxs)(_.Space,{wrap:!0,children:[(0,i.jsxs)("label",{style:w,children:[y("Data template"),": "]}),(0,i.jsx)(_.Select,{role:"button","data-testid":"select-form-data-template",popupMatchSelectWidth:!1,options:p,fieldNames:{label:"title",value:"key"},value:m,onChange:F}),"none"!==m&&j&&(0,i.jsx)(ew,{style:{width:220},fieldNames:{label:null==j?void 0:j.titleField,value:"id"},target:null==j?void 0:j.collection,value:x,objectValue:!0,service:{resource:null==j?void 0:j.collection,params:{filter:null==j?void 0:j.dataScope}},onChange:e=>P(null==e?void 0:e.id,{...e,...j},k),targetField:c(`${null==j?void 0:j.collection}.${j.titleField}`)})]})})});async function eB(e,t,o){if(0!==t.fields.length&&t.dataId)return e.resource(t.collection,void 0,o).get({filterByTk:t.dataId,fields:t.fields,isTemplate:!0}).then(e=>{var t;return null==(t=e.data)?void 0:t.data})}eR.displayName="NocoBaseFormDataTemplates";var eN=o(90236);let eE=e=>{let{form:t,children:o,height:l,...n}=e,a=(0,v.useField)(),r=(0,v.useFieldSchema)(),d=null===q.Km||void 0===q.Km?void 0:(0,q.Km)(r),u=(0,eu.TD)(t.createVoidField({...a.props,basePath:""})),c=(()=>{var e,t,o;let l=(0,ee.mh)(),n=(0,v.useFieldSchema)(),{token:a}=_.theme.useToken(),{designable:r}=(0,Z.er)(),{heightProps:i}=(0,Q.es)()||{},{title:s,titleHeight:d}=i||{},{display:u,enabled:c}=eY(),p=n.reduceProperties((e,t)=>"ActionBar"===t["x-component"]?t:e),m=Object.keys((null==p?void 0:p.properties)||{}).length>0,h=null==n||null==(o=n.parent)||null==(t=o["x-decorator"])||null==(e=t.includes)?void 0:e.call(t,"FormBlockProvider"),x=m||r?a.controlHeight+(h?+a.marginLG:24+a.paddingLG):a.marginLG,f=(0,V.YE)(),{count:g,pageSize:b}=(null==f?void 0:f.meta)||{},y=g>b?a.controlHeightSM+24:0,S=u&&c?a.controlHeight+2*a.padding+a.margin:0;return l-x-a.paddingLG-(s?d:0)-y-S})(),p=Number.isFinite(l)?l:c,{token:m}=_.theme.useToken(),{layout:x="vertical",labelAlign:f="left",labelWidth:g=120,labelWrap:y=!0,colon:S=!0}=(null==d?void 0:d["x-component-props"])||{},{isInFilterFormBlock:k}=(0,G._)(),{isMobileLayout:C}=(0,eN.mY)(),M=(0,s.useMemo)(()=>C?(0,et.transformMultiColumnToSingleColumn)(r):r,[r,C]);return(0,s.useEffect)(()=>{k&&t.query("*").forEach(e=>{e.validator&&(e.validator=null)})},[t,k]),(0,i.jsx)(v.FieldContext.Provider,{value:void 0,children:(0,i.jsx)(v.FormContext.Provider,{value:t,children:(0,i.jsx)(h.FormLayout,{layout:x,...n,labelAlign:f,labelWidth:"horizontal"===x?g:null,labelWrap:y,colon:S,children:(0,i.jsx)("div",{className:(0,E.css)`
1020
+ `,ek=(0,v.connect)(e=>{let{objectValue:t,loading:o,value:l,rawOptions:n,defaultValue:a,...r}=e,d=(0,eu.lu)(),u=ey.isDesktop?"":eS,c=ey.isDesktop?void 0:"topLeft",p=e.multiple?"multiple":e.mode;if(p&&!["multiple","tags"].includes(p)&&(p=void 0),(0,s.useEffect)(()=>{if(null!=l&&!Array.isArray(l)&&(["tags","multiple"].includes(e.mode)||e.multiple)){var t;null==(t=e.onChange)||t.call(e,[l])}},[l,e.mode,e.multiple,e.onChange]),t)return(0,i.jsx)(eg,{rawOptions:n,...r,defaultValue:a,value:l,mode:p,loading:o});let m=t=>["tags","multiple"].includes(e.mode)||e.multiple?t?(0,$.toArr)(t):void 0:t;return(0,i.jsx)(_.Select,{rootClassName:u,placement:c,role:"button","data-testid":`select-${p||"single"}`,showSearch:!0,filterOption:eb,allowClear:{clearIcon:(0,i.jsx)(ea.CloseCircleFilled,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:o?(0,i.jsx)(_.Spin,{}):(0,i.jsx)(_.Empty,{image:_.Empty.PRESENTED_IMAGE_SIMPLE}),value:m(l),defaultValue:m(a),tagRender:e=>(0,i.jsx)(_.Tag,{role:"button","aria-label":e.label,closeIcon:(0,i.jsx)(ea.CloseOutlined,{role:"button","aria-label":"icon-close-tag"}),...e,children:e.label}),...d(r),onChange:t=>{var o;null==(o=e.onChange)||o.call(e,void 0===t?null:t)},mode:p,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,i.jsxs)(_.Tooltip,{title:(0,i.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6,maxWidth:"100%"},children:e.map(e=>(0,i.jsx)(_.Tag,{style:{margin:0,background:"#fafafa",border:"1px solid #d9d9d9",whiteSpace:"normal",wordBreak:"break-word",maxWidth:"100%"},children:e.label},e.value))}),overlayInnerStyle:{background:"#fff",color:"#000",padding:8,maxWidth:"100%"},color:"#fff",overlayStyle:{pointerEvents:"auto",maxWidth:300},children:["+",e.length,"..."]})})},(0,v.mapProps)({dataSource:"options"},(e,t)=>{var o,l,n,a;let{value:r,options:s}=e,d=(0,z.every)(s,e=>e.value!==r)&&(null==t||null==(a=t.data)||null==(n=a.dataSource)||null==(l=n.find)||null==(o=l.call(n,e=>e.value===r))?void 0:o.label)||r;return{...e,value:d,fieldNames:{...em,...e.fieldNames},suffixIcon:(null==t?void 0:t.loading)||(null==t?void 0:t.validating)?(0,i.jsx)(ea.LoadingOutlined,{}):e.suffixIcon}}),(0,v.mapReadPretty)(ef));ek.ReadPretty=ef;var eC=o(41944);let eM=(0,v.observer)(e=>{let t,o={...em,...e.fieldNames},l=(0,v.useField)(),n=(0,v.useFieldSchema)(),a=(0,eC.pE)(),{snapshot:s}=(0,r.D5)(),{data:d}=(0,f.bP)(s?async()=>({data:a[n.name]}):{action:"list",...e.service,params:{paginate:!1,filter:{[o.value]:{$in:(t=l.value,(0,z.castArray)(t).filter(e=>null!=e).map(e=>"object"==typeof e?e[o.value]:e))}}}},{refreshDeps:[e.service,l.value]});return(0,i.jsx)(ek.ReadPretty,{...e,options:null==d?void 0:d.data})},{displayName:"ReadPretty"}),ew=(0,R.T)((0,v.connect)(e=>{var t,o;let{fieldNames:l={},service:n={},wait:a=300,value:r,defaultValue:d,objectValue:u,manual:c=!0,mapOptions:p,targetField:m,CustomDropdownRender:h,optionFilter:x,dataSource:b,toOptionsItem:y=e=>e,popupMatchSelectWidth:S=!1,onSuccess:k,...C}=e,M=(0,ei.Mp)(),w=(0,es.TF)(b||M),F=(0,s.useRef)(!1),P=(0,v.useFieldSchema)(),j=(null==(t=P["x-component-props"])?void 0:t.addMode)==="quickAdd",{getField:A}=(0,g.k7)(),I=(0,s.useRef)(null),{getCollectionJoinField:T,getInterface:D}=(0,g.nj)(),L=P["x-collection-field"]||P.name,Y=A(L)||T(L),R=m||(null==Y?void 0:Y.target)&&(null==l?void 0:l.label)&&T(`${Y.target}.${l.label}`),B=(0,s.useMemo)(()=>{if(null==R?void 0:R.interface){var e;let t=D(R.interface),o=(null==t||null==(e=t.filterable)?void 0:e.operators[0].value)||"$includes";return"string"===R.type||"string"===R.dataType?"$includes":o}return"$includes"},[D,null==R?void 0:R.dataType,null==R?void 0:R.interface,null==R?void 0:R.type]),N=(0,eu.lu)(),E=(0,s.useCallback)(e=>{try{return e.filter(e=>["number","string"].includes(typeof e[l.value])||!e[l.value]).map(e=>{var t;let o=N(e[l.label]);if(null==R||null==(t=R.uiSchema)?void 0:t.enum)if(Array.isArray(o))o=o.map((e,t)=>{let o=R.uiSchema.enum.find(t=>t.value===e);return o?(0,i.jsx)(_.Tag,{role:"button",color:o.color,style:{marginRight:3},children:(null==o?void 0:o.label)||e},t):(0,i.jsx)(_.Tag,{role:"button",children:e},e)}).reverse();else{let e=R.uiSchema.enum.find(e=>e.value===o);e&&(o=(0,i.jsx)(_.Tag,{role:"button",color:e.color,children:e.label}))}return((null==R?void 0:R.type)==="date"&&(o=(0,er.default)(o).format("YYYY-MM-DD")),p)?p({[l.label]:o||"N/A",[l.value]:e[l.value]}):{...(0,z.omit)(e,"style"),[l.label]:o||"N/A",[l.value]:e[l.value]}}).filter(Boolean)}catch(t){return console.error(t),e}},[l.value,l.label,N,null==R?void 0:R.uiSchema.enum,null==R?void 0:R.type,p]),{data:$,run:O,loading:q}=(0,f.bP)({action:"list",...n,headers:w,params:{pageSize:200,...null==n?void 0:n.params,filter:null==n||null==(o=n.params)?void 0:o.filter}},{manual:c,debounceWait:a,onSuccess:k,...n.defaultParams?{defaultParams:[n.defaultParams]}:{}}),{data:H,run:V,loading:U}=(0,f.bP)({action:"get",...n,headers:w},{manual:!0,debounceWait:a}),G=(0,s.useMemo)(()=>JSON.stringify({service:n,fieldNames:l}),[n,l]),K=(0,s.useCallback)(()=>I.current&&h?(0,i.jsx)(h,{search:I.current,callBack:()=>{I.current=null}}):null,[h]);(0,s.useEffect)(()=>{F.current&&O()},[O,G]),(0,s.useEffect)(()=>{!u&&(null==$?void 0:$.data)&&(Array.isArray(r)?r.length:null!=r)&&!(null==$?void 0:$.data.some(e=>e[l.value]===r))&&V({filterByTk:r})},[r,null==$?void 0:$.data,u,l.value,V]);let W=async e=>{var t;O({filter:(0,ed.Dj)([e?{[l.label]:{[B]:e}}:{},null==n||null==(t=n.params)?void 0:t.filter])}),I.current=e},J=(0,s.useMemo)(()=>{var e;let t=u?r||d:null==H?void 0:H.data;if(!(null==$||null==(e=$.data)?void 0:e.length))return null!=t?Array.isArray(t)?t:[t]:[];let o=null!=t&&(Array.isArray(t)?t.map(e=>({...e,[l.value]:e[l.value]||e})):[{...t,[l.value]:t[l.value]||t}])||[],n="function"==typeof x?$.data.filter(x):$.data;return(0,z.uniqBy)(n.concat(o??[]),l.value)},[u,r,d,null==H?void 0:H.data,null==$?void 0:$.data,l.value,x]),X=(0,s.useMemo)(()=>y(E(J)),[E,J,y]);return(0,i.jsx)(ek,{popupMatchSelectWidth:S,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:l,onSearch:W,onDropdownVisibleChange:e=>{I.current=null,e&&O(),F.current=!0},objectValue:u,value:r,defaultValue:d,...C,loading:!$||q,options:X,rawOptions:J,dropdownRender:e=>{let t=J.some(e=>e[l.label]===I.current);return(0,i.jsx)(i.Fragment,{children:j?(0,i.jsxs)(i.Fragment,{children:[!((null==$?void 0:$.data.length)===0&&(null==I?void 0:I.current))&&e,(null==$?void 0:$.data.length)>0&&(null==I?void 0:I.current)&&!t&&(0,i.jsx)(_.Divider,{style:{margin:0}}),!t&&(0,i.jsx)(K,{})]}):e})}})},(0,v.mapProps)({dataSource:"options"},(e,t)=>{var o;let l=(0,v.useFieldSchema)();return{...e,fieldNames:{...em,...e.fieldNames,...t.componentProps.fieldNames,...null==(o=l["x-component-props"])?void 0:o.fieldNames},suffixIcon:(null==t?void 0:t.loading)||(null==t?void 0:t.validating)?(0,i.jsx)(ea.LoadingOutlined,{}):e.suffixIcon}}),(0,v.mapReadPretty)(eM)));ew.ReadPretty=eM;let eY=()=>{var e;let t,o=(0,v.useFieldSchema)(),{t:l}=(0,eo.useTranslation)(),{duplicateData:n}=(0,Y.Es)(),{getCollectionJoinField:a}=(0,g.nj)();if(n)return n;let{items:r=[],display:i=!0}=(e=o,(t=(0,Y.r9)(e))&&z.default.cloneDeep(t["x-data-templates"])||{});return r.forEach(e=>{try{var t;e.fields=null==(t=e.fields)?void 0:t.map(t=>a(`${e.collection}.${t}`)?t:"").filter(Boolean)}catch(t){(0,et.error)(t),e.fields=[]}}),{templates:[{key:"none",title:l("None")}].concat(r.map((e,t)=>({key:t,...e,isLeaf:null!==e.dataId&&void 0!==e.dataId,titleCollectionField:(null==e?void 0:e.titleField)&&a(`${e.collection}.${e.titleField}`)}))),display:i,defaultTemplate:r.find(e=>e.default),enabled:r.length>0&&r.every(e=>e.dataId||e.dataScope)}},eR=s.default.memo(e=>{let{style:t={},form:o}=e,{token:l}=(0,a.rd)(),{templates:n,display:r,enabled:d,defaultTemplate:u}=eY(),{getCollectionJoinField:c}=(0,g.nj)(),p=(0,en.gc)(n),[m,h]=(0,s.useState)((null==u?void 0:u.key)||"none"),[x,v]=(0,s.useState)(null),b=(0,f.VB)(),{t:y}=(0,eo.useTranslation)(),S=(0,V.Mp)(),k=(0,V.TF)(S),{isInFilterFormBlock:C}=(0,el._P)();(0,s.useEffect)(()=>{d&&u&&o&&!C&&(o.__template=!0,"duplicate"===u.key&&P(u.dataId,u,k))},[]),(0,s.useEffect)(()=>{(null==p?void 0:p.some(e=>e.key===m))||F("none")},[p]);let M=(0,s.useMemo)(()=>({display:"flex",alignItems:"center",backgroundColor:l.colorFillAlter,padding:l.padding,...t}),[t,l.colorFillAlter]),w=(0,s.useMemo)(()=>({fontSize:l.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:l.marginXS}),[l.fontSize,l.marginXS]),F=(0,s.useCallback)(async e=>{h(e),v(null),null==o||o.reset()},[]),P=(0,s.useCallback)(async(e,t,l)=>{let n={...t,dataId:e};v(t),eB(b,n,l).then(e=>(o&&e&&(o.reset(),o.__template=!0,(0,et.forEach)(e,(e,t)=>{if(e){var l;o.values[t]=e,null==o||null==(l=o.setInitialValuesIn)||l.call(o,t,e)}})),e)).catch(e=>{console.error(e)})},[]);if(!d||!r)return null;let j=null==p?void 0:p.find(e=>e.key===m);return(0,i.jsx)("div",{style:M,children:(0,i.jsxs)(_.Space,{wrap:!0,children:[(0,i.jsxs)("label",{style:w,children:[y("Data template"),": "]}),(0,i.jsx)(_.Select,{role:"button","data-testid":"select-form-data-template",popupMatchSelectWidth:!1,options:p,fieldNames:{label:"title",value:"key"},value:m,onChange:F}),"none"!==m&&j&&(0,i.jsx)(ew,{style:{width:220},fieldNames:{label:null==j?void 0:j.titleField,value:"id"},target:null==j?void 0:j.collection,value:x,objectValue:!0,service:{resource:null==j?void 0:j.collection,params:{filter:null==j?void 0:j.dataScope}},onChange:e=>P(null==e?void 0:e.id,{...e,...j},k),targetField:c(`${null==j?void 0:j.collection}.${j.titleField}`)})]})})});async function eB(e,t,o){if(0!==t.fields.length&&t.dataId)return e.resource(t.collection,void 0,o).get({filterByTk:t.dataId,fields:t.fields,isTemplate:!0}).then(e=>{var t;return null==(t=e.data)?void 0:t.data})}eR.displayName="NocoBaseFormDataTemplates";var eN=o(7819);let eE=e=>{let{form:t,children:o,height:l,...n}=e,a=(0,v.useField)(),r=(0,v.useFieldSchema)(),d=null===q.Km||void 0===q.Km?void 0:(0,q.Km)(r),u=(0,eu.TD)(t.createVoidField({...a.props,basePath:""})),c=(()=>{var e,t,o;let l=(0,ee.mh)(),n=(0,v.useFieldSchema)(),{token:a}=_.theme.useToken(),{designable:r}=(0,Z.er)(),{heightProps:i}=(0,Q.es)()||{},{title:s,titleHeight:d}=i||{},{display:u,enabled:c}=eY(),p=n.reduceProperties((e,t)=>"ActionBar"===t["x-component"]?t:e),m=Object.keys((null==p?void 0:p.properties)||{}).length>0,h=null==n||null==(o=n.parent)||null==(t=o["x-decorator"])||null==(e=t.includes)?void 0:e.call(t,"FormBlockProvider"),x=m||r?a.controlHeight+(h?+a.marginLG:24+a.paddingLG):a.marginLG,f=(0,V.YE)(),{count:g,pageSize:b}=(null==f?void 0:f.meta)||{},y=g>b?a.controlHeightSM+24:0,S=u&&c?a.controlHeight+2*a.padding+a.margin:0;return l-x-a.paddingLG-(s?d:0)-y-S})(),p=Number.isFinite(l)?l:c,{token:m}=_.theme.useToken(),{layout:x="vertical",labelAlign:f="left",labelWidth:g=120,labelWrap:y=!0,colon:S=!0}=(null==d?void 0:d["x-component-props"])||{},{isInFilterFormBlock:k}=(0,G._)(),{isMobileLayout:C}=(0,eN.mY)(),M=(0,s.useMemo)(()=>C?(0,et.transformMultiColumnToSingleColumn)(r):r,[r,C]);return(0,s.useEffect)(()=>{k&&t.query("*").forEach(e=>{e.validator&&(e.validator=null)})},[t,k]),(0,i.jsx)(v.FieldContext.Provider,{value:void 0,children:(0,i.jsx)(v.FormContext.Provider,{value:t,children:(0,i.jsx)(h.FormLayout,{layout:x,...n,labelAlign:f,labelWidth:"horizontal"===x?g:null,labelWrap:y,colon:S,children:(0,i.jsx)("div",{className:(0,E.css)`
1021
1021
  .nb-grid-container {
1022
1022
  height: ${p?p+"px":"100%"};
1023
1023
  overflow-y: auto;
@@ -1864,4 +1864,4 @@ ${JSON.stringify(s,null,2)}`)},[j,F,w,S,y,V,t,M,C,R,o,B,z,U,O,q,Y]),K=(0,a.useCa
1864
1864
  .anticon {
1865
1865
  line-height: 16px !important;
1866
1866
  }
1867
- `;class tV extends q.k{async load(){this.schemaSettingsManager.add(eO.F),this.schemaSettingsManager.add(eD.N),this.schemaSettingsManager.add(eL.R),this.schemaSettingsManager.add(eK),this.schemaSettingsManager.add(eX),this.schemaSettingsManager.add(eF),this.schemaSettingsManager.add(eP),this.schemaSettingsManager.add(eI),this.schemaSettingsManager.add(eT),this.schemaSettingsManager.add(ez.A),this.schemaSettingsManager.add(e$),this.schemaSettingsManager.add(eE),this.schemaSettingsManager.add(eV),this.schemaSettingsManager.add(eZ),this.schemaSettingsManager.add(X),this.schemaSettingsManager.add(er),this.schemaSettingsManager.add(es),this.schemaSettingsManager.add(ed),this.schemaSettingsManager.add(e_),this.schemaSettingsManager.add(ev),this.schemaSettingsManager.add(et),this.schemaSettingsManager.add(eo),this.schemaSettingsManager.add(Q),this.schemaSettingsManager.add(ee),this.schemaSettingsManager.add(Z),this.schemaSettingsManager.add(ex),this.schemaSettingsManager.add(ei.V),this.schemaSettingsManager.add(eh),this.schemaSettingsManager.add(ec.K),this.schemaSettingsManager.add(ep),this.schemaSettingsManager.add(em),this.schemaSettingsManager.add(eu),this.schemaSettingsManager.add(J),this.schemaSettingsManager.add(el),this.schemaSettingsManager.add(eY.l),this.schemaSettingsManager.add(eq._),this.schemaSettingsManager.add(eG),this.schemaSettingsManager.add(e5.NU),this.schemaSettingsManager.add(e5.r0),this.schemaSettingsManager.add(tM),this.schemaSettingsManager.add(tw),this.schemaSettingsManager.add(tk),this.schemaSettingsManager.add(tF),this.schemaSettingsManager.add(tS),this.schemaSettingsManager.add(e6),this.schemaSettingsManager.add(e9),this.schemaSettingsManager.add(tT),this.schemaSettingsManager.add(tm),this.schemaSettingsManager.add(e2.Pq),this.schemaSettingsManager.add(ts),this.schemaSettingsManager.add(ti),this.schemaSettingsManager.add(to),this.schemaSettingsManager.add(td),this.schemaSettingsManager.add(tu),this.schemaSettingsManager.add(tc),this.schemaSettingsManager.add(e8.yp),this.schemaSettingsManager.add(tj),this.schemaSettingsManager.add(e4),this.schemaSettingsManager.add(tr),this.schemaSettingsManager.add(tt),this.schemaSettingsManager.add(te),this.schemaSettingsManager.add(tp),this.schemaSettingsManager.add(tI),this.schemaSettingsManager.add(tH)}}var tU=o(58329),tG=o(4627)},37208(e,t,o){o.d(t,{h:()=>l});let l=e=>{var t;return(null==e||null==(t=e["x-component-props"])?void 0:t["pattern-disable"])==!0}},20349(e,t,o){o.d(t,{e:()=>d});var l=o(56220),n=o(56920),a=o(77843),r=o(70892),i=o(43288),s=o(95951);let d={name:"SetDefaultSortingRules",type:"modal",useComponentProps(){var e,t;let{name:o}=(0,i.k7)(),d=(0,n.useField)(),u=(0,n.useFieldSchema)(),c=(0,i.lY)(o),{service:p}=(0,r.El)(),{t:m}=(0,a.useTranslation)(),{dn:h}=(0,s.er)(),x=(null==u||null==(t=u["x-decorator-props"])||null==(e=t.params)?void 0:e.sort)||[],v=null==x?void 0:x.map(e=>(null==e?void 0:e.startsWith("-"))?{field:e.substring(1),direction:"desc"}:{field:e,direction:"asc"});return{title:m("Set default sorting rules"),components:{ArrayItems:l.ArrayItems},schema:{type:"object",title:m("Set default sorting rules"),properties:{sort:{type:"array",default:v,"x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:c,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260}}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:m("ASC"),value:"asc"},{label:m("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:m("Add sort field"),"x-component":"ArrayItems.Addition"}}}}},onSubmit:e=>{var t;let{sort:o}=e,l=o.map(e=>"desc"===e.direction?`-${e.field}`:e.field),n=d.decoratorProps.params||{};n.sort=l,d.decoratorProps.params=n,u["x-decorator-props"].params=n,h.emit("patch",{schema:{"x-uid":u["x-uid"],"x-decorator-props":u["x-decorator-props"]}}),p.run({...null==(t=p.params)?void 0:t[0],sort:l})}}},useVisible(){let{dragSort:e}=(0,n.useField)().decoratorProps;return!e}}},71162(e,t,o){o.d(t,{d:()=>u});var l=o(56920),n=o(51649),a=o(69412),r=o(70892),i=o(43288),s=o(72548),d=o(95951);let u={name:"SetTheDataScope",Component:o(79056).Z,useComponentProps:()=>{var e,t;let{name:o}=(0,i.k7)(),u=(0,l.useField)(),c=(0,l.useFieldSchema)(),{form:p}=(0,a.Es)(),{service:m}=(0,r.El)(),{dn:h}=(0,d.er)(),x=(0,n.useCallback)(e=>{let{filter:t}=e;t=(0,s.pA)(t);let o=u.decoratorProps.params||{};o.filter=t,u.decoratorProps.params=o,c["x-decorator-props"].params=o,h.emit("patch",{schema:{"x-uid":c["x-uid"],"x-decorator-props":c["x-decorator-props"]}}),m.params[0].page=1},[h,u.decoratorProps,c,m]);return{collectionName:o,defaultFilter:(null==c||null==(t=c["x-decorator-props"])||null==(e=t.params)?void 0:e.filter)||{},form:p,onSubmit:x}}}},24768(e,t,o){o.d(t,{V5:()=>a,XZ:()=>r,kU:()=>i});var l=o(71178),n=o(51649);let a=(0,n.createContext)({componentNamePrefix:""}),r=e=>(0,l.jsx)(a.Provider,{value:{...e,componentNamePrefix:e.componentNamePrefix||""},children:e.children}),i=()=>(0,n.useContext)(a)},46909(e,t,o){o.d(t,{IU:()=>S,D$:()=>f,ov:()=>g,sx:()=>y,cC:()=>v});var l=o(71178),n=o(56920),a=o(27404),r=o(77583),i=o(51649),s=o(16211),d=o(83468),u=o(43288),c=o(28227),p=o(44374),m=o(70136),h=o(63526);let x=(0,n.observer)(e=>{let{templateId:t}=e,{getTemplateById:o}=g(),a=(0,n.useField)(),r=(0,n.useFieldSchema)(),{dn:s}=(0,p.useDesignable)(),d=(0,i.useMemo)(()=>o(t),[t]),{onTemplateSuccess:u}=(0,m.y)(),{isMobileLayout:c}=(0,p.useMobileLayout)();return d?(0,l.jsx)(p.BlockTemplateProvider,{dn:s,field:a,fieldSchema:r,template:d,children:(0,l.jsx)(p.RemoteSchemaComponent,{noForm:!0,uid:null==d?void 0:d.uid,onSuccess:e=>{var t,o;r["x-linkage-rules"]=(null==e||null==(t=e.data)?void 0:t["x-linkage-rules"])||[],r.setProperties(null==e||null==(o=e.data)?void 0:o.properties),null==u||u()},schemaTransform:c?h.transformMultiColumnToSingleColumn:void 0})}):(0,l.jsx)(p.CollectionDeletedPlaceholder,{type:"Block template",name:t})},{displayName:"BlockTemplate"}),v=(0,i.createContext)({});v.displayName="SchemaTemplateManagerContext";let _=e=>{e.name=e["x-uid"]=(0,a.uid)(),Object.keys(e.properties||{}).forEach(t=>{_(e.properties[t])})},f=()=>{let{getTemplateBySchema:e}=g(),t=(0,n.useFieldSchema)(),o=t["x-uid"],l=t["x-template-key"];return(0,i.useMemo)(()=>e(t),[o,l])},g=()=>{let{getInheritCollections:e}=(0,u.nj)(),{refresh:t,templates:o=[]}=(0,i.useContext)(v),l=(0,s.VB)();return{templates:o,refresh:t,getTemplateSchemaByMode:(0,i.useCallback)(async e=>{let{mode:t,template:o}=e;if("copy"===t){let{data:e}=await l.request({url:`/uiSchemas:getJsonSchema/${o.uid}?includeAsyncNode=true`}),t=(null==e?void 0:e.data)||{};return _(t),(0,r.cloneDeep)(t)}if("reference"===t)return{type:"void","x-component":"BlockTemplate","x-component-props":{templateId:o.key}}},[l]),copyTemplateSchema:(0,i.useCallback)(async e=>{let{data:t}=await l.request({url:`/uiSchemas:getJsonSchema/${e.uid}?includeAsyncNode=true`}),o=(null==t?void 0:t.data)||{};return _(o),(0,r.cloneDeep)(o)},[l]),saveAsTemplate:(0,i.useCallback)(async e=>{let{uid:o}=e,n=(0,a.uid)();return await l.resource("uiSchemas").saveAsTemplate({filterByTk:o,values:{key:n,...e}}),await t(),{key:n}},[l,t]),getTemplateBySchema:(0,i.useCallback)(e=>{if(!e)return;let t=e["x-template-key"];if(t)return null==o?void 0:o.find(e=>e.key===t);let l=e["x-uid"];if(l)return null==o?void 0:o.find(e=>e.uid===l)},[o]),getTemplateBySchemaId:(0,i.useCallback)(e=>e?null==o?void 0:o.find(t=>t.uid===e):null,[o]),getTemplateById:(0,i.useCallback)(e=>null==o?void 0:o.find(t=>t.key===e),[o]),getTemplatesByCollection:(0,i.useCallback)((t,l)=>{var n;let a=e(l,t).concat([l]);return(null==o||null==(n=o.filter)?void 0:n.call(o,e=>(e.dataSourceKey||c.Ze)===t&&a.includes(e.collectionName)))||[]},[e,o]),getTemplatesByComponentName:(0,i.useCallback)(e=>{var t;return(null==o||null==(t=o.filter)?void 0:t.call(o,t=>t.componentName===e))||[]},[o])}},b={resource:"uiSchemaTemplates",action:"list",params:{paginate:!1},refreshDeps:[]},y=e=>{var t;let o=(0,s.VB)(),n=(0,s.bP)(b),a=(0,i.useCallback)(async()=>{let{data:e}=await o.request(b);n.mutate(e)},[o,n]),r=(0,i.useMemo)(()=>{var e;return{templates:null==n||null==(e=n.data)?void 0:e.data,refresh:a}},[null==n||null==(t=n.data)?void 0:t.data,a]);return(0,l.jsx)(v.Provider,{value:r,children:e.children})};class S extends d.k{async load(){this.addRoutes(),this.addComponents()}addComponents(){this.app.addComponents({BlockTemplate:x})}addRoutes(){this.app.router.add("admin.plugins.block-templates-key",{path:"/admin/plugins/block-templates/:key",Component:"BlockTemplateDetails"})}}},96932(e,t,o){o.d(t,{ov:()=>g.ov,kU:()=>M.kU,YU:()=>p,sx:()=>g.sx,V5:()=>M.V5,IU:()=>g.IU,D$:()=>g.D$,BZ:()=>k,XZ:()=>M.XZ,NV:()=>C,cC:()=>g.cC});var l=o(71178),n=o(34829),a=o(52793),r=o(51649),i=o(38356),s=o(44374),d=o(41897),u=o(82924);let c=e=>{let[t,o]=(0,r.useState)(e.title),[n,i]=(0,r.useState)(!1),{refresh:d}=(0,s.useSchemaTemplateManager)();(0,s.useAPIClient)();let{run:u}=(0,s.useRequest)({resource:"uiSchemaTemplates",action:"update",params:{filterByTk:e.filterByTk}},{manual:!0,debounceWait:500,onSuccess(){d()}});return(0,l.jsx)("div",{children:n?(0,l.jsx)(a.Input,{defaultValue:t,size:"large",onBlur:()=>{i(!1)},onChange:t=>{o(t.target.value),u({filterByTk:e.filterByTk,values:{name:t.target.value}})}}):(0,l.jsx)("div",{onClick:()=>{i(!0)},children:t||(0,l.jsx)("span",{style:{color:"#bbb"},children:"未命名"})})})},p=()=>{var e,t;let o=(0,d.vx)(),p=(0,i.useParams)(),m=null==p?void 0:p.key,h=(0,r.useContext)(u.u4V),x=(0,r.useMemo)(()=>({...h,designable:!0}),[h]),{data:v,loading:_}=(0,s.useRequest)({resource:"uiSchemaTemplates",action:"get",params:{filterByTk:m}});return _?(0,l.jsx)(a.Spin,{}):(0,l.jsxs)("div",{children:[(0,l.jsx)(n.PageHeader,{style:{backgroundColor:"white"},onBack:()=>{o("/admin/plugins/block-templates")},ghost:!1,title:(0,l.jsx)(c,{filterByTk:m,title:null==v||null==(e=v.data)?void 0:e.name})}),(0,l.jsx)("div",{style:{margin:"var(--nb-spacing)"},children:(0,l.jsx)(u.u4V.Provider,{value:x,children:(0,l.jsx)(u.DYS,{uid:null==v||null==(t=v.data)?void 0:t.uid})})})]})};var m=o(77843),h=o(27404),x=o(40919),v=o(18111),_=o(73761);let f={name:"uiSchemaTemplates",filterTargetKey:"key",targetKey:"key",fields:[{type:"integer",name:"name",interface:"input",uiSchema:{title:'{{ t("Template name") }}',type:"number","x-component":"Input",required:!0}}]};var g=o(46909),b=o(28227);let y=[{name:"name",title:'{{ t("Title") }}',schema:{type:"string","x-component":"Input"},operators:x.string},{name:"collectionName",title:'{{ t("Collection display name") }}',schema:{type:"string","x-component":"Input"},operators:x.string}],S={type:"object",properties:{[(0,h.uid)()]:{type:"void","x-decorator":"TableBlockProvider","x-decorator-props":{collection:f,resource:"uiSchemaTemplates",action:"list",params:{pageSize:20,sort:["-createdAt"]},rowKey:"key",showIndex:!0,dragSort:!1},"x-component":"CardItem",properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{filter:{type:"void",title:'{{ t("Filter") }}',default:{$and:[{name:{$includes:""}}]},"x-action":"filter","x-component":"Filter.Action","x-use-component-props":()=>{var e,t;let{service:o}=(0,v.J6)();return(0,u.yGk)({options:y,params:(null==o||null==(t=o.state)||null==(e=t.params)?void 0:e[0])||(null==o?void 0:o.params),service:o})},"x-component-props":{icon:"FilterOutlined"},"x-align":"left"},refresh:{type:"void",title:'{{ t("Refresh") }}',"x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"},"x-align":"right"},destroy:{title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action","x-use-component-props":()=>{let e=(0,_.useBulkDestroyActionProps)(),t=(0,g.ov)(),{service:o}=(0,v.J6)();return{async onClick(){var l;await e.onClick(),await t.refresh(),null==o||null==(l=o.refresh)||l.call(o)}}},"x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}}}},[(0,h.uid)()]:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowSelection:{type:"checkbox"}},properties:{column1:{type:"void",title:'{{ t("Title") }}',"x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{name:{type:"string","x-collection-field":"uiSchemaTemplates.name","x-component":"CollectionField","x-read-pretty":!0,"x-component-props":{ellipsis:!0}}}},column2:{type:"void",title:'{{t("Collection display name")}}',"x-component":"TableV2.Column",properties:{"collection.title":{type:"string","x-component":e=>{let{dataSourceKey:t="main",collectionName:o}=(0,b.zv)(),n=(0,b.m6)(),a=(0,u.lum)(),[i,s]=(0,r.useMemo)(()=>{let e=n.getDataSource(t);if(e){let t=e.collectionManager.getCollection(o);return[e.displayName,(null==t?void 0:t.title)||o]}return[t,null]},[n,t,o]);return(0,l.jsxs)(l.Fragment,{children:[a(i)," ",">"," ",a(s)]})},"x-read-pretty":!0,"x-component-props":{ellipsis:!0}}}},actions:{type:"void",title:'{{ t("Actions") }}',"x-component":"TableV2.Column",properties:{actions:{type:"void","x-decorator":"DndContext","x-component":"Space","x-component-props":{split:"|"},properties:{edit:{type:"void",title:'{{ t("Edit") }}',"x-action":"update","x-component":"Action.Link","x-component-props":{openMode:"drawer",refreshDataBlockRequest:!1},properties:{drawer:{type:"void",title:'{{ t("Edit record") }}',"x-component":"Action.Container","x-component-props":{className:"nb-action-popup"},properties:{form:{type:"void","x-decorator":"FormBlockProvider","x-decorator-props":{resource:"uiSchemaTemplates",collection:f,action:"get",useParams:"{{ useParamsFromRecord }}"},"x-component":"CardItem",properties:{[(0,h.uid)()]:{type:"void","x-component":"FormV2","x-use-component-props":"useFormBlockProps",properties:{name:{type:"string","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":"uiSchemaTemplates.name",required:!0},actions:{type:"void","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{marginTop:24}},properties:{submit:{title:'{{t("Submit")}}',"x-action":"submit","x-component":"Action","x-use-component-props":()=>{let e=(0,_.useUpdateActionProps)(),{__parent:t}=(0,v.J6)();return{async onClick(){var o,l;await e.onClick(),null==t||null==(l=t.service)||null==(o=l.refresh)||o.call(l)}}},"x-component-props":{type:"primary",htmlType:"submit"},type:"void"}}}}}}}}}}},destroy:{title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action.Link","x-use-component-props":()=>{let e=(0,_.useDestroyActionProps)(),{service:t}=(0,v.J6)(),o=(0,g.ov)();return{async onClick(){var l;await e.onClick(),await o.refresh(),null==t||null==(l=t.refresh)||l.call(t)}}},"x-component-props":{confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}}}}}}}}}}}},k=()=>{let{t:e}=(0,m.useTranslation)();return(0,l.jsxs)("div",{children:[(0,l.jsx)(n.PageHeader,{style:{backgroundColor:"white"},ghost:!1,title:e("Block templates")}),(0,l.jsx)("div",{style:{margin:"var(--nb-spacing)"},children:(0,l.jsx)(u.HvB,{schema:S})})]})},C=()=>{let e=(0,u.Fag)();return(0,l.jsx)(u.u4V.Provider,{value:{...e,designable:!1},children:(0,l.jsx)(u.HvB,{schema:S})})};var M=o(24768)},49948(e,t,o){o.d(t,{K:()=>n.r,r:()=>l.createStyles});var l=o(76821),n=o(78442)},78442(e,t,o){o.d(t,{r:()=>n});var l=o(52793);let n=()=>l.theme.useToken()},86393(e,t,o){o.d(t,{nS:()=>g,or:()=>l.SystemSettingsSource,mY:()=>v,Cz:()=>y,e6:()=>l.useSystemSettings});var l=o(13975),n=o(71178),a=o(56920),r=o(27404),i=o(52793),s=o(13791);o(51649);var d=o(77843),u=o(44374),c=o(28601),p=o(82924);let m=Object.keys(c.Ay).map(e=>({label:`${c.Ay[e].label} (${e})`,value:e})),h=()=>{let{setVisible:e}=(0,p.D50)();return{async run(){e(!1)}}},x=e=>{let{visible:t}=(0,p.D50)(),o=(0,l.useSystemSettings)();return(0,u.useRequest)(()=>Promise.resolve(null==o?void 0:o.data),{...e,refreshDeps:[t,null==o?void 0:o.data]})},v=(e,t,o)=>{let l=null==e?void 0:e.data;return l&&Object.prototype.hasOwnProperty.call(l,"data")?l:{data:{...null==t?void 0:t.data,...o}}},_=()=>{let{setVisible:e}=(0,p.D50)(),t=(0,a.useForm)(),{mutate:o,data:n}=(0,l.useSystemSettings)()||{},r=(0,u.useAPIClient)(),{t:c}=(0,d.useTranslation)();return{async run(){var l;await t.submit();let a=(0,s.default)(t.values);o({data:v(await r.request({url:"systemSettings:put",method:"post",data:a}),n,a)}),i.message.success(c("Saved successfully"));let d=(null==(l=a.enabledLanguages)?void 0:l[0])||"en-US";a.enabledLanguages.length<2&&r.auth.getLocale()!==d?(r.auth.setLocale(""),window.location.reload()):e(!1)}}},f={type:"object",properties:{[(0,r.uid)()]:{"x-decorator":"Form","x-decorator-props":{useValues:"{{ useSystemSettingsValues }}"},"x-component":"div",type:"void",title:'{{t("System settings")}}',properties:{raw_title:{type:"string",title:"{{t('System title')}}","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope","x-component-props":{supportsLineBreak:!0},required:!0},logo:{type:"string",title:"{{t('Logo')}}","x-decorator":"FormItem","x-component":"Upload.Attachment","x-component-props":{action:"attachments:create",multiple:!1},"x-use-component-props":"useFileCollectionStorageRules"},enabledLanguages:{type:"array",title:'{{t("Enabled languages")}}',"x-component":"Select","x-component-props":{mode:"multiple"},"x-decorator":"FormItem",enum:m,"x-reactions":e=>{e.dataSource=m.map(t=>{var o;let l=t.label;return(null==(o=e.value)?void 0:o[0])===t.value&&(l+=`(${u.i18n.t("Default")})`),{label:l,value:t.value}})}},footer1:{type:"void","x-component":"ActionBar","x-component-props":{layout:"one-column"},properties:{submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useSaveSystemSettingsValues }}"}}}}}}}},g=()=>(0,n.jsx)(i.Card,{bordered:!1,children:(0,n.jsx)(p.HvB,{scope:{useSaveSystemSettingsValues:_,useSystemSettingsValues:x,useCloseAction:h},schema:f})});var b=o(83468);class y extends b.k{async load(){}}},48245(e,t,o){o.d(t,{a:()=>r});var l=o(16211),n=o(17157);class a extends l.Q9{mockAdapter(){return new(o(23975))(this.axios)}}let r=()=>{let e=new a;e.app=new n.lg({});let t=e.mockAdapter();return{apiClient:e,mockRequest:t}}},25157(e,t,o){o.d(t,{BW:()=>p,DB:()=>m,Ip:()=>c,Qd:()=>x,_N:()=>h});var l=o(71178),n=o(504),a=o(51649),r=o(38356),i=o(41906),s=o(16211),d=o(17157),u=o(82924);let c=(0,a.createContext)(null);c.displayName="CurrentUserContext";let p=()=>{let e=(0,n.useFlowEngine)(),t=(0,a.useContext)(c);return!t&&e?{data:{data:e.context.user}}:t},m=()=>{var e;let t=(0,a.useContext)(c);return!!(null==t||null==(e=t.data)?void 0:e.data)},h=()=>{var e;let{allowAnonymous:t}=(0,i.v6)(),{data:o}=p()||{},l=(0,u.lum)();return(0,a.useMemo)(()=>{var e;let n=((null==o||null==(e=o.data)?void 0:e.roles)||[]).map(e=>{let{name:t,title:o}=e;return{name:t,title:l(o)}});return t&&n.push({title:"Anonymous",name:"anonymous"}),n},[t,null==o||null==(e=o.data)?void 0:e.roles,l])},x=e=>{let t=(0,s.VB)(),o=(0,d.nm)(),i=(0,n.useFlowEngine)(),u=(0,r.useNavigate)(),p=(0,r.useLocation)(),m=(null==o?void 0:o.flowEngine)||i,h=(0,a.useRef)(!1),x=(0,s.bP)(()=>t.request({url:"/auth:check",skipNotify:!0,skipAuth:!0}).then(e=>{var t,o,l;(null==e||null==(o=e.data)||null==(t=o.data)?void 0:t.id)==null&&u("/signin?redirect="+p.pathname+p.search);let a=(0,n.createCollectionContextMeta)(()=>{var e;return null==(e=m.context.dataSourceManager.getDataSource("main"))?void 0:e.getCollection("users")},m.translate("Current user"));return a.sort=1e3,m.context.defineProperty("user",{value:null==e||null==(l=e.data)?void 0:l.data,resolveOnServer:!0,meta:a}),null==e?void 0:e.data})),{render:v}=(0,d.vk)();return(x.loading||(h.current=!0),x.loading&&!h.current)?v():(0,l.jsx)(c.Provider,{value:x,children:e.children})}},84693(e,t,o){o.d(t,{mn:()=>a,Gg:()=>c,_N:()=>i._N,DB:()=>i.DB,R2:()=>r,Ip:()=>i.Ip,Qd:()=>i.Qd,BW:()=>i.BW,Y:()=>p});var l=o(51649),n=o(53770);let a=e=>n.$d,r=(0,l.createContext)(null);r.displayName="DropdownVisibleContext";var i=o(25157),s=o(71178),d=o(63526);let u=(0,l.createContext)(null);u.displayName="CurrentUserSettingsMenuContext";let c=()=>{let{menuItems:e}=(0,l.useContext)(u)||{},t=(0,l.useCallback)(()=>e.current,[e]),o=(0,l.useCallback)((t,o)=>{let l;if(o&&(t._options=o),-1!==(l=e.current.findIndex(e=>e.key===t.key))){e.current[l]=t,e.current=[...e.current];return}if(o){if(o.before){let l=e.current.findIndex(e=>e.key===o.before);e.current.splice(l,0,t);return}if(o.after){let l=e.current.findIndex(e=>e.key===o.after);e.current.splice(l+1,0,t);return}}let n=e.current;e.current=n.filter(e=>{var o,l;return t.key!==(null==(o=e._options)?void 0:o.before)&&t.key!==(null==(l=e._options)?void 0:l.after)}),e.current.push(...n.filter(e=>{var o;return(null==(o=e._options)?void 0:o.before)===t.key})),e.current.push(t),e.current.push(...n.filter(e=>{var o;return(null==(o=e._options)?void 0:o.after)===t.key}))},[e]);if(!e)throw(0,d.error)("CurrentUser: You should use `CurrentUserSettingsMenuProvider` in the root of your app."),Error("CurrentUser: You should use `CurrentUserSettingsMenuProvider` in the root of your app.");return{getMenuItems:t,addMenuItem:o}},p=e=>{let{children:t}=e,o=(0,l.useRef)([]),n=(0,l.useMemo)(()=>({menuItems:o}),[o]);return(0,s.jsx)(u.Provider,{value:n,children:t})}},76460(e,t,o){o.d(t,{KZ:()=>a,g5:()=>i,j0:()=>r});var l=o(71178),n=o(51649);let a=(0,n.createContext)({scopeId:"",type:""}),r=e=>{let t=n.default.useContext(a),o=(0,n.useMemo)(()=>({scopeId:e.scopeId,type:e.type,parent:t}),[e.scopeId,e.type,t]);return(0,l.jsx)(a.Provider,{value:o,children:e.children})},i=()=>{let e=n.default.useContext(a);return{getVariableScopeInfo:(0,n.useCallback)(()=>{if(e.scopeId)return e;for(;e.parent&&!e.scopeId;)e=e.parent;return e},[e])}}},73518(e,t,o){o.d(t,{Ay:()=>F,jT:()=>S});var l=o(71178),n=o(2314),a=o(63526),r=o(77583),i=o(51649),s=o(16211),d=o(43288),u=o(29558),c=o(61013),p=o(75020);let m={hasMany:"list?paginate=false",belongsTo:"get",hasOne:"get",belongsToMany:"list?paginate=false",belongsToArray:"list?paginate=false"},h=e=>m[e];var x=o(39607);let v={},_=e=>!!v[e],f=e=>v[e],g=(e,t)=>{v[e]=t},b=e=>{delete v[e]};var y=o(59896);let S=(0,i.createContext)(null);S.displayName="VariablesContext";let k={},C=(e,t)=>{let o,l;return{fieldPath:e.split(".").map(e=>t[e]?(o=t[e].dataSource,l=t[e],t[e].collectionName):e).join("."),dataSource:o,variableOption:l}},M=(e,t,o)=>{var l,n,a;let r=(l=t,n=o,(null==l?void 0:l.sourceKey)?l.sourceKey:Array.isArray(null==n?void 0:n.filterTargetKey)?1===n.filterTargetKey.length?n.filterTargetKey[0]:n.filterTargetKey:(null==n?void 0:n.filterTargetKey)||(null==n||null==(a=n.getPrimaryKey)?void 0:a.call(n))||"id");if(Array.isArray(r)){let t=r.reduce((t,o)=>((null==e?void 0:e[o])==null||(t[o]=e[o]),t),{});if(Object.keys(t).length!==r.length)return;return encodeURIComponent(JSON.stringify(t))}return null==e?void 0:e[r]},w=e=>{let{children:t,filterVariables:o}=e,n=(0,i.useRef)({}),m=(0,s.VB)(),{getCollectionJoinField:v,getCollection:w}=(0,d.nj)(),F=(0,c.l)(),{builtinVariables:I}=(0,p.A)(),T=(0,i.useCallback)(e=>{r.default.isFunction(e)?n.current=e(n.current):n.current=e},[]),D=(0,i.useCallback)(async(e,t,o)=>{var l,i,s;let d=e.split("."),c=d[0],p=j(k,t),x=(i=n.current,s=t,i={...i},null==s||s.forEach(e=>{i[e.name]=e.ctx}),i),{fieldPath:y,dataSource:S,variableOption:I}=C(c,p),T=y,{fieldPath:D}=C(e,p),L=1===d.length?null==I?void 0:I.collectionName:null==(l=v(D,S))?void 0:l.target;if(!(c in x))throw Error(`VariablesProvider: ${c} is not found`);for(let e=0;e<d.length;e++){if(null==x)return{value:void 0===x?null==I?void 0:I.defaultValue:x,dataSource:S,collectionName:L};if(r.default.isFunction(x))break;let t=d[e],l=d.slice(0,e+1).join("."),{fieldPath:n}=C(l,p),i=v(n,S),s=w(T,S);if(Array.isArray(x)){let e=x.map(e=>{let n=M(e,i,s);if(!(null==o?void 0:o.doNotRequest)&&P(null==e?void 0:e[t],e,l)&&null!=n&&(null==i?void 0:i.target)){let e=`/${T}/${n}/${t}:${h(i.type)}`;if(_(e))return f(e);let l=m.request({headers:(0,u.kb)(S),url:e,params:{appends:null==o?void 0:o.appends}}).then(t=>(b(e),t.data.data));return g(e,l),l}return null==e?void 0:e[t]});x=A(r.default.flatten(await Promise.all(e)),i)}else if(!(null==o?void 0:o.doNotRequest)&&P(x[t],x,l)&&null!=M(x,i,s)&&(null==i?void 0:i.target)){let e=M(x,i,s),l=`/${T}/${e}/${t}:${h(i.type)}`,n=null;if(_(l))n=await f(l);else{let e=m.request({headers:(0,u.kb)(S),url:l,params:{appends:null==o?void 0:o.appends}});g(l,e),n=await e,b(l)}x=A(n.data.data,i)}else x=A((0,a.getValuesByPath)(x,t),i);(null==i?void 0:i.target)&&(T=i.target)}let Y=F(r.default.isFunction(x)?await x({fieldOperator:null==o?void 0:o.fieldOperator,isParsingVariable:!0,variableName:e}):x);return{value:void 0===Y?I.defaultValue:Y,dataSource:S,collectionName:L}},[v]),L=(0,i.useCallback)(e=>{if(!(0,y.DZ)(`{{${e.name}}}`))throw Error(`VariablesProvider: ${e.name} is not a valid name`);T(t=>({...t,[e.name]:e.ctx})),k[e.name]={...e,defaultValue:r.default.has(e,"defaultValue")?e.defaultValue:null}},[T]),Y=(0,i.useCallback)(e=>n.current[e]?{...k[e]}:null,[]),R=(0,i.useCallback)(e=>{T(t=>{let o={...t};return delete o[e],o}),delete k[e]},[T]),B=(0,i.useCallback)(async(e,t,o)=>{var l,n;if(!(0,y.DZ)(e))return e;t&&(t=r.default.isArray(t)?t:[t]);let a=(0,x.Y)(e),i=await D(a,t,o);return{...i,value:Array.isArray(n=Array.isArray(l=i.value)?l.filter(e=>0===e||!1===e||e):l)&&r.default.isObject(n[0])?r.default.uniqBy(n,e=>"id"in e?e.id:JSON.stringify(e)):n}},[D]),N=(0,i.useCallback)(async(e,t)=>{if(!(0,y.DZ)(e))throw Error(`VariablesProvider: ${e} is not a variable string`);t&&(t=r.default.isArray(t)?t:[t]);let o=j(k,t),l=(0,x.Y)(e),{fieldPath:n,dataSource:a}=C(l,o),i=v(n,a);if(!i&&!l.includes(".")){var s;i={target:null==(s=o[l])?void 0:s.collectionName}}return i},[v]);(0,i.useEffect)(()=>{I.forEach(e=>{L({...e,defaultValue:r.default.has(e,"defaultValue")?e.defaultValue:null})})},[I,L]);let E=(0,i.useMemo)(()=>({ctxRef:n,setCtx:T,parseVariable:B,registerVariable:L,getVariable:Y,getCollectionField:N,removeVariable:R,filterVariables:o}),[N,Y,B,L,R,T]);return(0,l.jsx)(S.Provider,{value:E,children:t})};w.displayName="VariablesProvider";let F=w;function P(e,t,o){if(2===o.split(".").length&&(o.startsWith("$nForm.")||o.startsWith("$iteration.")))return!1;let l=!1;return(0,n.untracked)(()=>{if("[{}]"===JSON.stringify(e)||"{}"===JSON.stringify(e)){l=!0;return}l=r.default.isEmpty(e)}),l}function j(e,t){return e={...e},null==t||t.forEach(t=>{e[t.name]={...t,defaultValue:r.default.has(t,"defaultValue")?t.defaultValue:null}}),e}function A(e,t){return(null==t?void 0:t.through)&&e?Array.isArray(e)?e.map(e=>r.default.omit(e,t.through)):r.default.omit(e,t.through):e}},67285(e,t,o){o.d(t,{M:()=>l});let l=Object.freeze({})},75020(e,t,o){o.d(t,{A:()=>c});var l=o(63526),n=o(51649),a=o(67574),r=o(99300),i=o(78616),s=o(77557),d=o(3010),u=o(45560);let c=()=>{let{currentUserCtx:e}=(0,r.oW)(),{currentRoleCtx:t}=(0,s.T)(),{apiTokenCtx:o}=(0,i.f)(),{datetimeCtx:c}=(0,r.hY)(),{exactDateTimeCtx:p}=(0,r.vm)(),{urlSearchParamsCtx:m,name:h,defaultValue:x}=(0,d.hx)(),v=(0,u.i)("$env");return{builtinVariables:(0,n.useMemo)(()=>[v,{name:"$user",ctx:e,collectionName:"users",dataSource:a.Ze},{name:"$nRole",ctx:t,collectionName:"roles"},{name:"$nToken",ctx:o},{name:"currentUser",ctx:e,collectionName:"users",dataSource:a.Ze},{name:"$nDate",ctx:c},{name:"$date",ctx:c},{name:"$nExactDate",ctx:p},{name:"$system",ctx:{now:()=>(0,l.dayjs)().toISOString()}},{name:"currentTime",ctx:()=>(0,l.dayjs)().toISOString()},{name:h,ctx:m,defaultValue:x}].filter(Boolean),[t,e,c,x,m,h,v,p])}}},10065(e,t,o){o.d(t,{A:()=>u});var l=o(51649),n=o(35123),a=o(14187),r=o(49621),i=o(44388),s=o(3012),d=o(8724);let u=()=>{var e,t;let{isPopupVisibleControlledByURL:o}=(0,d.X)(),{params:u}=(0,i.IX)(),c=(0,r.Ge)(),p=(0,a.YE)(),m=(0,n.V)()||{},{field:h,blockData:x,rowKey:v,collection:_}=(o()?null==(t=(0,s.lS)(null==u?void 0:u.popupuid))?void 0:t.tableBlockContext:{...m,collection:c,blockData:p})||{},f=(0,l.useMemo)(()=>{var e,t;return null==x||null==(t=x.data)||null==(e=t.filter)?void 0:e.call(t,e=>{var t,o;return null==(t=(null==h||null==(o=h.data)?void 0:o.selectedRowKeys)||[])?void 0:t.includes(e[v])})},[null==h||null==(e=h.data)?void 0:e.selectedRowKeys,v,x]);return(0,l.useMemo)(()=>({name:"$context",ctx:f||[],collectionName:_}),[_,f])}},43724(e,t,o){o.d(t,{A:()=>_});var l=o(51649),n=o(43288),a=o(10288),r=o(39505),i=o(74063),s=o(68038),d=o(63310),u=o(14011),c=o(47368),p=o(54339),m=o(53400),h=o(3010),x=o(10065),v=o(16716);let _=e=>{var t;let{parentObjectCtx:o,shouldDisplayParentObject:_,collectionName:f}=(0,d.S)(),{currentObjectCtx:g,shouldDisplayCurrentObject:b}=(0,s.Jm)(),{currentRecordCtx:y,collectionName:S}=(0,m.XK)(),{currentParentRecordCtx:k,collectionName:C,dataSource:M}=(0,c.nA)(),{popupRecordCtx:w,collectionName:F,dataSource:P,defaultValue:j}=(0,p.h)(),{parentPopupRecordCtx:A,collectionName:I,dataSource:T,defaultValue:D}=(0,u.f)(),{urlSearchParamsCtx:L,shouldDisplay:Y,defaultValue:R}=(0,h.hx)(),{datetimeCtx:B}=(0,r.U$)(),{currentFormCtx:N}=(0,i.AA)({form:null==e?void 0:e.currentForm}),{name:E}=(0,n.k7)(),$=(0,x.A)(),{name:z}=(0,a.N)();(null==e?void 0:e.collectionName)&&(z=e.collectionName);let O=(0,v.n)(),q=(null==(t=O.getVariables)?void 0:t.call(O).map(e=>({name:e.name,ctx:e.useCtx()})))||[];return(0,l.useMemo)(()=>[{name:"currentRecord",ctx:y,collectionName:S},{name:z,ctx:N||y,collectionName:z},{name:"$form",ctx:N,collectionName:z},{name:"$nRecord",ctx:y,collectionName:S,dataSource:M},{name:"$nParentRecord",ctx:k,collectionName:C,dataSource:M},{name:"$nPopupRecord",ctx:w,collectionName:F,dataSource:P,defaultValue:j},{name:"$nParentPopupRecord",ctx:A,collectionName:I,dataSource:T,defaultValue:D},{name:"$nForm",ctx:N,collectionName:z},{name:"$nDate",ctx:B},{name:"$date",ctx:B},$,b&&{name:"$iteration",ctx:g,collectionName:E},_&&{name:"$nParentIteration",ctx:o,collectionName:f},Y&&{name:"$nURLSearchParams",ctx:L,defaultValue:R},...q].filter(Boolean),[y,S,z,N,k,C,M,w,A,F,P,B,b,g,E,j,D,_,o,f,$,L,...q.map(e=>e.ctx)])}},65919(e,t,o){o.d(t,{A:()=>a});var l=o(51649),n=o(73518);let a=()=>(0,l.useContext)(n.jT)},43923(e,t,o){o.d(t,{$l:()=>g.A,Ap:()=>y.A,j0:()=>k.j0,Ml:()=>S.M,e3:()=>b.e3,wU:()=>100,Rr:()=>a.A,DZ:()=>b.DZ,g5:()=>k.g5,qe:()=>b.qe,fG:()=>void 0,gp:()=>r.A,fK:()=>l.Ay,T_:()=>f,vV:()=>b.vV,c7:()=>n.A,jT:()=>l.jT});var l=o(73518),n=o(75020),a=o(10065),r=o(43724),i=o(51649),s=o(43288),d=o(10288),u=o(39505),c=o(74063),p=o(68038),m=o(63310),h=o(14011),x=o(47368),v=o(54339),_=o(53400);let f=e=>{let{parentObjectCtx:t,shouldDisplayParentObject:o,collectionName:l}=(0,m.S)(),{currentObjectCtx:n,shouldDisplayCurrentObject:r}=(0,p.Jm)(),{currentRecordCtx:f,collectionName:g}=(0,_.XK)(),{currentParentRecordCtx:b,collectionName:y,dataSource:S}=(0,x.nA)(),{popupRecordCtx:k,collectionName:C,dataSource:M,defaultValue:w}=(0,v.h)(),{parentPopupRecordCtx:F,collectionName:P,dataSource:j,defaultValue:A}=(0,h.f)(),{datetimeCtx:I}=(0,u.U$)(),{currentFormCtx:T}=(0,c.AA)({form:null==e?void 0:e.currentForm}),{name:D}=(0,s.k7)(),L=(0,a.A)(),{name:Y}=(0,d.N)();return(null==e?void 0:e.collectionName)&&(Y=e.collectionName),(0,i.useMemo)(()=>[{name:"currentRecord",ctx:f,collectionName:g},{name:Y,ctx:T||f,collectionName:Y},{name:"$form",ctx:T,collectionName:Y},{name:"$nRecord",ctx:f,collectionName:g,dataSource:S},{name:"$nParentRecord",ctx:b,collectionName:y,dataSource:S},{name:"$nPopupRecord",ctx:k,collectionName:C,dataSource:M,defaultValue:w},{name:"$nParentPopupRecord",ctx:F,collectionName:P,dataSource:j,defaultValue:A},{name:"$nForm",ctx:T,collectionName:Y},{name:"$nDate",ctx:I},{name:"$date",ctx:I},L,r&&{name:"$iteration",ctx:n,collectionName:D},o&&{name:"$nParentIteration",ctx:t,collectionName:l}].filter(Boolean),[f,g,Y,T,b,y,S,k,F,C,M,I,r,n,D,w,A,o,t,l,L])};var g=o(65919),b=o(59896),y=o(32665),S=o(67285),k=o(76460)},39607(e,t,o){o.d(t,{Y:()=>n});var l=o(59896);let n=e=>e?e.match(l.vV)[0].replace(l.vV,"$1"):e},88847(e,t,o){o.d(t,{S:()=>a});var l=o(77583),n=o(39607);let a=e=>l.default.isString(e)?(0,n.Y)(e).split(".")[0]:e},59896(e,t,o){o.d(t,{DZ:()=>a,e3:()=>r,qe:()=>n,vV:()=>l});let l=/^\s*\{\{\s*([\p{L}0-9_$-.]+?)\s*\}\}\s*$/u,n=/\{\{\s*([a-zA-Z0-9_$-.]+?)\s*\}\}/g,a=e=>"string"==typeof e&&!!e.match(l),r=e=>{let t=e.match(n);return t||[]}},32665(e,t,o){o.d(t,{A:()=>n});var l=o(77583);let n=(e,t)=>{let{targetCollectionField:o}=t;return null!=e&&o?"chinaRegion"===o.interface&&Array.isArray(e)?e.map(e=>(l.default.isObject(e),Object.keys(e={...e}).forEach(t=>{l.default.isObjectLike(e[t])&&delete e[t]}),e)):["hasMany","belongsToMany"].includes(o.type)?Array.isArray(e)?e:[e]:(o.interface,e):e}},11725(e){e.exports=import("antd-mobile").then(function(e){return e})},65994(e){e.exports=import("antd-mobile-icons").then(function(e){return e})},28558(e){e.exports=import("react-quill").then(function(e){return e})},41196(t){t.exports=e},82113(e){e.exports=t},34829(e){e.exports=o},72741(e){e.exports=l},38533(e){e.exports=n},8198(e){e.exports=a},10691(e){e.exports=r},56220(e){e.exports=i},64613(e){e.exports=s},44814(e){e.exports=d},52975(e){e.exports=u},56920(e){e.exports=c},2314(e){e.exports=p},27404(e){e.exports=m},48849(e){e.exports=h},78316(e){e.exports=x},13975(e){e.exports=v},83489(e){e.exports=_},504(e){e.exports=f},27697(e){e.exports=g},63526(e){e.exports=b},71883(e){e.exports=y},52793(e){e.exports=S},76821(e){e.exports=k},29663(e){e.exports=C},23251(e){e.exports=M},23975(e){e.exports=w},94046(e){e.exports=F},31515(e){e.exports=P},91815(e){e.exports=j},37260(e){e.exports=A},60339(e){e.exports=I},65132(e){e.exports=T},43017(e){e.exports=D},38694(e){e.exports=L},95836(e){e.exports=Y},26362(e){e.exports=R},45814(e){e.exports=B},15636(e){e.exports=N},34065(e){e.exports=E},23977(e){e.exports=$},77583(e){e.exports=z},13791(e){e.exports=O},93656(e){e.exports=q},57453(e){e.exports=H},20148(e){e.exports=V},27741(e){e.exports=U},42966(e){e.exports=G},29858(e){e.exports=K},51649(e){e.exports=W},7516(e){e.exports=J},64679(e){e.exports=X},77843(e){e.exports=Z},38356(e){e.exports=Q},71178(e){e.exports=ee}},ez={};function eO(e){var t=ez[e];if(void 0!==t)return t.exports;var o=ez[e]={exports:{}};return e$[e].call(o.exports,o,o.exports,eO),o.exports}eE=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,eO.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var o=Object.create(null);eO.r(o);var l={};eN=eN||[null,eE({}),eE([]),eE(eE)];for(var n=2&t&&e;("object"==typeof n||"function"==typeof n)&&!~eN.indexOf(n);n=eE(n))Object.getOwnPropertyNames(n).forEach(t=>{l[t]=()=>e[t]});return l.default=()=>e,eO.d(o,l),o},eO.d=(e,t)=>{for(var o in t)eO.o(t,o)&&!eO.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},eO.e=()=>Promise.resolve(),eO.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),eO.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var eq=eO(44374),eH=eq.ACLActionParamsContext,eV=eq.ACLActionProvider,eU=eq.ACLCollectionFieldProvider,eG=eq.ACLCollectionProvider,eK=eq.ACLContext,eW=eq.ACLCustomContext,eJ=eq.ACLMenuItemProvider,eX=eq.ACLPane,eZ=eq.ACLPlugin,eQ=eq.ACLProvider,e0=eq.ACLRolesCheckProvider,e1=eq.ADMIN_SETTINGS_KEY,e2=eq.ADMIN_SETTINGS_PATH,e5=eq.AIManager,e4=eq.APIClient,e7=eq.APIClientContext,e6=eq.APIClientProvider,e9=eq.AccessControl,e8=eq.Action,e3=eq.ActionBar,te=eq.ActionBarAssociationFilterAction,tt=eq.ActionBarProvider,to=eq.ActionContext,tl=eq.ActionContextNoRerender,tn=eq.ActionContextProvider,ta=eq.ActionDesigner,tr=eq.ActionGroupModel,ti=eq.ActionInitializer,ts=eq.ActionInitializerItem,td=eq.ActionModel,tu=eq.ActionSceneEnum,tc=eq.ActionType,tp=eq.AddChildActionModel,tm=eq.AddCollection,th=eq.AddCollectionAction,tx=eq.AddCollectionField,tv=eq.AddFieldAction,t_=eq.AddNewActionModel,tf=eq.AddSubFieldAction,tg=eq.AdminDynamicPage,tb=eq.AdminLayout,ty=eq.AdminLayoutMenuItemModel,tS=eq.AdminLayoutPlugin,tk=eq.AdminProvider,tC=eq.AdminSettingsLayout,tM=eq.AdminSettingsLayoutModel,tw=eq.AfterSuccess,tF=eq.AllDataBlocksContext,tP=eq.AllDataBlocksProvider,tj=eq.AntdAppProvider,tA=eq.AntdConfigPlugin,tI=eq.AntdConfigProvider,tT=eq.AntdSchemaComponentPlugin,tD=eq.AntdSchemaComponentProvider,tL=eq.AppLangContext,tY=eq.AppNotFound,tR=eq.AppendsTreeSelect,tB=eq.Application,tN=eq.ApplicationContext,tE=eq.AssignFormModel,t$=eq.AssignedFieldValues,tz=eq.AssociatedFields,tO=eq.AssociationField,tq=eq.AssociationFieldMode,tH=eq.AssociationFieldModeProvider,tV=eq.AssociationFilter,tU=eq.AssociationFilterDesignerDelete,tG=eq.AssociationFilterDesignerDisplayField,tK=eq.AssociationFilterPlugin,tW=eq.AssociationOrCollectionProvider,tJ=eq.AssociationProvider,tX=eq.AssociationSelect,tZ=eq.AsyncDataContext,tQ=eq.AsyncDataProvider,t0=eq.AttachmentList,t1=eq.AutoComplete,t2=eq.BackButtonUsedInSubPage,t5=eq.BaseVariableProvider,t4=eq.BlankComponent,t7=eq.Block,t6=eq.BlockAssociationContext,t9=eq.BlockConfigsContext,t8=eq.BlockConfigsProvider,t3=eq.BlockContext,oe=eq.BlockGridModel,ot=eq.BlockInitializer,oo=eq.BlockItem,ol=eq.BlockItemCard,on=eq.BlockItemCardContext,oa=eq.BlockItemInitializer,or=eq.BlockModel,oi=eq.BlockProvider,os=eq.BlockRequestContextProvider,od=eq.BlockRequestContext_deprecated,ou=eq.BlockRequestLoadingContext,oc=eq.BlockRequestProvider,op=eq.BlockRequestProvider_deprecated,om=eq.BlockResourceContext,oh=eq.BlockSceneEnum,ox=eq.BlockSchemaComponentPlugin,ov=eq.BlockSchemaComponentProvider,o_=eq.BlockSchemaToolbar,of=eq.BlockTemplateContext,og=eq.BlockTemplateDetails,ob=eq.BlockTemplatePage,oy=eq.BlockTemplateProvider,oS=eq.BlockTemplatesPane,ok=eq.BlocksSelector,oC=eq.ButtonEditor,oM=eq.CSSVariableProvider,ow=eq.CardItem,oF=eq.Cascader,oP=eq.Checkbox,oj=eq.CheckboxFieldInterface,oA=eq.CheckboxGroupFieldInterface,oI=eq.ChildPageModel,oT=eq.ChildPageTabModel,oD=eq.ClearCollectionFieldContext,oL=eq.ClickableFieldModel,oY=eq.CodeEditor,oR=eq.CodeEditorExtension,oB=eq.Collection,oN=eq.CollectionActionGroupModel,oE=eq.CollectionActionModel,o$=eq.CollectionBlockModel,oz=eq.CollectionCategoriesContext,oO=eq.CollectionCategoriesProvider,oq=eq.CollectionCategory,oH=eq.CollectionContext,oV=eq.CollectionDeletedPlaceholder,oU=eq.CollectionField,oG=eq.CollectionFieldContext,oK=eq.CollectionFieldInterface,oW=eq.CollectionFieldInterfaceManager,oJ=eq.CollectionFieldInterfaceTag,oX=eq.CollectionFieldProvider,oZ=eq.CollectionFieldUISchemaProvider,oQ=eq.CollectionFieldsToFormInitializerItems,o0=eq.CollectionFieldsToInitializerItems,o1=eq.CollectionFieldsToTableInitializerItems,o2=eq.CollectionHistoryProvider,o5=eq.CollectionManager,o4=eq.CollectionManagerContext,o7=eq.CollectionManagerProvider,o6=eq.CollectionManagerProvider_deprecated,o9=eq.CollectionManagerSchemaComponentProvider,o8=eq.CollectionNotAllowViewPlaceholder,o3=eq.CollectionPlugin,le=eq.CollectionProvider,lt=eq.CollectionProvider_deprecated,lo=eq.CollectionRecord,ll=eq.CollectionRecordContext,ln=eq.CollectionRecordProvider,la=eq.CollectionSelect,lr=eq.CollectionSelectFieldInterface,li=eq.CollectionTemplate,ls=eq.CollectionTemplateManager,ld=eq.CollectionTemplateTag,lu=eq.ColorFieldInterface,lc=eq.ColorPicker,lp=eq.ColorSelect,lm=eq.CommonItemModel,lh=eq.CompatibleSchemaInitializer,lx=eq.CreateFilterActionInitializer,lv=eq.CreateFormModel,l_=eq.CreateResetActionInitializer,lf=eq.CreatedAtFieldInterface,lg=eq.CreatedByFieldInterface,lb=eq.Cron,ly=eq.CronSet,lS=eq.CurrentAppInfoContext,lk=eq.CurrentAppInfoProvider,lC=eq.CurrentPageUidContext,lM=eq.CurrentPageUidProvider,lw=eq.CurrentRouteProvider,lF=eq.CurrentTabUidContext,lP=eq.CurrentTabUidProvider,lj=eq.CurrentUserContext,lA=eq.CurrentUserProvider,lI=eq.CurrentUserSettingsMenuProvider,lT=eq.CustomRouterContextProvider,lD=eq.CustomizeActionInitializer,lL=eq.DEBOUNCE_WAIT,lY=eq.DEFAULT_DATA_SOURCE_KEY,lR=eq.DEFAULT_DATA_SOURCE_TITLE,lB=eq.DataBlockCollector,lN=eq.DataBlockContext,lE=eq.DataBlockInitializer,l$=eq.DataBlockModel,lz=eq.DataBlockProvider,lO=eq.DataBlockResourceContext,lq=eq.DataBlockResourceProvider,lH=eq.DataSource,lV=eq.DataSourceApplicationProvider,lU=eq.DataSourceCollectionCascader,lG=eq.DataSourceContext,lK=eq.DataSourceContext_deprecated,lW=eq.DataSourceManager,lJ=eq.DataSourceManagerContext,lX=eq.DataSourceManagerProvider,lZ=eq.DataSourceProvider,lQ=eq.DataSourceProvider_deprecated,l0=eq.DataSourceSelect,l1=eq.DateFieldInterface,l2=eq.DateFilterDynamicComponent,l5=eq.DateFormatCom,l4=eq.DatePicker,l7=eq.DatePickerProvider,l6=eq.DatetimeFieldInterface,l9=eq.DatetimeNoTzFieldInterface,l8=eq.DefaultToolsManager,l3=eq.DefaultValueProvider,ne=eq.DeleteCollection,nt=eq.DeleteCollectionAction,no=eq.Designable,nl=eq.DesignableSwitch,nn=eq.Details,na=eq.DetailsAssociationFieldGroupModel,nr=eq.DetailsBlockContext,ni=eq.DetailsBlockModel,ns=eq.DetailsBlockProvider,nd=eq.DetailsCustomItemModel,nu=eq.DetailsDesigner,nc=eq.DetailsGridModel,np=eq.DetailsItemModel,nm=eq.DisplaySubTableFieldModel,nh=eq.DisplayTextFieldModel,nx=eq.DisplayTitleFieldModel,nv=eq.Divider,n_=eq.DndContext,nf=eq.DocumentTitleContext,ng=eq.DocumentTitleProvider,nb=eq.DragHandler,ny=eq.DraggableContext,nS=eq.DropdownVisibleContext,nk=eq.EMPTY_OBJECT,nC=eq.EditCollection,nM=eq.EditCollectionAction,nw=eq.EditCollectionField,nF=eq.EditComponent,nP=eq.EditDefaultValue,nj=eq.EditDescription,nA=eq.EditFieldAction,nI=eq.EditFormModel,nT=eq.EditOperator,nD=eq.EditPattern,nL=eq.EditRequired,nY=eq.EditSortField,nR=eq.EditSubFieldAction,nB=eq.EditTable,nN=eq.EditTableAction,nE=eq.EditTableActionContext,n$=eq.EditTitle,nz=eq.EditTitleField,nO=eq.EditTooltip,nq=eq.EditValidationRules,nH=eq.Editable,nV=eq.EllipsisWithTooltip,nU=eq.EmailFieldInterface,nG=eq.ErrorFallback,nK=eq.Expand,nW=eq.ExpiresRadio,nJ=eq.ExtendCollectionsContext,nX=eq.ExtendCollectionsProvider,nZ=eq.FieldModel,nQ=eq.FieldModelRenderer,n0=eq.FieldSummary,n1=eq.FieldValidation,n2=eq.FieldsTreeSelect,n5=eq.Fieldset,n4=eq.Filter,n7=eq.FilterAction,n6=eq.FilterActionContext,n9=eq.FilterActionModel,n8=eq.FilterAssociatedFields,n3=eq.FilterBlockModel,ae=eq.FilterBlockProvider,at=eq.FilterBlockType,ao=eq.FilterContext,al=eq.FilterDynamicComponent,an=eq.FilterFormActionGroupModel,aa=eq.FilterFormBlockModel,ar=eq.FilterFormBlockProvider,ai=eq.FilterFormItemModel,as=eq.FilterGroup,ad=eq.FilterLogicContext,au=eq.FilterParentCollectionFields,ac=eq.FlagContext,ap=eq.FlagProvider,am=eq.ForeignKey,ah=eq.Form,ax=eq.FormActionGroupModel,av=eq.FormActionModel,a_=eq.FormActiveFieldsProvider,af=eq.FormAssociationFieldGroupModel,ag=eq.FormBlockContext,ab=eq.FormBlockInitializer,ay=eq.FormBlockModel,aS=eq.FormBlockProvider,ak=eq.FormComponent,aC=eq.FormDialog,aM=eq.FormDrawer,aw=eq.FormField,aF=eq.FormFieldContext,aP=eq.FormFieldProvider,aj=eq.FormGridModel,aA=eq.FormItem,aI=eq.FormItemModel,aT=eq.FormItemSchemaToolbar,aD=eq.FormProvider,aL=eq.FormSubmitActionModel,aY=eq.FormV2,aR=eq.G2Plot,aB=eq.G2PlotInitializer,aN=eq.G2PlotRenderer,aE=eq.GeneralSchemaDesigner,a$=eq.GeneralSchemaItems,az=eq.GlobalThemeProvider,aO=eq.Grid,aq=eq.GridCard,aH=eq.GridModel,aV=eq.GridRowContext,aU=eq.HTMLEncode,aG=eq.HeightMode,aK=eq.ICON_POPUP_Z_INDEX,aW=eq.Icon,aJ=eq.IconFieldInterface,aX=eq.IconPicker,aZ=eq.IdFieldInterface,aQ=eq.InheritanceCollectionMixin,a0=eq.InitializerWithSwitch,a1=eq.Input,a2=eq.InputFieldInterface,a5=eq.InputFieldModel,a4=eq.InputNumber,a7=eq.InputReadPretty,a6=eq.InputRecordPicker,a9=eq.IntegerFieldInterface,a8=eq.InternalAdminSettingsLayout,a3=eq.IsInNocoBaseRecursionFieldContext,re=eq.IsSubPageClosedByPageMenuContext,rt=eq.IsSubPageClosedByPageMenuProvider,ro=eq.JSActionModel,rl=eq.Json,rn=eq.JsonFieldInterface,ra=eq.KeepAlive,rr=eq.LAZY_COMPONENT_KEY,ri=eq.LOADING_DELAY,rs=eq.Layout,rd=eq.LayoutContent,ru=eq.LinkActionModel,rc=eq.LinkToFieldInterface,rp=eq.LinkageFilter,rm=eq.LinkageRuleCategory,rh=eq.LinkageRuleDataKeyMap,rx=eq.List,rv=eq.LocalDataSource,r_=eq.LocationSearchContext,rf=eq.M2MFieldInterface,rg=eq.M2OFieldInterface,rb=eq.Markdown,ry=eq.MarkdownFieldInterface,rS=eq.MarkdownReadPretty,rk=eq.MaybeCollectionProvider,rC=eq.Menu,rM=eq.MenuConfigure,rw=eq.MockFlowModelRepository,rF=eq.ModalActionSchemaInitializerItem,rP=eq.MultipleSelectFieldInterface,rj=eq.NAMESPACE_UI_SCHEMA,rA=eq.NanoIDInput,rI=eq.NanoidFieldInterface,rT=eq.NocoBaseBuildInPlugin,rD=eq.NocoBaseDesktopRouteType,rL=eq.NocoBaseRecursionField,rY=eq.NocoBaseRouteContext,rR=eq.NumberFieldInterface,rB=eq.O2MFieldInterface,rN=eq.O2OFieldInterface,rE=eq.OBOFieldInterface,r$=eq.OHOFieldInterface,rz=eq.OpenModeProvider,rO=eq.OverridingCollectionField,rq=eq.OverridingFieldAction,rH=eq.PMPlugin,rV=eq.Page,rU=eq.PagePopups,rG=eq.PageTabs,rK=eq.Pagination,rW=eq.ParentCollectionFields,rJ=eq.ParentRouteContext,rX=eq.Password,rZ=eq.PasswordFieldInterface,rQ=eq.Percent,r0=eq.PercentFieldInterface,r1=eq.PermissionContext,r2=eq.PermissionProvider,r5=eq.PhoneFieldInterface,r4=eq.PinnedListPlugin,r7=eq.PinnedPluginList,r6=eq.PinnedPluginListContext,r9=eq.PinnedPluginListProvider,r8=eq.Plugin,r3=eq.PluginManager,ie=eq.PluginManagerLink,it=eq.PluginSettingsManager,io=eq.PopupActionModel,il=eq.PopupContextProvider,ia=eq.PopupSettingsProvider,ir=eq.PopupSubTableFormActionGroupModel,ii=eq.PoweredBy,is=eq.Preview,id=eq.QuickEdit,iu=eq.REGEX_OF_VARIABLE,ic=eq.REGEX_OF_VARIABLE_IN_EXPRESSION,ip=eq.Radio,im=eq.RadioGroupFieldInterface,ih=eq.ReadPretty,ix=eq.ReadPrettyRecordPicker,iv=eq.RecordActionGroupModel,i_=eq.RecordAssociationBlockInitializer,ig=eq.RecordAssociationDetailsBlockInitializer,ib=eq.RecordAssociationFormBlockInitializer,iy=eq.RecordAssociationGridCardBlockInitializer,iS=eq.RecordAssociationListBlockInitializer,ik=eq.RecordContext_deprecated,iC=eq.RecordFormBlockInitializer,iM=eq.RecordIndexContext,iw=eq.RecordIndexProvider,iF=eq.RecordLink,iP=eq.RecordPicker,ij=eq.RecordPickerContent,iA=eq.RecordPickerContext,iI=eq.RecordPickerProvider,iT=eq.RecordProvider,iD=eq.RecordReadPrettyAssociationFormBlockInitializer,iL=eq.RecordSelectFieldModel,iY=eq.RecordSimpleProvider,iR=eq.RefreshActionModel,iB=eq.RefreshComponentProvider,iN=eq.RefreshDataBlockRequest,iE=eq.RemoteCollectionManagerProvider,i$=eq.RemoteDocumentTitlePlugin,iz=eq.RemoteDocumentTitleProvider,iO=eq.RemoteSchemaComponent,iq=eq.RemoteSchemaTemplateManagerPlugin,iH=eq.RemoteSchemaTemplateManagerProvider,iV=eq.RemoteSelect,iU=eq.RemoveButton,iG=eq.RemoveConditionContext,iK=eq.RenderChildrenWithAssociationFilter,iW=eq.RequestSettings,iJ=eq.RerenderDataBlockProvider,iX=eq.Resizable,iZ=eq.ResourceActionContext,iQ=eq.ResourceActionProvider,i0=eq.RichText,i1=eq.RichTextFieldInterface,i2=eq.RoleConfigure,i5=eq.RoleResourceCollectionContext,i4=eq.RoleTable,i7=eq.RolesResourcesActions,i6=eq.RouteSchemaComponent,i9=eq.RouterContextCleaner,i8=eq.RouterManager,i3=eq.SNIPPET_PREFIX,se=eq.SanitizedCollectionProvider,st=eq.SchemaComponent,so=eq.SchemaComponentContext,sl=eq.SchemaComponentOnChangeContext,sn=eq.SchemaComponentOptions,sa=eq.SchemaComponentPlugin,sr=eq.SchemaComponentProvider,si=eq.SchemaInitializer,ss=eq.SchemaInitializerActionModal,sd=eq.SchemaInitializerActionModalInternal,su=eq.SchemaInitializerChild,sc=eq.SchemaInitializerChildren,sp=eq.SchemaInitializerContext,sm=eq.SchemaInitializerDivider,sh=eq.SchemaInitializerItem,sx=eq.SchemaInitializerItemContext,sv=eq.SchemaInitializerItemGroup,s_=eq.SchemaInitializerItemGroupInternal,sf=eq.SchemaInitializerItemInternal,sg=eq.SchemaInitializerItems,sb=eq.SchemaInitializerManager,sy=eq.SchemaInitializerMenu,sS=eq.SchemaInitializerMenuProvider,sk=eq.SchemaInitializerOpenModeSchemaItems,sC=eq.SchemaInitializerPlugin,sM=eq.SchemaInitializerSelect,sw=eq.SchemaInitializerSelectInternal,sF=eq.SchemaInitializerSubMenu,sP=eq.SchemaInitializerSubMenuInternal,sj=eq.SchemaInitializerSwitch,sA=eq.SchemaInitializerSwitchInternal,sI=eq.SchemaSettingAccessControl,sT=eq.SchemaSettingItemContext,sD=eq.SchemaSettingOpenModeSchemaItems,sL=eq.SchemaSettings,sY=eq.SchemaSettingsActionLinkItem,sR=eq.SchemaSettingsActionModalItem,sB=eq.SchemaSettingsBlockHeightItem,sN=eq.SchemaSettingsBlockTitleItem,sE=eq.SchemaSettingsCascaderItem,s$=eq.SchemaSettingsChild,sz=eq.SchemaSettingsChildren,sO=eq.SchemaSettingsConnectDataBlocks,sq=eq.SchemaSettingsDataScope,sH=eq.SchemaSettingsDataTemplates,sV=eq.SchemaSettingsDateFormat,sU=eq.SchemaSettingsDefaultSortingRules,sG=eq.SchemaSettingsDefaultValue,sK=eq.SchemaSettingsDivider,sW=eq.SchemaSettingsDropdown,sJ=eq.SchemaSettingsEnableChildCollections,sX=eq.SchemaSettingsFixed,sZ=eq.SchemaSettingsFormItemTemplate,sQ=eq.SchemaSettingsItem,s0=eq.SchemaSettingsItemGroup,s1=eq.SchemaSettingsLayoutItem,s2=eq.SchemaSettingsLinkageRules,s5=eq.SchemaSettingsManager,s4=eq.SchemaSettingsModalItem,s7=eq.SchemaSettingsNumberFormat,s6=eq.SchemaSettingsPlugin,s9=eq.SchemaSettingsPopupItem,s8=eq.SchemaSettingsProvider,s3=eq.SchemaSettingsRemove,de=eq.SchemaSettingsRenderEngine,dt=eq.SchemaSettingsSelectItem,dl=eq.SchemaSettingsSortingRule,dn=eq.SchemaSettingsSubMenu,da=eq.SchemaSettingsSwitchItem,dr=eq.SchemaSettingsTemplate,di=eq.SchemaSettingsWrapper,ds=eq.SchemaTemplateManagerContext,dd=eq.SchemaToolbar,du=eq.SchemaToolbarContext,dc=eq.SchemaToolbarProvider,dp=eq.SchemaToolbarVisibleContext,dm=eq.ScopeSelect,dh=eq.SearchCollections,dx=eq.SearchParamsContext,dv=eq.SecondConFirm,d_=eq.Select,df=eq.SelectActionInitializer,dg=eq.SelectFieldInterface,db=eq.SelectWithTitle,dy=eq.SetDataLoadingMode,dS=eq.SettingCenterPermissionProvider,dk=eq.SettingCenterProvider,dC=eq.SettingsCenterConfigure,dM=eq.SettingsCenterContext,dw=eq.SettingsCenterDropdown,dF=eq.SettingsMenuProvider,dP=eq.ShowFormData,dj=eq.SkeletonFallback,dA=eq.SkipValidation,dI=eq.SnowflakeIdFieldInterface,dT=eq.Sortable,dD=eq.SortableContext,dL=eq.SortableItem,dY=eq.SortableProvider,dR=eq.SourceCollection,dB=eq.SourceForeignKey,dN=eq.SourceKey,dE=eq.Space,d$=eq.StablePopover,dz=eq.StrategyActions,dO=eq.SubFieldDataSourceProvider_deprecated,dq=eq.SubTableColumnModel,dH=eq.SubTableFieldInterface,dV=eq.SubTableFieldModel,dU=eq.SubmitActionInitializer,dG=eq.SwitchLanguage,dK=eq.SyncFieldsAction,dW=eq.SyncFieldsActionCom,dJ=eq.SyncSQLFieldsAction,dX=eq.SystemSettingsPane,dZ=eq.SystemSettingsPlugin,dQ=eq.SystemSettingsSource,d0=eq.Table,d1=eq.TableActionColumnInitializer,d2=eq.TableAssociationFieldGroupModel,d5=eq.TableBlockContext,d4=eq.TableBlockDesigner,d7=eq.TableBlockInitializer,d6=eq.TableBlockModel,d9=eq.TableBlockProvider,d8=eq.TableColumnModel,d3=eq.TableColumnSchemaToolbar,ue=eq.TableField,ut=eq.TableFieldContext,uo=eq.TableFieldProvider,ul=eq.TableFieldResource,un=eq.TableSelectorContext,ua=eq.TableSelectorDesigner,ur=eq.TableSelectorInitializer,ui=eq.TableSelectorParamsProvider,us=eq.TableSelectorProvider,ud=eq.TableV2,uu=eq.TableoidFieldInterface,uc=eq.Tabs,up=eq.TabsContextProvider,um=eq.TargetForeignKey,uh=eq.TargetKey,ux=eq.TemplateBlockProvider,uv=eq.TemplateSummary,u_=eq.Templates,uf=eq.TestDesigner,ug=eq.TextAreaWithContextSelector,ub=eq.TextAreaWithGlobalScope,uy=eq.TextareaFieldInterface,uS=eq.ThroughCollection,uk=eq.ThroughForeignKey,uC=eq.TimeFieldInterface,uM=eq.TimePicker,uw=eq.TreeSelect,uF=eq.UUIDFieldInterface,uP=eq.UnSupportFields,uj=eq.UnixTimestamp,uA=eq.UnixTimestampFieldInterface,uI=eq.UpdateRecordActionModel,uT=eq.UpdatedAtFieldInterface,uD=eq.UpdatedByFieldInterface,uL=eq.Upload,uY=eq.Uploader,uR=eq.UrlFieldInterface,uB=eq.Variable,uN=eq.VariableFilterItem,uE=eq.VariableInput,u$=eq.VariablePopupRecordProvider,uz=eq.VariableScope,uO=eq.VariableScopeProvider,uq=eq.VariableSelect,uH=eq.VariablesContext,uV=eq.VariablesProvider,uU=eq.ViewCollectionField,uG=eq.ViewFieldAction,uK=eq.WithoutFormFieldResource,uW=eq.WithoutTableFieldResource,uJ=eq.actionSettings,uX=eq.actionSettingsItems,uZ=eq.addCustomAlgorithmToTheme,uQ=eq.allowAddNew,u0=eq.appendQueryStringToUrl,u1=eq.applyCollectionFieldUiSchemaToDefaultValueSchema,u2=eq.applyMobilePaginationProps,u5=eq.attachmentFileTypes,u4=eq.autoFill,u7=eq.autoIncrement,u6=eq.canMakeAssociationBlock,u9=eq.collectionDataSource,u8=eq.compatOldTheme,u3=eq.completeURL,ce=eq.compose,ct=eq.constraintsProps,co=eq.createCompactSimpleItemRender,cl=eq.createCreateFormBlockUISchema,cn=eq.createDesignable,ca=eq.createDetailsBlockSchema,cr=eq.createFormActionInitializers,ci=eq.createFormActionInitializers_deprecated,cs=eq.createFormBlockSchema,cd=eq.createFormBlockSettings,cu=eq.createModalSettingsItem,cc=eq.createReadPrettyFormBlockSchema,cp=eq.createRouterManager,cm=eq.createSelectSchemaSettingsItem,ch=eq.createStyles,cx=eq.createSwitchSettingsItem,cv=eq.createTableBlockSchema,c_=eq.createTableBlockUISchema,cf=eq.createTextSettingsItem,cg=eq.css,cb=eq.customAlgorithm,cy=eq.customFormItemInitializers,cS=eq.customFormItemInitializers_deprecated,ck=eq.dataSource,cC=eq.dateTimeProps,cM=eq.defaultFieldNames,cw=eq.defaultInputStyle,cF=eq.defaultProps,cP=eq.defaultTheme,cj=eq.dispatchEventDeep,cA=eq.ds,cI=eq.editFormBlockSettings,cT=eq.editMarkdownFlow,cD=eq.fetchTemplateData,cL=eq.fieldComponentSettingsItem,cY=eq.fieldSettingsFormItem,cR=eq.fileSizeSetting,cB=eq.fillParentFields,cN=eq.filterFormItemSettings,cE=eq.findByUid,c$=eq.findFilterTargets,cz=eq.findFirstPageRoute,cO=eq.findFormBlock,cq=eq.findKanbanFormItem,cH=eq.findKeysByUid,cV=eq.findMenuItem,cU=eq.findParentFieldSchema,cG=eq.findRouteBySchemaUid,cK=eq.formActionInitializers,cW=eq.formDetailsSettings,cJ=eq.formItemInitializers,cX=eq.formItemInitializers_deprecated,cZ=eq.formItemSettings,cQ=eq.formSettings,c0=eq.formV1Settings,c1=eq.genStyleHook,c2=eq.getAppends,c5=eq.getAssociationPath,c4=eq.getCardItemSchema,c7=eq.getCollectionTitle,c6=eq.getConfigurableProperties,c9=eq.getCurrentOptions,c8=eq.getDataSourceHeaders,c3=eq.getDateExact,pe=eq.getDatePickerLabels,pt=eq.getDateRanges,po=eq.getFieldDefaultValue,pl=eq.getFilterByTkByCollection,pn=eq.getFlowPageMenuSchema,pa=eq.getFormValues,pr=eq.getIdsWithChildren,pi=eq.getLabelFormatValue,ps=eq.getLabelWithTooltip,pd=eq.getPageMenuSchema,pu=eq.getPageSchema,pc=eq.getPinnedPluginListKeys,pp=eq.getPopupPathFromParams,pm=eq.getRenderContent,ph=eq.getSchemaSettingsConfirmZIndex,px=eq.getSchemaSettingsDialogZIndex,pv=eq.getShouldChange,p_=eq.getSimpleModePaginationClassName,pf=eq.getStoredPopupContext,pg=eq.getSupportFieldsByAssociation,pb=eq.getSupportFieldsByForeignKey,py=eq.getSystemSettingsMutationData,pS=eq.getTabSchema,pk=eq.getURLSearchParams,pC=eq.getURLSearchParamsChildren,pM=eq.getUniqueKeyFromCollection,pw=eq.getUnknownCountPaginationTotal,pF=eq.getVariableComponentWithScope,pP=eq.getVariableValue,pj=eq.getVariablesFromExpression,pA=eq.getZIndex,pI=eq.gridRowColWrap,pT=eq.handleDateChangeOnForm,pD=eq.hasIcon,pL=eq.i18n,pY=eq.icons,pR=eq.inferPickerType,pB=eq.interfacesOfUnsupportedDefaultValue,pN=eq.interfacesProperties,pE=eq.isAssocField,p$=eq.isBulkEditAction,pz=eq.isDeleteButtonDisabled,pO=eq.isFileCollection,pq=eq.isInFilterFormBlock,pH=eq.isInitializersSame,pV=eq.isMobile,pU=eq.isPatternDisabled,pG=eq.isSameCollection,pK=eq.isShowFilePicker,pW=eq.isSystemField,pJ=eq.isTabPage,pX=eq.isTitleField,pZ=eq.isVariable,pQ=eq.isWriteEmailAction,p0=eq.itemsMerge,p1=eq.joinCollectionName,p2=eq.joinUrlSearch,p5=eq.languageCodes,p4=eq.lazy,p7=eq.locale,p6=eq.mapDatePicker,p9=eq.mapRangePicker,p8=eq.mapTimeFormat,p3=eq.matchMimetype,me=eq.mergeFilter,mt=eq.mergePaginationClassName,mo=eq.mockAPIClient,ml=eq.moment2str,mn=eq.navigateToTab,ma=eq.navigateWithinSelf,mr=eq.normalizeContainer,mi=eq.openViewFlow,ms=eq.operators,md=eq.pageSettings,mu=eq.pageTabSettings,mc=eq.parseCollectionName,mp=eq.parseVariablesAndChangeParamsToQueryString,mm=eq.primaryKey,mh=eq.readPrettyFormSettings,mx=eq.recordBlockInitializers,mv=eq.recordBlockInitializers_deprecated,m_=eq.recordPickerViewer,mf=eq.recursiveParent,mg=eq.reduceValueSize,mb=eq.registerIcon,my=eq.registerIcons,mS=eq.registerInitializerMenusGenerator,mk=eq.relationshipType,mC=eq.removeNullCondition,mM=eq.replaceVariableValue,mw=eq.replaceVariables,mF=eq.requestParentRecordData,mP=eq.resolveFilterPickerFormat,mj=eq.reverseFieldProperties,mA=eq.schemaSettingsLabelLayout,mI=eq.setDataLoadingModeSettingsItem,mT=eq.setDefaultSortingRulesSchemaSettingsItem,mD=eq.setTheDataScopeSchemaSettingsItem,mL=eq.shouldRenderIconInTitle,mY=eq.showFileName,mR=eq.splitWrapSchema,mB=eq.storePopupContext,mN=eq.subTableActionInitializers,mE=eq.subTableActionInitializers_deprecated,m$=eq.systemKeys,mz=eq.tabPaneInitializers,mO=eq.tabPaneInitializersForBulkEditFormBlock,mq=eq.tabPaneInitializersForRecordBlock,mH=eq.tabPaneInitializers_deprecated,mV=eq.tableActionColumnInitializers,mU=eq.tableActionColumnInitializers_deprecated,mG=eq.tableActionInitializers,mK=eq.tableActionInitializers_deprecated,mW=eq.tableBlockSettings,mJ=eq.tableColumnInitializers,mX=eq.tableColumnInitializers_deprecated,mZ=eq.tableColumnSettings,mQ=eq.tableSelectorBlockSettings,m0=eq.timeProps,m1=eq.titleField,m2=eq.toToolsMap,m5=eq.transformFilter,m4=eq.transformToFilter,m7=eq.transformVariableValue,m6=eq.tval,m9=eq.type,m8=eq.unique,m3=eq.updateFilterTargets,he=eq.updateFormActionInitializers,ht=eq.updateFormActionInitializers_deprecated,ho=eq.useACLActionParamsContext,hl=eq.useACLContext,hn=eq.useACLFieldWhitelist,ha=eq.useACLRoleContext,hr=eq.useACLRolesCheck,hi=eq.useAPIClient,hs=eq.useAPITokenVariable,hd=eq.useAclSnippets,hu=eq.useActionAvailable,hc=eq.useActionBarContext,hp=eq.useActionContext,hm=eq.useAdminSchemaUid,hh=eq.useAfterSuccessOptions,hx=eq.useAllAccessDesktopRoutes,hv=eq.useAllCollectionsInheritChainGetter,h_=eq.useAllDataBlocks,hf=eq.useApp,hg=eq.useAppLangContext,hb=eq.useAppSpin,hy=eq.useAriaAttributeOfMenuItem,hS=eq.useAssociatedFields,hk=eq.useAssociatedFormItemInitializerFields,hC=eq.useAssociatedTableColumnInitializerFields,hM=eq.useAssociationCreateActionProps,hw=eq.useAssociationFieldContext,hF=eq.useAssociationFieldModeContext,hP=eq.useAssociationFilterBlockProps,hj=eq.useAssociationFilterProps,hA=eq.useAssociationName,hI=eq.useAssociationNames,hT=eq.useAsyncData,hD=eq.useAttach,hL=eq.useBackButton,hY=eq.useBaseVariable,hR=eq.useBlockAssociationContext,hB=eq.useBlockConfigs,hN=eq.useBlockContext,hE=eq.useBlockHeight,h$=eq.useBlockHeightProps,hz=eq.useBlockRequestContext,hO=eq.useBlockResource,hq=eq.useBlockTemplateContext,hH=eq.useBuiltinVariables,hV=eq.useBulkDestroyAction,hU=eq.useBulkDestroyActionAndRefreshCM,hG=eq.useBulkDestroyActionProps,hK=eq.useCancelAction,hW=eq.useCloseAction,hJ=eq.useCollectValuesToSubmit,hX=eq.useCollection,hZ=eq.useCollectionDataSource,hQ=eq.useCollectionDataSourceItems,h0=eq.useCollectionField,h1=eq.useCollectionFieldFormValues,h2=eq.useCollectionField_deprecated,h5=eq.useCollectionFields,h4=eq.useCollectionFieldsOptions,h7=eq.useCollectionFilterOptions,h6=eq.useCollectionHistory,h9=eq.useCollectionManager,h8=eq.useCollectionManager_deprecated,h3=eq.useCollectionParentRecord,xe=eq.useCollectionParentRecordData,xt=eq.useCollectionRecord,xo=eq.useCollectionRecordData,xl=eq.useCollectionState,xn=eq.useCollection_deprecated,xa=eq.useCollections,xr=eq.useColumnSchema,xi=eq.useColumnSettings,xs=eq.useCompatOldVariables,xd=eq.useCompile,xu=eq.useComponent,xc=eq.useContextAssociationFields,xp=eq.useContextVariable,xm=eq.useCreateActionProps,xh=eq.useCreateAssociationDetailsBlock,xx=eq.useCreateAssociationDetailsWithoutPagination,xv=eq.useCreateAssociationFormBlock,x_=eq.useCreateAssociationGridCardBlock,xf=eq.useCreateAssociationListBlock,xg=eq.useCreateAssociationTableBlock,xb=eq.useCreateEditFormBlock,xy=eq.useCreateFormBlock,xS=eq.useCreateTableBlock,xk=eq.useCurrentAppInfo,xC=eq.useCurrentDocumentTitle,xM=eq.useCurrentPageUid,xw=eq.useCurrentPopupContext,xF=eq.useCurrentPopupRecord,xP=eq.useCurrentRoleMode,xj=eq.useCurrentRoleVariable,xA=eq.useCurrentRoles,xI=eq.useCurrentRoute,xT=eq.useCurrentSchema,xD=eq.useCurrentSearchParams,xL=eq.useCurrentTabUid,xY=eq.useCurrentUserContext,xR=eq.useCurrentUserSettingsMenu,xB=eq.useCurrentUserVariable,xN=eq.useCustomizeBulkUpdateActionProps,xE=eq.useCustomizeRequestActionProps,x$=eq.useCustomizeUpdateActionProps,xz=eq.useDataBlock,xO=eq.useDataBlockHeight,xq=eq.useDataBlockParentRecord,xH=eq.useDataBlockProps,xV=eq.useDataBlockRequest,xU=eq.useDataBlockRequestData,xG=eq.useDataBlockRequestGetter,xK=eq.useDataBlockResource,xW=eq.useDataLoadingMode,xJ=eq.useDataSource,xX=eq.useDataSourceFromRAC,xZ=eq.useDataSourceHeaders,xQ=eq.useDataSourceKey,x0=eq.useDataSourceManager,x1=eq.useDataTemplates,x2=eq.useDatePickerContext,x5=eq.useDateVariable,x4=eq.useDatetimeVariable,x7=eq.useDatetimeVariableContext,x6=eq.useDeleteRouteSchema,x9=eq.useDesignable,x8=eq.useDesigner,x3=eq.useDestroyAction,ve=eq.useDestroyActionAndRefreshCM,vt=eq.useDestroyActionProps,vo=eq.useDetailsBlockContext,vl=eq.useDetailsBlockProps,vn=eq.useDetailsDecoratorProps,va=eq.useDetailsPaginationProps,vr=eq.useDetailsParentRecord,vi=eq.useDetailsProps,vs=eq.useDetailsWithPaginationBlockParams,vd=eq.useDetailsWithPaginationDecoratorProps,vu=eq.useDetailsWithPaginationProps,vc=eq.useDisassociateActionProps,vp=eq.useDocumentTitle,vm=eq.useDownloadLogs,vh=eq.useEditTableActionProps,vx=eq.useEnsureOperatorsValid,vv=eq.useExactDateVariable,v_=eq.useExactDateVariableContext,vf=eq.useExtendCollections,vg=eq.useFieldComponentName,vb=eq.useFieldComponentOptions,vy=eq.useFieldInterfaceOptions,vS=eq.useFieldMode,vk=eq.useFieldModeOptions,vC=eq.useFieldNames,vM=eq.useFieldProps,vw=eq.useFieldTitle,vF=eq.useFilterAPI,vP=eq.useFilterActionProps,vj=eq.useFilterBlock,vA=eq.useFilterBlockActionProps,vI=eq.useFilterByTk,vT=eq.useFilterFieldOptions,vD=eq.useFilterFieldProps,vL=eq.useFilterOptions,vY=eq.useFindComponent,vR=eq.useFlag,vB=eq.useFormActiveFields,vN=eq.useFormBlockContext,vE=eq.useFormBlockProps,v$=eq.useFormBlockType,vz=eq.useFormDataTemplates,vO=eq.useFormFieldContext,vq=eq.useFormFieldProps,vH=eq.useFormItemInitializerFields,vV=eq.useGetAriaLabelOfAction,vU=eq.useGetAriaLabelOfDesigner,vG=eq.useGetAriaLabelOfDrawer,vK=eq.useGetAriaLabelOfModal,vW=eq.useGetAriaLabelOfPopover,vJ=eq.useGetFilterFieldOptions,vX=eq.useGetFilterOptions,vZ=eq.useGetSchemaInitializerMenuItems,vQ=eq.useGlobalTheme,v0=eq.useGlobalVariable,v1=eq.useGlobalVariableCtx,v2=eq.useGridContext,v5=eq.useGridRowContext,v4=eq.useHistoryCollectionsByNames,v7=eq.useInheritsTableColumnInitializerFields,v6=eq.useInsertPageSchema,v9=eq.useIsAddNewForm,v8=eq.useIsAdminPage,v3=eq.useIsAllowToSetDefaultValue,_e=eq.useIsAssociationField,_t=eq.useIsDetailBlock,_o=eq.useIsFieldReadPretty,_l=eq.useIsFileField,_n=eq.useIsFormReadPretty,_a=eq.useIsInSettingsPage,_r=eq.useIsLoggedIn,_i=eq.useIsSameOrChildCollection,_s=eq.useIsSelectFieldMode,_d=eq.useIsSubPageClosedByPageMenu,_u=eq.useKeepAlive,_c=eq.useKeepAliveLocationSearch,_p=eq.useLabelUiSchema,_m=eq.useLazy,_h=eq.useLinkActionProps,_x=eq.useLinkageAction,_v=eq.useLinkageCollectionFilterOptions,__=eq.useListBlockContext,_f=eq.useLocalVariables,_g=eq.useLocalVariablesWithoutCustomVariable,_b=eq.useLocationNoUpdate,_y=eq.useLocationSearch,_S=eq.useMenuDragEnd,_k=eq.useMenuSearch,_C=eq.useMenuTranslation,_M=eq.useMobileLayout,_w=eq.useNavigateNoUpdate,_F=eq.useNocoBaseRoutes,_P=eq.useOpenModeContext,_j=eq.useOptionalFieldList,_A=eq.useParamsFromRecord,_I=eq.useParentCollection,_T=eq.useParentRecordCommon,_D=eq.useParentRoute,_L=eq.useParseDataScopeFilter,_Y=eq.useParseURLAndParams,_R=eq.useParsedFilter,_B=eq.usePickActionProps,_N=eq.usePlugin,_E=eq.usePopupSettings,_$=eq.usePopupUtils,_z=eq.usePopupVariable,_O=eq.usePopupVariableContext,_q=eq.useProps,_H=eq.useRecord,_V=eq.useRecordCollectionDataSourceItems,_U=eq.useRecordIndex,_G=eq.useRecordIsOwn,_K=eq.useRecordPkValue,_W=eq.useRefreshActionProps,_J=eq.useRefreshFieldSchema,_X=eq.useRemoteCollectionManagerLoading,_Z=eq.useRemoveActionProps,_Q=eq.useRemoveGridFormItem,_0=eq.useRequest,_1=eq.useRerenderDataBlock,_2=eq.useResetBlockActionProps,_5=eq.useResource,_4=eq.useResourceActionContext,_7=eq.useResourceContext,_6=eq.useRoleRecheck,_9=eq.useRoleVariable,_8=eq.useRolesResourcesScopesSelectedRowKeys,_3=eq.useRouter,fe=eq.useRouterBasename,ft=eq.useSchemaComponentContext,fo=eq.useSchemaInitializer,fl=eq.useSchemaInitializerItem,fn=eq.useSchemaInitializerMenuItems,fa=eq.useSchemaInitializerRender,fr=eq.useSchemaInitializerStyles,fi=eq.useSchemaInitializerSubMenuContext,fs=eq.useSchemaOptionsContext,fd=eq.useSchemaSettings,fu=eq.useSchemaSettingsItem,fc=eq.useSchemaSettingsRender,fp=eq.useSchemaTemplate,fm=eq.useSchemaTemplateManager,fh=eq.useSchemaToolbar,fx=eq.useSchemaToolbarRender,fv=eq.useSortFields,f_=eq.useSourceId,ff=eq.useSourceIdFromParentRecord,fg=eq.useSourceIdFromRecord,fb=eq.useStyles,fy=eq.useSupportedBlocks,fS=eq.useSyncFromForm,fk=eq.useSystemSettings,fC=eq.useSystemSettingsVariable,fM=eq.useTableBlockContext,fw=eq.useTableBlockContextBasicValue,fF=eq.useTableBlockDecoratorProps,fP=eq.useTableBlockParams,fj=eq.useTableBlockProps,fA=eq.useTableColumnInitializerFields,fI=eq.useTableColumnIntegration,fT=eq.useTableColumns,fD=eq.useTableFieldContext,fL=eq.useTableFieldProps,fY=eq.useTableSelectorContext,fR=eq.useTableSelectorProps,fB=eq.useTableSize,fN=eq.useTabsContext,fE=eq.useTemplateBlockContext,f$=eq.useTitleFieldOptions,fz=eq.useToken,fO=eq.useUIConfigurationPermissions,fq=eq.useURLAndHTMLSchema,fH=eq.useURLSearchParamsCtx,fV=eq.useURLSearchParamsVariable,fU=eq.useUpdateActionProps,fG=eq.useUpdateCollectionActionAndRefreshCM,fK=eq.useUploadStyles,fW=eq.useUserVariable,fJ=eq.useValidateSchema,fX=eq.useValuesFromRecord,fZ=eq.useVariableOptions,fQ=eq.useVariableScope,f0=eq.useVariableScopeInfo,f1=eq.useVariables,f2=eq.useViewport,f5=eq.useZIndexContext,f4=eq.withDynamicSchemaProps,f7=eq.withInitializer,f6=eq.withSearchParams,f9=eq.withSkeletonComponent,f8=eq.zIndexContext;export{eH as ACLActionParamsContext,eV as ACLActionProvider,eU as ACLCollectionFieldProvider,eG as ACLCollectionProvider,eK as ACLContext,eW as ACLCustomContext,eJ as ACLMenuItemProvider,eX as ACLPane,eZ as ACLPlugin,eQ as ACLProvider,e0 as ACLRolesCheckProvider,e1 as ADMIN_SETTINGS_KEY,e2 as ADMIN_SETTINGS_PATH,e5 as AIManager,e4 as APIClient,e7 as APIClientContext,e6 as APIClientProvider,e9 as AccessControl,e8 as Action,e3 as ActionBar,te as ActionBarAssociationFilterAction,tt as ActionBarProvider,to as ActionContext,tl as ActionContextNoRerender,tn as ActionContextProvider,ta as ActionDesigner,tr as ActionGroupModel,ti as ActionInitializer,ts as ActionInitializerItem,td as ActionModel,tu as ActionSceneEnum,tc as ActionType,tp as AddChildActionModel,tm as AddCollection,th as AddCollectionAction,tx as AddCollectionField,tv as AddFieldAction,t_ as AddNewActionModel,tf as AddSubFieldAction,tg as AdminDynamicPage,tb as AdminLayout,ty as AdminLayoutMenuItemModel,tS as AdminLayoutPlugin,tk as AdminProvider,tC as AdminSettingsLayout,tM as AdminSettingsLayoutModel,tw as AfterSuccess,tF as AllDataBlocksContext,tP as AllDataBlocksProvider,tj as AntdAppProvider,tA as AntdConfigPlugin,tI as AntdConfigProvider,tT as AntdSchemaComponentPlugin,tD as AntdSchemaComponentProvider,tL as AppLangContext,tY as AppNotFound,tR as AppendsTreeSelect,tB as Application,tN as ApplicationContext,tE as AssignFormModel,t$ as AssignedFieldValues,tz as AssociatedFields,tO as AssociationField,tq as AssociationFieldMode,tH as AssociationFieldModeProvider,tV as AssociationFilter,tU as AssociationFilterDesignerDelete,tG as AssociationFilterDesignerDisplayField,tK as AssociationFilterPlugin,tW as AssociationOrCollectionProvider,tJ as AssociationProvider,tX as AssociationSelect,tZ as AsyncDataContext,tQ as AsyncDataProvider,t0 as AttachmentList,t1 as AutoComplete,t2 as BackButtonUsedInSubPage,t5 as BaseVariableProvider,t4 as BlankComponent,t7 as Block,t6 as BlockAssociationContext,t9 as BlockConfigsContext,t8 as BlockConfigsProvider,t3 as BlockContext,oe as BlockGridModel,ot as BlockInitializer,oo as BlockItem,ol as BlockItemCard,on as BlockItemCardContext,oa as BlockItemInitializer,or as BlockModel,oi as BlockProvider,os as BlockRequestContextProvider,od as BlockRequestContext_deprecated,ou as BlockRequestLoadingContext,oc as BlockRequestProvider,op as BlockRequestProvider_deprecated,om as BlockResourceContext,oh as BlockSceneEnum,ox as BlockSchemaComponentPlugin,ov as BlockSchemaComponentProvider,o_ as BlockSchemaToolbar,of as BlockTemplateContext,og as BlockTemplateDetails,ob as BlockTemplatePage,oy as BlockTemplateProvider,oS as BlockTemplatesPane,ok as BlocksSelector,oC as ButtonEditor,oM as CSSVariableProvider,ow as CardItem,oF as Cascader,oP as Checkbox,oj as CheckboxFieldInterface,oA as CheckboxGroupFieldInterface,oI as ChildPageModel,oT as ChildPageTabModel,oD as ClearCollectionFieldContext,oL as ClickableFieldModel,oY as CodeEditor,oR as CodeEditorExtension,oB as Collection,oN as CollectionActionGroupModel,oE as CollectionActionModel,o$ as CollectionBlockModel,oz as CollectionCategoriesContext,oO as CollectionCategoriesProvider,oq as CollectionCategory,oH as CollectionContext,oV as CollectionDeletedPlaceholder,oU as CollectionField,oG as CollectionFieldContext,oK as CollectionFieldInterface,oW as CollectionFieldInterfaceManager,oJ as CollectionFieldInterfaceTag,oX as CollectionFieldProvider,oZ as CollectionFieldUISchemaProvider,oQ as CollectionFieldsToFormInitializerItems,o0 as CollectionFieldsToInitializerItems,o1 as CollectionFieldsToTableInitializerItems,o2 as CollectionHistoryProvider,o5 as CollectionManager,o4 as CollectionManagerContext,o7 as CollectionManagerProvider,o6 as CollectionManagerProvider_deprecated,o9 as CollectionManagerSchemaComponentProvider,o8 as CollectionNotAllowViewPlaceholder,o3 as CollectionPlugin,le as CollectionProvider,lt as CollectionProvider_deprecated,lo as CollectionRecord,ll as CollectionRecordContext,ln as CollectionRecordProvider,la as CollectionSelect,lr as CollectionSelectFieldInterface,li as CollectionTemplate,ls as CollectionTemplateManager,ld as CollectionTemplateTag,lu as ColorFieldInterface,lc as ColorPicker,lp as ColorSelect,lm as CommonItemModel,lh as CompatibleSchemaInitializer,lx as CreateFilterActionInitializer,lv as CreateFormModel,l_ as CreateResetActionInitializer,lf as CreatedAtFieldInterface,lg as CreatedByFieldInterface,lb as Cron,ly as CronSet,lS as CurrentAppInfoContext,lk as CurrentAppInfoProvider,lC as CurrentPageUidContext,lM as CurrentPageUidProvider,lw as CurrentRouteProvider,lF as CurrentTabUidContext,lP as CurrentTabUidProvider,lj as CurrentUserContext,lA as CurrentUserProvider,lI as CurrentUserSettingsMenuProvider,lT as CustomRouterContextProvider,lD as CustomizeActionInitializer,lL as DEBOUNCE_WAIT,lY as DEFAULT_DATA_SOURCE_KEY,lR as DEFAULT_DATA_SOURCE_TITLE,lB as DataBlockCollector,lN as DataBlockContext,lE as DataBlockInitializer,l$ as DataBlockModel,lz as DataBlockProvider,lO as DataBlockResourceContext,lq as DataBlockResourceProvider,lH as DataSource,lV as DataSourceApplicationProvider,lU as DataSourceCollectionCascader,lG as DataSourceContext,lK as DataSourceContext_deprecated,lW as DataSourceManager,lJ as DataSourceManagerContext,lX as DataSourceManagerProvider,lZ as DataSourceProvider,lQ as DataSourceProvider_deprecated,l0 as DataSourceSelect,l1 as DateFieldInterface,l2 as DateFilterDynamicComponent,l5 as DateFormatCom,l4 as DatePicker,l7 as DatePickerProvider,l6 as DatetimeFieldInterface,l9 as DatetimeNoTzFieldInterface,l8 as DefaultToolsManager,l3 as DefaultValueProvider,ne as DeleteCollection,nt as DeleteCollectionAction,no as Designable,nl as DesignableSwitch,nn as Details,na as DetailsAssociationFieldGroupModel,nr as DetailsBlockContext,ni as DetailsBlockModel,ns as DetailsBlockProvider,nd as DetailsCustomItemModel,nu as DetailsDesigner,nc as DetailsGridModel,np as DetailsItemModel,nm as DisplaySubTableFieldModel,nh as DisplayTextFieldModel,nx as DisplayTitleFieldModel,nv as Divider,n_ as DndContext,nf as DocumentTitleContext,ng as DocumentTitleProvider,nb as DragHandler,ny as DraggableContext,nS as DropdownVisibleContext,nk as EMPTY_OBJECT,nC as EditCollection,nM as EditCollectionAction,nw as EditCollectionField,nF as EditComponent,nP as EditDefaultValue,nj as EditDescription,nA as EditFieldAction,nI as EditFormModel,nT as EditOperator,nD as EditPattern,nL as EditRequired,nY as EditSortField,nR as EditSubFieldAction,nB as EditTable,nN as EditTableAction,nE as EditTableActionContext,n$ as EditTitle,nz as EditTitleField,nO as EditTooltip,nq as EditValidationRules,nH as Editable,nV as EllipsisWithTooltip,nU as EmailFieldInterface,nG as ErrorFallback,nK as Expand,nW as ExpiresRadio,nJ as ExtendCollectionsContext,nX as ExtendCollectionsProvider,nZ as FieldModel,nQ as FieldModelRenderer,n0 as FieldSummary,n1 as FieldValidation,n2 as FieldsTreeSelect,n5 as Fieldset,n4 as Filter,n7 as FilterAction,n6 as FilterActionContext,n9 as FilterActionModel,n8 as FilterAssociatedFields,n3 as FilterBlockModel,ae as FilterBlockProvider,at as FilterBlockType,ao as FilterContext,al as FilterDynamicComponent,an as FilterFormActionGroupModel,aa as FilterFormBlockModel,ar as FilterFormBlockProvider,ai as FilterFormItemModel,as as FilterGroup,ad as FilterLogicContext,au as FilterParentCollectionFields,ac as FlagContext,ap as FlagProvider,am as ForeignKey,ah as Form,ax as FormActionGroupModel,av as FormActionModel,a_ as FormActiveFieldsProvider,af as FormAssociationFieldGroupModel,ag as FormBlockContext,ab as FormBlockInitializer,ay as FormBlockModel,aS as FormBlockProvider,ak as FormComponent,aC as FormDialog,aM as FormDrawer,aw as FormField,aF as FormFieldContext,aP as FormFieldProvider,aj as FormGridModel,aA as FormItem,aI as FormItemModel,aT as FormItemSchemaToolbar,aD as FormProvider,aL as FormSubmitActionModel,aY as FormV2,aR as G2Plot,aB as G2PlotInitializer,aN as G2PlotRenderer,aE as GeneralSchemaDesigner,a$ as GeneralSchemaItems,az as GlobalThemeProvider,aO as Grid,aq as GridCard,aH as GridModel,aV as GridRowContext,aU as HTMLEncode,aG as HeightMode,aK as ICON_POPUP_Z_INDEX,aW as Icon,aJ as IconFieldInterface,aX as IconPicker,aZ as IdFieldInterface,aQ as InheritanceCollectionMixin,a0 as InitializerWithSwitch,a1 as Input,a2 as InputFieldInterface,a5 as InputFieldModel,a4 as InputNumber,a7 as InputReadPretty,a6 as InputRecordPicker,a9 as IntegerFieldInterface,a8 as InternalAdminSettingsLayout,a3 as IsInNocoBaseRecursionFieldContext,re as IsSubPageClosedByPageMenuContext,rt as IsSubPageClosedByPageMenuProvider,ro as JSActionModel,rl as Json,rn as JsonFieldInterface,ra as KeepAlive,rr as LAZY_COMPONENT_KEY,ri as LOADING_DELAY,rs as Layout,rd as LayoutContent,ru as LinkActionModel,rc as LinkToFieldInterface,rp as LinkageFilter,rm as LinkageRuleCategory,rh as LinkageRuleDataKeyMap,rx as List,rv as LocalDataSource,r_ as LocationSearchContext,rf as M2MFieldInterface,rg as M2OFieldInterface,rb as Markdown,ry as MarkdownFieldInterface,rS as MarkdownReadPretty,rk as MaybeCollectionProvider,rC as Menu,rM as MenuConfigure,rw as MockFlowModelRepository,rF as ModalActionSchemaInitializerItem,rP as MultipleSelectFieldInterface,rj as NAMESPACE_UI_SCHEMA,rA as NanoIDInput,rI as NanoidFieldInterface,rT as NocoBaseBuildInPlugin,rD as NocoBaseDesktopRouteType,rL as NocoBaseRecursionField,rY as NocoBaseRouteContext,rR as NumberFieldInterface,rB as O2MFieldInterface,rN as O2OFieldInterface,rE as OBOFieldInterface,r$ as OHOFieldInterface,rz as OpenModeProvider,rO as OverridingCollectionField,rq as OverridingFieldAction,rH as PMPlugin,rV as Page,rU as PagePopups,rG as PageTabs,rK as Pagination,rW as ParentCollectionFields,rJ as ParentRouteContext,rX as Password,rZ as PasswordFieldInterface,rQ as Percent,r0 as PercentFieldInterface,r1 as PermissionContext,r2 as PermissionProvider,r5 as PhoneFieldInterface,r4 as PinnedListPlugin,r7 as PinnedPluginList,r6 as PinnedPluginListContext,r9 as PinnedPluginListProvider,r8 as Plugin,r3 as PluginManager,ie as PluginManagerLink,it as PluginSettingsManager,io as PopupActionModel,il as PopupContextProvider,ia as PopupSettingsProvider,ir as PopupSubTableFormActionGroupModel,ii as PoweredBy,is as Preview,id as QuickEdit,iu as REGEX_OF_VARIABLE,ic as REGEX_OF_VARIABLE_IN_EXPRESSION,ip as Radio,im as RadioGroupFieldInterface,ih as ReadPretty,ix as ReadPrettyRecordPicker,iv as RecordActionGroupModel,i_ as RecordAssociationBlockInitializer,ig as RecordAssociationDetailsBlockInitializer,ib as RecordAssociationFormBlockInitializer,iy as RecordAssociationGridCardBlockInitializer,iS as RecordAssociationListBlockInitializer,ik as RecordContext_deprecated,iC as RecordFormBlockInitializer,iM as RecordIndexContext,iw as RecordIndexProvider,iF as RecordLink,iP as RecordPicker,ij as RecordPickerContent,iA as RecordPickerContext,iI as RecordPickerProvider,iT as RecordProvider,iD as RecordReadPrettyAssociationFormBlockInitializer,iL as RecordSelectFieldModel,iY as RecordSimpleProvider,iR as RefreshActionModel,iB as RefreshComponentProvider,iN as RefreshDataBlockRequest,iE as RemoteCollectionManagerProvider,i$ as RemoteDocumentTitlePlugin,iz as RemoteDocumentTitleProvider,iO as RemoteSchemaComponent,iq as RemoteSchemaTemplateManagerPlugin,iH as RemoteSchemaTemplateManagerProvider,iV as RemoteSelect,iU as RemoveButton,iG as RemoveConditionContext,iK as RenderChildrenWithAssociationFilter,iW as RequestSettings,iJ as RerenderDataBlockProvider,iX as Resizable,iZ as ResourceActionContext,iQ as ResourceActionProvider,i0 as RichText,i1 as RichTextFieldInterface,i2 as RoleConfigure,i5 as RoleResourceCollectionContext,i4 as RoleTable,i7 as RolesResourcesActions,i6 as RouteSchemaComponent,i9 as RouterContextCleaner,i8 as RouterManager,i3 as SNIPPET_PREFIX,se as SanitizedCollectionProvider,st as SchemaComponent,so as SchemaComponentContext,sl as SchemaComponentOnChangeContext,sn as SchemaComponentOptions,sa as SchemaComponentPlugin,sr as SchemaComponentProvider,si as SchemaInitializer,ss as SchemaInitializerActionModal,sd as SchemaInitializerActionModalInternal,su as SchemaInitializerChild,sc as SchemaInitializerChildren,sp as SchemaInitializerContext,sm as SchemaInitializerDivider,sh as SchemaInitializerItem,sx as SchemaInitializerItemContext,sv as SchemaInitializerItemGroup,s_ as SchemaInitializerItemGroupInternal,sf as SchemaInitializerItemInternal,sg as SchemaInitializerItems,sb as SchemaInitializerManager,sy as SchemaInitializerMenu,sS as SchemaInitializerMenuProvider,sk as SchemaInitializerOpenModeSchemaItems,sC as SchemaInitializerPlugin,sM as SchemaInitializerSelect,sw as SchemaInitializerSelectInternal,sF as SchemaInitializerSubMenu,sP as SchemaInitializerSubMenuInternal,sj as SchemaInitializerSwitch,sA as SchemaInitializerSwitchInternal,sI as SchemaSettingAccessControl,sT as SchemaSettingItemContext,sD as SchemaSettingOpenModeSchemaItems,sL as SchemaSettings,sY as SchemaSettingsActionLinkItem,sR as SchemaSettingsActionModalItem,sB as SchemaSettingsBlockHeightItem,sN as SchemaSettingsBlockTitleItem,sE as SchemaSettingsCascaderItem,s$ as SchemaSettingsChild,sz as SchemaSettingsChildren,sO as SchemaSettingsConnectDataBlocks,sq as SchemaSettingsDataScope,sH as SchemaSettingsDataTemplates,sV as SchemaSettingsDateFormat,sU as SchemaSettingsDefaultSortingRules,sG as SchemaSettingsDefaultValue,sK as SchemaSettingsDivider,sW as SchemaSettingsDropdown,sJ as SchemaSettingsEnableChildCollections,sX as SchemaSettingsFixed,sZ as SchemaSettingsFormItemTemplate,sQ as SchemaSettingsItem,s0 as SchemaSettingsItemGroup,s1 as SchemaSettingsLayoutItem,s2 as SchemaSettingsLinkageRules,s5 as SchemaSettingsManager,s4 as SchemaSettingsModalItem,s7 as SchemaSettingsNumberFormat,s6 as SchemaSettingsPlugin,s9 as SchemaSettingsPopupItem,s8 as SchemaSettingsProvider,s3 as SchemaSettingsRemove,de as SchemaSettingsRenderEngine,dt as SchemaSettingsSelectItem,dl as SchemaSettingsSortingRule,dn as SchemaSettingsSubMenu,da as SchemaSettingsSwitchItem,dr as SchemaSettingsTemplate,di as SchemaSettingsWrapper,ds as SchemaTemplateManagerContext,dd as SchemaToolbar,du as SchemaToolbarContext,dc as SchemaToolbarProvider,dp as SchemaToolbarVisibleContext,dm as ScopeSelect,dh as SearchCollections,dx as SearchParamsContext,dv as SecondConFirm,d_ as Select,df as SelectActionInitializer,dg as SelectFieldInterface,db as SelectWithTitle,dy as SetDataLoadingMode,dS as SettingCenterPermissionProvider,dk as SettingCenterProvider,dC as SettingsCenterConfigure,dM as SettingsCenterContext,dw as SettingsCenterDropdown,dF as SettingsMenuProvider,dP as ShowFormData,dj as SkeletonFallback,dA as SkipValidation,dI as SnowflakeIdFieldInterface,dT as Sortable,dD as SortableContext,dL as SortableItem,dY as SortableProvider,dR as SourceCollection,dB as SourceForeignKey,dN as SourceKey,dE as Space,d$ as StablePopover,dz as StrategyActions,dO as SubFieldDataSourceProvider_deprecated,dq as SubTableColumnModel,dH as SubTableFieldInterface,dV as SubTableFieldModel,dU as SubmitActionInitializer,dG as SwitchLanguage,dK as SyncFieldsAction,dW as SyncFieldsActionCom,dJ as SyncSQLFieldsAction,dX as SystemSettingsPane,dZ as SystemSettingsPlugin,dQ as SystemSettingsSource,d0 as Table,d1 as TableActionColumnInitializer,d2 as TableAssociationFieldGroupModel,d5 as TableBlockContext,d4 as TableBlockDesigner,d7 as TableBlockInitializer,d6 as TableBlockModel,d9 as TableBlockProvider,d8 as TableColumnModel,d3 as TableColumnSchemaToolbar,ue as TableField,ut as TableFieldContext,uo as TableFieldProvider,ul as TableFieldResource,un as TableSelectorContext,ua as TableSelectorDesigner,ur as TableSelectorInitializer,ui as TableSelectorParamsProvider,us as TableSelectorProvider,ud as TableV2,uu as TableoidFieldInterface,uc as Tabs,up as TabsContextProvider,um as TargetForeignKey,uh as TargetKey,ux as TemplateBlockProvider,uv as TemplateSummary,u_ as Templates,uf as TestDesigner,ug as TextAreaWithContextSelector,ub as TextAreaWithGlobalScope,uy as TextareaFieldInterface,uS as ThroughCollection,uk as ThroughForeignKey,uC as TimeFieldInterface,uM as TimePicker,uw as TreeSelect,uF as UUIDFieldInterface,uP as UnSupportFields,uj as UnixTimestamp,uA as UnixTimestampFieldInterface,uI as UpdateRecordActionModel,uT as UpdatedAtFieldInterface,uD as UpdatedByFieldInterface,uL as Upload,uY as Uploader,uR as UrlFieldInterface,uB as Variable,uN as VariableFilterItem,uE as VariableInput,u$ as VariablePopupRecordProvider,uz as VariableScope,uO as VariableScopeProvider,uq as VariableSelect,uH as VariablesContext,uV as VariablesProvider,uU as ViewCollectionField,uG as ViewFieldAction,uK as WithoutFormFieldResource,uW as WithoutTableFieldResource,uJ as actionSettings,uX as actionSettingsItems,uZ as addCustomAlgorithmToTheme,uQ as allowAddNew,u0 as appendQueryStringToUrl,u1 as applyCollectionFieldUiSchemaToDefaultValueSchema,u2 as applyMobilePaginationProps,u5 as attachmentFileTypes,u4 as autoFill,u7 as autoIncrement,u6 as canMakeAssociationBlock,u9 as collectionDataSource,u8 as compatOldTheme,u3 as completeURL,ce as compose,ct as constraintsProps,co as createCompactSimpleItemRender,cl as createCreateFormBlockUISchema,cn as createDesignable,ca as createDetailsBlockSchema,cr as createFormActionInitializers,ci as createFormActionInitializers_deprecated,cs as createFormBlockSchema,cd as createFormBlockSettings,cu as createModalSettingsItem,cc as createReadPrettyFormBlockSchema,cp as createRouterManager,cm as createSelectSchemaSettingsItem,ch as createStyles,cx as createSwitchSettingsItem,cv as createTableBlockSchema,c_ as createTableBlockUISchema,cf as createTextSettingsItem,cg as css,cb as customAlgorithm,cy as customFormItemInitializers,cS as customFormItemInitializers_deprecated,ck as dataSource,cC as dateTimeProps,cM as defaultFieldNames,cw as defaultInputStyle,cF as defaultProps,cP as defaultTheme,cj as dispatchEventDeep,cA as ds,cI as editFormBlockSettings,cT as editMarkdownFlow,cD as fetchTemplateData,cL as fieldComponentSettingsItem,cY as fieldSettingsFormItem,cR as fileSizeSetting,cB as fillParentFields,cN as filterFormItemSettings,cE as findByUid,c$ as findFilterTargets,cz as findFirstPageRoute,cO as findFormBlock,cq as findKanbanFormItem,cH as findKeysByUid,cV as findMenuItem,cU as findParentFieldSchema,cG as findRouteBySchemaUid,cK as formActionInitializers,cW as formDetailsSettings,cJ as formItemInitializers,cX as formItemInitializers_deprecated,cZ as formItemSettings,cQ as formSettings,c0 as formV1Settings,c1 as genStyleHook,c2 as getAppends,c5 as getAssociationPath,c4 as getCardItemSchema,c7 as getCollectionTitle,c6 as getConfigurableProperties,c9 as getCurrentOptions,c8 as getDataSourceHeaders,c3 as getDateExact,pe as getDatePickerLabels,pt as getDateRanges,po as getFieldDefaultValue,pl as getFilterByTkByCollection,pn as getFlowPageMenuSchema,pa as getFormValues,pr as getIdsWithChildren,pi as getLabelFormatValue,ps as getLabelWithTooltip,pd as getPageMenuSchema,pu as getPageSchema,pc as getPinnedPluginListKeys,pp as getPopupPathFromParams,pm as getRenderContent,ph as getSchemaSettingsConfirmZIndex,px as getSchemaSettingsDialogZIndex,pv as getShouldChange,p_ as getSimpleModePaginationClassName,pf as getStoredPopupContext,pg as getSupportFieldsByAssociation,pb as getSupportFieldsByForeignKey,py as getSystemSettingsMutationData,pS as getTabSchema,pk as getURLSearchParams,pC as getURLSearchParamsChildren,pM as getUniqueKeyFromCollection,pw as getUnknownCountPaginationTotal,pF as getVariableComponentWithScope,pP as getVariableValue,pj as getVariablesFromExpression,pA as getZIndex,pI as gridRowColWrap,pT as handleDateChangeOnForm,pD as hasIcon,pL as i18n,pY as icons,pR as inferPickerType,pB as interfacesOfUnsupportedDefaultValue,pN as interfacesProperties,pE as isAssocField,p$ as isBulkEditAction,pz as isDeleteButtonDisabled,pO as isFileCollection,pq as isInFilterFormBlock,pH as isInitializersSame,pV as isMobile,pU as isPatternDisabled,pG as isSameCollection,pK as isShowFilePicker,pW as isSystemField,pJ as isTabPage,pX as isTitleField,pZ as isVariable,pQ as isWriteEmailAction,p0 as itemsMerge,p1 as joinCollectionName,p2 as joinUrlSearch,p5 as languageCodes,p4 as lazy,p7 as locale,p6 as mapDatePicker,p9 as mapRangePicker,p8 as mapTimeFormat,p3 as matchMimetype,me as mergeFilter,mt as mergePaginationClassName,mo as mockAPIClient,ml as moment2str,mn as navigateToTab,ma as navigateWithinSelf,mr as normalizeContainer,mi as openViewFlow,ms as operators,md as pageSettings,mu as pageTabSettings,mc as parseCollectionName,mp as parseVariablesAndChangeParamsToQueryString,mm as primaryKey,mh as readPrettyFormSettings,mx as recordBlockInitializers,mv as recordBlockInitializers_deprecated,m_ as recordPickerViewer,mf as recursiveParent,mg as reduceValueSize,mb as registerIcon,my as registerIcons,mS as registerInitializerMenusGenerator,mk as relationshipType,mC as removeNullCondition,mM as replaceVariableValue,mw as replaceVariables,mF as requestParentRecordData,mP as resolveFilterPickerFormat,mj as reverseFieldProperties,mA as schemaSettingsLabelLayout,mI as setDataLoadingModeSettingsItem,mT as setDefaultSortingRulesSchemaSettingsItem,mD as setTheDataScopeSchemaSettingsItem,mL as shouldRenderIconInTitle,mY as showFileName,mR as splitWrapSchema,mB as storePopupContext,mN as subTableActionInitializers,mE as subTableActionInitializers_deprecated,m$ as systemKeys,mz as tabPaneInitializers,mO as tabPaneInitializersForBulkEditFormBlock,mq as tabPaneInitializersForRecordBlock,mH as tabPaneInitializers_deprecated,mV as tableActionColumnInitializers,mU as tableActionColumnInitializers_deprecated,mG as tableActionInitializers,mK as tableActionInitializers_deprecated,mW as tableBlockSettings,mJ as tableColumnInitializers,mX as tableColumnInitializers_deprecated,mZ as tableColumnSettings,mQ as tableSelectorBlockSettings,m0 as timeProps,m1 as titleField,m2 as toToolsMap,m5 as transformFilter,m4 as transformToFilter,m7 as transformVariableValue,m6 as tval,m9 as type,m8 as unique,m3 as updateFilterTargets,he as updateFormActionInitializers,ht as updateFormActionInitializers_deprecated,ho as useACLActionParamsContext,hl as useACLContext,hn as useACLFieldWhitelist,ha as useACLRoleContext,hr as useACLRolesCheck,hi as useAPIClient,hs as useAPITokenVariable,hd as useAclSnippets,hu as useActionAvailable,hc as useActionBarContext,hp as useActionContext,hm as useAdminSchemaUid,hh as useAfterSuccessOptions,hx as useAllAccessDesktopRoutes,hv as useAllCollectionsInheritChainGetter,h_ as useAllDataBlocks,hf as useApp,hg as useAppLangContext,hb as useAppSpin,hy as useAriaAttributeOfMenuItem,hS as useAssociatedFields,hk as useAssociatedFormItemInitializerFields,hC as useAssociatedTableColumnInitializerFields,hM as useAssociationCreateActionProps,hw as useAssociationFieldContext,hF as useAssociationFieldModeContext,hP as useAssociationFilterBlockProps,hj as useAssociationFilterProps,hA as useAssociationName,hI as useAssociationNames,hT as useAsyncData,hD as useAttach,hL as useBackButton,hY as useBaseVariable,hR as useBlockAssociationContext,hB as useBlockConfigs,hN as useBlockContext,hE as useBlockHeight,h$ as useBlockHeightProps,hz as useBlockRequestContext,hO as useBlockResource,hq as useBlockTemplateContext,hH as useBuiltinVariables,hV as useBulkDestroyAction,hU as useBulkDestroyActionAndRefreshCM,hG as useBulkDestroyActionProps,hK as useCancelAction,hW as useCloseAction,hJ as useCollectValuesToSubmit,hX as useCollection,hZ as useCollectionDataSource,hQ as useCollectionDataSourceItems,h0 as useCollectionField,h1 as useCollectionFieldFormValues,h2 as useCollectionField_deprecated,h5 as useCollectionFields,h4 as useCollectionFieldsOptions,h7 as useCollectionFilterOptions,h6 as useCollectionHistory,h9 as useCollectionManager,h8 as useCollectionManager_deprecated,h3 as useCollectionParentRecord,xe as useCollectionParentRecordData,xt as useCollectionRecord,xo as useCollectionRecordData,xl as useCollectionState,xn as useCollection_deprecated,xa as useCollections,xr as useColumnSchema,xi as useColumnSettings,xs as useCompatOldVariables,xd as useCompile,xu as useComponent,xc as useContextAssociationFields,xp as useContextVariable,xm as useCreateActionProps,xh as useCreateAssociationDetailsBlock,xx as useCreateAssociationDetailsWithoutPagination,xv as useCreateAssociationFormBlock,x_ as useCreateAssociationGridCardBlock,xf as useCreateAssociationListBlock,xg as useCreateAssociationTableBlock,xb as useCreateEditFormBlock,xy as useCreateFormBlock,xS as useCreateTableBlock,xk as useCurrentAppInfo,xC as useCurrentDocumentTitle,xM as useCurrentPageUid,xw as useCurrentPopupContext,xF as useCurrentPopupRecord,xP as useCurrentRoleMode,xj as useCurrentRoleVariable,xA as useCurrentRoles,xI as useCurrentRoute,xT as useCurrentSchema,xD as useCurrentSearchParams,xL as useCurrentTabUid,xY as useCurrentUserContext,xR as useCurrentUserSettingsMenu,xB as useCurrentUserVariable,xN as useCustomizeBulkUpdateActionProps,xE as useCustomizeRequestActionProps,x$ as useCustomizeUpdateActionProps,xz as useDataBlock,xO as useDataBlockHeight,xq as useDataBlockParentRecord,xH as useDataBlockProps,xV as useDataBlockRequest,xU as useDataBlockRequestData,xG as useDataBlockRequestGetter,xK as useDataBlockResource,xW as useDataLoadingMode,xJ as useDataSource,xX as useDataSourceFromRAC,xZ as useDataSourceHeaders,xQ as useDataSourceKey,x0 as useDataSourceManager,x1 as useDataTemplates,x2 as useDatePickerContext,x5 as useDateVariable,x4 as useDatetimeVariable,x7 as useDatetimeVariableContext,x6 as useDeleteRouteSchema,x9 as useDesignable,x8 as useDesigner,x3 as useDestroyAction,ve as useDestroyActionAndRefreshCM,vt as useDestroyActionProps,vo as useDetailsBlockContext,vl as useDetailsBlockProps,vn as useDetailsDecoratorProps,va as useDetailsPaginationProps,vr as useDetailsParentRecord,vi as useDetailsProps,vs as useDetailsWithPaginationBlockParams,vd as useDetailsWithPaginationDecoratorProps,vu as useDetailsWithPaginationProps,vc as useDisassociateActionProps,vp as useDocumentTitle,vm as useDownloadLogs,vh as useEditTableActionProps,vx as useEnsureOperatorsValid,vv as useExactDateVariable,v_ as useExactDateVariableContext,vf as useExtendCollections,vg as useFieldComponentName,vb as useFieldComponentOptions,vy as useFieldInterfaceOptions,vS as useFieldMode,vk as useFieldModeOptions,vC as useFieldNames,vM as useFieldProps,vw as useFieldTitle,vF as useFilterAPI,vP as useFilterActionProps,vj as useFilterBlock,vA as useFilterBlockActionProps,vI as useFilterByTk,vT as useFilterFieldOptions,vD as useFilterFieldProps,vL as useFilterOptions,vY as useFindComponent,vR as useFlag,vB as useFormActiveFields,vN as useFormBlockContext,vE as useFormBlockProps,v$ as useFormBlockType,vz as useFormDataTemplates,vO as useFormFieldContext,vq as useFormFieldProps,vH as useFormItemInitializerFields,vV as useGetAriaLabelOfAction,vU as useGetAriaLabelOfDesigner,vG as useGetAriaLabelOfDrawer,vK as useGetAriaLabelOfModal,vW as useGetAriaLabelOfPopover,vJ as useGetFilterFieldOptions,vX as useGetFilterOptions,vZ as useGetSchemaInitializerMenuItems,vQ as useGlobalTheme,v0 as useGlobalVariable,v1 as useGlobalVariableCtx,v2 as useGridContext,v5 as useGridRowContext,v4 as useHistoryCollectionsByNames,v7 as useInheritsTableColumnInitializerFields,v6 as useInsertPageSchema,v9 as useIsAddNewForm,v8 as useIsAdminPage,v3 as useIsAllowToSetDefaultValue,_e as useIsAssociationField,_t as useIsDetailBlock,_o as useIsFieldReadPretty,_l as useIsFileField,_n as useIsFormReadPretty,_a as useIsInSettingsPage,_r as useIsLoggedIn,_i as useIsSameOrChildCollection,_s as useIsSelectFieldMode,_d as useIsSubPageClosedByPageMenu,_u as useKeepAlive,_c as useKeepAliveLocationSearch,_p as useLabelUiSchema,_m as useLazy,_h as useLinkActionProps,_x as useLinkageAction,_v as useLinkageCollectionFilterOptions,__ as useListBlockContext,_f as useLocalVariables,_g as useLocalVariablesWithoutCustomVariable,_b as useLocationNoUpdate,_y as useLocationSearch,_S as useMenuDragEnd,_k as useMenuSearch,_C as useMenuTranslation,_M as useMobileLayout,_w as useNavigateNoUpdate,_F as useNocoBaseRoutes,_P as useOpenModeContext,_j as useOptionalFieldList,_A as useParamsFromRecord,_I as useParentCollection,_T as useParentRecordCommon,_D as useParentRoute,_L as useParseDataScopeFilter,_Y as useParseURLAndParams,_R as useParsedFilter,_B as usePickActionProps,_N as usePlugin,_E as usePopupSettings,_$ as usePopupUtils,_z as usePopupVariable,_O as usePopupVariableContext,_q as useProps,_H as useRecord,_V as useRecordCollectionDataSourceItems,_U as useRecordIndex,_G as useRecordIsOwn,_K as useRecordPkValue,_W as useRefreshActionProps,_J as useRefreshFieldSchema,_X as useRemoteCollectionManagerLoading,_Z as useRemoveActionProps,_Q as useRemoveGridFormItem,_0 as useRequest,_1 as useRerenderDataBlock,_2 as useResetBlockActionProps,_5 as useResource,_4 as useResourceActionContext,_7 as useResourceContext,_6 as useRoleRecheck,_9 as useRoleVariable,_8 as useRolesResourcesScopesSelectedRowKeys,_3 as useRouter,fe as useRouterBasename,ft as useSchemaComponentContext,fo as useSchemaInitializer,fl as useSchemaInitializerItem,fn as useSchemaInitializerMenuItems,fa as useSchemaInitializerRender,fr as useSchemaInitializerStyles,fi as useSchemaInitializerSubMenuContext,fs as useSchemaOptionsContext,fd as useSchemaSettings,fu as useSchemaSettingsItem,fc as useSchemaSettingsRender,fp as useSchemaTemplate,fm as useSchemaTemplateManager,fh as useSchemaToolbar,fx as useSchemaToolbarRender,fv as useSortFields,f_ as useSourceId,ff as useSourceIdFromParentRecord,fg as useSourceIdFromRecord,fb as useStyles,fy as useSupportedBlocks,fS as useSyncFromForm,fk as useSystemSettings,fC as useSystemSettingsVariable,fM as useTableBlockContext,fw as useTableBlockContextBasicValue,fF as useTableBlockDecoratorProps,fP as useTableBlockParams,fj as useTableBlockProps,fA as useTableColumnInitializerFields,fI as useTableColumnIntegration,fT as useTableColumns,fD as useTableFieldContext,fL as useTableFieldProps,fY as useTableSelectorContext,fR as useTableSelectorProps,fB as useTableSize,fN as useTabsContext,fE as useTemplateBlockContext,f$ as useTitleFieldOptions,fz as useToken,fO as useUIConfigurationPermissions,fq as useURLAndHTMLSchema,fH as useURLSearchParamsCtx,fV as useURLSearchParamsVariable,fU as useUpdateActionProps,fG as useUpdateCollectionActionAndRefreshCM,fK as useUploadStyles,fW as useUserVariable,fJ as useValidateSchema,fX as useValuesFromRecord,fZ as useVariableOptions,fQ as useVariableScope,f0 as useVariableScopeInfo,f1 as useVariables,f2 as useViewport,f5 as useZIndexContext,f4 as withDynamicSchemaProps,f7 as withInitializer,f6 as withSearchParams,f9 as withSkeletonComponent,f8 as zIndexContext};
1867
+ `;class tV extends q.k{async load(){this.schemaSettingsManager.add(eO.F),this.schemaSettingsManager.add(eD.N),this.schemaSettingsManager.add(eL.R),this.schemaSettingsManager.add(eK),this.schemaSettingsManager.add(eX),this.schemaSettingsManager.add(eF),this.schemaSettingsManager.add(eP),this.schemaSettingsManager.add(eI),this.schemaSettingsManager.add(eT),this.schemaSettingsManager.add(ez.A),this.schemaSettingsManager.add(e$),this.schemaSettingsManager.add(eE),this.schemaSettingsManager.add(eV),this.schemaSettingsManager.add(eZ),this.schemaSettingsManager.add(X),this.schemaSettingsManager.add(er),this.schemaSettingsManager.add(es),this.schemaSettingsManager.add(ed),this.schemaSettingsManager.add(e_),this.schemaSettingsManager.add(ev),this.schemaSettingsManager.add(et),this.schemaSettingsManager.add(eo),this.schemaSettingsManager.add(Q),this.schemaSettingsManager.add(ee),this.schemaSettingsManager.add(Z),this.schemaSettingsManager.add(ex),this.schemaSettingsManager.add(ei.V),this.schemaSettingsManager.add(eh),this.schemaSettingsManager.add(ec.K),this.schemaSettingsManager.add(ep),this.schemaSettingsManager.add(em),this.schemaSettingsManager.add(eu),this.schemaSettingsManager.add(J),this.schemaSettingsManager.add(el),this.schemaSettingsManager.add(eY.l),this.schemaSettingsManager.add(eq._),this.schemaSettingsManager.add(eG),this.schemaSettingsManager.add(e5.NU),this.schemaSettingsManager.add(e5.r0),this.schemaSettingsManager.add(tM),this.schemaSettingsManager.add(tw),this.schemaSettingsManager.add(tk),this.schemaSettingsManager.add(tF),this.schemaSettingsManager.add(tS),this.schemaSettingsManager.add(e6),this.schemaSettingsManager.add(e9),this.schemaSettingsManager.add(tT),this.schemaSettingsManager.add(tm),this.schemaSettingsManager.add(e2.Pq),this.schemaSettingsManager.add(ts),this.schemaSettingsManager.add(ti),this.schemaSettingsManager.add(to),this.schemaSettingsManager.add(td),this.schemaSettingsManager.add(tu),this.schemaSettingsManager.add(tc),this.schemaSettingsManager.add(e8.yp),this.schemaSettingsManager.add(tj),this.schemaSettingsManager.add(e4),this.schemaSettingsManager.add(tr),this.schemaSettingsManager.add(tt),this.schemaSettingsManager.add(te),this.schemaSettingsManager.add(tp),this.schemaSettingsManager.add(tI),this.schemaSettingsManager.add(tH)}}var tU=o(58329),tG=o(4627)},37208(e,t,o){o.d(t,{h:()=>l});let l=e=>{var t;return(null==e||null==(t=e["x-component-props"])?void 0:t["pattern-disable"])==!0}},20349(e,t,o){o.d(t,{e:()=>d});var l=o(56220),n=o(56920),a=o(77843),r=o(70892),i=o(43288),s=o(95951);let d={name:"SetDefaultSortingRules",type:"modal",useComponentProps(){var e,t;let{name:o}=(0,i.k7)(),d=(0,n.useField)(),u=(0,n.useFieldSchema)(),c=(0,i.lY)(o),{service:p}=(0,r.El)(),{t:m}=(0,a.useTranslation)(),{dn:h}=(0,s.er)(),x=(null==u||null==(t=u["x-decorator-props"])||null==(e=t.params)?void 0:e.sort)||[],v=null==x?void 0:x.map(e=>(null==e?void 0:e.startsWith("-"))?{field:e.substring(1),direction:"desc"}:{field:e,direction:"asc"});return{title:m("Set default sorting rules"),components:{ArrayItems:l.ArrayItems},schema:{type:"object",title:m("Set default sorting rules"),properties:{sort:{type:"array",default:v,"x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string",enum:c,required:!0,"x-decorator":"FormItem","x-component":"Select","x-component-props":{style:{width:260}}},direction:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{optionType:"button"},enum:[{label:m("ASC"),value:"asc"},{label:m("DESC"),value:"desc"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:m("Add sort field"),"x-component":"ArrayItems.Addition"}}}}},onSubmit:e=>{var t;let{sort:o}=e,l=o.map(e=>"desc"===e.direction?`-${e.field}`:e.field),n=d.decoratorProps.params||{};n.sort=l,d.decoratorProps.params=n,u["x-decorator-props"].params=n,h.emit("patch",{schema:{"x-uid":u["x-uid"],"x-decorator-props":u["x-decorator-props"]}}),p.run({...null==(t=p.params)?void 0:t[0],sort:l})}}},useVisible(){let{dragSort:e}=(0,n.useField)().decoratorProps;return!e}}},71162(e,t,o){o.d(t,{d:()=>u});var l=o(56920),n=o(51649),a=o(69412),r=o(70892),i=o(43288),s=o(72548),d=o(95951);let u={name:"SetTheDataScope",Component:o(79056).Z,useComponentProps:()=>{var e,t;let{name:o}=(0,i.k7)(),u=(0,l.useField)(),c=(0,l.useFieldSchema)(),{form:p}=(0,a.Es)(),{service:m}=(0,r.El)(),{dn:h}=(0,d.er)(),x=(0,n.useCallback)(e=>{let{filter:t}=e;t=(0,s.pA)(t);let o=u.decoratorProps.params||{};o.filter=t,u.decoratorProps.params=o,c["x-decorator-props"].params=o,h.emit("patch",{schema:{"x-uid":c["x-uid"],"x-decorator-props":c["x-decorator-props"]}}),m.params[0].page=1},[h,u.decoratorProps,c,m]);return{collectionName:o,defaultFilter:(null==c||null==(t=c["x-decorator-props"])||null==(e=t.params)?void 0:e.filter)||{},form:p,onSubmit:x}}}},24768(e,t,o){o.d(t,{V5:()=>a,XZ:()=>r,kU:()=>i});var l=o(71178),n=o(51649);let a=(0,n.createContext)({componentNamePrefix:""}),r=e=>(0,l.jsx)(a.Provider,{value:{...e,componentNamePrefix:e.componentNamePrefix||""},children:e.children}),i=()=>(0,n.useContext)(a)},46909(e,t,o){o.d(t,{IU:()=>S,D$:()=>f,ov:()=>g,sx:()=>y,cC:()=>v});var l=o(71178),n=o(56920),a=o(27404),r=o(77583),i=o(51649),s=o(16211),d=o(83468),u=o(43288),c=o(28227),p=o(44374),m=o(70136),h=o(63526);let x=(0,n.observer)(e=>{let{templateId:t}=e,{getTemplateById:o}=g(),a=(0,n.useField)(),r=(0,n.useFieldSchema)(),{dn:s}=(0,p.useDesignable)(),d=(0,i.useMemo)(()=>o(t),[t]),{onTemplateSuccess:u}=(0,m.y)(),{isMobileLayout:c}=(0,p.useMobileLayout)();return d?(0,l.jsx)(p.BlockTemplateProvider,{dn:s,field:a,fieldSchema:r,template:d,children:(0,l.jsx)(p.RemoteSchemaComponent,{noForm:!0,uid:null==d?void 0:d.uid,onSuccess:e=>{var t,o;r["x-linkage-rules"]=(null==e||null==(t=e.data)?void 0:t["x-linkage-rules"])||[],r.setProperties(null==e||null==(o=e.data)?void 0:o.properties),null==u||u()},schemaTransform:c?h.transformMultiColumnToSingleColumn:void 0})}):(0,l.jsx)(p.CollectionDeletedPlaceholder,{type:"Block template",name:t})},{displayName:"BlockTemplate"}),v=(0,i.createContext)({});v.displayName="SchemaTemplateManagerContext";let _=e=>{e.name=e["x-uid"]=(0,a.uid)(),Object.keys(e.properties||{}).forEach(t=>{_(e.properties[t])})},f=()=>{let{getTemplateBySchema:e}=g(),t=(0,n.useFieldSchema)(),o=t["x-uid"],l=t["x-template-key"];return(0,i.useMemo)(()=>e(t),[o,l])},g=()=>{let{getInheritCollections:e}=(0,u.nj)(),{refresh:t,templates:o=[]}=(0,i.useContext)(v),l=(0,s.VB)();return{templates:o,refresh:t,getTemplateSchemaByMode:(0,i.useCallback)(async e=>{let{mode:t,template:o}=e;if("copy"===t){let{data:e}=await l.request({url:`/uiSchemas:getJsonSchema/${o.uid}?includeAsyncNode=true`}),t=(null==e?void 0:e.data)||{};return _(t),(0,r.cloneDeep)(t)}if("reference"===t)return{type:"void","x-component":"BlockTemplate","x-component-props":{templateId:o.key}}},[l]),copyTemplateSchema:(0,i.useCallback)(async e=>{let{data:t}=await l.request({url:`/uiSchemas:getJsonSchema/${e.uid}?includeAsyncNode=true`}),o=(null==t?void 0:t.data)||{};return _(o),(0,r.cloneDeep)(o)},[l]),saveAsTemplate:(0,i.useCallback)(async e=>{let{uid:o}=e,n=(0,a.uid)();return await l.resource("uiSchemas").saveAsTemplate({filterByTk:o,values:{key:n,...e}}),await t(),{key:n}},[l,t]),getTemplateBySchema:(0,i.useCallback)(e=>{if(!e)return;let t=e["x-template-key"];if(t)return null==o?void 0:o.find(e=>e.key===t);let l=e["x-uid"];if(l)return null==o?void 0:o.find(e=>e.uid===l)},[o]),getTemplateBySchemaId:(0,i.useCallback)(e=>e?null==o?void 0:o.find(t=>t.uid===e):null,[o]),getTemplateById:(0,i.useCallback)(e=>null==o?void 0:o.find(t=>t.key===e),[o]),getTemplatesByCollection:(0,i.useCallback)((t,l)=>{var n;let a=e(l,t).concat([l]);return(null==o||null==(n=o.filter)?void 0:n.call(o,e=>(e.dataSourceKey||c.Ze)===t&&a.includes(e.collectionName)))||[]},[e,o]),getTemplatesByComponentName:(0,i.useCallback)(e=>{var t;return(null==o||null==(t=o.filter)?void 0:t.call(o,t=>t.componentName===e))||[]},[o])}},b={resource:"uiSchemaTemplates",action:"list",params:{paginate:!1},refreshDeps:[]},y=e=>{var t;let o=(0,s.VB)(),n=(0,s.bP)(b),a=(0,i.useCallback)(async()=>{let{data:e}=await o.request(b);n.mutate(e)},[o,n]),r=(0,i.useMemo)(()=>{var e;return{templates:null==n||null==(e=n.data)?void 0:e.data,refresh:a}},[null==n||null==(t=n.data)?void 0:t.data,a]);return(0,l.jsx)(v.Provider,{value:r,children:e.children})};class S extends d.k{async load(){this.addRoutes(),this.addComponents()}addComponents(){this.app.addComponents({BlockTemplate:x})}addRoutes(){this.app.router.add("admin.plugins.block-templates-key",{path:"/admin/plugins/block-templates/:key",Component:"BlockTemplateDetails"})}}},96932(e,t,o){o.d(t,{ov:()=>g.ov,kU:()=>M.kU,YU:()=>p,sx:()=>g.sx,V5:()=>M.V5,IU:()=>g.IU,D$:()=>g.D$,BZ:()=>k,XZ:()=>M.XZ,NV:()=>C,cC:()=>g.cC});var l=o(71178),n=o(34829),a=o(52793),r=o(51649),i=o(38356),s=o(44374),d=o(41897),u=o(82924);let c=e=>{let[t,o]=(0,r.useState)(e.title),[n,i]=(0,r.useState)(!1),{refresh:d}=(0,s.useSchemaTemplateManager)();(0,s.useAPIClient)();let{run:u}=(0,s.useRequest)({resource:"uiSchemaTemplates",action:"update",params:{filterByTk:e.filterByTk}},{manual:!0,debounceWait:500,onSuccess(){d()}});return(0,l.jsx)("div",{children:n?(0,l.jsx)(a.Input,{defaultValue:t,size:"large",onBlur:()=>{i(!1)},onChange:t=>{o(t.target.value),u({filterByTk:e.filterByTk,values:{name:t.target.value}})}}):(0,l.jsx)("div",{onClick:()=>{i(!0)},children:t||(0,l.jsx)("span",{style:{color:"#bbb"},children:"未命名"})})})},p=()=>{var e,t;let o=(0,d.vx)(),p=(0,i.useParams)(),m=null==p?void 0:p.key,h=(0,r.useContext)(u.u4V),x=(0,r.useMemo)(()=>({...h,designable:!0}),[h]),{data:v,loading:_}=(0,s.useRequest)({resource:"uiSchemaTemplates",action:"get",params:{filterByTk:m}});return _?(0,l.jsx)(a.Spin,{}):(0,l.jsxs)("div",{children:[(0,l.jsx)(n.PageHeader,{style:{backgroundColor:"white"},onBack:()=>{o("/admin/plugins/block-templates")},ghost:!1,title:(0,l.jsx)(c,{filterByTk:m,title:null==v||null==(e=v.data)?void 0:e.name})}),(0,l.jsx)("div",{style:{margin:"var(--nb-spacing)"},children:(0,l.jsx)(u.u4V.Provider,{value:x,children:(0,l.jsx)(u.DYS,{uid:null==v||null==(t=v.data)?void 0:t.uid})})})]})};var m=o(77843),h=o(27404),x=o(40919),v=o(18111),_=o(73761);let f={name:"uiSchemaTemplates",filterTargetKey:"key",targetKey:"key",fields:[{type:"integer",name:"name",interface:"input",uiSchema:{title:'{{ t("Template name") }}',type:"number","x-component":"Input",required:!0}}]};var g=o(46909),b=o(28227);let y=[{name:"name",title:'{{ t("Title") }}',schema:{type:"string","x-component":"Input"},operators:x.string},{name:"collectionName",title:'{{ t("Collection display name") }}',schema:{type:"string","x-component":"Input"},operators:x.string}],S={type:"object",properties:{[(0,h.uid)()]:{type:"void","x-decorator":"TableBlockProvider","x-decorator-props":{collection:f,resource:"uiSchemaTemplates",action:"list",params:{pageSize:20,sort:["-createdAt"]},rowKey:"key",showIndex:!0,dragSort:!1},"x-component":"CardItem",properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{filter:{type:"void",title:'{{ t("Filter") }}',default:{$and:[{name:{$includes:""}}]},"x-action":"filter","x-component":"Filter.Action","x-use-component-props":()=>{var e,t;let{service:o}=(0,v.J6)();return(0,u.yGk)({options:y,params:(null==o||null==(t=o.state)||null==(e=t.params)?void 0:e[0])||(null==o?void 0:o.params),service:o})},"x-component-props":{icon:"FilterOutlined"},"x-align":"left"},refresh:{type:"void",title:'{{ t("Refresh") }}',"x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"},"x-align":"right"},destroy:{title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action","x-use-component-props":()=>{let e=(0,_.useBulkDestroyActionProps)(),t=(0,g.ov)(),{service:o}=(0,v.J6)();return{async onClick(){var l;await e.onClick(),await t.refresh(),null==o||null==(l=o.refresh)||l.call(o)}}},"x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}}}},[(0,h.uid)()]:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowSelection:{type:"checkbox"}},properties:{column1:{type:"void",title:'{{ t("Title") }}',"x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{name:{type:"string","x-collection-field":"uiSchemaTemplates.name","x-component":"CollectionField","x-read-pretty":!0,"x-component-props":{ellipsis:!0}}}},column2:{type:"void",title:'{{t("Collection display name")}}',"x-component":"TableV2.Column",properties:{"collection.title":{type:"string","x-component":e=>{let{dataSourceKey:t="main",collectionName:o}=(0,b.zv)(),n=(0,b.m6)(),a=(0,u.lum)(),[i,s]=(0,r.useMemo)(()=>{let e=n.getDataSource(t);if(e){let t=e.collectionManager.getCollection(o);return[e.displayName,(null==t?void 0:t.title)||o]}return[t,null]},[n,t,o]);return(0,l.jsxs)(l.Fragment,{children:[a(i)," ",">"," ",a(s)]})},"x-read-pretty":!0,"x-component-props":{ellipsis:!0}}}},actions:{type:"void",title:'{{ t("Actions") }}',"x-component":"TableV2.Column",properties:{actions:{type:"void","x-decorator":"DndContext","x-component":"Space","x-component-props":{split:"|"},properties:{edit:{type:"void",title:'{{ t("Edit") }}',"x-action":"update","x-component":"Action.Link","x-component-props":{openMode:"drawer",refreshDataBlockRequest:!1},properties:{drawer:{type:"void",title:'{{ t("Edit record") }}',"x-component":"Action.Container","x-component-props":{className:"nb-action-popup"},properties:{form:{type:"void","x-decorator":"FormBlockProvider","x-decorator-props":{resource:"uiSchemaTemplates",collection:f,action:"get",useParams:"{{ useParamsFromRecord }}"},"x-component":"CardItem",properties:{[(0,h.uid)()]:{type:"void","x-component":"FormV2","x-use-component-props":"useFormBlockProps",properties:{name:{type:"string","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":"uiSchemaTemplates.name",required:!0},actions:{type:"void","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{marginTop:24}},properties:{submit:{title:'{{t("Submit")}}',"x-action":"submit","x-component":"Action","x-use-component-props":()=>{let e=(0,_.useUpdateActionProps)(),{__parent:t}=(0,v.J6)();return{async onClick(){var o,l;await e.onClick(),null==t||null==(l=t.service)||null==(o=l.refresh)||o.call(l)}}},"x-component-props":{type:"primary",htmlType:"submit"},type:"void"}}}}}}}}}}},destroy:{title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action.Link","x-use-component-props":()=>{let e=(0,_.useDestroyActionProps)(),{service:t}=(0,v.J6)(),o=(0,g.ov)();return{async onClick(){var l;await e.onClick(),await o.refresh(),null==t||null==(l=t.refresh)||l.call(t)}}},"x-component-props":{confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}}}}}}}}}}}},k=()=>{let{t:e}=(0,m.useTranslation)();return(0,l.jsxs)("div",{children:[(0,l.jsx)(n.PageHeader,{style:{backgroundColor:"white"},ghost:!1,title:e("Block templates")}),(0,l.jsx)("div",{style:{margin:"var(--nb-spacing)"},children:(0,l.jsx)(u.HvB,{schema:S})})]})},C=()=>{let e=(0,u.Fag)();return(0,l.jsx)(u.u4V.Provider,{value:{...e,designable:!1},children:(0,l.jsx)(u.HvB,{schema:S})})};var M=o(24768)},49948(e,t,o){o.d(t,{K:()=>n.r,r:()=>l.createStyles});var l=o(76821),n=o(78442)},78442(e,t,o){o.d(t,{r:()=>n});var l=o(52793);let n=()=>l.theme.useToken()},86393(e,t,o){o.d(t,{nS:()=>g,or:()=>l.SystemSettingsSource,mY:()=>v,Cz:()=>y,e6:()=>l.useSystemSettings});var l=o(13975),n=o(71178),a=o(56920),r=o(27404),i=o(52793),s=o(13791);o(51649);var d=o(77843),u=o(44374),c=o(28601),p=o(82924);let m=Object.keys(c.Ay).map(e=>({label:`${c.Ay[e].label} (${e})`,value:e})),h=()=>{let{setVisible:e}=(0,p.D50)();return{async run(){e(!1)}}},x=e=>{let{visible:t}=(0,p.D50)(),o=(0,l.useSystemSettings)();return(0,u.useRequest)(()=>Promise.resolve(null==o?void 0:o.data),{...e,refreshDeps:[t,null==o?void 0:o.data]})},v=(e,t,o)=>{let l=null==e?void 0:e.data;return l&&Object.prototype.hasOwnProperty.call(l,"data")?l:{data:{...null==t?void 0:t.data,...o}}},_=()=>{let{setVisible:e}=(0,p.D50)(),t=(0,a.useForm)(),{mutate:o,data:n}=(0,l.useSystemSettings)()||{},r=(0,u.useAPIClient)(),{t:c}=(0,d.useTranslation)();return{async run(){var l;await t.submit();let a=(0,s.default)(t.values);o({data:v(await r.request({url:"systemSettings:put",method:"post",data:a}),n,a)}),i.message.success(c("Saved successfully"));let d=(null==(l=a.enabledLanguages)?void 0:l[0])||"en-US";a.enabledLanguages.length<2&&r.auth.getLocale()!==d?(r.auth.setLocale(""),window.location.reload()):e(!1)}}},f={type:"object",properties:{[(0,r.uid)()]:{"x-decorator":"Form","x-decorator-props":{useValues:"{{ useSystemSettingsValues }}"},"x-component":"div",type:"void",title:'{{t("System settings")}}',properties:{raw_title:{type:"string",title:"{{t('System title')}}","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope","x-component-props":{supportsLineBreak:!0},required:!0},logo:{type:"string",title:"{{t('Logo')}}","x-decorator":"FormItem","x-component":"Upload.Attachment","x-component-props":{action:"attachments:create",multiple:!1},"x-use-component-props":"useFileCollectionStorageRules"},enabledLanguages:{type:"array",title:'{{t("Enabled languages")}}',"x-component":"Select","x-component-props":{mode:"multiple"},"x-decorator":"FormItem",enum:m,"x-reactions":e=>{e.dataSource=m.map(t=>{var o;let l=t.label;return(null==(o=e.value)?void 0:o[0])===t.value&&(l+=`(${u.i18n.t("Default")})`),{label:l,value:t.value}})}},footer1:{type:"void","x-component":"ActionBar","x-component-props":{layout:"one-column"},properties:{submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useSaveSystemSettingsValues }}"}}}}}}}},g=()=>(0,n.jsx)(i.Card,{bordered:!1,children:(0,n.jsx)(p.HvB,{scope:{useSaveSystemSettingsValues:_,useSystemSettingsValues:x,useCloseAction:h},schema:f})});var b=o(83468);class y extends b.k{async load(){}}},48245(e,t,o){o.d(t,{a:()=>r});var l=o(16211),n=o(17157);class a extends l.Q9{mockAdapter(){return new(o(23975))(this.axios)}}let r=()=>{let e=new a;e.app=new n.lg({});let t=e.mockAdapter();return{apiClient:e,mockRequest:t}}},25157(e,t,o){o.d(t,{BW:()=>p,DB:()=>m,Ip:()=>c,Qd:()=>x,_N:()=>h});var l=o(71178),n=o(504),a=o(51649),r=o(38356),i=o(41906),s=o(16211),d=o(17157),u=o(82924);let c=(0,a.createContext)(null);c.displayName="CurrentUserContext";let p=()=>{let e=(0,n.useFlowEngine)(),t=(0,a.useContext)(c);return!t&&e?{data:{data:e.context.user}}:t},m=()=>{var e;let t=(0,a.useContext)(c);return!!(null==t||null==(e=t.data)?void 0:e.data)},h=()=>{var e;let{allowAnonymous:t}=(0,i.v6)(),{data:o}=p()||{},l=(0,u.lum)();return(0,a.useMemo)(()=>{var e;let n=((null==o||null==(e=o.data)?void 0:e.roles)||[]).map(e=>{let{name:t,title:o}=e;return{name:t,title:l(o)}});return t&&n.push({title:"Anonymous",name:"anonymous"}),n},[t,null==o||null==(e=o.data)?void 0:e.roles,l])},x=e=>{let t=(0,s.VB)(),o=(0,d.nm)(),i=(0,n.useFlowEngine)(),u=(0,r.useNavigate)(),p=(0,r.useLocation)(),m=(null==o?void 0:o.flowEngine)||i,h=(0,a.useRef)(!1),x=(0,s.bP)(()=>t.request({url:"/auth:check",skipNotify:!0,skipAuth:!0}).then(async e=>{var o,l;let a=null==e||null==(o=e.data)?void 0:o.data;if((null==a?void 0:a.id)==null)u("/signin?redirect="+p.pathname+p.search);else try{await t.auth.syncCookies()}catch{}let r=(0,n.createCollectionContextMeta)(()=>{var e;return null==(e=m.context.dataSourceManager.getDataSource("main"))?void 0:e.getCollection("users")},m.translate("Current user"));return r.sort=1e3,m.context.defineProperty("user",{value:null==e||null==(l=e.data)?void 0:l.data,resolveOnServer:!0,meta:r}),null==e?void 0:e.data})),{render:v}=(0,d.vk)();return(x.loading||(h.current=!0),x.loading&&!h.current)?v():(0,l.jsx)(c.Provider,{value:x,children:e.children})}},84693(e,t,o){o.d(t,{mn:()=>a,Gg:()=>c,_N:()=>i._N,DB:()=>i.DB,R2:()=>r,Ip:()=>i.Ip,Qd:()=>i.Qd,BW:()=>i.BW,Y:()=>p});var l=o(51649),n=o(53770);let a=e=>n.$d,r=(0,l.createContext)(null);r.displayName="DropdownVisibleContext";var i=o(25157),s=o(71178),d=o(63526);let u=(0,l.createContext)(null);u.displayName="CurrentUserSettingsMenuContext";let c=()=>{let{menuItems:e}=(0,l.useContext)(u)||{},t=(0,l.useCallback)(()=>e.current,[e]),o=(0,l.useCallback)((t,o)=>{let l;if(o&&(t._options=o),-1!==(l=e.current.findIndex(e=>e.key===t.key))){e.current[l]=t,e.current=[...e.current];return}if(o){if(o.before){let l=e.current.findIndex(e=>e.key===o.before);e.current.splice(l,0,t);return}if(o.after){let l=e.current.findIndex(e=>e.key===o.after);e.current.splice(l+1,0,t);return}}let n=e.current;e.current=n.filter(e=>{var o,l;return t.key!==(null==(o=e._options)?void 0:o.before)&&t.key!==(null==(l=e._options)?void 0:l.after)}),e.current.push(...n.filter(e=>{var o;return(null==(o=e._options)?void 0:o.before)===t.key})),e.current.push(t),e.current.push(...n.filter(e=>{var o;return(null==(o=e._options)?void 0:o.after)===t.key}))},[e]);if(!e)throw(0,d.error)("CurrentUser: You should use `CurrentUserSettingsMenuProvider` in the root of your app."),Error("CurrentUser: You should use `CurrentUserSettingsMenuProvider` in the root of your app.");return{getMenuItems:t,addMenuItem:o}},p=e=>{let{children:t}=e,o=(0,l.useRef)([]),n=(0,l.useMemo)(()=>({menuItems:o}),[o]);return(0,s.jsx)(u.Provider,{value:n,children:t})}},76460(e,t,o){o.d(t,{KZ:()=>a,g5:()=>i,j0:()=>r});var l=o(71178),n=o(51649);let a=(0,n.createContext)({scopeId:"",type:""}),r=e=>{let t=n.default.useContext(a),o=(0,n.useMemo)(()=>({scopeId:e.scopeId,type:e.type,parent:t}),[e.scopeId,e.type,t]);return(0,l.jsx)(a.Provider,{value:o,children:e.children})},i=()=>{let e=n.default.useContext(a);return{getVariableScopeInfo:(0,n.useCallback)(()=>{if(e.scopeId)return e;for(;e.parent&&!e.scopeId;)e=e.parent;return e},[e])}}},73518(e,t,o){o.d(t,{Ay:()=>F,jT:()=>S});var l=o(71178),n=o(2314),a=o(63526),r=o(77583),i=o(51649),s=o(16211),d=o(43288),u=o(29558),c=o(61013),p=o(75020);let m={hasMany:"list?paginate=false",belongsTo:"get",hasOne:"get",belongsToMany:"list?paginate=false",belongsToArray:"list?paginate=false"},h=e=>m[e];var x=o(39607);let v={},_=e=>!!v[e],f=e=>v[e],g=(e,t)=>{v[e]=t},b=e=>{delete v[e]};var y=o(59896);let S=(0,i.createContext)(null);S.displayName="VariablesContext";let k={},C=(e,t)=>{let o,l;return{fieldPath:e.split(".").map(e=>t[e]?(o=t[e].dataSource,l=t[e],t[e].collectionName):e).join("."),dataSource:o,variableOption:l}},M=(e,t,o)=>{var l,n,a;let r=(l=t,n=o,(null==l?void 0:l.sourceKey)?l.sourceKey:Array.isArray(null==n?void 0:n.filterTargetKey)?1===n.filterTargetKey.length?n.filterTargetKey[0]:n.filterTargetKey:(null==n?void 0:n.filterTargetKey)||(null==n||null==(a=n.getPrimaryKey)?void 0:a.call(n))||"id");if(Array.isArray(r)){let t=r.reduce((t,o)=>((null==e?void 0:e[o])==null||(t[o]=e[o]),t),{});if(Object.keys(t).length!==r.length)return;return encodeURIComponent(JSON.stringify(t))}return null==e?void 0:e[r]},w=e=>{let{children:t,filterVariables:o}=e,n=(0,i.useRef)({}),m=(0,s.VB)(),{getCollectionJoinField:v,getCollection:w}=(0,d.nj)(),F=(0,c.l)(),{builtinVariables:I}=(0,p.A)(),T=(0,i.useCallback)(e=>{r.default.isFunction(e)?n.current=e(n.current):n.current=e},[]),D=(0,i.useCallback)(async(e,t,o)=>{var l,i,s;let d=e.split("."),c=d[0],p=j(k,t),x=(i=n.current,s=t,i={...i},null==s||s.forEach(e=>{i[e.name]=e.ctx}),i),{fieldPath:y,dataSource:S,variableOption:I}=C(c,p),T=y,{fieldPath:D}=C(e,p),L=1===d.length?null==I?void 0:I.collectionName:null==(l=v(D,S))?void 0:l.target;if(!(c in x))throw Error(`VariablesProvider: ${c} is not found`);for(let e=0;e<d.length;e++){if(null==x)return{value:void 0===x?null==I?void 0:I.defaultValue:x,dataSource:S,collectionName:L};if(r.default.isFunction(x))break;let t=d[e],l=d.slice(0,e+1).join("."),{fieldPath:n}=C(l,p),i=v(n,S),s=w(T,S);if(Array.isArray(x)){let e=x.map(e=>{let n=M(e,i,s);if(!(null==o?void 0:o.doNotRequest)&&P(null==e?void 0:e[t],e,l)&&null!=n&&(null==i?void 0:i.target)){let e=`/${T}/${n}/${t}:${h(i.type)}`;if(_(e))return f(e);let l=m.request({headers:(0,u.kb)(S),url:e,params:{appends:null==o?void 0:o.appends}}).then(t=>(b(e),t.data.data));return g(e,l),l}return null==e?void 0:e[t]});x=A(r.default.flatten(await Promise.all(e)),i)}else if(!(null==o?void 0:o.doNotRequest)&&P(x[t],x,l)&&null!=M(x,i,s)&&(null==i?void 0:i.target)){let e=M(x,i,s),l=`/${T}/${e}/${t}:${h(i.type)}`,n=null;if(_(l))n=await f(l);else{let e=m.request({headers:(0,u.kb)(S),url:l,params:{appends:null==o?void 0:o.appends}});g(l,e),n=await e,b(l)}x=A(n.data.data,i)}else x=A((0,a.getValuesByPath)(x,t),i);(null==i?void 0:i.target)&&(T=i.target)}let Y=F(r.default.isFunction(x)?await x({fieldOperator:null==o?void 0:o.fieldOperator,isParsingVariable:!0,variableName:e}):x);return{value:void 0===Y?I.defaultValue:Y,dataSource:S,collectionName:L}},[v]),L=(0,i.useCallback)(e=>{if(!(0,y.DZ)(`{{${e.name}}}`))throw Error(`VariablesProvider: ${e.name} is not a valid name`);T(t=>({...t,[e.name]:e.ctx})),k[e.name]={...e,defaultValue:r.default.has(e,"defaultValue")?e.defaultValue:null}},[T]),Y=(0,i.useCallback)(e=>n.current[e]?{...k[e]}:null,[]),R=(0,i.useCallback)(e=>{T(t=>{let o={...t};return delete o[e],o}),delete k[e]},[T]),B=(0,i.useCallback)(async(e,t,o)=>{var l,n;if(!(0,y.DZ)(e))return e;t&&(t=r.default.isArray(t)?t:[t]);let a=(0,x.Y)(e),i=await D(a,t,o);return{...i,value:Array.isArray(n=Array.isArray(l=i.value)?l.filter(e=>0===e||!1===e||e):l)&&r.default.isObject(n[0])?r.default.uniqBy(n,e=>"id"in e?e.id:JSON.stringify(e)):n}},[D]),N=(0,i.useCallback)(async(e,t)=>{if(!(0,y.DZ)(e))throw Error(`VariablesProvider: ${e} is not a variable string`);t&&(t=r.default.isArray(t)?t:[t]);let o=j(k,t),l=(0,x.Y)(e),{fieldPath:n,dataSource:a}=C(l,o),i=v(n,a);if(!i&&!l.includes(".")){var s;i={target:null==(s=o[l])?void 0:s.collectionName}}return i},[v]);(0,i.useEffect)(()=>{I.forEach(e=>{L({...e,defaultValue:r.default.has(e,"defaultValue")?e.defaultValue:null})})},[I,L]);let E=(0,i.useMemo)(()=>({ctxRef:n,setCtx:T,parseVariable:B,registerVariable:L,getVariable:Y,getCollectionField:N,removeVariable:R,filterVariables:o}),[N,Y,B,L,R,T]);return(0,l.jsx)(S.Provider,{value:E,children:t})};w.displayName="VariablesProvider";let F=w;function P(e,t,o){if(2===o.split(".").length&&(o.startsWith("$nForm.")||o.startsWith("$iteration.")))return!1;let l=!1;return(0,n.untracked)(()=>{if("[{}]"===JSON.stringify(e)||"{}"===JSON.stringify(e)){l=!0;return}l=r.default.isEmpty(e)}),l}function j(e,t){return e={...e},null==t||t.forEach(t=>{e[t.name]={...t,defaultValue:r.default.has(t,"defaultValue")?t.defaultValue:null}}),e}function A(e,t){return(null==t?void 0:t.through)&&e?Array.isArray(e)?e.map(e=>r.default.omit(e,t.through)):r.default.omit(e,t.through):e}},67285(e,t,o){o.d(t,{M:()=>l});let l=Object.freeze({})},75020(e,t,o){o.d(t,{A:()=>c});var l=o(63526),n=o(51649),a=o(67574),r=o(99300),i=o(78616),s=o(77557),d=o(3010),u=o(45560);let c=()=>{let{currentUserCtx:e}=(0,r.oW)(),{currentRoleCtx:t}=(0,s.T)(),{apiTokenCtx:o}=(0,i.f)(),{datetimeCtx:c}=(0,r.hY)(),{exactDateTimeCtx:p}=(0,r.vm)(),{urlSearchParamsCtx:m,name:h,defaultValue:x}=(0,d.hx)(),v=(0,u.i)("$env");return{builtinVariables:(0,n.useMemo)(()=>[v,{name:"$user",ctx:e,collectionName:"users",dataSource:a.Ze},{name:"$nRole",ctx:t,collectionName:"roles"},{name:"$nToken",ctx:o},{name:"currentUser",ctx:e,collectionName:"users",dataSource:a.Ze},{name:"$nDate",ctx:c},{name:"$date",ctx:c},{name:"$nExactDate",ctx:p},{name:"$system",ctx:{now:()=>(0,l.dayjs)().toISOString()}},{name:"currentTime",ctx:()=>(0,l.dayjs)().toISOString()},{name:h,ctx:m,defaultValue:x}].filter(Boolean),[t,e,c,x,m,h,v,p])}}},10065(e,t,o){o.d(t,{A:()=>u});var l=o(51649),n=o(35123),a=o(14187),r=o(49621),i=o(44388),s=o(3012),d=o(8724);let u=()=>{var e,t;let{isPopupVisibleControlledByURL:o}=(0,d.X)(),{params:u}=(0,i.IX)(),c=(0,r.Ge)(),p=(0,a.YE)(),m=(0,n.V)()||{},{field:h,blockData:x,rowKey:v,collection:_}=(o()?null==(t=(0,s.lS)(null==u?void 0:u.popupuid))?void 0:t.tableBlockContext:{...m,collection:c,blockData:p})||{},f=(0,l.useMemo)(()=>{var e,t;return null==x||null==(t=x.data)||null==(e=t.filter)?void 0:e.call(t,e=>{var t,o;return null==(t=(null==h||null==(o=h.data)?void 0:o.selectedRowKeys)||[])?void 0:t.includes(e[v])})},[null==h||null==(e=h.data)?void 0:e.selectedRowKeys,v,x]);return(0,l.useMemo)(()=>({name:"$context",ctx:f||[],collectionName:_}),[_,f])}},43724(e,t,o){o.d(t,{A:()=>_});var l=o(51649),n=o(43288),a=o(10288),r=o(39505),i=o(74063),s=o(68038),d=o(63310),u=o(14011),c=o(47368),p=o(54339),m=o(53400),h=o(3010),x=o(10065),v=o(16716);let _=e=>{var t;let{parentObjectCtx:o,shouldDisplayParentObject:_,collectionName:f}=(0,d.S)(),{currentObjectCtx:g,shouldDisplayCurrentObject:b}=(0,s.Jm)(),{currentRecordCtx:y,collectionName:S}=(0,m.XK)(),{currentParentRecordCtx:k,collectionName:C,dataSource:M}=(0,c.nA)(),{popupRecordCtx:w,collectionName:F,dataSource:P,defaultValue:j}=(0,p.h)(),{parentPopupRecordCtx:A,collectionName:I,dataSource:T,defaultValue:D}=(0,u.f)(),{urlSearchParamsCtx:L,shouldDisplay:Y,defaultValue:R}=(0,h.hx)(),{datetimeCtx:B}=(0,r.U$)(),{currentFormCtx:N}=(0,i.AA)({form:null==e?void 0:e.currentForm}),{name:E}=(0,n.k7)(),$=(0,x.A)(),{name:z}=(0,a.N)();(null==e?void 0:e.collectionName)&&(z=e.collectionName);let O=(0,v.n)(),q=(null==(t=O.getVariables)?void 0:t.call(O).map(e=>({name:e.name,ctx:e.useCtx()})))||[];return(0,l.useMemo)(()=>[{name:"currentRecord",ctx:y,collectionName:S},{name:z,ctx:N||y,collectionName:z},{name:"$form",ctx:N,collectionName:z},{name:"$nRecord",ctx:y,collectionName:S,dataSource:M},{name:"$nParentRecord",ctx:k,collectionName:C,dataSource:M},{name:"$nPopupRecord",ctx:w,collectionName:F,dataSource:P,defaultValue:j},{name:"$nParentPopupRecord",ctx:A,collectionName:I,dataSource:T,defaultValue:D},{name:"$nForm",ctx:N,collectionName:z},{name:"$nDate",ctx:B},{name:"$date",ctx:B},$,b&&{name:"$iteration",ctx:g,collectionName:E},_&&{name:"$nParentIteration",ctx:o,collectionName:f},Y&&{name:"$nURLSearchParams",ctx:L,defaultValue:R},...q].filter(Boolean),[y,S,z,N,k,C,M,w,A,F,P,B,b,g,E,j,D,_,o,f,$,L,...q.map(e=>e.ctx)])}},65919(e,t,o){o.d(t,{A:()=>a});var l=o(51649),n=o(73518);let a=()=>(0,l.useContext)(n.jT)},43923(e,t,o){o.d(t,{$l:()=>g.A,Ap:()=>y.A,j0:()=>k.j0,Ml:()=>S.M,e3:()=>b.e3,wU:()=>100,Rr:()=>a.A,DZ:()=>b.DZ,g5:()=>k.g5,qe:()=>b.qe,fG:()=>void 0,gp:()=>r.A,fK:()=>l.Ay,T_:()=>f,vV:()=>b.vV,c7:()=>n.A,jT:()=>l.jT});var l=o(73518),n=o(75020),a=o(10065),r=o(43724),i=o(51649),s=o(43288),d=o(10288),u=o(39505),c=o(74063),p=o(68038),m=o(63310),h=o(14011),x=o(47368),v=o(54339),_=o(53400);let f=e=>{let{parentObjectCtx:t,shouldDisplayParentObject:o,collectionName:l}=(0,m.S)(),{currentObjectCtx:n,shouldDisplayCurrentObject:r}=(0,p.Jm)(),{currentRecordCtx:f,collectionName:g}=(0,_.XK)(),{currentParentRecordCtx:b,collectionName:y,dataSource:S}=(0,x.nA)(),{popupRecordCtx:k,collectionName:C,dataSource:M,defaultValue:w}=(0,v.h)(),{parentPopupRecordCtx:F,collectionName:P,dataSource:j,defaultValue:A}=(0,h.f)(),{datetimeCtx:I}=(0,u.U$)(),{currentFormCtx:T}=(0,c.AA)({form:null==e?void 0:e.currentForm}),{name:D}=(0,s.k7)(),L=(0,a.A)(),{name:Y}=(0,d.N)();return(null==e?void 0:e.collectionName)&&(Y=e.collectionName),(0,i.useMemo)(()=>[{name:"currentRecord",ctx:f,collectionName:g},{name:Y,ctx:T||f,collectionName:Y},{name:"$form",ctx:T,collectionName:Y},{name:"$nRecord",ctx:f,collectionName:g,dataSource:S},{name:"$nParentRecord",ctx:b,collectionName:y,dataSource:S},{name:"$nPopupRecord",ctx:k,collectionName:C,dataSource:M,defaultValue:w},{name:"$nParentPopupRecord",ctx:F,collectionName:P,dataSource:j,defaultValue:A},{name:"$nForm",ctx:T,collectionName:Y},{name:"$nDate",ctx:I},{name:"$date",ctx:I},L,r&&{name:"$iteration",ctx:n,collectionName:D},o&&{name:"$nParentIteration",ctx:t,collectionName:l}].filter(Boolean),[f,g,Y,T,b,y,S,k,F,C,M,I,r,n,D,w,A,o,t,l,L])};var g=o(65919),b=o(59896),y=o(32665),S=o(67285),k=o(76460)},39607(e,t,o){o.d(t,{Y:()=>n});var l=o(59896);let n=e=>e?e.match(l.vV)[0].replace(l.vV,"$1"):e},88847(e,t,o){o.d(t,{S:()=>a});var l=o(77583),n=o(39607);let a=e=>l.default.isString(e)?(0,n.Y)(e).split(".")[0]:e},59896(e,t,o){o.d(t,{DZ:()=>a,e3:()=>r,qe:()=>n,vV:()=>l});let l=/^\s*\{\{\s*([\p{L}0-9_$-.]+?)\s*\}\}\s*$/u,n=/\{\{\s*([a-zA-Z0-9_$-.]+?)\s*\}\}/g,a=e=>"string"==typeof e&&!!e.match(l),r=e=>{let t=e.match(n);return t||[]}},32665(e,t,o){o.d(t,{A:()=>n});var l=o(77583);let n=(e,t)=>{let{targetCollectionField:o}=t;return null!=e&&o?"chinaRegion"===o.interface&&Array.isArray(e)?e.map(e=>(l.default.isObject(e),Object.keys(e={...e}).forEach(t=>{l.default.isObjectLike(e[t])&&delete e[t]}),e)):["hasMany","belongsToMany"].includes(o.type)?Array.isArray(e)?e:[e]:(o.interface,e):e}},11725(e){e.exports=import("antd-mobile").then(function(e){return e})},65994(e){e.exports=import("antd-mobile-icons").then(function(e){return e})},28558(e){e.exports=import("react-quill").then(function(e){return e})},41196(t){t.exports=e},82113(e){e.exports=t},34829(e){e.exports=o},72741(e){e.exports=l},38533(e){e.exports=n},8198(e){e.exports=a},10691(e){e.exports=r},56220(e){e.exports=i},64613(e){e.exports=s},44814(e){e.exports=d},52975(e){e.exports=u},56920(e){e.exports=c},2314(e){e.exports=p},27404(e){e.exports=m},48849(e){e.exports=h},78316(e){e.exports=x},13975(e){e.exports=v},83489(e){e.exports=_},504(e){e.exports=f},27697(e){e.exports=g},63526(e){e.exports=b},71883(e){e.exports=y},52793(e){e.exports=S},76821(e){e.exports=k},29663(e){e.exports=C},23251(e){e.exports=M},23975(e){e.exports=w},94046(e){e.exports=F},31515(e){e.exports=P},91815(e){e.exports=j},37260(e){e.exports=A},60339(e){e.exports=I},65132(e){e.exports=T},43017(e){e.exports=D},38694(e){e.exports=L},95836(e){e.exports=Y},26362(e){e.exports=R},45814(e){e.exports=B},15636(e){e.exports=N},34065(e){e.exports=E},23977(e){e.exports=$},77583(e){e.exports=z},13791(e){e.exports=O},93656(e){e.exports=q},57453(e){e.exports=H},20148(e){e.exports=V},27741(e){e.exports=U},42966(e){e.exports=G},29858(e){e.exports=K},51649(e){e.exports=W},7516(e){e.exports=J},64679(e){e.exports=X},77843(e){e.exports=Z},38356(e){e.exports=Q},71178(e){e.exports=ee}},ez={};function eO(e){var t=ez[e];if(void 0!==t)return t.exports;var o=ez[e]={exports:{}};return e$[e].call(o.exports,o,o.exports,eO),o.exports}eE=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,eO.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var o=Object.create(null);eO.r(o);var l={};eN=eN||[null,eE({}),eE([]),eE(eE)];for(var n=2&t&&e;("object"==typeof n||"function"==typeof n)&&!~eN.indexOf(n);n=eE(n))Object.getOwnPropertyNames(n).forEach(t=>{l[t]=()=>e[t]});return l.default=()=>e,eO.d(o,l),o},eO.d=(e,t)=>{for(var o in t)eO.o(t,o)&&!eO.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},eO.e=()=>Promise.resolve(),eO.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),eO.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var eq=eO(44374),eH=eq.ACLActionParamsContext,eV=eq.ACLActionProvider,eU=eq.ACLCollectionFieldProvider,eG=eq.ACLCollectionProvider,eK=eq.ACLContext,eW=eq.ACLCustomContext,eJ=eq.ACLMenuItemProvider,eX=eq.ACLPane,eZ=eq.ACLPlugin,eQ=eq.ACLProvider,e0=eq.ACLRolesCheckProvider,e1=eq.ADMIN_SETTINGS_KEY,e2=eq.ADMIN_SETTINGS_PATH,e5=eq.AIManager,e4=eq.APIClient,e7=eq.APIClientContext,e6=eq.APIClientProvider,e9=eq.AccessControl,e8=eq.Action,e3=eq.ActionBar,te=eq.ActionBarAssociationFilterAction,tt=eq.ActionBarProvider,to=eq.ActionContext,tl=eq.ActionContextNoRerender,tn=eq.ActionContextProvider,ta=eq.ActionDesigner,tr=eq.ActionGroupModel,ti=eq.ActionInitializer,ts=eq.ActionInitializerItem,td=eq.ActionModel,tu=eq.ActionSceneEnum,tc=eq.ActionType,tp=eq.AddChildActionModel,tm=eq.AddCollection,th=eq.AddCollectionAction,tx=eq.AddCollectionField,tv=eq.AddFieldAction,t_=eq.AddNewActionModel,tf=eq.AddSubFieldAction,tg=eq.AdminDynamicPage,tb=eq.AdminLayout,ty=eq.AdminLayoutMenuItemModel,tS=eq.AdminLayoutPlugin,tk=eq.AdminProvider,tC=eq.AdminSettingsLayout,tM=eq.AdminSettingsLayoutModel,tw=eq.AfterSuccess,tF=eq.AllDataBlocksContext,tP=eq.AllDataBlocksProvider,tj=eq.AntdAppProvider,tA=eq.AntdConfigPlugin,tI=eq.AntdConfigProvider,tT=eq.AntdSchemaComponentPlugin,tD=eq.AntdSchemaComponentProvider,tL=eq.AppLangContext,tY=eq.AppNotFound,tR=eq.AppendsTreeSelect,tB=eq.Application,tN=eq.ApplicationContext,tE=eq.AssignFormModel,t$=eq.AssignedFieldValues,tz=eq.AssociatedFields,tO=eq.AssociationField,tq=eq.AssociationFieldMode,tH=eq.AssociationFieldModeProvider,tV=eq.AssociationFilter,tU=eq.AssociationFilterDesignerDelete,tG=eq.AssociationFilterDesignerDisplayField,tK=eq.AssociationFilterPlugin,tW=eq.AssociationOrCollectionProvider,tJ=eq.AssociationProvider,tX=eq.AssociationSelect,tZ=eq.AsyncDataContext,tQ=eq.AsyncDataProvider,t0=eq.AttachmentList,t1=eq.AutoComplete,t2=eq.BackButtonUsedInSubPage,t5=eq.BaseVariableProvider,t4=eq.BlankComponent,t7=eq.Block,t6=eq.BlockAssociationContext,t9=eq.BlockConfigsContext,t8=eq.BlockConfigsProvider,t3=eq.BlockContext,oe=eq.BlockGridModel,ot=eq.BlockInitializer,oo=eq.BlockItem,ol=eq.BlockItemCard,on=eq.BlockItemCardContext,oa=eq.BlockItemInitializer,or=eq.BlockModel,oi=eq.BlockProvider,os=eq.BlockRequestContextProvider,od=eq.BlockRequestContext_deprecated,ou=eq.BlockRequestLoadingContext,oc=eq.BlockRequestProvider,op=eq.BlockRequestProvider_deprecated,om=eq.BlockResourceContext,oh=eq.BlockSceneEnum,ox=eq.BlockSchemaComponentPlugin,ov=eq.BlockSchemaComponentProvider,o_=eq.BlockSchemaToolbar,of=eq.BlockTemplateContext,og=eq.BlockTemplateDetails,ob=eq.BlockTemplatePage,oy=eq.BlockTemplateProvider,oS=eq.BlockTemplatesPane,ok=eq.BlocksSelector,oC=eq.ButtonEditor,oM=eq.CSSVariableProvider,ow=eq.CardItem,oF=eq.Cascader,oP=eq.Checkbox,oj=eq.CheckboxFieldInterface,oA=eq.CheckboxGroupFieldInterface,oI=eq.ChildPageModel,oT=eq.ChildPageTabModel,oD=eq.ClearCollectionFieldContext,oL=eq.ClickableFieldModel,oY=eq.CodeEditor,oR=eq.CodeEditorExtension,oB=eq.Collection,oN=eq.CollectionActionGroupModel,oE=eq.CollectionActionModel,o$=eq.CollectionBlockModel,oz=eq.CollectionCategoriesContext,oO=eq.CollectionCategoriesProvider,oq=eq.CollectionCategory,oH=eq.CollectionContext,oV=eq.CollectionDeletedPlaceholder,oU=eq.CollectionField,oG=eq.CollectionFieldContext,oK=eq.CollectionFieldInterface,oW=eq.CollectionFieldInterfaceManager,oJ=eq.CollectionFieldInterfaceTag,oX=eq.CollectionFieldProvider,oZ=eq.CollectionFieldUISchemaProvider,oQ=eq.CollectionFieldsToFormInitializerItems,o0=eq.CollectionFieldsToInitializerItems,o1=eq.CollectionFieldsToTableInitializerItems,o2=eq.CollectionHistoryProvider,o5=eq.CollectionManager,o4=eq.CollectionManagerContext,o7=eq.CollectionManagerProvider,o6=eq.CollectionManagerProvider_deprecated,o9=eq.CollectionManagerSchemaComponentProvider,o8=eq.CollectionNotAllowViewPlaceholder,o3=eq.CollectionPlugin,le=eq.CollectionProvider,lt=eq.CollectionProvider_deprecated,lo=eq.CollectionRecord,ll=eq.CollectionRecordContext,ln=eq.CollectionRecordProvider,la=eq.CollectionSelect,lr=eq.CollectionSelectFieldInterface,li=eq.CollectionTemplate,ls=eq.CollectionTemplateManager,ld=eq.CollectionTemplateTag,lu=eq.ColorFieldInterface,lc=eq.ColorPicker,lp=eq.ColorSelect,lm=eq.CommonItemModel,lh=eq.CompatibleSchemaInitializer,lx=eq.CreateFilterActionInitializer,lv=eq.CreateFormModel,l_=eq.CreateResetActionInitializer,lf=eq.CreatedAtFieldInterface,lg=eq.CreatedByFieldInterface,lb=eq.Cron,ly=eq.CronSet,lS=eq.CurrentAppInfoContext,lk=eq.CurrentAppInfoProvider,lC=eq.CurrentPageUidContext,lM=eq.CurrentPageUidProvider,lw=eq.CurrentRouteProvider,lF=eq.CurrentTabUidContext,lP=eq.CurrentTabUidProvider,lj=eq.CurrentUserContext,lA=eq.CurrentUserProvider,lI=eq.CurrentUserSettingsMenuProvider,lT=eq.CustomRouterContextProvider,lD=eq.CustomizeActionInitializer,lL=eq.DEBOUNCE_WAIT,lY=eq.DEFAULT_DATA_SOURCE_KEY,lR=eq.DEFAULT_DATA_SOURCE_TITLE,lB=eq.DataBlockCollector,lN=eq.DataBlockContext,lE=eq.DataBlockInitializer,l$=eq.DataBlockModel,lz=eq.DataBlockProvider,lO=eq.DataBlockResourceContext,lq=eq.DataBlockResourceProvider,lH=eq.DataSource,lV=eq.DataSourceApplicationProvider,lU=eq.DataSourceCollectionCascader,lG=eq.DataSourceContext,lK=eq.DataSourceContext_deprecated,lW=eq.DataSourceManager,lJ=eq.DataSourceManagerContext,lX=eq.DataSourceManagerProvider,lZ=eq.DataSourceProvider,lQ=eq.DataSourceProvider_deprecated,l0=eq.DataSourceSelect,l1=eq.DateFieldInterface,l2=eq.DateFilterDynamicComponent,l5=eq.DateFormatCom,l4=eq.DatePicker,l7=eq.DatePickerProvider,l6=eq.DatetimeFieldInterface,l9=eq.DatetimeNoTzFieldInterface,l8=eq.DefaultToolsManager,l3=eq.DefaultValueProvider,ne=eq.DeleteCollection,nt=eq.DeleteCollectionAction,no=eq.Designable,nl=eq.DesignableSwitch,nn=eq.Details,na=eq.DetailsAssociationFieldGroupModel,nr=eq.DetailsBlockContext,ni=eq.DetailsBlockModel,ns=eq.DetailsBlockProvider,nd=eq.DetailsCustomItemModel,nu=eq.DetailsDesigner,nc=eq.DetailsGridModel,np=eq.DetailsItemModel,nm=eq.DisplaySubTableFieldModel,nh=eq.DisplayTextFieldModel,nx=eq.DisplayTitleFieldModel,nv=eq.Divider,n_=eq.DndContext,nf=eq.DocumentTitleContext,ng=eq.DocumentTitleProvider,nb=eq.DragHandler,ny=eq.DraggableContext,nS=eq.DropdownVisibleContext,nk=eq.EMPTY_OBJECT,nC=eq.EditCollection,nM=eq.EditCollectionAction,nw=eq.EditCollectionField,nF=eq.EditComponent,nP=eq.EditDefaultValue,nj=eq.EditDescription,nA=eq.EditFieldAction,nI=eq.EditFormModel,nT=eq.EditOperator,nD=eq.EditPattern,nL=eq.EditRequired,nY=eq.EditSortField,nR=eq.EditSubFieldAction,nB=eq.EditTable,nN=eq.EditTableAction,nE=eq.EditTableActionContext,n$=eq.EditTitle,nz=eq.EditTitleField,nO=eq.EditTooltip,nq=eq.EditValidationRules,nH=eq.Editable,nV=eq.EllipsisWithTooltip,nU=eq.EmailFieldInterface,nG=eq.ErrorFallback,nK=eq.Expand,nW=eq.ExpiresRadio,nJ=eq.ExtendCollectionsContext,nX=eq.ExtendCollectionsProvider,nZ=eq.FieldModel,nQ=eq.FieldModelRenderer,n0=eq.FieldSummary,n1=eq.FieldValidation,n2=eq.FieldsTreeSelect,n5=eq.Fieldset,n4=eq.Filter,n7=eq.FilterAction,n6=eq.FilterActionContext,n9=eq.FilterActionModel,n8=eq.FilterAssociatedFields,n3=eq.FilterBlockModel,ae=eq.FilterBlockProvider,at=eq.FilterBlockType,ao=eq.FilterContext,al=eq.FilterDynamicComponent,an=eq.FilterFormActionGroupModel,aa=eq.FilterFormBlockModel,ar=eq.FilterFormBlockProvider,ai=eq.FilterFormItemModel,as=eq.FilterGroup,ad=eq.FilterLogicContext,au=eq.FilterParentCollectionFields,ac=eq.FlagContext,ap=eq.FlagProvider,am=eq.ForeignKey,ah=eq.Form,ax=eq.FormActionGroupModel,av=eq.FormActionModel,a_=eq.FormActiveFieldsProvider,af=eq.FormAssociationFieldGroupModel,ag=eq.FormBlockContext,ab=eq.FormBlockInitializer,ay=eq.FormBlockModel,aS=eq.FormBlockProvider,ak=eq.FormComponent,aC=eq.FormDialog,aM=eq.FormDrawer,aw=eq.FormField,aF=eq.FormFieldContext,aP=eq.FormFieldProvider,aj=eq.FormGridModel,aA=eq.FormItem,aI=eq.FormItemModel,aT=eq.FormItemSchemaToolbar,aD=eq.FormProvider,aL=eq.FormSubmitActionModel,aY=eq.FormV2,aR=eq.G2Plot,aB=eq.G2PlotInitializer,aN=eq.G2PlotRenderer,aE=eq.GeneralSchemaDesigner,a$=eq.GeneralSchemaItems,az=eq.GlobalThemeProvider,aO=eq.Grid,aq=eq.GridCard,aH=eq.GridModel,aV=eq.GridRowContext,aU=eq.HTMLEncode,aG=eq.HeightMode,aK=eq.ICON_POPUP_Z_INDEX,aW=eq.Icon,aJ=eq.IconFieldInterface,aX=eq.IconPicker,aZ=eq.IdFieldInterface,aQ=eq.InheritanceCollectionMixin,a0=eq.InitializerWithSwitch,a1=eq.Input,a2=eq.InputFieldInterface,a5=eq.InputFieldModel,a4=eq.InputNumber,a7=eq.InputReadPretty,a6=eq.InputRecordPicker,a9=eq.IntegerFieldInterface,a8=eq.InternalAdminSettingsLayout,a3=eq.IsInNocoBaseRecursionFieldContext,re=eq.IsSubPageClosedByPageMenuContext,rt=eq.IsSubPageClosedByPageMenuProvider,ro=eq.JSActionModel,rl=eq.Json,rn=eq.JsonFieldInterface,ra=eq.KeepAlive,rr=eq.LAZY_COMPONENT_KEY,ri=eq.LOADING_DELAY,rs=eq.Layout,rd=eq.LayoutContent,ru=eq.LinkActionModel,rc=eq.LinkToFieldInterface,rp=eq.LinkageFilter,rm=eq.LinkageRuleCategory,rh=eq.LinkageRuleDataKeyMap,rx=eq.List,rv=eq.LocalDataSource,r_=eq.LocationSearchContext,rf=eq.M2MFieldInterface,rg=eq.M2OFieldInterface,rb=eq.Markdown,ry=eq.MarkdownFieldInterface,rS=eq.MarkdownReadPretty,rk=eq.MaybeCollectionProvider,rC=eq.Menu,rM=eq.MenuConfigure,rw=eq.MockFlowModelRepository,rF=eq.ModalActionSchemaInitializerItem,rP=eq.MultipleSelectFieldInterface,rj=eq.NAMESPACE_UI_SCHEMA,rA=eq.NanoIDInput,rI=eq.NanoidFieldInterface,rT=eq.NocoBaseBuildInPlugin,rD=eq.NocoBaseDesktopRouteType,rL=eq.NocoBaseRecursionField,rY=eq.NocoBaseRouteContext,rR=eq.NumberFieldInterface,rB=eq.O2MFieldInterface,rN=eq.O2OFieldInterface,rE=eq.OBOFieldInterface,r$=eq.OHOFieldInterface,rz=eq.OpenModeProvider,rO=eq.OverridingCollectionField,rq=eq.OverridingFieldAction,rH=eq.PMPlugin,rV=eq.Page,rU=eq.PagePopups,rG=eq.PageTabs,rK=eq.Pagination,rW=eq.ParentCollectionFields,rJ=eq.ParentRouteContext,rX=eq.Password,rZ=eq.PasswordFieldInterface,rQ=eq.Percent,r0=eq.PercentFieldInterface,r1=eq.PermissionContext,r2=eq.PermissionProvider,r5=eq.PhoneFieldInterface,r4=eq.PinnedListPlugin,r7=eq.PinnedPluginList,r6=eq.PinnedPluginListContext,r9=eq.PinnedPluginListProvider,r8=eq.Plugin,r3=eq.PluginManager,ie=eq.PluginManagerLink,it=eq.PluginSettingsManager,io=eq.PopupActionModel,il=eq.PopupContextProvider,ia=eq.PopupSettingsProvider,ir=eq.PopupSubTableFormActionGroupModel,ii=eq.PoweredBy,is=eq.Preview,id=eq.QuickEdit,iu=eq.REGEX_OF_VARIABLE,ic=eq.REGEX_OF_VARIABLE_IN_EXPRESSION,ip=eq.Radio,im=eq.RadioGroupFieldInterface,ih=eq.ReadPretty,ix=eq.ReadPrettyRecordPicker,iv=eq.RecordActionGroupModel,i_=eq.RecordAssociationBlockInitializer,ig=eq.RecordAssociationDetailsBlockInitializer,ib=eq.RecordAssociationFormBlockInitializer,iy=eq.RecordAssociationGridCardBlockInitializer,iS=eq.RecordAssociationListBlockInitializer,ik=eq.RecordContext_deprecated,iC=eq.RecordFormBlockInitializer,iM=eq.RecordIndexContext,iw=eq.RecordIndexProvider,iF=eq.RecordLink,iP=eq.RecordPicker,ij=eq.RecordPickerContent,iA=eq.RecordPickerContext,iI=eq.RecordPickerProvider,iT=eq.RecordProvider,iD=eq.RecordReadPrettyAssociationFormBlockInitializer,iL=eq.RecordSelectFieldModel,iY=eq.RecordSimpleProvider,iR=eq.RefreshActionModel,iB=eq.RefreshComponentProvider,iN=eq.RefreshDataBlockRequest,iE=eq.RemoteCollectionManagerProvider,i$=eq.RemoteDocumentTitlePlugin,iz=eq.RemoteDocumentTitleProvider,iO=eq.RemoteSchemaComponent,iq=eq.RemoteSchemaTemplateManagerPlugin,iH=eq.RemoteSchemaTemplateManagerProvider,iV=eq.RemoteSelect,iU=eq.RemoveButton,iG=eq.RemoveConditionContext,iK=eq.RenderChildrenWithAssociationFilter,iW=eq.RequestSettings,iJ=eq.RerenderDataBlockProvider,iX=eq.Resizable,iZ=eq.ResourceActionContext,iQ=eq.ResourceActionProvider,i0=eq.RichText,i1=eq.RichTextFieldInterface,i2=eq.RoleConfigure,i5=eq.RoleResourceCollectionContext,i4=eq.RoleTable,i7=eq.RolesResourcesActions,i6=eq.RouteSchemaComponent,i9=eq.RouterContextCleaner,i8=eq.RouterManager,i3=eq.SNIPPET_PREFIX,se=eq.SanitizedCollectionProvider,st=eq.SchemaComponent,so=eq.SchemaComponentContext,sl=eq.SchemaComponentOnChangeContext,sn=eq.SchemaComponentOptions,sa=eq.SchemaComponentPlugin,sr=eq.SchemaComponentProvider,si=eq.SchemaInitializer,ss=eq.SchemaInitializerActionModal,sd=eq.SchemaInitializerActionModalInternal,su=eq.SchemaInitializerChild,sc=eq.SchemaInitializerChildren,sp=eq.SchemaInitializerContext,sm=eq.SchemaInitializerDivider,sh=eq.SchemaInitializerItem,sx=eq.SchemaInitializerItemContext,sv=eq.SchemaInitializerItemGroup,s_=eq.SchemaInitializerItemGroupInternal,sf=eq.SchemaInitializerItemInternal,sg=eq.SchemaInitializerItems,sb=eq.SchemaInitializerManager,sy=eq.SchemaInitializerMenu,sS=eq.SchemaInitializerMenuProvider,sk=eq.SchemaInitializerOpenModeSchemaItems,sC=eq.SchemaInitializerPlugin,sM=eq.SchemaInitializerSelect,sw=eq.SchemaInitializerSelectInternal,sF=eq.SchemaInitializerSubMenu,sP=eq.SchemaInitializerSubMenuInternal,sj=eq.SchemaInitializerSwitch,sA=eq.SchemaInitializerSwitchInternal,sI=eq.SchemaSettingAccessControl,sT=eq.SchemaSettingItemContext,sD=eq.SchemaSettingOpenModeSchemaItems,sL=eq.SchemaSettings,sY=eq.SchemaSettingsActionLinkItem,sR=eq.SchemaSettingsActionModalItem,sB=eq.SchemaSettingsBlockHeightItem,sN=eq.SchemaSettingsBlockTitleItem,sE=eq.SchemaSettingsCascaderItem,s$=eq.SchemaSettingsChild,sz=eq.SchemaSettingsChildren,sO=eq.SchemaSettingsConnectDataBlocks,sq=eq.SchemaSettingsDataScope,sH=eq.SchemaSettingsDataTemplates,sV=eq.SchemaSettingsDateFormat,sU=eq.SchemaSettingsDefaultSortingRules,sG=eq.SchemaSettingsDefaultValue,sK=eq.SchemaSettingsDivider,sW=eq.SchemaSettingsDropdown,sJ=eq.SchemaSettingsEnableChildCollections,sX=eq.SchemaSettingsFixed,sZ=eq.SchemaSettingsFormItemTemplate,sQ=eq.SchemaSettingsItem,s0=eq.SchemaSettingsItemGroup,s1=eq.SchemaSettingsLayoutItem,s2=eq.SchemaSettingsLinkageRules,s5=eq.SchemaSettingsManager,s4=eq.SchemaSettingsModalItem,s7=eq.SchemaSettingsNumberFormat,s6=eq.SchemaSettingsPlugin,s9=eq.SchemaSettingsPopupItem,s8=eq.SchemaSettingsProvider,s3=eq.SchemaSettingsRemove,de=eq.SchemaSettingsRenderEngine,dt=eq.SchemaSettingsSelectItem,dl=eq.SchemaSettingsSortingRule,dn=eq.SchemaSettingsSubMenu,da=eq.SchemaSettingsSwitchItem,dr=eq.SchemaSettingsTemplate,di=eq.SchemaSettingsWrapper,ds=eq.SchemaTemplateManagerContext,dd=eq.SchemaToolbar,du=eq.SchemaToolbarContext,dc=eq.SchemaToolbarProvider,dp=eq.SchemaToolbarVisibleContext,dm=eq.ScopeSelect,dh=eq.SearchCollections,dx=eq.SearchParamsContext,dv=eq.SecondConFirm,d_=eq.Select,df=eq.SelectActionInitializer,dg=eq.SelectFieldInterface,db=eq.SelectWithTitle,dy=eq.SetDataLoadingMode,dS=eq.SettingCenterPermissionProvider,dk=eq.SettingCenterProvider,dC=eq.SettingsCenterConfigure,dM=eq.SettingsCenterContext,dw=eq.SettingsCenterDropdown,dF=eq.SettingsMenuProvider,dP=eq.ShowFormData,dj=eq.SkeletonFallback,dA=eq.SkipValidation,dI=eq.SnowflakeIdFieldInterface,dT=eq.Sortable,dD=eq.SortableContext,dL=eq.SortableItem,dY=eq.SortableProvider,dR=eq.SourceCollection,dB=eq.SourceForeignKey,dN=eq.SourceKey,dE=eq.Space,d$=eq.StablePopover,dz=eq.StrategyActions,dO=eq.SubFieldDataSourceProvider_deprecated,dq=eq.SubTableColumnModel,dH=eq.SubTableFieldInterface,dV=eq.SubTableFieldModel,dU=eq.SubmitActionInitializer,dG=eq.SwitchLanguage,dK=eq.SyncFieldsAction,dW=eq.SyncFieldsActionCom,dJ=eq.SyncSQLFieldsAction,dX=eq.SystemSettingsPane,dZ=eq.SystemSettingsPlugin,dQ=eq.SystemSettingsSource,d0=eq.Table,d1=eq.TableActionColumnInitializer,d2=eq.TableAssociationFieldGroupModel,d5=eq.TableBlockContext,d4=eq.TableBlockDesigner,d7=eq.TableBlockInitializer,d6=eq.TableBlockModel,d9=eq.TableBlockProvider,d8=eq.TableColumnModel,d3=eq.TableColumnSchemaToolbar,ue=eq.TableField,ut=eq.TableFieldContext,uo=eq.TableFieldProvider,ul=eq.TableFieldResource,un=eq.TableSelectorContext,ua=eq.TableSelectorDesigner,ur=eq.TableSelectorInitializer,ui=eq.TableSelectorParamsProvider,us=eq.TableSelectorProvider,ud=eq.TableV2,uu=eq.TableoidFieldInterface,uc=eq.Tabs,up=eq.TabsContextProvider,um=eq.TargetForeignKey,uh=eq.TargetKey,ux=eq.TemplateBlockProvider,uv=eq.TemplateSummary,u_=eq.Templates,uf=eq.TestDesigner,ug=eq.TextAreaWithContextSelector,ub=eq.TextAreaWithGlobalScope,uy=eq.TextareaFieldInterface,uS=eq.ThroughCollection,uk=eq.ThroughForeignKey,uC=eq.TimeFieldInterface,uM=eq.TimePicker,uw=eq.TreeSelect,uF=eq.UUIDFieldInterface,uP=eq.UnSupportFields,uj=eq.UnixTimestamp,uA=eq.UnixTimestampFieldInterface,uI=eq.UpdateRecordActionModel,uT=eq.UpdatedAtFieldInterface,uD=eq.UpdatedByFieldInterface,uL=eq.Upload,uY=eq.Uploader,uR=eq.UrlFieldInterface,uB=eq.Variable,uN=eq.VariableFilterItem,uE=eq.VariableInput,u$=eq.VariablePopupRecordProvider,uz=eq.VariableScope,uO=eq.VariableScopeProvider,uq=eq.VariableSelect,uH=eq.VariablesContext,uV=eq.VariablesProvider,uU=eq.ViewCollectionField,uG=eq.ViewFieldAction,uK=eq.WithoutFormFieldResource,uW=eq.WithoutTableFieldResource,uJ=eq.actionSettings,uX=eq.actionSettingsItems,uZ=eq.addCustomAlgorithmToTheme,uQ=eq.allowAddNew,u0=eq.appendQueryStringToUrl,u1=eq.applyCollectionFieldUiSchemaToDefaultValueSchema,u2=eq.applyMobilePaginationProps,u5=eq.attachmentFileTypes,u4=eq.autoFill,u7=eq.autoIncrement,u6=eq.canMakeAssociationBlock,u9=eq.collectionDataSource,u8=eq.compatOldTheme,u3=eq.completeURL,ce=eq.compose,ct=eq.constraintsProps,co=eq.createCompactSimpleItemRender,cl=eq.createCreateFormBlockUISchema,cn=eq.createDesignable,ca=eq.createDetailsBlockSchema,cr=eq.createFormActionInitializers,ci=eq.createFormActionInitializers_deprecated,cs=eq.createFormBlockSchema,cd=eq.createFormBlockSettings,cu=eq.createModalSettingsItem,cc=eq.createReadPrettyFormBlockSchema,cp=eq.createRouterManager,cm=eq.createSelectSchemaSettingsItem,ch=eq.createStyles,cx=eq.createSwitchSettingsItem,cv=eq.createTableBlockSchema,c_=eq.createTableBlockUISchema,cf=eq.createTextSettingsItem,cg=eq.css,cb=eq.customAlgorithm,cy=eq.customFormItemInitializers,cS=eq.customFormItemInitializers_deprecated,ck=eq.dataSource,cC=eq.dateTimeProps,cM=eq.defaultFieldNames,cw=eq.defaultInputStyle,cF=eq.defaultProps,cP=eq.defaultTheme,cj=eq.dispatchEventDeep,cA=eq.ds,cI=eq.editFormBlockSettings,cT=eq.editMarkdownFlow,cD=eq.fetchTemplateData,cL=eq.fieldComponentSettingsItem,cY=eq.fieldSettingsFormItem,cR=eq.fileSizeSetting,cB=eq.fillParentFields,cN=eq.filterFormItemSettings,cE=eq.findByUid,c$=eq.findFilterTargets,cz=eq.findFirstPageRoute,cO=eq.findFormBlock,cq=eq.findKanbanFormItem,cH=eq.findKeysByUid,cV=eq.findMenuItem,cU=eq.findParentFieldSchema,cG=eq.findRouteBySchemaUid,cK=eq.formActionInitializers,cW=eq.formDetailsSettings,cJ=eq.formItemInitializers,cX=eq.formItemInitializers_deprecated,cZ=eq.formItemSettings,cQ=eq.formSettings,c0=eq.formV1Settings,c1=eq.genStyleHook,c2=eq.getAppends,c5=eq.getAssociationPath,c4=eq.getCardItemSchema,c7=eq.getCollectionTitle,c6=eq.getConfigurableProperties,c9=eq.getCurrentOptions,c8=eq.getDataSourceHeaders,c3=eq.getDateExact,pe=eq.getDatePickerLabels,pt=eq.getDateRanges,po=eq.getFieldDefaultValue,pl=eq.getFilterByTkByCollection,pn=eq.getFlowPageMenuSchema,pa=eq.getFormValues,pr=eq.getIdsWithChildren,pi=eq.getLabelFormatValue,ps=eq.getLabelWithTooltip,pd=eq.getPageMenuSchema,pu=eq.getPageSchema,pc=eq.getPinnedPluginListKeys,pp=eq.getPopupPathFromParams,pm=eq.getRenderContent,ph=eq.getSchemaSettingsConfirmZIndex,px=eq.getSchemaSettingsDialogZIndex,pv=eq.getShouldChange,p_=eq.getSimpleModePaginationClassName,pf=eq.getStoredPopupContext,pg=eq.getSupportFieldsByAssociation,pb=eq.getSupportFieldsByForeignKey,py=eq.getSystemSettingsMutationData,pS=eq.getTabSchema,pk=eq.getURLSearchParams,pC=eq.getURLSearchParamsChildren,pM=eq.getUniqueKeyFromCollection,pw=eq.getUnknownCountPaginationTotal,pF=eq.getVariableComponentWithScope,pP=eq.getVariableValue,pj=eq.getVariablesFromExpression,pA=eq.getZIndex,pI=eq.gridRowColWrap,pT=eq.handleDateChangeOnForm,pD=eq.hasIcon,pL=eq.i18n,pY=eq.icons,pR=eq.inferPickerType,pB=eq.interfacesOfUnsupportedDefaultValue,pN=eq.interfacesProperties,pE=eq.isAssocField,p$=eq.isBulkEditAction,pz=eq.isDeleteButtonDisabled,pO=eq.isFileCollection,pq=eq.isInFilterFormBlock,pH=eq.isInitializersSame,pV=eq.isMobile,pU=eq.isPatternDisabled,pG=eq.isSameCollection,pK=eq.isShowFilePicker,pW=eq.isSystemField,pJ=eq.isTabPage,pX=eq.isTitleField,pZ=eq.isVariable,pQ=eq.isWriteEmailAction,p0=eq.itemsMerge,p1=eq.joinCollectionName,p2=eq.joinUrlSearch,p5=eq.languageCodes,p4=eq.lazy,p7=eq.locale,p6=eq.mapDatePicker,p9=eq.mapRangePicker,p8=eq.mapTimeFormat,p3=eq.matchMimetype,me=eq.mergeFilter,mt=eq.mergePaginationClassName,mo=eq.mockAPIClient,ml=eq.moment2str,mn=eq.navigateToTab,ma=eq.navigateWithinSelf,mr=eq.normalizeContainer,mi=eq.openViewFlow,ms=eq.operators,md=eq.pageSettings,mu=eq.pageTabSettings,mc=eq.parseCollectionName,mp=eq.parseVariablesAndChangeParamsToQueryString,mm=eq.primaryKey,mh=eq.readPrettyFormSettings,mx=eq.recordBlockInitializers,mv=eq.recordBlockInitializers_deprecated,m_=eq.recordPickerViewer,mf=eq.recursiveParent,mg=eq.reduceValueSize,mb=eq.registerIcon,my=eq.registerIcons,mS=eq.registerInitializerMenusGenerator,mk=eq.relationshipType,mC=eq.removeNullCondition,mM=eq.replaceVariableValue,mw=eq.replaceVariables,mF=eq.requestParentRecordData,mP=eq.resolveFilterPickerFormat,mj=eq.reverseFieldProperties,mA=eq.schemaSettingsLabelLayout,mI=eq.setDataLoadingModeSettingsItem,mT=eq.setDefaultSortingRulesSchemaSettingsItem,mD=eq.setTheDataScopeSchemaSettingsItem,mL=eq.shouldRenderIconInTitle,mY=eq.showFileName,mR=eq.splitWrapSchema,mB=eq.storePopupContext,mN=eq.subTableActionInitializers,mE=eq.subTableActionInitializers_deprecated,m$=eq.systemKeys,mz=eq.tabPaneInitializers,mO=eq.tabPaneInitializersForBulkEditFormBlock,mq=eq.tabPaneInitializersForRecordBlock,mH=eq.tabPaneInitializers_deprecated,mV=eq.tableActionColumnInitializers,mU=eq.tableActionColumnInitializers_deprecated,mG=eq.tableActionInitializers,mK=eq.tableActionInitializers_deprecated,mW=eq.tableBlockSettings,mJ=eq.tableColumnInitializers,mX=eq.tableColumnInitializers_deprecated,mZ=eq.tableColumnSettings,mQ=eq.tableSelectorBlockSettings,m0=eq.timeProps,m1=eq.titleField,m2=eq.toToolsMap,m5=eq.transformFilter,m4=eq.transformToFilter,m7=eq.transformVariableValue,m6=eq.tval,m9=eq.type,m8=eq.unique,m3=eq.updateFilterTargets,he=eq.updateFormActionInitializers,ht=eq.updateFormActionInitializers_deprecated,ho=eq.useACLActionParamsContext,hl=eq.useACLContext,hn=eq.useACLFieldWhitelist,ha=eq.useACLRoleContext,hr=eq.useACLRolesCheck,hi=eq.useAPIClient,hs=eq.useAPITokenVariable,hd=eq.useAclSnippets,hu=eq.useActionAvailable,hc=eq.useActionBarContext,hp=eq.useActionContext,hm=eq.useAdminSchemaUid,hh=eq.useAfterSuccessOptions,hx=eq.useAllAccessDesktopRoutes,hv=eq.useAllCollectionsInheritChainGetter,h_=eq.useAllDataBlocks,hf=eq.useApp,hg=eq.useAppLangContext,hb=eq.useAppSpin,hy=eq.useAriaAttributeOfMenuItem,hS=eq.useAssociatedFields,hk=eq.useAssociatedFormItemInitializerFields,hC=eq.useAssociatedTableColumnInitializerFields,hM=eq.useAssociationCreateActionProps,hw=eq.useAssociationFieldContext,hF=eq.useAssociationFieldModeContext,hP=eq.useAssociationFilterBlockProps,hj=eq.useAssociationFilterProps,hA=eq.useAssociationName,hI=eq.useAssociationNames,hT=eq.useAsyncData,hD=eq.useAttach,hL=eq.useBackButton,hY=eq.useBaseVariable,hR=eq.useBlockAssociationContext,hB=eq.useBlockConfigs,hN=eq.useBlockContext,hE=eq.useBlockHeight,h$=eq.useBlockHeightProps,hz=eq.useBlockRequestContext,hO=eq.useBlockResource,hq=eq.useBlockTemplateContext,hH=eq.useBuiltinVariables,hV=eq.useBulkDestroyAction,hU=eq.useBulkDestroyActionAndRefreshCM,hG=eq.useBulkDestroyActionProps,hK=eq.useCancelAction,hW=eq.useCloseAction,hJ=eq.useCollectValuesToSubmit,hX=eq.useCollection,hZ=eq.useCollectionDataSource,hQ=eq.useCollectionDataSourceItems,h0=eq.useCollectionField,h1=eq.useCollectionFieldFormValues,h2=eq.useCollectionField_deprecated,h5=eq.useCollectionFields,h4=eq.useCollectionFieldsOptions,h7=eq.useCollectionFilterOptions,h6=eq.useCollectionHistory,h9=eq.useCollectionManager,h8=eq.useCollectionManager_deprecated,h3=eq.useCollectionParentRecord,xe=eq.useCollectionParentRecordData,xt=eq.useCollectionRecord,xo=eq.useCollectionRecordData,xl=eq.useCollectionState,xn=eq.useCollection_deprecated,xa=eq.useCollections,xr=eq.useColumnSchema,xi=eq.useColumnSettings,xs=eq.useCompatOldVariables,xd=eq.useCompile,xu=eq.useComponent,xc=eq.useContextAssociationFields,xp=eq.useContextVariable,xm=eq.useCreateActionProps,xh=eq.useCreateAssociationDetailsBlock,xx=eq.useCreateAssociationDetailsWithoutPagination,xv=eq.useCreateAssociationFormBlock,x_=eq.useCreateAssociationGridCardBlock,xf=eq.useCreateAssociationListBlock,xg=eq.useCreateAssociationTableBlock,xb=eq.useCreateEditFormBlock,xy=eq.useCreateFormBlock,xS=eq.useCreateTableBlock,xk=eq.useCurrentAppInfo,xC=eq.useCurrentDocumentTitle,xM=eq.useCurrentPageUid,xw=eq.useCurrentPopupContext,xF=eq.useCurrentPopupRecord,xP=eq.useCurrentRoleMode,xj=eq.useCurrentRoleVariable,xA=eq.useCurrentRoles,xI=eq.useCurrentRoute,xT=eq.useCurrentSchema,xD=eq.useCurrentSearchParams,xL=eq.useCurrentTabUid,xY=eq.useCurrentUserContext,xR=eq.useCurrentUserSettingsMenu,xB=eq.useCurrentUserVariable,xN=eq.useCustomizeBulkUpdateActionProps,xE=eq.useCustomizeRequestActionProps,x$=eq.useCustomizeUpdateActionProps,xz=eq.useDataBlock,xO=eq.useDataBlockHeight,xq=eq.useDataBlockParentRecord,xH=eq.useDataBlockProps,xV=eq.useDataBlockRequest,xU=eq.useDataBlockRequestData,xG=eq.useDataBlockRequestGetter,xK=eq.useDataBlockResource,xW=eq.useDataLoadingMode,xJ=eq.useDataSource,xX=eq.useDataSourceFromRAC,xZ=eq.useDataSourceHeaders,xQ=eq.useDataSourceKey,x0=eq.useDataSourceManager,x1=eq.useDataTemplates,x2=eq.useDatePickerContext,x5=eq.useDateVariable,x4=eq.useDatetimeVariable,x7=eq.useDatetimeVariableContext,x6=eq.useDeleteRouteSchema,x9=eq.useDesignable,x8=eq.useDesigner,x3=eq.useDestroyAction,ve=eq.useDestroyActionAndRefreshCM,vt=eq.useDestroyActionProps,vo=eq.useDetailsBlockContext,vl=eq.useDetailsBlockProps,vn=eq.useDetailsDecoratorProps,va=eq.useDetailsPaginationProps,vr=eq.useDetailsParentRecord,vi=eq.useDetailsProps,vs=eq.useDetailsWithPaginationBlockParams,vd=eq.useDetailsWithPaginationDecoratorProps,vu=eq.useDetailsWithPaginationProps,vc=eq.useDisassociateActionProps,vp=eq.useDocumentTitle,vm=eq.useDownloadLogs,vh=eq.useEditTableActionProps,vx=eq.useEnsureOperatorsValid,vv=eq.useExactDateVariable,v_=eq.useExactDateVariableContext,vf=eq.useExtendCollections,vg=eq.useFieldComponentName,vb=eq.useFieldComponentOptions,vy=eq.useFieldInterfaceOptions,vS=eq.useFieldMode,vk=eq.useFieldModeOptions,vC=eq.useFieldNames,vM=eq.useFieldProps,vw=eq.useFieldTitle,vF=eq.useFilterAPI,vP=eq.useFilterActionProps,vj=eq.useFilterBlock,vA=eq.useFilterBlockActionProps,vI=eq.useFilterByTk,vT=eq.useFilterFieldOptions,vD=eq.useFilterFieldProps,vL=eq.useFilterOptions,vY=eq.useFindComponent,vR=eq.useFlag,vB=eq.useFormActiveFields,vN=eq.useFormBlockContext,vE=eq.useFormBlockProps,v$=eq.useFormBlockType,vz=eq.useFormDataTemplates,vO=eq.useFormFieldContext,vq=eq.useFormFieldProps,vH=eq.useFormItemInitializerFields,vV=eq.useGetAriaLabelOfAction,vU=eq.useGetAriaLabelOfDesigner,vG=eq.useGetAriaLabelOfDrawer,vK=eq.useGetAriaLabelOfModal,vW=eq.useGetAriaLabelOfPopover,vJ=eq.useGetFilterFieldOptions,vX=eq.useGetFilterOptions,vZ=eq.useGetSchemaInitializerMenuItems,vQ=eq.useGlobalTheme,v0=eq.useGlobalVariable,v1=eq.useGlobalVariableCtx,v2=eq.useGridContext,v5=eq.useGridRowContext,v4=eq.useHistoryCollectionsByNames,v7=eq.useInheritsTableColumnInitializerFields,v6=eq.useInsertPageSchema,v9=eq.useIsAddNewForm,v8=eq.useIsAdminPage,v3=eq.useIsAllowToSetDefaultValue,_e=eq.useIsAssociationField,_t=eq.useIsDetailBlock,_o=eq.useIsFieldReadPretty,_l=eq.useIsFileField,_n=eq.useIsFormReadPretty,_a=eq.useIsInSettingsPage,_r=eq.useIsLoggedIn,_i=eq.useIsSameOrChildCollection,_s=eq.useIsSelectFieldMode,_d=eq.useIsSubPageClosedByPageMenu,_u=eq.useKeepAlive,_c=eq.useKeepAliveLocationSearch,_p=eq.useLabelUiSchema,_m=eq.useLazy,_h=eq.useLinkActionProps,_x=eq.useLinkageAction,_v=eq.useLinkageCollectionFilterOptions,__=eq.useListBlockContext,_f=eq.useLocalVariables,_g=eq.useLocalVariablesWithoutCustomVariable,_b=eq.useLocationNoUpdate,_y=eq.useLocationSearch,_S=eq.useMenuDragEnd,_k=eq.useMenuSearch,_C=eq.useMenuTranslation,_M=eq.useMobileLayout,_w=eq.useNavigateNoUpdate,_F=eq.useNocoBaseRoutes,_P=eq.useOpenModeContext,_j=eq.useOptionalFieldList,_A=eq.useParamsFromRecord,_I=eq.useParentCollection,_T=eq.useParentRecordCommon,_D=eq.useParentRoute,_L=eq.useParseDataScopeFilter,_Y=eq.useParseURLAndParams,_R=eq.useParsedFilter,_B=eq.usePickActionProps,_N=eq.usePlugin,_E=eq.usePopupSettings,_$=eq.usePopupUtils,_z=eq.usePopupVariable,_O=eq.usePopupVariableContext,_q=eq.useProps,_H=eq.useRecord,_V=eq.useRecordCollectionDataSourceItems,_U=eq.useRecordIndex,_G=eq.useRecordIsOwn,_K=eq.useRecordPkValue,_W=eq.useRefreshActionProps,_J=eq.useRefreshFieldSchema,_X=eq.useRemoteCollectionManagerLoading,_Z=eq.useRemoveActionProps,_Q=eq.useRemoveGridFormItem,_0=eq.useRequest,_1=eq.useRerenderDataBlock,_2=eq.useResetBlockActionProps,_5=eq.useResource,_4=eq.useResourceActionContext,_7=eq.useResourceContext,_6=eq.useRoleRecheck,_9=eq.useRoleVariable,_8=eq.useRolesResourcesScopesSelectedRowKeys,_3=eq.useRouter,fe=eq.useRouterBasename,ft=eq.useSchemaComponentContext,fo=eq.useSchemaInitializer,fl=eq.useSchemaInitializerItem,fn=eq.useSchemaInitializerMenuItems,fa=eq.useSchemaInitializerRender,fr=eq.useSchemaInitializerStyles,fi=eq.useSchemaInitializerSubMenuContext,fs=eq.useSchemaOptionsContext,fd=eq.useSchemaSettings,fu=eq.useSchemaSettingsItem,fc=eq.useSchemaSettingsRender,fp=eq.useSchemaTemplate,fm=eq.useSchemaTemplateManager,fh=eq.useSchemaToolbar,fx=eq.useSchemaToolbarRender,fv=eq.useSortFields,f_=eq.useSourceId,ff=eq.useSourceIdFromParentRecord,fg=eq.useSourceIdFromRecord,fb=eq.useStyles,fy=eq.useSupportedBlocks,fS=eq.useSyncFromForm,fk=eq.useSystemSettings,fC=eq.useSystemSettingsVariable,fM=eq.useTableBlockContext,fw=eq.useTableBlockContextBasicValue,fF=eq.useTableBlockDecoratorProps,fP=eq.useTableBlockParams,fj=eq.useTableBlockProps,fA=eq.useTableColumnInitializerFields,fI=eq.useTableColumnIntegration,fT=eq.useTableColumns,fD=eq.useTableFieldContext,fL=eq.useTableFieldProps,fY=eq.useTableSelectorContext,fR=eq.useTableSelectorProps,fB=eq.useTableSize,fN=eq.useTabsContext,fE=eq.useTemplateBlockContext,f$=eq.useTitleFieldOptions,fz=eq.useToken,fO=eq.useUIConfigurationPermissions,fq=eq.useURLAndHTMLSchema,fH=eq.useURLSearchParamsCtx,fV=eq.useURLSearchParamsVariable,fU=eq.useUpdateActionProps,fG=eq.useUpdateCollectionActionAndRefreshCM,fK=eq.useUploadStyles,fW=eq.useUserVariable,fJ=eq.useValidateSchema,fX=eq.useValuesFromRecord,fZ=eq.useVariableOptions,fQ=eq.useVariableScope,f0=eq.useVariableScopeInfo,f1=eq.useVariables,f2=eq.useViewport,f5=eq.useZIndexContext,f4=eq.withDynamicSchemaProps,f7=eq.withInitializer,f6=eq.withSearchParams,f9=eq.withSkeletonComponent,f8=eq.zIndexContext;export{eH as ACLActionParamsContext,eV as ACLActionProvider,eU as ACLCollectionFieldProvider,eG as ACLCollectionProvider,eK as ACLContext,eW as ACLCustomContext,eJ as ACLMenuItemProvider,eX as ACLPane,eZ as ACLPlugin,eQ as ACLProvider,e0 as ACLRolesCheckProvider,e1 as ADMIN_SETTINGS_KEY,e2 as ADMIN_SETTINGS_PATH,e5 as AIManager,e4 as APIClient,e7 as APIClientContext,e6 as APIClientProvider,e9 as AccessControl,e8 as Action,e3 as ActionBar,te as ActionBarAssociationFilterAction,tt as ActionBarProvider,to as ActionContext,tl as ActionContextNoRerender,tn as ActionContextProvider,ta as ActionDesigner,tr as ActionGroupModel,ti as ActionInitializer,ts as ActionInitializerItem,td as ActionModel,tu as ActionSceneEnum,tc as ActionType,tp as AddChildActionModel,tm as AddCollection,th as AddCollectionAction,tx as AddCollectionField,tv as AddFieldAction,t_ as AddNewActionModel,tf as AddSubFieldAction,tg as AdminDynamicPage,tb as AdminLayout,ty as AdminLayoutMenuItemModel,tS as AdminLayoutPlugin,tk as AdminProvider,tC as AdminSettingsLayout,tM as AdminSettingsLayoutModel,tw as AfterSuccess,tF as AllDataBlocksContext,tP as AllDataBlocksProvider,tj as AntdAppProvider,tA as AntdConfigPlugin,tI as AntdConfigProvider,tT as AntdSchemaComponentPlugin,tD as AntdSchemaComponentProvider,tL as AppLangContext,tY as AppNotFound,tR as AppendsTreeSelect,tB as Application,tN as ApplicationContext,tE as AssignFormModel,t$ as AssignedFieldValues,tz as AssociatedFields,tO as AssociationField,tq as AssociationFieldMode,tH as AssociationFieldModeProvider,tV as AssociationFilter,tU as AssociationFilterDesignerDelete,tG as AssociationFilterDesignerDisplayField,tK as AssociationFilterPlugin,tW as AssociationOrCollectionProvider,tJ as AssociationProvider,tX as AssociationSelect,tZ as AsyncDataContext,tQ as AsyncDataProvider,t0 as AttachmentList,t1 as AutoComplete,t2 as BackButtonUsedInSubPage,t5 as BaseVariableProvider,t4 as BlankComponent,t7 as Block,t6 as BlockAssociationContext,t9 as BlockConfigsContext,t8 as BlockConfigsProvider,t3 as BlockContext,oe as BlockGridModel,ot as BlockInitializer,oo as BlockItem,ol as BlockItemCard,on as BlockItemCardContext,oa as BlockItemInitializer,or as BlockModel,oi as BlockProvider,os as BlockRequestContextProvider,od as BlockRequestContext_deprecated,ou as BlockRequestLoadingContext,oc as BlockRequestProvider,op as BlockRequestProvider_deprecated,om as BlockResourceContext,oh as BlockSceneEnum,ox as BlockSchemaComponentPlugin,ov as BlockSchemaComponentProvider,o_ as BlockSchemaToolbar,of as BlockTemplateContext,og as BlockTemplateDetails,ob as BlockTemplatePage,oy as BlockTemplateProvider,oS as BlockTemplatesPane,ok as BlocksSelector,oC as ButtonEditor,oM as CSSVariableProvider,ow as CardItem,oF as Cascader,oP as Checkbox,oj as CheckboxFieldInterface,oA as CheckboxGroupFieldInterface,oI as ChildPageModel,oT as ChildPageTabModel,oD as ClearCollectionFieldContext,oL as ClickableFieldModel,oY as CodeEditor,oR as CodeEditorExtension,oB as Collection,oN as CollectionActionGroupModel,oE as CollectionActionModel,o$ as CollectionBlockModel,oz as CollectionCategoriesContext,oO as CollectionCategoriesProvider,oq as CollectionCategory,oH as CollectionContext,oV as CollectionDeletedPlaceholder,oU as CollectionField,oG as CollectionFieldContext,oK as CollectionFieldInterface,oW as CollectionFieldInterfaceManager,oJ as CollectionFieldInterfaceTag,oX as CollectionFieldProvider,oZ as CollectionFieldUISchemaProvider,oQ as CollectionFieldsToFormInitializerItems,o0 as CollectionFieldsToInitializerItems,o1 as CollectionFieldsToTableInitializerItems,o2 as CollectionHistoryProvider,o5 as CollectionManager,o4 as CollectionManagerContext,o7 as CollectionManagerProvider,o6 as CollectionManagerProvider_deprecated,o9 as CollectionManagerSchemaComponentProvider,o8 as CollectionNotAllowViewPlaceholder,o3 as CollectionPlugin,le as CollectionProvider,lt as CollectionProvider_deprecated,lo as CollectionRecord,ll as CollectionRecordContext,ln as CollectionRecordProvider,la as CollectionSelect,lr as CollectionSelectFieldInterface,li as CollectionTemplate,ls as CollectionTemplateManager,ld as CollectionTemplateTag,lu as ColorFieldInterface,lc as ColorPicker,lp as ColorSelect,lm as CommonItemModel,lh as CompatibleSchemaInitializer,lx as CreateFilterActionInitializer,lv as CreateFormModel,l_ as CreateResetActionInitializer,lf as CreatedAtFieldInterface,lg as CreatedByFieldInterface,lb as Cron,ly as CronSet,lS as CurrentAppInfoContext,lk as CurrentAppInfoProvider,lC as CurrentPageUidContext,lM as CurrentPageUidProvider,lw as CurrentRouteProvider,lF as CurrentTabUidContext,lP as CurrentTabUidProvider,lj as CurrentUserContext,lA as CurrentUserProvider,lI as CurrentUserSettingsMenuProvider,lT as CustomRouterContextProvider,lD as CustomizeActionInitializer,lL as DEBOUNCE_WAIT,lY as DEFAULT_DATA_SOURCE_KEY,lR as DEFAULT_DATA_SOURCE_TITLE,lB as DataBlockCollector,lN as DataBlockContext,lE as DataBlockInitializer,l$ as DataBlockModel,lz as DataBlockProvider,lO as DataBlockResourceContext,lq as DataBlockResourceProvider,lH as DataSource,lV as DataSourceApplicationProvider,lU as DataSourceCollectionCascader,lG as DataSourceContext,lK as DataSourceContext_deprecated,lW as DataSourceManager,lJ as DataSourceManagerContext,lX as DataSourceManagerProvider,lZ as DataSourceProvider,lQ as DataSourceProvider_deprecated,l0 as DataSourceSelect,l1 as DateFieldInterface,l2 as DateFilterDynamicComponent,l5 as DateFormatCom,l4 as DatePicker,l7 as DatePickerProvider,l6 as DatetimeFieldInterface,l9 as DatetimeNoTzFieldInterface,l8 as DefaultToolsManager,l3 as DefaultValueProvider,ne as DeleteCollection,nt as DeleteCollectionAction,no as Designable,nl as DesignableSwitch,nn as Details,na as DetailsAssociationFieldGroupModel,nr as DetailsBlockContext,ni as DetailsBlockModel,ns as DetailsBlockProvider,nd as DetailsCustomItemModel,nu as DetailsDesigner,nc as DetailsGridModel,np as DetailsItemModel,nm as DisplaySubTableFieldModel,nh as DisplayTextFieldModel,nx as DisplayTitleFieldModel,nv as Divider,n_ as DndContext,nf as DocumentTitleContext,ng as DocumentTitleProvider,nb as DragHandler,ny as DraggableContext,nS as DropdownVisibleContext,nk as EMPTY_OBJECT,nC as EditCollection,nM as EditCollectionAction,nw as EditCollectionField,nF as EditComponent,nP as EditDefaultValue,nj as EditDescription,nA as EditFieldAction,nI as EditFormModel,nT as EditOperator,nD as EditPattern,nL as EditRequired,nY as EditSortField,nR as EditSubFieldAction,nB as EditTable,nN as EditTableAction,nE as EditTableActionContext,n$ as EditTitle,nz as EditTitleField,nO as EditTooltip,nq as EditValidationRules,nH as Editable,nV as EllipsisWithTooltip,nU as EmailFieldInterface,nG as ErrorFallback,nK as Expand,nW as ExpiresRadio,nJ as ExtendCollectionsContext,nX as ExtendCollectionsProvider,nZ as FieldModel,nQ as FieldModelRenderer,n0 as FieldSummary,n1 as FieldValidation,n2 as FieldsTreeSelect,n5 as Fieldset,n4 as Filter,n7 as FilterAction,n6 as FilterActionContext,n9 as FilterActionModel,n8 as FilterAssociatedFields,n3 as FilterBlockModel,ae as FilterBlockProvider,at as FilterBlockType,ao as FilterContext,al as FilterDynamicComponent,an as FilterFormActionGroupModel,aa as FilterFormBlockModel,ar as FilterFormBlockProvider,ai as FilterFormItemModel,as as FilterGroup,ad as FilterLogicContext,au as FilterParentCollectionFields,ac as FlagContext,ap as FlagProvider,am as ForeignKey,ah as Form,ax as FormActionGroupModel,av as FormActionModel,a_ as FormActiveFieldsProvider,af as FormAssociationFieldGroupModel,ag as FormBlockContext,ab as FormBlockInitializer,ay as FormBlockModel,aS as FormBlockProvider,ak as FormComponent,aC as FormDialog,aM as FormDrawer,aw as FormField,aF as FormFieldContext,aP as FormFieldProvider,aj as FormGridModel,aA as FormItem,aI as FormItemModel,aT as FormItemSchemaToolbar,aD as FormProvider,aL as FormSubmitActionModel,aY as FormV2,aR as G2Plot,aB as G2PlotInitializer,aN as G2PlotRenderer,aE as GeneralSchemaDesigner,a$ as GeneralSchemaItems,az as GlobalThemeProvider,aO as Grid,aq as GridCard,aH as GridModel,aV as GridRowContext,aU as HTMLEncode,aG as HeightMode,aK as ICON_POPUP_Z_INDEX,aW as Icon,aJ as IconFieldInterface,aX as IconPicker,aZ as IdFieldInterface,aQ as InheritanceCollectionMixin,a0 as InitializerWithSwitch,a1 as Input,a2 as InputFieldInterface,a5 as InputFieldModel,a4 as InputNumber,a7 as InputReadPretty,a6 as InputRecordPicker,a9 as IntegerFieldInterface,a8 as InternalAdminSettingsLayout,a3 as IsInNocoBaseRecursionFieldContext,re as IsSubPageClosedByPageMenuContext,rt as IsSubPageClosedByPageMenuProvider,ro as JSActionModel,rl as Json,rn as JsonFieldInterface,ra as KeepAlive,rr as LAZY_COMPONENT_KEY,ri as LOADING_DELAY,rs as Layout,rd as LayoutContent,ru as LinkActionModel,rc as LinkToFieldInterface,rp as LinkageFilter,rm as LinkageRuleCategory,rh as LinkageRuleDataKeyMap,rx as List,rv as LocalDataSource,r_ as LocationSearchContext,rf as M2MFieldInterface,rg as M2OFieldInterface,rb as Markdown,ry as MarkdownFieldInterface,rS as MarkdownReadPretty,rk as MaybeCollectionProvider,rC as Menu,rM as MenuConfigure,rw as MockFlowModelRepository,rF as ModalActionSchemaInitializerItem,rP as MultipleSelectFieldInterface,rj as NAMESPACE_UI_SCHEMA,rA as NanoIDInput,rI as NanoidFieldInterface,rT as NocoBaseBuildInPlugin,rD as NocoBaseDesktopRouteType,rL as NocoBaseRecursionField,rY as NocoBaseRouteContext,rR as NumberFieldInterface,rB as O2MFieldInterface,rN as O2OFieldInterface,rE as OBOFieldInterface,r$ as OHOFieldInterface,rz as OpenModeProvider,rO as OverridingCollectionField,rq as OverridingFieldAction,rH as PMPlugin,rV as Page,rU as PagePopups,rG as PageTabs,rK as Pagination,rW as ParentCollectionFields,rJ as ParentRouteContext,rX as Password,rZ as PasswordFieldInterface,rQ as Percent,r0 as PercentFieldInterface,r1 as PermissionContext,r2 as PermissionProvider,r5 as PhoneFieldInterface,r4 as PinnedListPlugin,r7 as PinnedPluginList,r6 as PinnedPluginListContext,r9 as PinnedPluginListProvider,r8 as Plugin,r3 as PluginManager,ie as PluginManagerLink,it as PluginSettingsManager,io as PopupActionModel,il as PopupContextProvider,ia as PopupSettingsProvider,ir as PopupSubTableFormActionGroupModel,ii as PoweredBy,is as Preview,id as QuickEdit,iu as REGEX_OF_VARIABLE,ic as REGEX_OF_VARIABLE_IN_EXPRESSION,ip as Radio,im as RadioGroupFieldInterface,ih as ReadPretty,ix as ReadPrettyRecordPicker,iv as RecordActionGroupModel,i_ as RecordAssociationBlockInitializer,ig as RecordAssociationDetailsBlockInitializer,ib as RecordAssociationFormBlockInitializer,iy as RecordAssociationGridCardBlockInitializer,iS as RecordAssociationListBlockInitializer,ik as RecordContext_deprecated,iC as RecordFormBlockInitializer,iM as RecordIndexContext,iw as RecordIndexProvider,iF as RecordLink,iP as RecordPicker,ij as RecordPickerContent,iA as RecordPickerContext,iI as RecordPickerProvider,iT as RecordProvider,iD as RecordReadPrettyAssociationFormBlockInitializer,iL as RecordSelectFieldModel,iY as RecordSimpleProvider,iR as RefreshActionModel,iB as RefreshComponentProvider,iN as RefreshDataBlockRequest,iE as RemoteCollectionManagerProvider,i$ as RemoteDocumentTitlePlugin,iz as RemoteDocumentTitleProvider,iO as RemoteSchemaComponent,iq as RemoteSchemaTemplateManagerPlugin,iH as RemoteSchemaTemplateManagerProvider,iV as RemoteSelect,iU as RemoveButton,iG as RemoveConditionContext,iK as RenderChildrenWithAssociationFilter,iW as RequestSettings,iJ as RerenderDataBlockProvider,iX as Resizable,iZ as ResourceActionContext,iQ as ResourceActionProvider,i0 as RichText,i1 as RichTextFieldInterface,i2 as RoleConfigure,i5 as RoleResourceCollectionContext,i4 as RoleTable,i7 as RolesResourcesActions,i6 as RouteSchemaComponent,i9 as RouterContextCleaner,i8 as RouterManager,i3 as SNIPPET_PREFIX,se as SanitizedCollectionProvider,st as SchemaComponent,so as SchemaComponentContext,sl as SchemaComponentOnChangeContext,sn as SchemaComponentOptions,sa as SchemaComponentPlugin,sr as SchemaComponentProvider,si as SchemaInitializer,ss as SchemaInitializerActionModal,sd as SchemaInitializerActionModalInternal,su as SchemaInitializerChild,sc as SchemaInitializerChildren,sp as SchemaInitializerContext,sm as SchemaInitializerDivider,sh as SchemaInitializerItem,sx as SchemaInitializerItemContext,sv as SchemaInitializerItemGroup,s_ as SchemaInitializerItemGroupInternal,sf as SchemaInitializerItemInternal,sg as SchemaInitializerItems,sb as SchemaInitializerManager,sy as SchemaInitializerMenu,sS as SchemaInitializerMenuProvider,sk as SchemaInitializerOpenModeSchemaItems,sC as SchemaInitializerPlugin,sM as SchemaInitializerSelect,sw as SchemaInitializerSelectInternal,sF as SchemaInitializerSubMenu,sP as SchemaInitializerSubMenuInternal,sj as SchemaInitializerSwitch,sA as SchemaInitializerSwitchInternal,sI as SchemaSettingAccessControl,sT as SchemaSettingItemContext,sD as SchemaSettingOpenModeSchemaItems,sL as SchemaSettings,sY as SchemaSettingsActionLinkItem,sR as SchemaSettingsActionModalItem,sB as SchemaSettingsBlockHeightItem,sN as SchemaSettingsBlockTitleItem,sE as SchemaSettingsCascaderItem,s$ as SchemaSettingsChild,sz as SchemaSettingsChildren,sO as SchemaSettingsConnectDataBlocks,sq as SchemaSettingsDataScope,sH as SchemaSettingsDataTemplates,sV as SchemaSettingsDateFormat,sU as SchemaSettingsDefaultSortingRules,sG as SchemaSettingsDefaultValue,sK as SchemaSettingsDivider,sW as SchemaSettingsDropdown,sJ as SchemaSettingsEnableChildCollections,sX as SchemaSettingsFixed,sZ as SchemaSettingsFormItemTemplate,sQ as SchemaSettingsItem,s0 as SchemaSettingsItemGroup,s1 as SchemaSettingsLayoutItem,s2 as SchemaSettingsLinkageRules,s5 as SchemaSettingsManager,s4 as SchemaSettingsModalItem,s7 as SchemaSettingsNumberFormat,s6 as SchemaSettingsPlugin,s9 as SchemaSettingsPopupItem,s8 as SchemaSettingsProvider,s3 as SchemaSettingsRemove,de as SchemaSettingsRenderEngine,dt as SchemaSettingsSelectItem,dl as SchemaSettingsSortingRule,dn as SchemaSettingsSubMenu,da as SchemaSettingsSwitchItem,dr as SchemaSettingsTemplate,di as SchemaSettingsWrapper,ds as SchemaTemplateManagerContext,dd as SchemaToolbar,du as SchemaToolbarContext,dc as SchemaToolbarProvider,dp as SchemaToolbarVisibleContext,dm as ScopeSelect,dh as SearchCollections,dx as SearchParamsContext,dv as SecondConFirm,d_ as Select,df as SelectActionInitializer,dg as SelectFieldInterface,db as SelectWithTitle,dy as SetDataLoadingMode,dS as SettingCenterPermissionProvider,dk as SettingCenterProvider,dC as SettingsCenterConfigure,dM as SettingsCenterContext,dw as SettingsCenterDropdown,dF as SettingsMenuProvider,dP as ShowFormData,dj as SkeletonFallback,dA as SkipValidation,dI as SnowflakeIdFieldInterface,dT as Sortable,dD as SortableContext,dL as SortableItem,dY as SortableProvider,dR as SourceCollection,dB as SourceForeignKey,dN as SourceKey,dE as Space,d$ as StablePopover,dz as StrategyActions,dO as SubFieldDataSourceProvider_deprecated,dq as SubTableColumnModel,dH as SubTableFieldInterface,dV as SubTableFieldModel,dU as SubmitActionInitializer,dG as SwitchLanguage,dK as SyncFieldsAction,dW as SyncFieldsActionCom,dJ as SyncSQLFieldsAction,dX as SystemSettingsPane,dZ as SystemSettingsPlugin,dQ as SystemSettingsSource,d0 as Table,d1 as TableActionColumnInitializer,d2 as TableAssociationFieldGroupModel,d5 as TableBlockContext,d4 as TableBlockDesigner,d7 as TableBlockInitializer,d6 as TableBlockModel,d9 as TableBlockProvider,d8 as TableColumnModel,d3 as TableColumnSchemaToolbar,ue as TableField,ut as TableFieldContext,uo as TableFieldProvider,ul as TableFieldResource,un as TableSelectorContext,ua as TableSelectorDesigner,ur as TableSelectorInitializer,ui as TableSelectorParamsProvider,us as TableSelectorProvider,ud as TableV2,uu as TableoidFieldInterface,uc as Tabs,up as TabsContextProvider,um as TargetForeignKey,uh as TargetKey,ux as TemplateBlockProvider,uv as TemplateSummary,u_ as Templates,uf as TestDesigner,ug as TextAreaWithContextSelector,ub as TextAreaWithGlobalScope,uy as TextareaFieldInterface,uS as ThroughCollection,uk as ThroughForeignKey,uC as TimeFieldInterface,uM as TimePicker,uw as TreeSelect,uF as UUIDFieldInterface,uP as UnSupportFields,uj as UnixTimestamp,uA as UnixTimestampFieldInterface,uI as UpdateRecordActionModel,uT as UpdatedAtFieldInterface,uD as UpdatedByFieldInterface,uL as Upload,uY as Uploader,uR as UrlFieldInterface,uB as Variable,uN as VariableFilterItem,uE as VariableInput,u$ as VariablePopupRecordProvider,uz as VariableScope,uO as VariableScopeProvider,uq as VariableSelect,uH as VariablesContext,uV as VariablesProvider,uU as ViewCollectionField,uG as ViewFieldAction,uK as WithoutFormFieldResource,uW as WithoutTableFieldResource,uJ as actionSettings,uX as actionSettingsItems,uZ as addCustomAlgorithmToTheme,uQ as allowAddNew,u0 as appendQueryStringToUrl,u1 as applyCollectionFieldUiSchemaToDefaultValueSchema,u2 as applyMobilePaginationProps,u5 as attachmentFileTypes,u4 as autoFill,u7 as autoIncrement,u6 as canMakeAssociationBlock,u9 as collectionDataSource,u8 as compatOldTheme,u3 as completeURL,ce as compose,ct as constraintsProps,co as createCompactSimpleItemRender,cl as createCreateFormBlockUISchema,cn as createDesignable,ca as createDetailsBlockSchema,cr as createFormActionInitializers,ci as createFormActionInitializers_deprecated,cs as createFormBlockSchema,cd as createFormBlockSettings,cu as createModalSettingsItem,cc as createReadPrettyFormBlockSchema,cp as createRouterManager,cm as createSelectSchemaSettingsItem,ch as createStyles,cx as createSwitchSettingsItem,cv as createTableBlockSchema,c_ as createTableBlockUISchema,cf as createTextSettingsItem,cg as css,cb as customAlgorithm,cy as customFormItemInitializers,cS as customFormItemInitializers_deprecated,ck as dataSource,cC as dateTimeProps,cM as defaultFieldNames,cw as defaultInputStyle,cF as defaultProps,cP as defaultTheme,cj as dispatchEventDeep,cA as ds,cI as editFormBlockSettings,cT as editMarkdownFlow,cD as fetchTemplateData,cL as fieldComponentSettingsItem,cY as fieldSettingsFormItem,cR as fileSizeSetting,cB as fillParentFields,cN as filterFormItemSettings,cE as findByUid,c$ as findFilterTargets,cz as findFirstPageRoute,cO as findFormBlock,cq as findKanbanFormItem,cH as findKeysByUid,cV as findMenuItem,cU as findParentFieldSchema,cG as findRouteBySchemaUid,cK as formActionInitializers,cW as formDetailsSettings,cJ as formItemInitializers,cX as formItemInitializers_deprecated,cZ as formItemSettings,cQ as formSettings,c0 as formV1Settings,c1 as genStyleHook,c2 as getAppends,c5 as getAssociationPath,c4 as getCardItemSchema,c7 as getCollectionTitle,c6 as getConfigurableProperties,c9 as getCurrentOptions,c8 as getDataSourceHeaders,c3 as getDateExact,pe as getDatePickerLabels,pt as getDateRanges,po as getFieldDefaultValue,pl as getFilterByTkByCollection,pn as getFlowPageMenuSchema,pa as getFormValues,pr as getIdsWithChildren,pi as getLabelFormatValue,ps as getLabelWithTooltip,pd as getPageMenuSchema,pu as getPageSchema,pc as getPinnedPluginListKeys,pp as getPopupPathFromParams,pm as getRenderContent,ph as getSchemaSettingsConfirmZIndex,px as getSchemaSettingsDialogZIndex,pv as getShouldChange,p_ as getSimpleModePaginationClassName,pf as getStoredPopupContext,pg as getSupportFieldsByAssociation,pb as getSupportFieldsByForeignKey,py as getSystemSettingsMutationData,pS as getTabSchema,pk as getURLSearchParams,pC as getURLSearchParamsChildren,pM as getUniqueKeyFromCollection,pw as getUnknownCountPaginationTotal,pF as getVariableComponentWithScope,pP as getVariableValue,pj as getVariablesFromExpression,pA as getZIndex,pI as gridRowColWrap,pT as handleDateChangeOnForm,pD as hasIcon,pL as i18n,pY as icons,pR as inferPickerType,pB as interfacesOfUnsupportedDefaultValue,pN as interfacesProperties,pE as isAssocField,p$ as isBulkEditAction,pz as isDeleteButtonDisabled,pO as isFileCollection,pq as isInFilterFormBlock,pH as isInitializersSame,pV as isMobile,pU as isPatternDisabled,pG as isSameCollection,pK as isShowFilePicker,pW as isSystemField,pJ as isTabPage,pX as isTitleField,pZ as isVariable,pQ as isWriteEmailAction,p0 as itemsMerge,p1 as joinCollectionName,p2 as joinUrlSearch,p5 as languageCodes,p4 as lazy,p7 as locale,p6 as mapDatePicker,p9 as mapRangePicker,p8 as mapTimeFormat,p3 as matchMimetype,me as mergeFilter,mt as mergePaginationClassName,mo as mockAPIClient,ml as moment2str,mn as navigateToTab,ma as navigateWithinSelf,mr as normalizeContainer,mi as openViewFlow,ms as operators,md as pageSettings,mu as pageTabSettings,mc as parseCollectionName,mp as parseVariablesAndChangeParamsToQueryString,mm as primaryKey,mh as readPrettyFormSettings,mx as recordBlockInitializers,mv as recordBlockInitializers_deprecated,m_ as recordPickerViewer,mf as recursiveParent,mg as reduceValueSize,mb as registerIcon,my as registerIcons,mS as registerInitializerMenusGenerator,mk as relationshipType,mC as removeNullCondition,mM as replaceVariableValue,mw as replaceVariables,mF as requestParentRecordData,mP as resolveFilterPickerFormat,mj as reverseFieldProperties,mA as schemaSettingsLabelLayout,mI as setDataLoadingModeSettingsItem,mT as setDefaultSortingRulesSchemaSettingsItem,mD as setTheDataScopeSchemaSettingsItem,mL as shouldRenderIconInTitle,mY as showFileName,mR as splitWrapSchema,mB as storePopupContext,mN as subTableActionInitializers,mE as subTableActionInitializers_deprecated,m$ as systemKeys,mz as tabPaneInitializers,mO as tabPaneInitializersForBulkEditFormBlock,mq as tabPaneInitializersForRecordBlock,mH as tabPaneInitializers_deprecated,mV as tableActionColumnInitializers,mU as tableActionColumnInitializers_deprecated,mG as tableActionInitializers,mK as tableActionInitializers_deprecated,mW as tableBlockSettings,mJ as tableColumnInitializers,mX as tableColumnInitializers_deprecated,mZ as tableColumnSettings,mQ as tableSelectorBlockSettings,m0 as timeProps,m1 as titleField,m2 as toToolsMap,m5 as transformFilter,m4 as transformToFilter,m7 as transformVariableValue,m6 as tval,m9 as type,m8 as unique,m3 as updateFilterTargets,he as updateFormActionInitializers,ht as updateFormActionInitializers_deprecated,ho as useACLActionParamsContext,hl as useACLContext,hn as useACLFieldWhitelist,ha as useACLRoleContext,hr as useACLRolesCheck,hi as useAPIClient,hs as useAPITokenVariable,hd as useAclSnippets,hu as useActionAvailable,hc as useActionBarContext,hp as useActionContext,hm as useAdminSchemaUid,hh as useAfterSuccessOptions,hx as useAllAccessDesktopRoutes,hv as useAllCollectionsInheritChainGetter,h_ as useAllDataBlocks,hf as useApp,hg as useAppLangContext,hb as useAppSpin,hy as useAriaAttributeOfMenuItem,hS as useAssociatedFields,hk as useAssociatedFormItemInitializerFields,hC as useAssociatedTableColumnInitializerFields,hM as useAssociationCreateActionProps,hw as useAssociationFieldContext,hF as useAssociationFieldModeContext,hP as useAssociationFilterBlockProps,hj as useAssociationFilterProps,hA as useAssociationName,hI as useAssociationNames,hT as useAsyncData,hD as useAttach,hL as useBackButton,hY as useBaseVariable,hR as useBlockAssociationContext,hB as useBlockConfigs,hN as useBlockContext,hE as useBlockHeight,h$ as useBlockHeightProps,hz as useBlockRequestContext,hO as useBlockResource,hq as useBlockTemplateContext,hH as useBuiltinVariables,hV as useBulkDestroyAction,hU as useBulkDestroyActionAndRefreshCM,hG as useBulkDestroyActionProps,hK as useCancelAction,hW as useCloseAction,hJ as useCollectValuesToSubmit,hX as useCollection,hZ as useCollectionDataSource,hQ as useCollectionDataSourceItems,h0 as useCollectionField,h1 as useCollectionFieldFormValues,h2 as useCollectionField_deprecated,h5 as useCollectionFields,h4 as useCollectionFieldsOptions,h7 as useCollectionFilterOptions,h6 as useCollectionHistory,h9 as useCollectionManager,h8 as useCollectionManager_deprecated,h3 as useCollectionParentRecord,xe as useCollectionParentRecordData,xt as useCollectionRecord,xo as useCollectionRecordData,xl as useCollectionState,xn as useCollection_deprecated,xa as useCollections,xr as useColumnSchema,xi as useColumnSettings,xs as useCompatOldVariables,xd as useCompile,xu as useComponent,xc as useContextAssociationFields,xp as useContextVariable,xm as useCreateActionProps,xh as useCreateAssociationDetailsBlock,xx as useCreateAssociationDetailsWithoutPagination,xv as useCreateAssociationFormBlock,x_ as useCreateAssociationGridCardBlock,xf as useCreateAssociationListBlock,xg as useCreateAssociationTableBlock,xb as useCreateEditFormBlock,xy as useCreateFormBlock,xS as useCreateTableBlock,xk as useCurrentAppInfo,xC as useCurrentDocumentTitle,xM as useCurrentPageUid,xw as useCurrentPopupContext,xF as useCurrentPopupRecord,xP as useCurrentRoleMode,xj as useCurrentRoleVariable,xA as useCurrentRoles,xI as useCurrentRoute,xT as useCurrentSchema,xD as useCurrentSearchParams,xL as useCurrentTabUid,xY as useCurrentUserContext,xR as useCurrentUserSettingsMenu,xB as useCurrentUserVariable,xN as useCustomizeBulkUpdateActionProps,xE as useCustomizeRequestActionProps,x$ as useCustomizeUpdateActionProps,xz as useDataBlock,xO as useDataBlockHeight,xq as useDataBlockParentRecord,xH as useDataBlockProps,xV as useDataBlockRequest,xU as useDataBlockRequestData,xG as useDataBlockRequestGetter,xK as useDataBlockResource,xW as useDataLoadingMode,xJ as useDataSource,xX as useDataSourceFromRAC,xZ as useDataSourceHeaders,xQ as useDataSourceKey,x0 as useDataSourceManager,x1 as useDataTemplates,x2 as useDatePickerContext,x5 as useDateVariable,x4 as useDatetimeVariable,x7 as useDatetimeVariableContext,x6 as useDeleteRouteSchema,x9 as useDesignable,x8 as useDesigner,x3 as useDestroyAction,ve as useDestroyActionAndRefreshCM,vt as useDestroyActionProps,vo as useDetailsBlockContext,vl as useDetailsBlockProps,vn as useDetailsDecoratorProps,va as useDetailsPaginationProps,vr as useDetailsParentRecord,vi as useDetailsProps,vs as useDetailsWithPaginationBlockParams,vd as useDetailsWithPaginationDecoratorProps,vu as useDetailsWithPaginationProps,vc as useDisassociateActionProps,vp as useDocumentTitle,vm as useDownloadLogs,vh as useEditTableActionProps,vx as useEnsureOperatorsValid,vv as useExactDateVariable,v_ as useExactDateVariableContext,vf as useExtendCollections,vg as useFieldComponentName,vb as useFieldComponentOptions,vy as useFieldInterfaceOptions,vS as useFieldMode,vk as useFieldModeOptions,vC as useFieldNames,vM as useFieldProps,vw as useFieldTitle,vF as useFilterAPI,vP as useFilterActionProps,vj as useFilterBlock,vA as useFilterBlockActionProps,vI as useFilterByTk,vT as useFilterFieldOptions,vD as useFilterFieldProps,vL as useFilterOptions,vY as useFindComponent,vR as useFlag,vB as useFormActiveFields,vN as useFormBlockContext,vE as useFormBlockProps,v$ as useFormBlockType,vz as useFormDataTemplates,vO as useFormFieldContext,vq as useFormFieldProps,vH as useFormItemInitializerFields,vV as useGetAriaLabelOfAction,vU as useGetAriaLabelOfDesigner,vG as useGetAriaLabelOfDrawer,vK as useGetAriaLabelOfModal,vW as useGetAriaLabelOfPopover,vJ as useGetFilterFieldOptions,vX as useGetFilterOptions,vZ as useGetSchemaInitializerMenuItems,vQ as useGlobalTheme,v0 as useGlobalVariable,v1 as useGlobalVariableCtx,v2 as useGridContext,v5 as useGridRowContext,v4 as useHistoryCollectionsByNames,v7 as useInheritsTableColumnInitializerFields,v6 as useInsertPageSchema,v9 as useIsAddNewForm,v8 as useIsAdminPage,v3 as useIsAllowToSetDefaultValue,_e as useIsAssociationField,_t as useIsDetailBlock,_o as useIsFieldReadPretty,_l as useIsFileField,_n as useIsFormReadPretty,_a as useIsInSettingsPage,_r as useIsLoggedIn,_i as useIsSameOrChildCollection,_s as useIsSelectFieldMode,_d as useIsSubPageClosedByPageMenu,_u as useKeepAlive,_c as useKeepAliveLocationSearch,_p as useLabelUiSchema,_m as useLazy,_h as useLinkActionProps,_x as useLinkageAction,_v as useLinkageCollectionFilterOptions,__ as useListBlockContext,_f as useLocalVariables,_g as useLocalVariablesWithoutCustomVariable,_b as useLocationNoUpdate,_y as useLocationSearch,_S as useMenuDragEnd,_k as useMenuSearch,_C as useMenuTranslation,_M as useMobileLayout,_w as useNavigateNoUpdate,_F as useNocoBaseRoutes,_P as useOpenModeContext,_j as useOptionalFieldList,_A as useParamsFromRecord,_I as useParentCollection,_T as useParentRecordCommon,_D as useParentRoute,_L as useParseDataScopeFilter,_Y as useParseURLAndParams,_R as useParsedFilter,_B as usePickActionProps,_N as usePlugin,_E as usePopupSettings,_$ as usePopupUtils,_z as usePopupVariable,_O as usePopupVariableContext,_q as useProps,_H as useRecord,_V as useRecordCollectionDataSourceItems,_U as useRecordIndex,_G as useRecordIsOwn,_K as useRecordPkValue,_W as useRefreshActionProps,_J as useRefreshFieldSchema,_X as useRemoteCollectionManagerLoading,_Z as useRemoveActionProps,_Q as useRemoveGridFormItem,_0 as useRequest,_1 as useRerenderDataBlock,_2 as useResetBlockActionProps,_5 as useResource,_4 as useResourceActionContext,_7 as useResourceContext,_6 as useRoleRecheck,_9 as useRoleVariable,_8 as useRolesResourcesScopesSelectedRowKeys,_3 as useRouter,fe as useRouterBasename,ft as useSchemaComponentContext,fo as useSchemaInitializer,fl as useSchemaInitializerItem,fn as useSchemaInitializerMenuItems,fa as useSchemaInitializerRender,fr as useSchemaInitializerStyles,fi as useSchemaInitializerSubMenuContext,fs as useSchemaOptionsContext,fd as useSchemaSettings,fu as useSchemaSettingsItem,fc as useSchemaSettingsRender,fp as useSchemaTemplate,fm as useSchemaTemplateManager,fh as useSchemaToolbar,fx as useSchemaToolbarRender,fv as useSortFields,f_ as useSourceId,ff as useSourceIdFromParentRecord,fg as useSourceIdFromRecord,fb as useStyles,fy as useSupportedBlocks,fS as useSyncFromForm,fk as useSystemSettings,fC as useSystemSettingsVariable,fM as useTableBlockContext,fw as useTableBlockContextBasicValue,fF as useTableBlockDecoratorProps,fP as useTableBlockParams,fj as useTableBlockProps,fA as useTableColumnInitializerFields,fI as useTableColumnIntegration,fT as useTableColumns,fD as useTableFieldContext,fL as useTableFieldProps,fY as useTableSelectorContext,fR as useTableSelectorProps,fB as useTableSize,fN as useTabsContext,fE as useTemplateBlockContext,f$ as useTitleFieldOptions,fz as useToken,fO as useUIConfigurationPermissions,fq as useURLAndHTMLSchema,fH as useURLSearchParamsCtx,fV as useURLSearchParamsVariable,fU as useUpdateActionProps,fG as useUpdateCollectionActionAndRefreshCM,fK as useUploadStyles,fW as useUserVariable,fJ as useValidateSchema,fX as useValuesFromRecord,fZ as useVariableOptions,fQ as useVariableScope,f0 as useVariableScopeInfo,f1 as useVariables,f2 as useViewport,f5 as useZIndexContext,f4 as withDynamicSchemaProps,f7 as withInitializer,f6 as withSearchParams,f9 as withSkeletonComponent,f8 as zIndexContext};