@nocobase/plugin-mobile-client 1.0.0-alpha.9 → 1.0.1-alpha.2

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.
@@ -8,11 +8,11 @@
8
8
  */
9
9
 
10
10
  (function(){"use strict";try{if(typeof document!="undefined"){var a=document.createElement("style");a.id="@nocobase/plugin-mobile-client",a.appendChild(document.createTextNode(':root{--adm-radius-s: 4px;--adm-radius-m: 8px;--adm-radius-l: 12px;--adm-font-size-1: 9px;--adm-font-size-2: 10px;--adm-font-size-3: 11px;--adm-font-size-4: 12px;--adm-font-size-5: 13px;--adm-font-size-6: 14px;--adm-font-size-7: 15px;--adm-font-size-8: 16px;--adm-font-size-9: 17px;--adm-font-size-10: 18px;--adm-color-primary: #1677ff;--adm-color-success: #00b578;--adm-color-warning: #ff8f1f;--adm-color-danger: #ff3141;--adm-color-yellow: #ff9f18;--adm-color-orange: #ff6430;--adm-color-wathet: #e7f1ff;--adm-color-text: #333333;--adm-color-text-secondary: #666666;--adm-color-weak: #999999;--adm-color-light: #cccccc;--adm-color-border: #eeeeee;--adm-color-background: #ffffff;--adm-color-highlight: var(--adm-color-danger);--adm-color-white: #ffffff;--adm-color-box: #f5f5f5;--adm-color-text-light-solid: var(--adm-color-white);--adm-color-text-dark-solid: #000000;--adm-color-fill-content: var(--adm-color-box);--adm-font-size-main: var(--adm-font-size-5);--adm-font-family: -apple-system, blinkmacsystemfont, "Helvetica Neue", helvetica, segoe ui, arial, roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--adm-border-color: var(--adm-color-border)}html[data-prefers-color-scheme=dark]{--adm-color-primary: #3086ff;--adm-color-success: #34b368;--adm-color-warning: #ffa930;--adm-color-danger: #ff4a58;--adm-color-yellow: #ffa930;--adm-color-orange: #e65a2b;--adm-color-wathet: #0d2543;--adm-color-text: #e6e6e6;--adm-color-text-secondary: #b3b3b3;--adm-color-weak: #808080;--adm-color-light: #4d4d4d;--adm-color-border: #2b2b2b;--adm-color-box: #0a0a0a;--adm-color-background: #1a1a1a;--adm-color-background-body: var(--adm-color-background);--adm-border-color: var(--adm-color-border)}:root{-webkit-tap-highlight-color:rgba(0,0,0,0)}html{background-color:var(--adm-color-background-body)}body{color:var(--adm-color-text);font-size:var(--adm-font-size-main);font-family:var(--adm-font-family)}a,button{cursor:pointer}a{color:var(--adm-color-primary);transition:opacity ease-in-out .2s}a:active{opacity:.8}.adm-plain-anchor{color:unset;transition:none}.adm-plain-anchor:active{opacity:unset}body.adm-overflow-hidden{overflow:hidden!important}div.adm-px-tester{--size: 1;height:calc(var(--size) / 2 * 2px);width:0;position:fixed;right:-100vw;bottom:-100vh;-webkit-user-select:none;user-select:none;pointer-events:none}.adm-safe-area{--multiple: var(--adm-safe-area-multiple, 1);display:block;width:100%}.adm-safe-area-position-top{padding-top:calc(env(safe-area-inset-top) * var(--multiple))}.adm-safe-area-position-bottom{padding-bottom:calc(env(safe-area-inset-bottom) * var(--multiple))}.adm-badge-wrapper{display:inline-block;position:relative}.adm-badge{display:inline-flex;vertical-align:middle;box-sizing:content-box;border-radius:100px;background-color:var(--color);--right: 0;--top: 0;--color: var(--adm-badge-color, var(--adm-color-highlight))}.adm-badge-content{color:var(--adm-color-text-light-solid);box-sizing:border-box;min-width:8px;padding:1px 4px;font-size:var(--adm-font-size-1);line-height:12px;white-space:nowrap;font-weight:400;text-align:center}.adm-badge-fixed{position:absolute;right:var(--right);top:var(--top);transform:translate(50%,-50%)}.adm-badge-dot{min-width:10px;width:10px;height:10px;border-radius:5px}.adm-badge-bordered{border:solid 1px var(--adm-color-text-light-solid)}.adm-list{--header-font-size: var(--adm-font-size-7);--prefix-width: "auto";--prefix-padding-right: 12px;--align-items: center;--active-background-color: var(--adm-color-border);--border-inner: solid 1px var(--adm-color-border);--border-top: solid 1px var(--adm-color-border);--border-bottom: solid 1px var(--adm-color-border);--padding-left: 12px;--padding-right: 12px;--font-size: var(--adm-font-size-9);--extra-max-width: 70%}.adm-list-header{color:var(--adm-color-weak);font-size:var(--header-font-size);padding:8px var(--padding-right) 8px var(--padding-left)}.adm-list-body{background-color:var(--adm-color-background);overflow:hidden;font-size:var(--font-size)}.adm-list-body-inner{margin-top:-1px}.adm-list-default .adm-list-body{border-top:var(--border-top);border-bottom:var(--border-bottom)}.adm-list-card{margin:12px}.adm-list-card .adm-list-body{border-radius:8px}.adm-list-card .adm-list-header{padding-left:0}.adm-list-item{display:block;padding-left:var(--padding-left);position:relative;background-color:var(--adm-color-background);line-height:1.5}.adm-list-item-title,.adm-list-item-description{color:var(--adm-color-weak);font-size:var(--adm-font-size-main)}.adm-list-item-content{display:flex;align-items:var(--align-items);justify-content:flex-start;border-top:var(--border-inner);padding-right:var(--padding-right)}.adm-list-item-content-prefix{width:var(--prefix-width);flex:none;padding-right:var(--prefix-padding-right)}.adm-list-item-content-main{flex:auto;padding:12px 0}.adm-list-item-content-extra{flex:none;padding-left:12px;font-size:var(--adm-font-size-7);color:var(--adm-color-weak);max-width:var(--extra-max-width)}.adm-list-item-content-arrow{flex:none;display:flex;align-items:center;margin-left:4px;color:var(--adm-color-light);font-size:19px}.adm-list-item-disabled{cursor:not-allowed}.adm-list-item-disabled.adm-list-item-disabled>.adm-list-item-content>*{opacity:.4;pointer-events:none}a.adm-list-item:active:not(.adm-list-item-disabled){background-color:var(--active-background-color)}a.adm-list-item:active:not(.adm-list-item-disabled):after{content:" ";display:block;position:absolute;width:100%;bottom:-1px;left:0;border-bottom:var(--border-inner)}.adm-nav-bar{--height: 45px;--border-bottom: none;display:flex;align-items:center;height:var(--height);border-bottom:var(--border-bottom);padding:0 12px;white-space:nowrap}.adm-nav-bar-left,.adm-nav-bar-right{flex:1}.adm-nav-bar-title{flex:auto;text-align:center;overflow:hidden;text-overflow:ellipsis}.adm-nav-bar-back{display:flex;align-items:center;margin-right:16px;padding:6px 0;cursor:pointer}.adm-nav-bar-back-arrow{font-size:24px;margin-right:4px}.adm-nav-bar-left{font-size:var(--adm-font-size-7);display:flex;justify-content:flex-start;align-items:center}.adm-nav-bar-title{justify-content:center;white-space:nowrap;font-size:var(--adm-font-size-10);padding:0 12px}.adm-nav-bar-right{text-align:right}.adm-tab-bar-wrap{display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:stretch;overflow:hidden;min-height:48px}.adm-tab-bar-item{flex:1;color:var(--adm-color-text-secondary);white-space:nowrap;padding:4px 8px;width:-webkit-min-content;width:min-content;position:relative;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-direction:column}.adm-tab-bar-item-icon{font-size:24px;height:24px;line-height:1}.adm-tab-bar-item-title{font-size:var(--adm-font-size-2);line-height:15px}.adm-tab-bar-item-title-with-icon{margin-top:2px}.adm-tab-bar-item-active{color:var(--adm-color-primary)}.adm-tab-bar-icon-badge{--top: 6px}.adm-tab-bar-title-badge{--right: -2px;--top: -2px}')),document.head.appendChild(a)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
11
- (function(m,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("react/jsx-runtime"),require("@nocobase/client"),require("react-router-dom"),require("react"),require("react-i18next"),require("@ant-design/icons"),require("@formily/react"),require("antd"),require("lodash"),require("ahooks"),require("@formily/shared"),require("@formily/antd-v5")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@nocobase/client","react-router-dom","react","react-i18next","@ant-design/icons","@formily/react","antd","lodash","ahooks","@formily/shared","@formily/antd-v5"],o):(m=typeof globalThis!="undefined"?globalThis:m||self,o(m["@nocobase/plugin-mobile-client"]={},m.jsxRuntime,m["@nocobase/client"],m["react-router-dom"],m.react,m["react-i18next"],m["@ant-design/icons"],m["@formily/react"],m.antd,m.lodash,m.ahooks,m["@formily/shared"],m["@formily/antd-v5"]))})(this,function(m,o,r,v,l,le,B,b,S,q,de,pe,Tt){"use strict";var gi=Object.defineProperty,bi=Object.defineProperties;var hi=Object.getOwnPropertyDescriptors;var wt=Object.getOwnPropertySymbols;var vi=Object.prototype.hasOwnProperty,yi=Object.prototype.propertyIsEnumerable;var Ee=(m,o,r)=>o in m?gi(m,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):m[o]=r,x=(m,o)=>{for(var r in o||(o={}))vi.call(o,r)&&Ee(m,r,o[r]);if(wt)for(var r of wt(o))yi.call(o,r)&&Ee(m,r,o[r]);return m},k=(m,o)=>bi(m,hi(o));var Pt=(m,o,r)=>(Ee(m,typeof o!="symbol"?o+"":o,r),r);var F=(m,o,r)=>new Promise((v,l)=>{var le=S=>{try{b(r.next(S))}catch(q){l(q)}},B=S=>{try{b(r.throw(S))}catch(q){l(q)}},b=S=>S.done?v(S.value):Promise.resolve(S.value).then(le,B);b((r=r.apply(m,o)).next())});function Mt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=Mt(l),ke=()=>window.JsBridge,Ot=(e,t)=>ke().invoke(e,t),Et=()=>!!ke(),Be={onBackPressed:()=>{history.length===1?Ot({action:"moveTaskToBack"}):history.back()}};Object.keys(Be).forEach(e=>{window[e]=Be[e]});const Ne=l.memo(e=>{const t=v.useLocation(),n=v.useNavigate();return l.useEffect(()=>{Et()&&t.pathname==="/admin"&&n("/mobile",{replace:!0})},[t.pathname,n]),o.jsx(o.Fragment,{children:e.children})});Ne.displayName="MobileClientProvider";const N="mobile-client";function j(e){return`{{t('${e}', { ns: '${N}', nsMode: 'fallback' })}}`}function w(){return le.useTranslation([N,"client"],{nsMode:"fallback"})}const je={name:"mobilePage:addBlock",title:'{{t("Add block")}}',icon:"PlusOutlined",wrap:r.gridRowColWrap,items:[{name:"dataBlocks",type:"itemGroup",title:'{{t("Data blocks")}}',children:[{name:"gridCard",type:"item",title:'{{t("Grid Card")}}',Component:"GridCardBlockInitializer"},{name:"table",title:'{{t("Table")}}',Component:"TableBlockInitializer"},{name:"form",title:'{{t("Form")}}',Component:"FormBlockInitializer"},{name:"details",title:'{{t("Details")}}',Component:"DetailsBlockInitializer"},{name:"calendar",title:'{{t("Calendar")}}',Component:"CalendarBlockInitializer"},{name:"mapBlock",title:j("Map"),Component:"MapBlockInitializer"},{name:"charts",title:'{{t("Charts")}}',Component:"ChartV2BlockInitializer"}]},{name:"otherBlocks",type:"itemGroup",title:'{{t("Other blocks")}}',children:[{name:"menu",title:j("Menu"),Component:"MMenuBlockInitializer"},{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"},{name:"settings",title:j("Settings"),Component:"MSettingsBlockInitializer"}]}]},Ae=new r.CompatibleSchemaInitializer(k(x({},je),{name:"MBlockInitializers"})),kt=new r.CompatibleSchemaInitializer(je,Ae),Bt=()=>{const e=r.useSchemaInitializerItem(),{insert:t}=r.useSchemaInitializer();return o.jsx(r.SchemaInitializerItem,x({icon:o.jsx(B.MenuOutlined,{}),onClick:()=>F(this,null,function*(){t({type:"void","x-component":"MMenu","x-designer":"MMenu.Designer","x-component-props":{}})})},e))};!!(typeof window!="undefined"&&typeof document!="undefined"&&window.document&&window.document.createElement)&&document.addEventListener("touchstart",()=>{},!0);function ue(e,t){const n=e;for(const a in t)t.hasOwnProperty(a)&&(n[a]=t[a]);return n}var J=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fe={exports:{}};/*!
11
+ (function(m,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("react/jsx-runtime"),require("@nocobase/client"),require("react-router-dom"),require("react"),require("react-i18next"),require("@ant-design/icons"),require("@formily/react"),require("antd"),require("lodash"),require("ahooks"),require("@formily/shared"),require("@formily/antd-v5")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@nocobase/client","react-router-dom","react","react-i18next","@ant-design/icons","@formily/react","antd","lodash","ahooks","@formily/shared","@formily/antd-v5"],o):(m=typeof globalThis!="undefined"?globalThis:m||self,o(m["@nocobase/plugin-mobile-client"]={},m.jsxRuntime,m["@nocobase/client"],m["react-router-dom"],m.react,m["react-i18next"],m["@ant-design/icons"],m["@formily/react"],m.antd,m.lodash,m.ahooks,m["@formily/shared"],m["@formily/antd-v5"]))})(this,function(m,o,r,v,l,le,B,b,S,q,de,pe,Tt){"use strict";var gi=Object.defineProperty,bi=Object.defineProperties;var hi=Object.getOwnPropertyDescriptors;var Pt=Object.getOwnPropertySymbols;var vi=Object.prototype.hasOwnProperty,yi=Object.prototype.propertyIsEnumerable;var Ee=(m,o,r)=>o in m?gi(m,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):m[o]=r,x=(m,o)=>{for(var r in o||(o={}))vi.call(o,r)&&Ee(m,r,o[r]);if(Pt)for(var r of Pt(o))yi.call(o,r)&&Ee(m,r,o[r]);return m},k=(m,o)=>bi(m,hi(o));var wt=(m,o,r)=>(Ee(m,typeof o!="symbol"?o+"":o,r),r);var F=(m,o,r)=>new Promise((v,l)=>{var le=S=>{try{b(r.next(S))}catch(q){l(q)}},B=S=>{try{b(r.throw(S))}catch(q){l(q)}},b=S=>S.done?v(S.value):Promise.resolve(S.value).then(le,B);b((r=r.apply(m,o)).next())});function Mt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=Mt(l),ke=()=>window.JsBridge,Ot=(e,t)=>ke().invoke(e,t),Et=()=>!!ke(),Be={onBackPressed:()=>{history.length===1?Ot({action:"moveTaskToBack"}):history.back()}};Object.keys(Be).forEach(e=>{window[e]=Be[e]});const Ne=l.memo(e=>{const t=v.useLocation(),n=v.useNavigate();return l.useEffect(()=>{Et()&&t.pathname==="/admin"&&n("/mobile",{replace:!0})},[t.pathname,n]),o.jsx(o.Fragment,{children:e.children})});Ne.displayName="MobileClientProvider";const N="mobile-client";function A(e){return`{{t('${e}', { ns: '${N}', nsMode: 'fallback' })}}`}function P(){return le.useTranslation([N,"client"],{nsMode:"fallback"})}const Ae={name:"mobilePage:addBlock",title:'{{t("Add block")}}',icon:"PlusOutlined",wrap:r.gridRowColWrap,items:[{name:"dataBlocks",type:"itemGroup",title:'{{t("Data blocks")}}',children:[{name:"gridCard",type:"item",title:'{{t("Grid Card")}}',Component:"GridCardBlockInitializer"},{name:"table",title:'{{t("Table")}}',Component:"TableBlockInitializer"},{name:"form",title:'{{t("Form")}}',Component:"FormBlockInitializer"},{name:"details",title:'{{t("Details")}}',Component:"DetailsBlockInitializer"},{name:"calendar",title:'{{t("Calendar")}}',Component:"CalendarBlockInitializer"},{name:"mapBlock",title:A("Map"),Component:"MapBlockInitializer"},{name:"charts",title:'{{t("Charts")}}',Component:"ChartV2BlockInitializer"}]},{name:"otherBlocks",type:"itemGroup",title:'{{t("Other blocks")}}',children:[{name:"menu",title:A("Menu"),Component:"MMenuBlockInitializer"},{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"},{name:"settings",title:A("Settings"),Component:"MSettingsBlockInitializer"}]}]},je=new r.CompatibleSchemaInitializer(k(x({},Ae),{name:"MBlockInitializers"})),kt=new r.CompatibleSchemaInitializer(Ae,je),Bt=()=>{const e=r.useSchemaInitializerItem(),{insert:t}=r.useSchemaInitializer();return o.jsx(r.SchemaInitializerItem,x({icon:o.jsx(B.MenuOutlined,{}),onClick:()=>F(this,null,function*(){t({type:"void","x-component":"MMenu","x-designer":"MMenu.Designer","x-component-props":{}})})},e))};!!(typeof window!="undefined"&&typeof document!="undefined"&&window.document&&window.document.createElement)&&document.addEventListener("touchstart",()=>{},!0);function ue(e,t){const n=e;for(const a in t)t.hasOwnProperty(a)&&(n[a]=t[a]);return n}var J=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fe={exports:{}};/*!
12
12
  Copyright (c) 2018 Jed Watson.
13
13
  Licensed under the MIT License (MIT), see
14
14
  http://jedwatson.github.io/classnames
15
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var d=typeof c;if(d==="string"||d==="number")a.push(c);else if(Array.isArray(c)){if(c.length){var s=n.apply(null,c);s&&a.push(s)}}else if(d==="object"){if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]")){a.push(c.toString());continue}for(var u in c)t.call(c,u)&&c[u]&&a.push(u)}}}return a.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Fe);var Nt=Fe.exports;const M=_e(Nt);function D(e,t){const n=Object.assign({},t.props);e.className&&(n.className=M(t.props.className,e.className)),e.style&&(n.style=Object.assign(Object.assign({},n.style),e.style)),e.tabIndex!==void 0&&(n.tabIndex=e.tabIndex);for(const a in e)e.hasOwnProperty(a)&&(a.startsWith("data-")||a.startsWith("aria-"))&&(n[a]=e[a]);return l.cloneElement(t,n)}var jt=typeof J=="object"&&J&&J.Object===Object&&J,De=jt,At=De,_t=typeof self=="object"&&self&&self.Object===Object&&self,Ft=At||_t||Function("return this")(),me=Ft,Dt=me,Lt=Dt.Symbol,Le=Lt,ze=Le,Ge=Object.prototype,zt=Ge.hasOwnProperty,Gt=Ge.toString,H=ze?ze.toStringTag:void 0;function Ut(e){var t=zt.call(e,H),n=e[H];try{e[H]=void 0;var a=!0}catch(c){}var i=Gt.call(e);return a&&(t?e[H]=n:delete e[H]),i}var qt=Ut,Ht=Object.prototype,Vt=Ht.toString;function Kt(e){return Vt.call(e)}var Wt=Kt,Ue=Le,Jt=qt,Xt=Wt,Zt="[object Null]",Qt="[object Undefined]",qe=Ue?Ue.toStringTag:void 0;function Yt(e){return e==null?e===void 0?Qt:Zt:qe&&qe in Object(e)?Jt(e):Xt(e)}var fe=Yt;function Rt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ge=Rt,en=fe,tn=ge,nn="[object AsyncFunction]",rn="[object Function]",on="[object GeneratorFunction]",an="[object Proxy]";function sn(e){if(!tn(e))return!1;var t=en(e);return t==rn||t==on||t==nn||t==an}var He=sn,cn=me,ln=cn["__core-js_shared__"],dn=ln,be=dn,Ve=function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pn(e){return!!Ve&&Ve in e}var un=pn,mn=Function.prototype,fn=mn.toString;function gn(e){if(e!=null){try{return fn.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var bn=gn,hn=He,vn=un,yn=ge,xn=bn,Sn=/[\\^$.*+?()[\]{}|]/g,$n=/^\[object .+?Constructor\]$/,Cn=Function.prototype,In=Object.prototype,wn=Cn.toString,Pn=In.hasOwnProperty,Tn=RegExp("^"+wn.call(Pn).replace(Sn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mn(e){if(!yn(e)||vn(e))return!1;var t=hn(e)?Tn:$n;return t.test(xn(e))}var On=Mn;function En(e,t){return e==null?void 0:e[t]}var kn=En,Bn=On,Nn=kn;function jn(e,t){var n=Nn(e,t);return Bn(n)?n:void 0}var An=jn,_n=An,Fn=function(){try{var e=_n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ke=Fn,We=Ke;function Dn(e,t,n){t=="__proto__"&&We?We(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Je=Dn;function Ln(e,t){return e===t||e!==e&&t!==t}var Xe=Ln,zn=Je,Gn=Xe,Un=Object.prototype,qn=Un.hasOwnProperty;function Hn(e,t,n){var a=e[t];(!(qn.call(e,t)&&Gn(a,n))||n===void 0&&!(t in e))&&zn(e,t,n)}var Vn=Hn,Kn=Vn,Wn=Je;function Jn(e,t,n,a){var i=!n;n||(n={});for(var c=-1,d=t.length;++c<d;){var s=t[c],u=a?a(n[s],e[s],s,n,e):void 0;u===void 0&&(u=e[s]),i?Wn(n,s,u):Kn(n,s,u)}return n}var Xn=Jn;function Zn(e){return e}var Ze=Zn;function Qn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Yn=Qn,Rn=Yn,Qe=Math.max;function er(e,t,n){return t=Qe(t===void 0?e.length-1:t,0),function(){for(var a=arguments,i=-1,c=Qe(a.length-t,0),d=Array(c);++i<c;)d[i]=a[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=a[i];return s[t]=n(d),Rn(e,this,s)}}var tr=er;function nr(e){return function(){return e}}var rr=nr,or=rr,Ye=Ke,ar=Ze,ir=Ye?function(e,t){return Ye(e,"toString",{configurable:!0,enumerable:!1,value:or(t),writable:!0})}:ar,sr=ir,cr=800,lr=16,dr=Date.now;function pr(e){var t=0,n=0;return function(){var a=dr(),i=lr-(a-n);if(n=a,i>0){if(++t>=cr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ur=pr,mr=sr,fr=ur,gr=fr(mr),br=gr,hr=Ze,vr=tr,yr=br;function xr(e,t){return yr(vr(e,t,hr),e+"")}var Sr=xr,$r=9007199254740991;function Cr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$r}var Re=Cr,Ir=He,wr=Re;function Pr(e){return e!=null&&wr(e.length)&&!Ir(e)}var et=Pr,Tr=9007199254740991,Mr=/^(?:0|[1-9]\d*)$/;function Or(e,t){var n=typeof e;return t=t==null?Tr:t,!!t&&(n=="number"||n!="symbol"&&Mr.test(e))&&e>-1&&e%1==0&&e<t}var tt=Or,Er=Xe,kr=et,Br=tt,Nr=ge;function jr(e,t,n){if(!Nr(n))return!1;var a=typeof t;return(a=="number"?kr(n)&&Br(t,n.length):a=="string"&&t in n)?Er(n[t],e):!1}var Ar=jr,_r=Sr,Fr=Ar;function Dr(e){return _r(function(t,n){var a=-1,i=n.length,c=i>1?n[i-1]:void 0,d=i>2?n[2]:void 0;for(c=e.length>3&&typeof c=="function"?(i--,c):void 0,d&&Fr(n[0],n[1],d)&&(c=i<3?void 0:c,i=1),t=Object(t);++a<i;){var s=n[a];s&&e(t,s,a,c)}return t})}var Lr=Dr;function zr(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}var Gr=zr;function Ur(e){return e!=null&&typeof e=="object"}var he=Ur,qr=fe,Hr=he,Vr="[object Arguments]";function Kr(e){return Hr(e)&&qr(e)==Vr}var Wr=Kr,nt=Wr,Jr=he,rt=Object.prototype,Xr=rt.hasOwnProperty,Zr=rt.propertyIsEnumerable,Qr=nt(function(){return arguments}())?nt:function(e){return Jr(e)&&Xr.call(e,"callee")&&!Zr.call(e,"callee")},Yr=Qr,Rr=Array.isArray,eo=Rr,X={exports:{}};function to(){return!1}var no=to;X.exports,function(e,t){var n=me,a=no,i=t&&!t.nodeType&&t,c=i&&!0&&e&&!e.nodeType&&e,d=c&&c.exports===i,s=d?n.Buffer:void 0,u=s?s.isBuffer:void 0,p=u||a;e.exports=p}(X,X.exports);var ro=X.exports,oo=fe,ao=Re,io=he,so="[object Arguments]",co="[object Array]",lo="[object Boolean]",po="[object Date]",uo="[object Error]",mo="[object Function]",fo="[object Map]",go="[object Number]",bo="[object Object]",ho="[object RegExp]",vo="[object Set]",yo="[object String]",xo="[object WeakMap]",So="[object ArrayBuffer]",$o="[object DataView]",Co="[object Float32Array]",Io="[object Float64Array]",wo="[object Int8Array]",Po="[object Int16Array]",To="[object Int32Array]",Mo="[object Uint8Array]",Oo="[object Uint8ClampedArray]",Eo="[object Uint16Array]",ko="[object Uint32Array]",h={};h[Co]=h[Io]=h[wo]=h[Po]=h[To]=h[Mo]=h[Oo]=h[Eo]=h[ko]=!0,h[so]=h[co]=h[So]=h[lo]=h[$o]=h[po]=h[uo]=h[mo]=h[fo]=h[go]=h[bo]=h[ho]=h[vo]=h[yo]=h[xo]=!1;function Bo(e){return io(e)&&ao(e.length)&&!!h[oo(e)]}var No=Bo;function jo(e){return function(t){return e(t)}}var Ao=jo,Z={exports:{}};Z.exports,function(e,t){var n=De,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===a,d=c&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||d&&d.binding&&d.binding("util")}catch(p){}}();e.exports=s}(Z,Z.exports);var _o=Z.exports,Fo=No,Do=Ao,ot=_o,at=ot&&ot.isTypedArray,Lo=at?Do(at):Fo,zo=Lo,Go=Gr,Uo=Yr,qo=eo,Ho=ro,Vo=tt,Ko=zo,Wo=Object.prototype,Jo=Wo.hasOwnProperty;function Xo(e,t){var n=qo(e),a=!n&&Uo(e),i=!n&&!a&&Ho(e),c=!n&&!a&&!i&&Ko(e),d=n||a||i||c,s=d?Go(e.length,String):[],u=s.length;for(var p in e)(t||Jo.call(e,p))&&!(d&&(p=="length"||i&&(p=="offset"||p=="parent")||c&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Vo(p,u)))&&s.push(p);return s}var Zo=Xo,Qo=Object.prototype;function Yo(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Qo;return e===n}var Ro=Yo;function ea(e,t){return function(n){return e(t(n))}}var ta=ea,na=ta,ra=na(Object.keys,Object),oa=ra,aa=Ro,ia=oa,sa=Object.prototype,ca=sa.hasOwnProperty;function la(e){if(!aa(e))return ia(e);var t=[];for(var n in Object(e))ca.call(e,n)&&n!="constructor"&&t.push(n);return t}var da=la,pa=Zo,ua=da,ma=et;function fa(e){return ma(e)?pa(e):ua(e)}var ga=fa,ba=Xn,ha=Lr,va=ga,ya=ha(function(e,t,n,a){ba(t,va(t),e,a)}),xa=ya;const Sa=_e(xa);function ve(...e){function t(a,i){return i===void 0?a:i}let n=Object.assign({},e[0]);for(let a=1;a<e.length;a++)n=Sa(n,e[a],t);return n}function $a(e){return T.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),T.createElement("g",{id:"LeftOutline-LeftOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"LeftOutline-编组"},T.createElement("rect",{id:"LeftOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.createElement("path",{d:"M31.7053818,5.11219264 L13.5234393,22.6612572 L13.5234393,22.6612572 C12.969699,23.2125856 12.9371261,24.0863155 13.4257204,24.6755735 L13.5234393,24.7825775 L31.7045714,42.8834676 C31.7795345,42.9580998 31.8810078,43 31.9867879,43 L35.1135102,43 C35.3344241,43 35.5135102,42.8209139 35.5135102,42.6 C35.5135102,42.4936115 35.4711279,42.391606 35.3957362,42.316542 L16.7799842,23.7816937 L16.7799842,23.7816937 L35.3764658,5.6866816 C35.5347957,5.53262122 35.5382568,5.27937888 35.3841964,5.121049 C35.3088921,5.04365775 35.205497,5 35.0975148,5 L31.9831711,5 C31.8795372,5 31.7799483,5.04022164 31.7053818,5.11219264 Z",id:"LeftOutline-路径",fill:"currentColor",fillRule:"nonzero"}))))}function Ca(e){return T.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),T.createElement("g",{id:"RightOutline-RightOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"RightOutline-RightOutlined"},T.createElement("rect",{id:"RightOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.createElement("path",{d:"M17.3947957,5.11219264 L35.5767382,22.6612572 L35.5767382,22.6612572 C36.1304785,23.2125856 36.1630514,24.0863155 35.6744571,24.6755735 L35.5767382,24.7825775 L17.3956061,42.8834676 C17.320643,42.9580998 17.2191697,43 17.1133896,43 L13.9866673,43 C13.7657534,43 13.5866673,42.8209139 13.5866673,42.6 C13.5866673,42.4936115 13.6290496,42.391606 13.7044413,42.316542 L32.3201933,23.7816937 L32.3201933,23.7816937 L13.7237117,5.6866816 C13.5653818,5.53262122 13.5619207,5.27937888 13.7159811,5.121049 C13.7912854,5.04365775 13.8946805,5 14.0026627,5 L17.1170064,5 C17.2206403,5 17.3202292,5.04022164 17.3947957,5.11219264 Z",id:"RightOutline-right",fill:"currentColor",fillRule:"nonzero"}))))}const it="adm-safe-area",Ia=e=>D(e,l.createElement("div",{className:M(it,`${it}-position-${e.position}`)})),z="adm-badge",st=l.createElement(l.Fragment,null),ct=ue(e=>{const{content:t,color:n,children:a}=e,i=t===st,c=M(z,{[`${z}-fixed`]:!!a,[`${z}-dot`]:i,[`${z}-bordered`]:e.bordered}),d=t||t===0?D(e,l.createElement("div",{className:c,style:{"--color":n}},!i&&l.createElement("div",{className:`${z}-content`},t))):null;return a?l.createElement("div",{className:M(`${z}-wrapper`,e.wrapperClassName),style:e.wrapperStyle},a,d):d},{dot:st});function wa(e){const{value:t,defaultValue:n,onChange:a}=e,i=de.useUpdate(),c=l.useRef(t!==void 0?t:n);t!==void 0&&(c.current=t);const d=de.useMemoizedFn((s,u=!1)=>{const p=typeof s=="function"?s(c.current):s;if(!(!u&&p===c.current))return c.current=p,i(),a==null?void 0:a(p)});return[c.current,d]}var lt={exports:{}},g={};/**
15
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var c="",d=0;d<arguments.length;d++){var s=arguments[d];s&&(c=i(c,a(s)))}return c}function a(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return n.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var d="";for(var s in c)t.call(c,s)&&c[s]&&(d=i(d,s));return d}function i(c,d){return d?c?c+" "+d:c+d:c}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Fe);var Nt=Fe.exports;const M=_e(Nt);function D(e,t){const n=Object.assign({},t.props);e.className&&(n.className=M(t.props.className,e.className)),e.style&&(n.style=Object.assign(Object.assign({},n.style),e.style)),e.tabIndex!==void 0&&(n.tabIndex=e.tabIndex);for(const a in e)e.hasOwnProperty(a)&&(a.startsWith("data-")||a.startsWith("aria-"))&&(n[a]=e[a]);return l.cloneElement(t,n)}var At=typeof J=="object"&&J&&J.Object===Object&&J,De=At,jt=De,_t=typeof self=="object"&&self&&self.Object===Object&&self,Ft=jt||_t||Function("return this")(),me=Ft,Dt=me,Lt=Dt.Symbol,Le=Lt,ze=Le,Ge=Object.prototype,zt=Ge.hasOwnProperty,Gt=Ge.toString,V=ze?ze.toStringTag:void 0;function Ut(e){var t=zt.call(e,V),n=e[V];try{e[V]=void 0;var a=!0}catch(c){}var i=Gt.call(e);return a&&(t?e[V]=n:delete e[V]),i}var qt=Ut,Vt=Object.prototype,Ht=Vt.toString;function Kt(e){return Ht.call(e)}var Wt=Kt,Ue=Le,Jt=qt,Xt=Wt,Zt="[object Null]",Qt="[object Undefined]",qe=Ue?Ue.toStringTag:void 0;function Yt(e){return e==null?e===void 0?Qt:Zt:qe&&qe in Object(e)?Jt(e):Xt(e)}var fe=Yt;function Rt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ge=Rt,en=fe,tn=ge,nn="[object AsyncFunction]",rn="[object Function]",on="[object GeneratorFunction]",an="[object Proxy]";function sn(e){if(!tn(e))return!1;var t=en(e);return t==rn||t==on||t==nn||t==an}var Ve=sn,cn=me,ln=cn["__core-js_shared__"],dn=ln,be=dn,He=function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pn(e){return!!He&&He in e}var un=pn,mn=Function.prototype,fn=mn.toString;function gn(e){if(e!=null){try{return fn.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var bn=gn,hn=Ve,vn=un,yn=ge,xn=bn,Sn=/[\\^$.*+?()[\]{}|]/g,$n=/^\[object .+?Constructor\]$/,Cn=Function.prototype,In=Object.prototype,Pn=Cn.toString,wn=In.hasOwnProperty,Tn=RegExp("^"+Pn.call(wn).replace(Sn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mn(e){if(!yn(e)||vn(e))return!1;var t=hn(e)?Tn:$n;return t.test(xn(e))}var On=Mn;function En(e,t){return e==null?void 0:e[t]}var kn=En,Bn=On,Nn=kn;function An(e,t){var n=Nn(e,t);return Bn(n)?n:void 0}var jn=An,_n=jn,Fn=function(){try{var e=_n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ke=Fn,We=Ke;function Dn(e,t,n){t=="__proto__"&&We?We(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Je=Dn;function Ln(e,t){return e===t||e!==e&&t!==t}var Xe=Ln,zn=Je,Gn=Xe,Un=Object.prototype,qn=Un.hasOwnProperty;function Vn(e,t,n){var a=e[t];(!(qn.call(e,t)&&Gn(a,n))||n===void 0&&!(t in e))&&zn(e,t,n)}var Hn=Vn,Kn=Hn,Wn=Je;function Jn(e,t,n,a){var i=!n;n||(n={});for(var c=-1,d=t.length;++c<d;){var s=t[c],u=a?a(n[s],e[s],s,n,e):void 0;u===void 0&&(u=e[s]),i?Wn(n,s,u):Kn(n,s,u)}return n}var Xn=Jn;function Zn(e){return e}var Ze=Zn;function Qn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Yn=Qn,Rn=Yn,Qe=Math.max;function er(e,t,n){return t=Qe(t===void 0?e.length-1:t,0),function(){for(var a=arguments,i=-1,c=Qe(a.length-t,0),d=Array(c);++i<c;)d[i]=a[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=a[i];return s[t]=n(d),Rn(e,this,s)}}var tr=er;function nr(e){return function(){return e}}var rr=nr,or=rr,Ye=Ke,ar=Ze,ir=Ye?function(e,t){return Ye(e,"toString",{configurable:!0,enumerable:!1,value:or(t),writable:!0})}:ar,sr=ir,cr=800,lr=16,dr=Date.now;function pr(e){var t=0,n=0;return function(){var a=dr(),i=lr-(a-n);if(n=a,i>0){if(++t>=cr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ur=pr,mr=sr,fr=ur,gr=fr(mr),br=gr,hr=Ze,vr=tr,yr=br;function xr(e,t){return yr(vr(e,t,hr),e+"")}var Sr=xr,$r=9007199254740991;function Cr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$r}var Re=Cr,Ir=Ve,Pr=Re;function wr(e){return e!=null&&Pr(e.length)&&!Ir(e)}var et=wr,Tr=9007199254740991,Mr=/^(?:0|[1-9]\d*)$/;function Or(e,t){var n=typeof e;return t=t==null?Tr:t,!!t&&(n=="number"||n!="symbol"&&Mr.test(e))&&e>-1&&e%1==0&&e<t}var tt=Or,Er=Xe,kr=et,Br=tt,Nr=ge;function Ar(e,t,n){if(!Nr(n))return!1;var a=typeof t;return(a=="number"?kr(n)&&Br(t,n.length):a=="string"&&t in n)?Er(n[t],e):!1}var jr=Ar,_r=Sr,Fr=jr;function Dr(e){return _r(function(t,n){var a=-1,i=n.length,c=i>1?n[i-1]:void 0,d=i>2?n[2]:void 0;for(c=e.length>3&&typeof c=="function"?(i--,c):void 0,d&&Fr(n[0],n[1],d)&&(c=i<3?void 0:c,i=1),t=Object(t);++a<i;){var s=n[a];s&&e(t,s,a,c)}return t})}var Lr=Dr;function zr(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}var Gr=zr;function Ur(e){return e!=null&&typeof e=="object"}var he=Ur,qr=fe,Vr=he,Hr="[object Arguments]";function Kr(e){return Vr(e)&&qr(e)==Hr}var Wr=Kr,nt=Wr,Jr=he,rt=Object.prototype,Xr=rt.hasOwnProperty,Zr=rt.propertyIsEnumerable,Qr=nt(function(){return arguments}())?nt:function(e){return Jr(e)&&Xr.call(e,"callee")&&!Zr.call(e,"callee")},Yr=Qr,Rr=Array.isArray,eo=Rr,X={exports:{}};function to(){return!1}var no=to;X.exports,function(e,t){var n=me,a=no,i=t&&!t.nodeType&&t,c=i&&!0&&e&&!e.nodeType&&e,d=c&&c.exports===i,s=d?n.Buffer:void 0,u=s?s.isBuffer:void 0,p=u||a;e.exports=p}(X,X.exports);var ro=X.exports,oo=fe,ao=Re,io=he,so="[object Arguments]",co="[object Array]",lo="[object Boolean]",po="[object Date]",uo="[object Error]",mo="[object Function]",fo="[object Map]",go="[object Number]",bo="[object Object]",ho="[object RegExp]",vo="[object Set]",yo="[object String]",xo="[object WeakMap]",So="[object ArrayBuffer]",$o="[object DataView]",Co="[object Float32Array]",Io="[object Float64Array]",Po="[object Int8Array]",wo="[object Int16Array]",To="[object Int32Array]",Mo="[object Uint8Array]",Oo="[object Uint8ClampedArray]",Eo="[object Uint16Array]",ko="[object Uint32Array]",h={};h[Co]=h[Io]=h[Po]=h[wo]=h[To]=h[Mo]=h[Oo]=h[Eo]=h[ko]=!0,h[so]=h[co]=h[So]=h[lo]=h[$o]=h[po]=h[uo]=h[mo]=h[fo]=h[go]=h[bo]=h[ho]=h[vo]=h[yo]=h[xo]=!1;function Bo(e){return io(e)&&ao(e.length)&&!!h[oo(e)]}var No=Bo;function Ao(e){return function(t){return e(t)}}var jo=Ao,Z={exports:{}};Z.exports,function(e,t){var n=De,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===a,d=c&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||d&&d.binding&&d.binding("util")}catch(p){}}();e.exports=s}(Z,Z.exports);var _o=Z.exports,Fo=No,Do=jo,ot=_o,at=ot&&ot.isTypedArray,Lo=at?Do(at):Fo,zo=Lo,Go=Gr,Uo=Yr,qo=eo,Vo=ro,Ho=tt,Ko=zo,Wo=Object.prototype,Jo=Wo.hasOwnProperty;function Xo(e,t){var n=qo(e),a=!n&&Uo(e),i=!n&&!a&&Vo(e),c=!n&&!a&&!i&&Ko(e),d=n||a||i||c,s=d?Go(e.length,String):[],u=s.length;for(var p in e)(t||Jo.call(e,p))&&!(d&&(p=="length"||i&&(p=="offset"||p=="parent")||c&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Ho(p,u)))&&s.push(p);return s}var Zo=Xo,Qo=Object.prototype;function Yo(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Qo;return e===n}var Ro=Yo;function ea(e,t){return function(n){return e(t(n))}}var ta=ea,na=ta,ra=na(Object.keys,Object),oa=ra,aa=Ro,ia=oa,sa=Object.prototype,ca=sa.hasOwnProperty;function la(e){if(!aa(e))return ia(e);var t=[];for(var n in Object(e))ca.call(e,n)&&n!="constructor"&&t.push(n);return t}var da=la,pa=Zo,ua=da,ma=et;function fa(e){return ma(e)?pa(e):ua(e)}var ga=fa,ba=Xn,ha=Lr,va=ga,ya=ha(function(e,t,n,a){ba(t,va(t),e,a)}),xa=ya;const Sa=_e(xa);function ve(...e){function t(a,i){return i===void 0?a:i}let n=Object.assign({},e[0]);for(let a=1;a<e.length;a++)n=Sa(n,e[a],t);return n}function $a(e){return T.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),T.createElement("g",{id:"LeftOutline-LeftOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"LeftOutline-编组"},T.createElement("rect",{id:"LeftOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.createElement("path",{d:"M31.7053818,5.11219264 L13.5234393,22.6612572 L13.5234393,22.6612572 C12.969699,23.2125856 12.9371261,24.0863155 13.4257204,24.6755735 L13.5234393,24.7825775 L31.7045714,42.8834676 C31.7795345,42.9580998 31.8810078,43 31.9867879,43 L35.1135102,43 C35.3344241,43 35.5135102,42.8209139 35.5135102,42.6 C35.5135102,42.4936115 35.4711279,42.391606 35.3957362,42.316542 L16.7799842,23.7816937 L16.7799842,23.7816937 L35.3764658,5.6866816 C35.5347957,5.53262122 35.5382568,5.27937888 35.3841964,5.121049 C35.3088921,5.04365775 35.205497,5 35.0975148,5 L31.9831711,5 C31.8795372,5 31.7799483,5.04022164 31.7053818,5.11219264 Z",id:"LeftOutline-路径",fill:"currentColor",fillRule:"nonzero"}))))}function Ca(e){return T.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),T.createElement("g",{id:"RightOutline-RightOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"RightOutline-RightOutlined"},T.createElement("rect",{id:"RightOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.createElement("path",{d:"M17.3947957,5.11219264 L35.5767382,22.6612572 L35.5767382,22.6612572 C36.1304785,23.2125856 36.1630514,24.0863155 35.6744571,24.6755735 L35.5767382,24.7825775 L17.3956061,42.8834676 C17.320643,42.9580998 17.2191697,43 17.1133896,43 L13.9866673,43 C13.7657534,43 13.5866673,42.8209139 13.5866673,42.6 C13.5866673,42.4936115 13.6290496,42.391606 13.7044413,42.316542 L32.3201933,23.7816937 L32.3201933,23.7816937 L13.7237117,5.6866816 C13.5653818,5.53262122 13.5619207,5.27937888 13.7159811,5.121049 C13.7912854,5.04365775 13.8946805,5 14.0026627,5 L17.1170064,5 C17.2206403,5 17.3202292,5.04022164 17.3947957,5.11219264 Z",id:"RightOutline-right",fill:"currentColor",fillRule:"nonzero"}))))}const it="adm-safe-area",Ia=e=>D(e,l.createElement("div",{className:M(it,`${it}-position-${e.position}`)})),z="adm-badge",st=l.createElement(l.Fragment,null),ct=ue(e=>{const{content:t,color:n,children:a}=e,i=t===st,c=M(z,{[`${z}-fixed`]:!!a,[`${z}-dot`]:i,[`${z}-bordered`]:e.bordered}),d=t||t===0?D(e,l.createElement("div",{className:c,style:{"--color":n}},!i&&l.createElement("div",{className:`${z}-content`},t))):null;return a?l.createElement("div",{className:M(`${z}-wrapper`,e.wrapperClassName),style:e.wrapperStyle},a,d):d},{dot:st});function Pa(e){const{value:t,defaultValue:n,onChange:a}=e,i=de.useUpdate(),c=l.useRef(t!==void 0?t:n);t!==void 0&&(c.current=t);const d=de.useMemoizedFn((s,u=!1)=>{const p=typeof s=="function"?s(c.current):s;if(!(!u&&p===c.current))return c.current=p,i(),a==null?void 0:a(p)});return[c.current,d]}var lt={exports:{}},g={};/**
16
16
  * @license React
17
17
  * react-is.production.min.js
18
18
  *
@@ -20,13 +20,13 @@
20
20
  *
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
- */var ye=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),te=Symbol.for("react.context"),Pa=Symbol.for("react.server_context"),ne=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),Ta=Symbol.for("react.offscreen"),dt;dt=Symbol.for("react.module.reference");function I(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ye:switch(e=e.type,e){case Q:case R:case Y:case re:case oe:return e;default:switch(e=e&&e.$$typeof,e){case Pa:case te:case ne:case ie:case ae:case ee:return e;default:return t}}case xe:return t}}}g.ContextConsumer=te,g.ContextProvider=ee,g.Element=ye,g.ForwardRef=ne,g.Fragment=Q,g.Lazy=ie,g.Memo=ae,g.Portal=xe,g.Profiler=R,g.StrictMode=Y,g.Suspense=re,g.SuspenseList=oe,g.isAsyncMode=function(){return!1},g.isConcurrentMode=function(){return!1},g.isContextConsumer=function(e){return I(e)===te},g.isContextProvider=function(e){return I(e)===ee},g.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ye},g.isForwardRef=function(e){return I(e)===ne},g.isFragment=function(e){return I(e)===Q},g.isLazy=function(e){return I(e)===ie},g.isMemo=function(e){return I(e)===ae},g.isPortal=function(e){return I(e)===xe},g.isProfiler=function(e){return I(e)===R},g.isStrictMode=function(e){return I(e)===Y},g.isSuspense=function(e){return I(e)===re},g.isSuspenseList=function(e){return I(e)===oe},g.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Q||e===R||e===Y||e===re||e===oe||e===Ta||typeof e=="object"&&e!==null&&(e.$$typeof===ie||e.$$typeof===ae||e.$$typeof===ee||e.$$typeof===te||e.$$typeof===ne||e.$$typeof===dt||e.getModuleId!==void 0)},g.typeOf=I,lt.exports=g;var Ma=lt.exports;function Oa(e,t){let n=0;function a(i){l.Children.forEach(i,c=>{Ma.isFragment(c)?a(c.props.children):(t(c,n),n+=1)})}a(e)}const V="adm-list",Ea={mode:"default"},ka=l.forwardRef((e,t)=>{const n=ve(Ea,e),a=l.useRef(null);return l.useImperativeHandle(t,()=>({get nativeElement(){return a.current}})),D(n,l.createElement("div",{className:M(V,`${V}-${n.mode}`),ref:a},n.header&&l.createElement("div",{className:`${V}-header`},n.header),l.createElement("div",{className:`${V}-body`},l.createElement("div",{className:`${V}-body-inner`},n.children))))});function K(e){return e!=null&&e!==!1}const O="adm-list-item",se=ue(ka,{Item:e=>{var t;const n=(t=e.clickable)!==null&&t!==void 0?t:!!e.onClick,a=e.arrow===void 0?n:e.arrow,i=l.createElement("div",{className:`${O}-content`},K(e.prefix)&&l.createElement("div",{className:`${O}-content-prefix`},e.prefix),l.createElement("div",{className:`${O}-content-main`},K(e.title)&&l.createElement("div",{className:`${O}-title`},e.title),e.children,K(e.description)&&l.createElement("div",{className:`${O}-description`},e.description)),K(e.extra)&&l.createElement("div",{className:`${O}-content-extra`},e.extra),K(a)&&l.createElement("div",{className:`${O}-content-arrow`},a===!0?l.createElement(Ca,null):a));return D(e,l.createElement(n?"a":"div",{className:M(`${O}`,n?["adm-plain-anchor"]:[],e.disabled&&`${O}-disabled`),onClick:e.disabled?void 0:e.onClick},i))}}),G="adm-nav-bar",Ba={backArrow:!0},Na=e=>{const t=ve(Ba,e),{back:n,backArrow:a}=t;return D(t,l.createElement("div",{className:M(G)},l.createElement("div",{className:`${G}-left`,role:"button"},n!==null&&l.createElement("div",{className:`${G}-back`,onClick:t.onBack},a&&l.createElement("span",{className:`${G}-back-arrow`},a===!0?l.createElement($a,null):a),l.createElement("span",{"aria-hidden":"true"},n)),t.left),l.createElement("div",{className:`${G}-title`},t.children),l.createElement("div",{className:`${G}-right`},t.right)))},ja=()=>null,E="adm-tab-bar",Aa={safeArea:!1},Se=ue(e=>{var t;const n=ve(Aa,e);let a=null;const i=[];Oa(n.children,(s,u)=>{if(!l.isValidElement(s))return;const p=s.key;typeof p=="string"&&(u===0&&(a=p),i.push(s))});const[c,d]=wa({value:n.activeKey,defaultValue:(t=n.defaultActiveKey)!==null&&t!==void 0?t:a,onChange:s=>{var u;s!==null&&((u=n.onChange)===null||u===void 0||u.call(n,s))}});return D(n,l.createElement("div",{className:E},l.createElement("div",{className:`${E}-wrap`},i.map(s=>{const u=s.key===c;function p(){const f=s.props.icon&&l.createElement("div",{className:`${E}-item-icon`},typeof s.props.icon=="function"?s.props.icon(u):s.props.icon),$=s.props.title&&l.createElement("div",{className:M(`${E}-item-title`,!!f&&`${E}-item-title-with-icon`)},typeof s.props.title=="function"?s.props.title(u):s.props.title);return f?l.createElement(l.Fragment,null,l.createElement(ct,{content:s.props.badge,className:`${E}-icon-badge`},f),$):$?l.createElement(ct,{content:s.props.badge,className:`${E}-title-badge`},$):null}return D(s.props,l.createElement("div",{key:s.key,onClick:()=>{const{key:f}=s;f!=null&&d(f.toString())},className:M(`${E}-item`,{[`${E}-item-active`]:u})},p()))})),n.safeArea&&l.createElement(Ia,{position:"bottom"})))},{Item:ja}),pt={type:"void","x-component":"MPage","x-designer":"MPage.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"mobilePage:addBlock","x-component-props":{showDivider:!1}}}},_a=e=>{const{t}=w(),n=b.useFieldSchema(),{dn:a}=r.useDesignable(),i=b.useField(),c={dn:a,field:i,fieldSchema:n};return o.jsx(r.SchemaSettingsDropdown,k(x({title:o.jsx(S.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)"},icon:o.jsx(B.MenuOutlined,{}),type:"dashed",children:t("Menu configuration")})},c),{children:o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:t("Delete menu block")},breakRemoveOn:{"x-component":"Grid"}},"remove")}))},W=()=>{const{dn:e}=r.useDesignable(),t=b.useFieldSchema(),n=b.useField();return{onUpdateComponentProps:de.useMemoizedFn(i=>F(this,null,function*(){q.set(t,"x-component-props",i),n.componentProps=x(x({},n.componentProps),i),yield e.emit("patch",{schema:{"x-uid":t["x-uid"],"x-component-props":t["x-component-props"],"x-server-hooks":[{type:"onSelfSave",method:"extractTextToLocale"}]}}),yield e.refresh()}))}},ut={properties:{name:{type:"string",title:j("Menu name"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:j("Icon"),"x-component-props":{}}}},Fa=e=>{const{icon:t,name:n}=e,a=r.useDesigner(),i=v.useNavigate(),c=v.useLocation(),d=b.useFieldSchema(),s=r.useCompile(),u=v.useParams(),p=()=>{const f=c.pathname.endsWith("/")?c.pathname.slice(0,-1):c.pathname;i(u.name?`/mobile/${d["x-uid"]}`:`${f}/${d["x-uid"]}`)};return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-menu-item",r.css`
23
+ */var ye=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),te=Symbol.for("react.context"),wa=Symbol.for("react.server_context"),ne=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),Ta=Symbol.for("react.offscreen"),dt;dt=Symbol.for("react.module.reference");function I(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ye:switch(e=e.type,e){case Q:case R:case Y:case re:case oe:return e;default:switch(e=e&&e.$$typeof,e){case wa:case te:case ne:case ie:case ae:case ee:return e;default:return t}}case xe:return t}}}g.ContextConsumer=te,g.ContextProvider=ee,g.Element=ye,g.ForwardRef=ne,g.Fragment=Q,g.Lazy=ie,g.Memo=ae,g.Portal=xe,g.Profiler=R,g.StrictMode=Y,g.Suspense=re,g.SuspenseList=oe,g.isAsyncMode=function(){return!1},g.isConcurrentMode=function(){return!1},g.isContextConsumer=function(e){return I(e)===te},g.isContextProvider=function(e){return I(e)===ee},g.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ye},g.isForwardRef=function(e){return I(e)===ne},g.isFragment=function(e){return I(e)===Q},g.isLazy=function(e){return I(e)===ie},g.isMemo=function(e){return I(e)===ae},g.isPortal=function(e){return I(e)===xe},g.isProfiler=function(e){return I(e)===R},g.isStrictMode=function(e){return I(e)===Y},g.isSuspense=function(e){return I(e)===re},g.isSuspenseList=function(e){return I(e)===oe},g.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Q||e===R||e===Y||e===re||e===oe||e===Ta||typeof e=="object"&&e!==null&&(e.$$typeof===ie||e.$$typeof===ae||e.$$typeof===ee||e.$$typeof===te||e.$$typeof===ne||e.$$typeof===dt||e.getModuleId!==void 0)},g.typeOf=I,lt.exports=g;var Ma=lt.exports;function Oa(e,t){let n=0;function a(i){l.Children.forEach(i,c=>{Ma.isFragment(c)?a(c.props.children):(t(c,n),n+=1)})}a(e)}const H="adm-list",Ea={mode:"default"},ka=l.forwardRef((e,t)=>{const n=ve(Ea,e),a=l.useRef(null);return l.useImperativeHandle(t,()=>({get nativeElement(){return a.current}})),D(n,l.createElement("div",{className:M(H,`${H}-${n.mode}`),ref:a},n.header&&l.createElement("div",{className:`${H}-header`},n.header),l.createElement("div",{className:`${H}-body`},l.createElement("div",{className:`${H}-body-inner`},n.children))))});function K(e){return e!=null&&e!==!1}const O="adm-list-item",se=ue(ka,{Item:e=>{var t;const n=(t=e.clickable)!==null&&t!==void 0?t:!!e.onClick,a=e.arrow===void 0?n:e.arrow,i=l.createElement("div",{className:`${O}-content`},K(e.prefix)&&l.createElement("div",{className:`${O}-content-prefix`},e.prefix),l.createElement("div",{className:`${O}-content-main`},K(e.title)&&l.createElement("div",{className:`${O}-title`},e.title),e.children,K(e.description)&&l.createElement("div",{className:`${O}-description`},e.description)),K(e.extra)&&l.createElement("div",{className:`${O}-content-extra`},e.extra),K(a)&&l.createElement("div",{className:`${O}-content-arrow`},a===!0?l.createElement(Ca,null):a));return D(e,l.createElement(n?"a":"div",{className:M(`${O}`,n?["adm-plain-anchor"]:[],e.disabled&&`${O}-disabled`),onClick:e.disabled?void 0:e.onClick},i))}}),G="adm-nav-bar",Ba={backArrow:!0},Na=e=>{const t=ve(Ba,e),{back:n,backArrow:a}=t;return D(t,l.createElement("div",{className:M(G)},l.createElement("div",{className:`${G}-left`,role:"button"},n!==null&&l.createElement("div",{className:`${G}-back`,onClick:t.onBack},a&&l.createElement("span",{className:`${G}-back-arrow`},a===!0?l.createElement($a,null):a),l.createElement("span",{"aria-hidden":"true"},n)),t.left),l.createElement("div",{className:`${G}-title`},t.children),l.createElement("div",{className:`${G}-right`},t.right)))},Aa=()=>null,E="adm-tab-bar",ja={safeArea:!1},Se=ue(e=>{var t;const n=ve(ja,e);let a=null;const i=[];Oa(n.children,(s,u)=>{if(!l.isValidElement(s))return;const p=s.key;typeof p=="string"&&(u===0&&(a=p),i.push(s))});const[c,d]=Pa({value:n.activeKey,defaultValue:(t=n.defaultActiveKey)!==null&&t!==void 0?t:a,onChange:s=>{var u;s!==null&&((u=n.onChange)===null||u===void 0||u.call(n,s))}});return D(n,l.createElement("div",{className:E},l.createElement("div",{className:`${E}-wrap`},i.map(s=>{const u=s.key===c;function p(){const f=s.props.icon&&l.createElement("div",{className:`${E}-item-icon`},typeof s.props.icon=="function"?s.props.icon(u):s.props.icon),$=s.props.title&&l.createElement("div",{className:M(`${E}-item-title`,!!f&&`${E}-item-title-with-icon`)},typeof s.props.title=="function"?s.props.title(u):s.props.title);return f?l.createElement(l.Fragment,null,l.createElement(ct,{content:s.props.badge,className:`${E}-icon-badge`},f),$):$?l.createElement(ct,{content:s.props.badge,className:`${E}-title-badge`},$):null}return D(s.props,l.createElement("div",{key:s.key,onClick:()=>{const{key:f}=s;f!=null&&d(f.toString())},className:M(`${E}-item`,{[`${E}-item-active`]:u})},p()))})),n.safeArea&&l.createElement(Ia,{position:"bottom"})))},{Item:Aa}),pt={type:"void","x-component":"MPage","x-designer":"MPage.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"mobilePage:addBlock","x-component-props":{showDivider:!1}}}},_a=e=>{const{t}=P(),n=b.useFieldSchema(),{dn:a}=r.useDesignable(),i=b.useField(),c={dn:a,field:i,fieldSchema:n};return o.jsx(r.SchemaSettingsDropdown,k(x({title:o.jsx(S.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)"},icon:o.jsx(B.MenuOutlined,{}),type:"dashed",children:t("Menu configuration")})},c),{children:o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:t("Delete menu block")},breakRemoveOn:{"x-component":"Grid"}},"remove")}))},W=()=>{const{dn:e}=r.useDesignable(),t=b.useFieldSchema(),n=b.useField();return{onUpdateComponentProps:de.useMemoizedFn(i=>F(this,null,function*(){q.set(t,"x-component-props",i),n.componentProps=x(x({},n.componentProps),i),yield e.emit("patch",{schema:{"x-uid":t["x-uid"],"x-component-props":t["x-component-props"],"x-server-hooks":[{type:"onSelfSave",method:"extractTextToLocale"}]}}),yield e.refresh()}))}},ut={properties:{name:{type:"string",title:A("Menu name"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:A("Icon"),"x-component-props":{}}}},Fa=e=>{const{icon:t,name:n}=e,a=r.useDesigner(),i=v.useNavigate(),c=v.useLocation(),d=b.useFieldSchema(),s=r.useCompile(),u=v.useParams(),p=()=>{const f=c.pathname.endsWith("/")?c.pathname.slice(0,-1):c.pathname;i(u.name?`/mobile/${d["x-uid"]}`:`${f}/${d["x-uid"]}`)};return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-menu-item",r.css`
24
24
  width: 100%;
25
25
  background: var(--adm-color-background);
26
26
  > .adm-list-item {
27
27
  background: inherit;
28
28
  }
29
- `),children:[o.jsx(se.Item,k(x({arrow:!0,clickable:!0},e),{prefix:o.jsx(r.Icon,{type:t}),onClick:p,children:s(n)})),o.jsx(a,{})]})},Da=()=>{const{t:e}=w(),{onUpdateComponentProps:t}=W(),n=b.useField();return o.jsxs(r.GeneralSchemaDesigner,{children:[o.jsx(r.SchemaSettingsModalItem,{title:e("Edit menu info"),initialValues:n.componentProps,schema:ut,onSubmit:t}),o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete menu item?")},breakRemoveOn:{"x-component":"MMenu"}},"remove")]})},mt=Fa;mt.Designer=Da;const La=r.createStyles(({token:e,css:t})=>({mobileMenu:t`
29
+ `),children:[o.jsx(se.Item,k(x({arrow:!0,clickable:!0},e),{prefix:o.jsx(r.Icon,{type:t}),onClick:p,children:s(n)})),o.jsx(a,{})]})},Da=()=>{const{t:e}=P(),{onUpdateComponentProps:t}=W(),n=b.useField();return o.jsxs(r.GeneralSchemaDesigner,{children:[o.jsx(r.SchemaSettingsModalItem,{title:e("Edit menu info"),initialValues:n.componentProps,schema:ut,onSubmit:t}),o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete menu item?")},breakRemoveOn:{"x-component":"MMenu"}},"remove")]})},mt=Fa;mt.Designer=Da;const La=r.createStyles(({token:e,css:t})=>({mobileMenu:t`
30
30
  --adm-color-primary: ${e.colorPrimary};
31
31
  --adm-color-primary-hover: ${e.colorPrimaryHover};
32
32
  --adm-color-primary-active: ${e.colorPrimaryActive};
@@ -37,7 +37,7 @@
37
37
  background: ${e.colorBgContainer};
38
38
  width: 100%;
39
39
  margin-bottom: var(--nb-spacing);
40
- `})),$e=e=>{const{styles:t}=La(),n=r.useDesigner(),a=b.useFieldSchema(),{insertBeforeEnd:i,designable:c}=r.useDesignable(),{t:d}=w(),s=u=>{const p={page:pt};return i({type:"void",title:u.name,"x-component":"MMenu.Item","x-component-props":u,"x-designer":"MMenu.Item.Designer",properties:p})};return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-menu",t.mobileMenu),children:o.jsxs(se,{children:[c&&o.jsx(se.Item,{children:o.jsx(n,{})}),o.jsx(r.DndContext,{children:o.jsx(r.SchemaComponent,{onlyRenderProperties:!0,schema:a})}),c?o.jsx(se.Item,{children:o.jsx(r.SchemaInitializerActionModal,{buttonText:d("Add menu item"),title:d("Add menu item"),schema:ut,onSubmit:s})}):null]})})};$e.Item=mt,$e.Designer=_a;const ce=(e,t)=>e.reduceProperties((a,i)=>a||i["x-component"]===t&&i),za=e=>ce(e,"Grid"),Ga=["Grid","Grid.Row"],Ua=["Grid.Col"],Ce=(e,t)=>{if(!e)return 0;let n=0;return Ua.includes(e["x-component"])&&(n+=1),typeof t=="number"&&n>=t||Ga.includes(e["x-component"])&&e.mapProperties(a=>{n+=Ce(a,t)}),n},qa=()=>{const{t:e}=w(),t=b.useFieldSchema(),{onUpdateComponentProps:n}=W(),a=b.useField(),{dn:i}=r.useDesignable(),c=v.useNavigate(),d=ce(t,"MTabBar"),s=d&&a.componentProps.tabBarEnabled!==!1,u={dn:i,field:a,fieldSchema:t};return o.jsx(r.SchemaSettingsDropdown,k(x({title:o.jsx(S.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(B.MenuOutlined,{}),type:"dashed",children:e("App level Configuration")})},u),{children:o.jsx(r.SchemaSettingsSwitchItem,{checked:s,title:e("Enable TabBar"),onChange:p=>F(this,null,function*(){if(p&&!d){const f=ce(t,"MPage");yield i.remove(f),yield i.insertBeforeEnd({type:"void","x-component":"MTabBar","x-component-props":{},name:"tabBar",properties:{[pe.uid()]:{type:"void","x-component":"MTabBar.Item","x-designer":"MTabBar.Item.Designer","x-component-props":{icon:"HomeOutlined",title:j("Untitled")},properties:{page:f.toJSON()}}}})}yield n({tabBarEnabled:p}),p===!1&&c("../")})})}))},Ha=r.createStyles(({token:e,css:t})=>({mobileContainer:t`
40
+ `})),$e=e=>{const{styles:t}=La(),n=r.useDesigner(),a=b.useFieldSchema(),{insertBeforeEnd:i,designable:c}=r.useDesignable(),{t:d}=P(),s=u=>{const p={page:pt};return i({type:"void",title:u.name,"x-component":"MMenu.Item","x-component-props":u,"x-designer":"MMenu.Item.Designer",properties:p})};return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-menu",t.mobileMenu),children:o.jsxs(se,{children:[c&&o.jsx(se.Item,{children:o.jsx(n,{})}),o.jsx(r.DndContext,{children:o.jsx(r.SchemaComponent,{onlyRenderProperties:!0,schema:a})}),c?o.jsx(se.Item,{children:o.jsx(r.SchemaInitializerActionModal,{buttonText:d("Add menu item"),title:d("Add menu item"),schema:ut,onSubmit:s})}):null]})})};$e.Item=mt,$e.Designer=_a;const ce=(e,t)=>e.reduceProperties((a,i)=>a||i["x-component"]===t&&i),za=e=>ce(e,"Grid"),Ga=["Grid","Grid.Row"],Ua=["Grid.Col"],Ce=(e,t)=>{if(!e)return 0;let n=0;return Ua.includes(e["x-component"])&&(n+=1),typeof t=="number"&&n>=t||Ga.includes(e["x-component"])&&e.mapProperties(a=>{n+=Ce(a,t)}),n},qa=()=>{const{t:e}=P(),t=b.useFieldSchema(),{onUpdateComponentProps:n}=W(),a=b.useField(),{dn:i}=r.useDesignable(),c=v.useNavigate(),d=ce(t,"MTabBar"),s=d&&a.componentProps.tabBarEnabled!==!1,u={dn:i,field:a,fieldSchema:t};return o.jsx(r.SchemaSettingsDropdown,k(x({title:o.jsx(S.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(B.MenuOutlined,{}),type:"dashed",children:e("App level Configuration")})},u),{children:o.jsx(r.SchemaSettingsSwitchItem,{checked:s,title:e("Enable TabBar"),onChange:p=>F(this,null,function*(){if(p&&!d){const f=ce(t,"MPage");yield i.remove(f),yield i.insertBeforeEnd({type:"void","x-component":"MTabBar","x-component-props":{},name:"tabBar",properties:{[pe.uid()]:{type:"void","x-component":"MTabBar.Item","x-designer":"MTabBar.Item.Designer","x-component-props":{icon:"HomeOutlined",title:A("Untitled")},properties:{page:f.toJSON()}}}})}yield n({tabBarEnabled:p}),p===!1&&c("../")})})}))},Va=r.createStyles(({token:e,css:t})=>({mobileContainer:t`
41
41
  --adm-color-primary: ${e.colorPrimary};
42
42
 
43
43
  & > .general-schema-designer > .general-schema-designer-icons {
@@ -61,13 +61,13 @@
61
61
  bottom: 0;
62
62
  left: 0;
63
63
  z-index: 1000;
64
- `})),ft=(e,t)=>e.reduceProperties((n,a)=>{if(n)return n;if(a["x-component"]==="MTabBar")return ft(a,t);if(a["x-component"]==="MTabBar.Item"&&t===a["x-uid"])return a}),Va=()=>{const{name:e}=v.useParams(),t=b.useFieldSchema();if(!e)return o.jsx(o.Fragment,{});const n=ft(t.properties.tabBar,e.replace("tab_",""));return n?o.jsx(r.SchemaComponent,{schema:n}):o.jsx(v.Navigate,{replace:!0,to:"../"})},Ie=e=>{var L,A;const{styles:t}=Ha(),{token:n}=r.useToken(),a=r.useDesigner(),i=b.useFieldSchema(),c=v.useNavigate(),d=v.useParams(),s=v.useLocation(),p=b.useField().componentProps.tabBarEnabled!==!1,f=(L=i==null?void 0:i.properties)==null?void 0:L.tabBar,$=f!=null&&f.properties?Object.keys(f.properties)[0]:null;let C=null;return $&&(C=(A=f==null?void 0:f.properties[$])==null?void 0:A["x-uid"]),l.useEffect(()=>{if(C&&!d.name){const P=s.pathname.endsWith("/")?s.pathname.slice(0,-1):s.pathname;c(`${P}/tab_${C}`,{replace:!0})}},[s.pathname,c,d.name,C]),o.jsxs(r.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:r.cx("nb-mobile-container",t.mobileContainer),children:[o.jsx(a,{}),o.jsx("div",{style:{paddingBottom:C?n.paddingLG*2:0},className:"nb-mobile-container-content",children:C?o.jsx(Va,{}):o.jsx(r.SchemaComponent,{filterProperties:P=>P["x-component"]!=="MTabBar",schema:i})}),p&&o.jsx("div",{className:r.cx("nb-mobile-container-tab-bar",t.tabBar),children:o.jsx(r.SchemaComponent,{onlyRenderProperties:!0,filterProperties:P=>P["x-component"]==="MTabBar",schema:i})})]})};Ie.Designer=qa,Ie.displayName="MContainer";const gt={properties:{title:{type:"string",title:"{{ t('Title') }}",required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{required:!0,"x-decorator":"FormItem","x-component":"IconPicker",title:"{{ t('Icon') }}","x-component-props":{}}}},Ka=()=>{const e=r.useDesigner();return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-tab-bar-item",r.css`
64
+ `})),ft=(e,t)=>e.reduceProperties((n,a)=>{if(n)return n;if(a["x-component"]==="MTabBar")return ft(a,t);if(a["x-component"]==="MTabBar.Item"&&t===a["x-uid"])return a}),Ha=()=>{const{name:e}=v.useParams(),t=b.useFieldSchema();if(!e)return o.jsx(o.Fragment,{});const n=ft(t.properties.tabBar,e.replace("tab_",""));return n?o.jsx(r.SchemaComponent,{schema:n}):o.jsx(v.Navigate,{replace:!0,to:"../"})},Ie=e=>{var L,j;const{styles:t}=Va(),{token:n}=r.useToken(),a=r.useDesigner(),i=b.useFieldSchema(),c=v.useNavigate(),d=v.useParams(),s=v.useLocation(),p=b.useField().componentProps.tabBarEnabled!==!1,f=(L=i==null?void 0:i.properties)==null?void 0:L.tabBar,$=f!=null&&f.properties?Object.keys(f.properties)[0]:null;let C=null;return $&&(C=(j=f==null?void 0:f.properties[$])==null?void 0:j["x-uid"]),l.useEffect(()=>{if(C&&!d.name){const w=s.pathname.endsWith("/")?s.pathname.slice(0,-1):s.pathname;c(`${w}/tab_${C}`,{replace:!0})}},[s.pathname,c,d.name,C]),o.jsxs(r.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:r.cx("nb-mobile-container",t.mobileContainer),children:[o.jsx(a,{}),o.jsx("div",{style:{paddingBottom:C?n.paddingLG*2:0},className:"nb-mobile-container-content",children:C?o.jsx(Ha,{}):o.jsx(r.SchemaComponent,{filterProperties:w=>w["x-component"]!=="MTabBar",schema:i})}),p&&o.jsx("div",{className:r.cx("nb-mobile-container-tab-bar",t.tabBar),children:o.jsx(r.SchemaComponent,{onlyRenderProperties:!0,filterProperties:w=>w["x-component"]==="MTabBar",schema:i})})]})};Ie.Designer=qa,Ie.displayName="MContainer";const gt={properties:{title:{type:"string",title:"{{ t('Title') }}",required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{required:!0,"x-decorator":"FormItem","x-component":"IconPicker",title:"{{ t('Icon') }}","x-component-props":{}}}},Ka=()=>{const e=r.useDesigner();return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-tab-bar-item",r.css`
65
65
  position: absolute !important;
66
66
  width: 100%;
67
67
  height: 100%;
68
68
  top: 0;
69
69
  left: 0;
70
- `),children:o.jsx(e,{})})},Wa=()=>{const{t:e}=w(),t=b.useFieldSchema(),{onUpdateComponentProps:n}=W(),a=b.useField(),i=Object.keys(t.parent.properties).length;return o.jsxs(r.GeneralSchemaDesigner,{children:[o.jsx(r.SchemaSettingsModalItem,{title:e("Edit info"),initialValues:a.componentProps,schema:gt,onSubmit:n}),i>1?o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete tab item?")},breakRemoveOn:{"x-component":"MTabBar"}},"remove"):null]})},bt=Ka;bt.Designer=Wa;const we=e=>{const t=b.useFieldSchema(),{designable:n}=r.useDesignable(),{t:a}=w(),{insertBeforeEnd:i}=r.useDesignable(),c=v.useNavigate(),d=v.useParams(),s=r.useCompile(),u=l.useCallback(p=>i({type:"void","x-component":"MTabBar.Item","x-component-props":p,"x-designer":"MTabBar.Item.Designer",properties:{[pe.uid()]:pt},"x-server-hooks":[{type:"onSelfSave",method:"extractTextToLocale"}]}),[]);return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-tab-bar",r.css`
70
+ `),children:o.jsx(e,{})})},Wa=()=>{const{t:e}=P(),t=b.useFieldSchema(),{onUpdateComponentProps:n}=W(),a=b.useField(),i=Object.keys(t.parent.properties).length;return o.jsxs(r.GeneralSchemaDesigner,{children:[o.jsx(r.SchemaSettingsModalItem,{title:e("Edit info"),initialValues:a.componentProps,schema:gt,onSubmit:n}),i>1?o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete tab item?")},breakRemoveOn:{"x-component":"MTabBar"}},"remove"):null]})},bt=Ka;bt.Designer=Wa;const Pe=e=>{const t=b.useFieldSchema(),{designable:n}=r.useDesignable(),{t:a}=P(),{insertBeforeEnd:i}=r.useDesignable(),c=v.useNavigate(),d=v.useParams(),s=r.useCompile(),u=l.useCallback(p=>i({type:"void","x-component":"MTabBar.Item","x-component-props":p,"x-designer":"MTabBar.Item.Designer",properties:{[pe.uid()]:pt},"x-server-hooks":[{type:"onSelfSave",method:"extractTextToLocale"}]}),[]);return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-tab-bar",r.css`
71
71
  position: relative;
72
72
  width: 100%;
73
73
  display: flex;
@@ -78,7 +78,7 @@
78
78
  .adm-tab-bar-item-icon {
79
79
  height: auto;
80
80
  }
81
- `,icon:o.jsx(r.SchemaInitializerActionModal,{title:a("Add tab"),onSubmit:u,schema:gt})},"add-tab"):null]})})})};we.Item=bt,we.displayName="MTabBar";const Ja=e=>{var C,L,A,P;const{showBack:t}=e,{t:n}=w(),a=b.useField(),i=b.useFieldSchema(),{dn:c}=r.useDesignable(),{onUpdateComponentProps:d}=W(),s=(C=i==null?void 0:i.properties)==null?void 0:C.header,u=!!s&&((L=a.componentProps)==null?void 0:L.headerEnabled)!==!1,p=(A=i==null?void 0:i.properties)==null?void 0:A.tabs,f=!!p&&((P=a.componentProps)==null?void 0:P.tabsEnabled)!==!1,$={dn:c,field:a,fieldSchema:i};return o.jsxs(r.SchemaSettingsDropdown,k(x({title:o.jsx(S.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(B.MenuOutlined,{}),type:"dashed",children:n("Page configuration")})},$),{children:[o.jsx(r.SchemaSettingsSwitchItem,{checked:u,title:n("Enable Header"),onChange:U=>F(this,null,function*(){var _;s||(yield c.insertAfterBegin({type:"void",name:"header","x-component":"MHeader","x-designer":"MHeader.Designer","x-component-props":{title:(_=i.parent["x-component-props"])==null?void 0:_.name,showBack:t}})),yield d({headerEnabled:U})})}),o.jsx(r.SchemaSettingsSwitchItem,{checked:f,title:n("Enable Tabs"),onChange:U=>F(this,null,function*(){if(!p){const _=za(i);return yield c.remove(_),c.insertBeforeEnd({type:"void",name:"tabs","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab","x-initializer-props":{gridInitializer:"mobilePage:addBlock"},properties:{tab1:{type:"void",title:j("Untitled"),"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:k(x({},_),{"x-uid":pe.uid()})}}}})}yield d({tabsEnabled:U})})})]}))},Xa=r.createStyles(({token:e,css:t})=>({globalActionCSS:t`
81
+ `,icon:o.jsx(r.SchemaInitializerActionModal,{title:a("Add tab"),onSubmit:u,schema:gt})},"add-tab"):null]})})})};Pe.Item=bt,Pe.displayName="MTabBar";const Ja=e=>{var C,L,j,w;const{showBack:t}=e,{t:n}=P(),a=b.useField(),i=b.useFieldSchema(),{dn:c}=r.useDesignable(),{onUpdateComponentProps:d}=W(),s=(C=i==null?void 0:i.properties)==null?void 0:C.header,u=!!s&&((L=a.componentProps)==null?void 0:L.headerEnabled)!==!1,p=(j=i==null?void 0:i.properties)==null?void 0:j.tabs,f=!!p&&((w=a.componentProps)==null?void 0:w.tabsEnabled)!==!1,$={dn:c,field:a,fieldSchema:i};return o.jsxs(r.SchemaSettingsDropdown,k(x({title:o.jsx(S.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(B.MenuOutlined,{}),type:"dashed",children:n("Page configuration")})},$),{children:[o.jsx(r.SchemaSettingsSwitchItem,{checked:u,title:n("Enable Header"),onChange:U=>F(this,null,function*(){var _;s||(yield c.insertAfterBegin({type:"void",name:"header","x-component":"MHeader","x-designer":"MHeader.Designer","x-component-props":{title:(_=i.parent["x-component-props"])==null?void 0:_.name,showBack:t}})),yield d({headerEnabled:U})})}),o.jsx(r.SchemaSettingsSwitchItem,{checked:f,title:n("Enable Tabs"),onChange:U=>F(this,null,function*(){if(!p){const _=za(i);return yield c.remove(_),c.insertBeforeEnd({type:"void",name:"tabs","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab","x-initializer-props":{gridInitializer:"mobilePage:addBlock"},properties:{tab1:{type:"void",title:A("Untitled"),"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:k(x({},_),{"x-uid":pe.uid()})}}}})}yield d({tabsEnabled:U})})})]}))},Xa=r.createStyles(({token:e,css:t})=>({globalActionCSS:t`
82
82
  #nb-position-container > & {
83
83
  height: ${e.sizeXXL}px;
84
84
  border-top: 1px solid var(--nb-box-bg);
@@ -108,11 +108,11 @@
108
108
  }
109
109
  display: flex;
110
110
  flex-direction: column;
111
- `})),Pe=e=>{var P,U,_,It;const{styles:t}=Xa(),n=r.useDesigner(),a=b.useField(),i=b.useFieldSchema(),[c,d]=v.useSearchParams(),s=(P=i.properties)==null?void 0:P.tabs,u=a.componentProps.headerEnabled!==!1,p=a.componentProps.tabsEnabled!==!1&&s;let f=ce(i,"MPage");if(!p&&!f&&s){const y=Object.values(s.properties||{}).sort((Me,Oe)=>Me["x-index"]-Oe["x-index"]);y.length!==0&&(f=y[0])}const $=i.root===i.parent;let C=!1;if(!s&&i.properties)C=Ce(i.properties.grid,2)===1;else if(c.has("tab")&&((U=s==null?void 0:s.properties)!=null&&U[c.get("tab")]))C=Ce((It=(_=s.properties[c.get("tab")])==null?void 0:_.properties)==null?void 0:It.grid,2)===1;else if(s!=null&&s.properties){const y=Object.values(s.properties).sort((Me,Oe)=>Me["x-index"]-Oe["x-index"])[0];y&&setTimeout(()=>{d([["tab",y.name.toString()]],{replace:!0})})}const L=l.useCallback(y=>{d([["tab",y]],{replace:!0})},[d]),A=l.useCallback(y=>o.jsx(r.TabsContextProvider,{children:C?o.jsx(r.ActionBarProvider,{container:(typeof y.active=="undefined"||y.active)&&$?document.getElementById("nb-position-container"):null,forceProps:{layout:"one-column",className:t.globalActionCSS},children:y.children}):y.children}),[C,$,t.globalActionCSS]);return o.jsxs(r.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:r.cx("nb-mobile-page",t.mobilePage),children:[o.jsx(n,x({},i==null?void 0:i["x-designer-props"])),o.jsxs("div",{style:{paddingBottom:s?null:"var(--nb-spacing)"},className:r.cx("nb-mobile-page-header",t.mobilePageHeader,{[r.css`
111
+ `})),we=e=>{var w,U,_,It;const{styles:t}=Xa(),n=r.useDesigner(),a=b.useField(),i=b.useFieldSchema(),[c,d]=v.useSearchParams(),s=(w=i.properties)==null?void 0:w.tabs,u=a.componentProps.headerEnabled!==!1,p=a.componentProps.tabsEnabled!==!1&&s;let f=ce(i,"MPage");if(!p&&!f&&s){const y=Object.values(s.properties||{}).sort((Me,Oe)=>Me["x-index"]-Oe["x-index"]);y.length!==0&&(f=y[0])}const $=i.root===i.parent;let C=!1;if(!s&&i.properties)C=Ce(i.properties.grid,2)===1;else if(c.has("tab")&&((U=s==null?void 0:s.properties)!=null&&U[c.get("tab")]))C=Ce((It=(_=s.properties[c.get("tab")])==null?void 0:_.properties)==null?void 0:It.grid,2)===1;else if(s!=null&&s.properties){const y=Object.values(s.properties).sort((Me,Oe)=>Me["x-index"]-Oe["x-index"])[0];y&&setTimeout(()=>{d([["tab",y.name.toString()]],{replace:!0})})}const L=l.useCallback(y=>{d([["tab",y]],{replace:!0})},[d]),j=l.useCallback(y=>o.jsx(r.TabsContextProvider,{children:C?o.jsx(r.ActionBarProvider,{container:(typeof y.active=="undefined"||y.active)&&$?document.getElementById("nb-position-container"):null,forceProps:{layout:"one-column",className:t.globalActionCSS},children:y.children}):y.children}),[C,$,t.globalActionCSS]);return o.jsxs(r.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:r.cx("nb-mobile-page",t.mobilePage),children:[o.jsx(n,x({},i==null?void 0:i["x-designer-props"])),o.jsxs("div",{style:{paddingBottom:s?null:"var(--nb-spacing)"},className:r.cx("nb-mobile-page-header",t.mobilePageHeader,{[r.css`
112
112
  & > .ant-nb-grid {
113
113
  margin-top: 14px;
114
114
  }
115
- `]:s&&!p||!s}),children:[u&&o.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]==="MHeader"}),o.jsx(r.TabsContextProvider,{PaneRoot:A,activeKey:c.get("tab"),onChange:L,children:o.jsx(b.RecursionField,{schema:p?i:f,filterProperties:y=>y["x-component"]==="Tabs"||y["x-component"]==="Grid"||y["x-component"]==="Grid.Row"})})]}),o.jsx(A,{children:!s&&o.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]!=="MHeader"})})]})};Pe.Designer=Ja,Pe.displayName="MPage";const Za=()=>{const e=b.useField(),{onUpdateComponentProps:t}=W(),{t:n}=w();return o.jsx(r.GeneralSchemaDesigner,{draggable:!1,children:o.jsx(r.SchemaSettingsModalItem,{title:n("Edit info"),components:{Switch:Tt.Switch},initialValues:e.componentProps,schema:{properties:{title:{type:"string",title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},showBack:{type:"boolean",title:n("Display back button"),"x-component":"Switch","x-decorator":"FormItem"}}},onSubmit:t})})},ht=e=>{const t=b.useField(),{title:n=j("Untitled"),showBack:a=!1}=x(x({},e),t==null?void 0:t.componentProps),i=r.useDesigner(),d=r.useCompile()(n),s=v.useNavigate(),{setTitle:u}=r.useDocumentTitle(),{token:p}=r.useToken();l.useEffect(()=>{u(d)},[d]);const f=l.useMemo(()=>({width:"100%",background:p.colorBgContainer}),[p.colorBgContainer]);return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-header"),style:f,children:[o.jsx(Na,{backArrow:a,onBack:()=>s(-1),children:d}),o.jsx(i,{})]})};ht.Designer=Za;const Qa=()=>{const{t:e}=w();return o.jsx(r.GeneralSchemaDesigner,{children:o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete settings block")},breakRemoveOn:{"x-component":"Grid"}},"remove")})},vt=()=>{const e=r.useDesigner();return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-setting",r.css`
115
+ `]:s&&!p||!s}),children:[u&&o.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]==="MHeader"}),o.jsx(r.TabsContextProvider,{PaneRoot:j,activeKey:c.get("tab"),onChange:L,children:o.jsx(b.RecursionField,{schema:p?i:f,filterProperties:y=>y["x-component"]==="Tabs"||y["x-component"]==="Grid"||y["x-component"]==="Grid.Row"})})]}),o.jsx(j,{children:!s&&o.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]!=="MHeader"})})]})};we.Designer=Ja,we.displayName="MPage";const Za=()=>{const e=b.useField(),{onUpdateComponentProps:t}=W(),{t:n}=P();return o.jsx(r.GeneralSchemaDesigner,{draggable:!1,children:o.jsx(r.SchemaSettingsModalItem,{title:n("Edit info"),components:{Switch:Tt.Switch},initialValues:e.componentProps,schema:{properties:{title:{type:"string",title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},showBack:{type:"boolean",title:n("Display back button"),"x-component":"Switch","x-decorator":"FormItem"}}},onSubmit:t})})},ht=e=>{const t=b.useField(),{title:n=A("Untitled"),showBack:a=!1}=x(x({},e),t==null?void 0:t.componentProps),i=r.useDesigner(),d=r.useCompile()(n),s=v.useNavigate(),{setTitle:u}=r.useDocumentTitle(),{token:p}=r.useToken();l.useEffect(()=>{u(d)},[d]);const f=l.useMemo(()=>({width:"100%",background:p.colorBgContainer}),[p.colorBgContainer]);return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-header"),style:f,children:[o.jsx(Na,{backArrow:a,onBack:()=>s(-1),children:d}),o.jsx(i,{})]})};ht.Designer=Za;const Qa=()=>{const{t:e}=P();return o.jsx(r.GeneralSchemaDesigner,{children:o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete settings block")},breakRemoveOn:{"x-component":"Grid"}},"remove")})},vt=()=>{const e=r.useDesigner();return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-setting",r.css`
116
116
  margin-bottom: var(--nb-spacing);
117
117
  `),children:[o.jsx(e,{}),o.jsx(r.SettingsMenu,{redirectUrl:"/mobile"})]})};vt.Designer=Qa;const Ya=()=>{const e=r.useSchemaInitializerItem(),{insert:t}=r.useSchemaInitializer();return o.jsx(r.SchemaInitializerItem,x({icon:o.jsx(B.SettingOutlined,{}),onClick:()=>F(this,null,function*(){t({type:"void","x-component":"MSettings","x-designer":"MSettings.Designer","x-component-props":{}})})},e))},yt=l.createContext(null),Ra=e=>o.jsx(yt.Provider,{value:{interface:!0},children:e.children}),xt=()=>l.useContext(yt),ei=r.css`
118
118
  padding: 0 var(--nb-spacing);
@@ -120,7 +120,7 @@
120
120
  padding: unset !important;
121
121
  background: unset !important;
122
122
  }
123
- `,ti=()=>({className:ei}),ni={xs:1,sm:1,md:1,lg:1,xl:1,xxl:1},ri=()=>({columnCount:xt()?ni:null,pagination:{simple:!0}}),oi=e=>o.jsx(r.SchemaComponentOptions,{components:{MMenuBlockInitializer:Bt,MSettingsBlockInitializer:Ya,MContainer:Ie,MMenu:$e,MTabBar:we,MPage:Pe,MHeader:ht,MSettings:vt},scope:{useGridCardBlockItemProps:ti,useGridCardBlockProps:ri},children:e.children}),ai=()=>{const{t:e}=w(),t=r.useApp(),n=()=>{window.open(t.getRouteUrl("/mobile"))};return o.jsx("div",{className:r.css`
123
+ `,ti=()=>({className:ei}),ni={xs:1,sm:1,md:1,lg:1,xl:1,xxl:1},ri=()=>({columnCount:xt()?ni:null,pagination:{simple:!0}}),oi=e=>o.jsx(r.SchemaComponentOptions,{components:{MMenuBlockInitializer:Bt,MSettingsBlockInitializer:Ya,MContainer:Ie,MMenu:$e,MTabBar:Pe,MPage:we,MHeader:ht,MSettings:vt},scope:{useGridCardBlockItemProps:ti,useGridCardBlockProps:ri},children:e.children}),ai=()=>{const{t:e}=P(),t=r.useApp(),n=()=>{window.open(t.getRouteUrl("/mobile"))};return o.jsx("div",{className:r.css`
124
124
  position: absolute;
125
125
  top: -40px;
126
126
  right: 0;
@@ -170,7 +170,7 @@
170
170
  height: 100%;
171
171
  position: relative;
172
172
  overflow: hidden;
173
- `),children:[n.name&&!n.name.startsWith("tab_")?o.jsx(v.Outlet,{}):o.jsx(r.RemoteSchemaComponent,{uid:t,children:e.children},t),o.jsx("div",{id:"nb-position-container"})]})})]})})},pi=()=>{const e=r.useApp(),{t}=w(),n=l.useMemo(()=>e.getRouteUrl("/mobile"),[e]);return o.jsx(S.Card,{style:{minHeight:"600px"},children:o.jsx(S.Form,{layout:"vertical",children:o.jsx(S.Form.Item,{tooltip:`${t("The full address is")} ${window.origin}${n}`,label:t("Mobile client access address"),children:o.jsx(S.Input,{value:n,disabled:!0})})})})},Ct=l.memo(()=>{const t=r.usePlugin(Te).getMobileRouterComponent();return o.jsx(Ra,{children:o.jsx("div",{className:r.css`
173
+ `),children:[n.name&&!n.name.startsWith("tab_")?o.jsx(v.Outlet,{}):o.jsx(r.RemoteSchemaComponent,{uid:t,children:e.children},t),o.jsx("div",{id:"nb-position-container"})]})})]})})},pi=()=>{const e=r.useApp(),{t}=P(),n=l.useMemo(()=>e.getRouteUrl("/mobile"),[e]);return o.jsx(S.Card,{style:{minHeight:"600px"},children:o.jsx(S.Form,{layout:"vertical",children:o.jsx(S.Form.Item,{tooltip:`${t("The full address is")} ${window.origin}${n}`,label:t("Mobile client access address"),children:o.jsx(S.Input,{value:n,disabled:!0})})})})},Ct=l.memo(()=>{const t=r.usePlugin(Te).getMobileRouterComponent();return o.jsx(Ra,{children:o.jsx("div",{className:r.css`
174
174
  display: flex;
175
175
  width: 100%;
176
176
  height: 100%;
@@ -188,4 +188,4 @@
188
188
  margin-top: 50px;
189
189
  `),children:o.jsx(ui,x({className:r.css`
190
190
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
191
- `},e))}),fi=()=>o.jsx(mi,{children:o.jsx(Ct,{})});class Te extends r.Plugin{constructor(){super(...arguments);Pt(this,"mobileRouter")}load(){return F(this,null,function*(){this.setMobileRouter(),this.addRoutes(),this.addSettings(),this.app.use(Ne),this.app.schemaInitializerManager.add(Ae),this.app.schemaInitializerManager.add(kt)})}addSettings(){this.app.pluginSettingsManager.add(N,{title:`{{t("Mobile Client-side", { ns: "${N}" })}}`,icon:"MobileOutlined",Component:()=>o.jsx(v.Outlet,{})}),this.app.pluginSettingsManager.add(`${N}.interface`,{title:`{{t("Interface Configuration", { ns: "${N}" })}}`,Component:fi,sort:1}),this.app.pluginSettingsManager.add(`${N}.app`,{title:`{{t("App Configuration", { ns: "${N}" })}}`,Component:pi,sort:2})}setMobileRouter(){const n=r.createRouterManager({type:"hash"},this.app);n.add("root",{path:"/",element:o.jsx(v.Navigate,{replace:!0,to:"/mobile"})}),n.add("mobile",{path:"/mobile",element:o.jsx($t,{})}),n.add("mobile.page",{path:"/mobile/:name",element:o.jsx(r.RouteSchemaComponent,{})}),this.mobileRouter=n}getMobileRouterComponent(){return this.mobileRouter.getRouterComponent()}addRoutes(){this.app.router.add("mobile",{path:"/mobile",element:o.jsx($t,{})}),this.app.router.add("mobile.page",{path:"/mobile/:name",Component:"RouteSchemaComponent"})}}m.PluginMobileClient=Te,m.default=Te,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
191
+ `},e))}),fi=()=>o.jsx(mi,{children:o.jsx(Ct,{})});class Te extends r.Plugin{constructor(){super(...arguments);wt(this,"mobileRouter")}load(){return F(this,null,function*(){this.setMobileRouter(),this.addRoutes(),this.addSettings(),this.app.use(Ne),this.app.schemaInitializerManager.add(je),this.app.schemaInitializerManager.add(kt)})}addSettings(){this.app.pluginSettingsManager.add(N,{title:`{{t("Mobile Client-side", { ns: "${N}" })}}`,icon:"MobileOutlined",Component:()=>o.jsx(v.Outlet,{})}),this.app.pluginSettingsManager.add(`${N}.interface`,{title:`{{t("Interface Configuration", { ns: "${N}" })}}`,Component:fi,sort:1}),this.app.pluginSettingsManager.add(`${N}.app`,{title:`{{t("App Configuration", { ns: "${N}" })}}`,Component:pi,sort:2})}setMobileRouter(){const n=r.createRouterManager({type:"hash"},this.app);n.add("root",{path:"/",element:o.jsx(v.Navigate,{replace:!0,to:"/mobile"})}),n.add("mobile",{path:"/mobile",element:o.jsx($t,{})}),n.add("mobile.page",{path:"/mobile/:name",element:o.jsx(r.RouteSchemaComponent,{})}),this.mobileRouter=n}getMobileRouterComponent(){return this.mobileRouter.getRouterComponent()}addRoutes(){this.app.router.add("mobile",{path:"/mobile",element:o.jsx($t,{})}),this.app.router.add("mobile.page",{path:"/mobile/:name",Component:"RouteSchemaComponent"})}}m.PluginMobileClient=Te,m.default=Te,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -10,12 +10,12 @@
10
10
  module.exports = {
11
11
  "react": "18.2.0",
12
12
  "react-router-dom": "6.21.0",
13
- "@nocobase/client": "1.0.0-alpha.9",
14
- "@nocobase/server": "1.0.0-alpha.9",
13
+ "@nocobase/client": "1.0.1-alpha.2",
14
+ "@nocobase/server": "1.0.1-alpha.2",
15
15
  "antd": "5.12.8",
16
16
  "react-i18next": "11.18.6",
17
17
  "@ant-design/icons": "5.2.6",
18
- "@nocobase/database": "1.0.0-alpha.9",
18
+ "@nocobase/database": "1.0.1-alpha.2",
19
19
  "@formily/react": "2.3.0",
20
20
  "@formily/shared": "2.3.0",
21
21
  "lodash": "4.17.21",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-mobile-client",
3
- "version": "1.0.0-alpha.9",
3
+ "version": "1.0.1-alpha.2",
4
4
  "main": "./dist/server/index.js",
5
5
  "homepage": "https://docs.nocobase.com/handbook/mobile-client",
6
6
  "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile-client",
@@ -33,5 +33,5 @@
33
33
  "@nocobase/test": "1.x",
34
34
  "@nocobase/utils": "1.x"
35
35
  },
36
- "gitHead": "562d6ae965317098df05db756d160e03363dcec5"
36
+ "gitHead": "fc5a8e3c812516f787cb22d3d198f058f45b1963"
37
37
  }