kouxiangtang 0.0.71 → 0.0.73

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.
Files changed (57) hide show
  1. package/dist/{AttachmentUploader-LX5bVl-8.js → AttachmentUploader-cAHfI5Yj.js} +2 -2
  2. package/dist/{AttachmentUploader-LX5bVl-8.js.map → AttachmentUploader-cAHfI5Yj.js.map} +1 -1
  3. package/dist/{ImageUploader-B4tYXQqr.js → ImageUploader-lk9N-Sni.js} +2 -2
  4. package/dist/{ImageUploader-B4tYXQqr.js.map → ImageUploader-lk9N-Sni.js.map} +1 -1
  5. package/dist/{ImagesUploader-B6RAe6Xu.js → ImagesUploader-9qOx2FfT.js} +2 -2
  6. package/dist/{ImagesUploader-B6RAe6Xu.js.map → ImagesUploader-9qOx2FfT.js.map} +1 -1
  7. package/dist/{RichTextEditor-YxcPp2j_.js → RichTextEditor-4VJbZesz.js} +2 -2
  8. package/dist/{RichTextEditor-YxcPp2j_.js.map → RichTextEditor-4VJbZesz.js.map} +1 -1
  9. package/dist/config-BPInBpGk.js +124 -0
  10. package/dist/config-BPInBpGk.js.map +1 -0
  11. package/dist/{config-o_GAg-he.js → config-BSD8uO2H.js} +2 -2
  12. package/dist/{config-o_GAg-he.js.map → config-BSD8uO2H.js.map} +1 -1
  13. package/dist/{config-C1M9lhud.js → config-BUi_68JX.js} +2 -2
  14. package/dist/{config-C1M9lhud.js.map → config-BUi_68JX.js.map} +1 -1
  15. package/dist/{config-DbQaCNRb.js → config-BVaWa82F.js} +2 -2
  16. package/dist/{config-DbQaCNRb.js.map → config-BVaWa82F.js.map} +1 -1
  17. package/dist/{config-DtRJPPfP.js → config-BnHH9EEx.js} +2 -2
  18. package/dist/{config-DtRJPPfP.js.map → config-BnHH9EEx.js.map} +1 -1
  19. package/dist/{config-BEL_jgH8.js → config-BnQ5RNT5.js} +2 -2
  20. package/dist/{config-BEL_jgH8.js.map → config-BnQ5RNT5.js.map} +1 -1
  21. package/dist/{config-BhpCGpOI.js → config-Bo0Ejvao.js} +3 -3
  22. package/dist/{config-BhpCGpOI.js.map → config-Bo0Ejvao.js.map} +1 -1
  23. package/dist/{config-C-pAKmPf.js → config-C7aBNMoz.js} +2 -2
  24. package/dist/{config-C-pAKmPf.js.map → config-C7aBNMoz.js.map} +1 -1
  25. package/dist/{config-BY9CR27I.js → config-CE86st16.js} +2 -2
  26. package/dist/{config-BY9CR27I.js.map → config-CE86st16.js.map} +1 -1
  27. package/dist/{config-CNDGpOqG.js → config-CV0wJl5O.js} +14 -13
  28. package/dist/config-CV0wJl5O.js.map +1 -0
  29. package/dist/{config-CW4vsRQz.js → config-Cd-l6zLr.js} +2 -2
  30. package/dist/{config-CW4vsRQz.js.map → config-Cd-l6zLr.js.map} +1 -1
  31. package/dist/{config-DpbJfHVo.js → config-CvalidFy.js} +3 -3
  32. package/dist/{config-DpbJfHVo.js.map → config-CvalidFy.js.map} +1 -1
  33. package/dist/{config-CeArDsdO.js → config-CwVeOemE.js} +2 -2
  34. package/dist/{config-CeArDsdO.js.map → config-CwVeOemE.js.map} +1 -1
  35. package/dist/{config-rbkXeVUC.js → config-DxnWEDaj.js} +5 -4
  36. package/dist/{config-rbkXeVUC.js.map → config-DxnWEDaj.js.map} +1 -1
  37. package/dist/{config-oY5BEG5O.js → config-KFcY3l3O.js} +3 -3
  38. package/dist/{config-oY5BEG5O.js.map → config-KFcY3l3O.js.map} +1 -1
  39. package/dist/{config-C3y3qsgJ.js → config-pICAEHCe.js} +2 -2
  40. package/dist/{config-C3y3qsgJ.js.map → config-pICAEHCe.js.map} +1 -1
  41. package/dist/{config-DWVxm-4g.js → config-sHhddDkQ.js} +2 -2
  42. package/dist/{config-DWVxm-4g.js.map → config-sHhddDkQ.js.map} +1 -1
  43. package/dist/{config-BfPFwgV2.js → config-vsqFsOM9.js} +2 -2
  44. package/dist/{config-BfPFwgV2.js.map → config-vsqFsOM9.js.map} +1 -1
  45. package/dist/{config-Bmz1W4fL.js → config-zgnv_Y78.js} +2 -2
  46. package/dist/{config-Bmz1W4fL.js.map → config-zgnv_Y78.js.map} +1 -1
  47. package/dist/el-radio-l0sNRNKZ.js +2 -0
  48. package/dist/el-radio-l0sNRNKZ.js.map +1 -0
  49. package/dist/{index-Cpf2E6EU.js → index-B5R2-PIR.js} +8 -6
  50. package/dist/index-B5R2-PIR.js.map +1 -0
  51. package/dist/kouxiangtang.js +1 -1
  52. package/dist/kouxiangtang.umd.cjs +8 -8
  53. package/dist/kouxiangtang.umd.cjs.map +1 -1
  54. package/dist/style.css +1 -1
  55. package/package.json +1 -1
  56. package/dist/config-CNDGpOqG.js.map +0 -1
  57. package/dist/index-Cpf2E6EU.js.map +0 -1
@@ -1,10 +1,10 @@
1
- (function(P,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("vue-router"),require("pinia"),require("quill")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","vue-router","pinia","quill"],e):(P=typeof globalThis<"u"?globalThis:P||self,e(P.kouxiangtang={},P.Vue,P.ElementPlus,P.VueRouter,P.Pinia,P.Quill))})(this,function(P,e,k,z,Ge,hn){"use strict";function Xa(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const jt=Xa(hn);function So(r,t){return function(){return r.apply(t,arguments)}}const{toString:Za}=Object.prototype,{getPrototypeOf:sr}=Object,mn=(r=>t=>{const n=Za.call(t);return r[n]||(r[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Te=r=>(r=r.toLowerCase(),t=>mn(t)===r),gn=r=>t=>typeof t===r,{isArray:gt}=Array,Ft=gn("undefined");function es(r){return r!==null&&!Ft(r)&&r.constructor!==null&&!Ft(r.constructor)&&ge(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const $o=Te("ArrayBuffer");function ts(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&$o(r.buffer),t}const ns=gn("string"),ge=gn("function"),Co=gn("number"),_n=r=>r!==null&&typeof r=="object",rs=r=>r===!0||r===!1,yn=r=>{if(mn(r)!=="object")return!1;const t=sr(r);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},os=Te("Date"),as=Te("File"),ss=Te("Blob"),is=Te("FileList"),ls=r=>_n(r)&&ge(r.pipe),cs=r=>{let t;return r&&(typeof FormData=="function"&&r instanceof FormData||ge(r.append)&&((t=mn(r))==="formdata"||t==="object"&&ge(r.toString)&&r.toString()==="[object FormData]"))},ds=Te("URLSearchParams"),us=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rt(r,t,{allOwnKeys:n=!1}={}){if(r===null||typeof r>"u")return;let o,s;if(typeof r!="object"&&(r=[r]),gt(r))for(o=0,s=r.length;o<s;o++)t.call(null,r[o],o,r);else{const a=n?Object.getOwnPropertyNames(r):Object.keys(r),i=a.length;let c;for(o=0;o<i;o++)c=a[o],t.call(null,r[c],c,r)}}function Vo(r,t){t=t.toLowerCase();const n=Object.keys(r);let o=n.length,s;for(;o-- >0;)if(s=n[o],t===s.toLowerCase())return s;return null}const Oo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,To=r=>!Ft(r)&&r!==Oo;function ir(){const{caseless:r}=To(this)&&this||{},t={},n=(o,s)=>{const a=r&&Vo(t,s)||s;yn(t[a])&&yn(o)?t[a]=ir(t[a],o):yn(o)?t[a]=ir({},o):gt(o)?t[a]=o.slice():t[a]=o};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&Rt(arguments[o],n);return t}const fs=(r,t,n,{allOwnKeys:o}={})=>(Rt(t,(s,a)=>{n&&ge(s)?r[a]=So(s,n):r[a]=s},{allOwnKeys:o}),r),ps=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),hs=(r,t,n,o)=>{r.prototype=Object.create(t.prototype,o),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:t.prototype}),n&&Object.assign(r.prototype,n)},ms=(r,t,n,o)=>{let s,a,i;const c={};if(t=t||{},r==null)return t;do{for(s=Object.getOwnPropertyNames(r),a=s.length;a-- >0;)i=s[a],(!o||o(i,r,t))&&!c[i]&&(t[i]=r[i],c[i]=!0);r=n!==!1&&sr(r)}while(r&&(!n||n(r,t))&&r!==Object.prototype);return t},gs=(r,t,n)=>{r=String(r),(n===void 0||n>r.length)&&(n=r.length),n-=t.length;const o=r.indexOf(t,n);return o!==-1&&o===n},_s=r=>{if(!r)return null;if(gt(r))return r;let t=r.length;if(!Co(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=r[t];return n},ys=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&sr(Uint8Array)),bs=(r,t)=>{const o=(r&&r[Symbol.iterator]).call(r);let s;for(;(s=o.next())&&!s.done;){const a=s.value;t.call(r,a[0],a[1])}},ws=(r,t)=>{let n;const o=[];for(;(n=r.exec(t))!==null;)o.push(n);return o},ks=Te("HTMLFormElement"),Es=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,s){return o.toUpperCase()+s}),No=(({hasOwnProperty:r})=>(t,n)=>r.call(t,n))(Object.prototype),xs=Te("RegExp"),Do=(r,t)=>{const n=Object.getOwnPropertyDescriptors(r),o={};Rt(n,(s,a)=>{let i;(i=t(s,a,r))!==!1&&(o[a]=i||s)}),Object.defineProperties(r,o)},Bs=r=>{Do(r,(t,n)=>{if(ge(r)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=r[n];if(ge(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ss=(r,t)=>{const n={},o=s=>{s.forEach(a=>{n[a]=!0})};return gt(r)?o(r):o(String(r).split(t)),n},$s=()=>{},Cs=(r,t)=>(r=+r,Number.isFinite(r)?r:t),lr="abcdefghijklmnopqrstuvwxyz",Ao="0123456789",jo={DIGIT:Ao,ALPHA:lr,ALPHA_DIGIT:lr+lr.toUpperCase()+Ao},Vs=(r=16,t=jo.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;r--;)n+=t[Math.random()*o|0];return n};function Os(r){return!!(r&&ge(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const Ts=r=>{const t=new Array(10),n=(o,s)=>{if(_n(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[s]=o;const a=gt(o)?[]:{};return Rt(o,(i,c)=>{const d=n(i,s+1);!Ft(d)&&(a[c]=d)}),t[s]=void 0,a}}return o};return n(r,0)},Ns=Te("AsyncFunction"),C={isArray:gt,isArrayBuffer:$o,isBuffer:es,isFormData:cs,isArrayBufferView:ts,isString:ns,isNumber:Co,isBoolean:rs,isObject:_n,isPlainObject:yn,isUndefined:Ft,isDate:os,isFile:as,isBlob:ss,isRegExp:xs,isFunction:ge,isStream:ls,isURLSearchParams:ds,isTypedArray:ys,isFileList:is,forEach:Rt,merge:ir,extend:fs,trim:us,stripBOM:ps,inherits:hs,toFlatObject:ms,kindOf:mn,kindOfTest:Te,endsWith:gs,toArray:_s,forEachEntry:bs,matchAll:ws,isHTMLForm:ks,hasOwnProperty:No,hasOwnProp:No,reduceDescriptors:Do,freezeMethods:Bs,toObjectSet:Ss,toCamelCase:Es,noop:$s,toFiniteNumber:Cs,findKey:Vo,global:Oo,isContextDefined:To,ALPHABET:jo,generateString:Vs,isSpecCompliantForm:Os,toJSONObject:Ts,isAsyncFn:Ns,isThenable:r=>r&&(_n(r)||ge(r))&&ge(r.then)&&ge(r.catch)};function H(r,t,n,o,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s)}C.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:C.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Fo=H.prototype,Ro={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Ro[r]={value:r}}),Object.defineProperties(H,Ro),Object.defineProperty(Fo,"isAxiosError",{value:!0}),H.from=(r,t,n,o,s,a)=>{const i=Object.create(Fo);return C.toFlatObject(r,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),H.call(i,r.message,t,n,o,s),i.cause=r,i.name=r.name,a&&Object.assign(i,a),i};const Ds=null;function cr(r){return C.isPlainObject(r)||C.isArray(r)}function Io(r){return C.endsWith(r,"[]")?r.slice(0,-2):r}function Mo(r,t,n){return r?r.concat(t).map(function(s,a){return s=Io(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function As(r){return C.isArray(r)&&!r.some(cr)}const js=C.toFlatObject(C,{},null,function(t){return/^is[A-Z]/.test(t)});function bn(r,t,n){if(!C.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,x){return!C.isUndefined(x[m])});const o=n.metaTokens,s=n.visitor||p,a=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(s))throw new TypeError("visitor must be a function");function h(w){if(w===null)return"";if(C.isDate(w))return w.toISOString();if(!d&&C.isBlob(w))throw new H("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(w)||C.isTypedArray(w)?d&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function p(w,m,x){let g=w;if(w&&!x&&typeof w=="object"){if(C.endsWith(m,"{}"))m=o?m:m.slice(0,-2),w=JSON.stringify(w);else if(C.isArray(w)&&As(w)||(C.isFileList(w)||C.endsWith(m,"[]"))&&(g=C.toArray(w)))return m=Io(m),g.forEach(function(E,S){!(C.isUndefined(E)||E===null)&&t.append(i===!0?Mo([m],S,a):i===null?m:m+"[]",h(E))}),!1}return cr(w)?!0:(t.append(Mo(x,m,a),h(w)),!1)}const f=[],b=Object.assign(js,{defaultVisitor:p,convertValue:h,isVisitable:cr});function B(w,m){if(!C.isUndefined(w)){if(f.indexOf(w)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(w),C.forEach(w,function(g,y){(!(C.isUndefined(g)||g===null)&&s.call(t,g,C.isString(y)?y.trim():y,m,b))===!0&&B(g,m?m.concat(y):[y])}),f.pop()}}if(!C.isObject(r))throw new TypeError("data must be an object");return B(r),t}function Lo(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function dr(r,t){this._pairs=[],r&&bn(r,this,t)}const Uo=dr.prototype;Uo.append=function(t,n){this._pairs.push([t,n])},Uo.toString=function(t){const n=t?function(o){return t.call(this,o,Lo)}:Lo;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Fs(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zo(r,t,n){if(!t)return r;const o=n&&n.encode||Fs,s=n&&n.serialize;let a;if(s?a=s(t,n):a=C.isURLSearchParams(t)?t.toString():new dr(t,n).toString(o),a){const i=r.indexOf("#");i!==-1&&(r=r.slice(0,i)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class Ho{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){C.forEach(this.handlers,function(o){o!==null&&t(o)})}}const qo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rs={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:dr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Po=typeof window<"u"&&typeof document<"u",Is=(r=>Po&&["ReactNative","NativeScript","NS"].indexOf(r)<0)(typeof navigator<"u"&&navigator.product),Ms=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ne={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Po,hasStandardBrowserEnv:Is,hasStandardBrowserWebWorkerEnv:Ms},Symbol.toStringTag,{value:"Module"})),...Rs};function Ls(r,t){return bn(r,new Ne.classes.URLSearchParams,Object.assign({visitor:function(n,o,s,a){return Ne.isNode&&C.isBuffer(n)?(this.append(o,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Us(r){return C.matchAll(/\w+|\[(\w*)]/g,r).map(t=>t[0]==="[]"?"":t[1]||t[0])}function zs(r){const t={},n=Object.keys(r);let o;const s=n.length;let a;for(o=0;o<s;o++)a=n[o],t[a]=r[a];return t}function Wo(r){function t(n,o,s,a){let i=n[a++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=a>=n.length;return i=!i&&C.isArray(s)?s.length:i,d?(C.hasOwnProp(s,i)?s[i]=[s[i],o]:s[i]=o,!c):((!s[i]||!C.isObject(s[i]))&&(s[i]=[]),t(n,o,s[i],a)&&C.isArray(s[i])&&(s[i]=zs(s[i])),!c)}if(C.isFormData(r)&&C.isFunction(r.entries)){const n={};return C.forEachEntry(r,(o,s)=>{t(Us(o),s,n,0)}),n}return null}function Hs(r,t,n){if(C.isString(r))try{return(t||JSON.parse)(r),C.trim(r)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(r)}const It={transitional:qo,adapter:["xhr","http"],transformRequest:[function(t,n){const o=n.getContentType()||"",s=o.indexOf("application/json")>-1,a=C.isObject(t);if(a&&C.isHTMLForm(t)&&(t=new FormData(t)),C.isFormData(t))return s?JSON.stringify(Wo(t)):t;if(C.isArrayBuffer(t)||C.isBuffer(t)||C.isStream(t)||C.isFile(t)||C.isBlob(t))return t;if(C.isArrayBufferView(t))return t.buffer;if(C.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Ls(t,this.formSerializer).toString();if((c=C.isFileList(t))||o.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return bn(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),Hs(t)):t}],transformResponse:[function(t){const n=this.transitional||It.transitional,o=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&C.isString(t)&&(o&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?H.from(c,H.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne.classes.FormData,Blob:Ne.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],r=>{It.headers[r]={}});const qs=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ps=r=>{const t={};let n,o,s;return r&&r.split(`
2
- `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),o=i.substring(s+1).trim(),!(!n||t[n]&&qs[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},Go=Symbol("internals");function Mt(r){return r&&String(r).trim().toLowerCase()}function wn(r){return r===!1||r==null?r:C.isArray(r)?r.map(wn):String(r)}function Ws(r){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(r);)t[o[1]]=o[2];return t}const Gs=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function ur(r,t,n,o,s){if(C.isFunction(o))return o.call(this,t,n);if(s&&(t=n),!!C.isString(t)){if(C.isString(o))return t.indexOf(o)!==-1;if(C.isRegExp(o))return o.test(t)}}function Qs(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function Js(r,t){const n=C.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(r,o+n,{value:function(s,a,i){return this[o].call(this,t,s,a,i)},configurable:!0})})}class _e{constructor(t){t&&this.set(t)}set(t,n,o){const s=this;function a(c,d,h){const p=Mt(d);if(!p)throw new Error("header name must be a non-empty string");const f=C.findKey(s,p);(!f||s[f]===void 0||h===!0||h===void 0&&s[f]!==!1)&&(s[f||d]=wn(c))}const i=(c,d)=>C.forEach(c,(h,p)=>a(h,p,d));return C.isPlainObject(t)||t instanceof this.constructor?i(t,n):C.isString(t)&&(t=t.trim())&&!Gs(t)?i(Ps(t),n):t!=null&&a(n,t,o),this}get(t,n){if(t=Mt(t),t){const o=C.findKey(this,t);if(o){const s=this[o];if(!n)return s;if(n===!0)return Ws(s);if(C.isFunction(n))return n.call(this,s,o);if(C.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Mt(t),t){const o=C.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||ur(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let s=!1;function a(i){if(i=Mt(i),i){const c=C.findKey(o,i);c&&(!n||ur(o,o[c],c,n))&&(delete o[c],s=!0)}}return C.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let o=n.length,s=!1;for(;o--;){const a=n[o];(!t||ur(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,o={};return C.forEach(this,(s,a)=>{const i=C.findKey(o,a);if(i){n[i]=wn(s),delete n[a];return}const c=t?Qs(a):String(a).trim();c!==a&&delete n[a],n[c]=wn(s),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return C.forEach(this,(o,s)=>{o!=null&&o!==!1&&(n[s]=t&&C.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[Go]=this[Go]={accessors:{}}).accessors,s=this.prototype;function a(i){const c=Mt(i);o[c]||(Js(s,i),o[c]=!0)}return C.isArray(t)?t.forEach(a):a(t),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.reduceDescriptors(_e.prototype,({value:r},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(o){this[n]=o}}}),C.freezeMethods(_e);function fr(r,t){const n=this||It,o=t||n,s=_e.from(o.headers);let a=o.data;return C.forEach(r,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Qo(r){return!!(r&&r.__CANCEL__)}function Lt(r,t,n){H.call(this,r??"canceled",H.ERR_CANCELED,t,n),this.name="CanceledError"}C.inherits(Lt,H,{__CANCEL__:!0});function Ks(r,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?r(n):t(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Ys=Ne.hasStandardBrowserEnv?{write(r,t,n,o,s,a){const i=[r+"="+encodeURIComponent(t)];C.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),C.isString(o)&&i.push("path="+o),C.isString(s)&&i.push("domain="+s),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(r){const t=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vs(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Xs(r,t){return t?r.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):r}function Jo(r,t){return r&&!vs(t)?Xs(r,t):t}const Zs=Ne.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function s(a){let i=a;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=s(window.location.href),function(i){const c=C.isString(i)?s(i):i;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}();function ei(r){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return t&&t[1]||""}function ti(r,t){r=r||10;const n=new Array(r),o=new Array(r);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),p=o[a];i||(i=h),n[s]=d,o[s]=h;let f=a,b=0;for(;f!==s;)b+=n[f++],f=f%r;if(s=(s+1)%r,s===a&&(a=(a+1)%r),h-i<t)return;const B=p&&h-p;return B?Math.round(b*1e3/B):void 0}}function Ko(r,t){let n=0;const o=ti(50,250);return s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-n,d=o(c),h=a<=i;n=a;const p={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&h?(i-a)/d:void 0,event:s};p[t?"download":"upload"]=!0,r(p)}}const pr={http:Ds,xhr:typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(n,o){let s=r.data;const a=_e.from(r.headers).normalize();let{responseType:i,withXSRFToken:c}=r,d;function h(){r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let p;if(C.isFormData(s)){if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((p=a.getContentType())!==!1){const[m,...x]=p?p.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([m||"multipart/form-data",...x].join("; "))}}let f=new XMLHttpRequest;if(r.auth){const m=r.auth.username||"",x=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";a.set("Authorization","Basic "+btoa(m+":"+x))}const b=Jo(r.baseURL,r.url);f.open(r.method.toUpperCase(),zo(b,r.params,r.paramsSerializer),!0),f.timeout=r.timeout;function B(){if(!f)return;const m=_e.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),g={data:!i||i==="text"||i==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:m,config:r,request:f};Ks(function(E){n(E),h()},function(E){o(E),h()},g),f=null}if("onloadend"in f?f.onloadend=B:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(B)},f.onabort=function(){f&&(o(new H("Request aborted",H.ECONNABORTED,r,f)),f=null)},f.onerror=function(){o(new H("Network Error",H.ERR_NETWORK,r,f)),f=null},f.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const g=r.transitional||qo;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),o(new H(x,g.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,r,f)),f=null},Ne.hasStandardBrowserEnv&&(c&&C.isFunction(c)&&(c=c(r)),c||c!==!1&&Zs(b))){const m=r.xsrfHeaderName&&r.xsrfCookieName&&Ys.read(r.xsrfCookieName);m&&a.set(r.xsrfHeaderName,m)}s===void 0&&a.setContentType(null),"setRequestHeader"in f&&C.forEach(a.toJSON(),function(x,g){f.setRequestHeader(g,x)}),C.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),i&&i!=="json"&&(f.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&f.addEventListener("progress",Ko(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",Ko(r.onUploadProgress)),(r.cancelToken||r.signal)&&(d=m=>{f&&(o(!m||m.type?new Lt(null,r,f):m),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const w=ei(b);if(w&&Ne.protocols.indexOf(w)===-1){o(new H("Unsupported protocol "+w+":",H.ERR_BAD_REQUEST,r));return}f.send(s||null)})}};C.forEach(pr,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{value:t})}catch{}Object.defineProperty(r,"adapterName",{value:t})}});const Yo=r=>`- ${r}`,ni=r=>C.isFunction(r)||r===null||r===!1,vo={getAdapter:r=>{r=C.isArray(r)?r:[r];const{length:t}=r;let n,o;const s={};for(let a=0;a<t;a++){n=r[a];let i;if(o=n,!ni(n)&&(o=pr[(i=String(n)).toLowerCase()],o===void 0))throw new H(`Unknown adapter '${i}'`);if(o)break;s[i||"#"+a]=o}if(!o){const a=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
1
+ (function(P,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("element-plus"),require("vue-router"),require("pinia"),require("quill")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","vue-router","pinia","quill"],e):(P=typeof globalThis<"u"?globalThis:P||self,e(P.kouxiangtang={},P.Vue,P.ElementPlus,P.VueRouter,P.Pinia,P.Quill))})(this,function(P,e,w,U,Ge,hn){"use strict";function Za(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const jt=Za(hn);function So(r,t){return function(){return r.apply(t,arguments)}}const{toString:es}=Object.prototype,{getPrototypeOf:sr}=Object,mn=(r=>t=>{const n=es.call(t);return r[n]||(r[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Te=r=>(r=r.toLowerCase(),t=>mn(t)===r),gn=r=>t=>typeof t===r,{isArray:gt}=Array,Ft=gn("undefined");function ts(r){return r!==null&&!Ft(r)&&r.constructor!==null&&!Ft(r.constructor)&&ge(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const $o=Te("ArrayBuffer");function ns(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&$o(r.buffer),t}const rs=gn("string"),ge=gn("function"),Co=gn("number"),_n=r=>r!==null&&typeof r=="object",os=r=>r===!0||r===!1,yn=r=>{if(mn(r)!=="object")return!1;const t=sr(r);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},as=Te("Date"),ss=Te("File"),is=Te("Blob"),ls=Te("FileList"),cs=r=>_n(r)&&ge(r.pipe),ds=r=>{let t;return r&&(typeof FormData=="function"&&r instanceof FormData||ge(r.append)&&((t=mn(r))==="formdata"||t==="object"&&ge(r.toString)&&r.toString()==="[object FormData]"))},us=Te("URLSearchParams"),fs=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rt(r,t,{allOwnKeys:n=!1}={}){if(r===null||typeof r>"u")return;let o,s;if(typeof r!="object"&&(r=[r]),gt(r))for(o=0,s=r.length;o<s;o++)t.call(null,r[o],o,r);else{const a=n?Object.getOwnPropertyNames(r):Object.keys(r),i=a.length;let c;for(o=0;o<i;o++)c=a[o],t.call(null,r[c],c,r)}}function Vo(r,t){t=t.toLowerCase();const n=Object.keys(r);let o=n.length,s;for(;o-- >0;)if(s=n[o],t===s.toLowerCase())return s;return null}const Oo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,To=r=>!Ft(r)&&r!==Oo;function ir(){const{caseless:r}=To(this)&&this||{},t={},n=(o,s)=>{const a=r&&Vo(t,s)||s;yn(t[a])&&yn(o)?t[a]=ir(t[a],o):yn(o)?t[a]=ir({},o):gt(o)?t[a]=o.slice():t[a]=o};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&Rt(arguments[o],n);return t}const ps=(r,t,n,{allOwnKeys:o}={})=>(Rt(t,(s,a)=>{n&&ge(s)?r[a]=So(s,n):r[a]=s},{allOwnKeys:o}),r),hs=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),ms=(r,t,n,o)=>{r.prototype=Object.create(t.prototype,o),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:t.prototype}),n&&Object.assign(r.prototype,n)},gs=(r,t,n,o)=>{let s,a,i;const c={};if(t=t||{},r==null)return t;do{for(s=Object.getOwnPropertyNames(r),a=s.length;a-- >0;)i=s[a],(!o||o(i,r,t))&&!c[i]&&(t[i]=r[i],c[i]=!0);r=n!==!1&&sr(r)}while(r&&(!n||n(r,t))&&r!==Object.prototype);return t},_s=(r,t,n)=>{r=String(r),(n===void 0||n>r.length)&&(n=r.length),n-=t.length;const o=r.indexOf(t,n);return o!==-1&&o===n},ys=r=>{if(!r)return null;if(gt(r))return r;let t=r.length;if(!Co(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=r[t];return n},bs=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&sr(Uint8Array)),ws=(r,t)=>{const o=(r&&r[Symbol.iterator]).call(r);let s;for(;(s=o.next())&&!s.done;){const a=s.value;t.call(r,a[0],a[1])}},ks=(r,t)=>{let n;const o=[];for(;(n=r.exec(t))!==null;)o.push(n);return o},Es=Te("HTMLFormElement"),xs=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,s){return o.toUpperCase()+s}),No=(({hasOwnProperty:r})=>(t,n)=>r.call(t,n))(Object.prototype),Bs=Te("RegExp"),Do=(r,t)=>{const n=Object.getOwnPropertyDescriptors(r),o={};Rt(n,(s,a)=>{let i;(i=t(s,a,r))!==!1&&(o[a]=i||s)}),Object.defineProperties(r,o)},Ss=r=>{Do(r,(t,n)=>{if(ge(r)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=r[n];if(ge(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$s=(r,t)=>{const n={},o=s=>{s.forEach(a=>{n[a]=!0})};return gt(r)?o(r):o(String(r).split(t)),n},Cs=()=>{},Vs=(r,t)=>(r=+r,Number.isFinite(r)?r:t),lr="abcdefghijklmnopqrstuvwxyz",Ao="0123456789",jo={DIGIT:Ao,ALPHA:lr,ALPHA_DIGIT:lr+lr.toUpperCase()+Ao},Os=(r=16,t=jo.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;r--;)n+=t[Math.random()*o|0];return n};function Ts(r){return!!(r&&ge(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const Ns=r=>{const t=new Array(10),n=(o,s)=>{if(_n(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[s]=o;const a=gt(o)?[]:{};return Rt(o,(i,c)=>{const d=n(i,s+1);!Ft(d)&&(a[c]=d)}),t[s]=void 0,a}}return o};return n(r,0)},Ds=Te("AsyncFunction"),C={isArray:gt,isArrayBuffer:$o,isBuffer:ts,isFormData:ds,isArrayBufferView:ns,isString:rs,isNumber:Co,isBoolean:os,isObject:_n,isPlainObject:yn,isUndefined:Ft,isDate:as,isFile:ss,isBlob:is,isRegExp:Bs,isFunction:ge,isStream:cs,isURLSearchParams:us,isTypedArray:bs,isFileList:ls,forEach:Rt,merge:ir,extend:ps,trim:fs,stripBOM:hs,inherits:ms,toFlatObject:gs,kindOf:mn,kindOfTest:Te,endsWith:_s,toArray:ys,forEachEntry:ws,matchAll:ks,isHTMLForm:Es,hasOwnProperty:No,hasOwnProp:No,reduceDescriptors:Do,freezeMethods:Ss,toObjectSet:$s,toCamelCase:xs,noop:Cs,toFiniteNumber:Vs,findKey:Vo,global:Oo,isContextDefined:To,ALPHABET:jo,generateString:Os,isSpecCompliantForm:Ts,toJSONObject:Ns,isAsyncFn:Ds,isThenable:r=>r&&(_n(r)||ge(r))&&ge(r.then)&&ge(r.catch)};function H(r,t,n,o,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s)}C.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:C.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Fo=H.prototype,Ro={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Ro[r]={value:r}}),Object.defineProperties(H,Ro),Object.defineProperty(Fo,"isAxiosError",{value:!0}),H.from=(r,t,n,o,s,a)=>{const i=Object.create(Fo);return C.toFlatObject(r,i,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),H.call(i,r.message,t,n,o,s),i.cause=r,i.name=r.name,a&&Object.assign(i,a),i};const As=null;function cr(r){return C.isPlainObject(r)||C.isArray(r)}function Io(r){return C.endsWith(r,"[]")?r.slice(0,-2):r}function Mo(r,t,n){return r?r.concat(t).map(function(s,a){return s=Io(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function js(r){return C.isArray(r)&&!r.some(cr)}const Fs=C.toFlatObject(C,{},null,function(t){return/^is[A-Z]/.test(t)});function bn(r,t,n){if(!C.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,x){return!C.isUndefined(x[m])});const o=n.metaTokens,s=n.visitor||f,a=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(s))throw new TypeError("visitor must be a function");function h(k){if(k===null)return"";if(C.isDate(k))return k.toISOString();if(!d&&C.isBlob(k))throw new H("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(k)||C.isTypedArray(k)?d&&typeof Blob=="function"?new Blob([k]):Buffer.from(k):k}function f(k,m,x){let g=k;if(k&&!x&&typeof k=="object"){if(C.endsWith(m,"{}"))m=o?m:m.slice(0,-2),k=JSON.stringify(k);else if(C.isArray(k)&&js(k)||(C.isFileList(k)||C.endsWith(m,"[]"))&&(g=C.toArray(k)))return m=Io(m),g.forEach(function(E,S){!(C.isUndefined(E)||E===null)&&t.append(i===!0?Mo([m],S,a):i===null?m:m+"[]",h(E))}),!1}return cr(k)?!0:(t.append(Mo(x,m,a),h(k)),!1)}const p=[],y=Object.assign(Fs,{defaultVisitor:f,convertValue:h,isVisitable:cr});function B(k,m){if(!C.isUndefined(k)){if(p.indexOf(k)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(k),C.forEach(k,function(g,b){(!(C.isUndefined(g)||g===null)&&s.call(t,g,C.isString(b)?b.trim():b,m,y))===!0&&B(g,m?m.concat(b):[b])}),p.pop()}}if(!C.isObject(r))throw new TypeError("data must be an object");return B(r),t}function Lo(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function dr(r,t){this._pairs=[],r&&bn(r,this,t)}const Uo=dr.prototype;Uo.append=function(t,n){this._pairs.push([t,n])},Uo.toString=function(t){const n=t?function(o){return t.call(this,o,Lo)}:Lo;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Rs(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zo(r,t,n){if(!t)return r;const o=n&&n.encode||Rs,s=n&&n.serialize;let a;if(s?a=s(t,n):a=C.isURLSearchParams(t)?t.toString():new dr(t,n).toString(o),a){const i=r.indexOf("#");i!==-1&&(r=r.slice(0,i)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class Ho{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){C.forEach(this.handlers,function(o){o!==null&&t(o)})}}const qo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Is={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:dr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Po=typeof window<"u"&&typeof document<"u",Ms=(r=>Po&&["ReactNative","NativeScript","NS"].indexOf(r)<0)(typeof navigator<"u"&&navigator.product),Ls=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ne={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Po,hasStandardBrowserEnv:Ms,hasStandardBrowserWebWorkerEnv:Ls},Symbol.toStringTag,{value:"Module"})),...Is};function Us(r,t){return bn(r,new Ne.classes.URLSearchParams,Object.assign({visitor:function(n,o,s,a){return Ne.isNode&&C.isBuffer(n)?(this.append(o,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function zs(r){return C.matchAll(/\w+|\[(\w*)]/g,r).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hs(r){const t={},n=Object.keys(r);let o;const s=n.length;let a;for(o=0;o<s;o++)a=n[o],t[a]=r[a];return t}function Wo(r){function t(n,o,s,a){let i=n[a++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=a>=n.length;return i=!i&&C.isArray(s)?s.length:i,d?(C.hasOwnProp(s,i)?s[i]=[s[i],o]:s[i]=o,!c):((!s[i]||!C.isObject(s[i]))&&(s[i]=[]),t(n,o,s[i],a)&&C.isArray(s[i])&&(s[i]=Hs(s[i])),!c)}if(C.isFormData(r)&&C.isFunction(r.entries)){const n={};return C.forEachEntry(r,(o,s)=>{t(zs(o),s,n,0)}),n}return null}function qs(r,t,n){if(C.isString(r))try{return(t||JSON.parse)(r),C.trim(r)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(r)}const It={transitional:qo,adapter:["xhr","http"],transformRequest:[function(t,n){const o=n.getContentType()||"",s=o.indexOf("application/json")>-1,a=C.isObject(t);if(a&&C.isHTMLForm(t)&&(t=new FormData(t)),C.isFormData(t))return s?JSON.stringify(Wo(t)):t;if(C.isArrayBuffer(t)||C.isBuffer(t)||C.isStream(t)||C.isFile(t)||C.isBlob(t))return t;if(C.isArrayBufferView(t))return t.buffer;if(C.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Us(t,this.formSerializer).toString();if((c=C.isFileList(t))||o.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return bn(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),qs(t)):t}],transformResponse:[function(t){const n=this.transitional||It.transitional,o=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&C.isString(t)&&(o&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?H.from(c,H.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ne.classes.FormData,Blob:Ne.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],r=>{It.headers[r]={}});const Ps=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ws=r=>{const t={};let n,o,s;return r&&r.split(`
2
+ `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),o=i.substring(s+1).trim(),!(!n||t[n]&&Ps[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},Go=Symbol("internals");function Mt(r){return r&&String(r).trim().toLowerCase()}function wn(r){return r===!1||r==null?r:C.isArray(r)?r.map(wn):String(r)}function Gs(r){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(r);)t[o[1]]=o[2];return t}const Qs=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function ur(r,t,n,o,s){if(C.isFunction(o))return o.call(this,t,n);if(s&&(t=n),!!C.isString(t)){if(C.isString(o))return t.indexOf(o)!==-1;if(C.isRegExp(o))return o.test(t)}}function Js(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function Ks(r,t){const n=C.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(r,o+n,{value:function(s,a,i){return this[o].call(this,t,s,a,i)},configurable:!0})})}class _e{constructor(t){t&&this.set(t)}set(t,n,o){const s=this;function a(c,d,h){const f=Mt(d);if(!f)throw new Error("header name must be a non-empty string");const p=C.findKey(s,f);(!p||s[p]===void 0||h===!0||h===void 0&&s[p]!==!1)&&(s[p||d]=wn(c))}const i=(c,d)=>C.forEach(c,(h,f)=>a(h,f,d));return C.isPlainObject(t)||t instanceof this.constructor?i(t,n):C.isString(t)&&(t=t.trim())&&!Qs(t)?i(Ws(t),n):t!=null&&a(n,t,o),this}get(t,n){if(t=Mt(t),t){const o=C.findKey(this,t);if(o){const s=this[o];if(!n)return s;if(n===!0)return Gs(s);if(C.isFunction(n))return n.call(this,s,o);if(C.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Mt(t),t){const o=C.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||ur(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let s=!1;function a(i){if(i=Mt(i),i){const c=C.findKey(o,i);c&&(!n||ur(o,o[c],c,n))&&(delete o[c],s=!0)}}return C.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let o=n.length,s=!1;for(;o--;){const a=n[o];(!t||ur(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,o={};return C.forEach(this,(s,a)=>{const i=C.findKey(o,a);if(i){n[i]=wn(s),delete n[a];return}const c=t?Js(a):String(a).trim();c!==a&&delete n[a],n[c]=wn(s),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return C.forEach(this,(o,s)=>{o!=null&&o!==!1&&(n[s]=t&&C.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[Go]=this[Go]={accessors:{}}).accessors,s=this.prototype;function a(i){const c=Mt(i);o[c]||(Ks(s,i),o[c]=!0)}return C.isArray(t)?t.forEach(a):a(t),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.reduceDescriptors(_e.prototype,({value:r},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(o){this[n]=o}}}),C.freezeMethods(_e);function fr(r,t){const n=this||It,o=t||n,s=_e.from(o.headers);let a=o.data;return C.forEach(r,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Qo(r){return!!(r&&r.__CANCEL__)}function Lt(r,t,n){H.call(this,r??"canceled",H.ERR_CANCELED,t,n),this.name="CanceledError"}C.inherits(Lt,H,{__CANCEL__:!0});function Ys(r,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?r(n):t(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Xs=Ne.hasStandardBrowserEnv?{write(r,t,n,o,s,a){const i=[r+"="+encodeURIComponent(t)];C.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),C.isString(o)&&i.push("path="+o),C.isString(s)&&i.push("domain="+s),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(r){const t=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vs(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Zs(r,t){return t?r.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):r}function Jo(r,t){return r&&!vs(t)?Zs(r,t):t}const ei=Ne.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function s(a){let i=a;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=s(window.location.href),function(i){const c=C.isString(i)?s(i):i;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}();function ti(r){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return t&&t[1]||""}function ni(r,t){r=r||10;const n=new Array(r),o=new Array(r);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),f=o[a];i||(i=h),n[s]=d,o[s]=h;let p=a,y=0;for(;p!==s;)y+=n[p++],p=p%r;if(s=(s+1)%r,s===a&&(a=(a+1)%r),h-i<t)return;const B=f&&h-f;return B?Math.round(y*1e3/B):void 0}}function Ko(r,t){let n=0;const o=ni(50,250);return s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-n,d=o(c),h=a<=i;n=a;const f={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&h?(i-a)/d:void 0,event:s};f[t?"download":"upload"]=!0,r(f)}}const pr={http:As,xhr:typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(n,o){let s=r.data;const a=_e.from(r.headers).normalize();let{responseType:i,withXSRFToken:c}=r,d;function h(){r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let f;if(C.isFormData(s)){if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((f=a.getContentType())!==!1){const[m,...x]=f?f.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([m||"multipart/form-data",...x].join("; "))}}let p=new XMLHttpRequest;if(r.auth){const m=r.auth.username||"",x=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";a.set("Authorization","Basic "+btoa(m+":"+x))}const y=Jo(r.baseURL,r.url);p.open(r.method.toUpperCase(),zo(y,r.params,r.paramsSerializer),!0),p.timeout=r.timeout;function B(){if(!p)return;const m=_e.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),g={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:m,config:r,request:p};Ys(function(E){n(E),h()},function(E){o(E),h()},g),p=null}if("onloadend"in p?p.onloadend=B:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(B)},p.onabort=function(){p&&(o(new H("Request aborted",H.ECONNABORTED,r,p)),p=null)},p.onerror=function(){o(new H("Network Error",H.ERR_NETWORK,r,p)),p=null},p.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const g=r.transitional||qo;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),o(new H(x,g.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,r,p)),p=null},Ne.hasStandardBrowserEnv&&(c&&C.isFunction(c)&&(c=c(r)),c||c!==!1&&ei(y))){const m=r.xsrfHeaderName&&r.xsrfCookieName&&Xs.read(r.xsrfCookieName);m&&a.set(r.xsrfHeaderName,m)}s===void 0&&a.setContentType(null),"setRequestHeader"in p&&C.forEach(a.toJSON(),function(x,g){p.setRequestHeader(g,x)}),C.isUndefined(r.withCredentials)||(p.withCredentials=!!r.withCredentials),i&&i!=="json"&&(p.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&p.addEventListener("progress",Ko(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",Ko(r.onUploadProgress)),(r.cancelToken||r.signal)&&(d=m=>{p&&(o(!m||m.type?new Lt(null,r,p):m),p.abort(),p=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const k=ti(y);if(k&&Ne.protocols.indexOf(k)===-1){o(new H("Unsupported protocol "+k+":",H.ERR_BAD_REQUEST,r));return}p.send(s||null)})}};C.forEach(pr,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{value:t})}catch{}Object.defineProperty(r,"adapterName",{value:t})}});const Yo=r=>`- ${r}`,ri=r=>C.isFunction(r)||r===null||r===!1,Xo={getAdapter:r=>{r=C.isArray(r)?r:[r];const{length:t}=r;let n,o;const s={};for(let a=0;a<t;a++){n=r[a];let i;if(o=n,!ri(n)&&(o=pr[(i=String(n)).toLowerCase()],o===void 0))throw new H(`Unknown adapter '${i}'`);if(o)break;s[i||"#"+a]=o}if(!o){const a=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
4
4
  `+a.map(Yo).join(`
5
- `):" "+Yo(a[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:pr};function hr(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Lt(null,r)}function Xo(r){return hr(r),r.headers=_e.from(r.headers),r.data=fr.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),vo.getAdapter(r.adapter||It.adapter)(r).then(function(o){return hr(r),o.data=fr.call(r,r.transformResponse,o),o.headers=_e.from(o.headers),o},function(o){return Qo(o)||(hr(r),o&&o.response&&(o.response.data=fr.call(r,r.transformResponse,o.response),o.response.headers=_e.from(o.response.headers))),Promise.reject(o)})}const Zo=r=>r instanceof _e?{...r}:r;function _t(r,t){t=t||{};const n={};function o(h,p,f){return C.isPlainObject(h)&&C.isPlainObject(p)?C.merge.call({caseless:f},h,p):C.isPlainObject(p)?C.merge({},p):C.isArray(p)?p.slice():p}function s(h,p,f){if(C.isUndefined(p)){if(!C.isUndefined(h))return o(void 0,h,f)}else return o(h,p,f)}function a(h,p){if(!C.isUndefined(p))return o(void 0,p)}function i(h,p){if(C.isUndefined(p)){if(!C.isUndefined(h))return o(void 0,h)}else return o(void 0,p)}function c(h,p,f){if(f in t)return o(h,p);if(f in r)return o(void 0,h)}const d={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(h,p)=>s(Zo(h),Zo(p),!0)};return C.forEach(Object.keys(Object.assign({},r,t)),function(p){const f=d[p]||s,b=f(r[p],t[p],p);C.isUndefined(b)&&f!==c||(n[p]=b)}),n}const ea="1.6.8",mr={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{mr[r]=function(o){return typeof o===r||"a"+(t<1?"n ":" ")+r}});const ta={};mr.transitional=function(t,n,o){function s(a,i){return"[Axios v"+ea+"] Transitional option '"+a+"'"+i+(o?". "+o:"")}return(a,i,c)=>{if(t===!1)throw new H(s(i," has been removed"+(n?" in "+n:"")),H.ERR_DEPRECATED);return n&&!ta[i]&&(ta[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,c):!0}};function ri(r,t,n){if(typeof r!="object")throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let s=o.length;for(;s-- >0;){const a=o[s],i=t[a];if(i){const c=r[a],d=c===void 0||i(c,a,r);if(d!==!0)throw new H("option "+a+" must be "+d,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H("Unknown option "+a,H.ERR_BAD_OPTION)}}const gr={assertOptions:ri,validators:mr},Ze=gr.validators;class st{constructor(t){this.defaults=t,this.interceptors={request:new Ho,response:new Ho}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=`
6
- `+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=_t(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:a}=n;o!==void 0&&gr.assertOptions(o,{silentJSONParsing:Ze.transitional(Ze.boolean),forcedJSONParsing:Ze.transitional(Ze.boolean),clarifyTimeoutError:Ze.transitional(Ze.boolean)},!1),s!=null&&(C.isFunction(s)?n.paramsSerializer={serialize:s}:gr.assertOptions(s,{encode:Ze.function,serialize:Ze.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&C.merge(a.common,a[n.method]);a&&C.forEach(["delete","get","head","post","put","patch","common"],w=>{delete a[w]}),n.headers=_e.concat(i,a);const c=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const h=[];this.interceptors.response.forEach(function(m){h.push(m.fulfilled,m.rejected)});let p,f=0,b;if(!d){const w=[Xo.bind(this),void 0];for(w.unshift.apply(w,c),w.push.apply(w,h),b=w.length,p=Promise.resolve(n);f<b;)p=p.then(w[f++],w[f++]);return p}b=c.length;let B=n;for(f=0;f<b;){const w=c[f++],m=c[f++];try{B=w(B)}catch(x){m.call(this,x);break}}try{p=Xo.call(this,B)}catch(w){return Promise.reject(w)}for(f=0,b=h.length;f<b;)p=p.then(h[f++],h[f++]);return p}getUri(t){t=_t(this.defaults,t);const n=Jo(t.baseURL,t.url);return zo(n,t.params,t.paramsSerializer)}}C.forEach(["delete","get","head","options"],function(t){st.prototype[t]=function(n,o){return this.request(_t(o||{},{method:t,url:n,data:(o||{}).data}))}}),C.forEach(["post","put","patch"],function(t){function n(o){return function(a,i,c){return this.request(_t(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}st.prototype[t]=n(),st.prototype[t+"Form"]=n(!0)});class _r{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const o=this;this.promise.then(s=>{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](s);o._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(c=>{o.subscribe(c),a=c}).then(s);return i.cancel=function(){o.unsubscribe(a)},i},t(function(a,i,c){o.reason||(o.reason=new Lt(a,i,c),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new _r(function(s){t=s}),cancel:t}}}function oi(r){return function(n){return r.apply(null,n)}}function ai(r){return C.isObject(r)&&r.isAxiosError===!0}const yr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yr).forEach(([r,t])=>{yr[t]=r});function na(r){const t=new st(r),n=So(st.prototype.request,t);return C.extend(n,st.prototype,t,{allOwnKeys:!0}),C.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return na(_t(r,s))},n}const X=na(It);X.Axios=st,X.CanceledError=Lt,X.CancelToken=_r,X.isCancel=Qo,X.VERSION=ea,X.toFormData=bn,X.AxiosError=H,X.Cancel=X.CanceledError,X.all=function(t){return Promise.all(t)},X.spread=oi,X.isAxiosError=ai,X.mergeConfig=_t,X.AxiosHeaders=_e,X.formToJSON=r=>Wo(C.isHTMLForm(r)?new FormData(r):r),X.getAdapter=vo.getAdapter,X.HttpStatusCode=yr,X.default=X;let yt=null;function si(r){yt=X.create(r)}function ii(){return yt}async function li(r,t={},n={}){return new Promise((o,s)=>{yt.get(r,{headers:n,params:t}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function ci(r,t,n={}){return new Promise((o,s)=>{yt.post(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}async function di(r,t,n={}){return new Promise((o,s)=>{yt.delete(r,{data:t,headers:n}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function ui(r,t,n={}){return new Promise((o,s)=>{yt.put(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}const ye={get:li,post:ci,put:ui,remove:di,setupAxios:si,getAxiosInstance:ii};var re=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ra(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function fi(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var oa={exports:{}};(function(r,t){(function(n,o){typeof fi=="function"?r.exports=o():n.pluralize=o()})(re,function(){var n=[],o=[],s={},a={},i={};function c(m){return typeof m=="string"?new RegExp("^"+m+"$","i"):m}function d(m,x){return m===x?x:m===m.toLowerCase()?x.toLowerCase():m===m.toUpperCase()?x.toUpperCase():m[0]===m[0].toUpperCase()?x.charAt(0).toUpperCase()+x.substr(1).toLowerCase():x.toLowerCase()}function h(m,x){return m.replace(/\$(\d{1,2})/g,function(g,y){return x[y]||""})}function p(m,x){return m.replace(x[0],function(g,y){var E=h(x[1],arguments);return d(g===""?m[y-1]:g,E)})}function f(m,x,g){if(!m.length||s.hasOwnProperty(m))return x;for(var y=g.length;y--;){var E=g[y];if(E[0].test(x))return p(x,E)}return x}function b(m,x,g){return function(y){var E=y.toLowerCase();return x.hasOwnProperty(E)?d(y,E):m.hasOwnProperty(E)?d(y,m[E]):f(E,y,g)}}function B(m,x,g,y){return function(E){var S=E.toLowerCase();return x.hasOwnProperty(S)?!0:m.hasOwnProperty(S)?!1:f(S,S,g)===S}}function w(m,x,g){var y=x===1?w.singular(m):w.plural(m);return(g?x+" ":"")+y}return w.plural=b(i,a,n),w.isPlural=B(i,a,n),w.singular=b(a,i,o),w.isSingular=B(a,i,o),w.addPluralRule=function(m,x){n.push([c(m),x])},w.addSingularRule=function(m,x){o.push([c(m),x])},w.addUncountableRule=function(m){if(typeof m=="string"){s[m.toLowerCase()]=!0;return}w.addPluralRule(m,"$0"),w.addSingularRule(m,"$0")},w.addIrregularRule=function(m,x){x=x.toLowerCase(),m=m.toLowerCase(),i[m]=x,a[x]=m},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(m){return w.addIrregularRule(m[0],m[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(m){return w.addPluralRule(m[0],m[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(m){return w.addSingularRule(m[0],m[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(w.addUncountableRule),w})})(oa);var pi=oa.exports;const aa=ra(pi),br=r=>r.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),kn="GET_LIST",En="GET_ONE",xn="CREATE",Bn="UPDATE",bt="REMOVE",wr="RESTORE",sa="ENABLE",hi=[kn,En,xn,Bn,bt,sa];class mi{constructor(t,n,o=hi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=aa(n),this.operations=o,this.operations.forEach(s=>{const a=br(s.toLowerCase());this[a]=this[`_${a}`]})}_getList(t){if(!this.operations.includes(kn)){console.log(`${this.side}/${this.domain} 不支持 ${kn} 操作`);return}return ye.get(`${this.side}/${this.resources}`,t)}_getOne(t){if(!this.operations.includes(En)){console.log(`${this.side}/${this.domain} 不支持 ${En} 操作`);return}return ye.get(`${this.side}/${this.resources}/${t.id}`)}_create(t){if(!this.operations.includes(xn)){console.log(`${this.side}/${this.domain} 不支持 ${xn} 操作`);return}return ye.post(`${this.side}/${this.resources}`,t)}_update(t){if(!this.operations.includes(Bn)){console.log(`${this.side}/${this.domain} 不支持 ${Bn} 操作`);return}return ye.put(`${this.side}/${this.resources}/${t.id}`,t)}_remove(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return ye.remove(`${this.side}/${this.resources}/${t.id}`,t)}_restore(t){if(!this.operations.includes(wr)){console.log(`${this.side}/${this.domain} 不支持 ${wr} 操作`);return}return ye.put(`${this.side}/${this.resources}/${t.id}/restore`,t)}_enable(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return ye.put(`${this.side}/${this.resources}/${t.id}/switch`,t)}}class gi{constructor(t,n,o){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=aa(n),this.listQuerys=o}getList(t){let n=t;return this.listQuerys&&(n={...this.listQuerys,...t}),ye.get(`${this.side}/${this.resources}`,n)}getOne(t){return ye.get(`${this.side}/${this.resources}/${t.id}`)}}const _i={Client:mi,ReadOnlyClient:gi,GET_LIST:kn,GET_ONE:En,CREATE:xn,UPDATE:Bn,REMOVE:bt,RESTORE:wr,ENABLE:sa},yi=(r,t,n)=>{const o=r[t];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},bi=["createdAt","updatedAt","deletedAt"];class ee{constructor(t,n){this.domain=n,this.type=t.type||"string",this.code=t.code,this.label=t.label,this.showInList=this._showInList(t),this.showInDetail=this._showInDetail(t),this.extendDetail=t.extendDetail||!1,this.rules=t.rules||[],this.editable=this._editable(t),this.visible=this._visible(t),this.width=this.computeWidth(t),this.span=t.span||6,this.wholeRow=(t==null?void 0:t.wholeRow)||!1,this.fixed=!1,this.maxImageCounts=t.maxImageCounts,this.format=t.format||"HH:mm:ss"}computeWidth(t){return t.width?t.width:bi.includes(t.code)?200:t.code==="id"||t.type==="image"?100:null}defaultBy(t,n){return t??n}checkValidProperties(t){const n=Object.getOwnPropertyNames(t),o=Object.getOwnPropertyNames(this);if(n.every(a=>o.includes(a)))return;const s=n.filter(a=>!o.includes(a));console.error(`invalid field config props: [${s}] for ${this.domain}:${this.code}`)}_showInList(t){const n=t.showInList;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if("showInList"in this.defaultConfig())return()=>this.defaultConfig().showInList;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInList : ${n}`)}_showInDetail(t){const n=t.showInDetail;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInDetail : ${n}`)}_editable(t){const n=t.editable;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!1;throw new Exception(`invalid editable : ${n}`)}_visible(t){const n=t.visible;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return this._editable(t);throw new Exception(`invalid visible : ${n}`)}defaultConfig(){return{}}}function ia(r,t,n){console.warn(`${r}.${t} => ${n}`)}const kr={select:{config:"select"},"belongs-to":{config:"belongs-to"},boolean:{config:"boolean"},switch:{config:"switch",deprecated:"switch 字段类型即将废弃,请使用 boolean"},datetime:{config:"datetime"},date:{config:"date"},time:{config:"time"},editor:{config:"rich-text",deprecated:"editor 字段类型即将废弃,请使用 rich-text"},"rich-text":{config:"rich-text"},image:{config:"image"},images:{config:"images"},attachment:{config:"attachment"},attachments:{config:"attachment",deprecated:"attachments 字段类型即将废弃,请使用 attachment"},json:{config:"json"},"row-id":{config:"row-id"},string:{config:"string"},text:{config:"text"},textarea:{config:"text",deprecated:"textarea 字段类型即将废弃,请使用 text"},tree:{config:"tree-select",deprecated:"tree 字段类型即将废弃,请使用 tree-select"},"tree-select":{config:"tree-select"},cascader:{config:"cascader"},component:{config:"component"}};async function la(r,t,n){const o=await yi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>ad),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>dd),"./field/boolean/config.js":()=>Promise.resolve().then(()=>md),"./field/cascader/config.js":()=>Promise.resolve().then(()=>wd),"./field/component/config.js":()=>Promise.resolve().then(()=>Ed),"./field/date/config.js":()=>Promise.resolve().then(()=>Cd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>Dd),"./field/image/config.js":()=>Promise.resolve().then(()=>Ud),"./field/images/config.js":()=>Promise.resolve().then(()=>Jd),"./field/json/config.js":()=>Promise.resolve().then(()=>Xd),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>au),"./field/row-id/config.js":()=>Promise.resolve().then(()=>iu),"./field/select/config.js":()=>Promise.resolve().then(()=>xu),"./field/string/config.js":()=>Promise.resolve().then(()=>Vu),"./field/switch/config.js":()=>Promise.resolve().then(()=>Au),"./field/text/config.js":()=>Promise.resolve().then(()=>Mu),"./field/time/config.js":()=>Promise.resolve().then(()=>qu),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>Qu)}),`./field/${r}/config.js`,4);return new o.default(t,n)}function ca(r,t="unknown"){return r.map(o=>{if(o instanceof ee)return o;if(o.code==="id"?o.type="row-id":o.component&&(o.type="component"),Object.keys(kr).includes(o.type)){const s=kr[o.type];return s.deprecated&&ia(o.domain||t,o.code,s.deprecated),la(kr[o.type].config,o,o.domain||t)}return la("string",o,o.domain||t)})}let Er={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},Ut={};function wi(r){Er={...Er,...r},Ut=r.domainConfigs}function ki(r){Object.keys(Ut).forEach(t=>{const n=Ut[t];Object.keys(n).forEach(o=>{const s=n[o];s.load=r(t,o)})})}function et(){return Er}function xr(){return Ut}function zt(r,t){return Ut[r][t].load().then(n=>{const o=n.default;return Promise.all(o.fields).then(s=>(o.fields=s,o))})}class Ei{constructor(t,n){this.side=t;const o=n.config?n.config:n;this.code=o.code,this.fields=ca(o.fields,o.code),!o.simple&&(this.name=xr()[t][o.code].name,this.filters=o.filters||[],this.coverField=o.coverField,this.nameField=o.nameField||"name",this.showSubmit=o.showSubmit||!0,this.showEdit=this.setupShowEdit(o.showEdit),this.submitConfirm=o.submitConfirm,this.removeConfirm=o.removeConfirm,this.showCreate=this.setupShowCreate(o.showCreate),this.hasMany=this.createHasMany(n),this.hasOne=this.createHasOne(n),this.detailSubType=o.detailSubType?"list":"tabs",this.formatName=this.createFormatName(n.formatName),this.rest=this.createRestClient(n.rest),this.rowActions=this.setupRowActions(n),this.pageActions=this.setupPageActions(n),this.actionsWidth=n.actionsWidth||150,this.formHook=n.form||{},this.filterHook=n.filterForm||{},this.restRepeat=this.restRepeat(n.restRepeat),this.btnVisible=n.btnVisible||{},this.operations=this.setupOperations(),this.formLayout=n.formLayout||[],this.displayMode=n.displayMode||{})}wrapFields(t,n){return ca(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:`#${n.id}`}createHasOne(t){return n=>{if(typeof t.hasOne>"u")return[];if(Array.isArray(t.hasOne))return t.hasOne;if(typeof t.hasOne=="function"){const o=t.hasOne(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> hasOne 必须返回数组`),[])}return console.warn(`${this.code} --> hasOne 必须返回数组`),[]}}createHasMany(t){return n=>{if(typeof t.hasMany>"u")return[];if(Array.isArray(t.hasMany))return t.hasMany;if(typeof t.hasMany=="function"){const o=t.hasMany(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> hasMany 必须返回数组`),[])}return console.warn(`${this.code} --> hasMany 必须返回数组`),[]}}setupPageActions(t){return n=>{if(typeof t.pageActions>"u")return[];if(Array.isArray(t.pageActions))return t.pageActions;if(typeof t.pageActions=="function"){const o=t.pageActions(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> page actions 必须返回数组`),[])}return console.warn(`${this.code} --> page actions 必须返回数组`),[]}}setupRowActions(t){return n=>{if(typeof t.rowActions>"u")return[];if(Array.isArray(t.rowActions))return t.rowActions;if(typeof t.rowActions=="function"){const o=t.rowActions(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> row actions 必须返回数组`),[])}return console.warn(`${this.code} --> row actions 必须返回数组`),[]}}setupShowCreate(t){return typeof t=="boolean"?()=>t:typeof t=="function"?n=>t(n):()=>!0}setupShowEdit(t){return typeof t=="boolean"?()=>t:typeof t=="function"?(n,o)=>t(n,o):()=>!0}restRepeat(t){return typeof t=="function"?n=>t():()=>""}setupOperations(t){const n={creatable:this.rest.create!=null,updatable:this.rest.update!=null,removable:this.rest.remove!=null,restorable:this.rest.restore!=null,showable:this.rest.getOne!=null};return o=>{const s=this.showCreate(o);return{...n,creatable:n.creatable&&s}}}}function da(r,t){return new Ei(r,t)}const M=(r,t)=>{const n=r.__vccOpts||r;for(const[o,s]of t)n[o]=s;return n},xi={class:"card-header"},Bi={class:"title"},ua=M({__name:"Widget",props:{title:{type:String}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createBlock(e.unref(k.ElCard),{shadow:"never"},e.createSlots({default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:2},[t.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",xi,[e.createElementVNode("span",Bi,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-c5513c07"]]),Si={key:0},$i={key:1},Ci={key:0},Vi={key:1},fa=M({__name:"Statistic",props:{title:{type:String},value:{type:Number},background:{type:String},align:{type:String,default:"left"},link:{type:String}},setup(r){const t=r;let n="#f7faff",o="10px";return t.background&&(n=t.background,n=="none"&&(o="0px")),(s,a)=>{const i=e.resolveComponent("RouterLink");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle(`background: ${e.unref(n)}; padding: ${e.unref(o)}`)},[e.createElementVNode("div",{class:"item-box-data mono-data",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.value!=null?(e.openBlock(),e.createElementBlock("span",Si,e.toDisplayString(t.value),1)):(e.openBlock(),e.createElementBlock("span",$i,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Ci,[e.createVNode(i,{to:t.link},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElLink),{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})]),_:1},8,["to"])])):(e.openBlock(),e.createElementBlock("span",Vi,e.toDisplayString(t.title),1))],4)],4)),[[e.unref(k.vLoading),t.value==null]])}}},[["__scopeId","data-v-73228f1a"]]),Oi=M({__name:"StatisticCard",props:{title:{type:String},value:{type:Number},icon:{type:String},background:{type:String},align:{type:String},link:{type:String}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createBlock(ua,null,{default:e.withCtx(()=>[e.createVNode(fa,{title:t.title,value:t.value,icon:t.icon,background:t.background,align:t.align,link:t.link},null,8,["title","value","icon","background","align","link"])]),_:1}))}},[["__scopeId","data-v-f338c407"]]),Ti={},Ni={style:{padding:"20px 0"}};function Di(r,t){return e.openBlock(),e.createElementBlock("div",Ni,[e.renderSlot(r.$slots,"default")])}const Ai=M(Ti,[["render",Di]]),ji=M({__name:"DashboardRow",setup(r){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(k.ElRow),{style:{"margin-bottom":"20px"},class:"row"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}},[["__scopeId","data-v-5b091760"]]);function v(r){const t={...r.query,...r.params};if(r.params.domain&&r.params.id){const n=br(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function Fi(r){const t=r.length,n=Math.floor(24/t);return{type:"row",cols:r.map(s=>({type:"col",span:n,field:s}))}}function Br(r){return r.map(t=>Fi(t))}const Ri={__name:"FormLayout",props:{layout:Object,fields:Array},setup(r){const t=r,n=e.computed(()=>{if(t.layout.length==0){if(t.fields.length<=6){const i=s(t.fields,1);return Br(i)}console.log(t.fields);const a=s(t.fields,2);return Br(a)}return t.layout});function o(a){return t.fields.find(c=>c.code==a)}function s(a,i=2){const c=a.map(h=>h.code),d=[];for(let h=0;h<c.length;h+=i)d.push(c.slice(h,h+i));return d}return(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createBlock(e.unref(k.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.cols,d=>(e.openBlock(),e.createBlock(e.unref(k.ElCol),{span:o(d.field).wholeRow?24:d.span},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{field:o(d.field)})]),_:2},1032,["span"]))),256))]),_:2},1024))),256))]))}},Ii={style:{width:"100%"}},Mi={class:"footer"},Li={key:1},Ui=M({__name:"PureForm",props:{config:{type:Object},data:{type:Object},removable:{type:Boolean,default:!1}},emits:["submit","remove"],setup(r,{emit:t}){const n=z.useRoute(),o=v(n),s=t,a=e.ref(!1),i=r,c=Br(i.config.formLayout||[]),d=e.reactive({...i.data}),h=e.ref(null),p=i.config.fields.filter(E=>E.rules).reduce((E,S)=>(E[S.code]=B(S.rules),E),{}),f=e.computed(y),b=e.computed(()=>i.config.fields.filter(E=>{const S=E.editable(d,o),V=E.visible(d,o);return E.disabled=V&&!S,S||V}));function B(E){return typeof E=="object"?E:typeof E=="function"?E(d):[]}function w(E){a.value=!0,s("submit",E,d,()=>{a.value=!1})}async function m(){await h.value.validate(async(E,S)=>{var q,R;if(!E)return console.log("error submit!",S),!1;const V=(q=i.config.fields.find(de=>["images","attachments","attachment"].includes(de.type)))==null?void 0:q.code,A={...d};if(V&&(A[V]=(R=A[V])==null?void 0:R.map(de=>de.id)),i.config.submitConfirm){await i.config.submitConfirm(A)&&w(A);return}w(A)})}function x(){s("remove",d)}function g(){if(i.config.removeConfirm){i.config.removeConfirm(d,x);return}k.ElMessageBox.confirm("确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{x()}).catch(()=>{k.ElMessage({type:"info",message:"取消删除"})})}function y(){const E=i.config.showSubmit;return typeof E=="boolean"?E:typeof E=="function"?E(o,d):!0}return e.watch(()=>({...d}),(E,S)=>{const A=Object.keys(E).filter(R=>S[R]!==E[R]).map(R=>{var de;return(de=h.value)==null||de.clearValidate(R),{field:R,newValue:E[R],oldValue:S[R]}});b.value.filter(R=>!R.disabled).forEach(R=>{R.formChange&&R.formChange(d,A)})}),e.watch(()=>i.data,E=>{Object.keys(E).forEach(S=>{d[S]=E[S]})},{immediate:!0}),(E,S)=>(e.openBlock(),e.createBlock(e.unref(k.ElForm),{id:"form",ref_key:"formRef",ref:h,model:d,"label-width":"100px","label-position":"top",rules:e.unref(p)},{default:e.withCtx(()=>[e.createVNode(Ri,{layout:e.unref(c),fields:b.value},{default:e.withCtx(({field:V})=>[(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),{key:V.code,label:V.label,prop:V.code},{default:e.withCtx(()=>[e.createElementVNode("div",Ii,[V!=null&&V.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.editor),{key:0,modelValue:d[V.code],"onUpdate:modelValue":A=>d[V.code]=A,field:V,disabled:V.disabled,"form-data":d,"domain-config":i.config,row:d},null,8,["modelValue","onUpdate:modelValue","field","disabled","form-data","domain-config","row"])):(e.openBlock(),e.createBlock(e.unref(k.ElAlert),{key:1,title:`未找到 ${V.code}(${V.type}) 的编辑器`,type:"error",effect:"dark",closable:!1},null,8,["title"]))])]),_:2},1032,["label","prop"]))]),_:1},8,["layout","fields"]),e.createElementVNode("div",Mi,[d.id&&!d.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:0,size:"default",type:"danger",onClick:g},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1})):(e.openBlock(),e.createElementBlock("div",Li)),f.value?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:2,size:"default",type:"primary",loading:a.value,onClick:m},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","rules"]))}},[["__scopeId","data-v-e33a452e"]]);function zi(){return et().idempotentUrl?ye.get(et().idempotentUrl).then(r=>r.data):""}const Ht={getValue:zi},Sn={__name:"FormEditor",props:{modelValue:{type:Boolean},config:{type:Object},data:{type:Object},title:{type:String},removable:{type:Boolean,default:!1}},emits:["update:modelValue","submit","remove"],setup(r,{emit:t}){const n=z.useRoute(),o=v(n),s=t,a=r,i=e.ref(a.data),c=e.computed(()=>({...i.value,idempotentToken:h.value})),d=e.computed(()=>a.config.fields.filter(m=>m.visible(c,o)).length>=6?"60%":"40%"),h=e.ref(""),p=e.computed({get(){return a.modelValue},set(w){s("update:modelValue",w)}}),f=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`添加${a.config.name}`);function b(w,m,x){i.value=m,s("submit",w,async()=>{h.value=await Ht.getValue(),x()})}function B(w,m){s("remove",w,async()=>{h.value=await Ht.getValue(),m()})}return e.watch(()=>p,async()=>{h.value=await Ht.getValue()},{immediate:!0}),(w,m)=>(e.openBlock(),e.createBlock(e.unref(k.ElDialog),{modelValue:p.value,"onUpdate:modelValue":m[0]||(m[0]=x=>p.value=x),width:d.value,top:"20px",title:f.value,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":2e3},{default:e.withCtx(()=>[e.createVNode(Ui,{config:a.config,data:c.value,removable:a.removable,onSubmit:b,onRemove:B},null,8,["config","data","removable"])]),_:1},8,["modelValue","width","title"]))}},Hi={__name:"RowActionFormEditor",props:{row:{type:Object},text:{type:String},code:{type:String},fields:{type:Array},onSubmit:{type:Function},type:{type:String,default:"primary"},restRepeat:{type:Function,default:()=>""},rest:{type:Object}},setup(r){const t=r,n=e.ref(t.row),o=e.ref(!1),s=e.shallowRef(null),a=z.useRoute(),i=v(a),c=da("simple",{simple:!0,code:t.code,fields:t.fields});Promise.all(c.fields).then(p=>{c.fields=p,c.restRepeat=t.restRepeat,c.rest=t.rest,s.value=c});async function d(){const p=t.rest;if(p!=null&&p.getOne){const{data:f}=await p.getOne({...t.row,...i});n.value=f}o.value=!0}function h(p,f){t.onSubmit(p).then(()=>{o.value=!1,k.ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"}),console.log("success")}).catch(()=>{console.log("请求失败"),f()})}return(p,f)=>(e.openBlock(),e.createBlock(e.unref(k.ElButton),{type:t.type,onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),o.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=b=>o.value=b),title:t.text,config:s.value,data:n.value,onSubmit:h},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},qi={class:"not-found"},me=M({__name:"EmptyTip",props:{text:{type:String,default:"<无>"}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("span",qi,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-c97e855f"]]),pa={__name:"FieldEditor",props:{modelValue:{type:Array,default:()=>[]},field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Ku)),o=et().fileUploadUrl,s=t,a=r,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(p){const f=i.value.findIndex(b=>b.id===p.id);f>=0&&(i.value.splice(f,1),s("update:modelValue",i.value))}function h(p){k.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),ye.post(o,p).then(f=>{k.ElLoading.service().close(),k.ElMessage({message:"上传成功",type:"success"});const b=c(f.data);i.value=i.value?[...i.value,b]:[b],s("update:modelValue",i.value)}).catch(()=>{k.ElLoading.service().close(),k.ElMessage({message:"上传失败",type:"warning"})})}return e.watch(()=>a.modelValue,async()=>{i.value=a.modelValue},{immediate:!0}),(p,f)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(n),{images:i.value,props:a.field.props,onOnUpload:h,onOnRemove:d},null,8,["images","props"])]))}},Qe=Ge.defineStore("data-table-mode",{state:()=>({mode:"list",created:-1,updated:-1,removed:-1}),actions:{change(r){r&&(this.mode=r)},fireCreated(){this.created=Date.now()},fireUpdated(){this.updated=Date.now()},fireRemoved(){this.removed=Date.now()}}}),qt=(r,t,n,o)=>Ge.defineStore(`${t}-${r}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Pi(r,t,this.filters,n,o)}},actions:{change(s){this.filters={...this.filters,...s},Sr(r,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},Sr(r,t,this.filters)}}});function Pi(r,t,n,o,s){let i={...Wi(r,t,o),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),Sr(r,t,i)}function Wi(r,t,n){const o=`filters---${t}---${r}`;let s={};return localStorage.getItem(o)&&(s=JSON.parse(localStorage.getItem(o))),Object.keys(s).filter(a=>Object.keys(n).includes(a)).reduce((a,i)=>(a[i]=s[i],a),{})}function Sr(r,t,n){const o=`filters---${t}---${r}`,s=Gi(n);return localStorage.setItem(o,JSON.stringify(s)),s}function Gi(r){return Object.keys(r).filter(t=>r[t]!=null&&r[t]!=null&&r[t]!="").reduce((t,n)=>(t[n]=r[n],t),{})}const Qi={class:"sorters-box"},Ji=["onClick"],Ki={class:"sorters-label"},Yi={class:"sorters-arrow-box"},vi=["onClick"],Xi=["onClick"],Zi=M({__name:"FiltersSorters",props:{sorters:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateSorters"],setup(r,{emit:t}){const n=t,o=r,s=e.ref([]);async function a(){typeof o.sorters.sortersList=="function"?s.value=await o.sorters.sortersList():s.value=o.sorters.sortersList}a(),e.watch(()=>o.value,()=>{i()}),e.watch(()=>s,()=>{i()},{immediate:!0});function i(){if(o.value.length>0)for(let d=0;d<s.value.length;d++){const h=s.value[d];for(let p=0;p<o.value.length;p++){const f=o.value[p];h.field===f.field&&(h.order=f.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,h){const p=s.value;h?p[d].order=h:p[d].order?p[d].order==="ASC"?p[d].order="DESC":p[d].order==="DESC"&&(p[d].order=""):p[d].order="ASC",n("updateSorters",p.filter(f=>f.order))}return(d,h)=>(e.openBlock(),e.createElementBlock("div",Qi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(p,f)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:b=>c(f,"")},[e.createElementVNode("div",Ki,e.toDisplayString(p.name),1),e.createElementVNode("div",Yi,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",p.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(b=>c(f,"ASC"),["stop"])},null,10,vi),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",p.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(b=>c(f,"DESC"),["stop"])},null,10,Xi)])],8,Ji))),256))]))}},[["__scopeId","data-v-fa20b02a"]]),el={class:"ranges-box"},tl={class:"range-item"},nl={class:"range-label"},rl={class:"range-input-box"},ol=M({__name:"FiltersRange",props:{ranges:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateRanges"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive(o.ranges.rangesList);e.watch(()=>o.value,()=>{a()});function a(){o.value&&o.value.length>0?s.forEach(c=>{o.value.forEach(d=>{c.field===d.field&&(c.min=d.min?Number(d.min):null,c.max=d.max?Number(d.max):null)})}):s.forEach(c=>{c.min=null,c.max=null})}function i(c,d,h){const p=[...s];p.forEach(f=>{f.field===d&&(f[h]=c)}),n("updateRanges",p.filter(f=>f.min||f.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",el,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,h=>(e.openBlock(),e.createElementBlock("div",tl,[e.createElementVNode("div",nl,e.toDisplayString(h.name),1),e.createElementVNode("div",rl,[e.createVNode(e.unref(k.ElInputNumber),{modelValue:h.min,"onUpdate:modelValue":p=>h.min=p,"controls-position":"right",class:"input-box",onChange:p=>{i(p,h.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(k.ElInputNumber),{modelValue:h.max,"onUpdate:modelValue":p=>h.max=p,"controls-position":"right",class:"input-box",type:"number",onChange:p=>{i(p,h.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-30f46526"]]),al={key:0},sl=M({__name:"FiltersEditor",props:{settings:{type:Object}},setup(r){const t=r,n=z.useRoute(),o=v(n),s=e.ref([]),a=e.reactive({}),i=e.reactive({}),c=qt(t.settings.code,n.path,t.settings.filters,t.settings.filterHook)();c.$subscribe((g,y)=>{y.filters.isDeleted!==a.isDeleted&&(Object.keys(a).forEach(E=>{a[E]=void 0}),a.isDeleted=y.filters.isDeleted)});function d(g){return typeof g=="boolean"?g:typeof g=="function"?g(o):!0}async function h(g,y){if(typeof g.options=="function")i[g.code]=await g.options(a,o,y);else if(Array.isArray(g.options))i[g.code]=g.options;else if(typeof g.options=="object"){const E=g.options.getOneUrl?g.options.getOneUrl:g.options.url;if(!y&&Array.isArray(a[g.code])&&a[g.code].length>0)i[g.code]=[],a[g.code].forEach(S=>{E.getOne({id:S}).then(V=>{i[g.code].push({code:V.data[g.options.data.value]||V.data.id,name:V.data[g.options.data.label]||V.data.name})})});else if(!y&&!Array.isArray(a[g.code])&&a[g.code])E.getOne({id:a[g.code]}).then(S=>{i[g.code]=[{code:S.data[g.options.data.value]||S.data.id,name:S.data[g.options.data.label]||S.data.name}]});else{const S=g.options.query.keyWord.toString(),V=g.options.method?g.options.method:"getList";g.options.url[V]({...g.options.query,[S]:y}).then(A=>{i[g.code]=A.data.rows.map(q=>({code:q[g.options.data.value]||q.id,name:q[g.options.data.label]||q.name}))})}}}function p(g){if(g.remote)return y=>{h(g,y)}}function f(g){a.sorters=g,m()}function b(g){a.filters=g}function B(){Object.keys(a).forEach(g=>{a[g]=void 0}),s.value=Object.keys(t.settings.filters).filter(g=>d(t.settings.filters[g].visible)).map(g=>{const y={...t.settings.filters[g],code:g};return a[g]=w(g),(y.type==="select"||y.type==="selectV2"||y.type==="tree")&&h(y),{...y,dateType:y.dateType||"datetimerange",format:y.format||"YYYY-MM-DD HH:mm:ss"}}).filter(g=>g.code!=="isDeleted")}function w(g){const y=t.settings.filters[g],E=c.validFilters[g];return y.type==="boolean"&&typeof E!="boolean"?y.value:E}function m(){let g=JSON.parse(JSON.stringify(a));const y=t.settings.filterHook;y!=null&&y.preSubmit&&(g=y.preSubmit(g,o)),c.change(g)}function x(){c.$reset({}),B(),m()}return e.watch(()=>t.settings,()=>{B(),m()},{immediate:!0}),e.watch(()=>({...a}),(g,y)=>{const S=Object.keys(g).filter(V=>y[V]!==g[V]).map(V=>({field:V,newValue:g[V],oldValue:y[V]}));s.value.forEach(V=>{V.formChange&&V.formChange(a,S)})}),(g,y)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",al,[e.createVNode(e.unref(k.ElForm),{model:a,inline:"",class:"form-editor"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,E=>(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),null,{default:e.withCtx(()=>[E.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{key:0,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,filterable:"",clearable:"",placeholder:`是否${E.name}`,"value-on-clear":null,onChange:m},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElOption),{value:!0,label:`已${E.name}`},null,8,["label"]),e.createVNode(e.unref(k.ElOption),{value:!1,label:`未${E.name}`},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="select"?(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{key:1,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,filterable:"",clearable:"",remote:"","reserve-keyword":"","remote-show-suffix":"","fit-input-width":"",placeholder:E.name,multiple:E.multiple,"collapse-tags":"",class:e.normalizeClass(E.multiple?"tags-selects-input":""),"multiple-limit":E.multipleLimit?E.multipleLimit:0,"remote-method":p(E),"value-on-clear":null,onChange:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i[E.code],S=>(e.openBlock(),e.createBlock(e.unref(k.ElOption),{key:S.code,label:S.name,value:S.code,title:S.name},null,8,["label","value","title"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","multiple","class","multiple-limit","remote-method"])):E.type==="selectV2"?(e.openBlock(),e.createBlock(e.unref(k.ElSelectV2),{key:2,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,filterable:"",options:i[E.code]?i[E.code]:[],props:{label:"name",value:"code"},multiple:E.multiple,placeholder:E.name,clearable:"","value-on-clear":null,onChange:m},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):E.type==="sorters"?(e.openBlock(),e.createBlock(Zi,{key:3,value:a[E.code],sorters:E,onUpdateSorters:f},null,8,["value","sorters"])):E.type==="range"?(e.openBlock(),e.createBlock(ol,{key:4,value:a[E.code],ranges:E,onUpdateRanges:b},null,8,["value","ranges"])):E.type==="datetime"?(e.openBlock(),e.createBlock(e.unref(k.ElDatePicker),{key:5,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="datetime-range"?(e.openBlock(),e.createBlock(e.unref(k.ElDatePicker),{key:6,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,type:E.dateType,format:E.format,"value-format":E.format,"start-placeholder":E.name,"end-placeholder":E.name,placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","start-placeholder","end-placeholder","placeholder"])):(e.openBlock(),e.createBlock(e.unref(k.ElInput),{key:7,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,modelModifiers:{trim:!0},placeholder:E.name,type:E.type,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","type"]))]),_:2},1024))),256)),s.value.length>0?(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElButton),{type:"primary",onClick:m},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1}),e.createVNode(e.unref(k.ElButton),{onClick:x},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-951320d1"]]);/*! Element Plus Icons Vue v2.3.1 */var il=e.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),ll=il,cl=e.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),dl=cl,ul=e.defineComponent({name:"Close",__name:"close",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),ha=ul,fl=e.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),ma=fl,pl=e.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),hl=pl,ml=e.defineComponent({name:"Delete",__name:"delete",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),gl=ml,_l=e.defineComponent({name:"Document",__name:"document",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),ga=_l,yl=e.defineComponent({name:"Download",__name:"download",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),bl=yl,wl=e.defineComponent({name:"Grid",__name:"grid",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"})]))}}),kl=wl,El=e.defineComponent({name:"Loading",__name:"loading",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),_a=El,xl=e.defineComponent({name:"Minus",__name:"minus",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),Bl=xl,Sl=e.defineComponent({name:"Operation",__name:"operation",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),$l=Sl,Cl=e.defineComponent({name:"Plus",__name:"plus",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),$r=Cl,Vl=e.defineComponent({name:"PriceTag",__name:"price-tag",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M224 318.336V896h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0z"}),e.createElementVNode("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),ya=Vl,Ol=e.defineComponent({name:"QuestionFilled",__name:"question-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),Tl=Ol,Nl=e.defineComponent({name:"Setting",__name:"setting",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),Dl=Nl,Al=e.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),jl=Al,Fl=e.defineComponent({name:"View",__name:"view",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),Rl=Fl;const Il={class:"data-page-title"},Ml={class:"title"},Ll={class:"data-page-toolbar"},Ul=M({__name:"DataTableHeader",props:{settings:{type:Object},tableName:{type:String}},setup(r){const t=r,n=t.tableName?t.tableName:t.settings.name,o=z.useRoute(),s=Qe(),a=qt(t.settings.code,o.path,t.settings.filters,t.settings.filterHook)(),i=e.useSlots(),c=e.computed(()=>a.validFilters.isDeleted||!1),d=e.computed(()=>t.settings.displayMode.normalMode);function h(){a.$reset({isDeleted:!c.value})}function p(){const b=`table-view-${o.path}-${t.settings.code}`,B=localStorage.getItem(b)?localStorage.getItem(b):d.value;s.change(B)}function f(b){s.change(b);const B=`table-view-${o.path}-${t.settings.code}`;localStorage.setItem(B,s.mode)}return e.onMounted(p),(b,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Il,[e.createElementVNode("div",Ml,e.toDisplayString(c.value?`已删除的${e.unref(n)}`:e.unref(n)),1),e.createElementVNode("div",Ll,[e.unref(i).operations?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(k.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(k.ElDropdown),{trigger:"click",onCommand:f},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownItem),{command:"list"},{default:e.withCtx(()=>[e.createTextVNode(" 列表 ")]),_:1}),e.createVNode(e.unref(k.ElDropdownItem),{command:"grid"},{default:e.withCtx(()=>[e.createTextVNode(" 网格 ")]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(k.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(kl))]),_:1}),e.createVNode(e.unref(k.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ll))]),_:1})]),_:1})]),_:1}),t.settings.filters.isDeleted?(e.openBlock(),e.createBlock(e.unref(k.ElDropdown),{key:1,trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownItem),{command:"deleted",onClick:h},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(c.value?"未删除":"已删除"),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(k.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Dl))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(sl,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-898f42af"]]),zl={class:"kst-field-row-id"},Hl={key:0},ql={key:1,class:"mono-data"},Pl={key:1},ba=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=e.useSlots(),n=z.useRoute(),o=r,s=n.meta.side,a=e.computed(()=>o.row[o.field.code]),i=e.computed(()=>({path:`/${s}/${o.field.domain}/${a.value}`,query:{...v(n),...o.field.rowQuery(o.row)}}));function c(){return o.field.isRouter(o.row,v(n))}return(d,h)=>{const p=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",zl,[a.value?(e.openBlock(),e.createElementBlock("span",Hl,[c()?(e.openBlock(),e.createBlock(p,{key:0,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("(#"+e.toDisplayString(a.value)+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" #"+e.toDisplayString(a.value),1)],64))]),_:3},8,["to"])):(e.openBlock(),e.createElementBlock("span",ql,[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("("+e.toDisplayString(a.value)+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.value),1)],64))]))])):(e.openBlock(),e.createElementBlock("span",Pl," NO ID "))])}}},[["__scopeId","data-v-00021e61"]]);function Wl(r){k.ElMessage(r)}const Gl={show:Wl},wa=10,$n=Ge.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(r,t,n){this.history.find(s=>s.code==t)||(this.history.length>=wa&&(this.history=this.history.slice(2-wa),this.history.unshift(this.root)),this.history.push({title:r,code:t,path:n}))},setupRootPath(r,t){this.root={title:r,code:t,path:t},this.history=this.history.filter(n=>n.code!=t),this.history.unshift(this.root)},remove(r){this.history=this.history.filter(t=>t.code!=r)},getLast(){return this.history[this.history.length-1]},clear(){this.history=[]},updateTitleByCode(r,t){const n=this.history.find(o=>o.code==r);n&&(n.title=t)}}}),Cr={__name:"DomainEdit",props:{row:{type:Object},settings:{type:Object},operations:{type:Object,default:()=>{}},isDetail:{type:Boolean,default:!1}},setup(r){var w;const t=$n(),n=Qe(),o=z.useRoute(),s=z.useRouter(),a=v(o),i=r,c=e.ref({}),d=e.ref(!1),h=e.computed(()=>{var m,x;return i.row.deletedAt?!1:(m=i.operations)!=null&&m.updatable?!0:!!((x=i.operations)!=null&&x.removable)}),p=e.ref((w=i.operations)==null?void 0:w.removable);async function f(){const m=i.settings.formHook,x=i.settings.btnVisible,g=i.settings.rest,{data:y}=await g.getOne({...i.row,...a});c.value=y,m.setupUpdate&&(c.value=m.setupUpdate(c.value,a)),x.showRemove&&(p.value=x.showRemove(c.value)),d.value=!0}function b(m,x){const g=i.settings.formHook,y=i.settings.rest;Object.keys(a).forEach(E=>{m[E]=a[E]}),g!=null&&g.preUpdateSubmit&&(m=g.preUpdateSubmit(m)),y.update(m).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{x()})}function B(m,x){i.settings.rest.remove(m).then(()=>{Gl.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(y=>{o.fullPath.includes(y.path)&&(t.remove(y.code),s.back())}),n.fireRemoved()}).catch(()=>{x()})}return(m,x)=>h.value?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:0,type:"primary",onClick:f},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:d.value,"onUpdate:modelValue":x[0]||(x[0]=g=>d.value=g),config:i.settings,data:c.value,removable:p.value,onSubmit:b,onRemove:B},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Ql=r=>(e.pushScopeId("data-v-0941be48"),r=r(),e.popScopeId(),r),Jl={class:"data-grid-wrapper"},Kl={key:0,class:"cover"},Yl=Ql(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),vl={class:"header"},Xl={key:0},Zl={class:"key"},ec={class:"value"},tc={key:1,class:"footer tools"},nc=M({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(r){const t=z.useRoute(),n=v(t),o=e.useSlots(),s=r,a=qt(s.settings.code,t.path,s.settings.filters,s.settings.filterHook)(),{filters:i}=Ge.storeToRefs(a),c=e.ref(i.value),d=e.shallowRef([]),h=e.shallowRef(null),p=e.ref(!1);async function f(){return await s.settings.showEdit(n,"grid")}e.watchEffect(()=>{f().then(g=>{p.value=g})});const b=e.computed(()=>{var g,y;return!!((g=s.operations)!=null&&g.updatable&&p||(y=s.operations)!=null&&y.removable&&p)}),B=e.computed(()=>s.settings.displayMode.gridWidth),w=e.computed(()=>s.settings.displayMode.heightAuto);function m(){h.value=s.settings.fields.find(g=>g.code==="id"),d.value=s.settings.fields.filter(g=>g.code===s.settings.coverField||g.code===s.settings.nameField||g.code==="id"?!1:g.showInList(n,c.value))}function x(g){return s.settings.nameField?g[s.settings.nameField]:g.name?g.name:`${g.id}`}return e.watch(i,g=>{c.value=g,m()}),m(),(g,y)=>(e.openBlock(),e.createElementBlock("div",Jl,[r.data.length===0?(e.openBlock(),e.createBlock(e.unref(k.ElEmpty),{key:0,description:"暂无数据"})):(e.openBlock(),e.createBlock(e.unref(k.ElRow),{key:1,gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data,E=>(e.openBlock(),e.createBlock(e.unref(k.ElCol),{style:{"margin-bottom":"20px"},span:B.value?B.value:24,xs:B.value?{}:24,sm:B.value?{}:12,md:B.value?{}:8,lg:B.value?{}:6,xl:B.value?{}:4},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElCard),{"body-style":{padding:"0px"},shadow:"hover"},{default:e.withCtx(()=>[e.unref(o).cover||s.settings.coverField?(e.openBlock(),e.createElementBlock("div",Kl,[e.unref(o).cover?e.renderSlot(g.$slots,"cover",{key:0,row:E},void 0,!0):(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:1,src:E[s.settings.coverField],fit:"contain"},{error:e.withCtx(()=>[Yl]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",vl,[e.createVNode(ba,{field:h.value,row:E},e.createSlots({_:2},[E[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x(E)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",{class:e.normalizeClass(w.value?"body heightAuto":"body")},[e.unref(o).body?(e.openBlock(),e.createElementBlock("div",Xl,[e.renderSlot(g.$slots,"body",{row:E},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value,S=>(e.openBlock(),e.createElementBlock("div",{key:S.code,class:"field mono-data"},[e.createElementVNode("div",Zl,e.toDisplayString(S.label)+" ",1),e.createElementVNode("div",ec,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{field:S,row:E,mode:"grid"},null,8,["field","row"]))])]))),128))],2),e.unref(o).actions||b.value?(e.openBlock(),e.createElementBlock("div",tc,[e.unref(o).actions?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"actions",{row:E},void 0,!0)]),_:2},1024)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:1,size:"small"},{default:e.withCtx(()=>[e.createVNode(Cr,{row:E,settings:s.settings,operations:s.operations},null,8,["row","settings","operations"])]),_:2},1024)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["span","xs","sm","md","lg","xl"]))),256))]),_:3}))]))}},[["__scopeId","data-v-0941be48"]]);function rc(r,t){const n=r.fields.map(s=>s.code),o=Object.keys(t);n.forEach(s=>{o.includes(s)||console.error(`${r.code}.${s} : 与服务端数据不匹配`)})}const ka=M({__name:"DataList",props:{settings:{type:Object},data:{type:Array,default:()=>[]},operations:{type:Object,default:()=>{}},operationsWidth:{type:Number,default:100},actionsWidth:{type:Number,default:150}},emits:["sort-column","select-change","enable-item"],setup(r,{emit:t}){const n=z.useRoute(),o=v(n),s=t,a=e.useSlots(),i=r,c=qt(i.settings.code,n.path,i.settings.filters,i.settings.filterHook)(),{filters:d}=Ge.storeToRefs(c),h=e.ref(d.value),p=e.shallowRef([]),f=e.ref(!1);async function b(){return await i.settings.showEdit(o,"list")}e.watchEffect(()=>{b().then(y=>{f.value=y})});const B=e.computed(()=>{var y,E;return!!((y=i.operations)!=null&&y.updatable&&f.value||(E=i.operations)!=null&&E.removable&&f.value)});function w(y){s("sort-column",y)}function m(y){s("enable-item",y)}function x(){p.value=i.settings.fields.filter(y=>y.showInList(o,h.value))}function g(y){s("select-change",{routeQuery:o,data:y})}return x(),e.watch(()=>i.data,()=>{i.data.length>0&&rc(i.settings,i.data[0])}),e.watch(d,y=>{h.value=y,x()}),(y,E)=>(e.openBlock(),e.createBlock(e.unref(k.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","row-key":"id",onSelectionChange:g,onSortChange:w},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,S=>(e.openBlock(),e.createBlock(e.unref(k.ElTableColumn),{key:S.code,label:S.label,width:S.width,prop:S.code,sortable:S.sortable?"custom":!1,fixed:S.fixed},e.createSlots({_:2},[S.type==="switch"?{name:"default",fn:e.withCtx(({row:V})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{field:S,row:V,mode:"list",onEnable:m},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:V})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{key:V.updatedAt,field:S,row:V,mode:"list"},null,8,["field","row"]))]),key:"1"}]),1032,["label","width","prop","sortable","fixed"]))),128)),e.unref(a).actions?(e.openBlock(),e.createBlock(e.unref(k.ElTableColumn),{key:0,label:"管理",fixed:"right",width:i.actionsWidth},{default:e.withCtx(({row:S})=>[e.createVNode(e.unref(k.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"actions",{row:S},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createBlock(e.unref(k.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:S})=>[e.createVNode(e.unref(k.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Cr,{row:S,settings:i.settings,operations:i.operations},null,8,["row","settings","operations"])]),_:2},1024)]),_:1},8,["width"])):e.createCommentVNode("",!0)]),_:3},8,["data"]))}},[["__scopeId","data-v-31b40ae5"]]),oc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(r){const t=Qe();t.$reset();const{mode:n}=Ge.storeToRefs(t),o=e.useSlots(),s=r,a=e.shallowRef(ka);function i(c){c=="grid"?a.value=nc:a.value=ka}return e.watch(n,c=>{i(c)}),(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.normalizeProps(e.guardReactiveProps(s)),e.createSlots({_:2},[e.renderList(e.unref(o),(h,p)=>({name:p,fn:e.withCtx(f=>[e.renderSlot(c.$slots,p,e.normalizeProps(e.guardReactiveProps(f||{})))])}))]),1040))}},ac={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(r){const t=Qe(),n=z.useRoute(),o=v(n),s=r,a=e.ref({}),i=e.ref(!1),c=e.ref(!1);async function d(){var f;return await((f=s.operations)==null?void 0:f.creatable)}e.watchEffect(()=>{d().then(f=>{c.value=f})});async function h(){const f=s.settings.formHook,b=s.settings.fields.reduce((B,w)=>(B[w.code]=w.default,B),{});a.value=b,f.setupCreate&&(a.value=f.setupCreate(a.value,o)),i.value=!0}function p(f,b){const B=s.settings.formHook,w=s.settings.rest;Object.keys(o).forEach(m=>{f[m]=o[m]}),B!=null&&B.preCreateSubmit&&(f=B.preCreateSubmit(f)),w.create(f).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{b()})}return(f,b)=>c.value?(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:0,type:"success",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(" 添加 "),i.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=B=>i.value=B),config:s.settings,data:a.value,removable:!1,onSubmit:p},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Ea={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object},mode:{type:String}},setup(r){const t=z.useRouter(),n=Qe(),o=r,s=e.shallowRef([]);let a="";async function i(d,h){if(a=k.ElLoading.service({fullscreen:!0}),d.path){a.close(),c(d,h);return}const p=await Ht.getValue();try{await d.action({...h,...o.query,idempotentToken:p}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,h){t.push(d.path(h,o.query))}return e.watch(()=>o.row,()=>{s.value=o.settings.rowActions(o.query)},{immediate:!0}),(d,h)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,p=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.isVisible(o.row,o.query,o.mode)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.component),{key:0,row:r.row},null,8,["row"])):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,type:p.type?p.type:"primary",onClick:f=>i(p,o.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},sc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object},filterForm:{type:Object}},setup(r){const t=Qe(),n=r,o=n.query,s=e.ref({}),a=e.shallowRef([]),i=e.computed(()=>{var p,f;return((f=(p=n.tableDataSelect)==null?void 0:p.data)==null?void 0:f.length)>0});e.ref(!1),e.watch(()=>n.filterForm,p=>{s.value=p});const c=e.ref(!1);async function d(p){c.value=!0;const f=await Ht.getValue();try{await p.action({...n.tableDataSelect,filterForms:s.value,query:o,idempotentToken:f}),c.value=!1,t.fireUpdated()}catch{c.value=!1,t.fireUpdated()}}function h(p){return typeof h=="boolean"?p:typeof p=="function"?p(s.value,o):!0}return e.watch(()=>n.row,()=>{a.value=n.settings.pageActions(n.query)},{immediate:!0}),(p,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,b=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h(b.isVisible)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[b.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.component),{key:0,item:b,settings:r.settings,query:e.unref(o),"table-data-select":r.tableDataSelect,"filter-form":r.filterForm},null,8,["item","settings","query","table-data-select","filter-form"])):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,type:b.type,loading:c.value,disabled:!b.enable&&!i.value,onClick:B=>d(b)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.name),1)]),_:2},1032,["type","loading","disabled","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},ic={class:"pagination-wrapper"},lc=M({__name:"Pagination",props:{total:{type:Number},page:{type:Number,default:1},size:{type:Number,default:30},pageSizes:{type:Array,default:()=>[30,60,90,120]}},emits:["page-change"],setup(r,{emit:t}){const n=t,o=z.useRouter(),s=z.useRoute(),a=r,i=e.ref(a.page),c=e.ref(a.size),d=e.ref(a.total),h=e.ref(a.pageSizes);e.watch(()=>a.total,b=>{d.value=b}),e.watch(()=>[s.query.page,s.query.pageSize],()=>{!s.query.page||!s.query.pageSize?(i.value=1,c.value=30):(i.value=parseInt(s.query.page),c.value=parseInt(s.query.pageSize)),n("page-change",{page:i.value,size:c.value})});function p(b){i.value=b,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function f(b){c.value=b,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(b,B)=>(e.openBlock(),e.createElementBlock("div",ic,[e.createVNode(e.unref(k.ElPagination),{background:"","page-size":c.value,"page-sizes":h.value,total:d.value,"current-page":r.page,layout:"total,sizes, prev, pager, next",onCurrentChange:p,onSizeChange:f},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-3c65f1a1"]]);var xa;const Ba=typeof window<"u";Ba&&((xa=window==null?void 0:window.navigator)!=null&&xa.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function cc(r){return typeof r=="function"?r():e.unref(r)}function dc(r){return r}function uc(r){return e.getCurrentScope()?(e.onScopeDispose(r),!0):!1}function fc(r,t=!0){e.getCurrentInstance()?e.onMounted(r):t?r():e.nextTick(r)}function pc(r){var t;const n=cc(r);return(t=n==null?void 0:n.$el)!=null?t:n}const hc=Ba?window:void 0;function mc(r,t=!1){const n=e.ref(),o=()=>n.value=!!r();return o(),fc(o,t),n}const Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$a="__vueuse_ssr_handlers__";Sa[$a]=Sa[$a]||{};var Ca=Object.getOwnPropertySymbols,gc=Object.prototype.hasOwnProperty,_c=Object.prototype.propertyIsEnumerable,yc=(r,t)=>{var n={};for(var o in r)gc.call(r,o)&&t.indexOf(o)<0&&(n[o]=r[o]);if(r!=null&&Ca)for(var o of Ca(r))t.indexOf(o)<0&&_c.call(r,o)&&(n[o]=r[o]);return n};function Va(r,t,n={}){const o=n,{window:s=hc}=o,a=yc(o,["window"]);let i;const c=mc(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},h=e.watch(()=>pc(r),f=>{d(),c.value&&s&&f&&(i=new ResizeObserver(t),i.observe(f,a))},{immediate:!0,flush:"post"}),p=()=>{d(),h()};return uc(p),{isSupported:c,stop:p}}var Oa;(function(r){r.UP="UP",r.RIGHT="RIGHT",r.DOWN="DOWN",r.LEFT="LEFT",r.NONE="NONE"})(Oa||(Oa={}));var bc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,wc=Object.prototype.hasOwnProperty,kc=Object.prototype.propertyIsEnumerable,Na=(r,t,n)=>t in r?bc(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,Ec=(r,t)=>{for(var n in t||(t={}))wc.call(t,n)&&Na(r,n,t[n]);if(Ta)for(var n of Ta(t))kc.call(t,n)&&Na(r,n,t[n]);return r};Ec({linear:dc},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Vr=M({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object},hasMany:{type:Object}},setup(r){var Je,Et;e.useCssVars(U=>({"1dc5ac10":ze.value}));const t=z.useRoute(),n=v(t),o=r,s=qt(o.settings.code,t.path,o.settings.filters,o.settings.filterHook)(),{filters:a}=Ge.storeToRefs(s),i=(Je=o==null?void 0:o.hasMany)==null?void 0:Je.tableName;e.watch(a,U=>{y.value=U,R()});const c=Qe(),{created:d,updated:h,removed:p}=Ge.storeToRefs(c);e.watch([d,h,p],([U,Y,L])=>{(U||Y||L)&&R()});const f=e.ref(!0),b=e.ref([]),B=e.ref(0),w=e.ref({}),m=e.ref({}),x=e.ref(null),g=e.ref(null),y=e.ref({}),E=e.ref(parseInt(t.query.pageSize)||30),S=e.ref(parseInt(t.query.page)||1),V=(Et=o.hasMany)==null?void 0:Et.tableContentHeight;function A(U){let Y=null;if(U.order==="ascending"?Y="ASC":U.order==="descending"&&(Y="DESC"),y.value.sorters){let L=[];y.value.sorters.some(be=>be.field===U.prop)?y.value.sorters.forEach(be=>{be.field===U.prop&&(be.order=Y,be.name||L.push(be)),be.name&&L.push(be)}):L=[...y.value.sorters,{field:U.prop,order:Y}],y.value.sorters=L}else y.value.sorters=[{field:U.prop,order:Y}];R()}function q(){m.value=o.settings.operations(n)}function R(){f.value=!0;const U={...y.value,...n,...o.query,page:S.value,size:E.value};o.settings.rest.getList(U).then(Y=>{w.value.data=[],b.value=Y.data.rows,B.value=Y.data.count,f.value=!1})}function de(U){S.value=U.page,E.value=U.size,R()}function Be(U){const Y={id:U.id,enable:!U.enable};o.settings.rest.enable(Y).then(()=>{R()})}function O(U){if(U.enable){const Y=U.label==="上架"?"下架":"停用";ElMessageBox.confirm(`确定要${Y}该条数据吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Be(U)}).catch(()=>{})}else Be(U)}function I(U){w.value=U}const K=e.ref(0),Se=e.ref(0);Va(x,U=>{var Y;K.value=((Y=U[0])==null?void 0:Y.contentRect.height)||0}),Va(g,U=>{var Y;Se.value=((Y=U[0])==null?void 0:Y.contentRect.height)||0});const ze=e.computed(()=>V&&B.value>0?`${V}px`:`calc(100% - ${K.value+Se.value}px)`);return q(),(U,Y)=>(e.openBlock(),e.createElementBlock("div",{key:o.settings.code,style:{height:"100%"}},[e.createElementVNode("div",{ref_key:"pageHeader",ref:x},[e.createVNode(Ul,{settings:o.settings,"table-name":e.unref(i)},{operations:e.withCtx(()=>[e.createVNode(sc,{settings:o.settings,"table-data-select":w.value,query:e.unref(n),"filter-form":y.value},null,8,["settings","table-data-select","query","filter-form"]),e.createVNode(ac,{settings:o.settings,operations:m.value},null,8,["settings","operations"])]),_:1},8,["settings","table-name"])],512),e.withDirectives((e.openBlock(),e.createBlock(oc,{class:"data-table-box",data:b.value,operations:m.value,settings:o.settings,"actions-width":o.settings.actionsWidth,onSortColumn:A,onEnableItem:O,onSelectChange:I},e.createSlots({_:2},[o.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:L})=>[e.createVNode(Ea,{mode:"list",row:L,settings:o.settings,query:e.unref(n)},null,8,["row","settings","query"])]),key:"0"}:void 0]),1032,["data","operations","settings","actions-width"])),[[e.unref(k.vLoading),f.value]]),e.createElementVNode("div",{ref_key:"pagination",ref:g},[e.createVNode(lc,{page:S.value,size:E.value,total:B.value,onPageChange:de},null,8,["page","size","total"])],512)]))}},[["__scopeId","data-v-8762261d"]]);/*! Element Plus v2.7.2 */var xc={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const Bc={__name:"TooltipText",props:{content:{type:[Number,String],default:""},lineClamp:{type:[Number,String],default:1},className:{type:String},tipShowLength:{type:[Number,String]},textType:{type:String}},setup(r){const t=r,n=e.computed(()=>t.content?t.content.toString():"");return(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[n.value.length>t.tipShowLength?(e.openBlock(),e.createBlock(e.unref(k.ElTooltip),{key:0,content:n.value,effect:"light"},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElText),{class:e.normalizeClass(t.className),type:t.textType,"line-clamp":t.lineClamp},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["class","type","line-clamp"])]),_:1},8,["content"])):(e.openBlock(),e.createBlock(e.unref(k.ElText),{key:1,type:t.textType,class:e.normalizeClass(t.className)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["type","class"]))]))}},Sc={class:"header-box"},$c={class:"header-box-left"},Cc={class:"page-title"},Vc={class:"tabs-container"},Oc={class:"user-profile"},Tc=M({__name:"HeaderMenu",props:{config:{type:Object}},setup(r){const t=z.useRouter(),n=z.useRoute(),o=$n(),s=e.ref("首页"),a=r,i=n.fullPath.split("/")[1],c=B();o.setupRootPath("首页",`/${i}/home`);function d(w){var E,S;const m=w.meta.side,x=w.params.domain;let g=(E=w.meta)==null?void 0:E.title,y=(S=w.meta)==null?void 0:S.code;if(m&&x){g=xr()[m][w.params.domain].name,y=w.params.domain;const V=w.params.id;V&&V!="detail"&&(g=`${g} - ${w.params.id}`,y=`${w.params.domain}-${w.params.id}`)}else{const V=c.find(A=>A.route===w.path);V&&(g=V.title,y=V.route)}g&&y&&(o.push(g,y,w.fullPath),s.value=y)}function h(w){const m=o.history.find(x=>x.code==w.props.name);t.push(m.path)}function p(w){if(o.remove(w),w==s.value){const m=o.getLast();s.value=m.title,t.push(m.path)}}const f=(w,m)=>{const x=o.history.length;return w===0&&m==="self"||w<2&&m==="left"||w===x-1&&m==="right"||x===1&&m==="all"?!1:!(x<2&&m==="other")};function b(w,m){const x=[],g=o.history;switch(m){case"self":x.push(g[w].code);break;case"left":for(let y=0;y<w;y++)y!==0&&x.push(g[y].code);break;case"right":for(let y=w+1;y<g.length;y++)x.push(g[y].code);break;case"all":for(let y=0;y<g.length;y++)y!==0&&x.push(g[y].code);break;case"other":for(let y=1;y<g.length;y++)y!==w&&x.push(g[y].code);break}for(let y=0;y<x.length;y++)p(x[y])}function B(){return a.config.sideMenus[i].map(w=>w.children?w.children:w).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(w,m)=>(e.openBlock(),e.createElementBlock("div",Sc,[e.createElementVNode("div",null,[e.createElementVNode("div",$c,[e.createVNode(e.unref(k.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",Cc,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",Vc,[e.createVNode(e.unref(k.ElTabs),{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=x=>s.value=x),type:"card",class:"tabs",onTabClick:h,onTabRemove:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).history,(x,g)=>(e.openBlock(),e.createBlock(e.unref(k.ElTabPane),{closable:x.title!="首页",label:x.title,name:x.code},{label:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdown),{trigger:"contextmenu"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(k.ElDropdownMenu),null,{default:e.withCtx(()=>[f(g,"self")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:0,onClick:y=>b(g,"self")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1}),e.createTextVNode(" 关闭当前标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),f(g,"left")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:1,onClick:y=>b(g,"left")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createTextVNode(" 关闭左侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),f(g,"right")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:2,onClick:y=>b(g,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(hl))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),f(g,"all")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:3,onClick:y=>b(g,"all")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Bl))]),_:1}),e.createTextVNode(" 关闭全部标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),f(g,"other")?(e.openBlock(),e.createBlock(e.unref(k.ElDropdownItem),{key:4,onClick:y=>b(g,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref($l))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(Bc,{content:x.title,"line-clamp":1,"class-name":"tab-pane-label","tip-show-length":"6"},null,8,["content"])]),_:2},1024)]),_:2},1032,["closable","label","name"]))),256))]),_:1},8,["modelValue"]),e.createElementVNode("span",{class:"back-icon",onClick:m[1]||(m[1]=x=>e.unref(t).back())},[e.createVNode(e.unref(k.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1})])]),e.createElementVNode("div",Oc,[e.renderSlot(w.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-4c5cfc79"]]),Nc=r=>(e.pushScopeId("data-v-22a49b3f"),r=r(),e.popScopeId(),r),Dc={key:2,class:"dot-wrapper"},Ac=[Nc(()=>e.createElementVNode("span",{class:"dot"},null,-1))],Da=M({__name:"SideBarItem",props:{data:{type:Object},hasParent:{type:Boolean,default:!1}},setup(r){const t=r;return(n,o)=>r.data.children?(e.openBlock(),e.createBlock(e.unref(k.ElSubMenu),{key:0,index:r.data.title},{title:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data.children,s=>(e.openBlock(),e.createBlock(Da,{data:s,"has-parent":!0},null,8,["data"]))),256))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(k.ElMenuItem),{key:1,index:r.data.route,route:r.data.route,class:"menu-item"},{default:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):t.hasParent?(e.openBlock(),e.createElementBlock("span",Dc,Ac)):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),_:1},8,["index","route"]))}},[["__scopeId","data-v-22a49b3f"]]),jc=M({__name:"SideBar",props:{sideMenus:{type:Object}},setup(r){const t=z.useRouter(),n=z.useRoute(),o=e.ref(n.fullPath),s=r,a=n.fullPath.split("/")[1],i=s.sideMenus[a];return e.watch(()=>t.currentRoute.value,()=>{var c;if((c=n.meta)!=null&&c.side){const d=n.meta.side;n.params.id=="detail"?o.value=`/${d}/${n.params.domain}/detail`:o.value=`/${d}/${n.params.domain}/list`}else o.value=n.fullPath},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElMenu),{class:"menu",router:!0,"default-active":o.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),h=>(e.openBlock(),e.createBlock(Da,{data:h},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-e039032d"]]),Fc=M({__name:"BaseLayout",props:{config:{type:Object,default:()=>({})}},setup(r){const t=z.useRoute(),n=r,o={...et(),...n.config},s=e.computed(()=>t.params.domain?t.params.domain:t.fullPath);return(a,i)=>{const c=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(e.unref(k.ElConfigProvider),{locale:e.unref(xc)},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElContainer),{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElHeader),{class:"page-header"},{default:e.withCtx(()=>[e.createVNode(Tc,{config:o},{"user-profile":e.withCtx(()=>[e.renderSlot(a.$slots,"user-profile",{},void 0,!0)]),_:3})]),_:3}),e.createVNode(e.unref(k.ElContainer),{class:"page-content-container"},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(jc,{"side-menus":o.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(k.ElMain),{class:"page-content-main"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1})]),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-ea73195f"]]),Rc={key:1,class:"loading-wrapper"},Aa=M({__name:"List",props:{domain:{type:String}},setup(r){const t=r,n=z.useRoute(),o=n.meta.side,s=t.domain||n.params.domain,a=e.shallowRef(null);return zt(o,s).then(i=>{a.value=i}),(i,c)=>a.value?(e.openBlock(),e.createBlock(Vr,{key:0,settings:a.value},null,8,["settings"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Rc,null,512)),[[e.unref(k.vLoading),!0]])}},[["__scopeId","data-v-2d9c8e98"]]),Ic={key:0},Mc={class:"key"},Lc={class:"value"},Uc={key:1,class:"loading-wrapper"},ja=M({__name:"DomainDescription",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(r,{emit:t}){const n=t,o=r,s=z.useRoute(),a=v(s),i=Qe(),{updated:c}=Ge.storeToRefs(i),d=e.ref(null),h=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],p=e.computed(()=>o.settings.fields.filter(x=>x.showInDetail(d.value,{...a,...o.query}))),f=e.computed(()=>p.value.find(x=>x.code===o.settings.coverField)),b=e.computed(()=>p.value.filter(x=>!h.includes(x.type)&&!x.extendDetail)),B=e.computed(()=>{var g;const x=(g=f.value)==null?void 0:g.code;return p.value.filter(y=>h.includes(y.type)||y.extendDetail).filter(y=>y.code!==x)}),w=e.computed({get(){return B.value.map(x=>x.code)},set(x){}});function m(){o.settings.rest.getOne(o.query).then(x=>{x.data.isDeleted=!!x.data.deletedAt,d.value=x.data,n("done",x.data)})}return e.watch(c,()=>{m()},{immediate:!0}),(x,g)=>(e.openBlock(),e.createElementBlock("div",null,[d.value?(e.openBlock(),e.createElementBlock("div",Ic,[e.createVNode(e.unref(k.ElRow),{gutter:20},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(e.unref(k.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.value.display),{field:f.value,row:d.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(k.ElCol),{span:f.value?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,y=>(e.openBlock(),e.createBlock(e.unref(k.ElCol),{span:y.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Mc,e.toDisplayString(y.label),1),e.createElementVNode("div",Lc,[y.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.value.id),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.display),{key:1,field:y,row:d.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),B.value.length>0?(e.openBlock(),e.createBlock(e.unref(k.ElCollapse),{key:0,modelValue:w.value,"onUpdate:modelValue":g[0]||(g[0]=y=>w.value=y),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,y=>(e.openBlock(),e.createBlock(e.unref(k.ElCollapseItem),{title:y.label,name:y.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.display),{field:y,row:d.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Uc,null,512)),[[e.unref(k.vLoading),!0]])]))}},[["__scopeId","data-v-86b5e197"]]),zc={class:"data-page-title"},Hc={class:"title"},qc=M({__name:"DataDetailHeader",props:{data:{type:Object},settings:{type:Object},query:{type:Object}},emits:["get-item"],setup(r,{emit:t}){$n();const n=z.useRoute(),o=v(n),s=r,a=e.ref("加载中..."),i=e.ref({});function c(d){const h=s.settings;if(h.displayMode.normalMode=="detail")a.value=`${h.name}`;else{const f=`${h.formatName(d)}`;a.value=f?`${h.name}:${f}`:`${h.name}`}}return e.watch(()=>s.data,d=>{d&&(i.value=s.settings.operations(o),c(d))},{immediate:!0}),(d,h)=>(e.openBlock(),e.createElementBlock("div",zc,[e.createElementVNode("div",Hc,e.toDisplayString(a.value),1),e.createElementVNode("div",null,[s.data?(e.openBlock(),e.createBlock(e.unref(k.ElButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(Ea,{row:s.data,settings:s.settings,query:e.unref(o),mode:"detail"},null,8,["row","settings","query"]),s.settings.showEdit(e.unref(o),"detail")?(e.openBlock(),e.createBlock(Cr,{key:0,row:s.data,settings:s.settings,operations:i.value,"is-detail":!0},null,8,["row","settings","operations"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-0d04eb53"]]),Pc=M({__name:"DetailPageTabs",props:{associations:{type:Array},domainData:{type:Object}},setup(r){const t=z.useRouter(),n=z.useRoute(),o=v(n),s=r,a=e.ref(""),i=e.shallowRef(null);function c(h){a.value=h.props.name,t.push({name:`${n.meta.side}-association`,params:{association:h.props.name},query:o})}function d(h){if(s.associations.length>0)if(n.params.association){a.value=n.params.association;const p=s.associations.find(f=>f.domain===n.params.association);i.value={...p,domainData:s.domainData}}else a.value=s.associations[0].domain,i.value={...s.associations[0],domainData:s.domainData},h&&h()}return e.watch(()=>s.domainData,()=>{d(()=>{t.replace({name:`${n.meta.side}-association`,params:{association:a.value},query:o})})},{immediate:!0}),e.watch(()=>n.params,()=>{d()},{immediate:!0}),(h,p)=>{const f=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(k.ElTabs),{modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=b=>a.value=b),class:"association-tabs",onTabClick:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.associations,b=>(e.openBlock(),e.createBlock(e.unref(k.ElTabPane),{label:b.name,name:b.domain},null,8,["label","name"]))),256))]),_:1},8,["modelValue"]),i.value?(e.openBlock(),e.createBlock(f,{key:i.value,association:i.value},null,8,["association"])):e.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-0dc49aad"]]),Wc={__name:"DetailPageList",props:{associations:{type:Array},domainData:{type:Object}},setup(r){return(t,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.associations,o=>(e.openBlock(),e.createElementBlock("div",null,[o.type=="has-many"?(e.openBlock(),e.createBlock(Aa,{key:0,domain:o.domain},null,8,["domain"])):e.createCommentVNode("",!0),o.type=="has-one"?(e.openBlock(),e.createBlock(Fa,{key:1,domain:o.domain},null,8,["domain"])):e.createCommentVNode("",!0)]))),256))}},Gc=M({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(r){z.useRouter();const t=z.useRoute(),n=v(t),o=r,s=e.ref(null);function a(i){s.value=i}return(i,c)=>(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).params.domain}-${e.unref(t).params.id}`},[e.createVNode(qc,{data:s.value,settings:o.settings,query:{...e.unref(t).params,...e.unref(n)}},null,8,["data","settings","query"]),e.createVNode(ja,{query:{...e.unref(t).params,...e.unref(n)},settings:o.settings,onDone:a},null,8,["query","settings"]),o.settings.detailSubType==="tabs"?(e.openBlock(),e.createBlock(Pc,{key:0,associations:r.associations,"domain-data":s.value},null,8,["associations","domain-data"])):(e.openBlock(),e.createBlock(Wc,{key:1,associations:r.associations,"domain-data":s.value},null,8,["associations","domain-data"]))]))}},[["__scopeId","data-v-6e5c2d0f"]]),Qc={key:1,class:"loading-wrapper"},Fa=M({__name:"Detail",props:{domain:{type:String}},setup(r){const t=r,n=z.useRoute(),o=v(n),s=n.meta.side,a=t.domain||n.params.domain,i=e.shallowRef(null),c=e.shallowRef([]);zt(s,a).then(h=>{const p=h,f=d("has-many",p.hasMany(o)),b=d("has-one",p.hasOne(o));i.value=p,c.value=b.concat(f)});function d(h,p){return(p||[]).map(f=>typeof f=="object"?{type:h,domain:f.code,name:f.name,tableName:f.tableName,tableContentHeight:f.tableContentHeight,query:f.query||(()=>({}))}:{type:h,domain:f,name:xr()[s][f].name,query:()=>({})})}return(h,p)=>i.value?(e.openBlock(),e.createBlock(Gc,{key:0,settings:i.value,associations:c.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Qc,null,512)),[[e.unref(k.vLoading),!0]])}},[["__scopeId","data-v-ecd5a448"]]),Jc={key:0},Kc={key:1,class:"loading-wrapper"},Yc=M({__name:"DetailTab",props:{association:{type:Object}},setup(r){const t=z.useRoute(),n=t.meta.side,o=v(t),s=r,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{zt(n,t.params.association).then(i=>{a.value={...s.association,settings:i}})},{immediate:!0}),(i,c)=>a.value&&s.association.domainData?(e.openBlock(),e.createElementBlock("div",Jc,[a.value.type==="has-many"?(e.openBlock(),e.createBlock(Vr,{key:`has-many-${a.value.domain}`,settings:a.value.settings,"has-many":s.association,query:a.value.query(s.association.domainData)},null,8,["settings","has-many","query"])):a.value.type==="has-one"?(e.openBlock(),e.createBlock(ja,{key:`has-one-${a.value.domain}`,style:{"padding-top":"20px"},query:e.unref(o),settings:a.value.settings},null,8,["query","settings"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Kc,null,512)),[[e.unref(k.vLoading),!0]])}},[["__scopeId","data-v-79eac380"]]),vc={key:0},Xc={class:"file-name"},Zc={class:"name"},ed={class:"file-type"},td={key:1},nd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref([]);function o(a){fetch(a.url).then(i=>i.blob()).then(i=>{const c=document.createElement("a");i.type=="application/x-rar-compressed"?c.href=a.url:c.href=URL.createObjectURL(i),c.download=a.name,document.body.appendChild(c),c.click()})}function s(a){return["jpg","jpeg","png","gif","webp","bmp","pdf"].includes(a)}return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code].map(a=>{const i=a.url.substring(a.url.lastIndexOf(".")+1);return{...a,fileType:i,isPreview:s(i)}})},{immediate:!0}),(a,i)=>n.value.length>0?(e.openBlock(),e.createElementBlock("div",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Xc,[e.createVNode(e.unref(k.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createElementVNode("span",Zc,e.toDisplayString(c.name),1),e.createElementVNode("span",ed,"."+e.toDisplayString(c.fileType),1),e.createVNode(e.unref(k.ElIcon),{color:"#409eff",size:"16",onClick:d=>o(c)},{default:e.withCtx(()=>[e.createVNode(e.unref(bl))]),_:2},1032,["onClick"]),c.isPreview?(e.openBlock(),e.createBlock(e.unref(k.ElLink),{key:0,type:"primary",href:c.url,target:"_blank",underline:!1},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(Rl))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",td,[e.createVNode(me)]))}},[["__scopeId","data-v-196b9bff"]]),rd={__name:"FieldEditor",props:{modelValue:Array,field:Object,domainConfig:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Xu)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(p){a.value=a.value?[...a.value,p]:[p]}function c(p){const f=a.value.findIndex(b=>b.id===p.id);a.value.splice(f,1)}async function d(p){const f=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(p.name)){k.ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await f.updateFilesName(p).then(()=>{k.ElMessage({message:"附件名称已修改!",type:"success"})})}function h(p,f){if(f=="success"){i(p),o("update:modelValue",a.value);return}if(f=="remove"){c(p),o("update:modelValue",a.value);return}if(f=="change"){d(p);return}}return(p,f)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:f[0]||(f[0]=b=>h(b,"success")),onOnRemove:f[1]||(f[1]=b=>h(b,"remove")),onOnChange:f[2]||(f[2]=b=>h(b,"change"))},null,8,["pics","props"]))}};class od extends ee{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=nd,this.editor=rd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const ad=Object.freeze(Object.defineProperty({__proto__:null,default:od},Symbol.toStringTag,{value:"Module"})),sd={key:3},id=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=z.useRoute(),n=r,o=n.field.belongsTo,s=t.meta.side,a=n.row[n.field.code],i=e.computed(()=>({path:`/${s}/${o}/${a}`,query:{...v(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),h=e.ref("");let p=null;const f=zt(s,o).then(m=>(p=m.formatName,Promise.resolve(m.rest)));function b(m){return n.field.isRouter(n.row,v(t))&&!v(t)[n.field.code]}function B(){f.then(m=>{c.value=!0;const x=n.row[n.field.code],g=n.row[br(`${o}-name`)];if(!x){w(!1),c.value=!1;return}if(x&&g){w({id:x,name:g}),c.value=!1;return}const y={id:x};m.getOne(y).then(E=>{w(E.data),c.value=!1}).catch(E=>{console.log(E)})})}function w(m){if(d.value=!1,n.field.showName){ia(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),h.value=m[n.field.showName];return}if(n.field.formatter){h.value=n.field.formatter(m);return}if(m.id&&m.name){h.value=m.name;return}if(!m){d.value=!0;return}h.value=p(m)}return e.watch(()=>n.row,B,{immediate:!0}),(m,x)=>{const g=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("span",null,[c.value?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,class:"loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})):d.value?(e.openBlock(),e.createBlock(me,{key:1})):b(r.row)?(e.openBlock(),e.createBlock(g,{key:2,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("div",sd,e.toDisplayString(h.value),1))])}}},[["__scopeId","data-v-d0fdf31e"]]),ld={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=z.useRoute(),o=v(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(p){c.value=await a.field.options(a.formData,o,p)}function h(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(p,f)=>(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=b=>i.value=b),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:"",remote:"","remote-method":d,onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,b=>(e.openBlock(),e.createBlock(e.unref(k.ElOption),{key:b.code,label:b.name,value:b.code,title:b.name,disabled:b.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class cd extends ee{constructor(t,n){super(t,n),this.belongsTo=t.belongsTo,this.formChange=t.formChange||(()=>{}),this.isRouter=this.isRouter(t),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.display=id,this.editor=ld,this.showName=t.showName,this.formatter=t.formatter,this.rowQuery=t.rowQuery||(()=>({})),this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const dd=Object.freeze(Object.defineProperty({__proto__:null,default:cd},Symbol.toStringTag,{value:"Module"})),ud={style:{display:"flex","align-items":"center"}},fd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.computed(()=>t.row[t.field.code]);return(o,s)=>(e.openBlock(),e.createElementBlock("span",ud,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,color:"#529b2e",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(jl))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1,color:"#F56C6C",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(dl))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:2,color:"#73767a",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Tl))]),_:1}))]))}},pd={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class hd extends ee{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=fd,this.editor=pd,this.formChange=t.formChange||(()=>{}),this.checkValidProperties(t)}}const md=Object.freeze(Object.defineProperty({__proto__:null,default:hd},Symbol.toStringTag,{value:"Module"})),gd={key:0},_d={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(o.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?(e.openBlock(),e.createBlock(me,{key:1})):(e.openBlock(),e.createElementBlock("span",gd,e.toDisplayString(o.value),1)),e.createTextVNode(" edit ")]))}},yd={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElCascader),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),props:o.field.props,clearable:"",style:{width:"100%"},onChange:a},null,8,["modelValue","props"]))}};class bd extends ee{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=_d,this.editor=yd,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const wd=Object.freeze(Object.defineProperty({__proto__:null,default:bd},Symbol.toStringTag,{value:"Module"}));class kd extends ee{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const Ed=Object.freeze(Object.defineProperty({__proto__:null,default:kd},Symbol.toStringTag,{value:"Module"})),xd={key:0},Bd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(o.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(me,{key:1})):(e.openBlock(),e.createElementBlock("span",xd,e.toDisplayString(o.value),1))}},Sd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",onChange:a},null,8,["modelValue","disabled"]))}};class $d extends ee{constructor(t,n){super(t,n),this.display=Bd,this.editor=Sd,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Cd=Object.freeze(Object.defineProperty({__proto__:null,default:$d},Symbol.toStringTag,{value:"Module"})),Vd={key:0},Od={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(o.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(me,{key:1})):(e.openBlock(),e.createElementBlock("span",Vd,e.toDisplayString(o.value),1))}},Td={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",onChange:a},null,8,["modelValue","disabled"]))}};class Nd extends ee{constructor(t,n){super(t,n),this.display=Od,this.editor=Td,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Dd=Object.freeze(Object.defineProperty({__proto__:null,default:Nd},Symbol.toStringTag,{value:"Module"})),Ra=r=>(e.pushScopeId("data-v-3b7cda77"),r=r(),e.popScopeId(),r),Ad={class:"loading-error"},jd=Ra(()=>e.createElementVNode("div",null,"加载失败",-1)),Fd={key:1,class:"loading-error"},Rd=[Ra(()=>e.createElementVNode("div",null,"暂无",-1))],Id=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code],o.value=[t.row[t.field.code]]},{immediate:!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`image-card ${t.mode}`)},[n.value?(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:0,src:n.value,"preview-teleported":"",fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",Ad,[jd,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",Fd,Rd))],2))}},[["__scopeId","data-v-3b7cda77"]]),Md={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>ef)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(c){o("update:modelValue",c)}return e.watch(()=>s.modelValue,async()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{"image-url":a.value,disabled:s.disabled,onOnSuccess:i},null,8,["image-url","disabled"]))}};class Ld extends ee{constructor(t,n){super(t,n),this.display=Id,this.editor=Md,this.checkValidProperties(t)}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Ld},Symbol.toStringTag,{value:"Module"})),Ia=r=>(e.pushScopeId("data-v-56e18295"),r=r(),e.popScopeId(),r),zd={class:"image-card",style:{"margin-bottom":"20px"}},Hd={class:"loading-error"},qd=Ia(()=>e.createElementVNode("div",null,"图片加载失败",-1)),Pd={key:1,class:"loading-error"},Wd=[Ia(()=>e.createElementVNode("div",null,"暂无",-1))],Gd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{const s=t.row[t.field.code];s&&(o.value=s.map(a=>a.url),n.value=o.value[0])},{immediate:!0}),(s,a)=>t.row[t.field.code].length>0?(e.openBlock(),e.createBlock(e.unref(k.ElSpace),{key:0,wrap:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.row[t.field.code],i=>(e.openBlock(),e.createElementBlock("div",zd,[i.url?(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:0,src:i.url,fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",Hd,[qd,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",Pd,Wd))]))),256))]),_:1})):(e.openBlock(),e.createBlock(me,{key:1}))}},[["__scopeId","data-v-56e18295"]]);class Qd extends ee{constructor(t,n){super(t,n),this.props=t.props,this.display=Gd,this.editor=pa,this.converter=this.defaultBy(t.converter,o=>o),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Jd=Object.freeze(Object.defineProperty({__proto__:null,default:Qd},Symbol.toStringTag,{value:"Module"})),Kd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=e.defineAsyncComponent(()=>import("json-editor-vue")),n=r,o=e.ref(!1),s=e.ref("加载中...");return e.watch(()=>n.row,()=>{o.value=!1;const a=n.row[n.field.code];a!=null&&`${a}`.trim()!==""&&(o.value=!0,s.value=a)},{immediate:!0}),(a,i)=>o.value?(e.openBlock(),e.createBlock(e.unref(t),{key:0,modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),mode:"text","main-menu-bar":!1,"navigation-bar":!1,"read-only":!0},null,8,["modelValue"])):(e.openBlock(),e.createBlock(me,{key:1}))}},Yd={__name:"FieldEditor",props:{modelValue:Object,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>import("json-editor-vue")),o=t,s=r,a=e.reactive({value:s.modelValue});function i(c){a.value=c.text,o("update:modelValue",a.value)}return e.watch(()=>s.modelValue,()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=h=>a.value=h),style:{width:"100%",height:"300px"},mode:"text","main-menu-bar":!1,"navigation-bar":!1,onChange:i},null,8,["modelValue"]))}};class vd extends ee{constructor(t,n){super(t,n),this.display=Kd,this.editor=Yd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Xd=Object.freeze(Object.defineProperty({__proto__:null,default:vd},Symbol.toStringTag,{value:"Module"})),Zd={class:"editor-field"},eu=["innerHTML"],tu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("div",Zd,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,eu)]))}},[["__scopeId","data-v-6cf9056d"]]),nu={style:{width:"100%"}},ru={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>_f)),o=t,s=r,a=e.reactive({value:s.modelValue});return e.watch(()=>a.value,()=>{o("update:modelValue",a.value)}),(i,c)=>(e.openBlock(),e.createElementBlock("div",nu,[e.createVNode(e.unref(n),{content:a.value,"onUpdate:content":c[0]||(c[0]=d=>a.value=d),field:s.field},null,8,["content","field"])]))}};class ou extends ee{constructor(t,n){super(t,n),this.display=tu,this.editor=ru,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const au=Object.freeze(Object.defineProperty({__proto__:null,default:ou},Symbol.toStringTag,{value:"Module"}));class su extends ee{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=this.isRouter(t),this.rowQuery=t.rowQuery||(()=>({})),this.display=ba,this.fixed=!0,this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const iu=Object.freeze(Object.defineProperty({__proto__:null,default:su},Symbol.toStringTag,{value:"Module"}));var j=function(r,t,n){if(!t.has(r))throw new TypeError("attempted to set private field on non-instance");return t.set(r,n),n},T=function(r,t){if(!t.has(r))throw new TypeError("attempted to get private field on non-instance");return t.get(r)},tt,it,ke,wt,Pt,De,Ae,je,Fe,Re,Ie,Me,Le,lt,kt,nt,Cn,rt;const lu=function(r){var t=131,n=137,o=0;r+="x";var s=Math.floor(9007199254740991/n);for(let a=0;a<r.length;a++)o>s&&(o=Math.floor(o/n)),o=o*t+r.charCodeAt(a);return o},N="0123456789abcdef".split(""),cu=[-2147483648,8388608,32768,128],Ee=[24,16,8,0],Vn=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],ne=[];class du{constructor(t=!1,n=!1){tt.set(this,void 0),it.set(this,void 0),ke.set(this,void 0),wt.set(this,void 0),Pt.set(this,void 0),De.set(this,void 0),Ae.set(this,void 0),je.set(this,void 0),Fe.set(this,void 0),Re.set(this,void 0),Ie.set(this,void 0),Me.set(this,void 0),Le.set(this,void 0),lt.set(this,void 0),kt.set(this,void 0),nt.set(this,void 0),Cn.set(this,0),rt.set(this,void 0),this.init(t,n)}init(t,n){n?(ne[0]=ne[16]=ne[1]=ne[2]=ne[3]=ne[4]=ne[5]=ne[6]=ne[7]=ne[8]=ne[9]=ne[10]=ne[11]=ne[12]=ne[13]=ne[14]=ne[15]=0,j(this,it,ne)):j(this,it,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(j(this,De,3238371032),j(this,Ae,914150663),j(this,je,812702999),j(this,Fe,4144912697),j(this,Re,4290775857),j(this,Ie,1750603025),j(this,Me,1694076839),j(this,Le,3204075428)):(j(this,De,1779033703),j(this,Ae,3144134277),j(this,je,1013904242),j(this,Fe,2773480762),j(this,Re,1359893119),j(this,Ie,2600822924),j(this,Me,528734635),j(this,Le,1541459225)),j(this,tt,j(this,rt,j(this,ke,j(this,kt,0)))),j(this,wt,j(this,lt,!1)),j(this,Pt,!0),j(this,nt,t)}update(t){if(T(this,wt))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let o=0;const s=n.length,a=T(this,it);for(;o<s;){let i;if(T(this,lt)&&(j(this,lt,!1),a[0]=T(this,tt),a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),typeof n!="string")for(i=T(this,rt);o<s&&i<64;++o)a[i>>2]|=n[o]<<Ee[i++&3];else for(i=T(this,rt);o<s&&i<64;++o){let c=n.charCodeAt(o);c<128?a[i>>2]|=c<<Ee[i++&3]:c<2048?(a[i>>2]|=(192|c>>6)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):c<55296||c>=57344?(a[i>>2]|=(224|c>>12)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):(c=65536+((c&1023)<<10|n.charCodeAt(++o)&1023),a[i>>2]|=(240|c>>18)<<Ee[i++&3],a[i>>2]|=(128|c>>12&63)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3])}j(this,Cn,i),j(this,ke,T(this,ke)+(i-T(this,rt))),i>=64?(j(this,tt,a[16]),j(this,rt,i-64),this.hash(),j(this,lt,!0)):j(this,rt,i)}return T(this,ke)>4294967295&&(j(this,kt,T(this,kt)+(T(this,ke)/4294967296<<0)),j(this,ke,T(this,ke)%4294967296)),this}finalize(){if(T(this,wt))return;j(this,wt,!0);const t=T(this,it),n=T(this,Cn);t[16]=T(this,tt),t[n>>2]|=cu[n&3],j(this,tt,t[16]),n>=56&&(T(this,lt)||this.hash(),t[0]=T(this,tt),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=T(this,kt)<<3|T(this,ke)>>>29,t[15]=T(this,ke)<<3,this.hash()}hash(){let t=T(this,De),n=T(this,Ae),o=T(this,je),s=T(this,Fe),a=T(this,Re),i=T(this,Ie),c=T(this,Me),d=T(this,Le);const h=T(this,it);let p,f,b,B,w,m,x,g,y,E;for(let S=16;S<64;++S)B=h[S-15],p=(B>>>7|B<<25)^(B>>>18|B<<14)^B>>>3,B=h[S-2],f=(B>>>17|B<<15)^(B>>>19|B<<13)^B>>>10,h[S]=h[S-16]+p+h[S-7]+f<<0;E=n&o;for(let S=0;S<64;S+=4)T(this,Pt)?(T(this,nt)?(x=300032,B=h[0]-1413257819,d=B-150054599<<0,s=B+24177077<<0):(x=704751109,B=h[0]-210244248,d=B-1521486534<<0,s=B+143694565<<0),j(this,Pt,!1)):(p=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),f=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),x=t&n,b=x^t&o^E,m=a&i^~a&c,B=d+f+m+Vn[S]+h[S],w=p+b,d=s+B<<0,s=B+w<<0),p=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),f=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),g=s&t,b=g^s&n^x,m=d&a^~d&i,B=c+f+m+Vn[S+1]+h[S+1],w=p+b,c=o+B<<0,o=B+w<<0,p=(o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10),f=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),y=o&s,b=y^o&t^g,m=c&d^~c&a,B=i+f+m+Vn[S+2]+h[S+2],w=p+b,i=n+B<<0,n=B+w<<0,p=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),f=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),E=n&o,b=E^n&s^y,m=i&c^~i&d,B=a+f+m+Vn[S+3]+h[S+3],w=p+b,a=t+B<<0,t=B+w<<0;j(this,De,T(this,De)+t<<0),j(this,Ae,T(this,Ae)+n<<0),j(this,je,T(this,je)+o<<0),j(this,Fe,T(this,Fe)+s<<0),j(this,Re,T(this,Re)+a<<0),j(this,Ie,T(this,Ie)+i<<0),j(this,Me,T(this,Me)+c<<0),j(this,Le,T(this,Le)+d<<0)}hex(){this.finalize();const t=T(this,De),n=T(this,Ae),o=T(this,je),s=T(this,Fe),a=T(this,Re),i=T(this,Ie),c=T(this,Me),d=T(this,Le);let h=N[t>>28&15]+N[t>>24&15]+N[t>>20&15]+N[t>>16&15]+N[t>>12&15]+N[t>>8&15]+N[t>>4&15]+N[t&15]+N[n>>28&15]+N[n>>24&15]+N[n>>20&15]+N[n>>16&15]+N[n>>12&15]+N[n>>8&15]+N[n>>4&15]+N[n&15]+N[o>>28&15]+N[o>>24&15]+N[o>>20&15]+N[o>>16&15]+N[o>>12&15]+N[o>>8&15]+N[o>>4&15]+N[o&15]+N[s>>28&15]+N[s>>24&15]+N[s>>20&15]+N[s>>16&15]+N[s>>12&15]+N[s>>8&15]+N[s>>4&15]+N[s&15]+N[a>>28&15]+N[a>>24&15]+N[a>>20&15]+N[a>>16&15]+N[a>>12&15]+N[a>>8&15]+N[a>>4&15]+N[a&15]+N[i>>28&15]+N[i>>24&15]+N[i>>20&15]+N[i>>16&15]+N[i>>12&15]+N[i>>8&15]+N[i>>4&15]+N[i&15]+N[c>>28&15]+N[c>>24&15]+N[c>>20&15]+N[c>>16&15]+N[c>>12&15]+N[c>>8&15]+N[c>>4&15]+N[c&15];return T(this,nt)||(h+=N[d>>28&15]+N[d>>24&15]+N[d>>20&15]+N[d>>16&15]+N[d>>12&15]+N[d>>8&15]+N[d>>4&15]+N[d&15]),h}toString(){return this.hex()}digest(){this.finalize();const t=T(this,De),n=T(this,Ae),o=T(this,je),s=T(this,Fe),a=T(this,Re),i=T(this,Ie),c=T(this,Me),d=T(this,Le),h=[t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,o>>24&255,o>>16&255,o>>8&255,o&255,s>>24&255,s>>16&255,s>>8&255,s&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,c>>24&255,c>>16&255,c>>8&255,c&255];return T(this,nt)||h.push(d>>24&255,d>>16&255,d>>8&255,d&255),h}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(T(this,nt)?28:32),n=new DataView(t);return n.setUint32(0,T(this,De)),n.setUint32(4,T(this,Ae)),n.setUint32(8,T(this,je)),n.setUint32(12,T(this,Fe)),n.setUint32(16,T(this,Re)),n.setUint32(20,T(this,Ie)),n.setUint32(24,T(this,Me)),T(this,nt)||n.setUint32(28,T(this,Le)),t}}tt=new WeakMap,it=new WeakMap,ke=new WeakMap,wt=new WeakMap,Pt=new WeakMap,De=new WeakMap,Ae=new WeakMap,je=new WeakMap,Fe=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Me=new WeakMap,Le=new WeakMap,lt=new WeakMap,kt=new WeakMap,nt=new WeakMap,Cn=new WeakMap,rt=new WeakMap;function uu(r){const t=new du;return t.update(r),parseInt(t.hex().substring(0,8),16)}const fu=function(r){var t="#";return r.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},pu=function(r,t,n){r/=360;var o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;return[r+1/3,r,r-1/3].map(function(a){return a<0&&a++,a>1&&a--,a<1/6?a=s+(o-s)*6*a:a<.5?a=o:a<2/3?a=s+(o-s)*6*(2/3-a):a=s,Math.round(a*255)})};class hu{constructor(t={}){const[n,o]=[t.lightness,t.saturation].map(function(s){return s=s!==void 0?s:[.35,.5,.65],Array.isArray(s)?s.concat():[s]});this.L=n,this.S=o,typeof t.hue=="number"&&(t.hue={min:t.hue,max:t.hue}),typeof t.hue=="object"&&!Array.isArray(t.hue)&&(t.hue=[t.hue]),typeof t.hue>"u"&&(t.hue=[]),this.hueRanges=t.hue.map(function(s){return{min:typeof s.min>"u"?0:s.min,max:typeof s.max>"u"?360:s.max}}),this.hash=uu,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=lu)}hsl(t){var n,o,s,a=this.hash(t),i=727;if(this.hueRanges.length){const c=this.hueRanges[a%this.hueRanges.length];n=a/this.hueRanges.length%i*(c.max-c.min)/i+c.min}else n=a%359;return a=Math.ceil(a/360),o=this.S[a%this.S.length],a=Math.ceil(a/this.S.length),s=this.L[a%this.L.length],[n,o,s]}rgb(t){var n=this.hsl(t);return pu.apply(this,n)}hex(t){var n=this.rgb(t);return fu(n)}}const mu=new hu;function gu(r){const t=mu.hex(`abc${r}cba`);return _u(t.replace("#",""),-20)}function _u(r,t){let n=parseInt(r.substring(1,3),16),o=parseInt(r.substring(3,5),16),s=parseInt(r.substring(5,7),16);n=parseInt(n*(100+t)/100),o=parseInt(o*(100+t)/100),s=parseInt(s*(100+t)/100),n=n<255?n:255,o=o<255?o:255,s=s<255?s:255,n=Math.round(n),o=Math.round(o),s=Math.round(s);const a=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),i=o.toString(16).length==1?"0"+o.toString(16):o.toString(16),c=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+i+c}const yu={strToHexColor:gu},bu={key:0,class:"select-fields"},wu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=z.useRoute(),n=v(t),o=r,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=o.row[o.field.code];if(o.field.label,d==null){s.value="<无>",a.value=!1;return}const h=await o.field.options(o.row,n);if(!h){s.value="<无>",a.value=!1;return}let p=[];if(o.field.multiple?p=h.filter(f=>d.includes(f.code)):p=h.filter(f=>d===f.code),p.length===0){s.value="<无>",a.value=!1;return}i.value=p.map(f=>({bgColor:yu.strToHexColor(`${f.code}-${f.name}`),code:f.code,name:f.name})),a.value=!0}return e.watch(()=>o.row,c,{immediate:!0}),(d,h)=>a.value?(e.openBlock(),e.createElementBlock("div",bu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,p=>(e.openBlock(),e.createBlock(e.unref(k.ElTooltip),{content:`${p.name}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"select-field found",style:e.normalizeStyle(`background: ${p.bgColor}`)},e.toDisplayString(p.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(me,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-8ff036a3"]]),ku={__name:"FieldEditor",props:{modelValue:[String,Number,Array],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=z.useRoute(),o=v(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(p){c.value=await a.field.options(a.formData,o,p)}function h(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(p,f)=>(e.openBlock(),e.createBlock(e.unref(k.ElSelect),{modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=b=>i.value=b),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:"",remote:"","remote-method":d,onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,b=>(e.openBlock(),e.createBlock(e.unref(k.ElOption),{key:b.code,label:b.name,value:b.code,title:b.name,disabled:b.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class Eu extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=wu,this.editor=ku,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const xu=Object.freeze(Object.defineProperty({__proto__:null,default:Eu},Symbol.toStringTag,{value:"Module"})),Bu={key:0},Su={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const i=t.field.code.toString().split(".").reduce((c,d)=>c[d],t.row);i==null||`${i}`.trim()===""?n.value=!0:(o.value=i,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(me,{key:1})):(e.openBlock(),e.createElementBlock("span",Bu,e.toDisplayString(o.value),1))}},$u={__name:"FieldEditor",props:{modelValue:[Object,String,Number],field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:r.field.type,clearable:"",disabled:o.disabled,onInput:a},null,8,["modelValue","type","disabled"]))}};class Cu extends ee{constructor(t,n){super(t,n),this.display=Su,this.editor=$u,this.checkValidProperties(t)}}const Vu=Object.freeze(Object.defineProperty({__proto__:null,default:Cu},Symbol.toStringTag,{value:"Module"})),Ou={style:{display:"flex","align-items":"center"}},Tu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},emits:["enable"],setup(r,{emit:t}){const n=t,o=r,s=e.ref(o.row.deletedAt);function a(c,d){return c.label=d,new Promise((h,p)=>{n("enable",c)})}const i=e.computed(()=>o.row[o.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",Ou,[e.createVNode(e.unref(k.ElSwitch),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value=h),size:"small",disabled:!!s.value,"before-change":h=>a(r.row,r.field.label)},null,8,["modelValue","disabled","before-change"])]))}},Nu={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class Du extends ee{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=Tu,this.editor=Nu,this.checkValidProperties(t)}}const Au=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"})),ju={key:0},Fu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(o.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(me,{key:1})):(e.openBlock(),e.createElementBlock("span",ju,e.toDisplayString(o.value),1))}},Ru={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:"textarea",rows:5,clearable:"",disabled:o.disabled,onInput:a},null,8,["modelValue","disabled"]))}};class Iu extends ee{constructor(t,n){super(t,n),this.display=Fu,this.editor=Ru,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Mu=Object.freeze(Object.defineProperty({__proto__:null,default:Iu},Symbol.toStringTag,{value:"Module"})),Lu={key:0},Uu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(o.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(me,{key:1})):(e.openBlock(),e.createElementBlock("span",Lu,e.toDisplayString(o.value),1))}},zu={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(k.ElTimePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,format:o.field.format,"value-format":o.field.format,onChange:a},null,8,["modelValue","disabled","format","value-format"]))}};class Hu extends ee{constructor(t,n){super(t,n),this.display=Uu,this.editor=zu,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const qu=Object.freeze(Object.defineProperty({__proto__:null,default:Hu},Symbol.toStringTag,{value:"Module"})),Pu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref([]),o=e.ref([]),s={label:"name",children:"children",value:"id"},a=e.ref("..."),i=e.ref(!1);e.ref([]);async function c(){n.value=t.row[t.field.code],o.value=await t.field.options(),i.value=!0}return e.watch(()=>t.row,c,{immediate:!0}),(d,h)=>i.value?(e.openBlock(),e.createBlock(e.unref(k.ElTree),{key:0,"default-checked-keys":n.value,style:{width:"100%"},data:o.value,props:s,"node-key":"id",multiple:t.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:"true","check-strictly":t.field.checkStrictly,"show-checkbox":"",filterable:""},null,8,["default-checked-keys","data","multiple","check-strictly"])):(e.openBlock(),e.createBlock(me,{key:1,text:a.value},null,8,["text"]))}},[["__scopeId","data-v-fbd0b556"]]),Wu={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=z.useRoute(),o=v(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function h(f){c.value=await a.field.options(a.formData,o,f)}function p(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),h(),(f,b)=>(e.openBlock(),e.createBlock(e.unref(k.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=B=>i.value=B),style:{width:"100%"},data:c.value,props:d,"node-key":"id",multiple:a.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:a.field.disabled,"check-strictly":a.field.checkStrictly,remote:"","show-checkbox":"",filterable:"","remote-method":h,onChange:p},null,8,["modelValue","data","multiple","disabled","check-strictly"]))}};class Gu extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[]),this.formChange=t.formChange||(()=>{}),this.multiple=this.defaultBy(t.multiple,!1),this.checkStrictly=this.defaultBy(t.checkStrictly,!0),this.display=Pu,this.editor=Wu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Qu=Object.freeze(Object.defineProperty({__proto__:null,default:Gu},Symbol.toStringTag,{value:"Module"})),Ju=["src"],Ku=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImagesUploader",props:{images:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-remove","on-upload"],setup(r,{emit:t}){const n=t,o=e.ref(""),s=e.ref(!1),a=r,i=e.computed(()=>a.images.map(b=>{if(!(b!=null&&b.url))return{...b,name:"unknown",fileType:"unknown"};const B=b.url.substring(b.url.lastIndexOf(".")+1),w=b.url.split("/");return{...b,name:w[w.length-1],fileType:B}}));function c(b){n("on-remove",b)}function d(){k.ElMessage({message:`最多只能上传 ${a.props.limit} 个文件!`,type:"warning"})}function h(b){o.value=b.url,s.value=!0}function p(b){return b.size>5242880?(k.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function f(b){const B=new FormData;B.append("file",b.file),n("on-upload",B)}return(b,B)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(k.ElUpload),{"file-list":i.value,limit:a.props.limit,accept:a.props.accept,"list-type":a.props.listType,"on-remove":c,"on-exceed":d,"on-preview":h,multiple:!0,"before-upload":p,"http-request":f,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:B[0]||(B[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[a.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref($r))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:1},8,["file-list","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(k.ElDialog),{modelValue:s.value,"onUpdate:modelValue":B[1]||(B[1]=w=>s.value=w)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:o.value,alt:"Preview Image"},null,8,Ju)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-cb22ed8f"]])},Symbol.toStringTag,{value:"Module"})),Yu=["src"],vu={class:"file-type"},Xu=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"AttachmentUploader",props:{pics:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-success","on-remove","on-change"],setup(r,{emit:t}){const n=t,o=r,s=e.computed(()=>o.pics.map(m=>{const x=m.url.substring(m.url.lastIndexOf(".")+1);if(typeof m.name!==void 0)return m.fileType=x,m;if(m.url){const g=m.url.split("/");return{...m,name:g[g.length-1],fileType:x}}return{...m,name:m.id,fileType:x}})),a=e.ref(""),i=e.ref(!1);e.ref(o);const c=et().fileUploadUrl;`${localStorage.getItem("token")}`;const d=m=>{const x=new FileReader;return x.readAsDataURL(m),new Promise(function(g,y){return m.type.startsWith("image/")?(x.onload=async E=>{const S=new Image;S.src=E.target.result,S.onload=()=>{const V=document.createElement("canvas"),A=V.getContext("2d");V.width=S.width,V.height=S.height,A.drawImage(S,0,0,V.width,V.height),V.toBlob(q=>{const R=new File([q],m.name,{type:m.type,lastModified:Date.now()});g(R)},m.type,.5)}},!1):(g(m),!1)})},h=m=>{m.status==="success"&&n("on-remove",m)},p=()=>{k.ElMessage({message:`最多只能上传 ${o.props.limit} 个文件!`,type:"warning"})},f=m=>{a.value=m.url,i.value=!0},b=m=>{const x=m.name.substring(0,m.name.lastIndexOf("."));if(!/^[\u4e00-\u9fa5\w-_]+$/.test(x))return k.ElMessage({message:"请勿输入特殊字符!",type:"warning"}),!1;d(m).then(y=>y.size/1024/1024<5?(w(y),!1):(k.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function B(m,x){if(!m.name){k.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",m)}function w(m){return k.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((x,g)=>{const y=new FormData;y.append("file",m),X.post(c,y,{}).then(E=>(k.ElLoading.service().close(),k.ElMessage({message:"上传成功",type:"success"}),n("on-success",E.data.data),x(E.data),!1)).catch(()=>{k.ElLoading.service().close(),k.ElMessage({message:"上传失败",type:"warning"}),g("Upload failed")})})}return(m,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(k.ElUpload),{"file-list":s.value,action:e.unref(c),limit:o.props.limit,accept:o.props.accept,"list-type":o.props.listType,"on-remove":h,"before-upload":b,"on-exceed":p,"on-preview":f,multiple:!0,"http-request":()=>!1,"show-file-list":o.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":s.value.length>=o.props.limit}]),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[o.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref($r))]),_:1})):(e.openBlock(),e.createBlock(e.unref(k.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:1},8,["file-list","action","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(k.ElDialog),{modelValue:i.value,"onUpdate:modelValue":x[1]||(x[1]=g=>i.value=g)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,Yu)]),_:1},8,["modelValue"]),o.props.listType=="text"?(e.openBlock(),e.createBlock(e.unref(k.ElForm),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(g,y)=>(e.openBlock(),e.createBlock(e.unref(k.ElFormItem),{key:y,class:"file-list"},{default:e.withCtx(()=>[e.createVNode(e.unref(k.ElIcon),{color:"#73767a",size:14},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createVNode(e.unref(k.ElInput),{modelValue:g.name,"onUpdate:modelValue":E=>g.name=E,onChange:E=>B(g)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",vu,"."+e.toDisplayString(g.fileType),1),e.createVNode(e.unref(k.ElIcon),{color:"#73767a",size:12,onClick:E=>h(g)},{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-aa2fe0b2"]])},Symbol.toStringTag,{value:"Module"})),Zu={class:"image-slot"},ef=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImageUploader",props:{imageUrl:{type:String}},emits:["on-success"],setup(r,{emit:t}){const n=t,o=r,s=et().imageUploadUrl;`${localStorage.getItem("token")}`;const a=h=>{if(!(h.size/1024/1024<5))return k.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1},i=h=>{n("on-success",h.data.imageUrl)};function c(){n("on-success","")}function d(h){return k.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((p,f)=>{const b=new FormData;b.append("image",h.file),X.post(s,b,{}).then(B=>{k.ElLoading.service().close(),k.ElMessage({message:"上传成功",type:"success"}),p(B.data)}).catch(()=>{k.ElLoading.service().close(),k.ElMessage({message:"上传失败",type:"warning"}),f("Upload failed")})})}return(h,p)=>(e.openBlock(),e.createBlock(e.unref(k.ElUpload),{class:"image-uploader",action:e.unref(s),name:"image","show-file-list":!1,"on-success":i,"before-upload":a,"http-request":d},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default",{},void 0,!0),o.imageUrl?(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:0,class:"image",src:o.imageUrl,fit:"scale-down"},{placeholder:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(e.unref(k.ElIcon),{class:"placeholder-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})])]),_:1},8,["src"])):(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:1,class:"uploader-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref($r))]),_:1})),o.imageUrl?(e.openBlock(),e.createBlock(e.unref(k.ElIcon),{key:2,class:"delete-icon",onClick:e.withModifiers(c,["stop","prevent"])},{default:e.withCtx(()=>[e.createVNode(e.unref(gl))]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["action"]))}},[["__scopeId","data-v-ae965bb4"]])},Symbol.toStringTag,{value:"Module"}));var Ue=-1,xe=1,fe=0;function Wt(r,t,n,o){if(r===t)return r?[[fe,r]]:[];if(n!=null){var s=af(r,t,n);if(s)return s}var a=Or(r,t),i=r.substring(0,a);r=r.substring(a),t=t.substring(a),a=Tr(r,t);var c=r.substring(r.length-a);r=r.substring(0,r.length-a),t=t.substring(0,t.length-a);var d=tf(r,t);return i&&d.unshift([fe,i]),c&&d.push([fe,c]),La(d,o),d}function tf(r,t){var n;if(!r)return[[xe,t]];if(!t)return[[Ue,r]];var o=r.length>t.length?r:t,s=r.length>t.length?t:r,a=o.indexOf(s);if(a!==-1)return n=[[xe,o.substring(0,a)],[fe,s],[xe,o.substring(a+s.length)]],r.length>t.length&&(n[0][0]=n[2][0]=Ue),n;if(s.length===1)return[[Ue,r],[xe,t]];var i=rf(r,t);if(i){var c=i[0],d=i[1],h=i[2],p=i[3],f=i[4],b=Wt(c,h),B=Wt(d,p);return b.concat([[fe,f]],B)}return nf(r,t)}function nf(r,t){for(var n=r.length,o=t.length,s=Math.ceil((n+o)/2),a=s,i=2*s,c=new Array(i),d=new Array(i),h=0;h<i;h++)c[h]=-1,d[h]=-1;c[a+1]=0,d[a+1]=0;for(var p=n-o,f=p%2!==0,b=0,B=0,w=0,m=0,x=0;x<s;x++){for(var g=-x+b;g<=x-B;g+=2){var y=a+g,E;g===-x||g!==x&&c[y-1]<c[y+1]?E=c[y+1]:E=c[y-1]+1;for(var S=E-g;E<n&&S<o&&r.charAt(E)===t.charAt(S);)E++,S++;if(c[y]=E,E>n)B+=2;else if(S>o)b+=2;else if(f){var V=a+p-g;if(V>=0&&V<i&&d[V]!==-1){var A=n-d[V];if(E>=A)return Ma(r,t,E,S)}}}for(var q=-x+w;q<=x-m;q+=2){var V=a+q,A;q===-x||q!==x&&d[V-1]<d[V+1]?A=d[V+1]:A=d[V-1]+1;for(var R=A-q;A<n&&R<o&&r.charAt(n-A-1)===t.charAt(o-R-1);)A++,R++;if(d[V]=A,A>n)m+=2;else if(R>o)w+=2;else if(!f){var y=a+p-q;if(y>=0&&y<i&&c[y]!==-1){var E=c[y],S=a+E-y;if(A=n-A,E>=A)return Ma(r,t,E,S)}}}}return[[Ue,r],[xe,t]]}function Ma(r,t,n,o){var s=r.substring(0,n),a=t.substring(0,o),i=r.substring(n),c=t.substring(o),d=Wt(s,a),h=Wt(i,c);return d.concat(h)}function Or(r,t){if(!r||!t||r.charAt(0)!==t.charAt(0))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(a,s)==t.substring(a,s)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return Ua(r.charCodeAt(s-1))&&s--,s}function Tr(r,t){if(!r||!t||r.slice(-1)!==t.slice(-1))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(r.length-s,r.length-a)==t.substring(t.length-s,t.length-a)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return za(r.charCodeAt(r.length-s))&&s--,s}function rf(r,t){var n=r.length>t.length?r:t,o=r.length>t.length?t:r;if(n.length<4||o.length*2<n.length)return null;function s(B,w,m){for(var x=B.substring(m,m+Math.floor(B.length/4)),g=-1,y="",E,S,V,A;(g=w.indexOf(x,g+1))!==-1;){var q=Or(B.substring(m),w.substring(g)),R=Tr(B.substring(0,m),w.substring(0,g));y.length<R+q&&(y=w.substring(g-R,g)+w.substring(g,g+q),E=B.substring(0,m-R),S=B.substring(m+q),V=w.substring(0,g-R),A=w.substring(g+q))}return y.length*2>=B.length?[E,S,V,A,y]:null}var a=s(n,o,Math.ceil(n.length/4)),i=s(n,o,Math.ceil(n.length/2)),c;if(!a&&!i)return null;i?a?c=a[4].length>i[4].length?a:i:c=i:c=a;var d,h,p,f;r.length>t.length?(d=c[0],h=c[1],p=c[2],f=c[3]):(p=c[0],f=c[1],d=c[2],h=c[3]);var b=c[4];return[d,h,p,f,b]}function La(r,t){r.push([fe,""]);for(var n=0,o=0,s=0,a="",i="",c;n<r.length;){if(n<r.length-1&&!r[n][1]){r.splice(n,1);continue}switch(r[n][0]){case xe:s++,i+=r[n][1],n++;break;case Ue:o++,a+=r[n][1],n++;break;case fe:var d=n-s-o-1;if(t){if(d>=0&&qa(r[d][1])){var h=r[d][1].slice(-1);if(r[d][1]=r[d][1].slice(0,-1),a=h+a,i=h+i,!r[d][1]){r.splice(d,1),n--;var p=d-1;r[p]&&r[p][0]===xe&&(s++,i=r[p][1]+i,p--),r[p]&&r[p][0]===Ue&&(o++,a=r[p][1]+a,p--),d=p}}if(Ha(r[n][1])){var h=r[n][1].charAt(0);r[n][1]=r[n][1].slice(1),a+=h,i+=h}}if(n<r.length-1&&!r[n][1]){r.splice(n,1);break}if(a.length>0||i.length>0){a.length>0&&i.length>0&&(c=Or(i,a),c!==0&&(d>=0?r[d][1]+=i.substring(0,c):(r.splice(0,0,[fe,i.substring(0,c)]),n++),i=i.substring(c),a=a.substring(c)),c=Tr(i,a),c!==0&&(r[n][1]=i.substring(i.length-c)+r[n][1],i=i.substring(0,i.length-c),a=a.substring(0,a.length-c)));var f=s+o;a.length===0&&i.length===0?(r.splice(n-f,f),n=n-f):a.length===0?(r.splice(n-f,f,[xe,i]),n=n-f+1):i.length===0?(r.splice(n-f,f,[Ue,a]),n=n-f+1):(r.splice(n-f,f,[Ue,a],[xe,i]),n=n-f+2)}n!==0&&r[n-1][0]===fe?(r[n-1][1]+=r[n][1],r.splice(n,1)):n++,s=0,o=0,a="",i="";break}}r[r.length-1][1]===""&&r.pop();var b=!1;for(n=1;n<r.length-1;)r[n-1][0]===fe&&r[n+1][0]===fe&&(r[n][1].substring(r[n][1].length-r[n-1][1].length)===r[n-1][1]?(r[n][1]=r[n-1][1]+r[n][1].substring(0,r[n][1].length-r[n-1][1].length),r[n+1][1]=r[n-1][1]+r[n+1][1],r.splice(n-1,1),b=!0):r[n][1].substring(0,r[n+1][1].length)==r[n+1][1]&&(r[n-1][1]+=r[n+1][1],r[n][1]=r[n][1].substring(r[n+1][1].length)+r[n+1][1],r.splice(n+1,1),b=!0)),n++;b&&La(r,t)}function Ua(r){return r>=55296&&r<=56319}function za(r){return r>=56320&&r<=57343}function Ha(r){return za(r.charCodeAt(0))}function qa(r){return Ua(r.charCodeAt(r.length-1))}function of(r){for(var t=[],n=0;n<r.length;n++)r[n][1].length>0&&t.push(r[n]);return t}function Nr(r,t,n,o){return qa(r)||Ha(o)?null:of([[fe,r],[Ue,t],[xe,n],[fe,o]])}function af(r,t,n){var o=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,a=r.length,i=t.length;if(o.length===0&&(s===null||s.length===0)){var c=o.index,d=r.slice(0,c),h=r.slice(c),p=s?s.index:null;e:{var f=c+i-a;if(p!==null&&p!==f||f<0||f>i)break e;var b=t.slice(0,f),B=t.slice(f);if(B!==h)break e;var w=Math.min(c,f),m=d.slice(0,w),x=b.slice(0,w);if(m!==x)break e;var g=d.slice(w),y=b.slice(w);return Nr(m,g,y,h)}e:{if(p!==null&&p!==c)break e;var E=c,b=t.slice(0,E),B=t.slice(E);if(b!==d)break e;var S=Math.min(a-E,i-E),V=h.slice(h.length-S),A=B.slice(B.length-S);if(V!==A)break e;var g=h.slice(0,h.length-S),y=B.slice(0,B.length-S);return Nr(d,g,y,V)}}if(o.length>0&&s&&s.length===0)e:{var m=r.slice(0,o.index),V=r.slice(o.index+o.length),w=m.length,S=V.length;if(i<w+S)break e;var x=t.slice(0,w),A=t.slice(i-S);if(m!==x||V!==A)break e;var g=r.slice(w,a-S),y=t.slice(w,i-S);return Nr(m,g,y,V)}return null}function On(r,t,n){return Wt(r,t,n,!0)}On.INSERT=xe,On.DELETE=Ue,On.EQUAL=fe;var sf=On,Tn={exports:{}};Tn.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Function]",f="[object GeneratorFunction]",b="[object Map]",B="[object Number]",w="[object Object]",m="[object Promise]",x="[object RegExp]",g="[object Set]",y="[object String]",E="[object Symbol]",S="[object WeakMap]",V="[object ArrayBuffer]",A="[object DataView]",q="[object Float32Array]",R="[object Float64Array]",de="[object Int8Array]",Be="[object Int16Array]",O="[object Int32Array]",I="[object Uint8Array]",K="[object Uint8ClampedArray]",Se="[object Uint16Array]",ze="[object Uint32Array]",Je=/[\\^$.*+?()[\]{}|]/g,Et=/\w*$/,U=/^\[object .+?Constructor\]$/,Y=/^(?:0|[1-9]\d*)$/,L={};L[a]=L[i]=L[V]=L[A]=L[c]=L[d]=L[q]=L[R]=L[de]=L[Be]=L[O]=L[b]=L[B]=L[w]=L[x]=L[g]=L[y]=L[E]=L[I]=L[K]=L[Se]=L[ze]=!0,L[h]=L[p]=L[S]=!1;var be=typeof re=="object"&&re&&re.Object===Object&&re,Fr=typeof self=="object"&&self&&self.Object===Object&&self,$e=be||Fr||Function("return this")(),Fn=t&&!t.nodeType&&t,J=Fn&&!0&&r&&!r.nodeType&&r,Rn=J&&J.exports===Fn;function Rr(l,u){return l.set(u[0],u[1]),l}function Ce(l,u){return l.add(u),l}function In(l,u){for(var _=-1,$=l?l.length:0;++_<$&&u(l[_],_,l)!==!1;);return l}function Mn(l,u){for(var _=-1,$=u.length,F=l.length;++_<$;)l[F+_]=u[_];return l}function Jt(l,u,_,$){for(var F=-1,D=l?l.length:0;++F<D;)_=u(_,l[F],F,l);return _}function Kt(l,u){for(var _=-1,$=Array(l);++_<l;)$[_]=u(_);return $}function Ln(l,u){return l==null?void 0:l[u]}function Yt(l){var u=!1;if(l!=null&&typeof l.toString!="function")try{u=!!(l+"")}catch{}return u}function Un(l){var u=-1,_=Array(l.size);return l.forEach(function($,F){_[++u]=[F,$]}),_}function vt(l,u){return function(_){return l(u(_))}}function zn(l){var u=-1,_=Array(l.size);return l.forEach(function($){_[++u]=$}),_}var Ir=Array.prototype,Mr=Function.prototype,xt=Object.prototype,Xt=$e["__core-js_shared__"],Hn=function(){var l=/[^.]+$/.exec(Xt&&Xt.keys&&Xt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),qn=Mr.toString,He=xt.hasOwnProperty,Bt=xt.toString,Lr=RegExp("^"+qn.call(He).replace(Je,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=Rn?$e.Buffer:void 0,St=$e.Symbol,Zt=$e.Uint8Array,we=vt(Object.getPrototypeOf,Object),Pn=Object.create,Wn=xt.propertyIsEnumerable,Ur=Ir.splice,en=Object.getOwnPropertySymbols,$t=ct?ct.isBuffer:void 0,Gn=vt(Object.keys,Object),Ct=Oe($e,"DataView"),dt=Oe($e,"Map"),Ve=Oe($e,"Promise"),Vt=Oe($e,"Set"),tn=Oe($e,"WeakMap"),ut=Oe(Object,"create"),nn=ue(Ct),ft=ue(dt),rn=ue(Ve),on=ue(Vt),an=ue(tn),ot=St?St.prototype:void 0,Qn=ot?ot.valueOf:void 0;function Ke(l){var u=-1,_=l?l.length:0;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function zr(){this.__data__=ut?ut(null):{}}function Hr(l){return this.has(l)&&delete this.__data__[l]}function qr(l){var u=this.__data__;if(ut){var _=u[l];return _===o?void 0:_}return He.call(u,l)?u[l]:void 0}function Jn(l){var u=this.__data__;return ut?u[l]!==void 0:He.call(u,l)}function sn(l,u){var _=this.__data__;return _[l]=ut&&u===void 0?o:u,this}Ke.prototype.clear=zr,Ke.prototype.delete=Hr,Ke.prototype.get=qr,Ke.prototype.has=Jn,Ke.prototype.set=sn;function ae(l){var u=-1,_=l?l.length:0;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function Pr(){this.__data__=[]}function Wr(l){var u=this.__data__,_=Tt(u,l);if(_<0)return!1;var $=u.length-1;return _==$?u.pop():Ur.call(u,_,1),!0}function Gr(l){var u=this.__data__,_=Tt(u,l);return _<0?void 0:u[_][1]}function Qr(l){return Tt(this.__data__,l)>-1}function Jr(l,u){var _=this.__data__,$=Tt(_,l);return $<0?_.push([l,u]):_[$][1]=u,this}ae.prototype.clear=Pr,ae.prototype.delete=Wr,ae.prototype.get=Gr,ae.prototype.has=Qr,ae.prototype.set=Jr;function ie(l){var u=-1,_=l?l.length:0;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function Kr(){this.__data__={hash:new Ke,map:new(dt||ae),string:new Ke}}function Yr(l){return ht(this,l).delete(l)}function vr(l){return ht(this,l).get(l)}function Xr(l){return ht(this,l).has(l)}function Zr(l,u){return ht(this,l).set(l,u),this}ie.prototype.clear=Kr,ie.prototype.delete=Yr,ie.prototype.get=vr,ie.prototype.has=Xr,ie.prototype.set=Zr;function pe(l){this.__data__=new ae(l)}function eo(){this.__data__=new ae}function to(l){return this.__data__.delete(l)}function no(l){return this.__data__.get(l)}function ro(l){return this.__data__.has(l)}function oo(l,u){var _=this.__data__;if(_ instanceof ae){var $=_.__data__;if(!dt||$.length<n-1)return $.push([l,u]),this;_=this.__data__=new ie($)}return _.set(l,u),this}pe.prototype.clear=eo,pe.prototype.delete=to,pe.prototype.get=no,pe.prototype.has=ro,pe.prototype.set=oo;function Ot(l,u){var _=un(l)||Dt(l)?Kt(l.length,String):[],$=_.length,F=!!$;for(var D in l)He.call(l,D)&&!(F&&(D=="length"||bo(D,$)))&&_.push(D);return _}function Kn(l,u,_){var $=l[u];(!(He.call(l,u)&&er($,_))||_===void 0&&!(u in l))&&(l[u]=_)}function Tt(l,u){for(var _=l.length;_--;)if(er(l[_][0],u))return _;return-1}function qe(l,u){return l&&dn(u,pn(u),l)}function ln(l,u,_,$,F,D,G){var W;if($&&(W=D?$(l,F,D,G):$(l)),W!==void 0)return W;if(!We(l))return l;var Z=un(l);if(Z){if(W=_o(l),!u)return ho(l,W)}else{var Q=ve(l),le=Q==p||Q==f;if(tr(l))return Nt(l,u);if(Q==w||Q==a||le&&!D){if(Yt(l))return D?l:{};if(W=Pe(le?{}:l),!u)return mo(l,qe(W,l))}else{if(!L[Q])return D?l:{};W=yo(l,Q,ln,u)}}G||(G=new pe);var he=G.get(l);if(he)return he;if(G.set(l,W),!Z)var te=_?go(l):pn(l);return In(te||l,function(ce,se){te&&(se=ce,ce=l[se]),Kn(W,se,ln(ce,u,_,$,se,l,G))}),W}function ao(l){return We(l)?Pn(l):{}}function so(l,u,_){var $=u(l);return un(l)?$:Mn($,_(l))}function io(l){return Bt.call(l)}function lo(l){if(!We(l)||ko(l))return!1;var u=fn(l)||Yt(l)?Lr:U;return u.test(ue(l))}function co(l){if(!Xn(l))return Gn(l);var u=[];for(var _ in Object(l))He.call(l,_)&&_!="constructor"&&u.push(_);return u}function Nt(l,u){if(u)return l.slice();var _=new l.constructor(l.length);return l.copy(_),_}function cn(l){var u=new l.constructor(l.byteLength);return new Zt(u).set(new Zt(l)),u}function pt(l,u){var _=u?cn(l.buffer):l.buffer;return new l.constructor(_,l.byteOffset,l.byteLength)}function Yn(l,u,_){var $=u?_(Un(l),!0):Un(l);return Jt($,Rr,new l.constructor)}function vn(l){var u=new l.constructor(l.source,Et.exec(l));return u.lastIndex=l.lastIndex,u}function uo(l,u,_){var $=u?_(zn(l),!0):zn(l);return Jt($,Ce,new l.constructor)}function fo(l){return Qn?Object(Qn.call(l)):{}}function po(l,u){var _=u?cn(l.buffer):l.buffer;return new l.constructor(_,l.byteOffset,l.length)}function ho(l,u){var _=-1,$=l.length;for(u||(u=Array($));++_<$;)u[_]=l[_];return u}function dn(l,u,_,$){_||(_={});for(var F=-1,D=u.length;++F<D;){var G=u[F],W=void 0;Kn(_,G,W===void 0?l[G]:W)}return _}function mo(l,u){return dn(l,Ye(l),u)}function go(l){return so(l,pn,Ye)}function ht(l,u){var _=l.__data__;return wo(u)?_[typeof u=="string"?"string":"hash"]:_.map}function Oe(l,u){var _=Ln(l,u);return lo(_)?_:void 0}var Ye=en?vt(en,Object):xo,ve=io;(Ct&&ve(new Ct(new ArrayBuffer(1)))!=A||dt&&ve(new dt)!=b||Ve&&ve(Ve.resolve())!=m||Vt&&ve(new Vt)!=g||tn&&ve(new tn)!=S)&&(ve=function(l){var u=Bt.call(l),_=u==w?l.constructor:void 0,$=_?ue(_):void 0;if($)switch($){case nn:return A;case ft:return b;case rn:return m;case on:return g;case an:return S}return u});function _o(l){var u=l.length,_=l.constructor(u);return u&&typeof l[0]=="string"&&He.call(l,"index")&&(_.index=l.index,_.input=l.input),_}function Pe(l){return typeof l.constructor=="function"&&!Xn(l)?ao(we(l)):{}}function yo(l,u,_,$){var F=l.constructor;switch(u){case V:return cn(l);case c:case d:return new F(+l);case A:return pt(l,$);case q:case R:case de:case Be:case O:case I:case K:case Se:case ze:return po(l,$);case b:return Yn(l,$,_);case B:case y:return new F(l);case x:return vn(l);case g:return uo(l,$,_);case E:return fo(l)}}function bo(l,u){return u=u??s,!!u&&(typeof l=="number"||Y.test(l))&&l>-1&&l%1==0&&l<u}function wo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function ko(l){return!!Hn&&Hn in l}function Xn(l){var u=l&&l.constructor,_=typeof u=="function"&&u.prototype||xt;return l===_}function ue(l){if(l!=null){try{return qn.call(l)}catch{}try{return l+""}catch{}}return""}function Zn(l){return ln(l,!0,!0)}function er(l,u){return l===u||l!==l&&u!==u}function Dt(l){return Eo(l)&&He.call(l,"callee")&&(!Wn.call(l,"callee")||Bt.call(l)==a)}var un=Array.isArray;function At(l){return l!=null&&nr(l.length)&&!fn(l)}function Eo(l){return rr(l)&&At(l)}var tr=$t||Bo;function fn(l){var u=We(l)?Bt.call(l):"";return u==p||u==f}function nr(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function We(l){var u=typeof l;return!!l&&(u=="object"||u=="function")}function rr(l){return!!l&&typeof l=="object"}function pn(l){return At(l)?Ot(l):co(l)}function xo(){return[]}function Bo(){return!1}r.exports=Zn}(Tn,Tn.exports);var Pa=Tn.exports,Nn={exports:{}};Nn.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=1,a=2,i=9007199254740991,c="[object Arguments]",d="[object Array]",h="[object AsyncFunction]",p="[object Boolean]",f="[object Date]",b="[object Error]",B="[object Function]",w="[object GeneratorFunction]",m="[object Map]",x="[object Number]",g="[object Null]",y="[object Object]",E="[object Promise]",S="[object Proxy]",V="[object RegExp]",A="[object Set]",q="[object String]",R="[object Symbol]",de="[object Undefined]",Be="[object WeakMap]",O="[object ArrayBuffer]",I="[object DataView]",K="[object Float32Array]",Se="[object Float64Array]",ze="[object Int8Array]",Je="[object Int16Array]",Et="[object Int32Array]",U="[object Uint8Array]",Y="[object Uint8ClampedArray]",L="[object Uint16Array]",be="[object Uint32Array]",Fr=/[\\^$.*+?()[\]{}|]/g,$e=/^\[object .+?Constructor\]$/,Fn=/^(?:0|[1-9]\d*)$/,J={};J[K]=J[Se]=J[ze]=J[Je]=J[Et]=J[U]=J[Y]=J[L]=J[be]=!0,J[c]=J[d]=J[O]=J[p]=J[I]=J[f]=J[b]=J[B]=J[m]=J[x]=J[y]=J[V]=J[A]=J[q]=J[Be]=!1;var Rn=typeof re=="object"&&re&&re.Object===Object&&re,Rr=typeof self=="object"&&self&&self.Object===Object&&self,Ce=Rn||Rr||Function("return this")(),In=t&&!t.nodeType&&t,Mn=In&&!0&&r&&!r.nodeType&&r,Jt=Mn&&Mn.exports===In,Kt=Jt&&Rn.process,Ln=function(){try{return Kt&&Kt.binding&&Kt.binding("util")}catch{}}(),Yt=Ln&&Ln.isTypedArray;function Un(l,u){for(var _=-1,$=l==null?0:l.length,F=0,D=[];++_<$;){var G=l[_];u(G,_,l)&&(D[F++]=G)}return D}function vt(l,u){for(var _=-1,$=u.length,F=l.length;++_<$;)l[F+_]=u[_];return l}function zn(l,u){for(var _=-1,$=l==null?0:l.length;++_<$;)if(u(l[_],_,l))return!0;return!1}function Ir(l,u){for(var _=-1,$=Array(l);++_<l;)$[_]=u(_);return $}function Mr(l){return function(u){return l(u)}}function xt(l,u){return l.has(u)}function Xt(l,u){return l==null?void 0:l[u]}function Hn(l){var u=-1,_=Array(l.size);return l.forEach(function($,F){_[++u]=[F,$]}),_}function qn(l,u){return function(_){return l(u(_))}}function He(l){var u=-1,_=Array(l.size);return l.forEach(function($){_[++u]=$}),_}var Bt=Array.prototype,Lr=Function.prototype,ct=Object.prototype,St=Ce["__core-js_shared__"],Zt=Lr.toString,we=ct.hasOwnProperty,Pn=function(){var l=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Wn=ct.toString,Ur=RegExp("^"+Zt.call(we).replace(Fr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),en=Jt?Ce.Buffer:void 0,$t=Ce.Symbol,Gn=Ce.Uint8Array,Ct=ct.propertyIsEnumerable,dt=Bt.splice,Ve=$t?$t.toStringTag:void 0,Vt=Object.getOwnPropertySymbols,tn=en?en.isBuffer:void 0,ut=qn(Object.keys,Object),nn=Ye(Ce,"DataView"),ft=Ye(Ce,"Map"),rn=Ye(Ce,"Promise"),on=Ye(Ce,"Set"),an=Ye(Ce,"WeakMap"),ot=Ye(Object,"create"),Qn=ue(nn),Ke=ue(ft),zr=ue(rn),Hr=ue(on),qr=ue(an),Jn=$t?$t.prototype:void 0,sn=Jn?Jn.valueOf:void 0;function ae(l){var u=-1,_=l==null?0:l.length;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function Pr(){this.__data__=ot?ot(null):{},this.size=0}function Wr(l){var u=this.has(l)&&delete this.__data__[l];return this.size-=u?1:0,u}function Gr(l){var u=this.__data__;if(ot){var _=u[l];return _===o?void 0:_}return we.call(u,l)?u[l]:void 0}function Qr(l){var u=this.__data__;return ot?u[l]!==void 0:we.call(u,l)}function Jr(l,u){var _=this.__data__;return this.size+=this.has(l)?0:1,_[l]=ot&&u===void 0?o:u,this}ae.prototype.clear=Pr,ae.prototype.delete=Wr,ae.prototype.get=Gr,ae.prototype.has=Qr,ae.prototype.set=Jr;function ie(l){var u=-1,_=l==null?0:l.length;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function Kr(){this.__data__=[],this.size=0}function Yr(l){var u=this.__data__,_=Nt(u,l);if(_<0)return!1;var $=u.length-1;return _==$?u.pop():dt.call(u,_,1),--this.size,!0}function vr(l){var u=this.__data__,_=Nt(u,l);return _<0?void 0:u[_][1]}function Xr(l){return Nt(this.__data__,l)>-1}function Zr(l,u){var _=this.__data__,$=Nt(_,l);return $<0?(++this.size,_.push([l,u])):_[$][1]=u,this}ie.prototype.clear=Kr,ie.prototype.delete=Yr,ie.prototype.get=vr,ie.prototype.has=Xr,ie.prototype.set=Zr;function pe(l){var u=-1,_=l==null?0:l.length;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function eo(){this.size=0,this.__data__={hash:new ae,map:new(ft||ie),string:new ae}}function to(l){var u=Oe(this,l).delete(l);return this.size-=u?1:0,u}function no(l){return Oe(this,l).get(l)}function ro(l){return Oe(this,l).has(l)}function oo(l,u){var _=Oe(this,l),$=_.size;return _.set(l,u),this.size+=_.size==$?0:1,this}pe.prototype.clear=eo,pe.prototype.delete=to,pe.prototype.get=no,pe.prototype.has=ro,pe.prototype.set=oo;function Ot(l){var u=-1,_=l==null?0:l.length;for(this.__data__=new pe;++u<_;)this.add(l[u])}function Kn(l){return this.__data__.set(l,o),this}function Tt(l){return this.__data__.has(l)}Ot.prototype.add=Ot.prototype.push=Kn,Ot.prototype.has=Tt;function qe(l){var u=this.__data__=new ie(l);this.size=u.size}function ln(){this.__data__=new ie,this.size=0}function ao(l){var u=this.__data__,_=u.delete(l);return this.size=u.size,_}function so(l){return this.__data__.get(l)}function io(l){return this.__data__.has(l)}function lo(l,u){var _=this.__data__;if(_ instanceof ie){var $=_.__data__;if(!ft||$.length<n-1)return $.push([l,u]),this.size=++_.size,this;_=this.__data__=new pe($)}return _.set(l,u),this.size=_.size,this}qe.prototype.clear=ln,qe.prototype.delete=ao,qe.prototype.get=so,qe.prototype.has=io,qe.prototype.set=lo;function co(l,u){var _=Dt(l),$=!_&&er(l),F=!_&&!$&&At(l),D=!_&&!$&&!F&&rr(l),G=_||$||F||D,W=G?Ir(l.length,String):[],Z=W.length;for(var Q in l)we.call(l,Q)&&!(G&&(Q=="length"||F&&(Q=="offset"||Q=="parent")||D&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||yo(Q,Z)))&&W.push(Q);return W}function Nt(l,u){for(var _=l.length;_--;)if(Zn(l[_][0],u))return _;return-1}function cn(l,u,_){var $=u(l);return Dt(l)?$:vt($,_(l))}function pt(l){return l==null?l===void 0?de:g:Ve&&Ve in Object(l)?ve(l):Xn(l)}function Yn(l){return We(l)&&pt(l)==c}function vn(l,u,_,$,F){return l===u?!0:l==null||u==null||!We(l)&&!We(u)?l!==l&&u!==u:uo(l,u,_,$,vn,F)}function uo(l,u,_,$,F,D){var G=Dt(l),W=Dt(u),Z=G?d:Pe(l),Q=W?d:Pe(u);Z=Z==c?y:Z,Q=Q==c?y:Q;var le=Z==y,he=Q==y,te=Z==Q;if(te&&At(l)){if(!At(u))return!1;G=!0,le=!1}if(te&&!le)return D||(D=new qe),G||rr(l)?dn(l,u,_,$,F,D):mo(l,u,Z,_,$,F,D);if(!(_&s)){var ce=le&&we.call(l,"__wrapped__"),se=he&&we.call(u,"__wrapped__");if(ce||se){var at=ce?l.value():l,Xe=se?u.value():u;return D||(D=new qe),F(at,Xe,_,$,D)}}return te?(D||(D=new qe),go(l,u,_,$,F,D)):!1}function fo(l){if(!nr(l)||wo(l))return!1;var u=tr(l)?Ur:$e;return u.test(ue(l))}function po(l){return We(l)&&fn(l.length)&&!!J[pt(l)]}function ho(l){if(!ko(l))return ut(l);var u=[];for(var _ in Object(l))we.call(l,_)&&_!="constructor"&&u.push(_);return u}function dn(l,u,_,$,F,D){var G=_&s,W=l.length,Z=u.length;if(W!=Z&&!(G&&Z>W))return!1;var Q=D.get(l);if(Q&&D.get(u))return Q==u;var le=-1,he=!0,te=_&a?new Ot:void 0;for(D.set(l,u),D.set(u,l);++le<W;){var ce=l[le],se=u[le];if($)var at=G?$(se,ce,le,u,l,D):$(ce,se,le,l,u,D);if(at!==void 0){if(at)continue;he=!1;break}if(te){if(!zn(u,function(Xe,mt){if(!xt(te,mt)&&(ce===Xe||F(ce,Xe,_,$,D)))return te.push(mt)})){he=!1;break}}else if(!(ce===se||F(ce,se,_,$,D))){he=!1;break}}return D.delete(l),D.delete(u),he}function mo(l,u,_,$,F,D,G){switch(_){case I:if(l.byteLength!=u.byteLength||l.byteOffset!=u.byteOffset)return!1;l=l.buffer,u=u.buffer;case O:return!(l.byteLength!=u.byteLength||!D(new Gn(l),new Gn(u)));case p:case f:case x:return Zn(+l,+u);case b:return l.name==u.name&&l.message==u.message;case V:case q:return l==u+"";case m:var W=Hn;case A:var Z=$&s;if(W||(W=He),l.size!=u.size&&!Z)return!1;var Q=G.get(l);if(Q)return Q==u;$|=a,G.set(l,u);var le=dn(W(l),W(u),$,F,D,G);return G.delete(l),le;case R:if(sn)return sn.call(l)==sn.call(u)}return!1}function go(l,u,_,$,F,D){var G=_&s,W=ht(l),Z=W.length,Q=ht(u),le=Q.length;if(Z!=le&&!G)return!1;for(var he=Z;he--;){var te=W[he];if(!(G?te in u:we.call(u,te)))return!1}var ce=D.get(l);if(ce&&D.get(u))return ce==u;var se=!0;D.set(l,u),D.set(u,l);for(var at=G;++he<Z;){te=W[he];var Xe=l[te],mt=u[te];if($)var va=G?$(mt,Xe,te,u,l,D):$(Xe,mt,te,l,u,D);if(!(va===void 0?Xe===mt||F(Xe,mt,_,$,D):va)){se=!1;break}at||(at=te=="constructor")}if(se&&!at){var or=l.constructor,ar=u.constructor;or!=ar&&"constructor"in l&&"constructor"in u&&!(typeof or=="function"&&or instanceof or&&typeof ar=="function"&&ar instanceof ar)&&(se=!1)}return D.delete(l),D.delete(u),se}function ht(l){return cn(l,pn,_o)}function Oe(l,u){var _=l.__data__;return bo(u)?_[typeof u=="string"?"string":"hash"]:_.map}function Ye(l,u){var _=Xt(l,u);return fo(_)?_:void 0}function ve(l){var u=we.call(l,Ve),_=l[Ve];try{l[Ve]=void 0;var $=!0}catch{}var F=Wn.call(l);return $&&(u?l[Ve]=_:delete l[Ve]),F}var _o=Vt?function(l){return l==null?[]:(l=Object(l),Un(Vt(l),function(u){return Ct.call(l,u)}))}:xo,Pe=pt;(nn&&Pe(new nn(new ArrayBuffer(1)))!=I||ft&&Pe(new ft)!=m||rn&&Pe(rn.resolve())!=E||on&&Pe(new on)!=A||an&&Pe(new an)!=Be)&&(Pe=function(l){var u=pt(l),_=u==y?l.constructor:void 0,$=_?ue(_):"";if($)switch($){case Qn:return I;case Ke:return m;case zr:return E;case Hr:return A;case qr:return Be}return u});function yo(l,u){return u=u??i,!!u&&(typeof l=="number"||Fn.test(l))&&l>-1&&l%1==0&&l<u}function bo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function wo(l){return!!Pn&&Pn in l}function ko(l){var u=l&&l.constructor,_=typeof u=="function"&&u.prototype||ct;return l===_}function Xn(l){return Wn.call(l)}function ue(l){if(l!=null){try{return Zt.call(l)}catch{}try{return l+""}catch{}}return""}function Zn(l,u){return l===u||l!==l&&u!==u}var er=Yn(function(){return arguments}())?Yn:function(l){return We(l)&&we.call(l,"callee")&&!Ct.call(l,"callee")},Dt=Array.isArray;function un(l){return l!=null&&fn(l.length)&&!tr(l)}var At=tn||Bo;function Eo(l,u){return vn(l,u)}function tr(l){if(!nr(l))return!1;var u=pt(l);return u==B||u==w||u==h||u==S}function fn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function nr(l){var u=typeof l;return l!=null&&(u=="object"||u=="function")}function We(l){return l!=null&&typeof l=="object"}var rr=Yt?Mr(Yt):po;function pn(l){return un(l)?co(l):ho(l)}function xo(){return[]}function Bo(){return!1}r.exports=Eo}(Nn,Nn.exports);var Wa=Nn.exports,Dr={},Ga=re&&re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dr,"__esModule",{value:!0});var lf=Ga(Pa),cf=Ga(Wa),Ar;(function(r){function t(a,i,c){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var d=lf.default(i);c||(d=Object.keys(d).reduce(function(p,f){return d[f]!=null&&(p[f]=d[f]),p},{}));for(var h in a)a[h]!==void 0&&i[h]===void 0&&(d[h]=a[h]);return Object.keys(d).length>0?d:void 0}r.compose=t;function n(a,i){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var c=Object.keys(a).concat(Object.keys(i)).reduce(function(d,h){return cf.default(a[h],i[h])||(d[h]=i[h]===void 0?null:i[h]),d},{});return Object.keys(c).length>0?c:void 0}r.diff=n;function o(a,i){a===void 0&&(a={}),i===void 0&&(i={}),a=a||{};var c=Object.keys(i).reduce(function(d,h){return i[h]!==a[h]&&a[h]!==void 0&&(d[h]=i[h]),d},{});return Object.keys(a).reduce(function(d,h){return a[h]!==i[h]&&i[h]===void 0&&(d[h]=null),d},c)}r.invert=o;function s(a,i,c){if(c===void 0&&(c=!1),typeof a!="object")return i;if(typeof i=="object"){if(!c)return i;var d=Object.keys(i).reduce(function(h,p){return a[p]===void 0&&(h[p]=i[p]),h},{});return Object.keys(d).length>0?d:void 0}}r.transform=s})(Ar||(Ar={})),Dr.default=Ar;var Dn={},An={},Qa;function df(){if(Qa)return An;Qa=1;var r=re&&re.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(An,"__esModule",{value:!0});var t=r(Ka()),n=function(){function o(s){this.ops=s,this.index=0,this.offset=0}return o.prototype.hasNext=function(){return this.peekLength()<1/0},o.prototype.next=function(s){s||(s=1/0);var a=this.ops[this.index];if(a){var i=this.offset,c=t.default.length(a);if(s>=c-i?(s=c-i,this.index+=1,this.offset=0):this.offset+=s,typeof a.delete=="number")return{delete:s};var d={};return a.attributes&&(d.attributes=a.attributes),typeof a.retain=="number"?d.retain=s:typeof a.insert=="string"?d.insert=a.insert.substr(i,s):d.insert=a.insert,d}else return{retain:1/0}},o.prototype.peek=function(){return this.ops[this.index]},o.prototype.peekLength=function(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0},o.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},o.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var s=this.offset,a=this.index,i=this.next(),c=this.ops.slice(this.index);return this.offset=s,this.index=a,[i].concat(c)}else return[]},o}();return An.default=n,An}var Ja;function Ka(){if(Ja)return Dn;Ja=1;var r=re&&re.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Dn,"__esModule",{value:!0});var t=r(df()),n;return function(o){function s(i){return new t.default(i)}o.iterator=s;function a(i){return typeof i.delete=="number"?i.delete:typeof i.retain=="number"?i.retain:typeof i.insert=="string"?i.insert.length:1}o.length=a}(n||(n={})),Dn.default=n,Dn}var Gt=re&&re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},jn=Gt(sf),uf=Gt(Pa),jr=Gt(Wa),Qt=Gt(Dr),oe=Gt(Ka()),ff="\0",pf=function(){function r(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return r.prototype.insert=function(t,n){var o={};return typeof t=="string"&&t.length===0?this:(o.insert=t,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o))},r.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},r.prototype.retain=function(t,n){if(t<=0)return this;var o={retain:t};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o)},r.prototype.push=function(t){var n=this.ops.length,o=this.ops[n-1];if(t=uf.default(t),typeof o=="object"){if(typeof t.delete=="number"&&typeof o.delete=="number")return this.ops[n-1]={delete:o.delete+t.delete},this;if(typeof o.delete=="number"&&t.insert!=null&&(n-=1,o=this.ops[n-1],typeof o!="object"))return this.ops.unshift(t),this;if(jr.default(t.attributes,o.attributes)){if(typeof t.insert=="string"&&typeof o.insert=="string")return this.ops[n-1]={insert:o.insert+t.insert},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof o.retain=="number")return this.ops[n-1]={retain:o.retain+t.retain},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this}}return n===this.ops.length?this.ops.push(t):this.ops.splice(n,0,t),this},r.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},r.prototype.filter=function(t){return this.ops.filter(t)},r.prototype.forEach=function(t){this.ops.forEach(t)},r.prototype.map=function(t){return this.ops.map(t)},r.prototype.partition=function(t){var n=[],o=[];return this.forEach(function(s){var a=t(s)?n:o;a.push(s)}),[n,o]},r.prototype.reduce=function(t,n){return this.ops.reduce(t,n)},r.prototype.changeLength=function(){return this.reduce(function(t,n){return n.insert?t+oe.default.length(n):n.delete?t-n.delete:t},0)},r.prototype.length=function(){return this.reduce(function(t,n){return t+oe.default.length(n)},0)},r.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var o=[],s=oe.default.iterator(this.ops),a=0;a<n&&s.hasNext();){var i=void 0;a<t?i=s.next(t-a):(i=s.next(n-a),o.push(i)),a+=oe.default.length(i)}return new r(o)},r.prototype.compose=function(t){var n=oe.default.iterator(this.ops),o=oe.default.iterator(t.ops),s=[],a=o.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){for(var i=a.retain;n.peekType()==="insert"&&n.peekLength()<=i;)i-=n.peekLength(),s.push(n.next());a.retain-i>0&&o.next(a.retain-i)}for(var c=new r(s);n.hasNext()||o.hasNext();)if(o.peekType()==="insert")c.push(o.next());else if(n.peekType()==="delete")c.push(n.next());else{var d=Math.min(n.peekLength(),o.peekLength()),h=n.next(d),p=o.next(d);if(typeof p.retain=="number"){var f={};typeof h.retain=="number"?f.retain=d:f.insert=h.insert;var b=Qt.default.compose(h.attributes,p.attributes,typeof h.retain=="number");if(b&&(f.attributes=b),c.push(f),!o.hasNext()&&jr.default(c.ops[c.ops.length-1],f)){var B=new r(n.rest());return c.concat(B).chop()}}else typeof p.delete=="number"&&typeof h.retain=="number"&&c.push(p)}return c.chop()},r.prototype.concat=function(t){var n=new r(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},r.prototype.diff=function(t,n){if(this.ops===t.ops)return new r;var o=[this,t].map(function(d){return d.map(function(h){if(h.insert!=null)return typeof h.insert=="string"?h.insert:ff;var p=d===t?"on":"with";throw new Error("diff() called "+p+" non-document")}).join("")}),s=new r,a=jn.default(o[0],o[1],n),i=oe.default.iterator(this.ops),c=oe.default.iterator(t.ops);return a.forEach(function(d){for(var h=d[1].length;h>0;){var p=0;switch(d[0]){case jn.default.INSERT:p=Math.min(c.peekLength(),h),s.push(c.next(p));break;case jn.default.DELETE:p=Math.min(h,i.peekLength()),i.next(p),s.delete(p);break;case jn.default.EQUAL:p=Math.min(i.peekLength(),c.peekLength(),h);var f=i.next(p),b=c.next(p);jr.default(f.insert,b.insert)?s.retain(p,Qt.default.diff(f.attributes,b.attributes)):s.push(b).delete(p);break}h-=p}}),s.chop()},r.prototype.eachLine=function(t,n){n===void 0&&(n=`
7
- `);for(var o=oe.default.iterator(this.ops),s=new r,a=0;o.hasNext();){if(o.peekType()!=="insert")return;var i=o.peek(),c=oe.default.length(i)-o.peekLength(),d=typeof i.insert=="string"?i.insert.indexOf(n,c)-c:-1;if(d<0)s.push(o.next());else if(d>0)s.push(o.next(d));else{if(t(s,o.next(1).attributes||{},a)===!1)return;a+=1,s=new r}}s.length()>0&&t(s,{},a)},r.prototype.invert=function(t){var n=new r;return this.reduce(function(o,s){if(s.insert)n.delete(oe.default.length(s));else{if(s.retain&&s.attributes==null)return n.retain(s.retain),o+s.retain;if(s.delete||s.retain&&s.attributes){var a=s.delete||s.retain,i=t.slice(o,o+a);return i.forEach(function(c){s.delete?n.push(c):s.retain&&s.attributes&&n.retain(oe.default.length(c),Qt.default.invert(s.attributes,c.attributes))}),o+a}}return o},0),n.chop()},r.prototype.transform=function(t,n){if(n===void 0&&(n=!1),n=!!n,typeof t=="number")return this.transformPosition(t,n);for(var o=t,s=oe.default.iterator(this.ops),a=oe.default.iterator(o.ops),i=new r;s.hasNext()||a.hasNext();)if(s.peekType()==="insert"&&(n||a.peekType()!=="insert"))i.retain(oe.default.length(s.next()));else if(a.peekType()==="insert")i.push(a.next());else{var c=Math.min(s.peekLength(),a.peekLength()),d=s.next(c),h=a.next(c);if(d.delete)continue;h.delete?i.push(h):i.retain(c,Qt.default.transform(d.attributes,h.attributes,n))}return i.chop()},r.prototype.transformPosition=function(t,n){n===void 0&&(n=!1),n=!!n;for(var o=oe.default.iterator(this.ops),s=0;o.hasNext()&&s<=t;){var a=o.peekLength(),i=o.peekType();if(o.next(),i==="delete"){t-=Math.min(a,t-s);continue}else i==="insert"&&(s<t||!n)&&(t+=a);s+=a}return t},r.Op=oe.default,r.AttributeMap=Qt.default,r}(),hf=pf;const mf=ra(hf);/*!
5
+ `):" "+Yo(a[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:pr};function hr(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Lt(null,r)}function vo(r){return hr(r),r.headers=_e.from(r.headers),r.data=fr.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Xo.getAdapter(r.adapter||It.adapter)(r).then(function(o){return hr(r),o.data=fr.call(r,r.transformResponse,o),o.headers=_e.from(o.headers),o},function(o){return Qo(o)||(hr(r),o&&o.response&&(o.response.data=fr.call(r,r.transformResponse,o.response),o.response.headers=_e.from(o.response.headers))),Promise.reject(o)})}const Zo=r=>r instanceof _e?{...r}:r;function _t(r,t){t=t||{};const n={};function o(h,f,p){return C.isPlainObject(h)&&C.isPlainObject(f)?C.merge.call({caseless:p},h,f):C.isPlainObject(f)?C.merge({},f):C.isArray(f)?f.slice():f}function s(h,f,p){if(C.isUndefined(f)){if(!C.isUndefined(h))return o(void 0,h,p)}else return o(h,f,p)}function a(h,f){if(!C.isUndefined(f))return o(void 0,f)}function i(h,f){if(C.isUndefined(f)){if(!C.isUndefined(h))return o(void 0,h)}else return o(void 0,f)}function c(h,f,p){if(p in t)return o(h,f);if(p in r)return o(void 0,h)}const d={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(h,f)=>s(Zo(h),Zo(f),!0)};return C.forEach(Object.keys(Object.assign({},r,t)),function(f){const p=d[f]||s,y=p(r[f],t[f],f);C.isUndefined(y)&&p!==c||(n[f]=y)}),n}const ea="1.6.8",mr={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{mr[r]=function(o){return typeof o===r||"a"+(t<1?"n ":" ")+r}});const ta={};mr.transitional=function(t,n,o){function s(a,i){return"[Axios v"+ea+"] Transitional option '"+a+"'"+i+(o?". "+o:"")}return(a,i,c)=>{if(t===!1)throw new H(s(i," has been removed"+(n?" in "+n:"")),H.ERR_DEPRECATED);return n&&!ta[i]&&(ta[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,c):!0}};function oi(r,t,n){if(typeof r!="object")throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let s=o.length;for(;s-- >0;){const a=o[s],i=t[a];if(i){const c=r[a],d=c===void 0||i(c,a,r);if(d!==!0)throw new H("option "+a+" must be "+d,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H("Unknown option "+a,H.ERR_BAD_OPTION)}}const gr={assertOptions:oi,validators:mr},Ze=gr.validators;class st{constructor(t){this.defaults=t,this.interceptors={request:new Ho,response:new Ho}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=`
6
+ `+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=_t(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:a}=n;o!==void 0&&gr.assertOptions(o,{silentJSONParsing:Ze.transitional(Ze.boolean),forcedJSONParsing:Ze.transitional(Ze.boolean),clarifyTimeoutError:Ze.transitional(Ze.boolean)},!1),s!=null&&(C.isFunction(s)?n.paramsSerializer={serialize:s}:gr.assertOptions(s,{encode:Ze.function,serialize:Ze.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&C.merge(a.common,a[n.method]);a&&C.forEach(["delete","get","head","post","put","patch","common"],k=>{delete a[k]}),n.headers=_e.concat(i,a);const c=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const h=[];this.interceptors.response.forEach(function(m){h.push(m.fulfilled,m.rejected)});let f,p=0,y;if(!d){const k=[vo.bind(this),void 0];for(k.unshift.apply(k,c),k.push.apply(k,h),y=k.length,f=Promise.resolve(n);p<y;)f=f.then(k[p++],k[p++]);return f}y=c.length;let B=n;for(p=0;p<y;){const k=c[p++],m=c[p++];try{B=k(B)}catch(x){m.call(this,x);break}}try{f=vo.call(this,B)}catch(k){return Promise.reject(k)}for(p=0,y=h.length;p<y;)f=f.then(h[p++],h[p++]);return f}getUri(t){t=_t(this.defaults,t);const n=Jo(t.baseURL,t.url);return zo(n,t.params,t.paramsSerializer)}}C.forEach(["delete","get","head","options"],function(t){st.prototype[t]=function(n,o){return this.request(_t(o||{},{method:t,url:n,data:(o||{}).data}))}}),C.forEach(["post","put","patch"],function(t){function n(o){return function(a,i,c){return this.request(_t(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}st.prototype[t]=n(),st.prototype[t+"Form"]=n(!0)});class _r{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const o=this;this.promise.then(s=>{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](s);o._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(c=>{o.subscribe(c),a=c}).then(s);return i.cancel=function(){o.unsubscribe(a)},i},t(function(a,i,c){o.reason||(o.reason=new Lt(a,i,c),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new _r(function(s){t=s}),cancel:t}}}function ai(r){return function(n){return r.apply(null,n)}}function si(r){return C.isObject(r)&&r.isAxiosError===!0}const yr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yr).forEach(([r,t])=>{yr[t]=r});function na(r){const t=new st(r),n=So(st.prototype.request,t);return C.extend(n,st.prototype,t,{allOwnKeys:!0}),C.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return na(_t(r,s))},n}const v=na(It);v.Axios=st,v.CanceledError=Lt,v.CancelToken=_r,v.isCancel=Qo,v.VERSION=ea,v.toFormData=bn,v.AxiosError=H,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=ai,v.isAxiosError=si,v.mergeConfig=_t,v.AxiosHeaders=_e,v.formToJSON=r=>Wo(C.isHTMLForm(r)?new FormData(r):r),v.getAdapter=Xo.getAdapter,v.HttpStatusCode=yr,v.default=v;let yt=null;function ii(r){yt=v.create(r)}function li(){return yt}async function ci(r,t={},n={}){return new Promise((o,s)=>{yt.get(r,{headers:n,params:t}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function di(r,t,n={}){return new Promise((o,s)=>{yt.post(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}async function ui(r,t,n={}){return new Promise((o,s)=>{yt.delete(r,{data:t,headers:n}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function fi(r,t,n={}){return new Promise((o,s)=>{yt.put(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}const ye={get:ci,post:di,put:fi,remove:ui,setupAxios:ii,getAxiosInstance:li};var re=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ra(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function pi(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var oa={exports:{}};(function(r,t){(function(n,o){typeof pi=="function"?r.exports=o():n.pluralize=o()})(re,function(){var n=[],o=[],s={},a={},i={};function c(m){return typeof m=="string"?new RegExp("^"+m+"$","i"):m}function d(m,x){return m===x?x:m===m.toLowerCase()?x.toLowerCase():m===m.toUpperCase()?x.toUpperCase():m[0]===m[0].toUpperCase()?x.charAt(0).toUpperCase()+x.substr(1).toLowerCase():x.toLowerCase()}function h(m,x){return m.replace(/\$(\d{1,2})/g,function(g,b){return x[b]||""})}function f(m,x){return m.replace(x[0],function(g,b){var E=h(x[1],arguments);return d(g===""?m[b-1]:g,E)})}function p(m,x,g){if(!m.length||s.hasOwnProperty(m))return x;for(var b=g.length;b--;){var E=g[b];if(E[0].test(x))return f(x,E)}return x}function y(m,x,g){return function(b){var E=b.toLowerCase();return x.hasOwnProperty(E)?d(b,E):m.hasOwnProperty(E)?d(b,m[E]):p(E,b,g)}}function B(m,x,g,b){return function(E){var S=E.toLowerCase();return x.hasOwnProperty(S)?!0:m.hasOwnProperty(S)?!1:p(S,S,g)===S}}function k(m,x,g){var b=x===1?k.singular(m):k.plural(m);return(g?x+" ":"")+b}return k.plural=y(i,a,n),k.isPlural=B(i,a,n),k.singular=y(a,i,o),k.isSingular=B(a,i,o),k.addPluralRule=function(m,x){n.push([c(m),x])},k.addSingularRule=function(m,x){o.push([c(m),x])},k.addUncountableRule=function(m){if(typeof m=="string"){s[m.toLowerCase()]=!0;return}k.addPluralRule(m,"$0"),k.addSingularRule(m,"$0")},k.addIrregularRule=function(m,x){x=x.toLowerCase(),m=m.toLowerCase(),i[m]=x,a[x]=m},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(m){return k.addIrregularRule(m[0],m[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(m){return k.addPluralRule(m[0],m[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(m){return k.addSingularRule(m[0],m[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(k.addUncountableRule),k})})(oa);var hi=oa.exports;const aa=ra(hi),br=r=>r.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),kn="GET_LIST",En="GET_ONE",xn="CREATE",Bn="UPDATE",bt="REMOVE",wr="RESTORE",sa="ENABLE",mi=[kn,En,xn,Bn,bt,sa];class gi{constructor(t,n,o=mi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=aa(n),this.operations=o,this.operations.forEach(s=>{const a=br(s.toLowerCase());this[a]=this[`_${a}`]})}_getList(t){if(!this.operations.includes(kn)){console.log(`${this.side}/${this.domain} 不支持 ${kn} 操作`);return}return ye.get(`${this.side}/${this.resources}`,t)}_getOne(t){if(!this.operations.includes(En)){console.log(`${this.side}/${this.domain} 不支持 ${En} 操作`);return}return ye.get(`${this.side}/${this.resources}/${t.id}`)}_create(t){if(!this.operations.includes(xn)){console.log(`${this.side}/${this.domain} 不支持 ${xn} 操作`);return}return ye.post(`${this.side}/${this.resources}`,t)}_update(t){if(!this.operations.includes(Bn)){console.log(`${this.side}/${this.domain} 不支持 ${Bn} 操作`);return}return ye.put(`${this.side}/${this.resources}/${t.id}`,t)}_remove(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return ye.remove(`${this.side}/${this.resources}/${t.id}`,t)}_restore(t){if(!this.operations.includes(wr)){console.log(`${this.side}/${this.domain} 不支持 ${wr} 操作`);return}return ye.put(`${this.side}/${this.resources}/${t.id}/restore`,t)}_enable(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return ye.put(`${this.side}/${this.resources}/${t.id}/switch`,t)}}class _i{constructor(t,n,o){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=aa(n),this.listQuerys=o}getList(t){let n=t;return this.listQuerys&&(n={...this.listQuerys,...t}),ye.get(`${this.side}/${this.resources}`,n)}getOne(t){return ye.get(`${this.side}/${this.resources}/${t.id}`)}}const yi={Client:gi,ReadOnlyClient:_i,GET_LIST:kn,GET_ONE:En,CREATE:xn,UPDATE:Bn,REMOVE:bt,RESTORE:wr,ENABLE:sa},bi=(r,t,n)=>{const o=r[t];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},wi=["createdAt","updatedAt","deletedAt"];class Z{constructor(t,n){this.domain=n,this.type=t.type||"string",this.code=t.code,this.label=t.label,this.showInList=this._showInList(t),this.showInDetail=this._showInDetail(t),this.extendDetail=t.extendDetail||!1,this.rules=t.rules||[],this.editable=this._editable(t),this.visible=this._visible(t),this.width=this.computeWidth(t),this.span=t.span||6,this.wholeRow=(t==null?void 0:t.wholeRow)||!1,this.fixed=!1,this.maxImageCounts=t.maxImageCounts,this.format=t.format||"HH:mm:ss",this.change=(t==null?void 0:t.change)||null}computeWidth(t){return t.width?t.width:wi.includes(t.code)?200:t.code==="id"||t.type==="image"?100:null}defaultBy(t,n){return t??n}checkValidProperties(t){const n=Object.getOwnPropertyNames(t),o=Object.getOwnPropertyNames(this);if(n.every(a=>o.includes(a)))return;const s=n.filter(a=>!o.includes(a));console.error(`invalid field config props: [${s}] for ${this.domain}:${this.code}`)}_showInList(t){const n=t.showInList;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if("showInList"in this.defaultConfig())return()=>this.defaultConfig().showInList;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInList : ${n}`)}_showInDetail(t){const n=t.showInDetail;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInDetail : ${n}`)}_editable(t){const n=t.editable;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!1;throw new Exception(`invalid editable : ${n}`)}_visible(t){const n=t.visible;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return this._editable(t);throw new Exception(`invalid visible : ${n}`)}defaultConfig(){return{}}}function ia(r,t,n){console.warn(`${r}.${t} => ${n}`)}const kr={select:{config:"select"},"belongs-to":{config:"belongs-to"},boolean:{config:"boolean"},switch:{config:"switch",deprecated:"switch 字段类型即将废弃,请使用 boolean"},datetime:{config:"datetime"},date:{config:"date"},time:{config:"time"},editor:{config:"rich-text",deprecated:"editor 字段类型即将废弃,请使用 rich-text"},"rich-text":{config:"rich-text"},image:{config:"image"},images:{config:"images"},attachment:{config:"attachment"},attachments:{config:"attachment",deprecated:"attachments 字段类型即将废弃,请使用 attachment"},json:{config:"json"},"row-id":{config:"row-id"},string:{config:"string"},text:{config:"text"},textarea:{config:"text",deprecated:"textarea 字段类型即将废弃,请使用 text"},tree:{config:"tree-select",deprecated:"tree 字段类型即将废弃,请使用 tree-select"},"tree-select":{config:"tree-select"},cascader:{config:"cascader"},"radio-group":{config:"radio-group"},component:{config:"component"}};async function la(r,t,n){const o=await bi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>sd),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>ud),"./field/boolean/config.js":()=>Promise.resolve().then(()=>gd),"./field/cascader/config.js":()=>Promise.resolve().then(()=>kd),"./field/component/config.js":()=>Promise.resolve().then(()=>xd),"./field/date/config.js":()=>Promise.resolve().then(()=>Vd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>Ad),"./field/image/config.js":()=>Promise.resolve().then(()=>zd),"./field/images/config.js":()=>Promise.resolve().then(()=>Kd),"./field/json/config.js":()=>Promise.resolve().then(()=>Zd),"./field/radio-group/config.js":()=>Promise.resolve().then(()=>hu),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>ku),"./field/row-id/config.js":()=>Promise.resolve().then(()=>xu),"./field/select/config.js":()=>Promise.resolve().then(()=>Vu),"./field/string/config.js":()=>Promise.resolve().then(()=>Au),"./field/switch/config.js":()=>Promise.resolve().then(()=>Mu),"./field/text/config.js":()=>Promise.resolve().then(()=>qu),"./field/time/config.js":()=>Promise.resolve().then(()=>Ju),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>vu)}),`./field/${r}/config.js`,4);return new o.default(t,n)}function ca(r,t="unknown"){return r.map(o=>{if(o instanceof Z)return o;if(o.code==="id"?o.type="row-id":o.component&&(o.type="component"),Object.keys(kr).includes(o.type)){const s=kr[o.type];return s.deprecated&&ia(o.domain||t,o.code,s.deprecated),la(kr[o.type].config,o,o.domain||t)}return la("string",o,o.domain||t)})}let Er={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},Ut={};function ki(r){Er={...Er,...r},Ut=r.domainConfigs}function Ei(r){Object.keys(Ut).forEach(t=>{const n=Ut[t];Object.keys(n).forEach(o=>{const s=n[o];s.load=r(t,o)})})}function et(){return Er}function xr(){return Ut}function zt(r,t){return Ut[r][t].load().then(n=>{const o=n.default;return Promise.all(o.fields).then(s=>(o.fields=s,o))})}class xi{constructor(t,n){this.side=t;const o=n.config?n.config:n;this.code=o.code,this.fields=ca(o.fields,o.code),!o.simple&&(this.name=xr()[t][o.code].name,this.filters=o.filters||[],this.coverField=o.coverField,this.nameField=o.nameField||"name",this.showSubmit=o.showSubmit||!0,this.showEdit=this.setupShowEdit(o.showEdit),this.submitConfirm=o.submitConfirm,this.removeConfirm=o.removeConfirm,this.showCreate=this.setupShowCreate(o.showCreate),this.hasMany=this.createHasMany(n),this.hasOne=this.createHasOne(n),this.detailSubType=o.detailSubType?"list":"tabs",this.formatName=this.createFormatName(n.formatName),this.rest=this.createRestClient(n.rest),this.rowActions=this.setupRowActions(n),this.pageActions=this.setupPageActions(n),this.actionsWidth=n.actionsWidth||150,this.formHook=n.form||{},this.filterHook=n.filterForm||{},this.restRepeat=this.restRepeat(n.restRepeat),this.btnVisible=n.btnVisible||{},this.operations=this.setupOperations(),this.formLayout=n.formLayout||[],this.displayMode=n.displayMode||{})}wrapFields(t,n){return ca(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:`#${n.id}`}createHasOne(t){return n=>{if(typeof t.hasOne>"u")return[];if(Array.isArray(t.hasOne))return t.hasOne;if(typeof t.hasOne=="function"){const o=t.hasOne(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> hasOne 必须返回数组`),[])}return console.warn(`${this.code} --> hasOne 必须返回数组`),[]}}createHasMany(t){return n=>{if(typeof t.hasMany>"u")return[];if(Array.isArray(t.hasMany))return t.hasMany;if(typeof t.hasMany=="function"){const o=t.hasMany(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> hasMany 必须返回数组`),[])}return console.warn(`${this.code} --> hasMany 必须返回数组`),[]}}setupPageActions(t){return n=>{if(typeof t.pageActions>"u")return[];if(Array.isArray(t.pageActions))return t.pageActions;if(typeof t.pageActions=="function"){const o=t.pageActions(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> page actions 必须返回数组`),[])}return console.warn(`${this.code} --> page actions 必须返回数组`),[]}}setupRowActions(t){return n=>{if(typeof t.rowActions>"u")return[];if(Array.isArray(t.rowActions))return t.rowActions;if(typeof t.rowActions=="function"){const o=t.rowActions(n);return Array.isArray(o)?o:(console.warn(`${this.code} --> row actions 必须返回数组`),[])}return console.warn(`${this.code} --> row actions 必须返回数组`),[]}}setupShowCreate(t){return typeof t=="boolean"?()=>t:typeof t=="function"?n=>t(n):()=>!0}setupShowEdit(t){return typeof t=="boolean"?()=>t:typeof t=="function"?(n,o)=>t(n,o):()=>!0}restRepeat(t){return typeof t=="function"?n=>t():()=>""}setupOperations(t){const n={creatable:this.rest.create!=null,updatable:this.rest.update!=null,removable:this.rest.remove!=null,restorable:this.rest.restore!=null,showable:this.rest.getOne!=null};return o=>{const s=this.showCreate(o);return{...n,creatable:n.creatable&&s}}}}function da(r,t){return new xi(r,t)}const M=(r,t)=>{const n=r.__vccOpts||r;for(const[o,s]of t)n[o]=s;return n},Bi={class:"card-header"},Si={class:"title"},ua=M({__name:"Widget",props:{title:{type:String}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createBlock(e.unref(w.ElCard),{shadow:"never"},e.createSlots({default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:2},[t.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Bi,[e.createElementVNode("span",Si,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-c5513c07"]]),$i={key:0},Ci={key:1},Vi={key:0},Oi={key:1},fa=M({__name:"Statistic",props:{title:{type:String},value:{type:Number},background:{type:String},align:{type:String,default:"left"},link:{type:String}},setup(r){const t=r;let n="#f7faff",o="10px";return t.background&&(n=t.background,n=="none"&&(o="0px")),(s,a)=>{const i=e.resolveComponent("RouterLink");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle(`background: ${e.unref(n)}; padding: ${e.unref(o)}`)},[e.createElementVNode("div",{class:"item-box-data mono-data",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.value!=null?(e.openBlock(),e.createElementBlock("span",$i,e.toDisplayString(t.value),1)):(e.openBlock(),e.createElementBlock("span",Ci,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Vi,[e.createVNode(i,{to:t.link},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElLink),{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})]),_:1},8,["to"])])):(e.openBlock(),e.createElementBlock("span",Oi,e.toDisplayString(t.title),1))],4)],4)),[[e.unref(w.vLoading),t.value==null]])}}},[["__scopeId","data-v-73228f1a"]]),Ti=M({__name:"StatisticCard",props:{title:{type:String},value:{type:Number},icon:{type:String},background:{type:String},align:{type:String},link:{type:String}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createBlock(ua,null,{default:e.withCtx(()=>[e.createVNode(fa,{title:t.title,value:t.value,icon:t.icon,background:t.background,align:t.align,link:t.link},null,8,["title","value","icon","background","align","link"])]),_:1}))}},[["__scopeId","data-v-f338c407"]]),Ni={},Di={style:{padding:"20px 0"}};function Ai(r,t){return e.openBlock(),e.createElementBlock("div",Di,[e.renderSlot(r.$slots,"default")])}const ji=M(Ni,[["render",Ai]]),Fi=M({__name:"DashboardRow",setup(r){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(w.ElRow),{style:{"margin-bottom":"20px"},class:"row"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}},[["__scopeId","data-v-5b091760"]]);function Y(r){const t={...r.query,...r.params};if(r.params.domain&&r.params.id){const n=br(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function Ri(r){const t=r.length,n=Math.floor(24/t);return{type:"row",cols:r.map(s=>({type:"col",span:n,field:s}))}}function Br(r){return r.map(t=>Ri(t))}const Ii={__name:"FormLayout",props:{layout:Object,fields:Array},setup(r){const t=r,n=e.computed(()=>{if(t.layout.length==0){if(t.fields.length<=6){const i=s(t.fields,1);return Br(i)}console.log(t.fields);const a=s(t.fields,2);return Br(a)}return t.layout});function o(a){return t.fields.find(c=>c.code==a)}function s(a,i=2){const c=a.map(h=>h.code),d=[];for(let h=0;h<c.length;h+=i)d.push(c.slice(h,h+i));return d}return(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createBlock(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.cols,d=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:o(d.field).wholeRow?24:d.span},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{field:o(d.field)})]),_:2},1032,["span"]))),256))]),_:2},1024))),256))]))}},Mi={style:{width:"100%"}},Li={class:"footer"},Ui={key:1},zi=M({__name:"PureForm",props:{config:{type:Object},data:{type:Object},removable:{type:Boolean,default:!1}},emits:["submit","remove"],setup(r,{emit:t}){const n=U.useRoute(),o=Y(n),s=t,a=e.ref(!1),i=r,c=Br(i.config.formLayout||[]),d=e.reactive({...i.data}),h=e.ref(null),f=i.config.fields.filter(E=>E.rules).reduce((E,S)=>(E[S.code]=B(S.rules),E),{}),p=e.computed(b),y=e.computed(()=>i.config.fields.filter(E=>{const S=E.editable(d,o),V=E.visible(d,o);return E.disabled=V&&!S,S||V}));function B(E){return typeof E=="object"?E:typeof E=="function"?E(d):[]}function k(E){a.value=!0,s("submit",E,d,()=>{a.value=!1})}async function m(){await h.value.validate(async(E,S)=>{var q,R;if(!E)return console.log("error submit!",S),!1;const V=(q=i.config.fields.find(de=>["images","attachments","attachment"].includes(de.type)))==null?void 0:q.code,A={...d};if(V&&(A[V]=(R=A[V])==null?void 0:R.map(de=>de.id)),i.config.submitConfirm){await i.config.submitConfirm(A)&&k(A);return}k(A)})}function x(){s("remove",d)}function g(){if(i.config.removeConfirm){i.config.removeConfirm(d,x);return}w.ElMessageBox.confirm("确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{x()}).catch(()=>{w.ElMessage({type:"info",message:"取消删除"})})}function b(){const E=i.config.showSubmit;return typeof E=="boolean"?E:typeof E=="function"?E(o,d):!0}return e.watch(()=>({...d}),(E,S)=>{const A=Object.keys(E).filter(R=>S[R]!==E[R]).map(R=>{var de;return(de=h.value)==null||de.clearValidate(R),{field:R,newValue:E[R],oldValue:S[R]}});y.value.filter(R=>!R.disabled).forEach(R=>{R.formChange&&R.formChange(d,A)})}),e.watch(()=>i.data,E=>{Object.keys(E).forEach(S=>{d[S]=E[S]})},{immediate:!0}),(E,S)=>(e.openBlock(),e.createBlock(e.unref(w.ElForm),{id:"form",ref_key:"formRef",ref:h,model:d,"label-width":"100px","label-position":"top",rules:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(Ii,{layout:e.unref(c),fields:y.value},{default:e.withCtx(({field:V})=>[(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:V.code,label:V.label,prop:V.code},{default:e.withCtx(()=>[e.createElementVNode("div",Mi,[V!=null&&V.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.editor),{key:0,modelValue:d[V.code],"onUpdate:modelValue":A=>d[V.code]=A,field:V,disabled:V.disabled,"form-data":d,"domain-config":i.config,row:d},null,8,["modelValue","onUpdate:modelValue","field","disabled","form-data","domain-config","row"])):(e.openBlock(),e.createBlock(e.unref(w.ElAlert),{key:1,title:`未找到 ${V.code}(${V.type}) 的编辑器`,type:"error",effect:"dark",closable:!1},null,8,["title"]))])]),_:2},1032,["label","prop"]))]),_:1},8,["layout","fields"]),e.createElementVNode("div",Li,[d.id&&!d.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,size:"default",type:"danger",onClick:g},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1})):(e.openBlock(),e.createElementBlock("div",Ui)),p.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,size:"default",type:"primary",loading:a.value,onClick:m},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","rules"]))}},[["__scopeId","data-v-e33a452e"]]);function Hi(){return et().idempotentUrl?ye.get(et().idempotentUrl).then(r=>r.data):""}const Ht={getValue:Hi},Sn={__name:"FormEditor",props:{modelValue:{type:Boolean},config:{type:Object},data:{type:Object},title:{type:String},removable:{type:Boolean,default:!1}},emits:["update:modelValue","submit","remove"],setup(r,{emit:t}){const n=U.useRoute(),o=Y(n),s=t,a=r,i=e.ref(a.data),c=e.computed(()=>({...i.value,idempotentToken:h.value})),d=e.computed(()=>a.config.fields.filter(m=>m.visible(c,o)).length>=6?"60%":"40%"),h=e.ref(""),f=e.computed({get(){return a.modelValue},set(k){s("update:modelValue",k)}}),p=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`添加${a.config.name}`);function y(k,m,x){i.value=m,s("submit",k,async()=>{h.value=await Ht.getValue(),x()})}function B(k,m){s("remove",k,async()=>{h.value=await Ht.getValue(),m()})}return e.watch(()=>f,async()=>{h.value=await Ht.getValue()},{immediate:!0}),(k,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElDialog),{modelValue:f.value,"onUpdate:modelValue":m[0]||(m[0]=x=>f.value=x),width:d.value,top:"20px",title:p.value,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":2e3},{default:e.withCtx(()=>[e.createVNode(zi,{config:a.config,data:c.value,removable:a.removable,onSubmit:y,onRemove:B},null,8,["config","data","removable"])]),_:1},8,["modelValue","width","title"]))}},qi={__name:"RowActionFormEditor",props:{row:{type:Object},text:{type:String},code:{type:String},fields:{type:Array},onSubmit:{type:Function},type:{type:String,default:"primary"},restRepeat:{type:Function,default:()=>""},rest:{type:Object}},setup(r){const t=r,n=e.ref(t.row),o=e.ref(!1),s=e.shallowRef(null),a=U.useRoute(),i=Y(a),c=da("simple",{simple:!0,code:t.code,fields:t.fields});Promise.all(c.fields).then(f=>{c.fields=f,c.restRepeat=t.restRepeat,c.rest=t.rest,s.value=c});async function d(){const f=t.rest;if(f!=null&&f.getOne){const{data:p}=await f.getOne({...t.row,...i});n.value=p}o.value=!0}function h(f,p){t.onSubmit(f).then(()=>{o.value=!1,w.ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"}),console.log("success")}).catch(()=>{console.log("请求失败"),p()})}return(f,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElButton),{type:t.type,onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),o.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=y=>o.value=y),title:t.text,config:s.value,data:n.value,onSubmit:h},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},Pi={class:"not-found"},fe=M({__name:"EmptyTip",props:{text:{type:String,default:"<无>"}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("span",Pi,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-c97e855f"]]),pa={__name:"FieldEditor",props:{modelValue:{type:Array,default:()=>[]},field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>ef)),o=et().fileUploadUrl,s=t,a=r,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(f){const p=i.value.findIndex(y=>y.id===f.id);p>=0&&(i.value.splice(p,1),s("update:modelValue",i.value))}function h(f){w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),ye.post(o,f).then(p=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"});const y=c(p.data);i.value=i.value?[...i.value,y]:[y],s("update:modelValue",i.value)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"})})}return e.watch(()=>a.modelValue,async()=>{i.value=a.modelValue},{immediate:!0}),(f,p)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(n),{images:i.value,props:a.field.props,onOnUpload:h,onOnRemove:d},null,8,["images","props"])]))}},Qe=Ge.defineStore("data-table-mode",{state:()=>({mode:"list",created:-1,updated:-1,removed:-1}),actions:{change(r){r&&(this.mode=r)},fireCreated(){this.created=Date.now()},fireUpdated(){this.updated=Date.now()},fireRemoved(){this.removed=Date.now()}}}),qt=(r,t,n,o)=>Ge.defineStore(`${t}-${r}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Wi(r,t,this.filters,n,o)}},actions:{change(s){this.filters={...this.filters,...s},Sr(r,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},Sr(r,t,this.filters)}}});function Wi(r,t,n,o,s){let i={...Gi(r,t,o),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),Sr(r,t,i)}function Gi(r,t,n){const o=`filters---${t}---${r}`;let s={};return localStorage.getItem(o)&&(s=JSON.parse(localStorage.getItem(o))),Object.keys(s).filter(a=>Object.keys(n).includes(a)).reduce((a,i)=>(a[i]=s[i],a),{})}function Sr(r,t,n){const o=`filters---${t}---${r}`,s=Qi(n);return localStorage.setItem(o,JSON.stringify(s)),s}function Qi(r){return Object.keys(r).filter(t=>r[t]!=null&&r[t]!=null&&r[t]!="").reduce((t,n)=>(t[n]=r[n],t),{})}const Ji={class:"sorters-box"},Ki=["onClick"],Yi={class:"sorters-label"},Xi={class:"sorters-arrow-box"},vi=["onClick"],Zi=["onClick"],el=M({__name:"FiltersSorters",props:{sorters:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateSorters"],setup(r,{emit:t}){const n=t,o=r,s=e.ref([]);async function a(){typeof o.sorters.sortersList=="function"?s.value=await o.sorters.sortersList():s.value=o.sorters.sortersList}a(),e.watch(()=>o.value,()=>{i()}),e.watch(()=>s,()=>{i()},{immediate:!0});function i(){if(o.value.length>0)for(let d=0;d<s.value.length;d++){const h=s.value[d];for(let f=0;f<o.value.length;f++){const p=o.value[f];h.field===p.field&&(h.order=p.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,h){const f=s.value;h?f[d].order=h:f[d].order?f[d].order==="ASC"?f[d].order="DESC":f[d].order==="DESC"&&(f[d].order=""):f[d].order="ASC",n("updateSorters",f.filter(p=>p.order))}return(d,h)=>(e.openBlock(),e.createElementBlock("div",Ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(f,p)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:y=>c(p,"")},[e.createElementVNode("div",Yi,e.toDisplayString(f.name),1),e.createElementVNode("div",Xi,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",f.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(y=>c(p,"ASC"),["stop"])},null,10,vi),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",f.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(y=>c(p,"DESC"),["stop"])},null,10,Zi)])],8,Ki))),256))]))}},[["__scopeId","data-v-fa20b02a"]]),tl={class:"ranges-box"},nl={class:"range-item"},rl={class:"range-label"},ol={class:"range-input-box"},al=M({__name:"FiltersRange",props:{ranges:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateRanges"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive(o.ranges.rangesList);e.watch(()=>o.value,()=>{a()});function a(){o.value&&o.value.length>0?s.forEach(c=>{o.value.forEach(d=>{c.field===d.field&&(c.min=d.min?Number(d.min):null,c.max=d.max?Number(d.max):null)})}):s.forEach(c=>{c.min=null,c.max=null})}function i(c,d,h){const f=[...s];f.forEach(p=>{p.field===d&&(p[h]=c)}),n("updateRanges",f.filter(p=>p.min||p.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,h=>(e.openBlock(),e.createElementBlock("div",nl,[e.createElementVNode("div",rl,e.toDisplayString(h.name),1),e.createElementVNode("div",ol,[e.createVNode(e.unref(w.ElInputNumber),{modelValue:h.min,"onUpdate:modelValue":f=>h.min=f,"controls-position":"right",class:"input-box",onChange:f=>{i(f,h.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(w.ElInputNumber),{modelValue:h.max,"onUpdate:modelValue":f=>h.max=f,"controls-position":"right",class:"input-box",type:"number",onChange:f=>{i(f,h.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-30f46526"]]),sl={key:0},il=M({__name:"FiltersEditor",props:{settings:{type:Object}},setup(r){const t=r,n=U.useRoute(),o=Y(n),s=e.ref([]),a=e.reactive({}),i=e.reactive({}),c=qt(t.settings.code,n.path,t.settings.filters,t.settings.filterHook)();c.$subscribe((g,b)=>{b.filters.isDeleted!==a.isDeleted&&(Object.keys(a).forEach(E=>{a[E]=void 0}),a.isDeleted=b.filters.isDeleted)});function d(g){return typeof g=="boolean"?g:typeof g=="function"?g(o):!0}async function h(g,b){if(typeof g.options=="function")i[g.code]=await g.options(a,o,b);else if(Array.isArray(g.options))i[g.code]=g.options;else if(typeof g.options=="object"){const E=g.options.getOneUrl?g.options.getOneUrl:g.options.url;if(!b&&Array.isArray(a[g.code])&&a[g.code].length>0)i[g.code]=[],a[g.code].forEach(S=>{E.getOne({id:S}).then(V=>{i[g.code].push({code:V.data[g.options.data.value]||V.data.id,name:V.data[g.options.data.label]||V.data.name})})});else if(!b&&!Array.isArray(a[g.code])&&a[g.code])E.getOne({id:a[g.code]}).then(S=>{i[g.code]=[{code:S.data[g.options.data.value]||S.data.id,name:S.data[g.options.data.label]||S.data.name}]});else{const S=g.options.query.keyWord.toString(),V=g.options.method?g.options.method:"getList";g.options.url[V]({...g.options.query,[S]:b}).then(A=>{i[g.code]=A.data.rows.map(q=>({code:q[g.options.data.value]||q.id,name:q[g.options.data.label]||q.name}))})}}}function f(g){if(g.remote)return b=>{h(g,b)}}function p(g){a.sorters=g,m()}function y(g){a.filters=g}function B(){Object.keys(a).forEach(g=>{a[g]=void 0}),s.value=Object.keys(t.settings.filters).filter(g=>d(t.settings.filters[g].visible)).map(g=>{const b={...t.settings.filters[g],code:g};return a[g]=k(g),(b.type==="select"||b.type==="selectV2"||b.type==="tree")&&h(b),{...b,dateType:b.dateType||"datetimerange",format:b.format||"YYYY-MM-DD HH:mm:ss"}}).filter(g=>g.code!=="isDeleted")}function k(g){const b=t.settings.filters[g],E=c.validFilters[g];return b.type==="boolean"&&typeof E!="boolean"?b.value:E}function m(){let g=JSON.parse(JSON.stringify(a));const b=t.settings.filterHook;b!=null&&b.preSubmit&&(g=b.preSubmit(g,o)),c.change(g)}function x(){c.$reset({}),B(),m()}return e.watch(()=>t.settings,()=>{B(),m()},{immediate:!0}),e.watch(()=>({...a}),(g,b)=>{const S=Object.keys(g).filter(V=>b[V]!==g[V]).map(V=>({field:V,newValue:g[V],oldValue:b[V]}));s.value.forEach(V=>{V.formChange&&V.formChange(a,S)})}),(g,b)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",sl,[e.createVNode(e.unref(w.ElForm),{model:a,inline:"",class:"form-editor"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,E=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),null,{default:e.withCtx(()=>[E.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:0,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,filterable:"",clearable:"",placeholder:`是否${E.name}`,"value-on-clear":null,onChange:m},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElOption),{value:!0,label:`已${E.name}`},null,8,["label"]),e.createVNode(e.unref(w.ElOption),{value:!1,label:`未${E.name}`},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="select"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:1,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,filterable:"",clearable:"",remote:"","reserve-keyword":"","remote-show-suffix":"","fit-input-width":"",placeholder:E.name,multiple:E.multiple,"collapse-tags":"",class:e.normalizeClass(E.multiple?"tags-selects-input":""),"multiple-limit":E.multipleLimit?E.multipleLimit:0,"remote-method":f(E),"value-on-clear":null,onChange:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i[E.code],S=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:S.code,label:S.name,value:S.code,title:S.name},null,8,["label","value","title"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","multiple","class","multiple-limit","remote-method"])):E.type==="selectV2"?(e.openBlock(),e.createBlock(e.unref(w.ElSelectV2),{key:2,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,filterable:"",options:i[E.code]?i[E.code]:[],props:{label:"name",value:"code"},multiple:E.multiple,placeholder:E.name,clearable:"","value-on-clear":null,onChange:m},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):E.type==="sorters"?(e.openBlock(),e.createBlock(el,{key:3,value:a[E.code],sorters:E,onUpdateSorters:p},null,8,["value","sorters"])):E.type==="range"?(e.openBlock(),e.createBlock(al,{key:4,value:a[E.code],ranges:E,onUpdateRanges:y},null,8,["value","ranges"])):E.type==="datetime"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:5,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="datetime-range"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:6,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,type:E.dateType,format:E.format,"value-format":E.format,"start-placeholder":E.name,"end-placeholder":E.name,placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","start-placeholder","end-placeholder","placeholder"])):(e.openBlock(),e.createBlock(e.unref(w.ElInput),{key:7,modelValue:a[E.code],"onUpdate:modelValue":S=>a[E.code]=S,modelModifiers:{trim:!0},placeholder:E.name,type:E.type,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","type"]))]),_:2},1024))),256)),s.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{type:"primary",onClick:m},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1}),e.createVNode(e.unref(w.ElButton),{onClick:x},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-951320d1"]]);/*! Element Plus Icons Vue v2.3.1 */var ll=e.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),cl=ll,dl=e.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),ul=dl,fl=e.defineComponent({name:"Close",__name:"close",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),ha=fl,pl=e.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),ma=pl,hl=e.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),ml=hl,gl=e.defineComponent({name:"Delete",__name:"delete",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),_l=gl,yl=e.defineComponent({name:"Document",__name:"document",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),ga=yl,bl=e.defineComponent({name:"Download",__name:"download",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),wl=bl,kl=e.defineComponent({name:"Grid",__name:"grid",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"})]))}}),El=kl,xl=e.defineComponent({name:"Loading",__name:"loading",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),_a=xl,Bl=e.defineComponent({name:"Minus",__name:"minus",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),Sl=Bl,$l=e.defineComponent({name:"Operation",__name:"operation",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),Cl=$l,Vl=e.defineComponent({name:"Plus",__name:"plus",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),$r=Vl,Ol=e.defineComponent({name:"PriceTag",__name:"price-tag",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M224 318.336V896h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0z"}),e.createElementVNode("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),ya=Ol,Tl=e.defineComponent({name:"QuestionFilled",__name:"question-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),Nl=Tl,Dl=e.defineComponent({name:"Setting",__name:"setting",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),Al=Dl,jl=e.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Fl=jl,Rl=e.defineComponent({name:"View",__name:"view",setup(r){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),Il=Rl;const Ml={class:"data-page-title"},Ll={class:"title"},Ul={class:"data-page-toolbar"},zl=M({__name:"DataTableHeader",props:{settings:{type:Object},tableName:{type:String}},setup(r){const t=r,n=t.tableName?t.tableName:t.settings.name,o=U.useRoute(),s=Qe(),a=qt(t.settings.code,o.path,t.settings.filters,t.settings.filterHook)(),i=e.useSlots(),c=e.computed(()=>a.validFilters.isDeleted||!1),d=e.computed(()=>t.settings.displayMode.normalMode);function h(){a.$reset({isDeleted:!c.value})}function f(){const y=`table-view-${o.path}-${t.settings.code}`,B=localStorage.getItem(y)?localStorage.getItem(y):d.value;s.change(B)}function p(y){s.change(y);const B=`table-view-${o.path}-${t.settings.code}`;localStorage.setItem(B,s.mode)}return e.onMounted(f),(y,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ml,[e.createElementVNode("div",Ll,e.toDisplayString(c.value?`已删除的${e.unref(n)}`:e.unref(n)),1),e.createElementVNode("div",Ul,[e.unref(i).operations?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(w.ElDropdown),{trigger:"click",onCommand:p},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownItem),{command:"list"},{default:e.withCtx(()=>[e.createTextVNode(" 列表 ")]),_:1}),e.createVNode(e.unref(w.ElDropdownItem),{command:"grid"},{default:e.withCtx(()=>[e.createTextVNode(" 网格 ")]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(El))]),_:1}),e.createVNode(e.unref(w.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(cl))]),_:1})]),_:1})]),_:1}),t.settings.filters.isDeleted?(e.openBlock(),e.createBlock(e.unref(w.ElDropdown),{key:1,trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownItem),{command:"deleted",onClick:h},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(c.value?"未删除":"已删除"),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Al))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(il,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-898f42af"]]),Hl={class:"kst-field-row-id"},ql={key:0},Pl={key:1,class:"mono-data"},Wl={key:1},ba=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=e.useSlots(),n=U.useRoute(),o=r,s=n.meta.side,a=e.computed(()=>o.row[o.field.code]),i=e.computed(()=>({path:`/${s}/${o.field.domain}/${a.value}`,query:{...Y(n),...o.field.rowQuery(o.row)}}));function c(){return o.field.isRouter(o.row,Y(n))}return(d,h)=>{const f=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",Hl,[a.value?(e.openBlock(),e.createElementBlock("span",ql,[c()?(e.openBlock(),e.createBlock(f,{key:0,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("(#"+e.toDisplayString(a.value)+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" #"+e.toDisplayString(a.value),1)],64))]),_:3},8,["to"])):(e.openBlock(),e.createElementBlock("span",Pl,[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("("+e.toDisplayString(a.value)+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.value),1)],64))]))])):(e.openBlock(),e.createElementBlock("span",Wl," NO ID "))])}}},[["__scopeId","data-v-00021e61"]]);function Gl(r){w.ElMessage(r)}const Ql={show:Gl},wa=10,$n=Ge.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(r,t,n){this.history.find(s=>s.code==t)||(this.history.length>=wa&&(this.history=this.history.slice(2-wa),this.history.unshift(this.root)),this.history.push({title:r,code:t,path:n}))},setupRootPath(r,t){this.root={title:r,code:t,path:t},this.history=this.history.filter(n=>n.code!=t),this.history.unshift(this.root)},remove(r){this.history=this.history.filter(t=>t.code!=r)},getLast(){return this.history[this.history.length-1]},clear(){this.history=[]},updateTitleByCode(r,t){const n=this.history.find(o=>o.code==r);n&&(n.title=t)}}}),Cr={__name:"DomainEdit",props:{row:{type:Object},settings:{type:Object},operations:{type:Object,default:()=>{}},isDetail:{type:Boolean,default:!1}},setup(r){var k;const t=$n(),n=Qe(),o=U.useRoute(),s=U.useRouter(),a=Y(o),i=r,c=e.ref({}),d=e.ref(!1),h=e.computed(()=>{var m,x;return i.row.deletedAt?!1:(m=i.operations)!=null&&m.updatable?!0:!!((x=i.operations)!=null&&x.removable)}),f=e.ref((k=i.operations)==null?void 0:k.removable);async function p(){const m=i.settings.formHook,x=i.settings.btnVisible,g=i.settings.rest,{data:b}=await g.getOne({...i.row,...a});c.value=b,m.setupUpdate&&(c.value=m.setupUpdate(c.value,a)),x.showRemove&&(f.value=x.showRemove(c.value)),d.value=!0}function y(m,x){const g=i.settings.formHook,b=i.settings.rest;Object.keys(a).forEach(E=>{m[E]=a[E]}),g!=null&&g.preUpdateSubmit&&(m=g.preUpdateSubmit(m)),b.update(m).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{x()})}function B(m,x){i.settings.rest.remove(m).then(()=>{Ql.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(b=>{o.fullPath.includes(b.path)&&(t.remove(b.code),s.back())}),n.fireRemoved()}).catch(()=>{x()})}return(m,x)=>h.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,type:"primary",onClick:p},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:d.value,"onUpdate:modelValue":x[0]||(x[0]=g=>d.value=g),config:i.settings,data:c.value,removable:f.value,onSubmit:y,onRemove:B},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Jl=r=>(e.pushScopeId("data-v-0941be48"),r=r(),e.popScopeId(),r),Kl={class:"data-grid-wrapper"},Yl={key:0,class:"cover"},Xl=Jl(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),vl={class:"header"},Zl={key:0},ec={class:"key"},tc={class:"value"},nc={key:1,class:"footer tools"},rc=M({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(r){const t=U.useRoute(),n=Y(t),o=e.useSlots(),s=r,a=qt(s.settings.code,t.path,s.settings.filters,s.settings.filterHook)(),{filters:i}=Ge.storeToRefs(a),c=e.ref(i.value),d=e.shallowRef([]),h=e.shallowRef(null),f=e.ref(!1);async function p(){return await s.settings.showEdit(n,"grid")}e.watchEffect(()=>{p().then(g=>{f.value=g})});const y=e.computed(()=>{var g,b;return!!((g=s.operations)!=null&&g.updatable&&f||(b=s.operations)!=null&&b.removable&&f)}),B=e.computed(()=>s.settings.displayMode.gridWidth),k=e.computed(()=>s.settings.displayMode.heightAuto);function m(){h.value=s.settings.fields.find(g=>g.code==="id"),d.value=s.settings.fields.filter(g=>g.code===s.settings.coverField||g.code===s.settings.nameField||g.code==="id"?!1:g.showInList(n,c.value))}function x(g){return s.settings.nameField?g[s.settings.nameField]:g.name?g.name:`${g.id}`}return e.watch(i,g=>{c.value=g,m()}),m(),(g,b)=>(e.openBlock(),e.createElementBlock("div",Kl,[r.data.length===0?(e.openBlock(),e.createBlock(e.unref(w.ElEmpty),{key:0,description:"暂无数据"})):(e.openBlock(),e.createBlock(e.unref(w.ElRow),{key:1,gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data,E=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{style:{"margin-bottom":"20px"},span:B.value?B.value:24,xs:B.value?{}:24,sm:B.value?{}:12,md:B.value?{}:8,lg:B.value?{}:6,xl:B.value?{}:4},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElCard),{"body-style":{padding:"0px"},shadow:"hover"},{default:e.withCtx(()=>[e.unref(o).cover||s.settings.coverField?(e.openBlock(),e.createElementBlock("div",Yl,[e.unref(o).cover?e.renderSlot(g.$slots,"cover",{key:0,row:E},void 0,!0):(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:1,src:E[s.settings.coverField],fit:"contain"},{error:e.withCtx(()=>[Xl]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",vl,[e.createVNode(ba,{field:h.value,row:E},e.createSlots({_:2},[E[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x(E)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",{class:e.normalizeClass(k.value?"body heightAuto":"body")},[e.unref(o).body?(e.openBlock(),e.createElementBlock("div",Zl,[e.renderSlot(g.$slots,"body",{row:E},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value,S=>(e.openBlock(),e.createElementBlock("div",{key:S.code,class:"field mono-data"},[e.createElementVNode("div",ec,e.toDisplayString(S.label)+" ",1),e.createElementVNode("div",tc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{field:S,row:E,mode:"grid"},null,8,["field","row"]))])]))),128))],2),e.unref(o).actions||y.value?(e.openBlock(),e.createElementBlock("div",nc,[e.unref(o).actions?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"actions",{row:E},void 0,!0)]),_:2},1024)):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:1,size:"small"},{default:e.withCtx(()=>[e.createVNode(Cr,{row:E,settings:s.settings,operations:s.operations},null,8,["row","settings","operations"])]),_:2},1024)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["span","xs","sm","md","lg","xl"]))),256))]),_:3}))]))}},[["__scopeId","data-v-0941be48"]]);function oc(r,t){const n=r.fields.map(s=>s.code),o=Object.keys(t);n.forEach(s=>{o.includes(s)||console.error(`${r.code}.${s} : 与服务端数据不匹配`)})}const ka=M({__name:"DataList",props:{settings:{type:Object},data:{type:Array,default:()=>[]},operations:{type:Object,default:()=>{}},operationsWidth:{type:Number,default:100},actionsWidth:{type:Number,default:150}},emits:["sort-column","select-change","enable-item"],setup(r,{emit:t}){const n=U.useRoute(),o=Y(n),s=t,a=e.useSlots(),i=r,c=qt(i.settings.code,n.path,i.settings.filters,i.settings.filterHook)(),{filters:d}=Ge.storeToRefs(c),h=e.ref(d.value),f=e.shallowRef([]),p=e.ref(!1);async function y(){return await i.settings.showEdit(o,"list")}e.watchEffect(()=>{y().then(b=>{p.value=b})});const B=e.computed(()=>{var b,E;return!!((b=i.operations)!=null&&b.updatable&&p.value||(E=i.operations)!=null&&E.removable&&p.value)});function k(b){s("sort-column",b)}function m(b){s("enable-item",b)}function x(){f.value=i.settings.fields.filter(b=>b.showInList(o,h.value))}function g(b){s("select-change",{routeQuery:o,data:b})}return x(),e.watch(()=>i.data,()=>{i.data.length>0&&oc(i.settings,i.data[0])}),e.watch(d,b=>{h.value=b,x()}),(b,E)=>(e.openBlock(),e.createBlock(e.unref(w.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","row-key":"id",onSelectionChange:g,onSortChange:k},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,S=>(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:S.code,label:S.label,width:S.width,prop:S.code,sortable:S.sortable?"custom":!1,fixed:S.fixed},e.createSlots({_:2},[S.type==="switch"?{name:"default",fn:e.withCtx(({row:V})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{field:S,row:V,mode:"list",onEnable:m},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:V})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{key:V.updatedAt,field:S,row:V,mode:"list"},null,8,["field","row"]))]),key:"1"}]),1032,["label","width","prop","sortable","fixed"]))),128)),e.unref(a).actions?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:0,label:"管理",fixed:"right",width:i.actionsWidth},{default:e.withCtx(({row:S})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"actions",{row:S},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:S})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Cr,{row:S,settings:i.settings,operations:i.operations},null,8,["row","settings","operations"])]),_:2},1024)]),_:1},8,["width"])):e.createCommentVNode("",!0)]),_:3},8,["data"]))}},[["__scopeId","data-v-31b40ae5"]]),ac={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(r){const t=Qe();t.$reset();const{mode:n}=Ge.storeToRefs(t),o=e.useSlots(),s=r,a=e.shallowRef(ka);function i(c){c=="grid"?a.value=rc:a.value=ka}return e.watch(n,c=>{i(c)}),(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.normalizeProps(e.guardReactiveProps(s)),e.createSlots({_:2},[e.renderList(e.unref(o),(h,f)=>({name:f,fn:e.withCtx(p=>[e.renderSlot(c.$slots,f,e.normalizeProps(e.guardReactiveProps(p||{})))])}))]),1040))}},sc={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(r){const t=Qe(),n=U.useRoute(),o=Y(n),s=r,a=e.ref({}),i=e.ref(!1),c=e.ref(!1);async function d(){var p;return await((p=s.operations)==null?void 0:p.creatable)}e.watchEffect(()=>{d().then(p=>{c.value=p})});async function h(){const p=s.settings.formHook,y=s.settings.fields.reduce((B,k)=>(B[k.code]=k.default,B),{});a.value=y,p.setupCreate&&(a.value=p.setupCreate(a.value,o)),i.value=!0}function f(p,y){const B=s.settings.formHook,k=s.settings.rest;Object.keys(o).forEach(m=>{p[m]=o[m]}),B!=null&&B.preCreateSubmit&&(p=B.preCreateSubmit(p)),k.create(p).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{y()})}return(p,y)=>c.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,type:"success",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(" 添加 "),i.value?(e.openBlock(),e.createBlock(Sn,{key:0,modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=B=>i.value=B),config:s.settings,data:a.value,removable:!1,onSubmit:f},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Ea={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object},mode:{type:String}},setup(r){const t=U.useRouter(),n=Qe(),o=r,s=e.shallowRef([]);let a="";async function i(d,h){if(a=w.ElLoading.service({fullscreen:!0}),d.path){a.close(),c(d,h);return}const f=await Ht.getValue();try{await d.action({...h,...o.query,idempotentToken:f}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,h){t.push(d.path(h,o.query))}return e.watch(()=>o.row,()=>{s.value=o.settings.rowActions(o.query)},{immediate:!0}),(d,h)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,f=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f.isVisible(o.row,o.query,o.mode)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.component),{key:0,row:r.row},null,8,["row"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,type:f.type?f.type:"primary",onClick:p=>i(f,o.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},ic={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object},filterForm:{type:Object}},setup(r){const t=Qe(),n=r,o=n.query,s=e.ref({}),a=e.shallowRef([]),i=e.computed(()=>{var f,p;return((p=(f=n.tableDataSelect)==null?void 0:f.data)==null?void 0:p.length)>0});e.ref(!1),e.watch(()=>n.filterForm,f=>{s.value=f});const c=e.ref(!1);async function d(f){c.value=!0;const p=await Ht.getValue();try{await f.action({...n.tableDataSelect,filterForms:s.value,query:o,idempotentToken:p}),c.value=!1,t.fireUpdated()}catch{c.value=!1,t.fireUpdated()}}function h(f){return typeof h=="boolean"?f:typeof f=="function"?f(s.value,o):!0}return e.watch(()=>n.row,()=>{a.value=n.settings.pageActions(n.query)},{immediate:!0}),(f,p)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,y=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h(y.isVisible)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.component),{key:0,item:y,settings:r.settings,query:e.unref(o),"table-data-select":r.tableDataSelect,"filter-form":r.filterForm},null,8,["item","settings","query","table-data-select","filter-form"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,type:y.type,loading:c.value,disabled:!y.enable&&!i.value,onClick:B=>d(y)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.name),1)]),_:2},1032,["type","loading","disabled","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},lc={class:"pagination-wrapper"},cc=M({__name:"Pagination",props:{total:{type:Number},page:{type:Number,default:1},size:{type:Number,default:30},pageSizes:{type:Array,default:()=>[30,60,90,120]}},emits:["page-change"],setup(r,{emit:t}){const n=t,o=U.useRouter(),s=U.useRoute(),a=r,i=e.ref(a.page),c=e.ref(a.size),d=e.ref(a.total),h=e.ref(a.pageSizes);e.watch(()=>a.total,y=>{d.value=y}),e.watch(()=>[s.query.page,s.query.pageSize],()=>{!s.query.page||!s.query.pageSize?(i.value=1,c.value=30):(i.value=parseInt(s.query.page),c.value=parseInt(s.query.pageSize)),n("page-change",{page:i.value,size:c.value})});function f(y){i.value=y,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function p(y){c.value=y,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(y,B)=>(e.openBlock(),e.createElementBlock("div",lc,[e.createVNode(e.unref(w.ElPagination),{background:"","page-size":c.value,"page-sizes":h.value,total:d.value,"current-page":r.page,layout:"total,sizes, prev, pager, next",onCurrentChange:f,onSizeChange:p},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-3c65f1a1"]]);var xa;const Ba=typeof window<"u";Ba&&((xa=window==null?void 0:window.navigator)!=null&&xa.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function dc(r){return typeof r=="function"?r():e.unref(r)}function uc(r){return r}function fc(r){return e.getCurrentScope()?(e.onScopeDispose(r),!0):!1}function pc(r,t=!0){e.getCurrentInstance()?e.onMounted(r):t?r():e.nextTick(r)}function hc(r){var t;const n=dc(r);return(t=n==null?void 0:n.$el)!=null?t:n}const mc=Ba?window:void 0;function gc(r,t=!1){const n=e.ref(),o=()=>n.value=!!r();return o(),pc(o,t),n}const Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$a="__vueuse_ssr_handlers__";Sa[$a]=Sa[$a]||{};var Ca=Object.getOwnPropertySymbols,_c=Object.prototype.hasOwnProperty,yc=Object.prototype.propertyIsEnumerable,bc=(r,t)=>{var n={};for(var o in r)_c.call(r,o)&&t.indexOf(o)<0&&(n[o]=r[o]);if(r!=null&&Ca)for(var o of Ca(r))t.indexOf(o)<0&&yc.call(r,o)&&(n[o]=r[o]);return n};function Va(r,t,n={}){const o=n,{window:s=mc}=o,a=bc(o,["window"]);let i;const c=gc(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},h=e.watch(()=>hc(r),p=>{d(),c.value&&s&&p&&(i=new ResizeObserver(t),i.observe(p,a))},{immediate:!0,flush:"post"}),f=()=>{d(),h()};return fc(f),{isSupported:c,stop:f}}var Oa;(function(r){r.UP="UP",r.RIGHT="RIGHT",r.DOWN="DOWN",r.LEFT="LEFT",r.NONE="NONE"})(Oa||(Oa={}));var wc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,kc=Object.prototype.hasOwnProperty,Ec=Object.prototype.propertyIsEnumerable,Na=(r,t,n)=>t in r?wc(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,xc=(r,t)=>{for(var n in t||(t={}))kc.call(t,n)&&Na(r,n,t[n]);if(Ta)for(var n of Ta(t))Ec.call(t,n)&&Na(r,n,t[n]);return r};xc({linear:uc},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Vr=M({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object},hasMany:{type:Object}},setup(r){var Je,Et;e.useCssVars(z=>({"1dc5ac10":ze.value}));const t=U.useRoute(),n=Y(t),o=r,s=qt(o.settings.code,t.path,o.settings.filters,o.settings.filterHook)(),{filters:a}=Ge.storeToRefs(s),i=(Je=o==null?void 0:o.hasMany)==null?void 0:Je.tableName;e.watch(a,z=>{b.value=z,R()});const c=Qe(),{created:d,updated:h,removed:f}=Ge.storeToRefs(c);e.watch([d,h,f],([z,X,L])=>{(z||X||L)&&R()});const p=e.ref(!0),y=e.ref([]),B=e.ref(0),k=e.ref({}),m=e.ref({}),x=e.ref(null),g=e.ref(null),b=e.ref({}),E=e.ref(parseInt(t.query.pageSize)||30),S=e.ref(parseInt(t.query.page)||1),V=(Et=o.hasMany)==null?void 0:Et.tableContentHeight;function A(z){let X=null;if(z.order==="ascending"?X="ASC":z.order==="descending"&&(X="DESC"),b.value.sorters){let L=[];b.value.sorters.some(be=>be.field===z.prop)?b.value.sorters.forEach(be=>{be.field===z.prop&&(be.order=X,be.name||L.push(be)),be.name&&L.push(be)}):L=[...b.value.sorters,{field:z.prop,order:X}],b.value.sorters=L}else b.value.sorters=[{field:z.prop,order:X}];R()}function q(){m.value=o.settings.operations(n)}function R(){p.value=!0;const z={...b.value,...n,...o.query,page:S.value,size:E.value};o.settings.rest.getList(z).then(X=>{k.value.data=[],y.value=X.data.rows,B.value=X.data.count,p.value=!1})}function de(z){S.value=z.page,E.value=z.size,R()}function Be(z){const X={id:z.id,enable:!z.enable};o.settings.rest.enable(X).then(()=>{R()})}function O(z){if(z.enable){const X=z.label==="上架"?"下架":"停用";ElMessageBox.confirm(`确定要${X}该条数据吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Be(z)}).catch(()=>{})}else Be(z)}function I(z){k.value=z}const K=e.ref(0),Se=e.ref(0);Va(x,z=>{var X;K.value=((X=z[0])==null?void 0:X.contentRect.height)||0}),Va(g,z=>{var X;Se.value=((X=z[0])==null?void 0:X.contentRect.height)||0});const ze=e.computed(()=>V&&B.value>0?`${V}px`:`calc(100% - ${K.value+Se.value}px)`);return q(),(z,X)=>(e.openBlock(),e.createElementBlock("div",{key:o.settings.code,style:{height:"100%"}},[e.createElementVNode("div",{ref_key:"pageHeader",ref:x},[e.createVNode(zl,{settings:o.settings,"table-name":e.unref(i)},{operations:e.withCtx(()=>[e.createVNode(ic,{settings:o.settings,"table-data-select":k.value,query:e.unref(n),"filter-form":b.value},null,8,["settings","table-data-select","query","filter-form"]),e.createVNode(sc,{settings:o.settings,operations:m.value},null,8,["settings","operations"])]),_:1},8,["settings","table-name"])],512),e.withDirectives((e.openBlock(),e.createBlock(ac,{class:"data-table-box",data:y.value,operations:m.value,settings:o.settings,"actions-width":o.settings.actionsWidth,onSortColumn:A,onEnableItem:O,onSelectChange:I},e.createSlots({_:2},[o.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:L})=>[e.createVNode(Ea,{mode:"list",row:L,settings:o.settings,query:e.unref(n)},null,8,["row","settings","query"])]),key:"0"}:void 0]),1032,["data","operations","settings","actions-width"])),[[e.unref(w.vLoading),p.value]]),e.createElementVNode("div",{ref_key:"pagination",ref:g},[e.createVNode(cc,{page:S.value,size:E.value,total:B.value,onPageChange:de},null,8,["page","size","total"])],512)]))}},[["__scopeId","data-v-8762261d"]]);/*! Element Plus v2.7.2 */var Bc={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const Sc={__name:"TooltipText",props:{content:{type:[Number,String],default:""},lineClamp:{type:[Number,String],default:1},className:{type:String},tipShowLength:{type:[Number,String]},textType:{type:String}},setup(r){const t=r,n=e.computed(()=>t.content?t.content.toString():"");return(o,s)=>(e.openBlock(),e.createElementBlock("div",null,[n.value.length>t.tipShowLength?(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{key:0,content:n.value,effect:"light"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElText),{class:e.normalizeClass(t.className),type:t.textType,"line-clamp":t.lineClamp},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["class","type","line-clamp"])]),_:1},8,["content"])):(e.openBlock(),e.createBlock(e.unref(w.ElText),{key:1,type:t.textType,class:e.normalizeClass(t.className)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["type","class"]))]))}},$c={class:"header-box"},Cc={class:"header-box-left"},Vc={class:"page-title"},Oc={class:"tabs-container"},Tc={class:"user-profile"},Nc=M({__name:"HeaderMenu",props:{config:{type:Object}},setup(r){const t=U.useRouter(),n=U.useRoute(),o=$n(),s=e.ref("首页"),a=r,i=n.fullPath.split("/")[1],c=B();o.setupRootPath("首页",`/${i}/home`);function d(k){var E,S;const m=k.meta.side,x=k.params.domain;let g=(E=k.meta)==null?void 0:E.title,b=(S=k.meta)==null?void 0:S.code;if(m&&x){g=xr()[m][k.params.domain].name,b=k.params.domain;const V=k.params.id;V&&V!="detail"&&(g=`${g} - ${k.params.id}`,b=`${k.params.domain}-${k.params.id}`)}else{const V=c.find(A=>A.route===k.path);V&&(g=V.title,b=V.route)}g&&b&&(o.push(g,b,k.fullPath),s.value=b)}function h(k){const m=o.history.find(x=>x.code==k.props.name);t.push(m.path)}function f(k){if(o.remove(k),k==s.value){const m=o.getLast();s.value=m.title,t.push(m.path)}}const p=(k,m)=>{const x=o.history.length;return k===0&&m==="self"||k<2&&m==="left"||k===x-1&&m==="right"||x===1&&m==="all"?!1:!(x<2&&m==="other")};function y(k,m){const x=[],g=o.history;switch(m){case"self":x.push(g[k].code);break;case"left":for(let b=0;b<k;b++)b!==0&&x.push(g[b].code);break;case"right":for(let b=k+1;b<g.length;b++)x.push(g[b].code);break;case"all":for(let b=0;b<g.length;b++)b!==0&&x.push(g[b].code);break;case"other":for(let b=1;b<g.length;b++)b!==k&&x.push(g[b].code);break}for(let b=0;b<x.length;b++)f(x[b])}function B(){return a.config.sideMenus[i].map(k=>k.children?k.children:k).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(k,m)=>(e.openBlock(),e.createElementBlock("div",$c,[e.createElementVNode("div",null,[e.createElementVNode("div",Cc,[e.createVNode(e.unref(w.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",Vc,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",Oc,[e.createVNode(e.unref(w.ElTabs),{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=x=>s.value=x),type:"card",class:"tabs",onTabClick:h,onTabRemove:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).history,(x,g)=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{closable:x.title!="首页",label:x.title,name:x.code},{label:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdown),{trigger:"contextmenu"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[p(g,"self")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:0,onClick:b=>y(g,"self")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1}),e.createTextVNode(" 关闭当前标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(g,"left")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:1,onClick:b=>y(g,"left")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createTextVNode(" 关闭左侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(g,"right")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:2,onClick:b=>y(g,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ml))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(g,"all")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:3,onClick:b=>y(g,"all")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Sl))]),_:1}),e.createTextVNode(" 关闭全部标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(g,"other")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:4,onClick:b=>y(g,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Cl))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(Sc,{content:x.title,"line-clamp":1,"class-name":"tab-pane-label","tip-show-length":"6"},null,8,["content"])]),_:2},1024)]),_:2},1032,["closable","label","name"]))),256))]),_:1},8,["modelValue"]),e.createElementVNode("span",{class:"back-icon",onClick:m[1]||(m[1]=x=>e.unref(t).back())},[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1})])]),e.createElementVNode("div",Tc,[e.renderSlot(k.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-4c5cfc79"]]),Dc=r=>(e.pushScopeId("data-v-22a49b3f"),r=r(),e.popScopeId(),r),Ac={key:2,class:"dot-wrapper"},jc=[Dc(()=>e.createElementVNode("span",{class:"dot"},null,-1))],Da=M({__name:"SideBarItem",props:{data:{type:Object},hasParent:{type:Boolean,default:!1}},setup(r){const t=r;return(n,o)=>r.data.children?(e.openBlock(),e.createBlock(e.unref(w.ElSubMenu),{key:0,index:r.data.title},{title:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data.children,s=>(e.openBlock(),e.createBlock(Da,{data:s,"has-parent":!0},null,8,["data"]))),256))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(w.ElMenuItem),{key:1,index:r.data.route,route:r.data.route,class:"menu-item"},{default:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):t.hasParent?(e.openBlock(),e.createElementBlock("span",Ac,jc)):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),_:1},8,["index","route"]))}},[["__scopeId","data-v-22a49b3f"]]),Fc=M({__name:"SideBar",props:{sideMenus:{type:Object}},setup(r){const t=U.useRouter(),n=U.useRoute(),o=e.ref(n.fullPath),s=r,a=n.fullPath.split("/")[1],i=s.sideMenus[a];return e.watch(()=>t.currentRoute.value,()=>{var c;if((c=n.meta)!=null&&c.side){const d=n.meta.side;n.params.id=="detail"?o.value=`/${d}/${n.params.domain}/detail`:o.value=`/${d}/${n.params.domain}/list`}else o.value=n.fullPath},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(w.ElScrollbar),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElMenu),{class:"menu",router:!0,"default-active":o.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),h=>(e.openBlock(),e.createBlock(Da,{data:h},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-e039032d"]]),Rc=M({__name:"BaseLayout",props:{config:{type:Object,default:()=>({})}},setup(r){const t=U.useRoute(),n=r,o={...et(),...n.config},s=e.computed(()=>t.params.domain?t.params.domain:t.fullPath);return(a,i)=>{const c=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(e.unref(w.ElConfigProvider),{locale:e.unref(Bc)},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElContainer),{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElHeader),{class:"page-header"},{default:e.withCtx(()=>[e.createVNode(Nc,{config:o},{"user-profile":e.withCtx(()=>[e.renderSlot(a.$slots,"user-profile",{},void 0,!0)]),_:3})]),_:3}),e.createVNode(e.unref(w.ElContainer),{class:"page-content-container"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(Fc,{"side-menus":o.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(w.ElMain),{class:"page-content-main"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1})]),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-ea73195f"]]),Ic={key:1,class:"loading-wrapper"},Aa=M({__name:"List",props:{domain:{type:String}},setup(r){const t=r,n=U.useRoute(),o=n.meta.side,s=t.domain||n.params.domain,a=e.shallowRef(null);return zt(o,s).then(i=>{a.value=i}),(i,c)=>a.value?(e.openBlock(),e.createBlock(Vr,{key:0,settings:a.value},null,8,["settings"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Ic,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-2d9c8e98"]]),Mc={key:0},Lc={class:"key"},Uc={class:"value"},zc={key:1,class:"loading-wrapper"},ja=M({__name:"DomainDescription",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(r,{emit:t}){const n=t,o=r,s=U.useRoute(),a=Y(s),i=Qe(),{updated:c}=Ge.storeToRefs(i),d=e.ref(null),h=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select","radio-group"],f=e.computed(()=>o.settings.fields.filter(x=>x.showInDetail(d.value,{...a,...o.query}))),p=e.computed(()=>f.value.find(x=>x.code===o.settings.coverField)),y=e.computed(()=>f.value.filter(x=>!h.includes(x.type)&&!x.extendDetail)),B=e.computed(()=>{var g;const x=(g=p.value)==null?void 0:g.code;return f.value.filter(b=>h.includes(b.type)||b.extendDetail).filter(b=>b.code!==x)}),k=e.computed({get(){return B.value.map(x=>x.code)},set(x){}});function m(){o.settings.rest.getOne(o.query).then(x=>{x.data.isDeleted=!!x.data.deletedAt,d.value=x.data,n("done",x.data)})}return e.watch(c,()=>{m()},{immediate:!0}),(x,g)=>(e.openBlock(),e.createElementBlock("div",null,[d.value?(e.openBlock(),e.createElementBlock("div",Mc,[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[p.value?(e.openBlock(),e.createBlock(e.unref(w.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.value.display),{field:p.value,row:d.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:p.value?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,b=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:b.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Lc,e.toDisplayString(b.label),1),e.createElementVNode("div",Uc,[b.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.value.id),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{key:1,field:b,row:d.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),B.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:k.value,"onUpdate:modelValue":g[0]||(g[0]=b=>k.value=b),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,b=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:b.label,name:b.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.display),{field:b,row:d.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",zc,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-dbcf33d5"]]),Hc={class:"data-page-title"},qc={class:"title"},Pc=M({__name:"DataDetailHeader",props:{data:{type:Object},settings:{type:Object},query:{type:Object}},emits:["get-item"],setup(r,{emit:t}){$n();const n=U.useRoute(),o=Y(n),s=r,a=e.ref("加载中..."),i=e.ref({});function c(d){const h=s.settings;if(h.displayMode.normalMode=="detail")a.value=`${h.name}`;else{const p=`${h.formatName(d)}`;a.value=p?`${h.name}:${p}`:`${h.name}`}}return e.watch(()=>s.data,d=>{d&&(i.value=s.settings.operations(o),c(d))},{immediate:!0}),(d,h)=>(e.openBlock(),e.createElementBlock("div",Hc,[e.createElementVNode("div",qc,e.toDisplayString(a.value),1),e.createElementVNode("div",null,[s.data?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(Ea,{row:s.data,settings:s.settings,query:e.unref(o),mode:"detail"},null,8,["row","settings","query"]),s.settings.showEdit(e.unref(o),"detail")?(e.openBlock(),e.createBlock(Cr,{key:0,row:s.data,settings:s.settings,operations:i.value,"is-detail":!0},null,8,["row","settings","operations"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-0d04eb53"]]),Wc=M({__name:"DetailPageTabs",props:{associations:{type:Array},domainData:{type:Object}},setup(r){const t=U.useRouter(),n=U.useRoute(),o=Y(n),s=r,a=e.ref(""),i=e.shallowRef(null);function c(h){a.value=h.props.name,t.push({name:`${n.meta.side}-association`,params:{association:h.props.name},query:o})}function d(h){if(s.associations.length>0)if(n.params.association){a.value=n.params.association;const f=s.associations.find(p=>p.domain===n.params.association);i.value={...f,domainData:s.domainData}}else a.value=s.associations[0].domain,i.value={...s.associations[0],domainData:s.domainData},h&&h()}return e.watch(()=>s.domainData,()=>{d(()=>{t.replace({name:`${n.meta.side}-association`,params:{association:a.value},query:o})})},{immediate:!0}),e.watch(()=>n.params,()=>{d()},{immediate:!0}),(h,f)=>{const p=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElTabs),{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=y=>a.value=y),class:"association-tabs",onTabClick:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.associations,y=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{label:y.name,name:y.domain},null,8,["label","name"]))),256))]),_:1},8,["modelValue"]),i.value?(e.openBlock(),e.createBlock(p,{key:i.value,association:i.value},null,8,["association"])):e.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-0dc49aad"]]),Gc={__name:"DetailPageList",props:{associations:{type:Array},domainData:{type:Object}},setup(r){return(t,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.associations,o=>(e.openBlock(),e.createElementBlock("div",null,[o.type=="has-many"?(e.openBlock(),e.createBlock(Aa,{key:0,domain:o.domain},null,8,["domain"])):e.createCommentVNode("",!0),o.type=="has-one"?(e.openBlock(),e.createBlock(Fa,{key:1,domain:o.domain},null,8,["domain"])):e.createCommentVNode("",!0)]))),256))}},Qc=M({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(r){U.useRouter();const t=U.useRoute(),n=Y(t),o=r,s=e.ref(null);function a(i){s.value=i}return(i,c)=>(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).params.domain}-${e.unref(t).params.id}`},[e.createVNode(Pc,{data:s.value,settings:o.settings,query:{...e.unref(t).params,...e.unref(n)}},null,8,["data","settings","query"]),e.createVNode(ja,{query:{...e.unref(t).params,...e.unref(n)},settings:o.settings,onDone:a},null,8,["query","settings"]),o.settings.detailSubType==="tabs"?(e.openBlock(),e.createBlock(Wc,{key:0,associations:r.associations,"domain-data":s.value},null,8,["associations","domain-data"])):(e.openBlock(),e.createBlock(Gc,{key:1,associations:r.associations,"domain-data":s.value},null,8,["associations","domain-data"]))]))}},[["__scopeId","data-v-6e5c2d0f"]]),Jc={key:1,class:"loading-wrapper"},Fa=M({__name:"Detail",props:{domain:{type:String}},setup(r){const t=r,n=U.useRoute(),o=Y(n),s=n.meta.side,a=t.domain||n.params.domain,i=e.shallowRef(null),c=e.shallowRef([]);zt(s,a).then(h=>{const f=h,p=d("has-many",f.hasMany(o)),y=d("has-one",f.hasOne(o));i.value=f,c.value=y.concat(p)});function d(h,f){return(f||[]).map(p=>typeof p=="object"?{type:h,domain:p.code,name:p.name,tableName:p.tableName,tableContentHeight:p.tableContentHeight,query:p.query||(()=>({}))}:{type:h,domain:p,name:xr()[s][p].name,query:()=>({})})}return(h,f)=>i.value?(e.openBlock(),e.createBlock(Qc,{key:0,settings:i.value,associations:c.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Jc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-ecd5a448"]]),Kc={key:0},Yc={key:1,class:"loading-wrapper"},Xc=M({__name:"DetailTab",props:{association:{type:Object}},setup(r){const t=U.useRoute(),n=t.meta.side,o=Y(t),s=r,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{zt(n,t.params.association).then(i=>{a.value={...s.association,settings:i}})},{immediate:!0}),(i,c)=>a.value&&s.association.domainData?(e.openBlock(),e.createElementBlock("div",Kc,[a.value.type==="has-many"?(e.openBlock(),e.createBlock(Vr,{key:`has-many-${a.value.domain}`,settings:a.value.settings,"has-many":s.association,query:a.value.query(s.association.domainData)},null,8,["settings","has-many","query"])):a.value.type==="has-one"?(e.openBlock(),e.createBlock(ja,{key:`has-one-${a.value.domain}`,style:{"padding-top":"20px"},query:e.unref(o),settings:a.value.settings},null,8,["query","settings"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Yc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-79eac380"]]),vc={key:0},Zc={class:"file-name"},ed={class:"name"},td={class:"file-type"},nd={key:1},rd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref([]);function o(a){fetch(a.url).then(i=>i.blob()).then(i=>{const c=document.createElement("a");i.type=="application/x-rar-compressed"?c.href=a.url:c.href=URL.createObjectURL(i),c.download=a.name,document.body.appendChild(c),c.click()})}function s(a){return["jpg","jpeg","png","gif","webp","bmp","pdf"].includes(a)}return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code].map(a=>{const i=a.url.substring(a.url.lastIndexOf(".")+1);return{...a,fileType:i,isPreview:s(i)}})},{immediate:!0}),(a,i)=>n.value.length>0?(e.openBlock(),e.createElementBlock("div",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Zc,[e.createVNode(e.unref(w.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createElementVNode("span",ed,e.toDisplayString(c.name),1),e.createElementVNode("span",td,"."+e.toDisplayString(c.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#409eff",size:"16",onClick:d=>o(c)},{default:e.withCtx(()=>[e.createVNode(e.unref(wl))]),_:2},1032,["onClick"]),c.isPreview?(e.openBlock(),e.createBlock(e.unref(w.ElLink),{key:0,type:"primary",href:c.url,target:"_blank",underline:!1},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(Il))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",nd,[e.createVNode(fe)]))}},[["__scopeId","data-v-196b9bff"]]),od={__name:"FieldEditor",props:{modelValue:Array,field:Object,domainConfig:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>rf)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(f){a.value=a.value?[...a.value,f]:[f]}function c(f){const p=a.value.findIndex(y=>y.id===f.id);a.value.splice(p,1)}async function d(f){const p=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(f.name)){w.ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await p.updateFilesName(f).then(()=>{w.ElMessage({message:"附件名称已修改!",type:"success"})})}function h(f,p){if(p=="success"){i(f),o("update:modelValue",a.value);return}if(p=="remove"){c(f),o("update:modelValue",a.value);return}if(p=="change"){d(f);return}}return(f,p)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:p[0]||(p[0]=y=>h(y,"success")),onOnRemove:p[1]||(p[1]=y=>h(y,"remove")),onOnChange:p[2]||(p[2]=y=>h(y,"change"))},null,8,["pics","props"]))}};class ad extends Z{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=rd,this.editor=od,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const sd=Object.freeze(Object.defineProperty({__proto__:null,default:ad},Symbol.toStringTag,{value:"Module"})),id={key:3},ld=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=U.useRoute(),n=r,o=n.field.belongsTo,s=t.meta.side,a=n.row[n.field.code],i=e.computed(()=>({path:`/${s}/${o}/${a}`,query:{...Y(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),h=e.ref("");let f=null;const p=zt(s,o).then(m=>(f=m.formatName,Promise.resolve(m.rest)));function y(m){return n.field.isRouter(n.row,Y(t))&&!Y(t)[n.field.code]}function B(){p.then(m=>{c.value=!0;const x=n.row[n.field.code],g=n.row[br(`${o}-name`)];if(!x){k(!1),c.value=!1;return}if(x&&g){k({id:x,name:g}),c.value=!1;return}const b={id:x};m.getOne(b).then(E=>{k(E.data),c.value=!1}).catch(E=>{console.log(E)})})}function k(m){if(d.value=!1,n.field.showName){ia(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),h.value=m[n.field.showName];return}if(n.field.formatter){h.value=n.field.formatter(m);return}if(m.id&&m.name){h.value=m.name;return}if(!m){d.value=!0;return}h.value=f(m)}return e.watch(()=>n.row,B,{immediate:!0}),(m,x)=>{const g=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("span",null,[c.value?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,class:"loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})):d.value?(e.openBlock(),e.createBlock(fe,{key:1})):y(r.row)?(e.openBlock(),e.createBlock(g,{key:2,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("div",id,e.toDisplayString(h.value),1))])}}},[["__scopeId","data-v-d0fdf31e"]]),cd={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=U.useRoute(),o=Y(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(f){c.value=await a.field.options(a.formData,o,f)}function h(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(f,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=y=>i.value=y),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:"",remote:"","remote-method":d,onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,y=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:y.code,label:y.name,value:y.code,title:y.name,disabled:y.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class dd extends Z{constructor(t,n){super(t,n),this.belongsTo=t.belongsTo,this.formChange=t.formChange||(()=>{}),this.isRouter=this.isRouter(t),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.display=ld,this.editor=cd,this.showName=t.showName,this.formatter=t.formatter,this.rowQuery=t.rowQuery||(()=>({})),this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const ud=Object.freeze(Object.defineProperty({__proto__:null,default:dd},Symbol.toStringTag,{value:"Module"})),fd={style:{display:"flex","align-items":"center"}},pd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.computed(()=>t.row[t.field.code]);return(o,s)=>(e.openBlock(),e.createElementBlock("span",fd,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,color:"#529b2e",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Fl))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,color:"#F56C6C",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(ul))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,color:"#73767a",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Nl))]),_:1}))]))}},hd={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class md extends Z{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=pd,this.editor=hd,this.formChange=t.formChange||(()=>{}),this.checkValidProperties(t)}}const gd=Object.freeze(Object.defineProperty({__proto__:null,default:md},Symbol.toStringTag,{value:"Module"})),_d={key:0},yd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(o.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",_d,e.toDisplayString(o.value),1)),e.createTextVNode(" edit ")]))}},bd={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElCascader),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),props:o.field.props,clearable:"",style:{width:"100%"},onChange:a},null,8,["modelValue","props"]))}};class wd extends Z{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=yd,this.editor=bd,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const kd=Object.freeze(Object.defineProperty({__proto__:null,default:wd},Symbol.toStringTag,{value:"Module"}));class Ed extends Z{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const xd=Object.freeze(Object.defineProperty({__proto__:null,default:Ed},Symbol.toStringTag,{value:"Module"})),Bd={key:0},Sd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(o.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Bd,e.toDisplayString(o.value),1))}},$d={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",onChange:a},null,8,["modelValue","disabled"]))}};class Cd extends Z{constructor(t,n){super(t,n),this.display=Sd,this.editor=$d,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Vd=Object.freeze(Object.defineProperty({__proto__:null,default:Cd},Symbol.toStringTag,{value:"Module"})),Od={key:0},Td={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(o.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Od,e.toDisplayString(o.value),1))}},Nd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",onChange:a},null,8,["modelValue","disabled"]))}};class Dd extends Z{constructor(t,n){super(t,n),this.display=Td,this.editor=Nd,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Ad=Object.freeze(Object.defineProperty({__proto__:null,default:Dd},Symbol.toStringTag,{value:"Module"})),Ra=r=>(e.pushScopeId("data-v-3b7cda77"),r=r(),e.popScopeId(),r),jd={class:"loading-error"},Fd=Ra(()=>e.createElementVNode("div",null,"加载失败",-1)),Rd={key:1,class:"loading-error"},Id=[Ra(()=>e.createElementVNode("div",null,"暂无",-1))],Md=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code],o.value=[t.row[t.field.code]]},{immediate:!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`image-card ${t.mode}`)},[n.value?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,src:n.value,"preview-teleported":"",fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",jd,[Fd,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",Rd,Id))],2))}},[["__scopeId","data-v-3b7cda77"]]),Ld={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>af)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(c){o("update:modelValue",c)}return e.watch(()=>s.modelValue,async()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{"image-url":a.value,disabled:s.disabled,onOnSuccess:i},null,8,["image-url","disabled"]))}};class Ud extends Z{constructor(t,n){super(t,n),this.display=Md,this.editor=Ld,this.checkValidProperties(t)}}const zd=Object.freeze(Object.defineProperty({__proto__:null,default:Ud},Symbol.toStringTag,{value:"Module"})),Ia=r=>(e.pushScopeId("data-v-56e18295"),r=r(),e.popScopeId(),r),Hd={class:"image-card",style:{"margin-bottom":"20px"}},qd={class:"loading-error"},Pd=Ia(()=>e.createElementVNode("div",null,"图片加载失败",-1)),Wd={key:1,class:"loading-error"},Gd=[Ia(()=>e.createElementVNode("div",null,"暂无",-1))],Qd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{const s=t.row[t.field.code];s&&(o.value=s.map(a=>a.url),n.value=o.value[0])},{immediate:!0}),(s,a)=>t.row[t.field.code].length>0?(e.openBlock(),e.createBlock(e.unref(w.ElSpace),{key:0,wrap:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.row[t.field.code],i=>(e.openBlock(),e.createElementBlock("div",Hd,[i.url?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,src:i.url,fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",qd,[Pd,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",Wd,Gd))]))),256))]),_:1})):(e.openBlock(),e.createBlock(fe,{key:1}))}},[["__scopeId","data-v-56e18295"]]);class Jd extends Z{constructor(t,n){super(t,n),this.props=t.props,this.display=Qd,this.editor=pa,this.converter=this.defaultBy(t.converter,o=>o),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Kd=Object.freeze(Object.defineProperty({__proto__:null,default:Jd},Symbol.toStringTag,{value:"Module"})),Yd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=e.defineAsyncComponent(()=>import("json-editor-vue")),n=r,o=e.ref(!1),s=e.ref("加载中...");return e.watch(()=>n.row,()=>{o.value=!1;const a=n.row[n.field.code];a!=null&&`${a}`.trim()!==""&&(o.value=!0,s.value=a)},{immediate:!0}),(a,i)=>o.value?(e.openBlock(),e.createBlock(e.unref(t),{key:0,modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),mode:"text","main-menu-bar":!1,"navigation-bar":!1,"read-only":!0},null,8,["modelValue"])):(e.openBlock(),e.createBlock(fe,{key:1}))}},Xd={__name:"FieldEditor",props:{modelValue:Object,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>import("json-editor-vue")),o=t,s=r,a=e.reactive({value:s.modelValue});function i(c){a.value=c.text,o("update:modelValue",a.value)}return e.watch(()=>s.modelValue,()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=h=>a.value=h),style:{width:"100%",height:"300px"},mode:"text","main-menu-bar":!1,"navigation-bar":!1,onChange:i},null,8,["modelValue"]))}};class vd extends Z{constructor(t,n){super(t,n),this.display=Yd,this.editor=Xd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Zd=Object.freeze(Object.defineProperty({__proto__:null,default:vd},Symbol.toStringTag,{value:"Module"}));var j=function(r,t,n){if(!t.has(r))throw new TypeError("attempted to set private field on non-instance");return t.set(r,n),n},T=function(r,t){if(!t.has(r))throw new TypeError("attempted to get private field on non-instance");return t.get(r)},tt,it,ke,wt,Pt,De,Ae,je,Fe,Re,Ie,Me,Le,lt,kt,nt,Cn,rt;const eu=function(r){var t=131,n=137,o=0;r+="x";var s=Math.floor(9007199254740991/n);for(let a=0;a<r.length;a++)o>s&&(o=Math.floor(o/n)),o=o*t+r.charCodeAt(a);return o},N="0123456789abcdef".split(""),tu=[-2147483648,8388608,32768,128],Ee=[24,16,8,0],Vn=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],ne=[];class nu{constructor(t=!1,n=!1){tt.set(this,void 0),it.set(this,void 0),ke.set(this,void 0),wt.set(this,void 0),Pt.set(this,void 0),De.set(this,void 0),Ae.set(this,void 0),je.set(this,void 0),Fe.set(this,void 0),Re.set(this,void 0),Ie.set(this,void 0),Me.set(this,void 0),Le.set(this,void 0),lt.set(this,void 0),kt.set(this,void 0),nt.set(this,void 0),Cn.set(this,0),rt.set(this,void 0),this.init(t,n)}init(t,n){n?(ne[0]=ne[16]=ne[1]=ne[2]=ne[3]=ne[4]=ne[5]=ne[6]=ne[7]=ne[8]=ne[9]=ne[10]=ne[11]=ne[12]=ne[13]=ne[14]=ne[15]=0,j(this,it,ne)):j(this,it,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(j(this,De,3238371032),j(this,Ae,914150663),j(this,je,812702999),j(this,Fe,4144912697),j(this,Re,4290775857),j(this,Ie,1750603025),j(this,Me,1694076839),j(this,Le,3204075428)):(j(this,De,1779033703),j(this,Ae,3144134277),j(this,je,1013904242),j(this,Fe,2773480762),j(this,Re,1359893119),j(this,Ie,2600822924),j(this,Me,528734635),j(this,Le,1541459225)),j(this,tt,j(this,rt,j(this,ke,j(this,kt,0)))),j(this,wt,j(this,lt,!1)),j(this,Pt,!0),j(this,nt,t)}update(t){if(T(this,wt))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let o=0;const s=n.length,a=T(this,it);for(;o<s;){let i;if(T(this,lt)&&(j(this,lt,!1),a[0]=T(this,tt),a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),typeof n!="string")for(i=T(this,rt);o<s&&i<64;++o)a[i>>2]|=n[o]<<Ee[i++&3];else for(i=T(this,rt);o<s&&i<64;++o){let c=n.charCodeAt(o);c<128?a[i>>2]|=c<<Ee[i++&3]:c<2048?(a[i>>2]|=(192|c>>6)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):c<55296||c>=57344?(a[i>>2]|=(224|c>>12)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):(c=65536+((c&1023)<<10|n.charCodeAt(++o)&1023),a[i>>2]|=(240|c>>18)<<Ee[i++&3],a[i>>2]|=(128|c>>12&63)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3])}j(this,Cn,i),j(this,ke,T(this,ke)+(i-T(this,rt))),i>=64?(j(this,tt,a[16]),j(this,rt,i-64),this.hash(),j(this,lt,!0)):j(this,rt,i)}return T(this,ke)>4294967295&&(j(this,kt,T(this,kt)+(T(this,ke)/4294967296<<0)),j(this,ke,T(this,ke)%4294967296)),this}finalize(){if(T(this,wt))return;j(this,wt,!0);const t=T(this,it),n=T(this,Cn);t[16]=T(this,tt),t[n>>2]|=tu[n&3],j(this,tt,t[16]),n>=56&&(T(this,lt)||this.hash(),t[0]=T(this,tt),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=T(this,kt)<<3|T(this,ke)>>>29,t[15]=T(this,ke)<<3,this.hash()}hash(){let t=T(this,De),n=T(this,Ae),o=T(this,je),s=T(this,Fe),a=T(this,Re),i=T(this,Ie),c=T(this,Me),d=T(this,Le);const h=T(this,it);let f,p,y,B,k,m,x,g,b,E;for(let S=16;S<64;++S)B=h[S-15],f=(B>>>7|B<<25)^(B>>>18|B<<14)^B>>>3,B=h[S-2],p=(B>>>17|B<<15)^(B>>>19|B<<13)^B>>>10,h[S]=h[S-16]+f+h[S-7]+p<<0;E=n&o;for(let S=0;S<64;S+=4)T(this,Pt)?(T(this,nt)?(x=300032,B=h[0]-1413257819,d=B-150054599<<0,s=B+24177077<<0):(x=704751109,B=h[0]-210244248,d=B-1521486534<<0,s=B+143694565<<0),j(this,Pt,!1)):(f=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),x=t&n,y=x^t&o^E,m=a&i^~a&c,B=d+p+m+Vn[S]+h[S],k=f+y,d=s+B<<0,s=B+k<<0),f=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),p=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),g=s&t,y=g^s&n^x,m=d&a^~d&i,B=c+p+m+Vn[S+1]+h[S+1],k=f+y,c=o+B<<0,o=B+k<<0,f=(o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10),p=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),b=o&s,y=b^o&t^g,m=c&d^~c&a,B=i+p+m+Vn[S+2]+h[S+2],k=f+y,i=n+B<<0,n=B+k<<0,f=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),E=n&o,y=E^n&s^b,m=i&c^~i&d,B=a+p+m+Vn[S+3]+h[S+3],k=f+y,a=t+B<<0,t=B+k<<0;j(this,De,T(this,De)+t<<0),j(this,Ae,T(this,Ae)+n<<0),j(this,je,T(this,je)+o<<0),j(this,Fe,T(this,Fe)+s<<0),j(this,Re,T(this,Re)+a<<0),j(this,Ie,T(this,Ie)+i<<0),j(this,Me,T(this,Me)+c<<0),j(this,Le,T(this,Le)+d<<0)}hex(){this.finalize();const t=T(this,De),n=T(this,Ae),o=T(this,je),s=T(this,Fe),a=T(this,Re),i=T(this,Ie),c=T(this,Me),d=T(this,Le);let h=N[t>>28&15]+N[t>>24&15]+N[t>>20&15]+N[t>>16&15]+N[t>>12&15]+N[t>>8&15]+N[t>>4&15]+N[t&15]+N[n>>28&15]+N[n>>24&15]+N[n>>20&15]+N[n>>16&15]+N[n>>12&15]+N[n>>8&15]+N[n>>4&15]+N[n&15]+N[o>>28&15]+N[o>>24&15]+N[o>>20&15]+N[o>>16&15]+N[o>>12&15]+N[o>>8&15]+N[o>>4&15]+N[o&15]+N[s>>28&15]+N[s>>24&15]+N[s>>20&15]+N[s>>16&15]+N[s>>12&15]+N[s>>8&15]+N[s>>4&15]+N[s&15]+N[a>>28&15]+N[a>>24&15]+N[a>>20&15]+N[a>>16&15]+N[a>>12&15]+N[a>>8&15]+N[a>>4&15]+N[a&15]+N[i>>28&15]+N[i>>24&15]+N[i>>20&15]+N[i>>16&15]+N[i>>12&15]+N[i>>8&15]+N[i>>4&15]+N[i&15]+N[c>>28&15]+N[c>>24&15]+N[c>>20&15]+N[c>>16&15]+N[c>>12&15]+N[c>>8&15]+N[c>>4&15]+N[c&15];return T(this,nt)||(h+=N[d>>28&15]+N[d>>24&15]+N[d>>20&15]+N[d>>16&15]+N[d>>12&15]+N[d>>8&15]+N[d>>4&15]+N[d&15]),h}toString(){return this.hex()}digest(){this.finalize();const t=T(this,De),n=T(this,Ae),o=T(this,je),s=T(this,Fe),a=T(this,Re),i=T(this,Ie),c=T(this,Me),d=T(this,Le),h=[t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,o>>24&255,o>>16&255,o>>8&255,o&255,s>>24&255,s>>16&255,s>>8&255,s&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,c>>24&255,c>>16&255,c>>8&255,c&255];return T(this,nt)||h.push(d>>24&255,d>>16&255,d>>8&255,d&255),h}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(T(this,nt)?28:32),n=new DataView(t);return n.setUint32(0,T(this,De)),n.setUint32(4,T(this,Ae)),n.setUint32(8,T(this,je)),n.setUint32(12,T(this,Fe)),n.setUint32(16,T(this,Re)),n.setUint32(20,T(this,Ie)),n.setUint32(24,T(this,Me)),T(this,nt)||n.setUint32(28,T(this,Le)),t}}tt=new WeakMap,it=new WeakMap,ke=new WeakMap,wt=new WeakMap,Pt=new WeakMap,De=new WeakMap,Ae=new WeakMap,je=new WeakMap,Fe=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Me=new WeakMap,Le=new WeakMap,lt=new WeakMap,kt=new WeakMap,nt=new WeakMap,Cn=new WeakMap,rt=new WeakMap;function ru(r){const t=new nu;return t.update(r),parseInt(t.hex().substring(0,8),16)}const ou=function(r){var t="#";return r.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},au=function(r,t,n){r/=360;var o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;return[r+1/3,r,r-1/3].map(function(a){return a<0&&a++,a>1&&a--,a<1/6?a=s+(o-s)*6*a:a<.5?a=o:a<2/3?a=s+(o-s)*6*(2/3-a):a=s,Math.round(a*255)})};class su{constructor(t={}){const[n,o]=[t.lightness,t.saturation].map(function(s){return s=s!==void 0?s:[.35,.5,.65],Array.isArray(s)?s.concat():[s]});this.L=n,this.S=o,typeof t.hue=="number"&&(t.hue={min:t.hue,max:t.hue}),typeof t.hue=="object"&&!Array.isArray(t.hue)&&(t.hue=[t.hue]),typeof t.hue>"u"&&(t.hue=[]),this.hueRanges=t.hue.map(function(s){return{min:typeof s.min>"u"?0:s.min,max:typeof s.max>"u"?360:s.max}}),this.hash=ru,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=eu)}hsl(t){var n,o,s,a=this.hash(t),i=727;if(this.hueRanges.length){const c=this.hueRanges[a%this.hueRanges.length];n=a/this.hueRanges.length%i*(c.max-c.min)/i+c.min}else n=a%359;return a=Math.ceil(a/360),o=this.S[a%this.S.length],a=Math.ceil(a/this.S.length),s=this.L[a%this.L.length],[n,o,s]}rgb(t){var n=this.hsl(t);return au.apply(this,n)}hex(t){var n=this.rgb(t);return ou(n)}}const iu=new su;function lu(r){const t=iu.hex(`abc${r}cba`);return cu(t.replace("#",""),-20)}function cu(r,t){let n=parseInt(r.substring(1,3),16),o=parseInt(r.substring(3,5),16),s=parseInt(r.substring(5,7),16);n=parseInt(n*(100+t)/100),o=parseInt(o*(100+t)/100),s=parseInt(s*(100+t)/100),n=n<255?n:255,o=o<255?o:255,s=s<255?s:255,n=Math.round(n),o=Math.round(o),s=Math.round(s);const a=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),i=o.toString(16).length==1?"0"+o.toString(16):o.toString(16),c=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+i+c}const Ma={strToHexColor:lu},du={key:0,class:"radio-fields"},uu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=U.useRoute(),n=Y(t),o=r,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=o.row[o.field.code];if(o.field.label,d==null){s.value="<无>",a.value=!1;return}const h=await o.field.options(o.row,n);if(!h){s.value="<无>",a.value=!1;return}let f="";if(f=h.filter(p=>d===p.code),f.length===0){s.value="<无>",a.value=!1;return}i.value=f.map(p=>({bgColor:Ma.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),a.value=!0}return e.watch(()=>o.row,c,{immediate:!0}),(d,h)=>a.value?(e.openBlock(),e.createElementBlock("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,f=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${f.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"radio-field found",style:e.normalizeStyle(`background: ${f.bgColor}`)},e.toDisplayString(f.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(fe,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-eb013e3c"]]),fu={__name:"FieldEditor",props:{modelValue:[String,Number],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=U.useRoute(),o=Y(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(f){c.value=await a.field.options(a.formData,o,f)}function h(){var f;s("update:modelValue",i.value),(f=a==null?void 0:a.field)!=null&&f.change&&a.field.change(i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(f,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElRadioGroup),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=y=>i.value=y),style:{width:"100%"},disabled:a.disabled,placeholder:"",onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,y=>(e.openBlock(),e.createBlock(e.unref(w.ElRadio),{key:y.code,label:y.code,disabled:y.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.name),1)]),_:2},1032,["label","disabled"]))),128))]),_:1},8,["modelValue","disabled"]))}};class pu extends Z{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=uu,this.editor=fu,this.checkValidProperties(t)}}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"})),mu={class:"editor-field"},gu=["innerHTML"],_u=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("div",mu,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,gu)]))}},[["__scopeId","data-v-6cf9056d"]]),yu={style:{width:"100%"}},bu={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Ef)),o=t,s=r,a=e.reactive({value:s.modelValue});return e.watch(()=>a.value,()=>{o("update:modelValue",a.value)}),(i,c)=>(e.openBlock(),e.createElementBlock("div",yu,[e.createVNode(e.unref(n),{content:a.value,"onUpdate:content":c[0]||(c[0]=d=>a.value=d),field:s.field},null,8,["content","field"])]))}};class wu extends Z{constructor(t,n){super(t,n),this.display=_u,this.editor=bu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const ku=Object.freeze(Object.defineProperty({__proto__:null,default:wu},Symbol.toStringTag,{value:"Module"}));class Eu extends Z{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=this.isRouter(t),this.rowQuery=t.rowQuery||(()=>({})),this.display=ba,this.fixed=!0,this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const xu=Object.freeze(Object.defineProperty({__proto__:null,default:Eu},Symbol.toStringTag,{value:"Module"})),Bu={key:0,class:"select-fields"},Su=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=U.useRoute(),n=Y(t),o=r,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=o.row[o.field.code];if(o.field.label,d==null){s.value="<无>",a.value=!1;return}const h=await o.field.options(o.row,n);if(!h){s.value="<无>",a.value=!1;return}let f=[];if(o.field.multiple?f=h.filter(p=>d.includes(p.code)):f=h.filter(p=>d===p.code),f.length===0){s.value="<无>",a.value=!1;return}i.value=f.map(p=>({bgColor:Ma.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),a.value=!0}return e.watch(()=>o.row,c,{immediate:!0}),(d,h)=>a.value?(e.openBlock(),e.createElementBlock("div",Bu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,f=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${f.name}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"select-field found",style:e.normalizeStyle(`background: ${f.bgColor}`)},e.toDisplayString(f.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(fe,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-8ff036a3"]]),$u={__name:"FieldEditor",props:{modelValue:[String,Number,Array],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=U.useRoute(),o=Y(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(f){c.value=await a.field.options(a.formData,o,f)}function h(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(f,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=y=>i.value=y),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:"",remote:"","remote-method":d,onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,y=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:y.code,label:y.name,value:y.code,title:y.name,disabled:y.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class Cu extends Z{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=Su,this.editor=$u,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const Vu=Object.freeze(Object.defineProperty({__proto__:null,default:Cu},Symbol.toStringTag,{value:"Module"})),Ou={key:0},Tu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const i=t.field.code.toString().split(".").reduce((c,d)=>c[d],t.row);i==null||`${i}`.trim()===""?n.value=!0:(o.value=i,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Ou,e.toDisplayString(o.value),1))}},Nu={__name:"FieldEditor",props:{modelValue:[Object,String,Number],field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:r.field.type,clearable:"",disabled:o.disabled,onInput:a},null,8,["modelValue","type","disabled"]))}};class Du extends Z{constructor(t,n){super(t,n),this.display=Tu,this.editor=Nu,this.checkValidProperties(t)}}const Au=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"})),ju={style:{display:"flex","align-items":"center"}},Fu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},emits:["enable"],setup(r,{emit:t}){const n=t,o=r,s=e.ref(o.row.deletedAt);function a(c,d){return c.label=d,new Promise((h,f)=>{n("enable",c)})}const i=e.computed(()=>o.row[o.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",ju,[e.createVNode(e.unref(w.ElSwitch),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value=h),size:"small",disabled:!!s.value,"before-change":h=>a(r.row,r.field.label)},null,8,["modelValue","disabled","before-change"])]))}},Ru={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class Iu extends Z{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=Fu,this.editor=Ru,this.checkValidProperties(t)}}const Mu=Object.freeze(Object.defineProperty({__proto__:null,default:Iu},Symbol.toStringTag,{value:"Module"})),Lu={key:0},Uu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(o.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Lu,e.toDisplayString(o.value),1))}},zu={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:"textarea",rows:5,clearable:"",disabled:o.disabled,onInput:a},null,8,["modelValue","disabled"]))}};class Hu extends Z{constructor(t,n){super(t,n),this.display=Uu,this.editor=zu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const qu=Object.freeze(Object.defineProperty({__proto__:null,default:Hu},Symbol.toStringTag,{value:"Module"})),Pu={key:0},Wu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(o.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Pu,e.toDisplayString(o.value),1))}},Gu={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElTimePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:o.disabled,format:o.field.format,"value-format":o.field.format,onChange:a},null,8,["modelValue","disabled","format","value-format"]))}};class Qu extends Z{constructor(t,n){super(t,n),this.display=Wu,this.editor=Gu,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Ju=Object.freeze(Object.defineProperty({__proto__:null,default:Qu},Symbol.toStringTag,{value:"Module"})),Ku=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref([]),o=e.ref([]),s={label:"name",children:"children",value:"id"},a=e.ref("..."),i=e.ref(!1);e.ref([]);async function c(){n.value=t.row[t.field.code],o.value=await t.field.options(),i.value=!0}return e.watch(()=>t.row,c,{immediate:!0}),(d,h)=>i.value?(e.openBlock(),e.createBlock(e.unref(w.ElTree),{key:0,"default-checked-keys":n.value,style:{width:"100%"},data:o.value,props:s,"node-key":"id",multiple:t.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:"true","check-strictly":t.field.checkStrictly,"show-checkbox":"",filterable:""},null,8,["default-checked-keys","data","multiple","check-strictly"])):(e.openBlock(),e.createBlock(fe,{key:1,text:a.value},null,8,["text"]))}},[["__scopeId","data-v-fbd0b556"]]),Yu={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=U.useRoute(),o=Y(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function h(p){c.value=await a.field.options(a.formData,o,p)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),h(),(p,y)=>(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=B=>i.value=B),style:{width:"100%"},data:c.value,props:d,"node-key":"id",multiple:a.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:a.field.disabled,"check-strictly":a.field.checkStrictly,remote:"","show-checkbox":"",filterable:"","remote-method":h,onCheck:f,onChange:f},null,8,["modelValue","data","multiple","disabled","check-strictly"]))}};class Xu extends Z{constructor(t,n){super(t,n),this.options=t.options||(()=>[]),this.formChange=t.formChange||(()=>{}),this.multiple=this.defaultBy(t.multiple,!1),this.checkStrictly=this.defaultBy(t.checkStrictly,!0),this.display=Ku,this.editor=Yu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const vu=Object.freeze(Object.defineProperty({__proto__:null,default:Xu},Symbol.toStringTag,{value:"Module"})),Zu=["src"],ef=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImagesUploader",props:{images:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-remove","on-upload"],setup(r,{emit:t}){const n=t,o=e.ref(""),s=e.ref(!1),a=r,i=e.computed(()=>a.images.map(y=>{if(!(y!=null&&y.url))return{...y,name:"unknown",fileType:"unknown"};const B=y.url.substring(y.url.lastIndexOf(".")+1),k=y.url.split("/");return{...y,name:k[k.length-1],fileType:B}}));function c(y){n("on-remove",y)}function d(){w.ElMessage({message:`最多只能上传 ${a.props.limit} 个文件!`,type:"warning"})}function h(y){o.value=y.url,s.value=!0}function f(y){return y.size>5242880?(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function p(y){const B=new FormData;B.append("file",y.file),n("on-upload",B)}return(y,B)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(w.ElUpload),{"file-list":i.value,limit:a.props.limit,accept:a.props.accept,"list-type":a.props.listType,"on-remove":c,"on-exceed":d,"on-preview":h,multiple:!0,"before-upload":f,"http-request":p,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:B[0]||(B[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[a.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref($r))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:1},8,["file-list","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(w.ElDialog),{modelValue:s.value,"onUpdate:modelValue":B[1]||(B[1]=k=>s.value=k)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:o.value,alt:"Preview Image"},null,8,Zu)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-cb22ed8f"]])},Symbol.toStringTag,{value:"Module"})),tf=["src"],nf={class:"file-type"},rf=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"AttachmentUploader",props:{pics:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-success","on-remove","on-change"],setup(r,{emit:t}){const n=t,o=r,s=e.computed(()=>o.pics.map(m=>{const x=m.url.substring(m.url.lastIndexOf(".")+1);if(typeof m.name!==void 0)return m.fileType=x,m;if(m.url){const g=m.url.split("/");return{...m,name:g[g.length-1],fileType:x}}return{...m,name:m.id,fileType:x}})),a=e.ref(""),i=e.ref(!1);e.ref(o);const c=et().fileUploadUrl;`${localStorage.getItem("token")}`;const d=m=>{const x=new FileReader;return x.readAsDataURL(m),new Promise(function(g,b){return m.type.startsWith("image/")?(x.onload=async E=>{const S=new Image;S.src=E.target.result,S.onload=()=>{const V=document.createElement("canvas"),A=V.getContext("2d");V.width=S.width,V.height=S.height,A.drawImage(S,0,0,V.width,V.height),V.toBlob(q=>{const R=new File([q],m.name,{type:m.type,lastModified:Date.now()});g(R)},m.type,.5)}},!1):(g(m),!1)})},h=m=>{m.status==="success"&&n("on-remove",m)},f=()=>{w.ElMessage({message:`最多只能上传 ${o.props.limit} 个文件!`,type:"warning"})},p=m=>{a.value=m.url,i.value=!0},y=m=>{const x=m.name.substring(0,m.name.lastIndexOf("."));if(!/^[\u4e00-\u9fa5\w-_]+$/.test(x))return w.ElMessage({message:"请勿输入特殊字符!",type:"warning"}),!1;d(m).then(b=>b.size/1024/1024<5?(k(b),!1):(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function B(m,x){if(!m.name){w.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",m)}function k(m){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((x,g)=>{const b=new FormData;b.append("file",m),v.post(c,b,{}).then(E=>(w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),n("on-success",E.data.data),x(E.data),!1)).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),g("Upload failed")})})}return(m,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElUpload),{"file-list":s.value,action:e.unref(c),limit:o.props.limit,accept:o.props.accept,"list-type":o.props.listType,"on-remove":h,"before-upload":y,"on-exceed":f,"on-preview":p,multiple:!0,"http-request":()=>!1,"show-file-list":o.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":s.value.length>=o.props.limit}]),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[o.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref($r))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:1},8,["file-list","action","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(w.ElDialog),{modelValue:i.value,"onUpdate:modelValue":x[1]||(x[1]=g=>i.value=g)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,tf)]),_:1},8,["modelValue"]),o.props.listType=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElForm),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(g,b)=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:b,class:"file-list"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:14},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createVNode(e.unref(w.ElInput),{modelValue:g.name,"onUpdate:modelValue":E=>g.name=E,onChange:E=>B(g)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",nf,"."+e.toDisplayString(g.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:12,onClick:E=>h(g)},{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-aa2fe0b2"]])},Symbol.toStringTag,{value:"Module"})),of={class:"image-slot"},af=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImageUploader",props:{imageUrl:{type:String}},emits:["on-success"],setup(r,{emit:t}){const n=t,o=r,s=et().imageUploadUrl;`${localStorage.getItem("token")}`;const a=h=>{if(!(h.size/1024/1024<5))return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1},i=h=>{n("on-success",h.data.imageUrl)};function c(){n("on-success","")}function d(h){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((f,p)=>{const y=new FormData;y.append("image",h.file),v.post(s,y,{}).then(B=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),f(B.data)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),p("Upload failed")})})}return(h,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElUpload),{class:"image-uploader",action:e.unref(s),name:"image","show-file-list":!1,"on-success":i,"before-upload":a,"http-request":d},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default",{},void 0,!0),o.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,class:"image",src:o.imageUrl,fit:"scale-down"},{placeholder:e.withCtx(()=>[e.createElementVNode("div",of,[e.createVNode(e.unref(w.ElIcon),{class:"placeholder-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})])]),_:1},8,["src"])):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,class:"uploader-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref($r))]),_:1})),o.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,class:"delete-icon",onClick:e.withModifiers(c,["stop","prevent"])},{default:e.withCtx(()=>[e.createVNode(e.unref(_l))]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["action"]))}},[["__scopeId","data-v-ae965bb4"]])},Symbol.toStringTag,{value:"Module"}));var Ue=-1,xe=1,pe=0;function Wt(r,t,n,o){if(r===t)return r?[[pe,r]]:[];if(n!=null){var s=uf(r,t,n);if(s)return s}var a=Or(r,t),i=r.substring(0,a);r=r.substring(a),t=t.substring(a),a=Tr(r,t);var c=r.substring(r.length-a);r=r.substring(0,r.length-a),t=t.substring(0,t.length-a);var d=sf(r,t);return i&&d.unshift([pe,i]),c&&d.push([pe,c]),Ua(d,o),d}function sf(r,t){var n;if(!r)return[[xe,t]];if(!t)return[[Ue,r]];var o=r.length>t.length?r:t,s=r.length>t.length?t:r,a=o.indexOf(s);if(a!==-1)return n=[[xe,o.substring(0,a)],[pe,s],[xe,o.substring(a+s.length)]],r.length>t.length&&(n[0][0]=n[2][0]=Ue),n;if(s.length===1)return[[Ue,r],[xe,t]];var i=cf(r,t);if(i){var c=i[0],d=i[1],h=i[2],f=i[3],p=i[4],y=Wt(c,h),B=Wt(d,f);return y.concat([[pe,p]],B)}return lf(r,t)}function lf(r,t){for(var n=r.length,o=t.length,s=Math.ceil((n+o)/2),a=s,i=2*s,c=new Array(i),d=new Array(i),h=0;h<i;h++)c[h]=-1,d[h]=-1;c[a+1]=0,d[a+1]=0;for(var f=n-o,p=f%2!==0,y=0,B=0,k=0,m=0,x=0;x<s;x++){for(var g=-x+y;g<=x-B;g+=2){var b=a+g,E;g===-x||g!==x&&c[b-1]<c[b+1]?E=c[b+1]:E=c[b-1]+1;for(var S=E-g;E<n&&S<o&&r.charAt(E)===t.charAt(S);)E++,S++;if(c[b]=E,E>n)B+=2;else if(S>o)y+=2;else if(p){var V=a+f-g;if(V>=0&&V<i&&d[V]!==-1){var A=n-d[V];if(E>=A)return La(r,t,E,S)}}}for(var q=-x+k;q<=x-m;q+=2){var V=a+q,A;q===-x||q!==x&&d[V-1]<d[V+1]?A=d[V+1]:A=d[V-1]+1;for(var R=A-q;A<n&&R<o&&r.charAt(n-A-1)===t.charAt(o-R-1);)A++,R++;if(d[V]=A,A>n)m+=2;else if(R>o)k+=2;else if(!p){var b=a+f-q;if(b>=0&&b<i&&c[b]!==-1){var E=c[b],S=a+E-b;if(A=n-A,E>=A)return La(r,t,E,S)}}}}return[[Ue,r],[xe,t]]}function La(r,t,n,o){var s=r.substring(0,n),a=t.substring(0,o),i=r.substring(n),c=t.substring(o),d=Wt(s,a),h=Wt(i,c);return d.concat(h)}function Or(r,t){if(!r||!t||r.charAt(0)!==t.charAt(0))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(a,s)==t.substring(a,s)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return za(r.charCodeAt(s-1))&&s--,s}function Tr(r,t){if(!r||!t||r.slice(-1)!==t.slice(-1))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(r.length-s,r.length-a)==t.substring(t.length-s,t.length-a)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return Ha(r.charCodeAt(r.length-s))&&s--,s}function cf(r,t){var n=r.length>t.length?r:t,o=r.length>t.length?t:r;if(n.length<4||o.length*2<n.length)return null;function s(B,k,m){for(var x=B.substring(m,m+Math.floor(B.length/4)),g=-1,b="",E,S,V,A;(g=k.indexOf(x,g+1))!==-1;){var q=Or(B.substring(m),k.substring(g)),R=Tr(B.substring(0,m),k.substring(0,g));b.length<R+q&&(b=k.substring(g-R,g)+k.substring(g,g+q),E=B.substring(0,m-R),S=B.substring(m+q),V=k.substring(0,g-R),A=k.substring(g+q))}return b.length*2>=B.length?[E,S,V,A,b]:null}var a=s(n,o,Math.ceil(n.length/4)),i=s(n,o,Math.ceil(n.length/2)),c;if(!a&&!i)return null;i?a?c=a[4].length>i[4].length?a:i:c=i:c=a;var d,h,f,p;r.length>t.length?(d=c[0],h=c[1],f=c[2],p=c[3]):(f=c[0],p=c[1],d=c[2],h=c[3]);var y=c[4];return[d,h,f,p,y]}function Ua(r,t){r.push([pe,""]);for(var n=0,o=0,s=0,a="",i="",c;n<r.length;){if(n<r.length-1&&!r[n][1]){r.splice(n,1);continue}switch(r[n][0]){case xe:s++,i+=r[n][1],n++;break;case Ue:o++,a+=r[n][1],n++;break;case pe:var d=n-s-o-1;if(t){if(d>=0&&Pa(r[d][1])){var h=r[d][1].slice(-1);if(r[d][1]=r[d][1].slice(0,-1),a=h+a,i=h+i,!r[d][1]){r.splice(d,1),n--;var f=d-1;r[f]&&r[f][0]===xe&&(s++,i=r[f][1]+i,f--),r[f]&&r[f][0]===Ue&&(o++,a=r[f][1]+a,f--),d=f}}if(qa(r[n][1])){var h=r[n][1].charAt(0);r[n][1]=r[n][1].slice(1),a+=h,i+=h}}if(n<r.length-1&&!r[n][1]){r.splice(n,1);break}if(a.length>0||i.length>0){a.length>0&&i.length>0&&(c=Or(i,a),c!==0&&(d>=0?r[d][1]+=i.substring(0,c):(r.splice(0,0,[pe,i.substring(0,c)]),n++),i=i.substring(c),a=a.substring(c)),c=Tr(i,a),c!==0&&(r[n][1]=i.substring(i.length-c)+r[n][1],i=i.substring(0,i.length-c),a=a.substring(0,a.length-c)));var p=s+o;a.length===0&&i.length===0?(r.splice(n-p,p),n=n-p):a.length===0?(r.splice(n-p,p,[xe,i]),n=n-p+1):i.length===0?(r.splice(n-p,p,[Ue,a]),n=n-p+1):(r.splice(n-p,p,[Ue,a],[xe,i]),n=n-p+2)}n!==0&&r[n-1][0]===pe?(r[n-1][1]+=r[n][1],r.splice(n,1)):n++,s=0,o=0,a="",i="";break}}r[r.length-1][1]===""&&r.pop();var y=!1;for(n=1;n<r.length-1;)r[n-1][0]===pe&&r[n+1][0]===pe&&(r[n][1].substring(r[n][1].length-r[n-1][1].length)===r[n-1][1]?(r[n][1]=r[n-1][1]+r[n][1].substring(0,r[n][1].length-r[n-1][1].length),r[n+1][1]=r[n-1][1]+r[n+1][1],r.splice(n-1,1),y=!0):r[n][1].substring(0,r[n+1][1].length)==r[n+1][1]&&(r[n-1][1]+=r[n+1][1],r[n][1]=r[n][1].substring(r[n+1][1].length)+r[n+1][1],r.splice(n+1,1),y=!0)),n++;y&&Ua(r,t)}function za(r){return r>=55296&&r<=56319}function Ha(r){return r>=56320&&r<=57343}function qa(r){return Ha(r.charCodeAt(0))}function Pa(r){return za(r.charCodeAt(r.length-1))}function df(r){for(var t=[],n=0;n<r.length;n++)r[n][1].length>0&&t.push(r[n]);return t}function Nr(r,t,n,o){return Pa(r)||qa(o)?null:df([[pe,r],[Ue,t],[xe,n],[pe,o]])}function uf(r,t,n){var o=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,a=r.length,i=t.length;if(o.length===0&&(s===null||s.length===0)){var c=o.index,d=r.slice(0,c),h=r.slice(c),f=s?s.index:null;e:{var p=c+i-a;if(f!==null&&f!==p||p<0||p>i)break e;var y=t.slice(0,p),B=t.slice(p);if(B!==h)break e;var k=Math.min(c,p),m=d.slice(0,k),x=y.slice(0,k);if(m!==x)break e;var g=d.slice(k),b=y.slice(k);return Nr(m,g,b,h)}e:{if(f!==null&&f!==c)break e;var E=c,y=t.slice(0,E),B=t.slice(E);if(y!==d)break e;var S=Math.min(a-E,i-E),V=h.slice(h.length-S),A=B.slice(B.length-S);if(V!==A)break e;var g=h.slice(0,h.length-S),b=B.slice(0,B.length-S);return Nr(d,g,b,V)}}if(o.length>0&&s&&s.length===0)e:{var m=r.slice(0,o.index),V=r.slice(o.index+o.length),k=m.length,S=V.length;if(i<k+S)break e;var x=t.slice(0,k),A=t.slice(i-S);if(m!==x||V!==A)break e;var g=r.slice(k,a-S),b=t.slice(k,i-S);return Nr(m,g,b,V)}return null}function On(r,t,n){return Wt(r,t,n,!0)}On.INSERT=xe,On.DELETE=Ue,On.EQUAL=pe;var ff=On,Tn={exports:{}};Tn.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",y="[object Map]",B="[object Number]",k="[object Object]",m="[object Promise]",x="[object RegExp]",g="[object Set]",b="[object String]",E="[object Symbol]",S="[object WeakMap]",V="[object ArrayBuffer]",A="[object DataView]",q="[object Float32Array]",R="[object Float64Array]",de="[object Int8Array]",Be="[object Int16Array]",O="[object Int32Array]",I="[object Uint8Array]",K="[object Uint8ClampedArray]",Se="[object Uint16Array]",ze="[object Uint32Array]",Je=/[\\^$.*+?()[\]{}|]/g,Et=/\w*$/,z=/^\[object .+?Constructor\]$/,X=/^(?:0|[1-9]\d*)$/,L={};L[a]=L[i]=L[V]=L[A]=L[c]=L[d]=L[q]=L[R]=L[de]=L[Be]=L[O]=L[y]=L[B]=L[k]=L[x]=L[g]=L[b]=L[E]=L[I]=L[K]=L[Se]=L[ze]=!0,L[h]=L[f]=L[S]=!1;var be=typeof re=="object"&&re&&re.Object===Object&&re,Fr=typeof self=="object"&&self&&self.Object===Object&&self,$e=be||Fr||Function("return this")(),Fn=t&&!t.nodeType&&t,J=Fn&&!0&&r&&!r.nodeType&&r,Rn=J&&J.exports===Fn;function Rr(l,u){return l.set(u[0],u[1]),l}function Ce(l,u){return l.add(u),l}function In(l,u){for(var _=-1,$=l?l.length:0;++_<$&&u(l[_],_,l)!==!1;);return l}function Mn(l,u){for(var _=-1,$=u.length,F=l.length;++_<$;)l[F+_]=u[_];return l}function Jt(l,u,_,$){for(var F=-1,D=l?l.length:0;++F<D;)_=u(_,l[F],F,l);return _}function Kt(l,u){for(var _=-1,$=Array(l);++_<l;)$[_]=u(_);return $}function Ln(l,u){return l==null?void 0:l[u]}function Yt(l){var u=!1;if(l!=null&&typeof l.toString!="function")try{u=!!(l+"")}catch{}return u}function Un(l){var u=-1,_=Array(l.size);return l.forEach(function($,F){_[++u]=[F,$]}),_}function Xt(l,u){return function(_){return l(u(_))}}function zn(l){var u=-1,_=Array(l.size);return l.forEach(function($){_[++u]=$}),_}var Ir=Array.prototype,Mr=Function.prototype,xt=Object.prototype,vt=$e["__core-js_shared__"],Hn=function(){var l=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),qn=Mr.toString,He=xt.hasOwnProperty,Bt=xt.toString,Lr=RegExp("^"+qn.call(He).replace(Je,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=Rn?$e.Buffer:void 0,St=$e.Symbol,Zt=$e.Uint8Array,we=Xt(Object.getPrototypeOf,Object),Pn=Object.create,Wn=xt.propertyIsEnumerable,Ur=Ir.splice,en=Object.getOwnPropertySymbols,$t=ct?ct.isBuffer:void 0,Gn=Xt(Object.keys,Object),Ct=Oe($e,"DataView"),dt=Oe($e,"Map"),Ve=Oe($e,"Promise"),Vt=Oe($e,"Set"),tn=Oe($e,"WeakMap"),ut=Oe(Object,"create"),nn=ue(Ct),ft=ue(dt),rn=ue(Ve),on=ue(Vt),an=ue(tn),ot=St?St.prototype:void 0,Qn=ot?ot.valueOf:void 0;function Ke(l){var u=-1,_=l?l.length:0;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function zr(){this.__data__=ut?ut(null):{}}function Hr(l){return this.has(l)&&delete this.__data__[l]}function qr(l){var u=this.__data__;if(ut){var _=u[l];return _===o?void 0:_}return He.call(u,l)?u[l]:void 0}function Jn(l){var u=this.__data__;return ut?u[l]!==void 0:He.call(u,l)}function sn(l,u){var _=this.__data__;return _[l]=ut&&u===void 0?o:u,this}Ke.prototype.clear=zr,Ke.prototype.delete=Hr,Ke.prototype.get=qr,Ke.prototype.has=Jn,Ke.prototype.set=sn;function ae(l){var u=-1,_=l?l.length:0;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function Pr(){this.__data__=[]}function Wr(l){var u=this.__data__,_=Tt(u,l);if(_<0)return!1;var $=u.length-1;return _==$?u.pop():Ur.call(u,_,1),!0}function Gr(l){var u=this.__data__,_=Tt(u,l);return _<0?void 0:u[_][1]}function Qr(l){return Tt(this.__data__,l)>-1}function Jr(l,u){var _=this.__data__,$=Tt(_,l);return $<0?_.push([l,u]):_[$][1]=u,this}ae.prototype.clear=Pr,ae.prototype.delete=Wr,ae.prototype.get=Gr,ae.prototype.has=Qr,ae.prototype.set=Jr;function ie(l){var u=-1,_=l?l.length:0;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function Kr(){this.__data__={hash:new Ke,map:new(dt||ae),string:new Ke}}function Yr(l){return ht(this,l).delete(l)}function Xr(l){return ht(this,l).get(l)}function vr(l){return ht(this,l).has(l)}function Zr(l,u){return ht(this,l).set(l,u),this}ie.prototype.clear=Kr,ie.prototype.delete=Yr,ie.prototype.get=Xr,ie.prototype.has=vr,ie.prototype.set=Zr;function he(l){this.__data__=new ae(l)}function eo(){this.__data__=new ae}function to(l){return this.__data__.delete(l)}function no(l){return this.__data__.get(l)}function ro(l){return this.__data__.has(l)}function oo(l,u){var _=this.__data__;if(_ instanceof ae){var $=_.__data__;if(!dt||$.length<n-1)return $.push([l,u]),this;_=this.__data__=new ie($)}return _.set(l,u),this}he.prototype.clear=eo,he.prototype.delete=to,he.prototype.get=no,he.prototype.has=ro,he.prototype.set=oo;function Ot(l,u){var _=un(l)||Dt(l)?Kt(l.length,String):[],$=_.length,F=!!$;for(var D in l)He.call(l,D)&&!(F&&(D=="length"||bo(D,$)))&&_.push(D);return _}function Kn(l,u,_){var $=l[u];(!(He.call(l,u)&&er($,_))||_===void 0&&!(u in l))&&(l[u]=_)}function Tt(l,u){for(var _=l.length;_--;)if(er(l[_][0],u))return _;return-1}function qe(l,u){return l&&dn(u,pn(u),l)}function ln(l,u,_,$,F,D,G){var W;if($&&(W=D?$(l,F,D,G):$(l)),W!==void 0)return W;if(!We(l))return l;var ee=un(l);if(ee){if(W=_o(l),!u)return ho(l,W)}else{var Q=Xe(l),le=Q==f||Q==p;if(tr(l))return Nt(l,u);if(Q==k||Q==a||le&&!D){if(Yt(l))return D?l:{};if(W=Pe(le?{}:l),!u)return mo(l,qe(W,l))}else{if(!L[Q])return D?l:{};W=yo(l,Q,ln,u)}}G||(G=new he);var me=G.get(l);if(me)return me;if(G.set(l,W),!ee)var te=_?go(l):pn(l);return In(te||l,function(ce,se){te&&(se=ce,ce=l[se]),Kn(W,se,ln(ce,u,_,$,se,l,G))}),W}function ao(l){return We(l)?Pn(l):{}}function so(l,u,_){var $=u(l);return un(l)?$:Mn($,_(l))}function io(l){return Bt.call(l)}function lo(l){if(!We(l)||ko(l))return!1;var u=fn(l)||Yt(l)?Lr:z;return u.test(ue(l))}function co(l){if(!vn(l))return Gn(l);var u=[];for(var _ in Object(l))He.call(l,_)&&_!="constructor"&&u.push(_);return u}function Nt(l,u){if(u)return l.slice();var _=new l.constructor(l.length);return l.copy(_),_}function cn(l){var u=new l.constructor(l.byteLength);return new Zt(u).set(new Zt(l)),u}function pt(l,u){var _=u?cn(l.buffer):l.buffer;return new l.constructor(_,l.byteOffset,l.byteLength)}function Yn(l,u,_){var $=u?_(Un(l),!0):Un(l);return Jt($,Rr,new l.constructor)}function Xn(l){var u=new l.constructor(l.source,Et.exec(l));return u.lastIndex=l.lastIndex,u}function uo(l,u,_){var $=u?_(zn(l),!0):zn(l);return Jt($,Ce,new l.constructor)}function fo(l){return Qn?Object(Qn.call(l)):{}}function po(l,u){var _=u?cn(l.buffer):l.buffer;return new l.constructor(_,l.byteOffset,l.length)}function ho(l,u){var _=-1,$=l.length;for(u||(u=Array($));++_<$;)u[_]=l[_];return u}function dn(l,u,_,$){_||(_={});for(var F=-1,D=u.length;++F<D;){var G=u[F],W=void 0;Kn(_,G,W===void 0?l[G]:W)}return _}function mo(l,u){return dn(l,Ye(l),u)}function go(l){return so(l,pn,Ye)}function ht(l,u){var _=l.__data__;return wo(u)?_[typeof u=="string"?"string":"hash"]:_.map}function Oe(l,u){var _=Ln(l,u);return lo(_)?_:void 0}var Ye=en?Xt(en,Object):xo,Xe=io;(Ct&&Xe(new Ct(new ArrayBuffer(1)))!=A||dt&&Xe(new dt)!=y||Ve&&Xe(Ve.resolve())!=m||Vt&&Xe(new Vt)!=g||tn&&Xe(new tn)!=S)&&(Xe=function(l){var u=Bt.call(l),_=u==k?l.constructor:void 0,$=_?ue(_):void 0;if($)switch($){case nn:return A;case ft:return y;case rn:return m;case on:return g;case an:return S}return u});function _o(l){var u=l.length,_=l.constructor(u);return u&&typeof l[0]=="string"&&He.call(l,"index")&&(_.index=l.index,_.input=l.input),_}function Pe(l){return typeof l.constructor=="function"&&!vn(l)?ao(we(l)):{}}function yo(l,u,_,$){var F=l.constructor;switch(u){case V:return cn(l);case c:case d:return new F(+l);case A:return pt(l,$);case q:case R:case de:case Be:case O:case I:case K:case Se:case ze:return po(l,$);case y:return Yn(l,$,_);case B:case b:return new F(l);case x:return Xn(l);case g:return uo(l,$,_);case E:return fo(l)}}function bo(l,u){return u=u??s,!!u&&(typeof l=="number"||X.test(l))&&l>-1&&l%1==0&&l<u}function wo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function ko(l){return!!Hn&&Hn in l}function vn(l){var u=l&&l.constructor,_=typeof u=="function"&&u.prototype||xt;return l===_}function ue(l){if(l!=null){try{return qn.call(l)}catch{}try{return l+""}catch{}}return""}function Zn(l){return ln(l,!0,!0)}function er(l,u){return l===u||l!==l&&u!==u}function Dt(l){return Eo(l)&&He.call(l,"callee")&&(!Wn.call(l,"callee")||Bt.call(l)==a)}var un=Array.isArray;function At(l){return l!=null&&nr(l.length)&&!fn(l)}function Eo(l){return rr(l)&&At(l)}var tr=$t||Bo;function fn(l){var u=We(l)?Bt.call(l):"";return u==f||u==p}function nr(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function We(l){var u=typeof l;return!!l&&(u=="object"||u=="function")}function rr(l){return!!l&&typeof l=="object"}function pn(l){return At(l)?Ot(l):co(l)}function xo(){return[]}function Bo(){return!1}r.exports=Zn}(Tn,Tn.exports);var Wa=Tn.exports,Nn={exports:{}};Nn.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=1,a=2,i=9007199254740991,c="[object Arguments]",d="[object Array]",h="[object AsyncFunction]",f="[object Boolean]",p="[object Date]",y="[object Error]",B="[object Function]",k="[object GeneratorFunction]",m="[object Map]",x="[object Number]",g="[object Null]",b="[object Object]",E="[object Promise]",S="[object Proxy]",V="[object RegExp]",A="[object Set]",q="[object String]",R="[object Symbol]",de="[object Undefined]",Be="[object WeakMap]",O="[object ArrayBuffer]",I="[object DataView]",K="[object Float32Array]",Se="[object Float64Array]",ze="[object Int8Array]",Je="[object Int16Array]",Et="[object Int32Array]",z="[object Uint8Array]",X="[object Uint8ClampedArray]",L="[object Uint16Array]",be="[object Uint32Array]",Fr=/[\\^$.*+?()[\]{}|]/g,$e=/^\[object .+?Constructor\]$/,Fn=/^(?:0|[1-9]\d*)$/,J={};J[K]=J[Se]=J[ze]=J[Je]=J[Et]=J[z]=J[X]=J[L]=J[be]=!0,J[c]=J[d]=J[O]=J[f]=J[I]=J[p]=J[y]=J[B]=J[m]=J[x]=J[b]=J[V]=J[A]=J[q]=J[Be]=!1;var Rn=typeof re=="object"&&re&&re.Object===Object&&re,Rr=typeof self=="object"&&self&&self.Object===Object&&self,Ce=Rn||Rr||Function("return this")(),In=t&&!t.nodeType&&t,Mn=In&&!0&&r&&!r.nodeType&&r,Jt=Mn&&Mn.exports===In,Kt=Jt&&Rn.process,Ln=function(){try{return Kt&&Kt.binding&&Kt.binding("util")}catch{}}(),Yt=Ln&&Ln.isTypedArray;function Un(l,u){for(var _=-1,$=l==null?0:l.length,F=0,D=[];++_<$;){var G=l[_];u(G,_,l)&&(D[F++]=G)}return D}function Xt(l,u){for(var _=-1,$=u.length,F=l.length;++_<$;)l[F+_]=u[_];return l}function zn(l,u){for(var _=-1,$=l==null?0:l.length;++_<$;)if(u(l[_],_,l))return!0;return!1}function Ir(l,u){for(var _=-1,$=Array(l);++_<l;)$[_]=u(_);return $}function Mr(l){return function(u){return l(u)}}function xt(l,u){return l.has(u)}function vt(l,u){return l==null?void 0:l[u]}function Hn(l){var u=-1,_=Array(l.size);return l.forEach(function($,F){_[++u]=[F,$]}),_}function qn(l,u){return function(_){return l(u(_))}}function He(l){var u=-1,_=Array(l.size);return l.forEach(function($){_[++u]=$}),_}var Bt=Array.prototype,Lr=Function.prototype,ct=Object.prototype,St=Ce["__core-js_shared__"],Zt=Lr.toString,we=ct.hasOwnProperty,Pn=function(){var l=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Wn=ct.toString,Ur=RegExp("^"+Zt.call(we).replace(Fr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),en=Jt?Ce.Buffer:void 0,$t=Ce.Symbol,Gn=Ce.Uint8Array,Ct=ct.propertyIsEnumerable,dt=Bt.splice,Ve=$t?$t.toStringTag:void 0,Vt=Object.getOwnPropertySymbols,tn=en?en.isBuffer:void 0,ut=qn(Object.keys,Object),nn=Ye(Ce,"DataView"),ft=Ye(Ce,"Map"),rn=Ye(Ce,"Promise"),on=Ye(Ce,"Set"),an=Ye(Ce,"WeakMap"),ot=Ye(Object,"create"),Qn=ue(nn),Ke=ue(ft),zr=ue(rn),Hr=ue(on),qr=ue(an),Jn=$t?$t.prototype:void 0,sn=Jn?Jn.valueOf:void 0;function ae(l){var u=-1,_=l==null?0:l.length;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function Pr(){this.__data__=ot?ot(null):{},this.size=0}function Wr(l){var u=this.has(l)&&delete this.__data__[l];return this.size-=u?1:0,u}function Gr(l){var u=this.__data__;if(ot){var _=u[l];return _===o?void 0:_}return we.call(u,l)?u[l]:void 0}function Qr(l){var u=this.__data__;return ot?u[l]!==void 0:we.call(u,l)}function Jr(l,u){var _=this.__data__;return this.size+=this.has(l)?0:1,_[l]=ot&&u===void 0?o:u,this}ae.prototype.clear=Pr,ae.prototype.delete=Wr,ae.prototype.get=Gr,ae.prototype.has=Qr,ae.prototype.set=Jr;function ie(l){var u=-1,_=l==null?0:l.length;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function Kr(){this.__data__=[],this.size=0}function Yr(l){var u=this.__data__,_=Nt(u,l);if(_<0)return!1;var $=u.length-1;return _==$?u.pop():dt.call(u,_,1),--this.size,!0}function Xr(l){var u=this.__data__,_=Nt(u,l);return _<0?void 0:u[_][1]}function vr(l){return Nt(this.__data__,l)>-1}function Zr(l,u){var _=this.__data__,$=Nt(_,l);return $<0?(++this.size,_.push([l,u])):_[$][1]=u,this}ie.prototype.clear=Kr,ie.prototype.delete=Yr,ie.prototype.get=Xr,ie.prototype.has=vr,ie.prototype.set=Zr;function he(l){var u=-1,_=l==null?0:l.length;for(this.clear();++u<_;){var $=l[u];this.set($[0],$[1])}}function eo(){this.size=0,this.__data__={hash:new ae,map:new(ft||ie),string:new ae}}function to(l){var u=Oe(this,l).delete(l);return this.size-=u?1:0,u}function no(l){return Oe(this,l).get(l)}function ro(l){return Oe(this,l).has(l)}function oo(l,u){var _=Oe(this,l),$=_.size;return _.set(l,u),this.size+=_.size==$?0:1,this}he.prototype.clear=eo,he.prototype.delete=to,he.prototype.get=no,he.prototype.has=ro,he.prototype.set=oo;function Ot(l){var u=-1,_=l==null?0:l.length;for(this.__data__=new he;++u<_;)this.add(l[u])}function Kn(l){return this.__data__.set(l,o),this}function Tt(l){return this.__data__.has(l)}Ot.prototype.add=Ot.prototype.push=Kn,Ot.prototype.has=Tt;function qe(l){var u=this.__data__=new ie(l);this.size=u.size}function ln(){this.__data__=new ie,this.size=0}function ao(l){var u=this.__data__,_=u.delete(l);return this.size=u.size,_}function so(l){return this.__data__.get(l)}function io(l){return this.__data__.has(l)}function lo(l,u){var _=this.__data__;if(_ instanceof ie){var $=_.__data__;if(!ft||$.length<n-1)return $.push([l,u]),this.size=++_.size,this;_=this.__data__=new he($)}return _.set(l,u),this.size=_.size,this}qe.prototype.clear=ln,qe.prototype.delete=ao,qe.prototype.get=so,qe.prototype.has=io,qe.prototype.set=lo;function co(l,u){var _=Dt(l),$=!_&&er(l),F=!_&&!$&&At(l),D=!_&&!$&&!F&&rr(l),G=_||$||F||D,W=G?Ir(l.length,String):[],ee=W.length;for(var Q in l)we.call(l,Q)&&!(G&&(Q=="length"||F&&(Q=="offset"||Q=="parent")||D&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||yo(Q,ee)))&&W.push(Q);return W}function Nt(l,u){for(var _=l.length;_--;)if(Zn(l[_][0],u))return _;return-1}function cn(l,u,_){var $=u(l);return Dt(l)?$:Xt($,_(l))}function pt(l){return l==null?l===void 0?de:g:Ve&&Ve in Object(l)?Xe(l):vn(l)}function Yn(l){return We(l)&&pt(l)==c}function Xn(l,u,_,$,F){return l===u?!0:l==null||u==null||!We(l)&&!We(u)?l!==l&&u!==u:uo(l,u,_,$,Xn,F)}function uo(l,u,_,$,F,D){var G=Dt(l),W=Dt(u),ee=G?d:Pe(l),Q=W?d:Pe(u);ee=ee==c?b:ee,Q=Q==c?b:Q;var le=ee==b,me=Q==b,te=ee==Q;if(te&&At(l)){if(!At(u))return!1;G=!0,le=!1}if(te&&!le)return D||(D=new qe),G||rr(l)?dn(l,u,_,$,F,D):mo(l,u,ee,_,$,F,D);if(!(_&s)){var ce=le&&we.call(l,"__wrapped__"),se=me&&we.call(u,"__wrapped__");if(ce||se){var at=ce?l.value():l,ve=se?u.value():u;return D||(D=new qe),F(at,ve,_,$,D)}}return te?(D||(D=new qe),go(l,u,_,$,F,D)):!1}function fo(l){if(!nr(l)||wo(l))return!1;var u=tr(l)?Ur:$e;return u.test(ue(l))}function po(l){return We(l)&&fn(l.length)&&!!J[pt(l)]}function ho(l){if(!ko(l))return ut(l);var u=[];for(var _ in Object(l))we.call(l,_)&&_!="constructor"&&u.push(_);return u}function dn(l,u,_,$,F,D){var G=_&s,W=l.length,ee=u.length;if(W!=ee&&!(G&&ee>W))return!1;var Q=D.get(l);if(Q&&D.get(u))return Q==u;var le=-1,me=!0,te=_&a?new Ot:void 0;for(D.set(l,u),D.set(u,l);++le<W;){var ce=l[le],se=u[le];if($)var at=G?$(se,ce,le,u,l,D):$(ce,se,le,l,u,D);if(at!==void 0){if(at)continue;me=!1;break}if(te){if(!zn(u,function(ve,mt){if(!xt(te,mt)&&(ce===ve||F(ce,ve,_,$,D)))return te.push(mt)})){me=!1;break}}else if(!(ce===se||F(ce,se,_,$,D))){me=!1;break}}return D.delete(l),D.delete(u),me}function mo(l,u,_,$,F,D,G){switch(_){case I:if(l.byteLength!=u.byteLength||l.byteOffset!=u.byteOffset)return!1;l=l.buffer,u=u.buffer;case O:return!(l.byteLength!=u.byteLength||!D(new Gn(l),new Gn(u)));case f:case p:case x:return Zn(+l,+u);case y:return l.name==u.name&&l.message==u.message;case V:case q:return l==u+"";case m:var W=Hn;case A:var ee=$&s;if(W||(W=He),l.size!=u.size&&!ee)return!1;var Q=G.get(l);if(Q)return Q==u;$|=a,G.set(l,u);var le=dn(W(l),W(u),$,F,D,G);return G.delete(l),le;case R:if(sn)return sn.call(l)==sn.call(u)}return!1}function go(l,u,_,$,F,D){var G=_&s,W=ht(l),ee=W.length,Q=ht(u),le=Q.length;if(ee!=le&&!G)return!1;for(var me=ee;me--;){var te=W[me];if(!(G?te in u:we.call(u,te)))return!1}var ce=D.get(l);if(ce&&D.get(u))return ce==u;var se=!0;D.set(l,u),D.set(u,l);for(var at=G;++me<ee;){te=W[me];var ve=l[te],mt=u[te];if($)var va=G?$(mt,ve,te,u,l,D):$(ve,mt,te,l,u,D);if(!(va===void 0?ve===mt||F(ve,mt,_,$,D):va)){se=!1;break}at||(at=te=="constructor")}if(se&&!at){var or=l.constructor,ar=u.constructor;or!=ar&&"constructor"in l&&"constructor"in u&&!(typeof or=="function"&&or instanceof or&&typeof ar=="function"&&ar instanceof ar)&&(se=!1)}return D.delete(l),D.delete(u),se}function ht(l){return cn(l,pn,_o)}function Oe(l,u){var _=l.__data__;return bo(u)?_[typeof u=="string"?"string":"hash"]:_.map}function Ye(l,u){var _=vt(l,u);return fo(_)?_:void 0}function Xe(l){var u=we.call(l,Ve),_=l[Ve];try{l[Ve]=void 0;var $=!0}catch{}var F=Wn.call(l);return $&&(u?l[Ve]=_:delete l[Ve]),F}var _o=Vt?function(l){return l==null?[]:(l=Object(l),Un(Vt(l),function(u){return Ct.call(l,u)}))}:xo,Pe=pt;(nn&&Pe(new nn(new ArrayBuffer(1)))!=I||ft&&Pe(new ft)!=m||rn&&Pe(rn.resolve())!=E||on&&Pe(new on)!=A||an&&Pe(new an)!=Be)&&(Pe=function(l){var u=pt(l),_=u==b?l.constructor:void 0,$=_?ue(_):"";if($)switch($){case Qn:return I;case Ke:return m;case zr:return E;case Hr:return A;case qr:return Be}return u});function yo(l,u){return u=u??i,!!u&&(typeof l=="number"||Fn.test(l))&&l>-1&&l%1==0&&l<u}function bo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function wo(l){return!!Pn&&Pn in l}function ko(l){var u=l&&l.constructor,_=typeof u=="function"&&u.prototype||ct;return l===_}function vn(l){return Wn.call(l)}function ue(l){if(l!=null){try{return Zt.call(l)}catch{}try{return l+""}catch{}}return""}function Zn(l,u){return l===u||l!==l&&u!==u}var er=Yn(function(){return arguments}())?Yn:function(l){return We(l)&&we.call(l,"callee")&&!Ct.call(l,"callee")},Dt=Array.isArray;function un(l){return l!=null&&fn(l.length)&&!tr(l)}var At=tn||Bo;function Eo(l,u){return Xn(l,u)}function tr(l){if(!nr(l))return!1;var u=pt(l);return u==B||u==k||u==h||u==S}function fn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function nr(l){var u=typeof l;return l!=null&&(u=="object"||u=="function")}function We(l){return l!=null&&typeof l=="object"}var rr=Yt?Mr(Yt):po;function pn(l){return un(l)?co(l):ho(l)}function xo(){return[]}function Bo(){return!1}r.exports=Eo}(Nn,Nn.exports);var Ga=Nn.exports,Dr={},Qa=re&&re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dr,"__esModule",{value:!0});var pf=Qa(Wa),hf=Qa(Ga),Ar;(function(r){function t(a,i,c){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var d=pf.default(i);c||(d=Object.keys(d).reduce(function(f,p){return d[p]!=null&&(f[p]=d[p]),f},{}));for(var h in a)a[h]!==void 0&&i[h]===void 0&&(d[h]=a[h]);return Object.keys(d).length>0?d:void 0}r.compose=t;function n(a,i){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var c=Object.keys(a).concat(Object.keys(i)).reduce(function(d,h){return hf.default(a[h],i[h])||(d[h]=i[h]===void 0?null:i[h]),d},{});return Object.keys(c).length>0?c:void 0}r.diff=n;function o(a,i){a===void 0&&(a={}),i===void 0&&(i={}),a=a||{};var c=Object.keys(i).reduce(function(d,h){return i[h]!==a[h]&&a[h]!==void 0&&(d[h]=i[h]),d},{});return Object.keys(a).reduce(function(d,h){return a[h]!==i[h]&&i[h]===void 0&&(d[h]=null),d},c)}r.invert=o;function s(a,i,c){if(c===void 0&&(c=!1),typeof a!="object")return i;if(typeof i=="object"){if(!c)return i;var d=Object.keys(i).reduce(function(h,f){return a[f]===void 0&&(h[f]=i[f]),h},{});return Object.keys(d).length>0?d:void 0}}r.transform=s})(Ar||(Ar={})),Dr.default=Ar;var Dn={},An={},Ja;function mf(){if(Ja)return An;Ja=1;var r=re&&re.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(An,"__esModule",{value:!0});var t=r(Ya()),n=function(){function o(s){this.ops=s,this.index=0,this.offset=0}return o.prototype.hasNext=function(){return this.peekLength()<1/0},o.prototype.next=function(s){s||(s=1/0);var a=this.ops[this.index];if(a){var i=this.offset,c=t.default.length(a);if(s>=c-i?(s=c-i,this.index+=1,this.offset=0):this.offset+=s,typeof a.delete=="number")return{delete:s};var d={};return a.attributes&&(d.attributes=a.attributes),typeof a.retain=="number"?d.retain=s:typeof a.insert=="string"?d.insert=a.insert.substr(i,s):d.insert=a.insert,d}else return{retain:1/0}},o.prototype.peek=function(){return this.ops[this.index]},o.prototype.peekLength=function(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0},o.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},o.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var s=this.offset,a=this.index,i=this.next(),c=this.ops.slice(this.index);return this.offset=s,this.index=a,[i].concat(c)}else return[]},o}();return An.default=n,An}var Ka;function Ya(){if(Ka)return Dn;Ka=1;var r=re&&re.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Dn,"__esModule",{value:!0});var t=r(mf()),n;return function(o){function s(i){return new t.default(i)}o.iterator=s;function a(i){return typeof i.delete=="number"?i.delete:typeof i.retain=="number"?i.retain:typeof i.insert=="string"?i.insert.length:1}o.length=a}(n||(n={})),Dn.default=n,Dn}var Gt=re&&re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},jn=Gt(ff),gf=Gt(Wa),jr=Gt(Ga),Qt=Gt(Dr),oe=Gt(Ya()),_f="\0",yf=function(){function r(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return r.prototype.insert=function(t,n){var o={};return typeof t=="string"&&t.length===0?this:(o.insert=t,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o))},r.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},r.prototype.retain=function(t,n){if(t<=0)return this;var o={retain:t};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o)},r.prototype.push=function(t){var n=this.ops.length,o=this.ops[n-1];if(t=gf.default(t),typeof o=="object"){if(typeof t.delete=="number"&&typeof o.delete=="number")return this.ops[n-1]={delete:o.delete+t.delete},this;if(typeof o.delete=="number"&&t.insert!=null&&(n-=1,o=this.ops[n-1],typeof o!="object"))return this.ops.unshift(t),this;if(jr.default(t.attributes,o.attributes)){if(typeof t.insert=="string"&&typeof o.insert=="string")return this.ops[n-1]={insert:o.insert+t.insert},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof o.retain=="number")return this.ops[n-1]={retain:o.retain+t.retain},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this}}return n===this.ops.length?this.ops.push(t):this.ops.splice(n,0,t),this},r.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},r.prototype.filter=function(t){return this.ops.filter(t)},r.prototype.forEach=function(t){this.ops.forEach(t)},r.prototype.map=function(t){return this.ops.map(t)},r.prototype.partition=function(t){var n=[],o=[];return this.forEach(function(s){var a=t(s)?n:o;a.push(s)}),[n,o]},r.prototype.reduce=function(t,n){return this.ops.reduce(t,n)},r.prototype.changeLength=function(){return this.reduce(function(t,n){return n.insert?t+oe.default.length(n):n.delete?t-n.delete:t},0)},r.prototype.length=function(){return this.reduce(function(t,n){return t+oe.default.length(n)},0)},r.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var o=[],s=oe.default.iterator(this.ops),a=0;a<n&&s.hasNext();){var i=void 0;a<t?i=s.next(t-a):(i=s.next(n-a),o.push(i)),a+=oe.default.length(i)}return new r(o)},r.prototype.compose=function(t){var n=oe.default.iterator(this.ops),o=oe.default.iterator(t.ops),s=[],a=o.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){for(var i=a.retain;n.peekType()==="insert"&&n.peekLength()<=i;)i-=n.peekLength(),s.push(n.next());a.retain-i>0&&o.next(a.retain-i)}for(var c=new r(s);n.hasNext()||o.hasNext();)if(o.peekType()==="insert")c.push(o.next());else if(n.peekType()==="delete")c.push(n.next());else{var d=Math.min(n.peekLength(),o.peekLength()),h=n.next(d),f=o.next(d);if(typeof f.retain=="number"){var p={};typeof h.retain=="number"?p.retain=d:p.insert=h.insert;var y=Qt.default.compose(h.attributes,f.attributes,typeof h.retain=="number");if(y&&(p.attributes=y),c.push(p),!o.hasNext()&&jr.default(c.ops[c.ops.length-1],p)){var B=new r(n.rest());return c.concat(B).chop()}}else typeof f.delete=="number"&&typeof h.retain=="number"&&c.push(f)}return c.chop()},r.prototype.concat=function(t){var n=new r(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},r.prototype.diff=function(t,n){if(this.ops===t.ops)return new r;var o=[this,t].map(function(d){return d.map(function(h){if(h.insert!=null)return typeof h.insert=="string"?h.insert:_f;var f=d===t?"on":"with";throw new Error("diff() called "+f+" non-document")}).join("")}),s=new r,a=jn.default(o[0],o[1],n),i=oe.default.iterator(this.ops),c=oe.default.iterator(t.ops);return a.forEach(function(d){for(var h=d[1].length;h>0;){var f=0;switch(d[0]){case jn.default.INSERT:f=Math.min(c.peekLength(),h),s.push(c.next(f));break;case jn.default.DELETE:f=Math.min(h,i.peekLength()),i.next(f),s.delete(f);break;case jn.default.EQUAL:f=Math.min(i.peekLength(),c.peekLength(),h);var p=i.next(f),y=c.next(f);jr.default(p.insert,y.insert)?s.retain(f,Qt.default.diff(p.attributes,y.attributes)):s.push(y).delete(f);break}h-=f}}),s.chop()},r.prototype.eachLine=function(t,n){n===void 0&&(n=`
7
+ `);for(var o=oe.default.iterator(this.ops),s=new r,a=0;o.hasNext();){if(o.peekType()!=="insert")return;var i=o.peek(),c=oe.default.length(i)-o.peekLength(),d=typeof i.insert=="string"?i.insert.indexOf(n,c)-c:-1;if(d<0)s.push(o.next());else if(d>0)s.push(o.next(d));else{if(t(s,o.next(1).attributes||{},a)===!1)return;a+=1,s=new r}}s.length()>0&&t(s,{},a)},r.prototype.invert=function(t){var n=new r;return this.reduce(function(o,s){if(s.insert)n.delete(oe.default.length(s));else{if(s.retain&&s.attributes==null)return n.retain(s.retain),o+s.retain;if(s.delete||s.retain&&s.attributes){var a=s.delete||s.retain,i=t.slice(o,o+a);return i.forEach(function(c){s.delete?n.push(c):s.retain&&s.attributes&&n.retain(oe.default.length(c),Qt.default.invert(s.attributes,c.attributes))}),o+a}}return o},0),n.chop()},r.prototype.transform=function(t,n){if(n===void 0&&(n=!1),n=!!n,typeof t=="number")return this.transformPosition(t,n);for(var o=t,s=oe.default.iterator(this.ops),a=oe.default.iterator(o.ops),i=new r;s.hasNext()||a.hasNext();)if(s.peekType()==="insert"&&(n||a.peekType()!=="insert"))i.retain(oe.default.length(s.next()));else if(a.peekType()==="insert")i.push(a.next());else{var c=Math.min(s.peekLength(),a.peekLength()),d=s.next(c),h=a.next(c);if(d.delete)continue;h.delete?i.push(h):i.retain(c,Qt.default.transform(d.attributes,h.attributes,n))}return i.chop()},r.prototype.transformPosition=function(t,n){n===void 0&&(n=!1),n=!!n;for(var o=oe.default.iterator(this.ops),s=0;o.hasNext()&&s<=t;){var a=o.peekLength(),i=o.peekType();if(o.next(),i==="delete"){t-=Math.min(a,t-s);continue}else i==="insert"&&(s<t||!n)&&(t+=a);s+=a}return t},r.Op=oe.default,r.AttributeMap=Qt.default,r}(),bf=yf;const wf=ra(bf);/*!
8
8
  * VueQuill @vueup/vue-quill v1.2.0
9
9
  * https://vueup.github.io/vue-quill/
10
10
  *
@@ -14,7 +14,7 @@
14
14
  * Copyright (c) 2023 Ahmad Luthfi Masruri
15
15
  * Released under the MIT license
16
16
  * Date: 2023-05-12T08:44:03.742Z
17
- */const Ya={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},gf=e.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:r=>["delta","html","text"].includes(r)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:r=>["snow","bubble",""].includes(r)},toolbar:{type:[String,Array,Object],required:!1,validator:r=>typeof r=="string"&&r!==""?r.charAt(0)==="#"?!0:Object.keys(Ya).indexOf(r)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(r,t)=>{e.onMounted(()=>{a()}),e.onBeforeUnmount(()=>{n=null});let n,o;const s=e.ref(),a=()=>{var O;if(s.value){if(o=i(),r.modules)if(Array.isArray(r.modules))for(const I of r.modules)hn.register(`modules/${I.name}`,I.module);else hn.register(`modules/${r.modules.name}`,r.modules.module);n=new hn(s.value,o),E(r.content),n.on("text-change",f),n.on("selection-change",B),n.on("editor-change",w),r.theme!=="bubble"&&s.value.classList.remove("ql-bubble"),r.theme!=="snow"&&s.value.classList.remove("ql-snow"),(O=n.getModule("toolbar"))===null||O===void 0||O.container.addEventListener("mousedown",I=>{I.preventDefault()}),t.emit("ready",n)}},i=()=>{const O={};if(r.theme!==""&&(O.theme=r.theme),r.readOnly&&(O.readOnly=r.readOnly),r.placeholder&&(O.placeholder=r.placeholder),r.toolbar&&r.toolbar!==""&&(O.modules={toolbar:(()=>{if(typeof r.toolbar=="object")return r.toolbar;if(typeof r.toolbar=="string")return r.toolbar.charAt(0)==="#"?r.toolbar:Ya[r.toolbar]})()}),r.modules){const I=(()=>{var K,Se;const ze={};if(Array.isArray(r.modules))for(const Je of r.modules)ze[Je.name]=(K=Je.options)!==null&&K!==void 0?K:{};else ze[r.modules.name]=(Se=r.modules.options)!==null&&Se!==void 0?Se:{};return ze})();O.modules=Object.assign({},O.modules,I)}return Object.assign({},r.globalOptions,r.options,O)},c=O=>typeof O=="object"&&O?O.slice():O,d=O=>Object.values(O.ops).some(I=>!I.retain||Object.keys(I).length!==1);let h;const p=O=>{if(typeof h==typeof O){if(O===h)return!0;if(typeof O=="object"&&O&&typeof h=="object"&&h)return!d(h.diff(O))}return!1},f=(O,I,K)=>{h=c(y()),p(r.content)||t.emit("update:content",h),t.emit("textChange",{delta:O,oldContents:I,source:K})},b=e.ref(),B=(O,I,K)=>{b.value=!!(n!=null&&n.hasFocus()),t.emit("selectionChange",{range:O,oldRange:I,source:K})};e.watch(b,O=>{O?t.emit("focus",s):t.emit("blur",s)});const w=(...O)=>{O[0]==="text-change"&&t.emit("editorChange",{name:O[0],delta:O[1],oldContents:O[2],source:O[3]}),O[0]==="selection-change"&&t.emit("editorChange",{name:O[0],range:O[1],oldRange:O[2],source:O[3]})},m=()=>s.value,x=()=>{var O;return(O=n==null?void 0:n.getModule("toolbar"))===null||O===void 0?void 0:O.container},g=()=>{if(n)return n;throw`The quill editor hasn't been instantiated yet,
17
+ */const Xa={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},kf=e.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:r=>["delta","html","text"].includes(r)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:r=>["snow","bubble",""].includes(r)},toolbar:{type:[String,Array,Object],required:!1,validator:r=>typeof r=="string"&&r!==""?r.charAt(0)==="#"?!0:Object.keys(Xa).indexOf(r)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(r,t)=>{e.onMounted(()=>{a()}),e.onBeforeUnmount(()=>{n=null});let n,o;const s=e.ref(),a=()=>{var O;if(s.value){if(o=i(),r.modules)if(Array.isArray(r.modules))for(const I of r.modules)hn.register(`modules/${I.name}`,I.module);else hn.register(`modules/${r.modules.name}`,r.modules.module);n=new hn(s.value,o),E(r.content),n.on("text-change",p),n.on("selection-change",B),n.on("editor-change",k),r.theme!=="bubble"&&s.value.classList.remove("ql-bubble"),r.theme!=="snow"&&s.value.classList.remove("ql-snow"),(O=n.getModule("toolbar"))===null||O===void 0||O.container.addEventListener("mousedown",I=>{I.preventDefault()}),t.emit("ready",n)}},i=()=>{const O={};if(r.theme!==""&&(O.theme=r.theme),r.readOnly&&(O.readOnly=r.readOnly),r.placeholder&&(O.placeholder=r.placeholder),r.toolbar&&r.toolbar!==""&&(O.modules={toolbar:(()=>{if(typeof r.toolbar=="object")return r.toolbar;if(typeof r.toolbar=="string")return r.toolbar.charAt(0)==="#"?r.toolbar:Xa[r.toolbar]})()}),r.modules){const I=(()=>{var K,Se;const ze={};if(Array.isArray(r.modules))for(const Je of r.modules)ze[Je.name]=(K=Je.options)!==null&&K!==void 0?K:{};else ze[r.modules.name]=(Se=r.modules.options)!==null&&Se!==void 0?Se:{};return ze})();O.modules=Object.assign({},O.modules,I)}return Object.assign({},r.globalOptions,r.options,O)},c=O=>typeof O=="object"&&O?O.slice():O,d=O=>Object.values(O.ops).some(I=>!I.retain||Object.keys(I).length!==1);let h;const f=O=>{if(typeof h==typeof O){if(O===h)return!0;if(typeof O=="object"&&O&&typeof h=="object"&&h)return!d(h.diff(O))}return!1},p=(O,I,K)=>{h=c(b()),f(r.content)||t.emit("update:content",h),t.emit("textChange",{delta:O,oldContents:I,source:K})},y=e.ref(),B=(O,I,K)=>{y.value=!!(n!=null&&n.hasFocus()),t.emit("selectionChange",{range:O,oldRange:I,source:K})};e.watch(y,O=>{O?t.emit("focus",s):t.emit("blur",s)});const k=(...O)=>{O[0]==="text-change"&&t.emit("editorChange",{name:O[0],delta:O[1],oldContents:O[2],source:O[3]}),O[0]==="selection-change"&&t.emit("editorChange",{name:O[0],range:O[1],oldRange:O[2],source:O[3]})},m=()=>s.value,x=()=>{var O;return(O=n==null?void 0:n.getModule("toolbar"))===null||O===void 0?void 0:O.container},g=()=>{if(n)return n;throw`The quill editor hasn't been instantiated yet,
18
18
  make sure to call this method when the editor ready
19
- or use v-on:ready="onReady(quill)" event instead.`},y=(O,I)=>r.contentType==="html"?A():r.contentType==="text"?S(O,I):n==null?void 0:n.getContents(O,I),E=(O,I="api")=>{const K=O||(r.contentType==="delta"?new mf:"");r.contentType==="html"?q(K):r.contentType==="text"?V(K,I):n==null||n.setContents(K,I),h=c(K)},S=(O,I)=>{var K;return(K=n==null?void 0:n.getText(O,I))!==null&&K!==void 0?K:""},V=(O,I="api")=>{n==null||n.setText(O,I)},A=()=>{var O;return(O=n==null?void 0:n.root.innerHTML)!==null&&O!==void 0?O:""},q=O=>{n&&(n.root.innerHTML=O)},R=(O,I="api")=>{const K=n==null?void 0:n.clipboard.convert(O);K&&(n==null||n.setContents(K,I))},de=()=>{n==null||n.focus()},Be=()=>{e.nextTick(()=>{var O;!t.slots.toolbar&&n&&((O=n.getModule("toolbar"))===null||O===void 0||O.container.remove()),a()})};return e.watch(()=>r.content,O=>{if(!n||!O||p(O))return;const I=n.getSelection();I&&e.nextTick(()=>n==null?void 0:n.setSelection(I)),E(O)},{deep:!0}),e.watch(()=>r.enable,O=>{n&&n.enable(O)}),{editor:s,getEditor:m,getToolbar:x,getQuill:g,getContents:y,setContents:E,getHTML:A,setHTML:q,pasteHTML:R,focus:de,getText:S,setText:V,reinit:Be}},render(){var r,t;return[(t=(r=this.$slots).toolbar)===null||t===void 0?void 0:t.call(r),e.h("div",{ref:"editor",...this.$attrs})]}}),_f=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"RichTextEditor",props:{field:Object},setup(r){const t=r,n=e.computed(()=>t.field.maxImageCounts),o=["SimSun","SimHei","Microsoft-YaHei","KaiTi","FangSong","Arial","Times-New-Roman","sans-serif"],s=[!1,"16px","18px","20px","22px","26px","28px","30px"],a=jt.default.imports["formats/size"];a.whitelist=s;const i=jt.default.imports["formats/font"];i.whitelist=o,jt.default.register(i,!0);const c=jt.imports["attributors/style/align"];c.whitelist=["right","center","justify"],jt.default.register(c,!0);const d=e.ref(),h={container:[[{font:o}],[{size:s}],[{header:[1,2,3,4,5,6,!1]}],[{list:"ordered"},{list:"bullet"}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{align:[]}],["link","image"]],handlers:{image:function(){const f=(m,x)=>(m.match(new RegExp(x,"g"))||[]).length,b=d.value.content,B=b?f(b,"<img "):0;if(B>=n.value){k.ElMessage({message:`${t.field.label}最多只能上传${n.value}张图片!`,type:"warning"});return}const w=document.createElement("input");w.setAttribute("type","file"),w.setAttribute("accept","image/*"),w.setAttribute("multiple",!0),w.click(),w.onchange=()=>{const m=w.files;if(m.length+B>n.value){k.ElMessage({message:`${t.field.label}最多只能上传${n.value}张图片!`,type:"warning"});return}for(const g of m)if(g.size<5242880)p(g);else return k.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1}}}};function p(f){const b=new FormData;return b.append("image",f),new Promise((B,w)=>{X.post(et().imageUploadUrl,b,{}).then(m=>{const x=m.data.data.imageUrl,g=d.value.getQuill(),y=g.getSelection().index;g.insertEmbed(y,"image",x),g.setSelection(y+1),B(m)}).catch(m=>{console.log("图片上传失败。",m),w("图片上传失败。")})})}return(f,b)=>(e.openBlock(),e.createBlock(e.unref(gf),{ref_key:"quillEditor",ref:d,toolbar:h,"content-type":"html"},null,512))}}},Symbol.toStringTag,{value:"Module"}));P.BaseLayout=Fc,P.DashboardPage=Ai,P.DashboardRow=ji,P.DataTablePage=Vr,P.Detail=Fa,P.DetailTab=Yc,P.EmptyTip=me,P.FormEditor=Sn,P.ImagesUploader=pa,P.List=Aa,P.RowActionFormEditor=Hi,P.Statistic=fa,P.StatisticCard=Oi,P.Widget=ua,P.defineDomain=da,P.getConfig=et,P.getDomainConfig=zt,P.http=ye,P.rest=_i,P.setupAppConfig=wi,P.setupDomainConfigLoader=ki,P.useDataTableStore=Qe,P.useRouteHistoryStore=$n,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
19
+ or use v-on:ready="onReady(quill)" event instead.`},b=(O,I)=>r.contentType==="html"?A():r.contentType==="text"?S(O,I):n==null?void 0:n.getContents(O,I),E=(O,I="api")=>{const K=O||(r.contentType==="delta"?new wf:"");r.contentType==="html"?q(K):r.contentType==="text"?V(K,I):n==null||n.setContents(K,I),h=c(K)},S=(O,I)=>{var K;return(K=n==null?void 0:n.getText(O,I))!==null&&K!==void 0?K:""},V=(O,I="api")=>{n==null||n.setText(O,I)},A=()=>{var O;return(O=n==null?void 0:n.root.innerHTML)!==null&&O!==void 0?O:""},q=O=>{n&&(n.root.innerHTML=O)},R=(O,I="api")=>{const K=n==null?void 0:n.clipboard.convert(O);K&&(n==null||n.setContents(K,I))},de=()=>{n==null||n.focus()},Be=()=>{e.nextTick(()=>{var O;!t.slots.toolbar&&n&&((O=n.getModule("toolbar"))===null||O===void 0||O.container.remove()),a()})};return e.watch(()=>r.content,O=>{if(!n||!O||f(O))return;const I=n.getSelection();I&&e.nextTick(()=>n==null?void 0:n.setSelection(I)),E(O)},{deep:!0}),e.watch(()=>r.enable,O=>{n&&n.enable(O)}),{editor:s,getEditor:m,getToolbar:x,getQuill:g,getContents:b,setContents:E,getHTML:A,setHTML:q,pasteHTML:R,focus:de,getText:S,setText:V,reinit:Be}},render(){var r,t;return[(t=(r=this.$slots).toolbar)===null||t===void 0?void 0:t.call(r),e.h("div",{ref:"editor",...this.$attrs})]}}),Ef=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"RichTextEditor",props:{field:Object},setup(r){const t=r,n=e.computed(()=>t.field.maxImageCounts),o=["SimSun","SimHei","Microsoft-YaHei","KaiTi","FangSong","Arial","Times-New-Roman","sans-serif"],s=[!1,"16px","18px","20px","22px","26px","28px","30px"],a=jt.default.imports["formats/size"];a.whitelist=s;const i=jt.default.imports["formats/font"];i.whitelist=o,jt.default.register(i,!0);const c=jt.imports["attributors/style/align"];c.whitelist=["right","center","justify"],jt.default.register(c,!0);const d=e.ref(),h={container:[[{font:o}],[{size:s}],[{header:[1,2,3,4,5,6,!1]}],[{list:"ordered"},{list:"bullet"}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{align:[]}],["link","image"]],handlers:{image:function(){const p=(m,x)=>(m.match(new RegExp(x,"g"))||[]).length,y=d.value.content,B=y?p(y,"<img "):0;if(B>=n.value){w.ElMessage({message:`${t.field.label}最多只能上传${n.value}张图片!`,type:"warning"});return}const k=document.createElement("input");k.setAttribute("type","file"),k.setAttribute("accept","image/*"),k.setAttribute("multiple",!0),k.click(),k.onchange=()=>{const m=k.files;if(m.length+B>n.value){w.ElMessage({message:`${t.field.label}最多只能上传${n.value}张图片!`,type:"warning"});return}for(const g of m)if(g.size<5242880)f(g);else return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1}}}};function f(p){const y=new FormData;return y.append("image",p),new Promise((B,k)=>{v.post(et().imageUploadUrl,y,{}).then(m=>{const x=m.data.data.imageUrl,g=d.value.getQuill(),b=g.getSelection().index;g.insertEmbed(b,"image",x),g.setSelection(b+1),B(m)}).catch(m=>{console.log("图片上传失败。",m),k("图片上传失败。")})})}return(p,y)=>(e.openBlock(),e.createBlock(e.unref(kf),{ref_key:"quillEditor",ref:d,toolbar:h,"content-type":"html"},null,512))}}},Symbol.toStringTag,{value:"Module"}));P.BaseLayout=Rc,P.DashboardPage=ji,P.DashboardRow=Fi,P.DataTablePage=Vr,P.Detail=Fa,P.DetailTab=Xc,P.EmptyTip=fe,P.FormEditor=Sn,P.ImagesUploader=pa,P.List=Aa,P.RowActionFormEditor=qi,P.Statistic=fa,P.StatisticCard=Ti,P.Widget=ua,P.defineDomain=da,P.getConfig=et,P.getDomainConfig=zt,P.http=ye,P.rest=yi,P.setupAppConfig=ki,P.setupDomainConfigLoader=Ei,P.useDataTableStore=Qe,P.useRouteHistoryStore=$n,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
20
20
  //# sourceMappingURL=kouxiangtang.umd.cjs.map