unione-form-vue 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.d.ts +19 -0
- package/dist/config/settings.d.ts +15 -0
- package/dist/editor.d.ts +10 -18
- package/dist/index.d.ts +13 -4
- package/dist/index.umd.js +13 -354
- package/dist/lib/convertor.d.ts +36 -0
- package/dist/lib/data.d.ts +63 -42
- package/dist/lib/debounce.d.ts +1 -0
- package/dist/lib/dict.d.ts +23 -0
- package/dist/lib/ebus.d.ts +14 -0
- package/dist/lib/rule.d.ts +9 -0
- package/dist/lib/utils.d.ts +5 -5
- package/dist/locales/index.d.ts +2 -3
- package/dist/page/data/define/api.d.ts +10 -0
- package/dist/page/data/define/components/dataFieldFKeys.vue.d.ts +10 -0
- package/dist/page/data/define/components/dataFieldMange.vue.d.ts +10 -0
- package/dist/page/data/define/components/dataFieldSetting.vue.d.ts +10 -0
- package/dist/page/data/define/components/dataFilters.vue.d.ts +9 -0
- package/dist/page/data/define/edit.vue.d.ts +2 -0
- package/dist/page/data/define/list.vue.d.ts +2 -0
- package/dist/page/{view.vue.d.ts → editor.vue.d.ts} +2 -0
- package/dist/page/form.vue.d.ts +32 -0
- package/dist/page/list.vue.d.ts +32 -0
- package/dist/style.css +1 -1
- package/dist/typing.d.ts +372 -167
- package/dist/version/version.d.ts +1 -1
- package/dist/widgets/base/btn.vue.d.ts +39 -2
- package/dist/widgets/form/checkBox.vue.d.ts +56 -0
- package/dist/widgets/form/form.vue.d.ts +28 -15
- package/dist/widgets/form/{render.vue.d.ts → formItem.vue.d.ts} +14 -4
- package/dist/widgets/form/radioBox.vue.d.ts +56 -0
- package/dist/widgets/form/selectBox.vue.d.ts +56 -0
- package/dist/widgets/form/switchBox.vue.d.ts +48 -0
- package/dist/widgets/layout/section.vue.d.ts +89 -0
- package/dist/widgets/query/queryForm.vue.d.ts +2 -2
- package/dist/widgets/table/tableList.vue.d.ts +52 -9
- package/package.json +3 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,354 +1,13 @@
|
|
|
1
|
-
(function(Jt,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(Jt=typeof globalThis<"u"?globalThis:Jt||self,u(Jt.index={},Jt.Vue))})(this,function(Jt,u){"use strict";var oi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function h5(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var nu={exports:{}};nu.exports,function(n,e){(function(t,o){o(e,u)})(oi,function(t,o){const r="0.0.5",a={ACCESS_TOKEN:"token",ACCESS_USER_INFO:"user_info"},l={security:{sm2PubKey:"04a684d7140aebfc83515a2312dac7ab836f3adc484627971b6936ad7d5575048caecf9c7eb07ed4dcee9d04cb3a7b1c514477b646b1ebe8245de215733baa5133",sm2PriKey:"4389c4329a001df855d14ec204d25bf12d4d631bf61bb02d0586a653e199e0da"},axios:{root:"/",admin:"/portal"}},f={constant:a,security:l.security,axios:l.axios};function h(i){return i?.constant&&(f.constant={...f.constant,...i.constant}),i?.security&&(f.security={...f.security,...i.security}),i?.axios&&(f.axios={...f.axios,...i.axios}),f}function g(i,s){return function(){return i.apply(s,arguments)}}const{toString:O}=Object.prototype,{getPrototypeOf:v}=Object,b=(i=>s=>{const c=O.call(s);return i[c]||(i[c]=c.slice(8,-1).toLowerCase())})(Object.create(null)),x=i=>(i=i.toLowerCase(),s=>b(s)===i),C=i=>s=>typeof s===i,{isArray:k}=Array,L=C("undefined");function A(i){return i!==null&&!L(i)&&i.constructor!==null&&!L(i.constructor)&&I(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}const E=x("ArrayBuffer");function F(i){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(i):s=i&&i.buffer&&E(i.buffer),s}const B=C("string"),I=C("function"),K=C("number"),V=i=>i!==null&&typeof i=="object",j=i=>i===!0||i===!1,R=i=>{if(b(i)!=="object")return!1;const s=v(i);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)},Y=x("Date"),le=x("File"),me=x("Blob"),ze=x("FileList"),we=i=>V(i)&&I(i.pipe),se=i=>{let s;return i&&(typeof FormData=="function"&&i instanceof FormData||I(i.append)&&((s=b(i))==="formdata"||s==="object"&&I(i.toString)&&i.toString()==="[object FormData]"))},Oe=x("URLSearchParams"),[Le,ge,$e,Te]=["ReadableStream","Request","Response","Headers"].map(x),ye=i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pt(i,s,{allOwnKeys:c=!1}={}){if(i===null||typeof i>"u")return;let d,p;if(typeof i!="object"&&(i=[i]),k(i))for(d=0,p=i.length;d<p;d++)s.call(null,i[d],d,i);else{const m=c?Object.getOwnPropertyNames(i):Object.keys(i),y=m.length;let w;for(d=0;d<y;d++)w=m[d],s.call(null,i[w],w,i)}}function Se(i,s){s=s.toLowerCase();const c=Object.keys(i);let d=c.length,p;for(;d-- >0;)if(p=c[d],s===p.toLowerCase())return p;return null}const We=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:oi,wt=i=>!L(i)&&i!==We;function vo(){const{caseless:i}=wt(this)&&this||{},s={},c=(d,p)=>{const m=i&&Se(s,p)||p;R(s[m])&&R(d)?s[m]=vo(s[m],d):R(d)?s[m]=vo({},d):k(d)?s[m]=d.slice():s[m]=d};for(let d=0,p=arguments.length;d<p;d++)arguments[d]&&pt(arguments[d],c);return s}const Ne=(i,s,c,{allOwnKeys:d}={})=>(pt(s,(p,m)=>{c&&I(p)?i[m]=g(p,c):i[m]=p},{allOwnKeys:d}),i),mn=i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),ht=(i,s,c,d)=>{i.prototype=Object.create(s.prototype,d),i.prototype.constructor=i,Object.defineProperty(i,"super",{value:s.prototype}),c&&Object.assign(i.prototype,c)},gn=(i,s,c,d)=>{let p,m,y;const w={};if(s=s||{},i==null)return s;do{for(p=Object.getOwnPropertyNames(i),m=p.length;m-- >0;)y=p[m],(!d||d(y,i,s))&&!w[y]&&(s[y]=i[y],w[y]=!0);i=c!==!1&&v(i)}while(i&&(!c||c(i,s))&&i!==Object.prototype);return s},AF=(i,s,c)=>{i=String(i),(c===void 0||c>i.length)&&(c=i.length),c-=s.length;const d=i.indexOf(s,c);return d!==-1&&d===c},MF=i=>{if(!i)return null;if(k(i))return i;let s=i.length;if(!K(s))return null;const c=new Array(s);for(;s-- >0;)c[s]=i[s];return c},RF=(i=>s=>i&&s instanceof i)(typeof Uint8Array<"u"&&v(Uint8Array)),IF=(i,s)=>{const c=(i&&i[Symbol.iterator]).call(i);let d;for(;(d=c.next())&&!d.done;){const p=d.value;s.call(i,p[0],p[1])}},QF=(i,s)=>{let c;const d=[];for(;(c=i.exec(s))!==null;)d.push(c);return d},DF=x("HTMLFormElement"),BF=i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,c,d){return c.toUpperCase()+d}),Gk=(({hasOwnProperty:i})=>(s,c)=>i.call(s,c))(Object.prototype),LF=x("RegExp"),Kk=(i,s)=>{const c=Object.getOwnPropertyDescriptors(i),d={};pt(c,(p,m)=>{let y;(y=s(p,m,i))!==!1&&(d[m]=y||p)}),Object.defineProperties(i,d)},VF=i=>{Kk(i,(s,c)=>{if(I(i)&&["arguments","caller","callee"].indexOf(c)!==-1)return!1;const d=i[c];if(I(d)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+c+"'")})}})},jF=(i,s)=>{const c={},d=p=>{p.forEach(m=>{c[m]=!0})};return k(i)?d(i):d(String(i).split(s)),c},FF=()=>{},ZF=(i,s)=>i!=null&&Number.isFinite(i=+i)?i:s,Zg="abcdefghijklmnopqrstuvwxyz",Jk="0123456789",$k={DIGIT:Jk,ALPHA:Zg,ALPHA_DIGIT:Zg+Zg.toUpperCase()+Jk},WF=(i=16,s=$k.ALPHA_DIGIT)=>{let c="";const{length:d}=s;for(;i--;)c+=s[Math.random()*d|0];return c};function zF(i){return!!(i&&I(i.append)&&i[Symbol.toStringTag]==="FormData"&&i[Symbol.iterator])}const UF=i=>{const s=new Array(10),c=(d,p)=>{if(V(d)){if(s.indexOf(d)>=0)return;if(!("toJSON"in d)){s[p]=d;const m=k(d)?[]:{};return pt(d,(y,w)=>{const S=c(y,p+1);!L(S)&&(m[w]=S)}),s[p]=void 0,m}}return d};return c(i,0)},HF=x("AsyncFunction"),YF=i=>i&&(V(i)||I(i))&&I(i.then)&&I(i.catch),qk=((i,s)=>i?setImmediate:s?((c,d)=>(We.addEventListener("message",({source:p,data:m})=>{p===We&&m===c&&d.length&&d.shift()()},!1),p=>{d.push(p),We.postMessage(c,"*")}))(`axios@${Math.random()}`,[]):c=>setTimeout(c))(typeof setImmediate=="function",I(We.postMessage)),XF=typeof queueMicrotask<"u"?queueMicrotask.bind(We):typeof process<"u"&&process.nextTick||qk,pe={isArray:k,isArrayBuffer:E,isBuffer:A,isFormData:se,isArrayBufferView:F,isString:B,isNumber:K,isBoolean:j,isObject:V,isPlainObject:R,isReadableStream:Le,isRequest:ge,isResponse:$e,isHeaders:Te,isUndefined:L,isDate:Y,isFile:le,isBlob:me,isRegExp:LF,isFunction:I,isStream:we,isURLSearchParams:Oe,isTypedArray:RF,isFileList:ze,forEach:pt,merge:vo,extend:Ne,trim:ye,stripBOM:mn,inherits:ht,toFlatObject:gn,kindOf:b,kindOfTest:x,endsWith:AF,toArray:MF,forEachEntry:IF,matchAll:QF,isHTMLForm:DF,hasOwnProperty:Gk,hasOwnProp:Gk,reduceDescriptors:Kk,freezeMethods:VF,toObjectSet:jF,toCamelCase:BF,noop:FF,toFiniteNumber:ZF,findKey:Se,global:We,isContextDefined:wt,ALPHABET:$k,generateString:WF,isSpecCompliantForm:zF,toJSONObject:UF,isAsyncFn:HF,isThenable:YF,setImmediate:qk,asap:XF};function at(i,s,c,d,p){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=i,this.name="AxiosError",s&&(this.code=s),c&&(this.config=c),d&&(this.request=d),p&&(this.response=p,this.status=p.status?p.status:null)}pe.inherits(at,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:pe.toJSONObject(this.config),code:this.code,status:this.status}}});const e2=at.prototype,t2={};["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(i=>{t2[i]={value:i}}),Object.defineProperties(at,t2),Object.defineProperty(e2,"isAxiosError",{value:!0}),at.from=(i,s,c,d,p,m)=>{const y=Object.create(e2);return pe.toFlatObject(i,y,function(w){return w!==Error.prototype},w=>w!=="isAxiosError"),at.call(y,i.message,s,c,d,p),y.cause=i,y.name=i.name,m&&Object.assign(y,m),y};const GF=null;function Wg(i){return pe.isPlainObject(i)||pe.isArray(i)}function n2(i){return pe.endsWith(i,"[]")?i.slice(0,-2):i}function o2(i,s,c){return i?i.concat(s).map(function(d,p){return d=n2(d),!c&&p?"["+d+"]":d}).join(c?".":""):s}function KF(i){return pe.isArray(i)&&!i.some(Wg)}const JF=pe.toFlatObject(pe,{},null,function(i){return/^is[A-Z]/.test(i)});function lf(i,s,c){if(!pe.isObject(i))throw new TypeError("target must be an object");s=s||new FormData,c=pe.toFlatObject(c,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Q,Z){return!pe.isUndefined(Z[Q])});const d=c.metaTokens,p=c.visitor||N,m=c.dots,y=c.indexes,w=(c.Blob||typeof Blob<"u"&&Blob)&&pe.isSpecCompliantForm(s);if(!pe.isFunction(p))throw new TypeError("visitor must be a function");function S(Q){if(Q===null)return"";if(pe.isDate(Q))return Q.toISOString();if(!w&&pe.isBlob(Q))throw new at("Blob is not supported. Use a Buffer instead.");return pe.isArrayBuffer(Q)||pe.isTypedArray(Q)?w&&typeof Blob=="function"?new Blob([Q]):Buffer.from(Q):Q}function N(Q,Z,z){let G=Q;if(Q&&!z&&typeof Q=="object"){if(pe.endsWith(Z,"{}"))Z=d?Z:Z.slice(0,-2),Q=JSON.stringify(Q);else if(pe.isArray(Q)&&KF(Q)||(pe.isFileList(Q)||pe.endsWith(Z,"[]"))&&(G=pe.toArray(Q)))return Z=n2(Z),G.forEach(function(te,$){!(pe.isUndefined(te)||te===null)&&s.append(y===!0?o2([Z],$,m):y===null?Z:Z+"[]",S(te))}),!1}return Wg(Q)?!0:(s.append(o2(z,Z,m),S(Q)),!1)}const P=[],_=Object.assign(JF,{defaultVisitor:N,convertValue:S,isVisitable:Wg});function T(Q,Z){if(!pe.isUndefined(Q)){if(P.indexOf(Q)!==-1)throw Error("Circular reference detected in "+Z.join("."));P.push(Q),pe.forEach(Q,function(z,G){(!(pe.isUndefined(z)||z===null)&&p.call(s,z,pe.isString(G)?G.trim():G,Z,_))===!0&&T(z,Z?Z.concat(G):[G])}),P.pop()}}if(!pe.isObject(i))throw new TypeError("data must be an object");return T(i),s}function i2(i){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,function(c){return s[c]})}function zg(i,s){this._pairs=[],i&&lf(i,this,s)}const r2=zg.prototype;r2.append=function(i,s){this._pairs.push([i,s])},r2.toString=function(i){const s=i?function(c){return i.call(this,c,i2)}:i2;return this._pairs.map(function(c){return s(c[0])+"="+s(c[1])},"").join("&")};function $F(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function a2(i,s,c){if(!s)return i;const d=c&&c.encode||$F,p=c&&c.serialize;let m;if(p?m=p(s,c):m=pe.isURLSearchParams(s)?s.toString():new zg(s,c).toString(d),m){const y=i.indexOf("#");y!==-1&&(i=i.slice(0,y)),i+=(i.indexOf("?")===-1?"?":"&")+m}return i}class s2{constructor(){this.handlers=[]}use(s,c,d){return this.handlers.push({fulfilled:s,rejected:c,synchronous:d?d.synchronous:!1,runWhen:d?d.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){pe.forEach(this.handlers,function(c){c!==null&&s(c)})}}const l2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qF={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:zg,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ug=typeof window<"u"&&typeof document<"u",Hg=typeof navigator=="object"&&navigator||void 0,eZ=Ug&&(!Hg||["ReactNative","NativeScript","NS"].indexOf(Hg.product)<0),tZ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nZ=Ug&&window.location.href||"http://localhost",io={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ug,hasStandardBrowserEnv:eZ,hasStandardBrowserWebWorkerEnv:tZ,navigator:Hg,origin:nZ},Symbol.toStringTag,{value:"Module"})),...qF};function oZ(i,s){return lf(i,new io.classes.URLSearchParams,Object.assign({visitor:function(c,d,p,m){return io.isNode&&pe.isBuffer(c)?(this.append(d,c.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)}},s))}function iZ(i){return pe.matchAll(/\w+|\[(\w*)]/g,i).map(s=>s[0]==="[]"?"":s[1]||s[0])}function rZ(i){const s={},c=Object.keys(i);let d;const p=c.length;let m;for(d=0;d<p;d++)m=c[d],s[m]=i[m];return s}function c2(i){function s(c,d,p,m){let y=c[m++];if(y==="__proto__")return!0;const w=Number.isFinite(+y),S=m>=c.length;return y=!y&&pe.isArray(p)?p.length:y,S?(pe.hasOwnProp(p,y)?p[y]=[p[y],d]:p[y]=d,!w):((!p[y]||!pe.isObject(p[y]))&&(p[y]=[]),s(c,d,p[y],m)&&pe.isArray(p[y])&&(p[y]=rZ(p[y])),!w)}if(pe.isFormData(i)&&pe.isFunction(i.entries)){const c={};return pe.forEachEntry(i,(d,p)=>{s(iZ(d),p,c,0)}),c}return null}function aZ(i,s,c){if(pe.isString(i))try{return(s||JSON.parse)(i),pe.trim(i)}catch(d){if(d.name!=="SyntaxError")throw d}return(0,JSON.stringify)(i)}const Sc={transitional:l2,adapter:["xhr","http","fetch"],transformRequest:[function(i,s){const c=s.getContentType()||"",d=c.indexOf("application/json")>-1,p=pe.isObject(i);if(p&&pe.isHTMLForm(i)&&(i=new FormData(i)),pe.isFormData(i))return d?JSON.stringify(c2(i)):i;if(pe.isArrayBuffer(i)||pe.isBuffer(i)||pe.isStream(i)||pe.isFile(i)||pe.isBlob(i)||pe.isReadableStream(i))return i;if(pe.isArrayBufferView(i))return i.buffer;if(pe.isURLSearchParams(i))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),i.toString();let m;if(p){if(c.indexOf("application/x-www-form-urlencoded")>-1)return oZ(i,this.formSerializer).toString();if((m=pe.isFileList(i))||c.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return lf(m?{"files[]":i}:i,y&&new y,this.formSerializer)}}return p||d?(s.setContentType("application/json",!1),aZ(i)):i}],transformResponse:[function(i){const s=this.transitional||Sc.transitional,c=s&&s.forcedJSONParsing,d=this.responseType==="json";if(pe.isResponse(i)||pe.isReadableStream(i))return i;if(i&&pe.isString(i)&&(c&&!this.responseType||d)){const p=!(s&&s.silentJSONParsing)&&d;try{return JSON.parse(i)}catch(m){if(p)throw m.name==="SyntaxError"?at.from(m,at.ERR_BAD_RESPONSE,this,null,this.response):m}}return i}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:io.classes.FormData,Blob:io.classes.Blob},validateStatus:function(i){return i>=200&&i<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};pe.forEach(["delete","get","head","post","put","patch"],i=>{Sc.headers[i]={}});const sZ=pe.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"]),lZ=i=>{const s={};let c,d,p;return i&&i.split(`
|
|
2
|
-
`)
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...c){const d=new this(s);return c.forEach(p=>d.set(p)),d}static accessor(s){const c=(this[u2]=this[u2]={accessors:{}}).accessors,d=this.prototype;function p(m){const y=Cc(m);c[y]||(fZ(d,m),c[y]=!0)}return pe.isArray(s)?s.forEach(p):p(s),this}}ro.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),pe.reduceDescriptors(ro.prototype,({value:i},s)=>{let c=s[0].toUpperCase()+s.slice(1);return{get:()=>i,set(d){this[c]=d}}}),pe.freezeMethods(ro);function Xg(i,s){const c=this||Sc,d=s||c,p=ro.from(d.headers);let m=d.data;return pe.forEach(i,function(y){m=y.call(c,m,p.normalize(),s?s.status:void 0)}),p.normalize(),m}function d2(i){return!!(i&&i.__CANCEL__)}function Ds(i,s,c){at.call(this,i??"canceled",at.ERR_CANCELED,s,c),this.name="CanceledError"}pe.inherits(Ds,at,{__CANCEL__:!0});function f2(i,s,c){const d=c.config.validateStatus;!c.status||!d||d(c.status)?i(c):s(new at("Request failed with status code "+c.status,[at.ERR_BAD_REQUEST,at.ERR_BAD_RESPONSE][Math.floor(c.status/100)-4],c.config,c.request,c))}function hZ(i){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return s&&s[1]||""}function pZ(i,s){i=i||10;const c=new Array(i),d=new Array(i);let p=0,m=0,y;return s=s!==void 0?s:1e3,function(w){const S=Date.now(),N=d[m];y||(y=S),c[p]=w,d[p]=S;let P=m,_=0;for(;P!==p;)_+=c[P++],P=P%i;if(p=(p+1)%i,p===m&&(m=(m+1)%i),S-y<s)return;const T=N&&S-N;return T?Math.round(_*1e3/T):void 0}}function mZ(i,s){let c=0,d=1e3/s,p,m;const y=(w,S=Date.now())=>{c=S,p=null,m&&(clearTimeout(m),m=null),i.apply(null,w)};return[(...w)=>{const S=Date.now(),N=S-c;N>=d?y(w,S):(p=w,m||(m=setTimeout(()=>{m=null,y(p)},d-N)))},()=>p&&y(p)]}const uf=(i,s,c=3)=>{let d=0;const p=pZ(50,250);return mZ(m=>{const y=m.loaded,w=m.lengthComputable?m.total:void 0,S=y-d,N=p(S),P=y<=w;d=y;const _={loaded:y,total:w,progress:w?y/w:void 0,bytes:S,rate:N||void 0,estimated:N&&w&&P?(w-y)/N:void 0,event:m,lengthComputable:w!=null,[s?"download":"upload"]:!0};i(_)},c)},h2=(i,s)=>{const c=i!=null;return[d=>s[0]({lengthComputable:c,total:i,loaded:d}),s[1]]},p2=i=>(...s)=>pe.asap(()=>i(...s)),gZ=io.hasStandardBrowserEnv?function(){const i=io.navigator&&/(msie|trident)/i.test(io.navigator.userAgent),s=document.createElement("a");let c;function d(p){let m=p;return i&&(s.setAttribute("href",m),m=s.href),s.setAttribute("href",m),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}return c=d(window.location.href),function(p){const m=pe.isString(p)?d(p):p;return m.protocol===c.protocol&&m.host===c.host}}():function(){return function(){return!0}}(),OZ=io.hasStandardBrowserEnv?{write(i,s,c,d,p,m){const y=[i+"="+encodeURIComponent(s)];pe.isNumber(c)&&y.push("expires="+new Date(c).toGMTString()),pe.isString(d)&&y.push("path="+d),pe.isString(p)&&y.push("domain="+p),m===!0&&y.push("secure"),document.cookie=y.join("; ")},read(i){const s=document.cookie.match(new RegExp("(^|;\\s*)("+i+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove(i){this.write(i,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vZ(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}function yZ(i,s){return s?i.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):i}function m2(i,s){return i&&!vZ(s)?yZ(i,s):s}const g2=i=>i instanceof ro?{...i}:i;function ma(i,s){s=s||{};const c={};function d(N,P,_){return pe.isPlainObject(N)&&pe.isPlainObject(P)?pe.merge.call({caseless:_},N,P):pe.isPlainObject(P)?pe.merge({},P):pe.isArray(P)?P.slice():P}function p(N,P,_){if(pe.isUndefined(P)){if(!pe.isUndefined(N))return d(void 0,N,_)}else return d(N,P,_)}function m(N,P){if(!pe.isUndefined(P))return d(void 0,P)}function y(N,P){if(pe.isUndefined(P)){if(!pe.isUndefined(N))return d(void 0,N)}else return d(void 0,P)}function w(N,P,_){if(_ in s)return d(N,P);if(_ in i)return d(void 0,N)}const S={url:m,method:m,data:m,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:w,headers:(N,P)=>p(g2(N),g2(P),!0)};return pe.forEach(Object.keys(Object.assign({},i,s)),function(N){const P=S[N]||p,_=P(i[N],s[N],N);pe.isUndefined(_)&&P!==w||(c[N]=_)}),c}const O2=i=>{const s=ma({},i);let{data:c,withXSRFToken:d,xsrfHeaderName:p,xsrfCookieName:m,headers:y,auth:w}=s;s.headers=y=ro.from(y),s.url=a2(m2(s.baseURL,s.url),i.params,i.paramsSerializer),w&&y.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let S;if(pe.isFormData(c)){if(io.hasStandardBrowserEnv||io.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((S=y.getContentType())!==!1){const[N,...P]=S?S.split(";").map(_=>_.trim()).filter(Boolean):[];y.setContentType([N||"multipart/form-data",...P].join("; "))}}if(io.hasStandardBrowserEnv&&(d&&pe.isFunction(d)&&(d=d(s)),d||d!==!1&&gZ(s.url))){const N=p&&m&&OZ.read(m);N&&y.set(p,N)}return s},bZ=typeof XMLHttpRequest<"u"&&function(i){return new Promise(function(s,c){const d=O2(i);let p=d.data;const m=ro.from(d.headers).normalize();let{responseType:y,onUploadProgress:w,onDownloadProgress:S}=d,N,P,_,T,Q;function Z(){T&&T(),Q&&Q(),d.cancelToken&&d.cancelToken.unsubscribe(N),d.signal&&d.signal.removeEventListener("abort",N)}let z=new XMLHttpRequest;z.open(d.method.toUpperCase(),d.url,!0),z.timeout=d.timeout;function G(){if(!z)return;const $=ro.from("getAllResponseHeaders"in z&&z.getAllResponseHeaders()),H={data:!y||y==="text"||y==="json"?z.responseText:z.response,status:z.status,statusText:z.statusText,headers:$,config:i,request:z};f2(function(X){s(X),Z()},function(X){c(X),Z()},H),z=null}"onloadend"in z?z.onloadend=G:z.onreadystatechange=function(){!z||z.readyState!==4||z.status===0&&!(z.responseURL&&z.responseURL.indexOf("file:")===0)||setTimeout(G)},z.onabort=function(){z&&(c(new at("Request aborted",at.ECONNABORTED,i,z)),z=null)},z.onerror=function(){c(new at("Network Error",at.ERR_NETWORK,i,z)),z=null},z.ontimeout=function(){let $=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded";const H=d.transitional||l2;d.timeoutErrorMessage&&($=d.timeoutErrorMessage),c(new at($,H.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,i,z)),z=null},p===void 0&&m.setContentType(null),"setRequestHeader"in z&&pe.forEach(m.toJSON(),function($,H){z.setRequestHeader(H,$)}),pe.isUndefined(d.withCredentials)||(z.withCredentials=!!d.withCredentials),y&&y!=="json"&&(z.responseType=d.responseType),S&&([_,Q]=uf(S,!0),z.addEventListener("progress",_)),w&&z.upload&&([P,T]=uf(w),z.upload.addEventListener("progress",P),z.upload.addEventListener("loadend",T)),(d.cancelToken||d.signal)&&(N=$=>{z&&(c(!$||$.type?new Ds(null,i,z):$),z.abort(),z=null)},d.cancelToken&&d.cancelToken.subscribe(N),d.signal&&(d.signal.aborted?N():d.signal.addEventListener("abort",N)));const te=hZ(d.url);if(te&&io.protocols.indexOf(te)===-1){c(new at("Unsupported protocol "+te+":",at.ERR_BAD_REQUEST,i));return}z.send(p||null)})},xZ=(i,s)=>{const{length:c}=i=i?i.filter(Boolean):[];if(s||c){let d=new AbortController,p;const m=function(N){if(!p){p=!0,w();const P=N instanceof Error?N:this.reason;d.abort(P instanceof at?P:new Ds(P instanceof Error?P.message:P))}};let y=s&&setTimeout(()=>{y=null,m(new at(`timeout ${s} of ms exceeded`,at.ETIMEDOUT))},s);const w=()=>{i&&(y&&clearTimeout(y),y=null,i.forEach(N=>{N.unsubscribe?N.unsubscribe(m):N.removeEventListener("abort",m)}),i=null)};i.forEach(N=>N.addEventListener("abort",m));const{signal:S}=d;return S.unsubscribe=()=>pe.asap(w),S}},wZ=function*(i,s){let c=i.byteLength;if(c<s){yield i;return}let d=0,p;for(;d<c;)p=d+s,yield i.slice(d,p),d=p},SZ=async function*(i,s){for await(const c of CZ(i))yield*wZ(c,s)},CZ=async function*(i){if(i[Symbol.asyncIterator]){yield*i;return}const s=i.getReader();try{for(;;){const{done:c,value:d}=await s.read();if(c)break;yield d}}finally{await s.cancel()}},v2=(i,s,c,d)=>{const p=SZ(i,s);let m=0,y,w=S=>{y||(y=!0,d&&d(S))};return new ReadableStream({async pull(S){try{const{done:N,value:P}=await p.next();if(N){w(),S.close();return}let _=P.byteLength;if(c){let T=m+=_;c(T)}S.enqueue(new Uint8Array(P))}catch(N){throw w(N),N}},cancel(S){return w(S),p.return()}},{highWaterMark:2})},df=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",y2=df&&typeof ReadableStream=="function",kZ=df&&(typeof TextEncoder=="function"?(i=>s=>i.encode(s))(new TextEncoder):async i=>new Uint8Array(await new Response(i).arrayBuffer())),b2=(i,...s)=>{try{return!!i(...s)}catch{return!1}},PZ=y2&&b2(()=>{let i=!1;const s=new Request(io.origin,{body:new ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!s}),x2=64*1024,Gg=y2&&b2(()=>pe.isReadableStream(new Response("").body)),ff={stream:Gg&&(i=>i.body)};df&&(i=>{["text","arrayBuffer","blob","formData","stream"].forEach(s=>{!ff[s]&&(ff[s]=pe.isFunction(i[s])?c=>c[s]():(c,d)=>{throw new at(`Response type '${s}' is not supported`,at.ERR_NOT_SUPPORT,d)})})})(new Response);const _Z=async i=>{if(i==null)return 0;if(pe.isBlob(i))return i.size;if(pe.isSpecCompliantForm(i))return(await new Request(io.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(pe.isArrayBufferView(i)||pe.isArrayBuffer(i))return i.byteLength;if(pe.isURLSearchParams(i)&&(i=i+""),pe.isString(i))return(await kZ(i)).byteLength},EZ=async(i,s)=>pe.toFiniteNumber(i.getContentLength())??_Z(s),Kg={http:GF,xhr:bZ,fetch:df&&(async i=>{let{url:s,method:c,data:d,signal:p,cancelToken:m,timeout:y,onDownloadProgress:w,onUploadProgress:S,responseType:N,headers:P,withCredentials:_="same-origin",fetchOptions:T}=O2(i);N=N?(N+"").toLowerCase():"text";let Q=xZ([p,m&&m.toAbortSignal()],y),Z;const z=Q&&Q.unsubscribe&&(()=>{Q.unsubscribe()});let G;try{if(S&&PZ&&c!=="get"&&c!=="head"&&(G=await EZ(P,d))!==0){let re=new Request(s,{method:"POST",body:d,duplex:"half"}),oe;if(pe.isFormData(d)&&(oe=re.headers.get("content-type"))&&P.setContentType(oe),re.body){const[U,ce]=h2(G,uf(p2(S)));d=v2(re.body,x2,U,ce)}}pe.isString(_)||(_=_?"include":"omit");const te="credentials"in Request.prototype;Z=new Request(s,{...T,signal:Q,method:c.toUpperCase(),headers:P.normalize().toJSON(),body:d,duplex:"half",credentials:te?_:void 0});let $=await fetch(Z);const H=Gg&&(N==="stream"||N==="response");if(Gg&&(w||H&&z)){const re={};["status","statusText","headers"].forEach(he=>{re[he]=$[he]});const oe=pe.toFiniteNumber($.headers.get("content-length")),[U,ce]=w&&h2(oe,uf(p2(w),!0))||[];$=new Response(v2($.body,x2,U,()=>{ce&&ce(),z&&z()}),re)}N=N||"text";let X=await ff[pe.findKey(ff,N)||"text"]($,i);return!H&&z&&z(),await new Promise((re,oe)=>{f2(re,oe,{data:X,headers:ro.from($.headers),status:$.status,statusText:$.statusText,config:i,request:Z})})}catch(te){throw z&&z(),te&&te.name==="TypeError"&&/fetch/i.test(te.message)?Object.assign(new at("Network Error",at.ERR_NETWORK,i,Z),{cause:te.cause||te}):at.from(te,te&&te.code,i,Z)}})};pe.forEach(Kg,(i,s)=>{if(i){try{Object.defineProperty(i,"name",{value:s})}catch{}Object.defineProperty(i,"adapterName",{value:s})}});const w2=i=>`- ${i}`,TZ=i=>pe.isFunction(i)||i===null||i===!1,S2={getAdapter:i=>{i=pe.isArray(i)?i:[i];const{length:s}=i;let c,d;const p={};for(let m=0;m<s;m++){c=i[m];let y;if(d=c,!TZ(c)&&(d=Kg[(y=String(c)).toLowerCase()],d===void 0))throw new at(`Unknown adapter '${y}'`);if(d)break;p[y||"#"+m]=d}if(!d){const m=Object.entries(p).map(([w,S])=>`adapter ${w} `+(S===!1?"is not supported by the environment":"is not available in the build"));let y=s?m.length>1?`since :
|
|
4
|
-
`+m.map(w2).join(`
|
|
5
|
-
`):" "+w2(m[0]):"as no adapter specified";throw new at("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return d},adapters:Kg};function Jg(i){if(i.cancelToken&&i.cancelToken.throwIfRequested(),i.signal&&i.signal.aborted)throw new Ds(null,i)}function C2(i){return Jg(i),i.headers=ro.from(i.headers),i.data=Xg.call(i,i.transformRequest),["post","put","patch"].indexOf(i.method)!==-1&&i.headers.setContentType("application/x-www-form-urlencoded",!1),S2.getAdapter(i.adapter||Sc.adapter)(i).then(function(s){return Jg(i),s.data=Xg.call(i,i.transformResponse,s),s.headers=ro.from(s.headers),s},function(s){return d2(s)||(Jg(i),s&&s.response&&(s.response.data=Xg.call(i,i.transformResponse,s.response),s.response.headers=ro.from(s.response.headers))),Promise.reject(s)})}const k2="1.7.7",$g={};["object","boolean","number","function","string","symbol"].forEach((i,s)=>{$g[i]=function(c){return typeof c===i||"a"+(s<1?"n ":" ")+i}});const P2={};$g.transitional=function(i,s,c){function d(p,m){return"[Axios v"+k2+"] Transitional option '"+p+"'"+m+(c?". "+c:"")}return(p,m,y)=>{if(i===!1)throw new at(d(m," has been removed"+(s?" in "+s:"")),at.ERR_DEPRECATED);return s&&!P2[m]&&(P2[m]=!0,console.warn(d(m," has been deprecated since v"+s+" and will be removed in the near future"))),i?i(p,m,y):!0}};function NZ(i,s,c){if(typeof i!="object")throw new at("options must be an object",at.ERR_BAD_OPTION_VALUE);const d=Object.keys(i);let p=d.length;for(;p-- >0;){const m=d[p],y=s[m];if(y){const w=i[m],S=w===void 0||y(w,m,i);if(S!==!0)throw new at("option "+m+" must be "+S,at.ERR_BAD_OPTION_VALUE);continue}if(c!==!0)throw new at("Unknown option "+m,at.ERR_BAD_OPTION)}}const qg={assertOptions:NZ,validators:$g},gr=qg.validators;class ga{constructor(s){this.defaults=s,this.interceptors={request:new s2,response:new s2}}async request(s,c){try{return await this._request(s,c)}catch(d){if(d instanceof Error){let p;Error.captureStackTrace?Error.captureStackTrace(p={}):p=new Error;const m=p.stack?p.stack.replace(/^.+\n/,""):"";try{d.stack?m&&!String(d.stack).endsWith(m.replace(/^.+\n.+\n/,""))&&(d.stack+=`
|
|
6
|
-
`+m):d.stack=m}catch{}}throw d}}_request(s,c){typeof s=="string"?(c=c||{},c.url=s):c=s||{},c=ma(this.defaults,c);const{transitional:d,paramsSerializer:p,headers:m}=c;d!==void 0&&qg.assertOptions(d,{silentJSONParsing:gr.transitional(gr.boolean),forcedJSONParsing:gr.transitional(gr.boolean),clarifyTimeoutError:gr.transitional(gr.boolean)},!1),p!=null&&(pe.isFunction(p)?c.paramsSerializer={serialize:p}:qg.assertOptions(p,{encode:gr.function,serialize:gr.function},!0)),c.method=(c.method||this.defaults.method||"get").toLowerCase();let y=m&&pe.merge(m.common,m[c.method]);m&&pe.forEach(["delete","get","head","post","put","patch","common"],Z=>{delete m[Z]}),c.headers=ro.concat(y,m);const w=[];let S=!0;this.interceptors.request.forEach(function(Z){typeof Z.runWhen=="function"&&Z.runWhen(c)===!1||(S=S&&Z.synchronous,w.unshift(Z.fulfilled,Z.rejected))});const N=[];this.interceptors.response.forEach(function(Z){N.push(Z.fulfilled,Z.rejected)});let P,_=0,T;if(!S){const Z=[C2.bind(this),void 0];for(Z.unshift.apply(Z,w),Z.push.apply(Z,N),T=Z.length,P=Promise.resolve(c);_<T;)P=P.then(Z[_++],Z[_++]);return P}T=w.length;let Q=c;for(_=0;_<T;){const Z=w[_++],z=w[_++];try{Q=Z(Q)}catch(G){z.call(this,G);break}}try{P=C2.call(this,Q)}catch(Z){return Promise.reject(Z)}for(_=0,T=N.length;_<T;)P=P.then(N[_++],N[_++]);return P}getUri(s){s=ma(this.defaults,s);const c=m2(s.baseURL,s.url);return a2(c,s.params,s.paramsSerializer)}}pe.forEach(["delete","get","head","options"],function(i){ga.prototype[i]=function(s,c){return this.request(ma(c||{},{method:i,url:s,data:(c||{}).data}))}}),pe.forEach(["post","put","patch"],function(i){function s(c){return function(d,p,m){return this.request(ma(m||{},{method:i,headers:c?{"Content-Type":"multipart/form-data"}:{},url:d,data:p}))}}ga.prototype[i]=s(),ga.prototype[i+"Form"]=s(!0)});class eO{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let c;this.promise=new Promise(function(p){c=p});const d=this;this.promise.then(p=>{if(!d._listeners)return;let m=d._listeners.length;for(;m-- >0;)d._listeners[m](p);d._listeners=null}),this.promise.then=p=>{let m;const y=new Promise(w=>{d.subscribe(w),m=w}).then(p);return y.cancel=function(){d.unsubscribe(m)},y},s(function(p,m,y){d.reason||(d.reason=new Ds(p,m,y),c(d.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const c=this._listeners.indexOf(s);c!==-1&&this._listeners.splice(c,1)}toAbortSignal(){const s=new AbortController,c=d=>{s.abort(d)};return this.subscribe(c),s.signal.unsubscribe=()=>this.unsubscribe(c),s.signal}static source(){let s;return{token:new eO(function(c){s=c}),cancel:s}}}function AZ(i){return function(s){return i.apply(null,s)}}function MZ(i){return pe.isObject(i)&&i.isAxiosError===!0}const tO={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(tO).forEach(([i,s])=>{tO[s]=i});function _2(i){const s=new ga(i),c=g(ga.prototype.request,s);return pe.extend(c,ga.prototype,s,{allOwnKeys:!0}),pe.extend(c,s,null,{allOwnKeys:!0}),c.create=function(d){return _2(ma(i,d))},c}const Gt=_2(Sc);Gt.Axios=ga,Gt.CanceledError=Ds,Gt.CancelToken=eO,Gt.isCancel=d2,Gt.VERSION=k2,Gt.toFormData=lf,Gt.AxiosError=at,Gt.Cancel=Gt.CanceledError,Gt.all=function(i){return Promise.all(i)},Gt.spread=AZ,Gt.isAxiosError=MZ,Gt.mergeConfig=ma,Gt.AxiosHeaders=ro,Gt.formToJSON=i=>c2(pe.isHTMLForm(i)?new FormData(i):i),Gt.getAdapter=S2.getAdapter,Gt.HttpStatusCode=tO,Gt.default=Gt;function kc(i){"@babel/helpers - typeof";return kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},kc(i)}function RZ(i,s){if(kc(i)!="object"||!i)return i;var c=i[Symbol.toPrimitive];if(c!==void 0){var d=c.call(i,s||"default");if(kc(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(i)}function IZ(i){var s=RZ(i,"string");return kc(s)=="symbol"?s:s+""}function QZ(i,s,c){return(s=IZ(s))in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}function E2(i,s){var c=Object.keys(i);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(i);s&&(d=d.filter(function(p){return Object.getOwnPropertyDescriptor(i,p).enumerable})),c.push.apply(c,d)}return c}function Je(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?arguments[s]:{};s%2?E2(Object(c),!0).forEach(function(d){QZ(i,d,c[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(c)):E2(Object(c)).forEach(function(d){Object.defineProperty(i,d,Object.getOwnPropertyDescriptor(c,d))})}return i}function ee(){return ee=Object.assign?Object.assign.bind():function(i){for(var s=1;s<arguments.length;s++){var c=arguments[s];for(var d in c)({}).hasOwnProperty.call(c,d)&&(i[d]=c[d])}return i},ee.apply(null,arguments)}const DZ=Array.isArray,BZ=i=>typeof i=="string",LZ=i=>i!==null&&typeof i=="object";function Bs(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2?arguments[2]:void 0;return typeof i=="function"?i(s):i??c}function VZ(i){let s;const c=new Promise(p=>{s=i(()=>{p(!0)})}),d=()=>{s?.()};return d.then=(p,m)=>c.then(p,m),d.promise=c,d}function jt(){const i=[];for(let s=0;s<arguments.length;s++){const c=s<0||arguments.length<=s?void 0:arguments[s];if(c){if(BZ(c))i.push(c);else if(DZ(c))for(let d=0;d<c.length;d++){const p=jt(c[d]);p&&i.push(p)}else if(LZ(c))for(const d in c)c[d]&&i.push(d)}}return i.join(" ")}const jZ=i=>i!=null&&i!=="",Pc=(i,s)=>{const c=ee({},i);return Object.keys(s).forEach(d=>{const p=c[d];if(p)p.type||p.default?p.default=s[d]:p.def?p.def(s[d]):c[d]={type:p,default:s[d]};else throw new Error(`not have ${d} prop`)}),c},FZ=Symbol("skipFlatten"),_c=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const c=Array.isArray(i)?i:[i],d=[];return c.forEach(p=>{Array.isArray(p)?d.push(..._c(p,s)):p&&p.type===o.Fragment?p.key===FZ?d.push(p):d.push(..._c(p.children,s)):p&&o.isVNode(p)?s&&!T2(p)?d.push(p):s||d.push(p):jZ(p)&&d.push(p)}),d},hf=i=>{var s;let c=((s=i?.vnode)===null||s===void 0?void 0:s.el)||i&&(i.$el||i);for(;c&&!c.tagName;)c=c.nextSibling;return c};function T2(i){return i&&(i.type===o.Comment||i.type===o.Fragment&&i.children.length===0||i.type===o.Text&&i.children.trim()==="")}function N2(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const s=[];return i.forEach(c=>{Array.isArray(c)?s.push(...c):c?.type===o.Fragment?s.push(...N2(c.children)):s.push(c)}),s.filter(c=>!T2(c))}let A2=i=>setTimeout(i,16),M2=i=>clearTimeout(i);typeof window<"u"&&"requestAnimationFrame"in window&&(A2=i=>window.requestAnimationFrame(i),M2=i=>window.cancelAnimationFrame(i));let R2=0;const nO=new Map;function I2(i){nO.delete(i)}function Ec(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;R2+=1;const c=R2;function d(p){if(p===0)I2(c),i();else{const m=A2(()=>{d(p-1)});nO.set(c,m)}}return d(s),c}Ec.cancel=i=>{const s=nO.get(i);return I2(s),M2(s)};const pf=function(){for(var i=arguments.length,s=new Array(i),c=0;c<i;c++)s[c]=arguments[c];return s},oO=i=>{const s=i;return s.install=function(c){c.component(s.displayName||s.name,i)},i};function Q2(){return{type:[Function,Array]}}function on(i){return{type:Object,default:i}}function Ls(i){return{type:Boolean,default:i}}function iO(i,s){return{validator:()=>!0,default:i}}function D2(i){return{type:Array,default:i}}function B2(i){return{type:String,default:i}}function ZZ(i,s){return i?{type:i,default:s}:iO(s)}function WZ(i,s,c,d){if(i&&i.addEventListener){let p=d;i.addEventListener(s,c,p)}return{remove:()=>{i&&i.removeEventListener&&i.removeEventListener(s,c)}}}const rO="anticon",zZ=Symbol("GlobalFormContextKey"),UZ=i=>{o.provide(zZ,i)},HZ=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:on(),input:on(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:on(),pageHeader:on(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:on(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:on(),pagination:on(),theme:on(),select:on(),wave:on()}),aO=Symbol("configProvider"),L2={getPrefixCls:(i,s)=>s||(i?`ant-${i}`:"ant"),iconPrefixCls:o.computed(()=>rO),getPopupContainer:o.computed(()=>()=>document.body),direction:o.computed(()=>"ltr")},mf=()=>o.inject(aO,L2),YZ=i=>o.provide(aO,i),V2=Symbol("DisabledContextKey"),sO=()=>o.inject(V2,o.ref(void 0)),XZ=i=>{const s=sO();return o.provide(V2,o.computed(()=>{var c;return(c=i.value)!==null&&c!==void 0?c:s.value})),i},GZ={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},KZ={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},j2={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},F2={lang:ee({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},KZ),timePickerLocale:ee({},j2)},yo="${label} is not a valid ${type}",Or={locale:"en",Pagination:GZ,DatePicker:F2,TimePicker:j2,Calendar:F2,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:yo,method:yo,array:yo,object:yo,number:yo,date:yo,boolean:yo,integer:yo,float:yo,regexp:yo,email:yo,url:yo,hex:yo},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},Z2=o.defineComponent({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(i,s){let{slots:c}=s;const d=o.inject("localeData",{}),p=o.computed(()=>{const{componentName:y="global",defaultLocale:w}=i,S=w||Or[y||"global"],{antLocale:N}=d,P=y&&N?N[y]:{};return ee(ee({},typeof S=="function"?S():S),P||{})}),m=o.computed(()=>{const{antLocale:y}=d,w=y&&y.locale;return y&&y.exist&&!w?Or.locale:w});return()=>{const y=i.children||c.default,{antLocale:w}=d;return y?.(p.value,m.value,w)}}});function lO(i,s,c){const d=o.inject("localeData",{});return[o.computed(()=>{const{antLocale:p}=d,m=o.unref(s)||Or[i],y=p?p[i]:{};return ee(ee(ee({},typeof m=="function"?m():m),y||{}),o.unref(c)||{})})]}function cO(i){for(var s=0,c,d=0,p=i.length;p>=4;++d,p-=4)c=i.charCodeAt(d)&255|(i.charCodeAt(++d)&255)<<8|(i.charCodeAt(++d)&255)<<16|(i.charCodeAt(++d)&255)<<24,c=(c&65535)*1540483477+((c>>>16)*59797<<16),c^=c>>>24,s=(c&65535)*1540483477+((c>>>16)*59797<<16)^(s&65535)*1540483477+((s>>>16)*59797<<16);switch(p){case 3:s^=(i.charCodeAt(d+2)&255)<<16;case 2:s^=(i.charCodeAt(d+1)&255)<<8;case 1:s^=i.charCodeAt(d)&255,s=(s&65535)*1540483477+((s>>>16)*59797<<16)}return s^=s>>>13,s=(s&65535)*1540483477+((s>>>16)*59797<<16),((s^s>>>15)>>>0).toString(36)}const W2="%";class JZ{constructor(s){this.cache=new Map,this.instanceId=s}get(s){return this.cache.get(Array.isArray(s)?s.join(W2):s)||null}update(s,c){const d=Array.isArray(s)?s.join(W2):s,p=this.cache.get(d),m=c(p);m===null?this.cache.delete(d):this.cache.set(d,m)}}const z2="data-token-hash",Oa="data-css-hash",$Z="data-cache-path",Vs="__cssinjs_instance__";function Tc(){const i=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const s=document.body.querySelectorAll(`style[${Oa}]`)||[],{firstChild:c}=document.head;Array.from(s).forEach(p=>{p[Vs]=p[Vs]||i,p[Vs]===i&&document.head.insertBefore(p,c)});const d={};Array.from(document.querySelectorAll(`style[${Oa}]`)).forEach(p=>{var m;const y=p.getAttribute(Oa);d[y]?p[Vs]===i&&((m=p.parentNode)===null||m===void 0||m.removeChild(p)):d[y]=!0})}return new JZ(i)}const U2=Symbol("StyleContextKey"),qZ=()=>{var i,s,c;const d=o.getCurrentInstance();let p;if(d&&d.appContext){const m=(c=(s=(i=d.appContext)===null||i===void 0?void 0:i.config)===null||s===void 0?void 0:s.globalProperties)===null||c===void 0?void 0:c.__ANTDV_CSSINJS_CACHE__;m?p=m:(p=Tc(),d.appContext.config.globalProperties&&(d.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=p))}else p=Tc();return p},H2={cache:Tc(),defaultCache:!0,hashPriority:"low"},gf=()=>{const i=qZ();return o.inject(U2,o.shallowRef(ee(ee({},H2),{cache:i})))},eW=i=>{const s=gf(),c=o.shallowRef(ee(ee({},H2),{cache:Tc()}));return o.watch([()=>o.unref(i),s],()=>{const d=ee({},s.value),p=o.unref(i);Object.keys(p).forEach(y=>{const w=p[y];p[y]!==void 0&&(d[y]=w)});const{cache:m}=p;d.cache=d.cache||Tc(),d.defaultCache=!m&&s.value.defaultCache,c.value=d},{immediate:!0}),o.provide(U2,c),c},tW=()=>({autoClear:Ls(),mock:B2(),cache:on(),defaultCache:Ls(),hashPriority:B2(),container:ZZ(),ssrInline:Ls(),transformers:D2(),linters:D2()});oO(o.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:tW(),setup(i,s){let{slots:c}=s;return eW(i),()=>{var d;return(d=c.default)===null||d===void 0?void 0:d.call(c)}}}));function nW(){return!1}let uO=!1;function oW(){return uO}const iW=process.env.NODE_ENV==="production"?nW:oW;if(process.env.NODE_ENV!=="production"&&n&&n.hot&&typeof window<"u"){const i=window;if(typeof i.webpackHotUpdate=="function"){const s=i.webpackHotUpdate;i.webpackHotUpdate=function(){return uO=!0,setTimeout(()=>{uO=!1},0),s(...arguments)}}}function Y2(i,s,c,d){const p=gf(),m=o.shallowRef(""),y=o.shallowRef();o.watchEffect(()=>{m.value=[i,...s.value].join("%")});const w=iW(),S=N=>{p.value.cache.update(N,P=>{const[_=0,T]=P||[];return _-1===0?(d?.(T,!1),null):[_-1,T]})};return o.watch(m,(N,P)=>{P&&S(P),p.value.cache.update(N,_=>{const[T=0,Q]=_||[];let Z=Q;process.env.NODE_ENV!=="production"&&Q&&w&&(d?.(Z,w),Z=null);const z=Z||c();return[T+1,z]}),y.value=p.value.cache.get(m.value)[1]},{immediate:!0}),o.onBeforeUnmount(()=>{S(m.value)}),y}function Ho(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function X2(i,s){return i&&i.contains?i.contains(s):!1}const G2="data-vc-order",rW="vc-util-key",dO=new Map;function K2(){let{mark:i}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i?i.startsWith("data-")?i:`data-${i}`:rW}function Of(i){return i.attachTo?i.attachTo:document.querySelector("head")||document.body}function aW(i){return i==="queue"?"prependQueue":i?"prepend":"append"}function J2(i){return Array.from((dO.get(i)||i).children).filter(s=>s.tagName==="STYLE")}function $2(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Ho())return null;const{csp:c,prepend:d}=s,p=document.createElement("style");p.setAttribute(G2,aW(d)),c?.nonce&&(p.nonce=c?.nonce),p.innerHTML=i;const m=Of(s),{firstChild:y}=m;if(d){if(d==="queue"){const w=J2(m).filter(S=>["prepend","prependQueue"].includes(S.getAttribute(G2)));if(w.length)return m.insertBefore(p,w[w.length-1].nextSibling),p}m.insertBefore(p,y)}else m.appendChild(p);return p}function q2(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const c=Of(s);return J2(c).find(d=>d.getAttribute(K2(s))===i)}function vf(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const c=q2(i,s);c&&Of(s).removeChild(c)}function sW(i,s){const c=dO.get(i);if(!c||!X2(document,c)){const d=$2("",s),{parentNode:p}=d;dO.set(i,p),i.removeChild(d)}}function Nc(i,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var d,p,m;const y=Of(c);sW(y,c);const w=q2(s,c);if(w)return!((d=c.csp)===null||d===void 0)&&d.nonce&&w.nonce!==((p=c.csp)===null||p===void 0?void 0:p.nonce)&&(w.nonce=(m=c.csp)===null||m===void 0?void 0:m.nonce),w.innerHTML!==i&&(w.innerHTML=i),w;const S=$2(i,c);return S.setAttribute(K2(c),s),S}function lW(i,s){if(i.length!==s.length)return!1;for(let c=0;c<i.length;c++)if(i[c]!==s[c])return!1;return!0}class js{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(s){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d={map:this.cache};return s.forEach(p=>{var m;d?d=(m=d?.map)===null||m===void 0?void 0:m.get(p):d=void 0}),d?.value&&c&&(d.value[1]=this.cacheCallTimes++),d?.value}get(s){var c;return(c=this.internalGet(s,!0))===null||c===void 0?void 0:c[0]}has(s){return!!this.internalGet(s)}set(s,c){if(!this.has(s)){if(this.size()+1>js.MAX_CACHE_SIZE+js.MAX_CACHE_OFFSET){const[p]=this.keys.reduce((m,y)=>{const[,w]=m;return this.internalGet(y)[1]<w?[y,this.internalGet(y)[1]]:m},[this.keys[0],this.cacheCallTimes]);this.delete(p)}this.keys.push(s)}let d=this.cache;s.forEach((p,m)=>{if(m===s.length-1)d.set(p,{value:[c,this.cacheCallTimes++]});else{const y=d.get(p);y?y.map||(y.map=new Map):d.set(p,{map:new Map}),d=d.get(p).map}})}deleteByPath(s,c){var d;const p=s.get(c[0]);if(c.length===1)return p.map?s.set(c[0],{map:p.map}):s.delete(c[0]),(d=p.value)===null||d===void 0?void 0:d[0];const m=this.deleteByPath(p.map,c.slice(1));return(!p.map||p.map.size===0)&&!p.value&&s.delete(c[0]),m}delete(s){if(this.has(s))return this.keys=this.keys.filter(c=>!lW(c,s)),this.deleteByPath(this.cache,s)}}js.MAX_CACHE_SIZE=20,js.MAX_CACHE_OFFSET=5;let fO={};function cW(i,s){process.env.NODE_ENV!=="production"&&!i&&console!==void 0&&console.error(`Warning: ${s}`)}function uW(){fO={}}function dW(i,s,c){!s&&!fO[c]&&(i(!1,c),fO[c]=!0)}function hO(i,s){dW(cW,i,s)}function fW(){}let Fs=fW;process.env.NODE_ENV!=="production"&&(Fs=(i,s,c)=>{hO(i,`[ant-design-vue: ${s}] ${c}`),process.env.NODE_ENV==="test"&&uW()});let eP=0;class tP{constructor(s){this.derivatives=Array.isArray(s)?s:[s],this.id=eP,s.length===0&&Fs(s.length>0,"[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."),eP+=1}getDerivativeToken(s){return this.derivatives.reduce((c,d)=>d(s,c),void 0)}}const pO=new js;function nP(i){const s=Array.isArray(i)?i:[i];return pO.has(s)||pO.set(s,new tP(s)),pO.get(s)}const oP=new WeakMap;function yf(i){let s=oP.get(i)||"";return s||(Object.keys(i).forEach(c=>{const d=i[c];s+=c,d instanceof tP?s+=d.id:d&&typeof d=="object"?s+=yf(d):s+=d}),oP.set(i,s)),s}function hW(i,s){return cO(`${s}_${yf(i)}`)}const Ac=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),iP="_bAmBoO_";function pW(i,s,c){var d,p;if(Ho()){Nc(i,Ac);const m=document.createElement("div");m.style.position="fixed",m.style.left="0",m.style.top="0",s?.(m),document.body.appendChild(m),process.env.NODE_ENV!=="production"&&(m.innerHTML="Test",m.style.zIndex="9999999");const y=c?c(m):(d=getComputedStyle(m).content)===null||d===void 0?void 0:d.includes(iP);return(p=m.parentNode)===null||p===void 0||p.removeChild(m),vf(Ac),y}return!1}let mO;function mW(){return mO===void 0&&(mO=pW(`@layer ${Ac} { .${Ac} { content: "${iP}"!important; } }`,i=>{i.className=Ac})),mO}const rP={},gW=process.env.NODE_ENV==="production",OW=process.env.NODE_ENV==="prerender",vW=!gW&&!OW?"css-dev-only-do-not-override":"css",va=new Map;function yW(i){va.set(i,(va.get(i)||0)+1)}function bW(i,s){typeof document<"u"&&document.querySelectorAll(`style[${z2}="${i}"]`).forEach(c=>{var d;c[Vs]===s&&((d=c.parentNode)===null||d===void 0||d.removeChild(c))})}const xW=0;function wW(i,s){va.set(i,(va.get(i)||0)-1);const c=Array.from(va.keys()),d=c.filter(p=>(va.get(p)||0)<=0);c.length-d.length>xW&&d.forEach(p=>{bW(p,s),va.delete(p)})}const SW=(i,s,c,d)=>{const p=c.getDerivativeToken(i);let m=ee(ee({},p),s);return d&&(m=d(m)),m};function CW(i,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o.ref({});const d=gf(),p=o.computed(()=>ee({},...s.value)),m=o.computed(()=>yf(p.value)),y=o.computed(()=>yf(c.value.override||rP));return Y2("token",o.computed(()=>[c.value.salt||"",i.value.id,m.value,y.value]),()=>{const{salt:w="",override:S=rP,formatToken:N,getComputedToken:P}=c.value,_=P?P(p.value,S,i.value):SW(p.value,S,i.value,N),T=hW(_,w);_._tokenKey=T,yW(T);const Q=`${vW}-${cO(T)}`;return _._hashId=Q,[_,Q]},w=>{var S;wW(w[0]._tokenKey,(S=d.value)===null||S===void 0?void 0:S.cache.instanceId)})}var kW={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},aP="comm",sP="rule",lP="decl",PW="@import",_W="@keyframes",EW="@layer",cP=Math.abs,gO=String.fromCharCode;function uP(i){return i.trim()}function bf(i,s,c){return i.replace(s,c)}function TW(i,s,c){return i.indexOf(s,c)}function Mc(i,s){return i.charCodeAt(s)|0}function Zs(i,s,c){return i.slice(s,c)}function xi(i){return i.length}function NW(i){return i.length}function xf(i,s){return s.push(i),i}var wf=1,Ws=1,dP=0,Qo=0,rn=0,zs="";function OO(i,s,c,d,p,m,y,w){return{value:i,root:s,parent:c,type:d,props:p,children:m,line:wf,column:Ws,length:y,return:"",siblings:w}}function AW(){return rn}function MW(){return rn=Qo>0?Mc(zs,--Qo):0,Ws--,rn===10&&(Ws=1,wf--),rn}function Yo(){return rn=Qo<dP?Mc(zs,Qo++):0,Ws++,rn===10&&(Ws=1,wf++),rn}function vr(){return Mc(zs,Qo)}function Sf(){return Qo}function Cf(i,s){return Zs(zs,i,s)}function Rc(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function RW(i){return wf=Ws=1,dP=xi(zs=i),Qo=0,[]}function IW(i){return zs="",i}function vO(i){return uP(Cf(Qo-1,yO(i===91?i+2:i===40?i+1:i)))}function QW(i){for(;(rn=vr())&&rn<33;)Yo();return Rc(i)>2||Rc(rn)>3?"":" "}function DW(i,s){for(;--s&&Yo()&&!(rn<48||rn>102||rn>57&&rn<65||rn>70&&rn<97););return Cf(i,Sf()+(s<6&&vr()==32&&Yo()==32))}function yO(i){for(;Yo();)switch(rn){case i:return Qo;case 34:case 39:i!==34&&i!==39&&yO(rn);break;case 40:i===41&&yO(i);break;case 92:Yo();break}return Qo}function BW(i,s){for(;Yo()&&i+rn!==57&&!(i+rn===84&&vr()===47););return"/*"+Cf(s,Qo-1)+"*"+gO(i===47?i:Yo())}function LW(i){for(;!Rc(vr());)Yo();return Cf(i,Qo)}function VW(i){return IW(kf("",null,null,null,[""],i=RW(i),0,[0],i))}function kf(i,s,c,d,p,m,y,w,S){for(var N=0,P=0,_=y,T=0,Q=0,Z=0,z=1,G=1,te=1,$=0,H="",X=p,re=m,oe=d,U=H;G;)switch(Z=$,$=Yo()){case 40:if(Z!=108&&Mc(U,_-1)==58){TW(U+=bf(vO($),"&","&\f"),"&\f",cP(N?w[N-1]:0))!=-1&&(te=-1);break}case 34:case 39:case 91:U+=vO($);break;case 9:case 10:case 13:case 32:U+=QW(Z);break;case 92:U+=DW(Sf()-1,7);continue;case 47:switch(vr()){case 42:case 47:xf(jW(BW(Yo(),Sf()),s,c,S),S),(Rc(Z||1)==5||Rc(vr()||1)==5)&&xi(U)&&Zs(U,-1,void 0)!==" "&&(U+=" ");break;default:U+="/"}break;case 123*z:w[N++]=xi(U)*te;case 125*z:case 59:case 0:switch($){case 0:case 125:G=0;case 59+P:te==-1&&(U=bf(U,/\f/g,"")),Q>0&&(xi(U)-_||z===0&&Z===47)&&xf(Q>32?hP(U+";",d,c,_-1,S):hP(bf(U," ","")+";",d,c,_-2,S),S);break;case 59:U+=";";default:if(xf(oe=fP(U,s,c,N,P,p,w,H,X=[],re=[],_,m),m),$===123)if(P===0)kf(U,s,oe,oe,X,m,_,w,re);else switch(T===99&&Mc(U,3)===110?100:T){case 100:case 108:case 109:case 115:kf(i,oe,oe,d&&xf(fP(i,oe,oe,0,0,p,w,H,p,X=[],_,re),re),p,re,_,w,d?X:re);break;default:kf(U,oe,oe,oe,[""],re,0,w,re)}}N=P=Q=0,z=te=1,H=U="",_=y;break;case 58:_=1+xi(U),Q=Z;default:if(z<1){if($==123)--z;else if($==125&&z++==0&&MW()==125)continue}switch(U+=gO($),$*z){case 38:te=P>0?1:(U+="\f",-1);break;case 44:w[N++]=(xi(U)-1)*te,te=1;break;case 64:vr()===45&&(U+=vO(Yo())),T=vr(),P=_=xi(H=U+=LW(Sf())),$++;break;case 45:Z===45&&xi(U)==2&&(z=0)}}return m}function fP(i,s,c,d,p,m,y,w,S,N,P,_){for(var T=p-1,Q=p===0?m:[""],Z=NW(Q),z=0,G=0,te=0;z<d;++z)for(var $=0,H=Zs(i,T+1,T=cP(G=y[z])),X=i;$<Z;++$)(X=uP(G>0?Q[$]+" "+H:bf(H,/&\f/g,Q[$])))&&(S[te++]=X);return OO(i,s,c,p===0?sP:w,S,N,P,_)}function jW(i,s,c,d){return OO(i,s,c,aP,gO(AW()),Zs(i,2,-2),0,d)}function hP(i,s,c,d,p){return OO(i,s,c,lP,Zs(i,0,d),Zs(i,d+1,-1),d,p)}function bO(i,s){for(var c="",d=0;d<i.length;d++)c+=s(i[d],d,i,s)||"";return c}function FW(i,s,c,d){switch(i.type){case EW:if(i.children.length)break;case PW:case lP:return i.return=i.return||i.value;case aP:return"";case _W:return i.return=i.value+"{"+bO(i.children,d)+"}";case sP:if(!xi(i.value=i.props.join(",")))return""}return xi(c=bO(i.children,d))?i.return=i.value+"{"+c+"}":""}function pP(i,s){const{path:c,parentSelectors:d}=s;hO(!1,`[Ant Design Vue CSS-in-JS] ${c?`Error in '${c}': `:""}${i}${d.length?` Selector info: ${d.join(" -> ")}`:""}`)}const ZW=(i,s,c)=>{if(i==="content"){const d=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof s!="string"||["normal","none","initial","inherit","unset"].indexOf(s)===-1&&!d.test(s)&&(s.charAt(0)!==s.charAt(s.length-1)||s.charAt(0)!=='"'&&s.charAt(0)!=="'"))&&pP(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${s}"'\`.`,c)}},WW=(i,s,c)=>{i==="animation"&&c.hashId&&s!=="none"&&pP(`You seem to be using hashed animation '${s}', in which case 'animationName' with Keyframe as value is recommended.`,c)},mP="data-ant-cssinjs-cache-path",zW="_FILE_STYLE__";let ya,gP=!0;function UW(){var i;if(!ya&&(ya={},Ho())){const s=document.createElement("div");s.className=mP,s.style.position="fixed",s.style.visibility="hidden",s.style.top="-9999px",document.body.appendChild(s);let c=getComputedStyle(s).content||"";c=c.replace(/^"/,"").replace(/"$/,""),c.split(";").forEach(p=>{const[m,y]=p.split(":");ya[m]=y});const d=document.querySelector(`style[${mP}]`);d&&(gP=!1,(i=d.parentNode)===null||i===void 0||i.removeChild(d)),document.body.removeChild(s)}}function HW(i){return UW(),!!ya[i]}function YW(i){const s=ya[i];let c=null;if(s&&Ho())if(gP)c=zW;else{const d=document.querySelector(`style[${Oa}="${ya[i]}"]`);d?c=d.innerHTML:delete ya[i]}return[c,s]}const OP=Ho(),vP="_skip_check_",yP="_multi_value_";function bP(i){return bO(VW(i),FW).replace(/\{%%%\:[^;];}/g,";")}function XW(i){return typeof i=="object"&&i&&(vP in i||yP in i)}function GW(i,s,c){if(!s)return i;const d=`.${s}`,p=c==="low"?`:where(${d})`:d;return i.split(",").map(m=>{var y;const w=m.trim().split(/\s+/);let S=w[0]||"";const N=((y=S.match(/^\w+/))===null||y===void 0?void 0:y[0])||"";return S=`${N}${p}${S.slice(N.length)}`,[S,...w.slice(1)].join(" ")}).join(",")}const xP=new Set;process.env.NODE_ENV;const xO=function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:c,injectHash:d,parentSelectors:p}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:m,layer:y,path:w,hashPriority:S,transformers:N=[],linters:P=[]}=s;let _="",T={};function Q(z){const G=z.getName(m);if(!T[G]){const[te]=xO(z.style,s,{root:!1,parentSelectors:p});T[G]=`@keyframes ${z.getName(m)}${te}`}}function Z(z){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return z.forEach(te=>{Array.isArray(te)?Z(te,G):te&&G.push(te)}),G}if(Z(Array.isArray(i)?i:[i]).forEach(z=>{const G=typeof z=="string"&&!c?{}:z;if(typeof G=="string")_+=`${G}
|
|
7
|
-
`;else if(G._keyframe)Q(G);else{const te=N.reduce(($,H)=>{var X;return((X=H?.visit)===null||X===void 0?void 0:X.call(H,$))||$},G);Object.keys(te).forEach($=>{var H;const X=te[$];if(typeof X=="object"&&X&&($!=="animationName"||!X._keyframe)&&!XW(X)){let re=!1,oe=$.trim(),U=!1;(c||d)&&m?oe.startsWith("@")?re=!0:oe=GW($,m,S):c&&!m&&(oe==="&"||oe==="")&&(oe="",U=!0);const[ce,he]=xO(X,s,{root:U,injectHash:re,parentSelectors:[...p,oe]});T=ee(ee({},T),he),_+=`${oe}${ce}`}else{let re=function(U,ce){process.env.NODE_ENV!=="production"&&(typeof X!="object"||!X?.[vP])&&[ZW,WW,...P].forEach(ke=>ke(U,ce,{path:w,hashId:m,parentSelectors:p}));const he=U.replace(/[A-Z]/g,ke=>`-${ke.toLowerCase()}`);let Qe=ce;!kW[U]&&typeof Qe=="number"&&Qe!==0&&(Qe=`${Qe}px`),U==="animationName"&&ce?._keyframe&&(Q(ce),Qe=ce.getName(m)),_+=`${he}:${Qe};`};const oe=(H=X?.value)!==null&&H!==void 0?H:X;typeof X=="object"&&X?.[yP]&&Array.isArray(oe)?oe.forEach(U=>{re($,U)}):re($,oe)}})}}),!c)_=`{${_}}`;else if(y&&mW()){const z=y.split(",");_=`@layer ${z[z.length-1].trim()} {${_}}`,z.length>1&&(_=`@layer ${y}{%%%:%}${_}`)}return[_,T]};function KW(i,s){return cO(`${i.join("%")}${s}`)}function wO(i,s){const c=gf(),d=o.computed(()=>i.value.token._tokenKey),p=o.computed(()=>[d.value,...i.value.path]);let m=OP;return process.env.NODE_ENV!=="production"&&c.value.mock!==void 0&&(m=c.value.mock==="client"),Y2("style",p,()=>{const{path:y,hashId:w,layer:S,nonce:N,clientOnly:P,order:_=0}=i.value,T=p.value.join("|");if(HW(T)){const[U,ce]=YW(T);if(U)return[U,d.value,ce,{},P,_]}const Q=s(),{hashPriority:Z,container:z,transformers:G,linters:te,cache:$}=c.value,[H,X]=xO(Q,{hashId:w,hashPriority:Z,layer:S,path:y.join("-"),transformers:G,linters:te}),re=bP(H),oe=KW(p.value,re);if(m){const U={mark:Oa,prepend:"queue",attachTo:z,priority:_},ce=typeof N=="function"?N():N;ce&&(U.csp={nonce:ce});const he=Nc(re,oe,U);he[Vs]=$.instanceId,he.setAttribute(z2,d.value),process.env.NODE_ENV!=="production"&&he.setAttribute($Z,p.value.join("|")),Object.keys(X).forEach(Qe=>{xP.has(Qe)||(xP.add(Qe),Nc(bP(X[Qe]),`_effect-${Qe}`,{mark:Oa,prepend:"queue",attachTo:z}))})}return[re,d.value,oe,X,P,_]},(y,w)=>{let[,,S]=y;(w||c.value.autoClear)&&OP&&vf(S,{mark:Oa})}),y=>y}class Kt{constructor(s,c){this._keyframe=!0,this.name=s,this.style=c}getName(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return s?`${s}-${this.name}`:this.name}}const JW="4.2.3";function Nn(i,s){$W(i)&&(i="100%");var c=qW(i);return i=s===360?i:Math.min(s,Math.max(0,parseFloat(i))),c&&(i=parseInt(String(i*s),10)/100),Math.abs(i-s)<1e-6?1:(s===360?i=(i<0?i%s+s:i%s)/parseFloat(String(s)):i=i%s/parseFloat(String(s)),i)}function Pf(i){return Math.min(1,Math.max(0,i))}function $W(i){return typeof i=="string"&&i.indexOf(".")!==-1&&parseFloat(i)===1}function qW(i){return typeof i=="string"&&i.indexOf("%")!==-1}function wP(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function _f(i){return i<=1?"".concat(Number(i)*100,"%"):i}function ba(i){return i.length===1?"0"+i:String(i)}function ez(i,s,c){return{r:Nn(i,255)*255,g:Nn(s,255)*255,b:Nn(c,255)*255}}function SP(i,s,c){i=Nn(i,255),s=Nn(s,255),c=Nn(c,255);var d=Math.max(i,s,c),p=Math.min(i,s,c),m=0,y=0,w=(d+p)/2;if(d===p)y=0,m=0;else{var S=d-p;switch(y=w>.5?S/(2-d-p):S/(d+p),d){case i:m=(s-c)/S+(s<c?6:0);break;case s:m=(c-i)/S+2;break;case c:m=(i-s)/S+4;break}m/=6}return{h:m,s:y,l:w}}function SO(i,s,c){return c<0&&(c+=1),c>1&&(c-=1),c<1/6?i+(s-i)*(6*c):c<1/2?s:c<2/3?i+(s-i)*(2/3-c)*6:i}function tz(i,s,c){var d,p,m;if(i=Nn(i,360),s=Nn(s,100),c=Nn(c,100),s===0)p=c,m=c,d=c;else{var y=c<.5?c*(1+s):c+s-c*s,w=2*c-y;d=SO(w,y,i+1/3),p=SO(w,y,i),m=SO(w,y,i-1/3)}return{r:d*255,g:p*255,b:m*255}}function CO(i,s,c){i=Nn(i,255),s=Nn(s,255),c=Nn(c,255);var d=Math.max(i,s,c),p=Math.min(i,s,c),m=0,y=d,w=d-p,S=d===0?0:w/d;if(d===p)m=0;else{switch(d){case i:m=(s-c)/w+(s<c?6:0);break;case s:m=(c-i)/w+2;break;case c:m=(i-s)/w+4;break}m/=6}return{h:m,s:S,v:y}}function nz(i,s,c){i=Nn(i,360)*6,s=Nn(s,100),c=Nn(c,100);var d=Math.floor(i),p=i-d,m=c*(1-s),y=c*(1-p*s),w=c*(1-(1-p)*s),S=d%6,N=[c,y,m,m,w,c][S],P=[w,c,c,y,m,m][S],_=[m,m,w,c,c,y][S];return{r:N*255,g:P*255,b:_*255}}function kO(i,s,c,d){var p=[ba(Math.round(i).toString(16)),ba(Math.round(s).toString(16)),ba(Math.round(c).toString(16))];return d&&p[0].startsWith(p[0].charAt(1))&&p[1].startsWith(p[1].charAt(1))&&p[2].startsWith(p[2].charAt(1))?p[0].charAt(0)+p[1].charAt(0)+p[2].charAt(0):p.join("")}function oz(i,s,c,d,p){var m=[ba(Math.round(i).toString(16)),ba(Math.round(s).toString(16)),ba(Math.round(c).toString(16)),ba(iz(d))];return p&&m[0].startsWith(m[0].charAt(1))&&m[1].startsWith(m[1].charAt(1))&&m[2].startsWith(m[2].charAt(1))&&m[3].startsWith(m[3].charAt(1))?m[0].charAt(0)+m[1].charAt(0)+m[2].charAt(0)+m[3].charAt(0):m.join("")}function iz(i){return Math.round(parseFloat(i)*255).toString(16)}function CP(i){return bo(i)/255}function bo(i){return parseInt(i,16)}function rz(i){return{r:i>>16,g:(i&65280)>>8,b:i&255}}var PO={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Us(i){var s={r:0,g:0,b:0},c=1,d=null,p=null,m=null,y=!1,w=!1;return typeof i=="string"&&(i=lz(i)),typeof i=="object"&&(Li(i.r)&&Li(i.g)&&Li(i.b)?(s=ez(i.r,i.g,i.b),y=!0,w=String(i.r).substr(-1)==="%"?"prgb":"rgb"):Li(i.h)&&Li(i.s)&&Li(i.v)?(d=_f(i.s),p=_f(i.v),s=nz(i.h,d,p),y=!0,w="hsv"):Li(i.h)&&Li(i.s)&&Li(i.l)&&(d=_f(i.s),m=_f(i.l),s=tz(i.h,d,m),y=!0,w="hsl"),Object.prototype.hasOwnProperty.call(i,"a")&&(c=i.a)),c=wP(c),{ok:y,format:i.format||w,r:Math.min(255,Math.max(s.r,0)),g:Math.min(255,Math.max(s.g,0)),b:Math.min(255,Math.max(s.b,0)),a:c}}var az="[-\\+]?\\d+%?",sz="[-\\+]?\\d*\\.\\d+%?",yr="(?:".concat(sz,")|(?:").concat(az,")"),_O="[\\s|\\(]+(".concat(yr,")[,|\\s]+(").concat(yr,")[,|\\s]+(").concat(yr,")\\s*\\)?"),EO="[\\s|\\(]+(".concat(yr,")[,|\\s]+(").concat(yr,")[,|\\s]+(").concat(yr,")[,|\\s]+(").concat(yr,")\\s*\\)?"),Xo={CSS_UNIT:new RegExp(yr),rgb:new RegExp("rgb"+_O),rgba:new RegExp("rgba"+EO),hsl:new RegExp("hsl"+_O),hsla:new RegExp("hsla"+EO),hsv:new RegExp("hsv"+_O),hsva:new RegExp("hsva"+EO),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function lz(i){if(i=i.trim().toLowerCase(),i.length===0)return!1;var s=!1;if(PO[i])i=PO[i],s=!0;else if(i==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var c=Xo.rgb.exec(i);return c?{r:c[1],g:c[2],b:c[3]}:(c=Xo.rgba.exec(i),c?{r:c[1],g:c[2],b:c[3],a:c[4]}:(c=Xo.hsl.exec(i),c?{h:c[1],s:c[2],l:c[3]}:(c=Xo.hsla.exec(i),c?{h:c[1],s:c[2],l:c[3],a:c[4]}:(c=Xo.hsv.exec(i),c?{h:c[1],s:c[2],v:c[3]}:(c=Xo.hsva.exec(i),c?{h:c[1],s:c[2],v:c[3],a:c[4]}:(c=Xo.hex8.exec(i),c?{r:bo(c[1]),g:bo(c[2]),b:bo(c[3]),a:CP(c[4]),format:s?"name":"hex8"}:(c=Xo.hex6.exec(i),c?{r:bo(c[1]),g:bo(c[2]),b:bo(c[3]),format:s?"name":"hex"}:(c=Xo.hex4.exec(i),c?{r:bo(c[1]+c[1]),g:bo(c[2]+c[2]),b:bo(c[3]+c[3]),a:CP(c[4]+c[4]),format:s?"name":"hex8"}:(c=Xo.hex3.exec(i),c?{r:bo(c[1]+c[1]),g:bo(c[2]+c[2]),b:bo(c[3]+c[3]),format:s?"name":"hex"}:!1)))))))))}function Li(i){return!!Xo.CSS_UNIT.exec(String(i))}var An=function(){function i(s,c){s===void 0&&(s=""),c===void 0&&(c={});var d;if(s instanceof i)return s;typeof s=="number"&&(s=rz(s)),this.originalInput=s;var p=Us(s);this.originalInput=s,this.r=p.r,this.g=p.g,this.b=p.b,this.a=p.a,this.roundA=Math.round(100*this.a)/100,this.format=(d=c.format)!==null&&d!==void 0?d:p.format,this.gradientType=c.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=p.ok}return i.prototype.isDark=function(){return this.getBrightness()<128},i.prototype.isLight=function(){return!this.isDark()},i.prototype.getBrightness=function(){var s=this.toRgb();return(s.r*299+s.g*587+s.b*114)/1e3},i.prototype.getLuminance=function(){var s=this.toRgb(),c,d,p,m=s.r/255,y=s.g/255,w=s.b/255;return m<=.03928?c=m/12.92:c=Math.pow((m+.055)/1.055,2.4),y<=.03928?d=y/12.92:d=Math.pow((y+.055)/1.055,2.4),w<=.03928?p=w/12.92:p=Math.pow((w+.055)/1.055,2.4),.2126*c+.7152*d+.0722*p},i.prototype.getAlpha=function(){return this.a},i.prototype.setAlpha=function(s){return this.a=wP(s),this.roundA=Math.round(100*this.a)/100,this},i.prototype.isMonochrome=function(){var s=this.toHsl().s;return s===0},i.prototype.toHsv=function(){var s=CO(this.r,this.g,this.b);return{h:s.h*360,s:s.s,v:s.v,a:this.a}},i.prototype.toHsvString=function(){var s=CO(this.r,this.g,this.b),c=Math.round(s.h*360),d=Math.round(s.s*100),p=Math.round(s.v*100);return this.a===1?"hsv(".concat(c,", ").concat(d,"%, ").concat(p,"%)"):"hsva(".concat(c,", ").concat(d,"%, ").concat(p,"%, ").concat(this.roundA,")")},i.prototype.toHsl=function(){var s=SP(this.r,this.g,this.b);return{h:s.h*360,s:s.s,l:s.l,a:this.a}},i.prototype.toHslString=function(){var s=SP(this.r,this.g,this.b),c=Math.round(s.h*360),d=Math.round(s.s*100),p=Math.round(s.l*100);return this.a===1?"hsl(".concat(c,", ").concat(d,"%, ").concat(p,"%)"):"hsla(".concat(c,", ").concat(d,"%, ").concat(p,"%, ").concat(this.roundA,")")},i.prototype.toHex=function(s){return s===void 0&&(s=!1),kO(this.r,this.g,this.b,s)},i.prototype.toHexString=function(s){return s===void 0&&(s=!1),"#"+this.toHex(s)},i.prototype.toHex8=function(s){return s===void 0&&(s=!1),oz(this.r,this.g,this.b,this.a,s)},i.prototype.toHex8String=function(s){return s===void 0&&(s=!1),"#"+this.toHex8(s)},i.prototype.toHexShortString=function(s){return s===void 0&&(s=!1),this.a===1?this.toHexString(s):this.toHex8String(s)},i.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},i.prototype.toRgbString=function(){var s=Math.round(this.r),c=Math.round(this.g),d=Math.round(this.b);return this.a===1?"rgb(".concat(s,", ").concat(c,", ").concat(d,")"):"rgba(".concat(s,", ").concat(c,", ").concat(d,", ").concat(this.roundA,")")},i.prototype.toPercentageRgb=function(){var s=function(c){return"".concat(Math.round(Nn(c,255)*100),"%")};return{r:s(this.r),g:s(this.g),b:s(this.b),a:this.a}},i.prototype.toPercentageRgbString=function(){var s=function(c){return Math.round(Nn(c,255)*100)};return this.a===1?"rgb(".concat(s(this.r),"%, ").concat(s(this.g),"%, ").concat(s(this.b),"%)"):"rgba(".concat(s(this.r),"%, ").concat(s(this.g),"%, ").concat(s(this.b),"%, ").concat(this.roundA,")")},i.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var s="#"+kO(this.r,this.g,this.b,!1),c=0,d=Object.entries(PO);c<d.length;c++){var p=d[c],m=p[0],y=p[1];if(s===y)return m}return!1},i.prototype.toString=function(s){var c=!!s;s=s??this.format;var d=!1,p=this.a<1&&this.a>=0,m=!c&&p&&(s.startsWith("hex")||s==="name");return m?s==="name"&&this.a===0?this.toName():this.toRgbString():(s==="rgb"&&(d=this.toRgbString()),s==="prgb"&&(d=this.toPercentageRgbString()),(s==="hex"||s==="hex6")&&(d=this.toHexString()),s==="hex3"&&(d=this.toHexString(!0)),s==="hex4"&&(d=this.toHex8String(!0)),s==="hex8"&&(d=this.toHex8String()),s==="name"&&(d=this.toName()),s==="hsl"&&(d=this.toHslString()),s==="hsv"&&(d=this.toHsvString()),d||this.toHexString())},i.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},i.prototype.clone=function(){return new i(this.toString())},i.prototype.lighten=function(s){s===void 0&&(s=10);var c=this.toHsl();return c.l+=s/100,c.l=Pf(c.l),new i(c)},i.prototype.brighten=function(s){s===void 0&&(s=10);var c=this.toRgb();return c.r=Math.max(0,Math.min(255,c.r-Math.round(255*-(s/100)))),c.g=Math.max(0,Math.min(255,c.g-Math.round(255*-(s/100)))),c.b=Math.max(0,Math.min(255,c.b-Math.round(255*-(s/100)))),new i(c)},i.prototype.darken=function(s){s===void 0&&(s=10);var c=this.toHsl();return c.l-=s/100,c.l=Pf(c.l),new i(c)},i.prototype.tint=function(s){return s===void 0&&(s=10),this.mix("white",s)},i.prototype.shade=function(s){return s===void 0&&(s=10),this.mix("black",s)},i.prototype.desaturate=function(s){s===void 0&&(s=10);var c=this.toHsl();return c.s-=s/100,c.s=Pf(c.s),new i(c)},i.prototype.saturate=function(s){s===void 0&&(s=10);var c=this.toHsl();return c.s+=s/100,c.s=Pf(c.s),new i(c)},i.prototype.greyscale=function(){return this.desaturate(100)},i.prototype.spin=function(s){var c=this.toHsl(),d=(c.h+s)%360;return c.h=d<0?360+d:d,new i(c)},i.prototype.mix=function(s,c){c===void 0&&(c=50);var d=this.toRgb(),p=new i(s).toRgb(),m=c/100,y={r:(p.r-d.r)*m+d.r,g:(p.g-d.g)*m+d.g,b:(p.b-d.b)*m+d.b,a:(p.a-d.a)*m+d.a};return new i(y)},i.prototype.analogous=function(s,c){s===void 0&&(s=6),c===void 0&&(c=30);var d=this.toHsl(),p=360/c,m=[this];for(d.h=(d.h-(p*s>>1)+720)%360;--s;)d.h=(d.h+p)%360,m.push(new i(d));return m},i.prototype.complement=function(){var s=this.toHsl();return s.h=(s.h+180)%360,new i(s)},i.prototype.monochromatic=function(s){s===void 0&&(s=6);for(var c=this.toHsv(),d=c.h,p=c.s,m=c.v,y=[],w=1/s;s--;)y.push(new i({h:d,s:p,v:m})),m=(m+w)%1;return y},i.prototype.splitcomplement=function(){var s=this.toHsl(),c=s.h;return[this,new i({h:(c+72)%360,s:s.s,l:s.l}),new i({h:(c+216)%360,s:s.s,l:s.l})]},i.prototype.onBackground=function(s){var c=this.toRgb(),d=new i(s).toRgb(),p=c.a+d.a*(1-c.a);return new i({r:(c.r*c.a+d.r*d.a*(1-c.a))/p,g:(c.g*c.a+d.g*d.a*(1-c.a))/p,b:(c.b*c.a+d.b*d.a*(1-c.a))/p,a:p})},i.prototype.triad=function(){return this.polyad(3)},i.prototype.tetrad=function(){return this.polyad(4)},i.prototype.polyad=function(s){for(var c=this.toHsl(),d=c.h,p=[this],m=360/s,y=1;y<s;y++)p.push(new i({h:(d+y*m)%360,s:c.s,l:c.l}));return p},i.prototype.equals=function(s){return this.toRgbString()===new i(s).toRgbString()},i}(),Ef=2,kP=.16,cz=.05,uz=.05,dz=.15,PP=5,_P=4,fz=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function EP(i){var s=i.r,c=i.g,d=i.b,p=CO(s,c,d);return{h:p.h*360,s:p.s,v:p.v}}function Tf(i){var s=i.r,c=i.g,d=i.b;return"#".concat(kO(s,c,d,!1))}function hz(i,s,c){var d=c/100,p={r:(s.r-i.r)*d+i.r,g:(s.g-i.g)*d+i.g,b:(s.b-i.b)*d+i.b};return p}function TP(i,s,c){var d;return Math.round(i.h)>=60&&Math.round(i.h)<=240?d=c?Math.round(i.h)-Ef*s:Math.round(i.h)+Ef*s:d=c?Math.round(i.h)+Ef*s:Math.round(i.h)-Ef*s,d<0?d+=360:d>=360&&(d-=360),d}function NP(i,s,c){if(i.h===0&&i.s===0)return i.s;var d;return c?d=i.s-kP*s:s===_P?d=i.s+kP:d=i.s+cz*s,d>1&&(d=1),c&&s===PP&&d>.1&&(d=.1),d<.06&&(d=.06),Number(d.toFixed(2))}function AP(i,s,c){var d;return c?d=i.v+uz*s:d=i.v-dz*s,d>1&&(d=1),Number(d.toFixed(2))}function xa(i){for(var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=[],d=Us(i),p=PP;p>0;p-=1){var m=EP(d),y=Tf(Us({h:TP(m,p,!0),s:NP(m,p,!0),v:AP(m,p,!0)}));c.push(y)}c.push(Tf(d));for(var w=1;w<=_P;w+=1){var S=EP(d),N=Tf(Us({h:TP(S,w),s:NP(S,w),v:AP(S,w)}));c.push(N)}return s.theme==="dark"?fz.map(function(P){var _=P.index,T=P.opacity,Q=Tf(hz(Us(s.backgroundColor||"#141414"),Us(c[_]),T*100));return Q}):c}var TO={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Nf={},NO={};Object.keys(TO).forEach(function(i){Nf[i]=xa(TO[i]),Nf[i].primary=Nf[i][5],NO[i]=xa(TO[i],{theme:"dark",backgroundColor:"#141414"}),NO[i].primary=NO[i][5]});var pz=Nf.blue;const mz=i=>{const{controlHeight:s}=i;return{controlHeightSM:s*.75,controlHeightXS:s*.5,controlHeightLG:s*1.25}};function gz(i){const{sizeUnit:s,sizeStep:c}=i;return{sizeXXL:s*(c+8),sizeXL:s*(c+4),sizeLG:s*(c+2),sizeMD:s*(c+1),sizeMS:s*c,size:s*c,sizeSM:s*(c-1),sizeXS:s*(c-2),sizeXXS:s*(c-3)}}const MP={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Af=ee(ee({},MP),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
8
|
-
|
|
9
|
-
'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function Oz(i,s){let{generateColorPalettes:c,generateNeutralColorPalettes:d}=s;const{colorSuccess:p,colorWarning:m,colorError:y,colorInfo:w,colorPrimary:S,colorBgBase:N,colorTextBase:P}=i,_=c(S),T=c(p),Q=c(m),Z=c(y),z=c(w),G=d(N,P);return ee(ee({},G),{colorPrimaryBg:_[1],colorPrimaryBgHover:_[2],colorPrimaryBorder:_[3],colorPrimaryBorderHover:_[4],colorPrimaryHover:_[5],colorPrimary:_[6],colorPrimaryActive:_[7],colorPrimaryTextHover:_[8],colorPrimaryText:_[9],colorPrimaryTextActive:_[10],colorSuccessBg:T[1],colorSuccessBgHover:T[2],colorSuccessBorder:T[3],colorSuccessBorderHover:T[4],colorSuccessHover:T[4],colorSuccess:T[6],colorSuccessActive:T[7],colorSuccessTextHover:T[8],colorSuccessText:T[9],colorSuccessTextActive:T[10],colorErrorBg:Z[1],colorErrorBgHover:Z[2],colorErrorBorder:Z[3],colorErrorBorderHover:Z[4],colorErrorHover:Z[5],colorError:Z[6],colorErrorActive:Z[7],colorErrorTextHover:Z[8],colorErrorText:Z[9],colorErrorTextActive:Z[10],colorWarningBg:Q[1],colorWarningBgHover:Q[2],colorWarningBorder:Q[3],colorWarningBorderHover:Q[4],colorWarningHover:Q[4],colorWarning:Q[6],colorWarningActive:Q[7],colorWarningTextHover:Q[8],colorWarningText:Q[9],colorWarningTextActive:Q[10],colorInfoBg:z[1],colorInfoBgHover:z[2],colorInfoBorder:z[3],colorInfoBorderHover:z[4],colorInfoHover:z[4],colorInfo:z[6],colorInfoActive:z[7],colorInfoTextHover:z[8],colorInfoText:z[9],colorInfoTextActive:z[10],colorBgMask:new An("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const vz=i=>{let s=i,c=i,d=i,p=i;return i<6&&i>=5?s=i+1:i<16&&i>=6?s=i+2:i>=16&&(s=16),i<7&&i>=5?c=4:i<8&&i>=7?c=5:i<14&&i>=8?c=6:i<16&&i>=14?c=7:i>=16&&(c=8),i<6&&i>=2?d=1:i>=6&&(d=2),i>4&&i<8?p=4:i>=8&&(p=6),{borderRadius:i>16?16:i,borderRadiusXS:d,borderRadiusSM:c,borderRadiusLG:s,borderRadiusOuter:p}};function yz(i){const{motionUnit:s,motionBase:c,borderRadius:d,lineWidth:p}=i;return ee({motionDurationFast:`${(c+s).toFixed(1)}s`,motionDurationMid:`${(c+s*2).toFixed(1)}s`,motionDurationSlow:`${(c+s*3).toFixed(1)}s`,lineWidthBold:p+1},vz(d))}const Vi=(i,s)=>new An(i).setAlpha(s).toRgbString(),Ic=(i,s)=>new An(i).darken(s).toHexString(),bz=i=>{const s=xa(i);return{1:s[0],2:s[1],3:s[2],4:s[3],5:s[4],6:s[5],7:s[6],8:s[4],9:s[5],10:s[6]}},xz=(i,s)=>{const c=i||"#fff",d=s||"#000";return{colorBgBase:c,colorTextBase:d,colorText:Vi(d,.88),colorTextSecondary:Vi(d,.65),colorTextTertiary:Vi(d,.45),colorTextQuaternary:Vi(d,.25),colorFill:Vi(d,.15),colorFillSecondary:Vi(d,.06),colorFillTertiary:Vi(d,.04),colorFillQuaternary:Vi(d,.02),colorBgLayout:Ic(c,4),colorBgContainer:Ic(c,0),colorBgElevated:Ic(c,0),colorBgSpotlight:Vi(d,.85),colorBorder:Ic(c,15),colorBorderSecondary:Ic(c,6)}};function wz(i){const s=new Array(10).fill(null).map((c,d)=>{const p=d-1,m=i*Math.pow(2.71828,p/5),y=d>1?Math.floor(m):Math.ceil(m);return Math.floor(y/2)*2});return s[1]=i,s.map(c=>{const d=c+8;return{size:c,lineHeight:d/c}})}const Sz=i=>{const s=wz(i),c=s.map(p=>p.size),d=s.map(p=>p.lineHeight);return{fontSizeSM:c[0],fontSize:c[1],fontSizeLG:c[2],fontSizeXL:c[3],fontSizeHeading1:c[6],fontSizeHeading2:c[5],fontSizeHeading3:c[4],fontSizeHeading4:c[3],fontSizeHeading5:c[2],lineHeight:d[1],lineHeightLG:d[2],lineHeightSM:d[0],lineHeightHeading1:d[6],lineHeightHeading2:d[5],lineHeightHeading3:d[4],lineHeightHeading4:d[3],lineHeightHeading5:d[2]}};function Cz(i){const s=Object.keys(MP).map(c=>{const d=xa(i[c]);return new Array(10).fill(1).reduce((p,m,y)=>(p[`${c}-${y+1}`]=d[y],p),{})}).reduce((c,d)=>(c=ee(ee({},c),d),c),{});return ee(ee(ee(ee(ee(ee(ee({},i),s),Oz(i,{generateColorPalettes:bz,generateNeutralColorPalettes:xz})),Sz(i.fontSize)),gz(i)),mz(i)),yz(i))}function AO(i){return i>=0&&i<=255}function Mf(i,s){const{r:c,g:d,b:p,a:m}=new An(i).toRgb();if(m<1)return i;const{r:y,g:w,b:S}=new An(s).toRgb();for(let N=.01;N<=1;N+=.01){const P=Math.round((c-y*(1-N))/N),_=Math.round((d-w*(1-N))/N),T=Math.round((p-S*(1-N))/N);if(AO(P)&&AO(_)&&AO(T))return new An({r:P,g:_,b:T,a:Math.round(N*100)/100}).toRgbString()}return new An({r:c,g:d,b:p,a:1}).toRgbString()}var kz=function(i,s){var c={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.indexOf(d)<0&&(c[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,d=Object.getOwnPropertySymbols(i);p<d.length;p++)s.indexOf(d[p])<0&&Object.prototype.propertyIsEnumerable.call(i,d[p])&&(c[d[p]]=i[d[p]]);return c};function Pz(i){const{override:s}=i,c=kz(i,["override"]),d=ee({},s);Object.keys(Af).forEach(T=>{delete d[T]});const p=ee(ee({},c),d),m=480,y=576,w=768,S=992,N=1200,P=1600,_=2e3;return ee(ee(ee({},p),{colorLink:p.colorInfoText,colorLinkHover:p.colorInfoHover,colorLinkActive:p.colorInfoActive,colorFillContent:p.colorFillSecondary,colorFillContentHover:p.colorFill,colorFillAlter:p.colorFillQuaternary,colorBgContainerDisabled:p.colorFillTertiary,colorBorderBg:p.colorBgContainer,colorSplit:Mf(p.colorBorderSecondary,p.colorBgContainer),colorTextPlaceholder:p.colorTextQuaternary,colorTextDisabled:p.colorTextQuaternary,colorTextHeading:p.colorText,colorTextLabel:p.colorTextSecondary,colorTextDescription:p.colorTextTertiary,colorTextLightSolid:p.colorWhite,colorHighlight:p.colorError,colorBgTextHover:p.colorFillSecondary,colorBgTextActive:p.colorFill,colorIcon:p.colorTextTertiary,colorIconHover:p.colorText,colorErrorOutline:Mf(p.colorErrorBg,p.colorBgContainer),colorWarningOutline:Mf(p.colorWarningBg,p.colorBgContainer),fontSizeIcon:p.fontSizeSM,lineWidth:p.lineWidth,controlOutlineWidth:p.lineWidth*2,controlInteractiveSize:p.controlHeight/2,controlItemBgHover:p.colorFillTertiary,controlItemBgActive:p.colorPrimaryBg,controlItemBgActiveHover:p.colorPrimaryBgHover,controlItemBgActiveDisabled:p.colorFill,controlTmpOutline:p.colorFillQuaternary,controlOutline:Mf(p.colorPrimaryBg,p.colorBgContainer),lineType:p.lineType,borderRadius:p.borderRadius,borderRadiusXS:p.borderRadiusXS,borderRadiusSM:p.borderRadiusSM,borderRadiusLG:p.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:p.sizeXXS,paddingXS:p.sizeXS,paddingSM:p.sizeSM,padding:p.size,paddingMD:p.sizeMD,paddingLG:p.sizeLG,paddingXL:p.sizeXL,paddingContentHorizontalLG:p.sizeLG,paddingContentVerticalLG:p.sizeMS,paddingContentHorizontal:p.sizeMS,paddingContentVertical:p.sizeSM,paddingContentHorizontalSM:p.size,paddingContentVerticalSM:p.sizeXS,marginXXS:p.sizeXXS,marginXS:p.sizeXS,marginSM:p.sizeSM,margin:p.size,marginMD:p.sizeMD,marginLG:p.sizeLG,marginXL:p.sizeXL,marginXXL:p.sizeXXL,boxShadow:`
|
|
10
|
-
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
15
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
16
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
17
|
-
`,boxShadowTertiary:`
|
|
18
|
-
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
19
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
20
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
21
|
-
`,screenXS:m,screenXSMin:m,screenXSMax:y-1,screenSM:y,screenSMMin:y,screenSMMax:w-1,screenMD:w,screenMDMin:w,screenMDMax:S-1,screenLG:S,screenLGMin:S,screenLGMax:N-1,screenXL:N,screenXLMin:N,screenXLMax:P-1,screenXXL:P,screenXXLMin:P,screenXXLMax:_-1,screenXXXL:_,screenXXXLMin:_,boxShadowPopoverArrow:"3px 3px 7px rgba(0, 0, 0, 0.1)",boxShadowCard:`
|
|
22
|
-
0 1px 2px -2px ${new An("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
23
|
-
0 3px 6px 0 ${new An("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
24
|
-
0 5px 12px 4px ${new An("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
25
|
-
`,boxShadowDrawerRight:`
|
|
26
|
-
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
27
|
-
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
28
|
-
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
29
|
-
`,boxShadowDrawerLeft:`
|
|
30
|
-
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
31
|
-
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
32
|
-
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
33
|
-
`,boxShadowDrawerUp:`
|
|
34
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
35
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
36
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
37
|
-
`,boxShadowDrawerDown:`
|
|
38
|
-
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
39
|
-
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
40
|
-
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
41
|
-
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),d)}const MO=i=>({boxSizing:"border-box",margin:0,padding:0,color:i.colorText,fontSize:i.fontSize,lineHeight:i.lineHeight,listStyle:"none",fontFamily:i.fontFamily}),_z=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),Ez=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),Tz=i=>({a:{color:i.colorLink,textDecoration:i.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${i.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:i.colorLinkHover},"&:active":{color:i.colorLinkActive},"&:active,\n &:hover":{textDecoration:i.linkHoverDecoration,outline:0},"&:focus":{textDecoration:i.linkFocusDecoration,outline:0},"&[disabled]":{color:i.colorTextDisabled,cursor:"not-allowed"}}}),Nz=(i,s)=>{const{fontFamily:c,fontSize:d}=i,p=`[class^="${s}"], [class*=" ${s}"]`;return{[p]:{fontFamily:c,fontSize:d,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[p]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},Az=i=>({outline:`${i.lineWidthBold}px solid ${i.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),RP=i=>({"&:focus-visible":ee({},Az(i))});function wa(i,s,c){return d=>{const p=o.computed(()=>d?.value),[m,y,w]=Qc(),{getPrefixCls:S,iconPrefixCls:N}=mf(),P=o.computed(()=>S()),_=o.computed(()=>({theme:m.value,token:y.value,hashId:w.value,path:["Shared",P.value]}));wO(_,()=>[{"&":Tz(y.value)}]);const T=o.computed(()=>({theme:m.value,token:y.value,hashId:w.value,path:[i,p.value,N.value]}));return[wO(T,()=>{const{token:Q,flush:Z}=Rz(y.value),z=typeof c=="function"?c(Q):c,G=ee(ee({},z),y.value[i]),te=`.${p.value}`,$=br(Q,{componentCls:te,prefixCls:p.value,iconCls:`.${N.value}`,antCls:`.${P.value}`},G),H=s($,{hashId:w.value,prefixCls:p.value,rootPrefixCls:P.value,iconPrefixCls:N.value,overrideComponentToken:y.value[i]});return Z(i,G),[Nz(y.value,p.value),H]}),w]}}const IP=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let RO=!0;function br(){for(var i=arguments.length,s=new Array(i),c=0;c<i;c++)s[c]=arguments[c];if(!IP)return ee({},...s);RO=!1;const d={};return s.forEach(p=>{Object.keys(p).forEach(m=>{Object.defineProperty(d,m,{configurable:!0,enumerable:!0,get:()=>p[m]})})}),RO=!0,d}function Mz(){}function Rz(i){let s,c=i,d=Mz;return IP&&(s=new Set,c=new Proxy(i,{get(p,m){return RO&&s.add(m),p[m]}}),d=(p,m)=>{Array.from(s)}),{token:c,keys:s,flush:d}}const Iz=nP(Cz),QP={token:Af,hashed:!0},DP=Symbol("DesignTokenContext"),IO=o.shallowRef(),Qz=i=>{o.provide(DP,i),o.watch(i,()=>{IO.value=o.unref(i),o.triggerRef(IO)},{immediate:!0,deep:!0})},Dz=o.defineComponent({props:{value:on()},setup(i,s){let{slots:c}=s;return Qz(o.computed(()=>i.value)),()=>{var d;return(d=c.default)===null||d===void 0?void 0:d.call(c)}}});function Qc(){const i=o.inject(DP,o.computed(()=>IO.value||QP)),s=o.computed(()=>`${JW}-${i.value.hashed||""}`),c=o.computed(()=>i.value.theme||Iz),d=CW(c,o.computed(()=>[Af,i.value.token]),o.computed(()=>({salt:s.value,override:ee({override:i.value.token},i.value.components),formatToken:Pz})));return[c,o.computed(()=>d.value[0]),o.computed(()=>i.value.hashed?d.value[1]:"")]}const BP=o.defineComponent({compatConfig:{MODE:3},setup(){const[,i]=Qc(),s=o.computed(()=>new An(i.value.colorBgBase).toHsl().l<.5?{opacity:.65}:{});return()=>o.createVNode("svg",{style:s.value,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},[o.createVNode("g",{fill:"none","fill-rule":"evenodd"},[o.createVNode("g",{transform:"translate(24 31.67)"},[o.createVNode("ellipse",{"fill-opacity":".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"},null),o.createVNode("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"},null),o.createVNode("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"},null),o.createVNode("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"},null),o.createVNode("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"},null)]),o.createVNode("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"},null),o.createVNode("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},[o.createVNode("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"},null),o.createVNode("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"},null)])])])}});BP.PRESENTED_IMAGE_DEFAULT=!0;const LP=o.defineComponent({compatConfig:{MODE:3},setup(){const[,i]=Qc(),s=o.computed(()=>{const{colorFill:c,colorFillTertiary:d,colorFillQuaternary:p,colorBgContainer:m}=i.value;return{borderColor:new An(c).onBackground(m).toHexString(),shadowColor:new An(d).onBackground(m).toHexString(),contentColor:new An(p).onBackground(m).toHexString()}});return()=>o.createVNode("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[o.createVNode("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd"},[o.createVNode("ellipse",{fill:s.value.shadowColor,cx:"32",cy:"33",rx:"32",ry:"7"},null),o.createVNode("g",{"fill-rule":"nonzero",stroke:s.value.borderColor},[o.createVNode("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"},null),o.createVNode("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:s.value.contentColor},null)])])])}});LP.PRESENTED_IMAGE_SIMPLE=!0;const Bz=i=>{const{componentCls:s,margin:c,marginXS:d,marginXL:p,fontSize:m,lineHeight:y}=i;return{[s]:{marginInline:d,fontSize:m,lineHeight:y,textAlign:"center",[`${s}-image`]:{height:i.emptyImgHeight,marginBottom:d,opacity:i.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[`${s}-footer`]:{marginTop:c},"&-normal":{marginBlock:p,color:i.colorTextDisabled,[`${s}-image`]:{height:i.emptyImgHeightMD}},"&-small":{marginBlock:d,color:i.colorTextDisabled,[`${s}-image`]:{height:i.emptyImgHeightSM}}}}},Lz=wa("Empty",i=>{const{componentCls:s,controlHeightLG:c}=i,d=br(i,{emptyImgCls:`${s}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[Bz(d)]});var Vz=function(i,s){var c={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.indexOf(d)<0&&(c[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,d=Object.getOwnPropertySymbols(i);p<d.length;p++)s.indexOf(d[p])<0&&Object.prototype.propertyIsEnumerable.call(i,d[p])&&(c[d[p]]=i[d[p]]);return c};const VP=o.createVNode(BP,null,null),jP=o.createVNode(LP,null,null),jz=()=>({prefixCls:String,imageStyle:on(),image:iO(),description:iO()}),QO=o.defineComponent({name:"AEmpty",compatConfig:{MODE:3},inheritAttrs:!1,props:jz(),setup(i,s){let{slots:c={},attrs:d}=s;const{direction:p,prefixCls:m}=wi("empty",i),[y,w]=Lz(m);return()=>{var S,N;const P=m.value,_=ee(ee({},i),d),{image:T=((S=c.image)===null||S===void 0?void 0:S.call(c))||VP,description:Q=((N=c.description)===null||N===void 0?void 0:N.call(c))||void 0,imageStyle:Z,class:z=""}=_,G=Vz(_,["image","description","imageStyle","class"]);return y(o.createVNode(Z2,{componentName:"Empty",children:te=>{const $=typeof Q<"u"?Q:te.description,H=typeof $=="string"?$:"empty";let X=null;return typeof T=="string"?X=o.createVNode("img",{alt:H,src:T},null):X=T,o.createVNode("div",Je({class:jt(P,z,w.value,{[`${P}-normal`]:T===jP,[`${P}-rtl`]:p.value==="rtl"})},G),[o.createVNode("div",{class:`${P}-image`,style:Z},[X]),$&&o.createVNode("p",{class:`${P}-description`},[$]),c.default&&o.createVNode("div",{class:`${P}-footer`},[N2(c.default())])])}},null))}}});QO.PRESENTED_IMAGE_DEFAULT=VP,QO.PRESENTED_IMAGE_SIMPLE=jP;const Dc=oO(QO),FP=i=>{const{prefixCls:s}=wi("empty",i);return(c=>{switch(c){case"Table":case"List":return o.createVNode(Dc,{image:Dc.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return o.createVNode(Dc,{image:Dc.PRESENTED_IMAGE_SIMPLE,class:`${s.value}-small`},null);default:return o.createVNode(Dc,null,null)}})(i.componentName)};function Fz(i){return o.createVNode(FP,{componentName:i},null)}const ZP=Symbol("SizeContextKey"),WP=()=>o.inject(ZP,o.ref(void 0)),Zz=i=>{const s=WP();return o.provide(ZP,o.computed(()=>i.value||s.value)),i},wi=(i,s)=>{const c=WP(),d=sO(),p=o.inject(aO,ee(ee({},L2),{renderEmpty:U=>o.h(FP,{componentName:U})})),m=o.computed(()=>p.getPrefixCls(i,s.prefixCls)),y=o.computed(()=>{var U,ce;return(U=s.direction)!==null&&U!==void 0?U:(ce=p.direction)===null||ce===void 0?void 0:ce.value}),w=o.computed(()=>{var U;return(U=s.iconPrefixCls)!==null&&U!==void 0?U:p.iconPrefixCls.value}),S=o.computed(()=>p.getPrefixCls()),N=o.computed(()=>{var U;return(U=p.autoInsertSpaceInButton)===null||U===void 0?void 0:U.value}),P=p.renderEmpty,_=p.space,T=p.pageHeader,Q=p.form,Z=o.computed(()=>{var U,ce;return(U=s.getTargetContainer)!==null&&U!==void 0?U:(ce=p.getTargetContainer)===null||ce===void 0?void 0:ce.value}),z=o.computed(()=>{var U,ce,he;return(ce=(U=s.getContainer)!==null&&U!==void 0?U:s.getPopupContainer)!==null&&ce!==void 0?ce:(he=p.getPopupContainer)===null||he===void 0?void 0:he.value}),G=o.computed(()=>{var U,ce;return(U=s.dropdownMatchSelectWidth)!==null&&U!==void 0?U:(ce=p.dropdownMatchSelectWidth)===null||ce===void 0?void 0:ce.value}),te=o.computed(()=>{var U;return(s.virtual===void 0?((U=p.virtual)===null||U===void 0?void 0:U.value)!==!1:s.virtual!==!1)&&G.value!==!1}),$=o.computed(()=>s.size||c.value),H=o.computed(()=>{var U,ce,he;return(U=s.autocomplete)!==null&&U!==void 0?U:(he=(ce=p.input)===null||ce===void 0?void 0:ce.value)===null||he===void 0?void 0:he.autocomplete}),X=o.computed(()=>{var U;return(U=s.disabled)!==null&&U!==void 0?U:d.value}),re=o.computed(()=>{var U;return(U=s.csp)!==null&&U!==void 0?U:p.csp}),oe=o.computed(()=>{var U,ce;return(U=s.wave)!==null&&U!==void 0?U:(ce=p.wave)===null||ce===void 0?void 0:ce.value});return{configProvider:p,prefixCls:m,direction:y,size:$,getTargetContainer:Z,getPopupContainer:z,space:_,pageHeader:T,form:Q,autoInsertSpaceInButton:N,renderEmpty:P,virtual:te,dropdownMatchSelectWidth:G,rootPrefixCls:S,getPrefixCls:p.getPrefixCls,autocomplete:H,csp:re,iconPrefixCls:w,disabled:X,select:p.select,wave:oe}};function zP(i,s){const c=ee({},i);for(let d=0;d<s.length;d+=1){const p=s[d];delete c[p]}return c}function Wz(i,s){for(var c=0;c<s.length;c++){var d=s[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(i,d.key,d)}}function UP(i,s,c){return c&&Wz(i,c),i}function Rf(){return(Rf=Object.assign||function(i){for(var s=1;s<arguments.length;s++){var c=arguments[s];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(i[d]=c[d])}return i}).apply(this,arguments)}function HP(i,s){i.prototype=Object.create(s.prototype),i.prototype.constructor=i,i.__proto__=s}function YP(i,s){if(i==null)return{};var c,d,p={},m=Object.keys(i);for(d=0;d<m.length;d++)s.indexOf(c=m[d])>=0||(p[c]=i[c]);return p}function XP(i){return((s=i)!=null&&typeof s=="object"&&Array.isArray(s)===!1)==1&&Object.prototype.toString.call(i)==="[object Object]";var s}var GP=Object.prototype,KP=GP.toString,zz=GP.hasOwnProperty,JP=/^\s*function (\w+)/;function $P(i){var s,c=(s=i?.type)!==null&&s!==void 0?s:i;if(c){var d=c.toString().match(JP);return d?d[1]:""}return""}var Sa=function(i){var s,c;return XP(i)!==!1&&typeof(s=i.constructor)=="function"&&XP(c=s.prototype)!==!1&&c.hasOwnProperty("isPrototypeOf")!==!1},qP=function(i){return i},Vn=qP;if(process.env.NODE_ENV!=="production"){var Uz=typeof console<"u";Vn=Uz?function(i){console.warn("[VueTypes warn]: "+i)}:qP}var Bc=function(i,s){return zz.call(i,s)},Hz=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i},Hs=Array.isArray||function(i){return KP.call(i)==="[object Array]"},Ys=function(i){return KP.call(i)==="[object Function]"},If=function(i){return Sa(i)&&Bc(i,"_vueTypes_name")},e_=function(i){return Sa(i)&&(Bc(i,"type")||["_vueTypes_name","validator","default","required"].some(function(s){return Bc(i,s)}))};function DO(i,s){return Object.defineProperty(i.bind(s),"__original",{value:i})}function Ca(i,s,c){var d;c===void 0&&(c=!1);var p=!0,m="";d=Sa(i)?i:{type:i};var y=If(d)?d._vueTypes_name+" - ":"";if(e_(d)&&d.type!==null){if(d.type===void 0||d.type===!0||!d.required&&s===void 0)return p;Hs(d.type)?(p=d.type.some(function(_){return Ca(_,s,!0)===!0}),m=d.type.map(function(_){return $P(_)}).join(" or ")):p=(m=$P(d))==="Array"?Hs(s):m==="Object"?Sa(s):m==="String"||m==="Number"||m==="Boolean"||m==="Function"?function(_){if(_==null)return"";var T=_.constructor.toString().match(JP);return T?T[1]:""}(s)===m:s instanceof d.type}if(!p){var w=y+'value "'+s+'" should be of type "'+m+'"';return c===!1?(Vn(w),!1):w}if(Bc(d,"validator")&&Ys(d.validator)){var S=Vn,N=[];if(Vn=function(_){N.push(_)},p=d.validator(s),Vn=S,!p){var P=(N.length>1?"* ":"")+N.join(`
|
|
42
|
-
* `);return N.length=0,c===!1?(Vn(P),p):P}}return p}function xo(i,s){var c=Object.defineProperties(s,{_vueTypes_name:{value:i,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(p){return p!==void 0||this.default?Ys(p)||Ca(this,p,!0)===!0?(this.default=Hs(p)?function(){return[].concat(p)}:Sa(p)?function(){return Object.assign({},p)}:p,this):(Vn(this._vueTypes_name+' - invalid default value: "'+p+'"'),this):this}}}),d=c.validator;return Ys(d)&&(c.validator=DO(d,c)),c}function Si(i,s){var c=xo(i,s);return Object.defineProperty(c,"validate",{value:function(d){return Ys(this.validator)&&Vn(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info:
|
|
43
|
-
`+JSON.stringify(this)),this.validator=DO(d,this),this}})}function t_(i,s,c){var d,p,m=(d=s,p={},Object.getOwnPropertyNames(d).forEach(function(_){p[_]=Object.getOwnPropertyDescriptor(d,_)}),Object.defineProperties({},p));if(m._vueTypes_name=i,!Sa(c))return m;var y,w,S=c.validator,N=YP(c,["validator"]);if(Ys(S)){var P=m.validator;P&&(P=(w=(y=P).__original)!==null&&w!==void 0?w:y),m.validator=DO(P?function(_){return P.call(this,_)&&S.call(this,_)}:S,m)}return Object.assign(m,N)}function Qf(i){return i.replace(/^(?!\s*$)/gm," ")}var Yz=function(){return Si("any",{})},Xz=function(){return Si("function",{type:Function})},Gz=function(){return Si("boolean",{type:Boolean})},Kz=function(){return Si("string",{type:String})},Jz=function(){return Si("number",{type:Number})},$z=function(){return Si("array",{type:Array})},qz=function(){return Si("object",{type:Object})},eU=function(){return xo("integer",{type:Number,validator:function(i){return Hz(i)}})},tU=function(){return xo("symbol",{validator:function(i){return typeof i=="symbol"}})};function nU(i,s){if(s===void 0&&(s="custom validation failed"),typeof i!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return xo(i.name||"<<anonymous function>>",{validator:function(c){var d=i(c);return d||Vn(this._vueTypes_name+" - "+s),d}})}function oU(i){if(!Hs(i))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var s='oneOf - value should be one of "'+i.join('", "')+'".',c=i.reduce(function(d,p){if(p!=null){var m=p.constructor;d.indexOf(m)===-1&&d.push(m)}return d},[]);return xo("oneOf",{type:c.length>0?c:void 0,validator:function(d){var p=i.indexOf(d)!==-1;return p||Vn(s),p}})}function iU(i){if(!Hs(i))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var s=!1,c=[],d=0;d<i.length;d+=1){var p=i[d];if(e_(p)){if(If(p)&&p._vueTypes_name==="oneOf"){c=c.concat(p.type);continue}if(Ys(p.validator)&&(s=!0),p.type!==!0&&p.type){c=c.concat(p.type);continue}}c.push(p)}return c=c.filter(function(m,y){return c.indexOf(m)===y}),xo("oneOfType",s?{type:c,validator:function(m){var y=[],w=i.some(function(S){var N=Ca(If(S)&&S._vueTypes_name==="oneOf"?S.type||null:S,m,!0);return typeof N=="string"&&y.push(N),N===!0});return w||Vn("oneOfType - provided value does not match any of the "+y.length+` passed-in validators:
|
|
44
|
-
`+Qf(y.join(`
|
|
45
|
-
`))),w}}:{type:c})}function rU(i){return xo("arrayOf",{type:Array,validator:function(s){var c,d=s.every(function(p){return(c=Ca(i,p,!0))===!0});return d||Vn(`arrayOf - value validation error:
|
|
46
|
-
`+Qf(c)),d}})}function aU(i){return xo("instanceOf",{type:i})}function sU(i){return xo("objectOf",{type:Object,validator:function(s){var c,d=Object.keys(s).every(function(p){return(c=Ca(i,s[p],!0))===!0});return d||Vn(`objectOf - value validation error:
|
|
47
|
-
`+Qf(c)),d}})}function lU(i){var s=Object.keys(i),c=s.filter(function(p){var m;return!!(!((m=i[p])===null||m===void 0)&&m.required)}),d=xo("shape",{type:Object,validator:function(p){var m=this;if(!Sa(p))return!1;var y=Object.keys(p);if(c.length>0&&c.some(function(S){return y.indexOf(S)===-1})){var w=c.filter(function(S){return y.indexOf(S)===-1});return Vn(w.length===1?'shape - required property "'+w[0]+'" is not defined.':'shape - required properties "'+w.join('", "')+'" are not defined.'),!1}return y.every(function(S){if(s.indexOf(S)===-1)return m._vueTypes_isLoose===!0||(Vn('shape - shape definition does not include a "'+S+'" property. Allowed keys: "'+s.join('", "')+'".'),!1);var N=Ca(i[S],p[S],!0);return typeof N=="string"&&Vn('shape - "'+S+`" property validation error:
|
|
48
|
-
`+Qf(N)),N===!0})}});return Object.defineProperty(d,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(d,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),d}var Ci=function(){function i(){}return i.extend=function(s){var c=this;if(Hs(s))return s.forEach(function(_){return c.extend(_)}),this;var d=s.name,p=s.validate,m=p!==void 0&&p,y=s.getter,w=y!==void 0&&y,S=YP(s,["name","validate","getter"]);if(Bc(this,d))throw new TypeError('[VueTypes error]: Type "'+d+'" already defined');var N,P=S.type;return If(P)?(delete S.type,Object.defineProperty(this,d,w?{get:function(){return t_(d,P,S)}}:{value:function(){var _,T=t_(d,P,S);return T.validator&&(T.validator=(_=T.validator).bind.apply(_,[T].concat([].slice.call(arguments)))),T}})):(N=w?{get:function(){var _=Object.assign({},S);return m?Si(d,_):xo(d,_)},enumerable:!0}:{value:function(){var _,T,Q=Object.assign({},S);return _=m?Si(d,Q):xo(d,Q),Q.validator&&(_.validator=(T=Q.validator).bind.apply(T,[_].concat([].slice.call(arguments)))),_},enumerable:!0},Object.defineProperty(this,d,N))},UP(i,null,[{key:"any",get:function(){return Yz()}},{key:"func",get:function(){return Xz().def(this.defaults.func)}},{key:"bool",get:function(){return Gz().def(this.defaults.bool)}},{key:"string",get:function(){return Kz().def(this.defaults.string)}},{key:"number",get:function(){return Jz().def(this.defaults.number)}},{key:"array",get:function(){return $z().def(this.defaults.array)}},{key:"object",get:function(){return qz().def(this.defaults.object)}},{key:"integer",get:function(){return eU().def(this.defaults.integer)}},{key:"symbol",get:function(){return tU()}}]),i}();function n_(i){var s;return i===void 0&&(i={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(s=function(c){function d(){return c.apply(this,arguments)||this}return HP(d,c),UP(d,null,[{key:"sensibleDefaults",get:function(){return Rf({},this.defaults)},set:function(p){this.defaults=p!==!1?Rf({},p!==!0?p:i):{}}}]),d}(Ci)).defaults=Rf({},i),s}Ci.defaults={},Ci.custom=nU,Ci.oneOf=oU,Ci.instanceOf=aU,Ci.oneOfType=iU,Ci.arrayOf=rU,Ci.objectOf=sU,Ci.shape=lU,Ci.utils={validate:function(i,s){return Ca(s,i,!0)===!0},toType:function(i,s,c){return c===void 0&&(c=!1),c?Si(i,s):xo(i,s)}},function(i){function s(){return i.apply(this,arguments)||this}return HP(s,i),s}(n_());const Ft=n_({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});Ft.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);const o_=(i,s,c)=>{hO(i,`[ant-design-vue: ${s}] ${c}`)};function cU(i){let{prefixCls:s,animation:c,transitionName:d}=i;return c?{name:`${s}-${c}`}:d?{name:d}:{}}function uU(i,s,c){o.render(o.cloneVNode(i,ee({},s)),c)}const dU=i=>{if(!i)return!1;if(i.offsetParent)return!0;if(i.getBBox){const s=i.getBBox();if(s.width||s.height)return!0}if(i.getBoundingClientRect){const s=i.getBoundingClientRect();if(s.width||s.height)return!0}return!1};var i_=typeof oi=="object"&&oi&&oi.Object===Object&&oi,fU=typeof self=="object"&&self&&self.Object===Object&&self,xr=i_||fU||Function("return this")(),Df=xr.Symbol,r_=Object.prototype,hU=r_.hasOwnProperty,pU=r_.toString,Lc=Df?Df.toStringTag:void 0;function mU(i){var s=hU.call(i,Lc),c=i[Lc];try{i[Lc]=void 0;var d=!0}catch{}var p=pU.call(i);return d&&(s?i[Lc]=c:delete i[Lc]),p}var gU=Object.prototype,OU=gU.toString;function vU(i){return OU.call(i)}var yU="[object Null]",bU="[object Undefined]",a_=Df?Df.toStringTag:void 0;function Vc(i){return i==null?i===void 0?bU:yU:a_&&a_ in Object(i)?mU(i):vU(i)}function s_(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}var xU="[object AsyncFunction]",wU="[object Function]",SU="[object GeneratorFunction]",CU="[object Proxy]";function l_(i){if(!s_(i))return!1;var s=Vc(i);return s==wU||s==SU||s==xU||s==CU}var BO=xr["__core-js_shared__"],c_=function(){var i=/[^.]+$/.exec(BO&&BO.keys&&BO.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function kU(i){return!!c_&&c_ in i}var PU=Function.prototype,_U=PU.toString;function ka(i){if(i!=null){try{return _U.call(i)}catch{}try{return i+""}catch{}}return""}var EU=/[\\^$.*+?()[\]{}|]/g,TU=/^\[object .+?Constructor\]$/,NU=Function.prototype,AU=Object.prototype,MU=NU.toString,RU=AU.hasOwnProperty,IU=RegExp("^"+MU.call(RU).replace(EU,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QU(i){if(!s_(i)||kU(i))return!1;var s=l_(i)?IU:TU;return s.test(ka(i))}function DU(i,s){return i?.[s]}function jc(i,s){var c=DU(i,s);return QU(c)?c:void 0}var LO=jc(xr,"Map"),BU=Array.isArray;function VO(i){return i!=null&&typeof i=="object"}var LU="[object Arguments]";function u_(i){return VO(i)&&Vc(i)==LU}var d_=Object.prototype,VU=d_.hasOwnProperty,jU=d_.propertyIsEnumerable,FU=u_(function(){return arguments}())?u_:function(i){return VO(i)&&VU.call(i,"callee")&&!jU.call(i,"callee")};function ZU(){return!1}var f_=typeof t=="object"&&t&&!t.nodeType&&t,h_=f_&&!0&&n&&!n.nodeType&&n,WU=h_&&h_.exports===f_,p_=WU?xr.Buffer:void 0,zU=p_?p_.isBuffer:void 0,UU=zU||ZU,HU=9007199254740991;function m_(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=HU}var YU="[object Arguments]",XU="[object Array]",GU="[object Boolean]",KU="[object Date]",JU="[object Error]",$U="[object Function]",qU="[object Map]",eH="[object Number]",tH="[object Object]",nH="[object RegExp]",oH="[object Set]",iH="[object String]",rH="[object WeakMap]",aH="[object ArrayBuffer]",sH="[object DataView]",lH="[object Float32Array]",cH="[object Float64Array]",uH="[object Int8Array]",dH="[object Int16Array]",fH="[object Int32Array]",hH="[object Uint8Array]",pH="[object Uint8ClampedArray]",mH="[object Uint16Array]",gH="[object Uint32Array]",Rt={};Rt[lH]=Rt[cH]=Rt[uH]=Rt[dH]=Rt[fH]=Rt[hH]=Rt[pH]=Rt[mH]=Rt[gH]=!0,Rt[YU]=Rt[XU]=Rt[aH]=Rt[GU]=Rt[sH]=Rt[KU]=Rt[JU]=Rt[$U]=Rt[qU]=Rt[eH]=Rt[tH]=Rt[nH]=Rt[oH]=Rt[iH]=Rt[rH]=!1;function OH(i){return VO(i)&&m_(i.length)&&!!Rt[Vc(i)]}function vH(i){return function(s){return i(s)}}var g_=typeof t=="object"&&t&&!t.nodeType&&t,Fc=g_&&!0&&n&&!n.nodeType&&n,yH=Fc&&Fc.exports===g_,jO=yH&&i_.process,O_=function(){try{var i=Fc&&Fc.require&&Fc.require("util").types;return i||jO&&jO.binding&&jO.binding("util")}catch{}}(),v_=O_&&O_.isTypedArray,bH=v_?vH(v_):OH,xH=Object.prototype;function y_(i){var s=i&&i.constructor,c=typeof s=="function"&&s.prototype||xH;return i===c}function wH(i,s){return function(c){return i(s(c))}}var SH=wH(Object.keys,Object),CH=Object.prototype,kH=CH.hasOwnProperty;function PH(i){if(!y_(i))return SH(i);var s=[];for(var c in Object(i))kH.call(i,c)&&c!="constructor"&&s.push(c);return s}function _H(i){return i!=null&&m_(i.length)&&!l_(i)}var FO=jc(xr,"DataView"),ZO=jc(xr,"Promise"),WO=jc(xr,"Set"),zO=jc(xr,"WeakMap"),b_="[object Map]",EH="[object Object]",x_="[object Promise]",w_="[object Set]",S_="[object WeakMap]",C_="[object DataView]",TH=ka(FO),NH=ka(LO),AH=ka(ZO),MH=ka(WO),RH=ka(zO),Pa=Vc;(FO&&Pa(new FO(new ArrayBuffer(1)))!=C_||LO&&Pa(new LO)!=b_||ZO&&Pa(ZO.resolve())!=x_||WO&&Pa(new WO)!=w_||zO&&Pa(new zO)!=S_)&&(Pa=function(i){var s=Vc(i),c=s==EH?i.constructor:void 0,d=c?ka(c):"";if(d)switch(d){case TH:return C_;case NH:return b_;case AH:return x_;case MH:return w_;case RH:return S_}return s}),pf("bottomLeft","bottomRight","topLeft","topRight");const k_=function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ee(i?{name:i,appear:!0,enterFromClass:`${i}-enter ${i}-enter-prepare ${i}-enter-start`,enterActiveClass:`${i}-enter ${i}-enter-prepare`,enterToClass:`${i}-enter ${i}-enter-active`,leaveFromClass:` ${i}-leave`,leaveActiveClass:`${i}-leave ${i}-leave-active`,leaveToClass:`${i}-leave ${i}-leave-active`}:{css:!1},s)},P_=function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ee(i?{name:i,appear:!0,appearActiveClass:`${i}`,appearToClass:`${i}-appear ${i}-appear-active`,enterFromClass:`${i}-appear ${i}-enter ${i}-appear-prepare ${i}-enter-prepare`,enterActiveClass:`${i}`,enterToClass:`${i}-enter ${i}-appear ${i}-appear-active ${i}-enter-active`,leaveActiveClass:`${i} ${i}-leave`,leaveToClass:`${i}-leave-active`}:{css:!1},s)},Bf=(i,s,c)=>c!==void 0?c:`${i}-${s}`,__=Symbol("PortalContextKey"),E_=function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};o.provide(__,{inTriggerContext:s.inTriggerContext,shouldRender:o.computed(()=>{const{sPopupVisible:c,popupRef:d,forceRender:p,autoDestroy:m}=i||{};let y=!1;return(c||d||p)&&(y=!0),!c&&m&&(y=!1),y})})},IH=()=>{E_({},{inTriggerContext:!1});const i=o.inject(__,{shouldRender:o.computed(()=>!1),inTriggerContext:!1});return{shouldRender:o.computed(()=>i.shouldRender.value||i.inTriggerContext===!1)}},T_=o.defineComponent({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:Ft.func.isRequired,didUpdate:Function},setup(i,s){let{slots:c}=s,d=!0,p;const{shouldRender:m}=IH();function y(){m.value&&(p=i.getContainer())}o.onBeforeMount(()=>{d=!1,y()}),o.onMounted(()=>{p||y()});const w=o.watch(m,()=>{m.value&&!p&&(p=i.getContainer()),p&&w()});return o.onUpdated(()=>{o.nextTick(()=>{var S;m.value&&((S=i.didUpdate)===null||S===void 0||S.call(i,i))})}),()=>{var S;return m.value?d?(S=c.default)===null||S===void 0?void 0:S.call(c):p?o.createVNode(o.Teleport,{to:p},c):null:null}}});let UO;function QH(i){if(typeof document>"u")return 0;if(UO===void 0){const s=document.createElement("div");s.style.width="100%",s.style.height="200px";const c=document.createElement("div"),d=c.style;d.position="absolute",d.top="0",d.left="0",d.pointerEvents="none",d.visibility="hidden",d.width="200px",d.height="150px",d.overflow="hidden",c.appendChild(s),document.body.appendChild(c);const p=s.offsetWidth;c.style.overflow="scroll";let m=s.offsetWidth;p===m&&(m=c.clientWidth),document.body.removeChild(c),UO=p-m}return UO}const DH=`vc-util-locker-${Date.now()}`;let N_=0;function BH(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function LH(i){const s=o.computed(()=>!!i&&!!i.value);N_+=1;const c=`${DH}_${N_}`;o.watchEffect(d=>{if(Ho()){if(s.value){const p=QH(),m=BH();Nc(`
|
|
49
|
-
html body {
|
|
50
|
-
overflow-y: hidden;
|
|
51
|
-
${m?`width: calc(100% - ${p}px);`:""}
|
|
52
|
-
}`,c)}else vf(c);d(()=>{vf(c)})}},{flush:"post"})}let _a=0;const Lf=Ho(),A_=i=>{if(!Lf)return null;if(i){if(typeof i=="string")return document.querySelectorAll(i)[0];if(typeof i=="function")return i();if(typeof i=="object"&&i instanceof window.HTMLElement)return i}return document.body},VH=o.defineComponent({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:Ft.any,visible:{type:Boolean,default:void 0},autoLock:Ls(),didUpdate:Function},setup(i,s){let{slots:c}=s;const d=o.shallowRef(),p=o.shallowRef(),m=o.shallowRef(),y=o.shallowRef(1),w=Ho()&&document.createElement("div"),S=()=>{var Q,Z;d.value===w&&((Z=(Q=d.value)===null||Q===void 0?void 0:Q.parentNode)===null||Z===void 0||Z.removeChild(d.value)),d.value=null};let N=null;const P=function(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]||d.value&&!d.value.parentNode?(N=A_(i.getContainer),N?(N.appendChild(d.value),!0):!1):!0},_=()=>Lf?(d.value||(d.value=w,P(!0)),T(),d.value):null,T=()=>{const{wrapperClassName:Q}=i;d.value&&Q&&Q!==d.value.className&&(d.value.className=Q)};return o.onUpdated(()=>{T(),P()}),LH(o.computed(()=>i.autoLock&&i.visible&&Ho()&&(d.value===document.body||d.value===w))),o.onMounted(()=>{let Q=!1;o.watch([()=>i.visible,()=>i.getContainer],(Z,z)=>{let[G,te]=Z,[$,H]=z;Lf&&(N=A_(i.getContainer),N===document.body&&(G&&!$?_a+=1:Q&&(_a-=1))),Q&&(typeof te=="function"&&typeof H=="function"?te.toString()!==H.toString():te!==H)&&S(),Q=!0},{immediate:!0,flush:"post"}),o.nextTick(()=>{P()||(m.value=Ec(()=>{y.value+=1}))})}),o.onBeforeUnmount(()=>{const{visible:Q}=i;Lf&&N===document.body&&(_a=Q&&_a?_a-1:_a),S(),Ec.cancel(m.value)}),()=>{const{forceRender:Q,visible:Z}=i;let z=null;const G={getOpenCount:()=>_a,getContainer:_};return y.value&&(Q||Z||p.value)&&(z=o.createVNode(T_,{getContainer:_,ref:p,didUpdate:i.didUpdate},{default:()=>{var te;return(te=c.default)===null||te===void 0?void 0:te.call(c,G)}})),z}}}),tt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(i){const{keyCode:s}=i;if(i.altKey&&!i.ctrlKey||i.metaKey||s>=tt.F1&&s<=tt.F12)return!1;switch(s){case tt.ALT:case tt.CAPS_LOCK:case tt.CONTEXT_MENU:case tt.CTRL:case tt.DOWN:case tt.END:case tt.ESC:case tt.HOME:case tt.INSERT:case tt.LEFT:case tt.MAC_FF_META:case tt.META:case tt.NUMLOCK:case tt.NUM_CENTER:case tt.PAGE_DOWN:case tt.PAGE_UP:case tt.PAUSE:case tt.PRINT_SCREEN:case tt.RIGHT:case tt.SHIFT:case tt.UP:case tt.WIN_KEY:case tt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(i){if(i>=tt.ZERO&&i<=tt.NINE||i>=tt.NUM_ZERO&&i<=tt.NUM_MULTIPLY||i>=tt.A&&i<=tt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&i===0)return!0;switch(i){case tt.SPACE:case tt.QUESTION_MARK:case tt.NUM_PLUS:case tt.NUM_MINUS:case tt.NUM_PERIOD:case tt.NUM_DIVISION:case tt.SEMICOLON:case tt.DASH:case tt.EQUALS:case tt.COMMA:case tt.PERIOD:case tt.SLASH:case tt.APOSTROPHE:case tt.SINGLE_QUOTE:case tt.OPEN_SQUARE_BRACKET:case tt.BACKSLASH:case tt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},M_=`accept acceptcharset accesskey action allowfullscreen allowtransparency
|
|
53
|
-
alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
|
|
54
|
-
charset checked classid classname colspan cols content contenteditable contextmenu
|
|
55
|
-
controls coords crossorigin data datetime default defer dir disabled download draggable
|
|
56
|
-
enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
|
|
57
|
-
headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
|
|
58
|
-
is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
|
|
59
|
-
mediagroup method min minlength multiple muted name novalidate nonce open
|
|
60
|
-
optimum pattern placeholder poster preload radiogroup readonly rel required
|
|
61
|
-
reversed role rowspan rows sandbox scope scoped scrolling seamless selected
|
|
62
|
-
shape size sizes span spellcheck src srcdoc srclang srcset start step style
|
|
63
|
-
summary tabindex target title type usemap value width wmode wrap onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
|
|
64
|
-
onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
|
|
65
|
-
onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
|
|
66
|
-
onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
|
|
67
|
-
onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
|
|
68
|
-
onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
|
|
69
|
-
onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`.split(/[\s\n]+/),jH="aria-",FH="data-";function R_(i,s){return i.indexOf(s)===0}function ZH(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c;s===!1?c={aria:!0,data:!0,attr:!0}:s===!0?c={aria:!0}:c=ee({},s);const d={};return Object.keys(i).forEach(p=>{(c.aria&&(p==="role"||R_(p,jH))||c.data&&R_(p,FH)||c.attr&&(M_.includes(p)||M_.includes(p.toLowerCase())))&&(d[p]=i[p])}),d}function Ea(i){const s=typeof i=="function"?i():i,c=o.ref(s);function d(p){c.value=p}return[c,d]}var WH=Symbol("iconContext"),I_=function(){return o.inject(WH,{prefixCls:o.ref("anticon"),rootClassName:o.ref(""),csp:o.ref()})};function HO(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function zH(i,s){return i&&i.contains?i.contains(s):!1}var Q_="data-vc-order",UH="vc-icon-key",YO=new Map;function D_(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=i.mark;return s?s.startsWith("data-")?s:"data-".concat(s):UH}function XO(i){if(i.attachTo)return i.attachTo;var s=document.querySelector("head");return s||document.body}function HH(i){return i==="queue"?"prependQueue":i?"prepend":"append"}function B_(i){return Array.from((YO.get(i)||i).children).filter(function(s){return s.tagName==="STYLE"})}function L_(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!HO())return null;var c=s.csp,d=s.prepend,p=document.createElement("style");p.setAttribute(Q_,HH(d)),c&&c.nonce&&(p.nonce=c.nonce),p.innerHTML=i;var m=XO(s),y=m.firstChild;if(d){if(d==="queue"){var w=B_(m).filter(function(S){return["prepend","prependQueue"].includes(S.getAttribute(Q_))});if(w.length)return m.insertBefore(p,w[w.length-1].nextSibling),p}m.insertBefore(p,y)}else m.appendChild(p);return p}function YH(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=XO(s);return B_(c).find(function(d){return d.getAttribute(D_(s))===i})}function XH(i,s){var c=YO.get(i);if(!c||!zH(document,c)){var d=L_("",s),p=d.parentNode;YO.set(i,p),i.removeChild(d)}}function GH(i,s){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=XO(c);XH(d,c);var p=YH(s,c);if(p)return c.csp&&c.csp.nonce&&p.nonce!==c.csp.nonce&&(p.nonce=c.csp.nonce),p.innerHTML!==i&&(p.innerHTML=i),p;var m=L_(i,c);return m.setAttribute(D_(c),s),m}function V_(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){KH(i,p,c[p])})}return i}function KH(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}function JH(i,s){process.env.NODE_ENV!=="production"&&!i&&console!==void 0&&console.error("Warning: ".concat(s))}function $H(i,s){JH(i,"[@ant-design/icons-vue] ".concat(s))}function j_(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function GO(i,s,c){return c?o.h(i.tag,V_({key:s},c,i.attrs),(i.children||[]).map(function(d,p){return GO(d,"".concat(s,"-").concat(i.tag,"-").concat(p))})):o.h(i.tag,V_({key:s},i.attrs),(i.children||[]).map(function(d,p){return GO(d,"".concat(s,"-").concat(i.tag,"-").concat(p))}))}function F_(i){return xa(i)[0]}function Z_(i){return i?Array.isArray(i)?i:[i]:[]}var qH=`
|
|
70
|
-
.anticon {
|
|
71
|
-
display: inline-block;
|
|
72
|
-
color: inherit;
|
|
73
|
-
font-style: normal;
|
|
74
|
-
line-height: 0;
|
|
75
|
-
text-align: center;
|
|
76
|
-
text-transform: none;
|
|
77
|
-
vertical-align: -0.125em;
|
|
78
|
-
text-rendering: optimizeLegibility;
|
|
79
|
-
-webkit-font-smoothing: antialiased;
|
|
80
|
-
-moz-osx-font-smoothing: grayscale;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.anticon > * {
|
|
84
|
-
line-height: 1;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.anticon svg {
|
|
88
|
-
display: inline-block;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.anticon::before {
|
|
92
|
-
display: none;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.anticon .anticon-icon {
|
|
96
|
-
display: block;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.anticon[tabindex] {
|
|
100
|
-
cursor: pointer;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.anticon-spin::before,
|
|
104
|
-
.anticon-spin {
|
|
105
|
-
display: inline-block;
|
|
106
|
-
-webkit-animation: loadingCircle 1s infinite linear;
|
|
107
|
-
animation: loadingCircle 1s infinite linear;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
@-webkit-keyframes loadingCircle {
|
|
111
|
-
100% {
|
|
112
|
-
-webkit-transform: rotate(360deg);
|
|
113
|
-
transform: rotate(360deg);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@keyframes loadingCircle {
|
|
118
|
-
100% {
|
|
119
|
-
-webkit-transform: rotate(360deg);
|
|
120
|
-
transform: rotate(360deg);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
`;function W_(i){return i&&i.getRootNode&&i.getRootNode()}function eY(i){return HO()?W_(i)instanceof ShadowRoot:!1}function tY(i){return eY(i)?W_(i):null}var nY=function(){var i=I_(),s=i.prefixCls,c=i.csp,d=o.getCurrentInstance(),p=qH;s&&(p=p.replace(/anticon/g,s.value)),o.nextTick(function(){if(HO()){var m=d.vnode.el,y=tY(m);GH(p,"@ant-design-vue-icons",{prepend:!0,csp:c.value,attachTo:y})}})},oY=["icon","primaryColor","secondaryColor"];function iY(i,s){if(i==null)return{};var c=rY(i,s),d,p;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(i);for(p=0;p<m.length;p++)d=m[p],!(s.indexOf(d)>=0)&&Object.prototype.propertyIsEnumerable.call(i,d)&&(c[d]=i[d])}return c}function rY(i,s){if(i==null)return{};var c={},d=Object.keys(i),p,m;for(m=0;m<d.length;m++)p=d[m],!(s.indexOf(p)>=0)&&(c[p]=i[p]);return c}function Vf(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){aY(i,p,c[p])})}return i}function aY(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var Zc=o.reactive({primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1});function sY(i){var s=i.primaryColor,c=i.secondaryColor;Zc.primaryColor=s,Zc.secondaryColor=c||F_(s),Zc.calculated=!!c}function lY(){return Vf({},Zc)}var wr=function(i,s){var c=Vf({},i,s.attrs),d=c.icon,p=c.primaryColor,m=c.secondaryColor,y=iY(c,oY),w=Zc;if(p&&(w={primaryColor:p,secondaryColor:m||F_(p)}),$H(j_(d),"icon should be icon definiton, but got ".concat(d)),!j_(d))return null;var S=d;return S&&typeof S.icon=="function"&&(S=Vf({},S,{icon:S.icon(w.primaryColor,w.secondaryColor)})),GO(S.icon,"svg-".concat(S.name),Vf({},y,{"data-icon":S.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};wr.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},wr.inheritAttrs=!1,wr.displayName="IconBase",wr.getTwoToneColors=lY,wr.setTwoToneColors=sY;function cY(i,s){return hY(i)||fY(i,s)||dY(i,s)||uY()}function uY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
124
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dY(i,s){if(i){if(typeof i=="string")return z_(i,s);var c=Object.prototype.toString.call(i).slice(8,-1);if(c==="Object"&&i.constructor&&(c=i.constructor.name),c==="Map"||c==="Set")return Array.from(i);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return z_(i,s)}}function z_(i,s){(s==null||s>i.length)&&(s=i.length);for(var c=0,d=new Array(s);c<s;c++)d[c]=i[c];return d}function fY(i,s){var c=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(c!=null){var d=[],p=!0,m=!1,y,w;try{for(c=c.call(i);!(p=(y=c.next()).done)&&(d.push(y.value),!(s&&d.length===s));p=!0);}catch(S){m=!0,w=S}finally{try{!p&&c.return!=null&&c.return()}finally{if(m)throw w}}return d}}function hY(i){if(Array.isArray(i))return i}function U_(i){var s=Z_(i),c=cY(s,2),d=c[0],p=c[1];return wr.setTwoToneColors({primaryColor:d,secondaryColor:p})}function pY(){var i=wr.getTwoToneColors();return i.calculated?[i.primaryColor,i.secondaryColor]:i.primaryColor}var mY=o.defineComponent({name:"InsertStyles",setup:function(){return nY(),function(){return null}}}),gY=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function OY(i,s){return xY(i)||bY(i,s)||yY(i,s)||vY()}function vY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
125
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yY(i,s){if(i){if(typeof i=="string")return H_(i,s);var c=Object.prototype.toString.call(i).slice(8,-1);if(c==="Object"&&i.constructor&&(c=i.constructor.name),c==="Map"||c==="Set")return Array.from(i);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return H_(i,s)}}function H_(i,s){(s==null||s>i.length)&&(s=i.length);for(var c=0,d=new Array(s);c<s;c++)d[c]=i[c];return d}function bY(i,s){var c=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(c!=null){var d=[],p=!0,m=!1,y,w;try{for(c=c.call(i);!(p=(y=c.next()).done)&&(d.push(y.value),!(s&&d.length===s));p=!0);}catch(S){m=!0,w=S}finally{try{!p&&c.return!=null&&c.return()}finally{if(m)throw w}}return d}}function xY(i){if(Array.isArray(i))return i}function Y_(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){Wc(i,p,c[p])})}return i}function Wc(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}function wY(i,s){if(i==null)return{};var c=SY(i,s),d,p;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(i);for(p=0;p<m.length;p++)d=m[p],!(s.indexOf(d)>=0)&&Object.prototype.propertyIsEnumerable.call(i,d)&&(c[d]=i[d])}return c}function SY(i,s){if(i==null)return{};var c={},d=Object.keys(i),p,m;for(m=0;m<d.length;m++)p=d[m],!(s.indexOf(p)>=0)&&(c[p]=i[p]);return c}U_(pz.primary);var Un=function(i,s){var c,d=Y_({},i,s.attrs),p=d.class,m=d.icon,y=d.spin,w=d.rotate,S=d.tabindex,N=d.twoToneColor,P=d.onClick,_=wY(d,gY),T=I_(),Q=T.prefixCls,Z=T.rootClassName,z=(c={},Wc(c,Z.value,!!Z.value),Wc(c,Q.value,!0),Wc(c,"".concat(Q.value,"-").concat(m.name),!!m.name),Wc(c,"".concat(Q.value,"-spin"),!!y||m.name==="loading"),c),G=S;G===void 0&&P&&(G=-1);var te=w?{msTransform:"rotate(".concat(w,"deg)"),transform:"rotate(".concat(w,"deg)")}:void 0,$=Z_(N),H=OY($,2),X=H[0],re=H[1];return o.createVNode("span",Y_({role:"img","aria-label":m.name},_,{onClick:P,class:[z,p],tabindex:G}),[o.createVNode(wr,{icon:m,primaryColor:X,secondaryColor:re,style:te},null),o.createVNode(mY,null,null)])};Un.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]},Un.displayName="AntdIcon",Un.inheritAttrs=!1,Un.getTwoToneColor=pY,Un.setTwoToneColor=U_;var CY={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function X_(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){kY(i,p,c[p])})}return i}function kY(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var Ta=function(i,s){var c=X_({},i,s.attrs);return o.createVNode(Un,X_({},c,{icon:CY}),null)};Ta.displayName="LoadingOutlined",Ta.inheritAttrs=!1;var PY={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function G_(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){_Y(i,p,c[p])})}return i}function _Y(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var Xs=function(i,s){var c=G_({},i,s.attrs);return o.createVNode(Un,G_({},c,{icon:PY}),null)};Xs.displayName="CloseOutlined",Xs.inheritAttrs=!1;var EY={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function K_(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){TY(i,p,c[p])})}return i}function TY(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var Na=function(i,s){var c=K_({},i,s.attrs);return o.createVNode(Un,K_({},c,{icon:EY}),null)};Na.displayName="CloseCircleFilled",Na.inheritAttrs=!1;function J_(i){const s=Symbol("contextKey");return{useProvide:(c,d)=>{const p=o.reactive({});return o.provide(s,p),o.watchEffect(()=>{ee(p,c,d||{})}),p},useInject:()=>o.inject(s,i)||{}}}const NY=i=>{const{componentCls:s}=i;return{[s]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},AY=i=>{const{componentCls:s}=i;return{[s]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${s}-item`]:{"&:empty":{display:"none"}}}}},MY=wa("Space",i=>[AY(i),NY(i)]);var RY="[object Map]",IY="[object Set]",QY=Object.prototype,DY=QY.hasOwnProperty;function $_(i){if(i==null)return!0;if(_H(i)&&(BU(i)||typeof i=="string"||typeof i.splice=="function"||UU(i)||bH(i)||FU(i)))return!i.length;var s=Pa(i);if(s==RY||s==IY)return!i.size;if(y_(i))return!PH(i).length;for(var c in i)if(DY.call(i,c))return!1;return!0}const BY=()=>({compactSize:String,compactDirection:Ft.oneOf(pf("horizontal","vertical")).def("horizontal"),isFirstItem:Ls(),isLastItem:Ls()}),jf=J_(null),LY=(i,s)=>{const c=jf.useInject(),d=o.computed(()=>{if(!c||$_(c))return"";const{compactDirection:p,isFirstItem:m,isLastItem:y}=c,w=p==="vertical"?"-vertical-":"-";return jt({[`${i.value}-compact${w}item`]:!0,[`${i.value}-compact${w}first-item`]:m,[`${i.value}-compact${w}last-item`]:y,[`${i.value}-compact${w}item-rtl`]:s.value==="rtl"})});return{compactSize:o.computed(()=>c?.compactSize),compactDirection:o.computed(()=>c?.compactDirection),compactItemClassnames:d}};o.defineComponent({name:"NoCompactStyle",setup(i,s){let{slots:c}=s;return jf.useProvide(null),()=>{var d;return(d=c.default)===null||d===void 0?void 0:d.call(c)}}});const VY=()=>({prefixCls:String,size:{type:String},direction:Ft.oneOf(pf("horizontal","vertical")).def("horizontal"),align:Ft.oneOf(pf("start","end","center","baseline")),block:{type:Boolean,default:void 0}}),jY=o.defineComponent({name:"CompactItem",props:BY(),setup(i,s){let{slots:c}=s;return jf.useProvide(i),()=>{var d;return(d=c.default)===null||d===void 0?void 0:d.call(c)}}});o.defineComponent({name:"ASpaceCompact",inheritAttrs:!1,props:VY(),setup(i,s){let{attrs:c,slots:d}=s;const{prefixCls:p,direction:m}=wi("space-compact",i),y=jf.useInject(),[w,S]=MY(p),N=o.computed(()=>jt(p.value,S.value,{[`${p.value}-rtl`]:m.value==="rtl",[`${p.value}-block`]:i.block,[`${p.value}-vertical`]:i.direction==="vertical"}));return()=>{var P;const _=_c(((P=d.default)===null||P===void 0?void 0:P.call(d))||[]);return _.length===0?null:w(o.createVNode("div",Je(Je({},c),{},{class:[N.value,c.class]}),[_.map((T,Q)=>{var Z;const z=T&&T.key||`${p.value}-item-${Q}`,G=!y||$_(y);return o.createVNode(jY,{key:z,compactSize:(Z=i.size)!==null&&Z!==void 0?Z:"middle",compactDirection:i.direction,isFirstItem:Q===0&&(G||y?.isFirstItem),isLastItem:Q===_.length-1&&(G||y?.isLastItem)},{default:()=>[T]})})]))}}});const FY=i=>({animationDuration:i,animationFillMode:"both"}),ZY=i=>({animationDuration:i,animationFillMode:"both"}),q_=function(i,s,c,d){const p=arguments.length>4&&arguments[4]!==void 0&&arguments[4]?"&":"";return{[`
|
|
126
|
-
${p}${i}-enter,
|
|
127
|
-
${p}${i}-appear
|
|
128
|
-
`]:ee(ee({},FY(d)),{animationPlayState:"paused"}),[`${p}${i}-leave`]:ee(ee({},ZY(d)),{animationPlayState:"paused"}),[`
|
|
129
|
-
${p}${i}-enter${i}-enter-active,
|
|
130
|
-
${p}${i}-appear${i}-appear-active
|
|
131
|
-
`]:{animationName:s,animationPlayState:"running"},[`${p}${i}-leave${i}-leave-active`]:{animationName:c,animationPlayState:"running",pointerEvents:"none"}}},WY=new Kt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),zY=new Kt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),UY=function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:c}=i,d=`${c}-fade`,p=s?"&":"";return[q_(d,WY,zY,i.motionDurationMid,s),{[`
|
|
132
|
-
${p}${d}-enter,
|
|
133
|
-
${p}${d}-appear
|
|
134
|
-
`]:{opacity:0,animationTimingFunction:"linear"},[`${p}${d}-leave`]:{animationTimingFunction:"linear"}}]},HY=new Kt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),YY=new Kt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),eE=new Kt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),tE=new Kt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),XY=new Kt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),GY=new Kt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),KY=new Kt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),JY=new Kt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),$Y=new Kt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),qY=new Kt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),eX=new Kt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),tX=new Kt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),nX={zoom:{inKeyframes:HY,outKeyframes:YY},"zoom-big":{inKeyframes:eE,outKeyframes:tE},"zoom-big-fast":{inKeyframes:eE,outKeyframes:tE},"zoom-left":{inKeyframes:KY,outKeyframes:JY},"zoom-right":{inKeyframes:$Y,outKeyframes:qY},"zoom-up":{inKeyframes:XY,outKeyframes:GY},"zoom-down":{inKeyframes:eX,outKeyframes:tX}},oX=(i,s)=>{const{antCls:c}=i,d=`${c}-${s}`,{inKeyframes:p,outKeyframes:m}=nX[s];return[q_(d,p,m,i.motionDurationMid),{[`
|
|
135
|
-
${d}-enter,
|
|
136
|
-
${d}-appear
|
|
137
|
-
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:i.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${d}-leave`]:{animationTimingFunction:i.motionEaseInOutCirc}}]};function iX(i,s,c){const{focusElCls:d,focus:p,borderElCls:m}=c,y=m?"> *":"",w=["hover",p?"focus":null,"active"].filter(Boolean).map(S=>`&:${S} ${y}`).join(",");return{[`&-item:not(${s}-last-item)`]:{marginInlineEnd:-i.lineWidth},"&-item":ee(ee({[w]:{zIndex:2}},d?{[`&${d}`]:{zIndex:2}}:{}),{[`&[disabled] ${y}`]:{zIndex:0}})}}function rX(i,s,c){const{borderElCls:d}=c,p=d?`> ${d}`:"";return{[`&-item:not(${s}-first-item):not(${s}-last-item) ${p}`]:{borderRadius:0},[`&-item:not(${s}-last-item)${s}-first-item`]:{[`& ${p}, &${i}-sm ${p}, &${i}-lg ${p}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${s}-first-item)${s}-last-item`]:{[`& ${p}, &${i}-sm ${p}, &${i}-lg ${p}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function aX(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:c}=i,d=`${c}-compact`;return{[d]:ee(ee({},iX(i,d,s)),rX(c,d,s))}}var sX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function nE(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){lX(i,p,c[p])})}return i}function lX(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var KO=function(i,s){var c=nE({},i,s.attrs);return o.createVNode(Un,nE({},c,{icon:sX}),null)};KO.displayName="CheckCircleOutlined",KO.inheritAttrs=!1;var cX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};function oE(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){uX(i,p,c[p])})}return i}function uX(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var JO=function(i,s){var c=oE({},i,s.attrs);return o.createVNode(Un,oE({},c,{icon:cX}),null)};JO.displayName="ExclamationCircleOutlined",JO.inheritAttrs=!1;var dX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};function iE(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){fX(i,p,c[p])})}return i}function fX(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var $O=function(i,s){var c=iE({},i,s.attrs);return o.createVNode(Un,iE({},c,{icon:dX}),null)};$O.displayName="InfoCircleOutlined",$O.inheritAttrs=!1;var hX={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"};function rE(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){pX(i,p,c[p])})}return i}function pX(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var qO=function(i,s){var c=rE({},i,s.attrs);return o.createVNode(Un,rE({},c,{icon:hX}),null)};qO.displayName="CloseCircleOutlined",qO.inheritAttrs=!1;var mX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function aE(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){gX(i,p,c[p])})}return i}function gX(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var Aa=function(i,s){var c=aE({},i,s.attrs);return o.createVNode(Un,aE({},c,{icon:mX}),null)};Aa.displayName="CheckCircleFilled",Aa.inheritAttrs=!1;var OX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};function sE(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){vX(i,p,c[p])})}return i}function vX(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var Ma=function(i,s){var c=sE({},i,s.attrs);return o.createVNode(Un,sE({},c,{icon:OX}),null)};Ma.displayName="ExclamationCircleFilled",Ma.inheritAttrs=!1;var yX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};function lE(i){for(var s=1;s<arguments.length;s++){var c=arguments[s]!=null?Object(arguments[s]):{},d=Object.keys(c);typeof Object.getOwnPropertySymbols=="function"&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable}))),d.forEach(function(p){bX(i,p,c[p])})}return i}function bX(i,s,c){return s in i?Object.defineProperty(i,s,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[s]=c,i}var Ra=function(i,s){var c=lE({},i,s.attrs);return o.createVNode(Un,lE({},c,{icon:yX}),null)};Ra.displayName="InfoCircleFilled",Ra.inheritAttrs=!1;const xX=i=>{const{componentCls:s,colorPrimary:c}=i;return{[s]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${c})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${i.motionEaseOutCirc}`,`opacity 2s ${i.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},wX=wa("Wave",i=>[xX(i)]);function SX(i){const s=(i||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return s&&s[1]&&s[2]&&s[3]?!(s[1]===s[2]&&s[2]===s[3]):!0}function ev(i){return i&&i!=="#fff"&&i!=="#ffffff"&&i!=="rgb(255, 255, 255)"&&i!=="rgba(255, 255, 255, 1)"&&SX(i)&&!/rgba\((?:\d*, ){3}0\)/.test(i)&&i!=="transparent"}function CX(i){const{borderTopColor:s,borderColor:c,backgroundColor:d}=getComputedStyle(i);return ev(s)?s:ev(c)?c:ev(d)?d:null}function tv(i){return Number.isNaN(i)?0:i}const kX=o.defineComponent({props:{target:on(),className:String},setup(i){const s=o.shallowRef(null),[c,d]=Ea(null),[p,m]=Ea([]),[y,w]=Ea(0),[S,N]=Ea(0),[P,_]=Ea(0),[T,Q]=Ea(0),[Z,z]=Ea(!1);function G(){const{target:U}=i,ce=getComputedStyle(U);d(CX(U));const he=ce.position==="static",{borderLeftWidth:Qe,borderTopWidth:ke}=ce;w(he?U.offsetLeft:tv(-parseFloat(Qe))),N(he?U.offsetTop:tv(-parseFloat(ke))),_(U.offsetWidth),Q(U.offsetHeight);const{borderTopLeftRadius:He,borderTopRightRadius:je,borderBottomLeftRadius:Me,borderBottomRightRadius:ae}=ce;m([He,je,ae,Me].map(ue=>tv(parseFloat(ue))))}let te,$,H;const X=()=>{clearTimeout(H),Ec.cancel($),te?.disconnect()},re=()=>{var U;const ce=(U=s.value)===null||U===void 0?void 0:U.parentElement;ce&&(o.render(null,ce),ce.parentElement&&ce.parentElement.removeChild(ce))};o.onMounted(()=>{X(),H=setTimeout(()=>{re()},5e3);const{target:U}=i;U&&($=Ec(()=>{G(),z(!0)}),typeof ResizeObserver<"u"&&(te=new ResizeObserver(G),te.observe(U)))}),o.onBeforeUnmount(()=>{X()});const oe=U=>{U.propertyName==="opacity"&&re()};return()=>{if(!Z.value)return null;const U={left:`${y.value}px`,top:`${S.value}px`,width:`${P.value}px`,height:`${T.value}px`,borderRadius:p.value.map(ce=>`${ce}px`).join(" ")};return c&&(U["--wave-color"]=c.value),o.createVNode(o.Transition,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[o.createVNode("div",{ref:s,class:i.className,style:U,onTransitionend:oe},null)]})}}});function PX(i,s){const c=document.createElement("div");c.style.position="absolute",c.style.left="0px",c.style.top="0px",i?.insertBefore(c,i?.firstChild),o.render(o.createVNode(kX,{target:i,className:s},null),c)}function _X(i,s,c){function d(){var p;const m=hf(i);!((p=c?.value)===null||p===void 0)&&p.disabled||!m||PX(m,s.value)}return d}const EX=o.defineComponent({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(i,s){let{slots:c}=s;const d=o.getCurrentInstance(),{prefixCls:p,wave:m}=wi("wave",i),[,y]=wX(p),w=_X(d,o.computed(()=>jt(p.value,y.value)),m);let S;const N=()=>{hf(d).removeEventListener("click",S,!0)};return o.onMounted(()=>{o.watch(()=>i.disabled,()=>{N(),o.nextTick(()=>{const P=hf(d);P?.removeEventListener("click",S,!0),!(!P||P.nodeType!==1||i.disabled)&&(S=_=>{_.target.tagName==="INPUT"||!dU(_.target)||!P.getAttribute||P.getAttribute("disabled")||P.disabled||P.className.includes("disabled")||P.className.includes("-leave")||w()},P.addEventListener("click",S,!0))})},{immediate:!0,flush:"post"})}),o.onBeforeUnmount(()=>{N()}),()=>{var P;return(P=c.default)===null||P===void 0?void 0:P.call(c)[0]}}});function cE(i){return i==="danger"?{danger:!0}:{type:i}}const TX=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:Ft.any,href:String,target:String,title:String,onClick:Q2(),onMousedown:Q2()}),uE=i=>{i&&(i.style.width="0px",i.style.opacity="0",i.style.transform="scale(0)")},dE=i=>{o.nextTick(()=>{i&&(i.style.width=`${i.scrollWidth}px`,i.style.opacity="1",i.style.transform="scale(1)")})},fE=i=>{i&&i.style&&(i.style.width=null,i.style.opacity=null,i.style.transform=null)},NX=o.defineComponent({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(i){return()=>{const{existIcon:s,prefixCls:c,loading:d}=i;if(s)return o.createVNode("span",{class:`${c}-loading-icon`},[o.createVNode(Ta,null,null)]);const p=!!d;return o.createVNode(o.Transition,{name:`${c}-loading-icon-motion`,onBeforeEnter:uE,onEnter:dE,onAfterEnter:fE,onBeforeLeave:dE,onLeave:m=>{setTimeout(()=>{uE(m)})},onAfterLeave:fE},{default:()=>[p?o.createVNode("span",{class:`${c}-loading-icon`},[o.createVNode(Ta,null,null)]):null]})}}}),hE=(i,s)=>({[`> span, > ${i}`]:{"&:not(:last-child)":{[`&, & > ${i}`]:{"&:not(:disabled)":{borderInlineEndColor:s}}},"&:not(:first-child)":{[`&, & > ${i}`]:{"&:not(:disabled)":{borderInlineStartColor:s}}}}}),AX=i=>{const{componentCls:s,fontSize:c,lineWidth:d,colorPrimaryHover:p,colorErrorHover:m}=i;return{[`${s}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${s}`]:{"&:not(:last-child)":{[`&, & > ${s}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-d,[`&, & > ${s}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[s]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${s}-icon-only`]:{fontSize:c}},hE(`${s}-primary`,p),hE(`${s}-danger`,m)]}};function MX(i,s){return{[`&-item:not(${s}-last-item)`]:{marginBottom:-i.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function RX(i,s){return{[`&-item:not(${s}-first-item):not(${s}-last-item)`]:{borderRadius:0},[`&-item${s}-first-item:not(${s}-last-item)`]:{[`&, &${i}-sm, &${i}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${s}-last-item:not(${s}-first-item)`]:{[`&, &${i}-sm, &${i}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function IX(i){const s=`${i.componentCls}-compact-vertical`;return{[s]:ee(ee({},MX(i,s)),RX(i.componentCls,s))}}const QX=i=>{const{componentCls:s,iconCls:c}=i;return{[s]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${i.lineWidth}px ${i.lineType} transparent`,cursor:"pointer",transition:`all ${i.motionDurationMid} ${i.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:i.lineHeight,color:i.colorText,"> span":{display:"inline-block"},[`> ${c} + span, > span + ${c}`]:{marginInlineStart:i.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":ee({},RP(i)),[`&-icon-only${s}-compact-item`]:{flex:"none"},[`&-compact-item${s}-primary`]:{[`&:not([disabled]) + ${s}-compact-item${s}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-i.lineWidth,insetInlineStart:-i.lineWidth,display:"inline-block",width:i.lineWidth,height:`calc(100% + ${i.lineWidth*2}px)`,backgroundColor:i.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${s}-primary`]:{[`&:not([disabled]) + ${s}-compact-vertical-item${s}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-i.lineWidth,insetInlineStart:-i.lineWidth,display:"inline-block",width:`calc(100% + ${i.lineWidth*2}px)`,height:i.lineWidth,backgroundColor:i.colorPrimaryHover,content:'""'}}}}}}},ji=(i,s)=>({"&:not(:disabled)":{"&:hover":i,"&:active":s}}),DX=i=>({minWidth:i.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),BX=i=>({borderRadius:i.controlHeight,paddingInlineStart:i.controlHeight/2,paddingInlineEnd:i.controlHeight/2}),nv=i=>({cursor:"not-allowed",borderColor:i.colorBorder,color:i.colorTextDisabled,backgroundColor:i.colorBgContainerDisabled,boxShadow:"none"}),Ff=(i,s,c,d,p,m,y)=>({[`&${i}-background-ghost`]:ee(ee({color:s||void 0,backgroundColor:"transparent",borderColor:c||void 0,boxShadow:"none"},ji(ee({backgroundColor:"transparent"},m),ee({backgroundColor:"transparent"},y))),{"&:disabled":{cursor:"not-allowed",color:d||void 0,borderColor:p||void 0}})}),ov=i=>({"&:disabled":ee({},nv(i))}),pE=i=>ee({},ov(i)),Zf=i=>({"&:disabled":{cursor:"not-allowed",color:i.colorTextDisabled}}),mE=i=>ee(ee(ee(ee(ee({},pE(i)),{backgroundColor:i.colorBgContainer,borderColor:i.colorBorder,boxShadow:`0 ${i.controlOutlineWidth}px 0 ${i.controlTmpOutline}`}),ji({color:i.colorPrimaryHover,borderColor:i.colorPrimaryHover},{color:i.colorPrimaryActive,borderColor:i.colorPrimaryActive})),Ff(i.componentCls,i.colorBgContainer,i.colorBgContainer,i.colorTextDisabled,i.colorBorder)),{[`&${i.componentCls}-dangerous`]:ee(ee(ee({color:i.colorError,borderColor:i.colorError},ji({color:i.colorErrorHover,borderColor:i.colorErrorBorderHover},{color:i.colorErrorActive,borderColor:i.colorErrorActive})),Ff(i.componentCls,i.colorError,i.colorError,i.colorTextDisabled,i.colorBorder)),ov(i))}),LX=i=>ee(ee(ee(ee(ee({},pE(i)),{color:i.colorTextLightSolid,backgroundColor:i.colorPrimary,boxShadow:`0 ${i.controlOutlineWidth}px 0 ${i.controlOutline}`}),ji({color:i.colorTextLightSolid,backgroundColor:i.colorPrimaryHover},{color:i.colorTextLightSolid,backgroundColor:i.colorPrimaryActive})),Ff(i.componentCls,i.colorPrimary,i.colorPrimary,i.colorTextDisabled,i.colorBorder,{color:i.colorPrimaryHover,borderColor:i.colorPrimaryHover},{color:i.colorPrimaryActive,borderColor:i.colorPrimaryActive})),{[`&${i.componentCls}-dangerous`]:ee(ee(ee({backgroundColor:i.colorError,boxShadow:`0 ${i.controlOutlineWidth}px 0 ${i.colorErrorOutline}`},ji({backgroundColor:i.colorErrorHover},{backgroundColor:i.colorErrorActive})),Ff(i.componentCls,i.colorError,i.colorError,i.colorTextDisabled,i.colorBorder,{color:i.colorErrorHover,borderColor:i.colorErrorHover},{color:i.colorErrorActive,borderColor:i.colorErrorActive})),ov(i))}),VX=i=>ee(ee({},mE(i)),{borderStyle:"dashed"}),jX=i=>ee(ee(ee({color:i.colorLink},ji({color:i.colorLinkHover},{color:i.colorLinkActive})),Zf(i)),{[`&${i.componentCls}-dangerous`]:ee(ee({color:i.colorError},ji({color:i.colorErrorHover},{color:i.colorErrorActive})),Zf(i))}),FX=i=>ee(ee(ee({},ji({color:i.colorText,backgroundColor:i.colorBgTextHover},{color:i.colorText,backgroundColor:i.colorBgTextActive})),Zf(i)),{[`&${i.componentCls}-dangerous`]:ee(ee({color:i.colorError},Zf(i)),ji({color:i.colorErrorHover,backgroundColor:i.colorErrorBg},{color:i.colorErrorHover,backgroundColor:i.colorErrorBg}))}),ZX=i=>ee(ee({},nv(i)),{[`&${i.componentCls}:hover`]:ee({},nv(i))}),WX=i=>{const{componentCls:s}=i;return{[`${s}-default`]:mE(i),[`${s}-primary`]:LX(i),[`${s}-dashed`]:VX(i),[`${s}-link`]:jX(i),[`${s}-text`]:FX(i),[`${s}-disabled`]:ZX(i)}},iv=function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:c,iconCls:d,controlHeight:p,fontSize:m,lineHeight:y,lineWidth:w,borderRadius:S,buttonPaddingHorizontal:N}=i,P=Math.max(0,(p-m*y)/2-w),_=N-w,T=`${c}-icon-only`;return[{[`${c}${s}`]:{fontSize:m,height:p,padding:`${P}px ${_}px`,borderRadius:S,[`&${T}`]:{width:p,paddingInlineStart:0,paddingInlineEnd:0,[`&${c}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${c}-loading`]:{opacity:i.opacityLoading,cursor:"default"},[`${c}-loading-icon`]:{transition:`width ${i.motionDurationSlow} ${i.motionEaseInOut}, opacity ${i.motionDurationSlow} ${i.motionEaseInOut}`},[`&:not(${T}) ${c}-loading-icon > ${d}`]:{marginInlineEnd:i.marginXS}}},{[`${c}${c}-circle${s}`]:DX(i)},{[`${c}${c}-round${s}`]:BX(i)}]},zX=i=>iv(i),UX=i=>{const s=br(i,{controlHeight:i.controlHeightSM,padding:i.paddingXS,buttonPaddingHorizontal:8,borderRadius:i.borderRadiusSM});return iv(s,`${i.componentCls}-sm`)},HX=i=>{const s=br(i,{controlHeight:i.controlHeightLG,fontSize:i.fontSizeLG,borderRadius:i.borderRadiusLG});return iv(s,`${i.componentCls}-lg`)},YX=i=>{const{componentCls:s}=i;return{[s]:{[`&${s}-block`]:{width:"100%"}}}},XX=wa("Button",i=>{const{controlTmpOutline:s,paddingContentHorizontal:c}=i,d=br(i,{colorOutlineDefault:s,buttonPaddingHorizontal:c});return[QX(d),UX(d),zX(d),HX(d),YX(d),WX(d),AX(d),aX(i,{focus:!1}),IX(i)]}),GX=()=>({prefixCls:String,size:{type:String}}),gE=J_(),rv=o.defineComponent({compatConfig:{MODE:3},name:"AButtonGroup",props:GX(),setup(i,s){let{slots:c}=s;const{prefixCls:d,direction:p}=wi("btn-group",i),[,,m]=Qc();gE.useProvide(o.reactive({size:o.computed(()=>i.size)}));const y=o.computed(()=>{const{size:w}=i;let S="";switch(w){case"large":S="lg";break;case"small":S="sm";break;case"middle":case void 0:break;default:o_(!w,"Button.Group","Invalid prop `size`.")}return{[`${d.value}`]:!0,[`${d.value}-${S}`]:S,[`${d.value}-rtl`]:p.value==="rtl",[m.value]:!0}});return()=>{var w;return o.createVNode("div",{class:y.value},[_c((w=c.default)===null||w===void 0?void 0:w.call(c))])}}}),OE=/^[\u4e00-\u9fa5]{2}$/,vE=OE.test.bind(OE);function Wf(i){return i==="text"||i==="link"}const Ia=o.defineComponent({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Pc(TX(),{type:"default"}),slots:Object,setup(i,s){let{slots:c,attrs:d,emit:p,expose:m}=s;const{prefixCls:y,autoInsertSpaceInButton:w,direction:S,size:N}=wi("btn",i),[P,_]=XX(y),T=gE.useInject(),Q=sO(),Z=o.computed(()=>{var je;return(je=i.disabled)!==null&&je!==void 0?je:Q.value}),z=o.shallowRef(null),G=o.shallowRef(void 0);let te=!1;const $=o.shallowRef(!1),H=o.shallowRef(!1),X=o.computed(()=>w.value!==!1),{compactSize:re,compactItemClassnames:oe}=LY(y,S),U=o.computed(()=>typeof i.loading=="object"&&i.loading.delay?i.loading.delay||!0:!!i.loading);o.watch(U,je=>{clearTimeout(G.value),typeof U.value=="number"?G.value=setTimeout(()=>{$.value=je},U.value):$.value=je},{immediate:!0});const ce=o.computed(()=>{const{type:je,shape:Me="default",ghost:ae,block:ue,danger:Ee}=i,xe=y.value,Ue={large:"lg",small:"sm",middle:void 0},Xe=re.value||T?.size||N.value,qe=Xe&&Ue[Xe]||"";return[oe.value,{[_.value]:!0,[`${xe}`]:!0,[`${xe}-${Me}`]:Me!=="default"&&Me,[`${xe}-${je}`]:je,[`${xe}-${qe}`]:qe,[`${xe}-loading`]:$.value,[`${xe}-background-ghost`]:ae&&!Wf(je),[`${xe}-two-chinese-chars`]:H.value&&X.value,[`${xe}-block`]:ue,[`${xe}-dangerous`]:!!Ee,[`${xe}-rtl`]:S.value==="rtl"}]}),he=()=>{const je=z.value;if(!je||w.value===!1)return;const Me=je.textContent;te&&vE(Me)?H.value||(H.value=!0):H.value&&(H.value=!1)},Qe=je=>{if($.value||Z.value){je.preventDefault();return}p("click",je)},ke=je=>{p("mousedown",je)},He=(je,Me)=>{const ae=Me?" ":"";if(je.type===o.Text){let ue=je.children.trim();return vE(ue)&&(ue=ue.split("").join(ae)),o.createVNode("span",null,[ue])}return je};return o.watchEffect(()=>{o_(!(i.ghost&&Wf(i.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),o.onMounted(he),o.onUpdated(he),o.onBeforeUnmount(()=>{G.value&&clearTimeout(G.value)}),m({focus:()=>{var je;(je=z.value)===null||je===void 0||je.focus()},blur:()=>{var je;(je=z.value)===null||je===void 0||je.blur()}}),()=>{var je,Me;const{icon:ae=(je=c.icon)===null||je===void 0?void 0:je.call(c)}=i,ue=_c((Me=c.default)===null||Me===void 0?void 0:Me.call(c));te=ue.length===1&&!ae&&!Wf(i.type);const{type:Ee,htmlType:xe,href:Ue,title:Xe,target:qe}=i,lt=$.value?"loading":ae,bt=ee(ee({},d),{title:Xe,disabled:Z.value,class:[ce.value,d.class,{[`${y.value}-icon-only`]:ue.length===0&&!!lt}],onClick:Qe,onMousedown:ke});Z.value||delete bt.disabled;const St=ae&&!$.value?ae:o.createVNode(NX,{existIcon:!!ae,prefixCls:y.value,loading:!!$.value},null),kt=ue.map(Zt=>He(Zt,te&&X.value));if(Ue!==void 0)return P(o.createVNode("a",Je(Je({},bt),{},{href:Ue,target:qe,ref:z}),[St,kt]));let an=o.createVNode("button",Je(Je({},bt),{},{ref:z,type:xe}),[St,kt]);if(!Wf(Ee)){const Zt=function(){return an}();an=o.createVNode(EX,{ref:"wave",disabled:!!$.value},{default:()=>[Zt]})}return P(an)}}});Ia.Group=rv,Ia.install=function(i){return i.component(Ia.name,Ia),i.component(rv.name,rv),i};var zf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof oi<"u"?oi:typeof self<"u"?self:{};function av(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var yE={exports:{}};(function(i,s){(function(c,d){i.exports=d()})(zf,function(){var c=1e3,d=6e4,p=36e5,m="millisecond",y="second",w="minute",S="hour",N="day",P="week",_="month",T="quarter",Q="year",Z="date",z="Invalid Date",G=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,te=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Me){var ae=["th","st","nd","rd"],ue=Me%100;return"["+Me+(ae[(ue-20)%10]||ae[ue]||ae[0])+"]"}},H=function(Me,ae,ue){var Ee=String(Me);return!Ee||Ee.length>=ae?Me:""+Array(ae+1-Ee.length).join(ue)+Me},X={s:H,z:function(Me){var ae=-Me.utcOffset(),ue=Math.abs(ae),Ee=Math.floor(ue/60),xe=ue%60;return(ae<=0?"+":"-")+H(Ee,2,"0")+":"+H(xe,2,"0")},m:function Me(ae,ue){if(ae.date()<ue.date())return-Me(ue,ae);var Ee=12*(ue.year()-ae.year())+(ue.month()-ae.month()),xe=ae.clone().add(Ee,_),Ue=ue-xe<0,Xe=ae.clone().add(Ee+(Ue?-1:1),_);return+(-(Ee+(ue-xe)/(Ue?xe-Xe:Xe-xe))||0)},a:function(Me){return Me<0?Math.ceil(Me)||0:Math.floor(Me)},p:function(Me){return{M:_,y:Q,w:P,d:N,D:Z,h:S,m:w,s:y,ms:m,Q:T}[Me]||String(Me||"").toLowerCase().replace(/s$/,"")},u:function(Me){return Me===void 0}},re="en",oe={};oe[re]=$;var U="$isDayjsObject",ce=function(Me){return Me instanceof He||!(!Me||!Me[U])},he=function Me(ae,ue,Ee){var xe;if(!ae)return re;if(typeof ae=="string"){var Ue=ae.toLowerCase();oe[Ue]&&(xe=Ue),ue&&(oe[Ue]=ue,xe=Ue);var Xe=ae.split("-");if(!xe&&Xe.length>1)return Me(Xe[0])}else{var qe=ae.name;oe[qe]=ae,xe=qe}return!Ee&&xe&&(re=xe),xe||!Ee&&re},Qe=function(Me,ae){if(ce(Me))return Me.clone();var ue=typeof ae=="object"?ae:{};return ue.date=Me,ue.args=arguments,new He(ue)},ke=X;ke.l=he,ke.i=ce,ke.w=function(Me,ae){return Qe(Me,{locale:ae.$L,utc:ae.$u,x:ae.$x,$offset:ae.$offset})};var He=function(){function Me(ue){this.$L=he(ue.locale,null,!0),this.parse(ue),this.$x=this.$x||ue.x||{},this[U]=!0}var ae=Me.prototype;return ae.parse=function(ue){this.$d=function(Ee){var xe=Ee.date,Ue=Ee.utc;if(xe===null)return new Date(NaN);if(ke.u(xe))return new Date;if(xe instanceof Date)return new Date(xe);if(typeof xe=="string"&&!/Z$/i.test(xe)){var Xe=xe.match(G);if(Xe){var qe=Xe[2]-1||0,lt=(Xe[7]||"0").substring(0,3);return Ue?new Date(Date.UTC(Xe[1],qe,Xe[3]||1,Xe[4]||0,Xe[5]||0,Xe[6]||0,lt)):new Date(Xe[1],qe,Xe[3]||1,Xe[4]||0,Xe[5]||0,Xe[6]||0,lt)}}return new Date(xe)}(ue),this.init()},ae.init=function(){var ue=this.$d;this.$y=ue.getFullYear(),this.$M=ue.getMonth(),this.$D=ue.getDate(),this.$W=ue.getDay(),this.$H=ue.getHours(),this.$m=ue.getMinutes(),this.$s=ue.getSeconds(),this.$ms=ue.getMilliseconds()},ae.$utils=function(){return ke},ae.isValid=function(){return this.$d.toString()!==z},ae.isSame=function(ue,Ee){var xe=Qe(ue);return this.startOf(Ee)<=xe&&xe<=this.endOf(Ee)},ae.isAfter=function(ue,Ee){return Qe(ue)<this.startOf(Ee)},ae.isBefore=function(ue,Ee){return this.endOf(Ee)<Qe(ue)},ae.$g=function(ue,Ee,xe){return ke.u(ue)?this[Ee]:this.set(xe,ue)},ae.unix=function(){return Math.floor(this.valueOf()/1e3)},ae.valueOf=function(){return this.$d.getTime()},ae.startOf=function(ue,Ee){var xe=this,Ue=!!ke.u(Ee)||Ee,Xe=ke.p(ue),qe=function(Wt,zt){var jn=ke.w(xe.$u?Date.UTC(xe.$y,zt,Wt):new Date(xe.$y,zt,Wt),xe);return Ue?jn:jn.endOf(N)},lt=function(Wt,zt){return ke.w(xe.toDate()[Wt].apply(xe.toDate("s"),(Ue?[0,0,0,0]:[23,59,59,999]).slice(zt)),xe)},bt=this.$W,St=this.$M,kt=this.$D,an="set"+(this.$u?"UTC":"");switch(Xe){case Q:return Ue?qe(1,0):qe(31,11);case _:return Ue?qe(1,St):qe(0,St+1);case P:var Zt=this.$locale().weekStart||0,Gn=(bt<Zt?bt+7:bt)-Zt;return qe(Ue?kt-Gn:kt+(6-Gn),St);case N:case Z:return lt(an+"Hours",0);case S:return lt(an+"Minutes",1);case w:return lt(an+"Seconds",2);case y:return lt(an+"Milliseconds",3);default:return this.clone()}},ae.endOf=function(ue){return this.startOf(ue,!1)},ae.$set=function(ue,Ee){var xe,Ue=ke.p(ue),Xe="set"+(this.$u?"UTC":""),qe=(xe={},xe[N]=Xe+"Date",xe[Z]=Xe+"Date",xe[_]=Xe+"Month",xe[Q]=Xe+"FullYear",xe[S]=Xe+"Hours",xe[w]=Xe+"Minutes",xe[y]=Xe+"Seconds",xe[m]=Xe+"Milliseconds",xe)[Ue],lt=Ue===N?this.$D+(Ee-this.$W):Ee;if(Ue===_||Ue===Q){var bt=this.clone().set(Z,1);bt.$d[qe](lt),bt.init(),this.$d=bt.set(Z,Math.min(this.$D,bt.daysInMonth())).$d}else qe&&this.$d[qe](lt);return this.init(),this},ae.set=function(ue,Ee){return this.clone().$set(ue,Ee)},ae.get=function(ue){return this[ke.p(ue)]()},ae.add=function(ue,Ee){var xe,Ue=this;ue=Number(ue);var Xe=ke.p(Ee),qe=function(St){var kt=Qe(Ue);return ke.w(kt.date(kt.date()+Math.round(St*ue)),Ue)};if(Xe===_)return this.set(_,this.$M+ue);if(Xe===Q)return this.set(Q,this.$y+ue);if(Xe===N)return qe(1);if(Xe===P)return qe(7);var lt=(xe={},xe[w]=d,xe[S]=p,xe[y]=c,xe)[Xe]||1,bt=this.$d.getTime()+ue*lt;return ke.w(bt,this)},ae.subtract=function(ue,Ee){return this.add(-1*ue,Ee)},ae.format=function(ue){var Ee=this,xe=this.$locale();if(!this.isValid())return xe.invalidDate||z;var Ue=ue||"YYYY-MM-DDTHH:mm:ssZ",Xe=ke.z(this),qe=this.$H,lt=this.$m,bt=this.$M,St=xe.weekdays,kt=xe.months,an=xe.meridiem,Zt=function(zt,jn,ko,Bo){return zt&&(zt[jn]||zt(Ee,Ue))||ko[jn].slice(0,Bo)},Gn=function(zt){return ke.s(qe%12||12,zt,"0")},Wt=an||function(zt,jn,ko){var Bo=zt<12?"AM":"PM";return ko?Bo.toLowerCase():Bo};return Ue.replace(te,function(zt,jn){return jn||function(ko){switch(ko){case"YY":return String(Ee.$y).slice(-2);case"YYYY":return ke.s(Ee.$y,4,"0");case"M":return bt+1;case"MM":return ke.s(bt+1,2,"0");case"MMM":return Zt(xe.monthsShort,bt,kt,3);case"MMMM":return Zt(kt,bt);case"D":return Ee.$D;case"DD":return ke.s(Ee.$D,2,"0");case"d":return String(Ee.$W);case"dd":return Zt(xe.weekdaysMin,Ee.$W,St,2);case"ddd":return Zt(xe.weekdaysShort,Ee.$W,St,3);case"dddd":return St[Ee.$W];case"H":return String(qe);case"HH":return ke.s(qe,2,"0");case"h":return Gn(1);case"hh":return Gn(2);case"a":return Wt(qe,lt,!0);case"A":return Wt(qe,lt,!1);case"m":return String(lt);case"mm":return ke.s(lt,2,"0");case"s":return String(Ee.$s);case"ss":return ke.s(Ee.$s,2,"0");case"SSS":return ke.s(Ee.$ms,3,"0");case"Z":return Xe}return null}(zt)||Xe.replace(":","")})},ae.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ae.diff=function(ue,Ee,xe){var Ue,Xe=this,qe=ke.p(Ee),lt=Qe(ue),bt=(lt.utcOffset()-this.utcOffset())*d,St=this-lt,kt=function(){return ke.m(Xe,lt)};switch(qe){case Q:Ue=kt()/12;break;case _:Ue=kt();break;case T:Ue=kt()/3;break;case P:Ue=(St-bt)/6048e5;break;case N:Ue=(St-bt)/864e5;break;case S:Ue=St/p;break;case w:Ue=St/d;break;case y:Ue=St/c;break;default:Ue=St}return xe?Ue:ke.a(Ue)},ae.daysInMonth=function(){return this.endOf(_).$D},ae.$locale=function(){return oe[this.$L]},ae.locale=function(ue,Ee){if(!ue)return this.$L;var xe=this.clone(),Ue=he(ue,Ee,!0);return Ue&&(xe.$L=Ue),xe},ae.clone=function(){return ke.w(this.$d,this)},ae.toDate=function(){return new Date(this.valueOf())},ae.toJSON=function(){return this.isValid()?this.toISOString():null},ae.toISOString=function(){return this.$d.toISOString()},ae.toString=function(){return this.$d.toUTCString()},Me}(),je=He.prototype;return Qe.prototype=je,[["$ms",m],["$s",y],["$m",w],["$H",S],["$W",N],["$M",_],["$y",Q],["$D",Z]].forEach(function(Me){je[Me[1]]=function(ae){return this.$g(ae,Me[0],Me[1])}}),Qe.extend=function(Me,ae){return Me.$i||(Me(ae,He,Qe),Me.$i=!0),Qe},Qe.locale=he,Qe.isDayjs=ce,Qe.unix=function(Me){return Qe(1e3*Me)},Qe.en=oe[re],Qe.Ls=oe,Qe.p={},Qe})})(yE);var bE=yE.exports;const KX=av(bE),JX=()=>Ho()&&window.document.documentElement;let Uf=ee({},Or.Modal);function $X(i){i?Uf=ee(ee({},Uf),i):Uf=ee({},Or.Modal)}function qX(){return Uf}const sv="internalMark",Hf=o.defineComponent({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(i,s){let{slots:c}=s;Fs(i.ANT_MARK__===sv,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");const d=o.reactive({antLocale:ee(ee({},i.locale),{exist:!0}),ANT_MARK__:sv});return o.provide("localeData",d),o.watch(()=>i.locale,p=>{$X(p&&p.Modal),d.antLocale=ee(ee({},p),{exist:!0})},{immediate:!0}),()=>{var p;return(p=c.default)===null||p===void 0?void 0:p.call(c)}}});Hf.install=function(i){return i.component(Hf.name,Hf),i};const eG=oO(Hf),Yf=o.defineComponent({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(i,s){let{attrs:c,slots:d}=s,p,m=!1;const y=o.computed(()=>i.duration===void 0?4.5:i.duration),w=()=>{y.value&&!m&&(p=setTimeout(()=>{N()},y.value*1e3))},S=()=>{p&&(clearTimeout(p),p=null)},N=_=>{_&&_.stopPropagation(),S();const{onClose:T,noticeKey:Q}=i;T&&T(Q)},P=()=>{S(),w()};return o.onMounted(()=>{w()}),o.onUnmounted(()=>{m=!0,S()}),o.watch([y,()=>i.updateMark,()=>i.visible],(_,T)=>{let[Q,Z,z]=_,[G,te,$]=T;(Q!==G||Z!==te||z!==$&&$)&&P()},{flush:"post"}),()=>{var _,T;const{prefixCls:Q,closable:Z,closeIcon:z=(_=d.closeIcon)===null||_===void 0?void 0:_.call(d),onClick:G,holder:te}=i,{class:$,style:H}=c,X=`${Q}-notice`,re=Object.keys(c).reduce((U,ce)=>((ce.startsWith("data-")||ce.startsWith("aria-")||ce==="role")&&(U[ce]=c[ce]),U),{}),oe=o.createVNode("div",Je({class:jt(X,$,{[`${X}-closable`]:Z}),style:H,onMouseenter:S,onMouseleave:w,onClick:G},re),[o.createVNode("div",{class:`${X}-content`},[(T=d.default)===null||T===void 0?void 0:T.call(d)]),Z?o.createVNode("a",{tabindex:0,onClick:N,class:`${X}-close`},[z||o.createVNode("span",{class:`${X}-close-x`},null)]):null]);return te?o.createVNode(o.Teleport,{to:te},{default:()=>oe}):oe}}});var tG=function(i,s){var c={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.indexOf(d)<0&&(c[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,d=Object.getOwnPropertySymbols(i);p<d.length;p++)s.indexOf(d[p])<0&&Object.prototype.propertyIsEnumerable.call(i,d[p])&&(c[d[p]]=i[d[p]]);return c};let xE=0;const nG=Date.now();function wE(){const i=xE;return xE+=1,`rcNotification_${nG}_${i}`}const Xf=o.defineComponent({name:"Notification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId"],setup(i,s){let{attrs:c,expose:d,slots:p}=s;const m=new Map,y=o.ref([]),w=o.computed(()=>{const{prefixCls:P,animation:_="fade"}=i;let T=i.transitionName;return!T&&_&&(T=`${P}-${_}`),P_(T)}),S=(P,_)=>{const T=P.key||wE(),Q=ee(ee({},P),{key:T}),{maxCount:Z}=i,z=y.value.map(te=>te.notice.key).indexOf(T),G=y.value.concat();z!==-1?G.splice(z,1,{notice:Q,holderCallback:_}):(Z&&y.value.length>=Z&&(Q.key=G[0].notice.key,Q.updateMark=wE(),Q.userPassKey=T,G.shift()),G.push({notice:Q,holderCallback:_})),y.value=G},N=P=>{y.value=y.value.filter(_=>{let{notice:{key:T,userPassKey:Q}}=_;return(Q||T)!==P})};return d({add:S,remove:N,notices:y}),()=>{var P;const{prefixCls:_,closeIcon:T=(P=p.closeIcon)===null||P===void 0?void 0:P.call(p,{prefixCls:_})}=i,Q=y.value.map((z,G)=>{let{notice:te,holderCallback:$}=z;const H=G===y.value.length-1?te.updateMark:void 0,{key:X,userPassKey:re}=te,{content:oe}=te,U=ee(ee(ee({prefixCls:_,closeIcon:typeof T=="function"?T({prefixCls:_}):T},te),te.props),{key:X,noticeKey:re||X,updateMark:H,onClose:ce=>{var he;N(ce),(he=te.onClose)===null||he===void 0||he.call(te)},onClick:te.onClick});return $?o.createVNode("div",{key:X,class:`${_}-hook-holder`,ref:ce=>{typeof X>"u"||(ce?(m.set(X,ce),$(ce,U)):m.delete(X))}},null):o.createVNode(Yf,Je(Je({},U),{},{class:jt(U.class,i.hashId)}),{default:()=>[typeof oe=="function"?oe({prefixCls:_}):oe]})}),Z={[_]:1,[c.class]:!!c.class,[i.hashId]:!0};return o.createVNode("div",{class:Z,style:c.style||{top:"65px",left:"50%"}},[o.createVNode(o.TransitionGroup,Je({tag:"div"},w.value),{default:()=>[Q]})])}}});Xf.newInstance=function(i,s){const c=i||{},{name:d="notification",getContainer:p,appContext:m,prefixCls:y,rootPrefixCls:w,transitionName:S,hasTransitionName:N,useStyle:P}=c,_=tG(c,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),T=document.createElement("div");p?p().appendChild(T):document.body.appendChild(T);const Q=o.defineComponent({compatConfig:{MODE:3},name:"NotificationWrapper",setup(z,G){let{attrs:te}=G;const $=o.shallowRef(),H=o.computed(()=>Mn.getPrefixCls(d,y)),[,X]=P(H);return o.onMounted(()=>{s({notice(re){var oe;(oe=$.value)===null||oe===void 0||oe.add(re)},removeNotice(re){var oe;(oe=$.value)===null||oe===void 0||oe.remove(re)},destroy(){o.render(null,T),T.parentNode&&T.parentNode.removeChild(T)},component:$})}),()=>{const re=Mn,oe=re.getRootPrefixCls(w,H.value),U=N?S:`${H.value}-${S}`;return o.createVNode(Js,Je(Je({},re),{},{prefixCls:oe}),{default:()=>[o.createVNode(Xf,Je(Je({ref:$},te),{},{prefixCls:H.value,transitionName:U,hashId:X.value}),null)]})}}}),Z=o.createVNode(Q,_);Z.appContext=m||Z.appContext,o.render(Z,T)};let SE=0;const oG=Date.now();function CE(){const i=SE;return SE+=1,`rcNotification_${oG}_${i}`}const iG=o.defineComponent({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(i,s){let{attrs:c,slots:d}=s;const p=new Map,m=o.computed(()=>i.notices),y=o.computed(()=>{let P=i.transitionName;if(!P&&i.animation)switch(typeof i.animation){case"string":P=i.animation;break;case"function":P=i.animation().name;break;case"object":P=i.animation.name;break;default:P=`${i.prefixCls}-fade`;break}return P_(P)}),w=P=>i.remove(P),S=o.ref({});o.watch(m,()=>{const P={};Object.keys(S.value).forEach(_=>{P[_]=[]}),i.notices.forEach(_=>{const{placement:T="topRight"}=_.notice;T&&(P[T]=P[T]||[],P[T].push(_))}),S.value=P});const N=o.computed(()=>Object.keys(S.value));return()=>{var P;const{prefixCls:_,closeIcon:T=(P=d.closeIcon)===null||P===void 0?void 0:P.call(d,{prefixCls:_})}=i,Q=N.value.map(Z=>{var z,G;const te=S.value[Z],$=(z=i.getClassName)===null||z===void 0?void 0:z.call(i,Z),H=(G=i.getStyles)===null||G===void 0?void 0:G.call(i,Z),X=te.map((U,ce)=>{let{notice:he,holderCallback:Qe}=U;const ke=ce===m.value.length-1?he.updateMark:void 0,{key:He,userPassKey:je}=he,{content:Me}=he,ae=ee(ee(ee({prefixCls:_,closeIcon:typeof T=="function"?T({prefixCls:_}):T},he),he.props),{key:He,noticeKey:je||He,updateMark:ke,onClose:ue=>{var Ee;w(ue),(Ee=he.onClose)===null||Ee===void 0||Ee.call(he)},onClick:he.onClick});return Qe?o.createVNode("div",{key:He,class:`${_}-hook-holder`,ref:ue=>{typeof He>"u"||(ue?(p.set(He,ue),Qe(ue,ae)):p.delete(He))}},null):o.createVNode(Yf,Je(Je({},ae),{},{class:jt(ae.class,i.hashId)}),{default:()=>[typeof Me=="function"?Me({prefixCls:_}):Me]})}),re={[_]:1,[`${_}-${Z}`]:1,[c.class]:!!c.class,[i.hashId]:!0,[$]:!!$};function oe(){var U;te.length>0||(Reflect.deleteProperty(S.value,Z),(U=i.onAllRemoved)===null||U===void 0||U.call(i))}return o.createVNode("div",{key:Z,class:re,style:c.style||H||{top:"65px",left:"50%"}},[o.createVNode(o.TransitionGroup,Je(Je({tag:"div"},y.value),{},{onAfterLeave:oe}),{default:()=>[X]})])});return o.createVNode(T_,{getContainer:i.getContainer},{default:()=>[Q]})}}});var rG=function(i,s){var c={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.indexOf(d)<0&&(c[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,d=Object.getOwnPropertySymbols(i);p<d.length;p++)s.indexOf(d[p])<0&&Object.prototype.propertyIsEnumerable.call(i,d[p])&&(c[d[p]]=i[d[p]]);return c};const aG=()=>document.body;let kE=0;function sG(){const i={};for(var s=arguments.length,c=new Array(s),d=0;d<s;d++)c[d]=arguments[d];return c.forEach(p=>{p&&Object.keys(p).forEach(m=>{const y=p[m];y!==void 0&&(i[m]=y)})}),i}function PE(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:s=aG,motion:c,prefixCls:d,maxCount:p,getClassName:m,getStyles:y,onAllRemoved:w}=i,S=rG(i,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),N=o.shallowRef([]),P=o.shallowRef(),_=(te,$)=>{const H=te.key||CE(),X=ee(ee({},te),{key:H}),re=N.value.map(U=>U.notice.key).indexOf(H),oe=N.value.concat();re!==-1?oe.splice(re,1,{notice:X,holderCallback:$}):(p&&N.value.length>=p&&(X.key=oe[0].notice.key,X.updateMark=CE(),X.userPassKey=H,oe.shift()),oe.push({notice:X,holderCallback:$})),N.value=oe},T=te=>{N.value=N.value.filter($=>{let{notice:{key:H,userPassKey:X}}=$;return(X||H)!==te})},Q=()=>{N.value=[]},Z=()=>o.createVNode(iG,{ref:P,prefixCls:d,maxCount:p,notices:N.value,remove:T,getClassName:m,getStyles:y,animation:c,hashId:i.hashId,onAllRemoved:w,getContainer:s},null),z=o.shallowRef([]),G={open:te=>{const $=sG(S,te);($.key===null||$.key===void 0)&&($.key=`vc-notification-${kE}`,kE+=1),z.value=[...z.value,{type:"open",config:$}]},close:te=>{z.value=[...z.value,{type:"close",key:te}]},destroy:()=>{z.value=[...z.value,{type:"destroy"}]}};return o.watch(z,()=>{z.value.length&&(z.value.forEach(te=>{switch(te.type){case"open":_(te.config);break;case"close":T(te.key);break;case"destroy":Q();break}}),z.value=[])}),[G,Z]}const lG=i=>{const{componentCls:s,iconCls:c,boxShadowSecondary:d,colorBgElevated:p,colorSuccess:m,colorError:y,colorWarning:w,colorInfo:S,fontSizeLG:N,motionEaseInOutCirc:P,motionDurationSlow:_,marginXS:T,paddingXS:Q,borderRadiusLG:Z,zIndexPopup:z,messageNoticeContentPadding:G}=i,te=new Kt("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:Q,transform:"translateY(0)",opacity:1}}),$=new Kt("MessageMoveOut",{"0%":{maxHeight:i.height,padding:Q,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[s]:ee(ee({},MO(i)),{position:"fixed",top:T,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:z,[`${s}-move-up`]:{animationFillMode:"forwards"},[`
|
|
138
|
-
${s}-move-up-appear,
|
|
139
|
-
${s}-move-up-enter
|
|
140
|
-
`]:{animationName:te,animationDuration:_,animationPlayState:"paused",animationTimingFunction:P},[`
|
|
141
|
-
${s}-move-up-appear${s}-move-up-appear-active,
|
|
142
|
-
${s}-move-up-enter${s}-move-up-enter-active
|
|
143
|
-
`]:{animationPlayState:"running"},[`${s}-move-up-leave`]:{animationName:$,animationDuration:_,animationPlayState:"paused",animationTimingFunction:P},[`${s}-move-up-leave${s}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[`${s}-notice`]:{padding:Q,textAlign:"center",[c]:{verticalAlign:"text-bottom",marginInlineEnd:T,fontSize:N},[`${s}-notice-content`]:{display:"inline-block",padding:G,background:p,borderRadius:Z,boxShadow:d,pointerEvents:"all"},[`${s}-success ${c}`]:{color:m},[`${s}-error ${c}`]:{color:y},[`${s}-warning ${c}`]:{color:w},[`
|
|
144
|
-
${s}-info ${c},
|
|
145
|
-
${s}-loading ${c}`]:{color:S}}},{[`${s}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},lv=wa("Message",i=>{const s=br(i,{messageNoticeContentPadding:`${(i.controlHeightLG-i.fontSize*i.lineHeight)/2}px ${i.paddingSM}px`});return[lG(s)]},i=>({height:150,zIndexPopup:i.zIndexPopupBase+10})),cG={info:o.createVNode(Ra,null,null),success:o.createVNode(Aa,null,null),error:o.createVNode(Na,null,null),warning:o.createVNode(Ma,null,null),loading:o.createVNode(Ta,null,null)},_E=o.defineComponent({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(i,s){let{slots:c}=s;return()=>{var d;return o.createVNode("div",{class:jt(`${i.prefixCls}-custom-content`,`${i.prefixCls}-${i.type}`)},[i.icon||cG[i.type],o.createVNode("span",null,[(d=c.default)===null||d===void 0?void 0:d.call(c)])])}}});o.defineComponent({name:"PurePanel",inheritAttrs:!1,props:["prefixCls","class","type","icon","content"],setup(i,s){let{slots:c,attrs:d}=s;var p;const{getPrefixCls:m}=mf(),y=o.computed(()=>i.prefixCls||m("message")),[,w]=lv(y);return o.createVNode(Yf,Je(Je({},d),{},{prefixCls:y.value,class:jt(w.value,`${y.value}-notice-pure-panel`),noticeKey:"pure",duration:null}),{default:()=>[o.createVNode(_E,{prefixCls:y.value,type:i.type,icon:i.icon},{default:()=>[(p=c.default)===null||p===void 0?void 0:p.call(c)]})]})}});var uG=function(i,s){var c={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.indexOf(d)<0&&(c[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,d=Object.getOwnPropertySymbols(i);p<d.length;p++)s.indexOf(d[p])<0&&Object.prototype.propertyIsEnumerable.call(i,d[p])&&(c[d[p]]=i[d[p]]);return c};const dG=8,fG=3,hG=o.defineComponent({name:"Holder",inheritAttrs:!1,props:["top","prefixCls","getContainer","maxCount","duration","rtl","transitionName","onAllRemoved"],setup(i,s){let{expose:c}=s;var d,p;const{getPrefixCls:m,getPopupContainer:y}=wi("message",i),w=o.computed(()=>m("message",i.prefixCls)),[,S]=lv(w),N=()=>{var z;const G=(z=i.top)!==null&&z!==void 0?z:dG;return{left:"50%",transform:"translateX(-50%)",top:typeof G=="number"?`${G}px`:G}},P=()=>jt(S.value,i.rtl?`${w.value}-rtl`:""),_=()=>{var z;return cU({prefixCls:w.value,animation:(z=i.animation)!==null&&z!==void 0?z:"move-up",transitionName:i.transitionName})},T=o.createVNode("span",{class:`${w.value}-close-x`},[o.createVNode(Xs,{class:`${w.value}-close-icon`},null)]),[Q,Z]=PE({getStyles:N,prefixCls:w.value,getClassName:P,motion:_,closable:!1,closeIcon:T,duration:(d=i.duration)!==null&&d!==void 0?d:fG,getContainer:(p=i.staticGetContainer)!==null&&p!==void 0?p:y.value,maxCount:i.maxCount,onAllRemoved:i.onAllRemoved});return c(ee(ee({},Q),{prefixCls:w,hashId:S})),Z}});let EE=0;function pG(i){const s=o.shallowRef(null),c=Symbol("messageHolderKey"),d=y=>{var w;(w=s.value)===null||w===void 0||w.close(y)},p=y=>{if(!s.value){const H=()=>{};return H.then=()=>{},H}const{open:w,prefixCls:S,hashId:N}=s.value,P=`${S}-notice`,{content:_,icon:T,type:Q,key:Z,class:z,onClose:G}=y,te=uG(y,["content","icon","type","key","class","onClose"]);let $=Z;return $==null&&(EE+=1,$=`antd-message-${EE}`),VZ(H=>(w(ee(ee({},te),{key:$,content:()=>o.createVNode(_E,{prefixCls:S,type:Q,icon:typeof T=="function"?T():T},{default:()=>[typeof _=="function"?_():_]}),placement:"top",class:jt(Q&&`${P}-${Q}`,N,z),onClose:()=>{G?.(),H()}})),()=>{d($)}))},m={open:p,destroy:y=>{var w;y!==void 0?d(y):(w=s.value)===null||w===void 0||w.destroy()}};return["info","success","warning","error","loading"].forEach(y=>{const w=(S,N,P)=>{let _;S&&typeof S=="object"&&"content"in S?_=S:_={content:S};let T,Q;typeof N=="function"?Q=N:(T=N,Q=P);const Z=ee(ee({onClose:Q,duration:T},_),{type:y});return p(Z)};m[y]=w}),[m,()=>o.createVNode(hG,Je(Je({key:c},i),{},{ref:s}),null)]}function mG(i){return pG(i)}let TE=3,NE,Hn,gG=1,AE="",ME="move-up",RE=!1,IE=()=>document.body,QE,DE=!1;function OG(){return gG++}function vG(i){i.top!==void 0&&(NE=i.top,Hn=null),i.duration!==void 0&&(TE=i.duration),i.prefixCls!==void 0&&(AE=i.prefixCls),i.getContainer!==void 0&&(IE=i.getContainer,Hn=null),i.transitionName!==void 0&&(ME=i.transitionName,Hn=null,RE=!0),i.maxCount!==void 0&&(QE=i.maxCount,Hn=null),i.rtl!==void 0&&(DE=i.rtl)}function yG(i,s){if(Hn){s(Hn);return}Xf.newInstance({appContext:i.appContext,prefixCls:i.prefixCls||AE,rootPrefixCls:i.rootPrefixCls,transitionName:ME,hasTransitionName:RE,style:{top:NE},getContainer:IE||i.getPopupContainer,maxCount:QE,name:"message",useStyle:lv},c=>{if(Hn){s(Hn);return}Hn=c,s(c)})}const BE={info:Ra,success:Aa,error:Na,warning:Ma,loading:Ta},bG=Object.keys(BE);function xG(i){const s=i.duration!==void 0?i.duration:TE,c=i.key||OG(),d=new Promise(m=>{const y=()=>(typeof i.onClose=="function"&&i.onClose(),m(!0));yG(i,w=>{w.notice({key:c,duration:s,style:i.style||{},class:i.class,content:S=>{let{prefixCls:N}=S;const P=BE[i.type],_=P?o.createVNode(P,null,null):"",T=jt(`${N}-custom-content`,{[`${N}-${i.type}`]:i.type,[`${N}-rtl`]:DE===!0});return o.createVNode("div",{class:T},[typeof i.icon=="function"?i.icon():i.icon||_,o.createVNode("span",null,[typeof i.content=="function"?i.content():i.content])])},onClose:y,onClick:i.onClick})})}),p=()=>{Hn&&Hn.removeNotice(c)};return p.then=(m,y)=>d.then(m,y),p.promise=d,p}function wG(i){return Object.prototype.toString.call(i)==="[object Object]"&&!!i.content}const Fi={open:xG,config:vG,destroy(i){if(Hn)if(i){const{removeNotice:s}=Hn;s(i)}else{const{destroy:s}=Hn;s(),Hn=null}}};function SG(i,s){i[s]=(c,d,p)=>wG(c)?i.open(ee(ee({},c),{type:s})):(typeof d=="function"&&(p=d,d=void 0),i.open({content:c,duration:d,type:s,onClose:p}))}bG.forEach(i=>SG(Fi,i)),Fi.warn=Fi.warning,Fi.useMessage=mG;const CG=i=>{const{componentCls:s,width:c,notificationMarginEdge:d}=i,p=new Kt("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),m=new Kt("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),y=new Kt("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:c},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${s}-top, &${s}-bottom`]:{marginInline:0},[`&${s}-top`]:{[`${s}-fade-enter${s}-fade-enter-active, ${s}-fade-appear${s}-fade-appear-active`]:{animationName:p}},[`&${s}-bottom`]:{[`${s}-fade-enter${s}-fade-enter-active, ${s}-fade-appear${s}-fade-appear-active`]:{animationName:m}},[`&${s}-topLeft, &${s}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:d,[`${s}-fade-enter${s}-fade-enter-active, ${s}-fade-appear${s}-fade-appear-active`]:{animationName:y}}}},kG=i=>{const{iconCls:s,componentCls:c,boxShadowSecondary:d,fontSizeLG:p,notificationMarginBottom:m,borderRadiusLG:y,colorSuccess:w,colorInfo:S,colorWarning:N,colorError:P,colorTextHeading:_,notificationBg:T,notificationPadding:Q,notificationMarginEdge:Z,motionDurationMid:z,motionEaseInOut:G,fontSize:te,lineHeight:$,width:H,notificationIconSize:X}=i,re=`${c}-notice`,oe=new Kt("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:H},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),U=new Kt("antNotificationFadeOut",{"0%":{maxHeight:i.animationMaxHeight,marginBottom:m,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[c]:ee(ee(ee(ee({},MO(i)),{position:"fixed",zIndex:i.zIndexPopup,marginInlineEnd:Z,[`${c}-hook-holder`]:{position:"relative"},[`&${c}-top, &${c}-bottom`]:{[`${c}-notice`]:{marginInline:"auto auto"}},[`&${c}-topLeft, &${c}-bottomLeft`]:{[`${c}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${c}-fade-enter, ${c}-fade-appear`]:{animationDuration:i.motionDurationMid,animationTimingFunction:G,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${c}-fade-leave`]:{animationTimingFunction:G,animationFillMode:"both",animationDuration:z,animationPlayState:"paused"},[`${c}-fade-enter${c}-fade-enter-active, ${c}-fade-appear${c}-fade-appear-active`]:{animationName:oe,animationPlayState:"running"},[`${c}-fade-leave${c}-fade-leave-active`]:{animationName:U,animationPlayState:"running"}}),CG(i)),{"&-rtl":{direction:"rtl",[`${c}-notice-btn`]:{float:"left"}}})},{[re]:{position:"relative",width:H,maxWidth:`calc(100vw - ${Z*2}px)`,marginBottom:m,marginInlineStart:"auto",padding:Q,overflow:"hidden",lineHeight:$,wordWrap:"break-word",background:T,borderRadius:y,boxShadow:d,[`${c}-close-icon`]:{fontSize:te,cursor:"pointer"},[`${re}-message`]:{marginBottom:i.marginXS,color:_,fontSize:p,lineHeight:i.lineHeightLG},[`${re}-description`]:{fontSize:te},[`&${re}-closable ${re}-message`]:{paddingInlineEnd:i.paddingLG},[`${re}-with-icon ${re}-message`]:{marginBottom:i.marginXS,marginInlineStart:i.marginSM+X,fontSize:p},[`${re}-with-icon ${re}-description`]:{marginInlineStart:i.marginSM+X,fontSize:te},[`${re}-icon`]:{position:"absolute",fontSize:X,lineHeight:0,[`&-success${s}`]:{color:w},[`&-info${s}`]:{color:S},[`&-warning${s}`]:{color:N},[`&-error${s}`]:{color:P}},[`${re}-close`]:{position:"absolute",top:i.notificationPaddingVertical,insetInlineEnd:i.notificationPaddingHorizontal,color:i.colorIcon,outline:"none",width:i.notificationCloseButtonSize,height:i.notificationCloseButtonSize,borderRadius:i.borderRadiusSM,transition:`background-color ${i.motionDurationMid}, color ${i.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:i.colorIconHover,backgroundColor:i.wireframe?"transparent":i.colorFillContent}},[`${re}-btn`]:{float:"right",marginTop:i.marginSM}}},{[`${re}-pure-panel`]:{margin:0}}]},cv=wa("Notification",i=>{const s=i.paddingMD,c=i.paddingLG,d=br(i,{notificationBg:i.colorBgElevated,notificationPaddingVertical:s,notificationPaddingHorizontal:c,notificationPadding:`${i.paddingMD}px ${i.paddingContentHorizontalLG}px`,notificationMarginBottom:i.margin,notificationMarginEdge:i.marginLG,animationMaxHeight:150,notificationIconSize:i.fontSizeLG*i.lineHeightLG,notificationCloseButtonSize:i.controlHeightLG*.55});return[kG(d)]},i=>({zIndexPopup:i.zIndexPopupBase+50,width:384}));function LE(i,s){return s||o.createVNode("span",{class:`${i}-close-x`},[o.createVNode(Xs,{class:`${i}-close-icon`},null)])}o.createVNode(Ra,null,null),o.createVNode(Aa,null,null),o.createVNode(Na,null,null),o.createVNode(Ma,null,null),o.createVNode(Ta,null,null);const PG={success:Aa,info:Ra,error:Na,warning:Ma};function VE(i){let{prefixCls:s,icon:c,type:d,message:p,description:m,btn:y}=i,w=null;if(c)w=o.createVNode("span",{class:`${s}-icon`},[Bs(c)]);else if(d){const S=PG[d];w=o.createVNode(S,{class:`${s}-icon ${s}-icon-${d}`},null)}return o.createVNode("div",{class:jt({[`${s}-with-icon`]:w}),role:"alert"},[w,o.createVNode("div",{class:`${s}-message`},[p]),o.createVNode("div",{class:`${s}-description`},[m]),y&&o.createVNode("div",{class:`${s}-btn`},[y])])}o.defineComponent({name:"PurePanel",inheritAttrs:!1,props:["prefixCls","icon","type","message","description","btn","closeIcon"],setup(i){const{getPrefixCls:s}=wi("notification",i),c=o.computed(()=>i.prefixCls||s("notification")),d=o.computed(()=>`${c.value}-notice`),[,p]=cv(c);return()=>o.createVNode(Yf,Je(Je({},i),{},{prefixCls:c.value,class:jt(p.value,`${d.value}-pure-panel`),noticeKey:"pure",duration:null,closable:i.closable,closeIcon:LE(c.value,i.closeIcon)}),{default:()=>[o.createVNode(VE,{prefixCls:d.value,icon:i.icon,type:i.type,message:i.message,description:i.description,btn:i.btn},null)]})}});function jE(i,s,c){let d;switch(s=typeof s=="number"?`${s}px`:s,c=typeof c=="number"?`${c}px`:c,i){case"top":d={left:"50%",transform:"translateX(-50%)",right:"auto",top:s,bottom:"auto"};break;case"topLeft":d={left:0,top:s,bottom:"auto"};break;case"topRight":d={right:0,top:s,bottom:"auto"};break;case"bottom":d={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:c};break;case"bottomLeft":d={left:0,top:"auto",bottom:c};break;default:d={right:0,top:"auto",bottom:c};break}return d}function _G(i){return{name:`${i}-fade`}}var EG=function(i,s){var c={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.indexOf(d)<0&&(c[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,d=Object.getOwnPropertySymbols(i);p<d.length;p++)s.indexOf(d[p])<0&&Object.prototype.propertyIsEnumerable.call(i,d[p])&&(c[d[p]]=i[d[p]]);return c};const FE=24,TG=4.5,NG=o.defineComponent({name:"Holder",inheritAttrs:!1,props:["prefixCls","class","type","icon","content","onAllRemoved"],setup(i,s){let{expose:c}=s;const{getPrefixCls:d,getPopupContainer:p}=wi("notification",i),m=o.computed(()=>i.prefixCls||d("notification")),y=T=>{var Q,Z;return jE(T,(Q=i.top)!==null&&Q!==void 0?Q:FE,(Z=i.bottom)!==null&&Z!==void 0?Z:FE)},[,w]=cv(m),S=()=>jt(w.value,{[`${m.value}-rtl`]:i.rtl}),N=()=>_G(m.value),[P,_]=PE({prefixCls:m.value,getStyles:y,getClassName:S,motion:N,closable:!0,closeIcon:LE(m.value),duration:TG,getContainer:()=>{var T,Q;return((T=i.getPopupContainer)===null||T===void 0?void 0:T.call(i))||((Q=p.value)===null||Q===void 0?void 0:Q.call(p))||document.body},maxCount:i.maxCount,hashId:w.value,onAllRemoved:i.onAllRemoved});return c(ee(ee({},P),{prefixCls:m.value,hashId:w})),_}});function AG(i){const s=o.shallowRef(null),c=Symbol("notificationHolderKey"),d=m=>{if(!s.value)return;const{open:y,prefixCls:w,hashId:S}=s.value,N=`${w}-notice`,{message:P,description:_,icon:T,type:Q,btn:Z,class:z}=m,G=EG(m,["message","description","icon","type","btn","class"]);return y(ee(ee({placement:"topRight"},G),{content:()=>o.createVNode(VE,{prefixCls:N,icon:typeof T=="function"?T():T,type:Q,message:typeof P=="function"?P():P,description:typeof _=="function"?_():_,btn:typeof Z=="function"?Z():Z},null),class:jt(Q&&`${N}-${Q}`,S,z)}))},p={open:d,destroy:m=>{var y,w;m!==void 0?(y=s.value)===null||y===void 0||y.close(m):(w=s.value)===null||w===void 0||w.destroy()}};return["success","info","warning","error"].forEach(m=>{p[m]=y=>d(ee(ee({},y),{type:m}))}),[p,()=>o.createVNode(NG,Je(Je({key:c},i),{},{ref:s}),null)]}function MG(i){return AG(i)}const Qa={};let ZE=4.5,WE="24px",zE="24px",uv="",UE="topRight",HE=()=>document.body,YE=null,dv=!1,XE;function RG(i){const{duration:s,placement:c,bottom:d,top:p,getContainer:m,closeIcon:y,prefixCls:w}=i;w!==void 0&&(uv=w),s!==void 0&&(ZE=s),c!==void 0&&(UE=c),d!==void 0&&(zE=typeof d=="number"?`${d}px`:d),p!==void 0&&(WE=typeof p=="number"?`${p}px`:p),m!==void 0&&(HE=m),y!==void 0&&(YE=y),i.rtl!==void 0&&(dv=i.rtl),i.maxCount!==void 0&&(XE=i.maxCount)}function IG(i,s){let{prefixCls:c,placement:d=UE,getContainer:p=HE,top:m,bottom:y,closeIcon:w=YE,appContext:S}=i;const{getPrefixCls:N}=UG(),P=N("notification",c||uv),_=`${P}-${d}-${dv}`,T=Qa[_];if(T){Promise.resolve(T).then(Z=>{s(Z)});return}const Q=jt(`${P}-${d}`,{[`${P}-rtl`]:dv===!0});Xf.newInstance({name:"notification",prefixCls:c||uv,useStyle:cv,class:Q,style:jE(d,m??WE,y??zE),appContext:S,getContainer:p,closeIcon:Z=>{let{prefixCls:z}=Z;return o.createVNode("span",{class:`${z}-close-x`},[Bs(w,{},o.createVNode(Xs,{class:`${z}-close-icon`},null))])},maxCount:XE,hasTransitionName:!0},Z=>{Qa[_]=Z,s(Z)})}const QG={success:KO,info:$O,error:qO,warning:JO};function DG(i){const{icon:s,type:c,description:d,message:p,btn:m}=i,y=i.duration===void 0?ZE:i.duration;IG(i,w=>{w.notice({content:S=>{let{prefixCls:N}=S;const P=`${N}-notice`;let _=null;if(s)_=()=>o.createVNode("span",{class:`${P}-icon`},[Bs(s)]);else if(c){const T=QG[c];_=()=>o.createVNode(T,{class:`${P}-icon ${P}-icon-${c}`},null)}return o.createVNode("div",{class:_?`${P}-with-icon`:""},[_&&_(),o.createVNode("div",{class:`${P}-message`},[!d&&_?o.createVNode("span",{class:`${P}-message-single-line-auto-margin`},null):null,Bs(p)]),o.createVNode("div",{class:`${P}-description`},[Bs(d)]),m?o.createVNode("span",{class:`${P}-btn`},[Bs(m)]):null])},duration:y,closable:!0,onClose:i.onClose,onClick:i.onClick,key:i.key,style:i.style||{},class:i.class})})}const Gs={open:DG,close(i){Object.keys(Qa).forEach(s=>Promise.resolve(Qa[s]).then(c=>{c.removeNotice(i)}))},config:RG,destroy(){Object.keys(Qa).forEach(i=>{Promise.resolve(Qa[i]).then(s=>{s.destroy()}),delete Qa[i]})}};["success","info","warning","error"].forEach(i=>{Gs[i]=s=>Gs.open(ee(ee({},s),{type:i}))}),Gs.warn=Gs.warning,Gs.useNotification=MG;const BG=`-ant-${Date.now()}-${Math.random()}`;function LG(i,s){const c={},d=(m,y)=>{let w=m.clone();return w=y?.(w)||w,w.toRgbString()},p=(m,y)=>{const w=new An(m),S=xa(w.toRgbString());c[`${y}-color`]=d(w),c[`${y}-color-disabled`]=S[1],c[`${y}-color-hover`]=S[4],c[`${y}-color-active`]=S[6],c[`${y}-color-outline`]=w.clone().setAlpha(.2).toRgbString(),c[`${y}-color-deprecated-bg`]=S[0],c[`${y}-color-deprecated-border`]=S[2]};if(s.primaryColor){p(s.primaryColor,"primary");const m=new An(s.primaryColor),y=xa(m.toRgbString());y.forEach((S,N)=>{c[`primary-${N+1}`]=S}),c["primary-color-deprecated-l-35"]=d(m,S=>S.lighten(35)),c["primary-color-deprecated-l-20"]=d(m,S=>S.lighten(20)),c["primary-color-deprecated-t-20"]=d(m,S=>S.tint(20)),c["primary-color-deprecated-t-50"]=d(m,S=>S.tint(50)),c["primary-color-deprecated-f-12"]=d(m,S=>S.setAlpha(S.getAlpha()*.12));const w=new An(y[0]);c["primary-color-active-deprecated-f-30"]=d(w,S=>S.setAlpha(S.getAlpha()*.3)),c["primary-color-active-deprecated-d-02"]=d(w,S=>S.darken(2))}return s.successColor&&p(s.successColor,"success"),s.warningColor&&p(s.warningColor,"warning"),s.errorColor&&p(s.errorColor,"error"),s.infoColor&&p(s.infoColor,"info"),`
|
|
146
|
-
:root {
|
|
147
|
-
${Object.keys(c).map(m=>`--${i}-${m}: ${c[m]};`).join(`
|
|
148
|
-
`)}
|
|
149
|
-
}
|
|
150
|
-
`.trim()}function VG(i,s){const c=LG(i,s);Ho()?Nc(c,`${BG}-dynamic-theme`):Fs(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const jG=i=>{const[s,c]=Qc();return wO(o.computed(()=>({theme:s.value,token:c.value,hashId:"",path:["ant-design-icons",i.value]})),()=>[{[`.${i.value}`]:ee(ee({},_z()),{[`.${i.value} .${i.value}-icon`]:{display:"block"}})}])};function FG(i,s){const c=o.computed(()=>i?.value||{}),d=o.computed(()=>c.value.inherit===!1||!s?.value?QP:s.value);return o.computed(()=>{if(!i?.value)return s?.value;const p=ee({},d.value.components);return Object.keys(i.value.components||{}).forEach(m=>{p[m]=ee(ee({},p[m]),i.value.components[m])}),ee(ee(ee({},d.value),c.value),{token:ee(ee({},d.value.token),c.value.token),components:p})})}var ZG=function(i,s){var c={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.indexOf(d)<0&&(c[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,d=Object.getOwnPropertySymbols(i);p<d.length;p++)s.indexOf(d[p])<0&&Object.prototype.propertyIsEnumerable.call(i,d[p])&&(c[d[p]]=i[d[p]]);return c};const WG="ant";function Ks(){return Mn.prefixCls||WG}function GE(){return Mn.iconPrefixCls||rO}const fv=o.reactive({}),Mn=o.reactive({});o.watchEffect(()=>{ee(Mn,fv),Mn.prefixCls=Ks(),Mn.iconPrefixCls=GE(),Mn.getPrefixCls=(i,s)=>s||(i?`${Mn.prefixCls}-${i}`:Mn.prefixCls),Mn.getRootPrefixCls=()=>Mn.prefixCls?Mn.prefixCls:Ks()});let hv;const zG=i=>{hv&&hv(),hv=o.watchEffect(()=>{ee(fv,o.reactive(i)),ee(Mn,o.reactive(i))}),i.theme&&VG(Ks(),i.theme)},UG=()=>({getPrefixCls:(i,s)=>s||(i?`${Ks()}-${i}`:Ks()),getIconPrefixCls:GE,getRootPrefixCls:()=>Mn.prefixCls?Mn.prefixCls:Ks()}),Js=o.defineComponent({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:HZ(),setup(i,s){let{slots:c}=s;const d=mf(),p=(ae,ue)=>{const{prefixCls:Ee="ant"}=i;if(ue)return ue;const xe=Ee||d.getPrefixCls("");return ae?`${xe}-${ae}`:xe},m=o.computed(()=>i.iconPrefixCls||d.iconPrefixCls.value||rO),y=o.computed(()=>m.value!==d.iconPrefixCls.value),w=o.computed(()=>{var ae;return i.csp||((ae=d.csp)===null||ae===void 0?void 0:ae.value)}),S=jG(m),N=FG(o.computed(()=>i.theme),o.computed(()=>{var ae;return(ae=d.theme)===null||ae===void 0?void 0:ae.value})),P=ae=>(i.renderEmpty||c.renderEmpty||d.renderEmpty||Fz)(ae),_=o.computed(()=>{var ae,ue;return(ae=i.autoInsertSpaceInButton)!==null&&ae!==void 0?ae:(ue=d.autoInsertSpaceInButton)===null||ue===void 0?void 0:ue.value}),T=o.computed(()=>{var ae;return i.locale||((ae=d.locale)===null||ae===void 0?void 0:ae.value)});o.watch(T,()=>{fv.locale=T.value},{immediate:!0});const Q=o.computed(()=>{var ae;return i.direction||((ae=d.direction)===null||ae===void 0?void 0:ae.value)}),Z=o.computed(()=>{var ae,ue;return(ae=i.space)!==null&&ae!==void 0?ae:(ue=d.space)===null||ue===void 0?void 0:ue.value}),z=o.computed(()=>{var ae,ue;return(ae=i.virtual)!==null&&ae!==void 0?ae:(ue=d.virtual)===null||ue===void 0?void 0:ue.value}),G=o.computed(()=>{var ae,ue;return(ae=i.dropdownMatchSelectWidth)!==null&&ae!==void 0?ae:(ue=d.dropdownMatchSelectWidth)===null||ue===void 0?void 0:ue.value}),te=o.computed(()=>{var ae;return i.getTargetContainer!==void 0?i.getTargetContainer:(ae=d.getTargetContainer)===null||ae===void 0?void 0:ae.value}),$=o.computed(()=>{var ae;return i.getPopupContainer!==void 0?i.getPopupContainer:(ae=d.getPopupContainer)===null||ae===void 0?void 0:ae.value}),H=o.computed(()=>{var ae;return i.pageHeader!==void 0?i.pageHeader:(ae=d.pageHeader)===null||ae===void 0?void 0:ae.value}),X=o.computed(()=>{var ae;return i.input!==void 0?i.input:(ae=d.input)===null||ae===void 0?void 0:ae.value}),re=o.computed(()=>{var ae;return i.pagination!==void 0?i.pagination:(ae=d.pagination)===null||ae===void 0?void 0:ae.value}),oe=o.computed(()=>{var ae;return i.form!==void 0?i.form:(ae=d.form)===null||ae===void 0?void 0:ae.value}),U=o.computed(()=>{var ae;return i.select!==void 0?i.select:(ae=d.select)===null||ae===void 0?void 0:ae.value}),ce=o.computed(()=>i.componentSize),he=o.computed(()=>i.componentDisabled),Qe=o.computed(()=>{var ae,ue;return(ae=i.wave)!==null&&ae!==void 0?ae:(ue=d.wave)===null||ue===void 0?void 0:ue.value}),ke={csp:w,autoInsertSpaceInButton:_,locale:T,direction:Q,space:Z,virtual:z,dropdownMatchSelectWidth:G,getPrefixCls:p,iconPrefixCls:m,theme:o.computed(()=>{var ae,ue;return(ae=N.value)!==null&&ae!==void 0?ae:(ue=d.theme)===null||ue===void 0?void 0:ue.value}),renderEmpty:P,getTargetContainer:te,getPopupContainer:$,pageHeader:H,input:X,pagination:re,form:oe,select:U,componentSize:ce,componentDisabled:he,transformCellText:o.computed(()=>i.transformCellText),wave:Qe},He=o.computed(()=>{const ae=N.value||{},{algorithm:ue,token:Ee}=ae,xe=ZG(ae,["algorithm","token"]),Ue=ue&&(!Array.isArray(ue)||ue.length>0)?nP(ue):void 0;return ee(ee({},xe),{theme:Ue,token:ee(ee({},Af),Ee)})}),je=o.computed(()=>{var ae,ue;let Ee={};return T.value&&(Ee=((ae=T.value.Form)===null||ae===void 0?void 0:ae.defaultValidateMessages)||((ue=Or.Form)===null||ue===void 0?void 0:ue.defaultValidateMessages)||{}),i.form&&i.form.validateMessages&&(Ee=ee(ee({},Ee),i.form.validateMessages)),Ee});YZ(ke),UZ({validateMessages:je}),Zz(ce),XZ(he);const Me=ae=>{var ue,Ee;let xe=y.value?S((ue=c.default)===null||ue===void 0?void 0:ue.call(c)):(Ee=c.default)===null||Ee===void 0?void 0:Ee.call(c);if(i.theme){const Ue=function(){return xe}();xe=o.createVNode(Dz,{value:He.value},{default:()=>[Ue]})}return o.createVNode(eG,{locale:T.value||ae,ANT_MARK__:sv},{default:()=>[xe]})};return o.watchEffect(()=>{Q.value&&(Fi.config({rtl:Q.value==="rtl"}),Gs.config({rtl:Q.value==="rtl"}))}),()=>o.createVNode(Z2,{children:(ae,ue,Ee)=>Me(Ee)},null)}});Js.config=zG,Js.install=function(i){i.component(Js.name,Js)};function pv(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:Ft.shape({x:Number,y:Number}).loose,title:Ft.any,footer:Ft.any,transitionName:String,maskTransitionName:String,animation:Ft.any,maskAnimation:Ft.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:Ft.any,maskProps:Ft.any,wrapProps:Ft.any,getContainer:Ft.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:Ft.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function KE(i,s,c){let d=s;return!d&&c&&(d=`${i}-${c}`),d}let JE=-1;function HG(){return JE+=1,JE}function $E(i,s){let c=i[`page${s?"Y":"X"}Offset`];const d=`scroll${s?"Top":"Left"}`;if(typeof c!="number"){const p=i.document;c=p.documentElement[d],typeof c!="number"&&(c=p.body[d])}return c}function YG(i){const s=i.getBoundingClientRect(),c={left:s.left,top:s.top},d=i.ownerDocument,p=d.defaultView||d.parentWindow;return c.left+=$E(p),c.top+=$E(p,!0),c}const qE={width:0,height:0,overflow:"hidden",outline:"none"},XG=o.defineComponent({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:ee(ee({},pv()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(i,s){let{expose:c,slots:d,attrs:p}=s;const m=o.ref(),y=o.ref(),w=o.ref();c({focus:()=>{var T;(T=m.value)===null||T===void 0||T.focus()},changeActive:T=>{const{activeElement:Q}=document;T&&Q===y.value?m.value.focus():!T&&Q===m.value&&y.value.focus()}});const S=o.ref(),N=o.computed(()=>{const{width:T,height:Q}=i,Z={};return T!==void 0&&(Z.width=typeof T=="number"?`${T}px`:T),Q!==void 0&&(Z.height=typeof Q=="number"?`${Q}px`:Q),S.value&&(Z.transformOrigin=S.value),Z}),P=()=>{o.nextTick(()=>{if(w.value){const T=YG(w.value);S.value=i.mousePosition?`${i.mousePosition.x-T.left}px ${i.mousePosition.y-T.top}px`:""}})},_=T=>{i.onVisibleChanged(T)};return()=>{var T,Q,Z,z;const{prefixCls:G,footer:te=(T=d.footer)===null||T===void 0?void 0:T.call(d),title:$=(Q=d.title)===null||Q===void 0?void 0:Q.call(d),ariaId:H,closable:X,closeIcon:re=(Z=d.closeIcon)===null||Z===void 0?void 0:Z.call(d),onClose:oe,bodyStyle:U,bodyProps:ce,onMousedown:he,onMouseup:Qe,visible:ke,modalRender:He=d.modalRender,destroyOnClose:je,motionName:Me}=i;let ae;te&&(ae=o.createVNode("div",{class:`${G}-footer`},[te]));let ue;$&&(ue=o.createVNode("div",{class:`${G}-header`},[o.createVNode("div",{class:`${G}-title`,id:H},[$])]));let Ee;X&&(Ee=o.createVNode("button",{type:"button",onClick:oe,"aria-label":"Close",class:`${G}-close`},[re||o.createVNode("span",{class:`${G}-close-x`},null)]));const xe=o.createVNode("div",{class:`${G}-content`},[Ee,ue,o.createVNode("div",Je({class:`${G}-body`,style:U},ce),[(z=d.default)===null||z===void 0?void 0:z.call(d)]),ae]),Ue=k_(Me);return o.createVNode(o.Transition,Je(Je({},Ue),{},{onBeforeEnter:P,onAfterEnter:()=>_(!0),onAfterLeave:()=>_(!1)}),{default:()=>[ke||!je?o.withDirectives(o.createVNode("div",Je(Je({},p),{},{ref:w,key:"dialog-element",role:"document",style:[N.value,p.style],class:[G,p.class],onMousedown:he,onMouseup:Qe}),[o.createVNode("div",{tabindex:0,ref:m,style:qE,"aria-hidden":"true"},null),He?He({originVNode:xe}):xe,o.createVNode("div",{tabindex:0,ref:y,style:qE,"aria-hidden":"true"},null)]),[[o.vShow,ke]]):null]})}}}),GG=o.defineComponent({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(i,s){return()=>{const{prefixCls:c,visible:d,maskProps:p,motionName:m}=i,y=k_(m);return o.createVNode(o.Transition,y,{default:()=>[o.withDirectives(o.createVNode("div",Je({class:`${c}-mask`},p),null),[[o.vShow,d]])]})}}}),eT=o.defineComponent({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:Pc(ee(ee({},pv()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(i,s){let{attrs:c,slots:d}=s;const p=o.shallowRef(),m=o.shallowRef(),y=o.shallowRef(),w=o.shallowRef(i.visible),S=o.shallowRef(`vcDialogTitle${HG()}`),N=te=>{var $,H;if(te)X2(m.value,document.activeElement)||(p.value=document.activeElement,($=y.value)===null||$===void 0||$.focus());else{const X=w.value;if(w.value=!1,i.mask&&p.value&&i.focusTriggerAfterClose){try{p.value.focus({preventScroll:!0})}catch{}p.value=null}X&&((H=i.afterClose)===null||H===void 0||H.call(i))}},P=te=>{var $;($=i.onClose)===null||$===void 0||$.call(i,te)},_=o.shallowRef(!1),T=o.shallowRef(),Q=()=>{clearTimeout(T.value),_.value=!0},Z=()=>{T.value=setTimeout(()=>{_.value=!1})},z=te=>{if(!i.maskClosable)return null;_.value?_.value=!1:m.value===te.target&&P(te)},G=te=>{if(i.keyboard&&te.keyCode===tt.ESC){te.stopPropagation(),P(te);return}i.visible&&te.keyCode===tt.TAB&&y.value.changeActive(!te.shiftKey)};return o.watch(()=>i.visible,()=>{i.visible&&(w.value=!0)},{flush:"post"}),o.onBeforeUnmount(()=>{var te;clearTimeout(T.value),(te=i.scrollLocker)===null||te===void 0||te.unLock()}),o.watchEffect(()=>{var te,$;(te=i.scrollLocker)===null||te===void 0||te.unLock(),w.value&&(($=i.scrollLocker)===null||$===void 0||$.lock())}),()=>{const{prefixCls:te,mask:$,visible:H,maskTransitionName:X,maskAnimation:re,zIndex:oe,wrapClassName:U,rootClassName:ce,wrapStyle:he,closable:Qe,maskProps:ke,maskStyle:He,transitionName:je,animation:Me,wrapProps:ae,title:ue=d.title}=i,{style:Ee,class:xe}=c;return o.createVNode("div",Je({class:[`${te}-root`,ce]},ZH(i,{data:!0})),[o.createVNode(GG,{prefixCls:te,visible:$&&H,motionName:KE(te,X,re),style:ee({zIndex:oe},He),maskProps:ke},null),o.createVNode("div",Je({tabIndex:-1,onKeydown:G,class:jt(`${te}-wrap`,U),ref:m,onClick:z,role:"dialog","aria-labelledby":ue?S.value:null,style:ee(ee({zIndex:oe},he),{display:w.value?null:"none"})},ae),[o.createVNode(XG,Je(Je({},zP(i,["scrollLocker"])),{},{style:Ee,class:xe,onMousedown:Q,onMouseup:Z,ref:y,closable:Qe,ariaId:S.value,prefixCls:te,visible:H,onClose:P,onVisibleChanged:N,motionName:KE(te,je,Me)}),d)])])}}}),KG=pv(),JG=o.defineComponent({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:Pc(KG,{visible:!1}),setup(i,s){let{attrs:c,slots:d}=s;const p=o.ref(i.visible);return E_({},{inTriggerContext:!1}),o.watch(()=>i.visible,()=>{i.visible&&(p.value=!0)},{flush:"post"}),()=>{const{visible:m,getContainer:y,forceRender:w,destroyOnClose:S=!1,afterClose:N}=i;let P=ee(ee(ee({},i),c),{ref:"_component",key:"dialog"});return y===!1?o.createVNode(eT,Je(Je({},P),{},{getOpenCount:()=>2}),d):!w&&S&&!p.value?null:o.createVNode(VH,{autoLock:!0,visible:m,forceRender:w,getContainer:y},{default:_=>(P=ee(ee(ee({},P),_),{afterClose:()=>{N?.(),p.value=!1}}),o.createVNode(eT,P,d))})}}});function tT(i){return{position:i,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const $G=i=>{const{componentCls:s}=i;return[{[`${s}-root`]:{[`${s}${i.antCls}-zoom-enter, ${s}${i.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:i.motionDurationSlow,userSelect:"none"},[`${s}${i.antCls}-zoom-leave ${s}-content`]:{pointerEvents:"none"},[`${s}-mask`]:ee(ee({},tT("fixed")),{zIndex:i.zIndexPopupBase,height:"100%",backgroundColor:i.colorBgMask,[`${s}-hidden`]:{display:"none"}}),[`${s}-wrap`]:ee(ee({},tT("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${s}-root`]:UY(i)}]},qG=i=>{const{componentCls:s}=i;return[{[`${s}-root`]:{[`${s}-wrap`]:{zIndex:i.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${s}-wrap-rtl`]:{direction:"rtl"},[`${s}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[s]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${i.screenSMMax})`]:{[s]:{maxWidth:"calc(100vw - 16px)",margin:`${i.marginXS} auto`},[`${s}-centered`]:{[s]:{flex:1}}}}},{[s]:ee(ee({},MO(i)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${i.margin*2}px)`,margin:"0 auto",paddingBottom:i.paddingLG,[`${s}-title`]:{margin:0,color:i.modalHeadingColor,fontWeight:i.fontWeightStrong,fontSize:i.modalHeaderTitleFontSize,lineHeight:i.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${s}-content`]:{position:"relative",backgroundColor:i.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:i.borderRadiusLG,boxShadow:i.boxShadowSecondary,pointerEvents:"auto",padding:`${i.paddingMD}px ${i.paddingContentHorizontalLG}px`},[`${s}-close`]:ee({position:"absolute",top:(i.modalHeaderCloseSize-i.modalCloseBtnSize)/2,insetInlineEnd:(i.modalHeaderCloseSize-i.modalCloseBtnSize)/2,zIndex:i.zIndexPopupBase+10,padding:0,color:i.modalCloseColor,fontWeight:i.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:i.borderRadiusSM,width:i.modalConfirmIconSize,height:i.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${i.motionDurationMid}, background-color ${i.motionDurationMid}`,"&-x":{display:"block",fontSize:i.fontSizeLG,fontStyle:"normal",lineHeight:`${i.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:i.modalIconHoverColor,backgroundColor:i.wireframe?"transparent":i.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:i.wireframe?"transparent":i.colorFillContentHover}},RP(i)),[`${s}-header`]:{color:i.colorText,background:i.modalHeaderBg,borderRadius:`${i.borderRadiusLG}px ${i.borderRadiusLG}px 0 0`,marginBottom:i.marginXS},[`${s}-body`]:{fontSize:i.fontSize,lineHeight:i.lineHeight,wordWrap:"break-word"},[`${s}-footer`]:{textAlign:"end",background:i.modalFooterBg,marginTop:i.marginSM,[`${i.antCls}-btn + ${i.antCls}-btn:not(${i.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:i.marginXS}},[`${s}-open`]:{overflow:"hidden"}})},{[`${s}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${s}-content,
|
|
151
|
-
${s}-body,
|
|
152
|
-
${s}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${s}-confirm-body`]:{marginBottom:"auto"}}}]},eK=i=>{const{componentCls:s}=i,c=`${s}-confirm`;return{[c]:{"&-rtl":{direction:"rtl"},[`${i.antCls}-modal-header`]:{display:"none"},[`${c}-body-wrapper`]:ee({},Ez()),[`${c}-body`]:{display:"flex",flexWrap:"wrap",alignItems:"center",[`${c}-title`]:{flex:"0 0 100%",display:"block",overflow:"hidden",color:i.colorTextHeading,fontWeight:i.fontWeightStrong,fontSize:i.modalHeaderTitleFontSize,lineHeight:i.modalHeaderTitleLineHeight,[`+ ${c}-content`]:{marginBlockStart:i.marginXS,flexBasis:"100%",maxWidth:`calc(100% - ${i.modalConfirmIconSize+i.marginSM}px)`}},[`${c}-content`]:{color:i.colorText,fontSize:i.fontSize},[`> ${i.iconCls}`]:{flex:"none",marginInlineEnd:i.marginSM,fontSize:i.modalConfirmIconSize,[`+ ${c}-title`]:{flex:1},[`+ ${c}-title + ${c}-content`]:{marginInlineStart:i.modalConfirmIconSize+i.marginSM}}},[`${c}-btns`]:{textAlign:"end",marginTop:i.marginSM,[`${i.antCls}-btn + ${i.antCls}-btn`]:{marginBottom:0,marginInlineStart:i.marginXS}}},[`${c}-error ${c}-body > ${i.iconCls}`]:{color:i.colorError},[`${c}-warning ${c}-body > ${i.iconCls},
|
|
153
|
-
${c}-confirm ${c}-body > ${i.iconCls}`]:{color:i.colorWarning},[`${c}-info ${c}-body > ${i.iconCls}`]:{color:i.colorInfo},[`${c}-success ${c}-body > ${i.iconCls}`]:{color:i.colorSuccess},[`${s}-zoom-leave ${s}-btns`]:{pointerEvents:"none"}}},tK=i=>{const{componentCls:s}=i;return{[`${s}-root`]:{[`${s}-wrap-rtl`]:{direction:"rtl",[`${s}-confirm-body`]:{direction:"rtl"}}}}},nK=i=>{const{componentCls:s,antCls:c}=i,d=`${s}-confirm`;return{[s]:{[`${s}-content`]:{padding:0},[`${s}-header`]:{padding:i.modalHeaderPadding,borderBottom:`${i.modalHeaderBorderWidth}px ${i.modalHeaderBorderStyle} ${i.modalHeaderBorderColorSplit}`,marginBottom:0},[`${s}-body`]:{padding:i.modalBodyPadding},[`${s}-footer`]:{padding:`${i.modalFooterPaddingVertical}px ${i.modalFooterPaddingHorizontal}px`,borderTop:`${i.modalFooterBorderWidth}px ${i.modalFooterBorderStyle} ${i.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${i.borderRadiusLG}px ${i.borderRadiusLG}px`,marginTop:0}},[d]:{[`${c}-modal-body`]:{padding:`${i.padding*2}px ${i.padding*2}px ${i.paddingLG}px`},[`${d}-body`]:{[`> ${i.iconCls}`]:{marginInlineEnd:i.margin,[`+ ${d}-title + ${d}-content`]:{marginInlineStart:i.modalConfirmIconSize+i.margin}}},[`${d}-btns`]:{marginTop:i.marginLG}}}},oK=wa("Modal",i=>{const s=i.padding,c=i.fontSizeHeading5,d=i.lineHeightHeading5,p=br(i,{modalBodyPadding:i.paddingLG,modalHeaderBg:i.colorBgElevated,modalHeaderPadding:`${s}px ${i.paddingLG}px`,modalHeaderBorderWidth:i.lineWidth,modalHeaderBorderStyle:i.lineType,modalHeaderTitleLineHeight:d,modalHeaderTitleFontSize:c,modalHeaderBorderColorSplit:i.colorSplit,modalHeaderCloseSize:d*c+s*2,modalContentBg:i.colorBgElevated,modalHeadingColor:i.colorTextHeading,modalCloseColor:i.colorTextDescription,modalFooterBg:"transparent",modalFooterBorderColorSplit:i.colorSplit,modalFooterBorderStyle:i.lineType,modalFooterPaddingVertical:i.paddingXS,modalFooterPaddingHorizontal:i.padding,modalFooterBorderWidth:i.lineWidth,modalConfirmTitleFontSize:i.fontSizeLG,modalIconHoverColor:i.colorIconHover,modalConfirmIconSize:i.fontSize*i.lineHeight,modalCloseBtnSize:i.controlHeightLG*.55});return[qG(p),eK(p),tK(p),$G(p),i.wireframe&&nK(p),oX(p,"zoom")]}),iK={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};var rK=function(i,s){var c={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&s.indexOf(d)<0&&(c[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,d=Object.getOwnPropertySymbols(i);p<d.length;p++)s.indexOf(d[p])<0&&Object.prototype.propertyIsEnumerable.call(i,d[p])&&(c[d[p]]=i[d[p]]);return c};let mv;const aK=i=>{mv={x:i.pageX,y:i.pageY},setTimeout(()=>mv=null,100)};JX()&&WZ(document.documentElement,"click",aK,!0);const sK=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:Ft.any,closable:{type:Boolean,default:void 0},closeIcon:Ft.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:Ft.any,okText:Ft.any,okType:String,cancelText:Ft.any,icon:Ft.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:on(),cancelButtonProps:on(),destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:on(),maskStyle:on(),mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function,mousePosition:on()}),xt=o.defineComponent({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:Pc(sK(),{width:520,confirmLoading:!1,okType:"primary"}),setup(i,s){let{emit:c,slots:d,attrs:p}=s;const[m]=lO("Modal"),{prefixCls:y,rootPrefixCls:w,direction:S,getPopupContainer:N}=wi("modal",i),[P,_]=oK(y);Fs(i.visible===void 0,"Modal","`visible` will be removed in next major version, please use `open` instead.");const T=z=>{c("update:visible",!1),c("update:open",!1),c("cancel",z),c("change",!1)},Q=z=>{c("ok",z)},Z=()=>{var z,G;const{okText:te=(z=d.okText)===null||z===void 0?void 0:z.call(d),okType:$,cancelText:H=(G=d.cancelText)===null||G===void 0?void 0:G.call(d),confirmLoading:X}=i;return o.createVNode(o.Fragment,null,[o.createVNode(Ia,Je({onClick:T},i.cancelButtonProps),{default:()=>[H||m.value.cancelText]}),o.createVNode(Ia,Je(Je({},cE($)),{},{loading:X,onClick:Q},i.okButtonProps),{default:()=>[te||m.value.okText]})])};return()=>{var z,G;const{prefixCls:te,visible:$,open:H,wrapClassName:X,centered:re,getContainer:oe,closeIcon:U=(z=d.closeIcon)===null||z===void 0?void 0:z.call(d),focusTriggerAfterClose:ce=!0}=i,he=rK(i,["prefixCls","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),Qe=jt(X,{[`${y.value}-centered`]:!!re,[`${y.value}-wrap-rtl`]:S.value==="rtl"});return P(o.createVNode(JG,Je(Je(Je({},he),p),{},{rootClassName:_.value,class:jt(_.value,p.class),getContainer:oe||N?.value,prefixCls:y.value,wrapClassName:Qe,visible:H??$,onClose:T,focusTriggerAfterClose:ce,transitionName:Bf(w.value,"zoom",i.transitionName),maskTransitionName:Bf(w.value,"fade",i.maskTransitionName),mousePosition:(G=he.mousePosition)!==null&&G!==void 0?G:mv}),ee(ee({},d),{footer:d.footer||Z,closeIcon:()=>o.createVNode("span",{class:`${y.value}-close-x`},[U||o.createVNode(Xs,{class:`${y.value}-close-icon`},null)])})))}}}),lK=()=>{const i=o.shallowRef(!1);return o.onBeforeUnmount(()=>{i.value=!0}),i},cK={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:on(),emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function nT(i){return!!(i&&i.then)}const oT=o.defineComponent({compatConfig:{MODE:3},name:"ActionButton",props:cK,setup(i,s){let{slots:c}=s;const d=o.shallowRef(!1),p=o.shallowRef(),m=o.shallowRef(!1);let y;const w=lK();o.onMounted(()=>{i.autofocus&&(y=setTimeout(()=>{var _,T;return(T=(_=hf(p.value))===null||_===void 0?void 0:_.focus)===null||T===void 0?void 0:T.call(_)}))}),o.onBeforeUnmount(()=>{clearTimeout(y)});const S=function(){for(var _,T=arguments.length,Q=new Array(T),Z=0;Z<T;Z++)Q[Z]=arguments[Z];(_=i.close)===null||_===void 0||_.call(i,...Q)},N=_=>{nT(_)&&(m.value=!0,_.then(function(){w.value||(m.value=!1),S(...arguments),d.value=!1},T=>(w.value||(m.value=!1),d.value=!1,Promise.reject(T))))},P=_=>{const{actionFn:T}=i;if(d.value)return;if(d.value=!0,!T){S();return}let Q;if(i.emitEvent){if(Q=T(_),i.quitOnNullishReturnValue&&!nT(Q)){d.value=!1,S(_);return}}else if(T.length)Q=T(i.close),d.value=!1;else if(Q=T(),!Q){S();return}N(Q)};return()=>{const{type:_,prefixCls:T,buttonProps:Q}=i;return o.createVNode(Ia,Je(Je(Je({},cE(_)),{},{onClick:P,loading:m.value,prefixCls:T},Q),{},{ref:p}),c)}}});function $s(i){return typeof i=="function"?i():i}const iT=o.defineComponent({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","open","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName","confirmPrefixCls","footer"],setup(i,s){let{attrs:c}=s;const[d]=lO("Modal");return process.env.NODE_ENV!=="production"&&Fs(i.visible===void 0,"Modal","`visible` is deprecated, please use `open` instead."),()=>{const{icon:p,onCancel:m,onOk:y,close:w,okText:S,closable:N=!1,zIndex:P,afterClose:_,keyboard:T,centered:Q,getContainer:Z,maskStyle:z,okButtonProps:G,cancelButtonProps:te,okCancel:$,width:H=416,mask:X=!0,maskClosable:re=!1,type:oe,open:U,title:ce,content:he,direction:Qe,closeIcon:ke,modalRender:He,focusTriggerAfterClose:je,rootPrefixCls:Me,bodyStyle:ae,wrapClassName:ue,footer:Ee}=i;let xe=p;if(!p&&p!==null)switch(oe){case"info":xe=o.createVNode(Ra,null,null);break;case"success":xe=o.createVNode(Aa,null,null);break;case"error":xe=o.createVNode(Na,null,null);break;default:xe=o.createVNode(Ma,null,null)}const Ue=i.okType||"primary",Xe=i.prefixCls||"ant-modal",qe=`${Xe}-confirm`,lt=c.style||{},bt=$??oe==="confirm",St=i.autoFocusButton===null?!1:i.autoFocusButton||"ok",kt=`${Xe}-confirm`,an=jt(kt,`${kt}-${i.type}`,{[`${kt}-rtl`]:Qe==="rtl"},c.class),Zt=d.value,Gn=bt&&o.createVNode(oT,{actionFn:m,close:w,autofocus:St==="cancel",buttonProps:te,prefixCls:`${Me}-btn`},{default:()=>[$s(i.cancelText)||Zt.cancelText]});return o.createVNode(xt,{prefixCls:Xe,class:an,wrapClassName:jt({[`${kt}-centered`]:!!Q},ue),onCancel:Wt=>w?.({triggerCancel:!0},Wt),open:U,title:"",footer:"",transitionName:Bf(Me,"zoom",i.transitionName),maskTransitionName:Bf(Me,"fade",i.maskTransitionName),mask:X,maskClosable:re,maskStyle:z,style:lt,bodyStyle:ae,width:H,zIndex:P,afterClose:_,keyboard:T,centered:Q,getContainer:Z,closable:N,closeIcon:ke,modalRender:He,focusTriggerAfterClose:je},{default:()=>[o.createVNode("div",{class:`${qe}-body-wrapper`},[o.createVNode("div",{class:`${qe}-body`},[$s(xe),ce===void 0?null:o.createVNode("span",{class:`${qe}-title`},[$s(ce)]),o.createVNode("div",{class:`${qe}-content`},[$s(he)])]),Ee!==void 0?$s(Ee):o.createVNode("div",{class:`${qe}-btns`},[Gn,o.createVNode(oT,{type:Ue,actionFn:y,close:w,autofocus:St==="ok",buttonProps:G,prefixCls:`${Me}-btn`},{default:()=>[$s(S)||(bt?Zt.okText:Zt.justOkText)]})])])]})}}}),Da=[],zc=i=>{const s=document.createDocumentFragment();let c=ee(ee({},zP(i,["parentContext","appContext"])),{close:m,open:!0}),d=null;function p(){d&&(o.render(null,s),d=null);for(var N=arguments.length,P=new Array(N),_=0;_<N;_++)P[_]=arguments[_];const T=P.some(Q=>Q&&Q.triggerCancel);i.onCancel&&T&&i.onCancel(()=>{},...P.slice(1));for(let Q=0;Q<Da.length;Q++)if(Da[Q]===m){Da.splice(Q,1);break}}function m(){for(var N=arguments.length,P=new Array(N),_=0;_<N;_++)P[_]=arguments[_];c=ee(ee({},c),{open:!1,afterClose:()=>{typeof i.afterClose=="function"&&i.afterClose(),p.apply(this,P)}}),c.visible&&delete c.visible,y(c)}function y(N){typeof N=="function"?c=N(c):c=ee(ee({},c),N),d&&uU(d,c,s)}const w=N=>{const P=Mn,_=P.prefixCls,T=N.prefixCls||`${_}-modal`,Q=P.iconPrefixCls,Z=qX();return o.createVNode(Js,Je(Je({},P),{},{prefixCls:_}),{default:()=>[o.createVNode(iT,Je(Je({},N),{},{rootPrefixCls:_,prefixCls:T,iconPrefixCls:Q,locale:Z,cancelText:N.cancelText||Z.cancelText}),null)]})};function S(N){const P=o.createVNode(w,ee({},N));return P.appContext=i.parentContext||i.appContext||P.appContext,o.render(P,s),P}return d=S(c),Da.push(m),{destroy:m,update:y}};function rT(i){return ee(ee({},i),{type:"warning"})}function aT(i){return ee(ee({},i),{type:"info"})}function sT(i){return ee(ee({},i),{type:"success"})}function lT(i){return ee(ee({},i),{type:"error"})}function cT(i){return ee(ee({},i),{type:"confirm"})}const uK=()=>({config:Object,afterClose:Function,destroyAction:Function,open:Boolean}),dK=o.defineComponent({name:"HookModal",inheritAttrs:!1,props:Pc(uK(),{config:{width:520,okType:"primary"}}),setup(i,s){let{expose:c}=s;var d;const p=o.computed(()=>i.open),m=o.computed(()=>i.config),{direction:y,getPrefixCls:w}=mf(),S=w("modal"),N=w(),P=()=>{var Z,z;i?.afterClose(),(z=(Z=m.value).afterClose)===null||z===void 0||z.call(Z)},_=function(){i.destroyAction(...arguments)};c({destroy:_});const T=(d=m.value.okCancel)!==null&&d!==void 0?d:m.value.type==="confirm",[Q]=lO("Modal",Or.Modal);return()=>o.createVNode(iT,Je(Je({prefixCls:S,rootPrefixCls:N},m.value),{},{close:_,open:p.value,afterClose:P,okText:m.value.okText||(T?Q?.value.okText:Q?.value.justOkText),direction:m.value.direction||y.value,cancelText:m.value.cancelText||Q?.value.cancelText}),null)}});let uT=0;const fK=o.defineComponent({name:"ElementsHolder",inheritAttrs:!1,setup(i,s){let{expose:c}=s;const d=o.shallowRef([]);return c({addModal:p=>(d.value.push(p),d.value=d.value.slice(),()=>{d.value=d.value.filter(m=>m!==p)})}),()=>d.value.map(p=>p())}});function hK(){const i=o.shallowRef(null),s=o.shallowRef([]);o.watch(s,()=>{s.value.length&&([...s.value].forEach(m=>{m()}),s.value=[])},{immediate:!0});const c=m=>function(y){var w;uT+=1;const S=o.shallowRef(!0),N=o.shallowRef(null),P=o.shallowRef(o.unref(y)),_=o.shallowRef({});o.watch(()=>y,G=>{z(ee(ee({},o.isRef(G)?G.value:G),_.value))});const T=function(){S.value=!1;for(var G=arguments.length,te=new Array(G),$=0;$<G;$++)te[$]=arguments[$];const H=te.some(X=>X&&X.triggerCancel);P.value.onCancel&&H&&P.value.onCancel(()=>{},...te.slice(1))};let Q;const Z=()=>o.createVNode(dK,{key:`modal-${uT}`,config:m(P.value),ref:N,open:S.value,destroyAction:T,afterClose:()=>{Q?.()}},null);Q=(w=i.value)===null||w===void 0?void 0:w.addModal(Z),Q&&Da.push(Q);const z=G=>{P.value=ee(ee({},P.value),G)};return{destroy:()=>{N.value?T():s.value=[...s.value,T]},update:G=>{_.value=G,N.value?z(G):s.value=[...s.value,()=>z(G)]}}},d=o.computed(()=>({info:c(aT),success:c(sT),error:c(lT),warning:c(rT),confirm:c(cT)})),p=Symbol("modalHolderKey");return[d.value,()=>o.createVNode(fK,{key:p,ref:i},null)]}function dT(i){return zc(rT(i))}xt.useModal=hK,xt.info=function(i){return zc(aT(i))},xt.success=function(i){return zc(sT(i))},xt.error=function(i){return zc(lT(i))},xt.warning=dT,xt.warn=dT,xt.confirm=function(i){return zc(cT(i))},xt.destroyAll=function(){for(;Da.length;){const i=Da.pop();i&&i()}},xt.install=function(i){return i.component(xt.name,xt),i};/*!
|
|
154
|
-
* shared v9.14.0
|
|
155
|
-
* (c) 2024 kazuya kawaguchi
|
|
156
|
-
* Released under the MIT License.
|
|
157
|
-
*/const Go=typeof window<"u";let wo,Ba;if(process.env.NODE_ENV!=="production"){const i=Go&&window.performance;i&&i.mark&&i.measure&&i.clearMarks&&i.clearMeasures&&(wo=s=>{i.mark(s)},Ba=(s,c,d)=>{i.measure(s,c,d),i.clearMarks(c),i.clearMarks(d)})}const pK=/\{([0-9a-zA-Z]+)\}/g;function gv(i,...s){return s.length===1&&yt(s[0])&&(s=s[0]),(!s||!s.hasOwnProperty)&&(s={}),i.replace(pK,(c,d)=>s.hasOwnProperty(d)?s[d]:"")}const ki=(i,s=!1)=>s?Symbol.for(i):Symbol(i),mK=(i,s,c)=>gK({l:i,k:s,s:c}),gK=i=>JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),un=i=>typeof i=="number"&&isFinite(i),OK=i=>mT(i)==="[object Date]",Sr=i=>mT(i)==="[object RegExp]",Gf=i=>ot(i)&&Object.keys(i).length===0,Rn=Object.assign;let fT;const Zi=()=>fT||(fT=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof oi<"u"?oi:{});function hT(i){return i.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const vK=Object.prototype.hasOwnProperty;function Kf(i,s){return vK.call(i,s)}const Tt=Array.isArray,Ct=i=>typeof i=="function",Ie=i=>typeof i=="string",ut=i=>typeof i=="boolean",yt=i=>i!==null&&typeof i=="object",yK=i=>yt(i)&&Ct(i.then)&&Ct(i.catch),pT=Object.prototype.toString,mT=i=>pT.call(i),ot=i=>{if(!yt(i))return!1;const s=Object.getPrototypeOf(i);return s===null||s.constructor===Object},bK=i=>i==null?"":Tt(i)||ot(i)&&i.toString===pT?JSON.stringify(i,null,2):String(i);function xK(i,s=""){return i.reduce((c,d,p)=>p===0?c+d:c+s+d,"")}const gT=2;function wK(i,s=0,c=i.length){const d=i.split(/\r?\n/);let p=0;const m=[];for(let y=0;y<d.length;y++)if(p+=d[y].length+1,p>=s){for(let w=y-gT;w<=y+gT||c>p;w++){if(w<0||w>=d.length)continue;const S=w+1;m.push(`${S}${" ".repeat(3-String(S).length)}| ${d[w]}`);const N=d[w].length;if(w===y){const P=s-(p-N)+1,_=Math.max(1,c>p?N-P:c-s);m.push(" | "+" ".repeat(P)+"^".repeat(_))}else if(w>y){if(c>p){const P=Math.max(Math.min(c-p,N),1);m.push(" | "+"^".repeat(P))}p+=N+1}}break}return m.join(`
|
|
158
|
-
`)}function Jf(i){let s=i;return()=>++s}function dn(i,s){typeof console<"u"&&(console.warn("[intlify] "+i),s&&console.warn(s.stack))}const OT={};function vT(i){OT[i]||(OT[i]=!0,dn(i))}function Ov(){const i=new Map;return{events:i,on(s,c){const d=i.get(s);d&&d.push(c)||i.set(s,[c])},off(s,c){const d=i.get(s);d&&d.splice(d.indexOf(c)>>>0,1)},emit(s,c){(i.get(s)||[]).slice().map(d=>d(c)),(i.get("*")||[]).slice().map(d=>d(s,c))}}}const $f=i=>!yt(i)||Tt(i);function qf(i,s){if($f(i)||$f(s))throw new Error("Invalid value");const c=[{src:i,des:s}];for(;c.length;){const{src:d,des:p}=c.pop();Object.keys(d).forEach(m=>{$f(d[m])||$f(p[m])?p[m]=d[m]:c.push({src:d[m],des:p[m]})})}}/*!
|
|
159
|
-
* message-compiler v9.14.0
|
|
160
|
-
* (c) 2024 kazuya kawaguchi
|
|
161
|
-
* Released under the MIT License.
|
|
162
|
-
*/function SK(i,s,c){return{line:i,column:s,offset:c}}function eh(i,s,c){return{start:i,end:s}}const CK=/\{([0-9a-zA-Z]+)\}/g;function yT(i,...s){return s.length===1&&kK(s[0])&&(s=s[0]),(!s||!s.hasOwnProperty)&&(s={}),i.replace(CK,(c,d)=>s.hasOwnProperty(d)?s[d]:"")}const bT=Object.assign,xT=i=>typeof i=="string",kK=i=>i!==null&&typeof i=="object";function wT(i,s=""){return i.reduce((c,d,p)=>p===0?c+d:c+s+d,"")}const th={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},PK={[th.USE_MODULO_SYNTAX]:"Use modulo before '{{0}}'."};function _K(i,s,...c){const d=yT(PK[i],...c||[]),p={message:String(d),code:i};return s&&(p.location=s),p}const nt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},EK={[nt.EXPECTED_TOKEN]:"Expected token: '{0}'",[nt.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[nt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[nt.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[nt.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[nt.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[nt.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[nt.EMPTY_PLACEHOLDER]:"Empty placeholder",[nt.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[nt.INVALID_LINKED_FORMAT]:"Invalid linked format",[nt.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[nt.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[nt.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[nt.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[nt.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[nt.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function qs(i,s,c={}){const{domain:d,messages:p,args:m}=c,y=yT((p||EK)[i]||"",...m||[]),w=new SyntaxError(String(y));return w.code=i,s&&(w.location=s),w.domain=d,w}function TK(i){throw i}const NK=/<\/?[\w\s="/.':;#-\/]+>/,AK=i=>NK.test(i),Wi=" ",MK="\r",ao=`
|
|
163
|
-
`,RK="\u2028",IK="\u2029";function QK(i){const s=i;let c=0,d=1,p=1,m=0;const y=U=>s[U]===MK&&s[U+1]===ao,w=U=>s[U]===ao,S=U=>s[U]===IK,N=U=>s[U]===RK,P=U=>y(U)||w(U)||S(U)||N(U),_=()=>c,T=()=>d,Q=()=>p,Z=()=>m,z=U=>y(U)||S(U)||N(U)?ao:s[U],G=()=>z(c),te=()=>z(c+m);function $(){return m=0,P(c)&&(d++,p=0),y(c)&&c++,c++,p++,s[c]}function H(){return y(c+m)&&m++,m++,s[c+m]}function X(){c=0,d=1,p=1,m=0}function re(U=0){m=U}function oe(){const U=c+m;for(;U!==c;)$();m=0}return{index:_,line:T,column:Q,peekOffset:Z,charAt:z,currentChar:G,currentPeek:te,next:$,peek:H,reset:X,resetPeek:re,skipToPeek:oe}}const Cr=void 0,ST="'",DK="tokenizer";function BK(i,s={}){const c=s.location!==!1,d=QK(i),p=()=>d.index(),m=()=>SK(d.line(),d.column(),d.index()),y=m(),w=p(),S={currentType:14,offset:w,startLoc:y,endLoc:y,lastType:14,lastOffset:w,lastStartLoc:y,lastEndLoc:y,braceNest:0,inLinked:!1,text:""},N=()=>S,{onError:P}=s;function _(J,ne,Ce,...Ge){const rt=N();if(ne.column+=Ce,ne.offset+=Ce,P){const de=c?eh(rt.startLoc,ne):null,_e=qs(J,de,{domain:DK,args:Ge});P(_e)}}function T(J,ne,Ce){J.endLoc=m(),J.currentType=ne;const Ge={type:ne};return c&&(Ge.loc=eh(J.startLoc,J.endLoc)),Ce!=null&&(Ge.value=Ce),Ge}const Q=J=>T(J,14);function Z(J,ne){return J.currentChar()===ne?(J.next(),ne):(_(nt.EXPECTED_TOKEN,m(),0,ne),"")}function z(J){let ne="";for(;J.currentPeek()===Wi||J.currentPeek()===ao;)ne+=J.currentPeek(),J.peek();return ne}function G(J){const ne=z(J);return J.skipToPeek(),ne}function te(J){if(J===Cr)return!1;const ne=J.charCodeAt(0);return ne>=97&&ne<=122||ne>=65&&ne<=90||ne===95}function $(J){if(J===Cr)return!1;const ne=J.charCodeAt(0);return ne>=48&&ne<=57}function H(J,ne){const{currentType:Ce}=ne;if(Ce!==2)return!1;z(J);const Ge=te(J.currentPeek());return J.resetPeek(),Ge}function X(J,ne){const{currentType:Ce}=ne;if(Ce!==2)return!1;z(J);const Ge=J.currentPeek()==="-"?J.peek():J.currentPeek(),rt=$(Ge);return J.resetPeek(),rt}function re(J,ne){const{currentType:Ce}=ne;if(Ce!==2)return!1;z(J);const Ge=J.currentPeek()===ST;return J.resetPeek(),Ge}function oe(J,ne){const{currentType:Ce}=ne;if(Ce!==8)return!1;z(J);const Ge=J.currentPeek()===".";return J.resetPeek(),Ge}function U(J,ne){const{currentType:Ce}=ne;if(Ce!==9)return!1;z(J);const Ge=te(J.currentPeek());return J.resetPeek(),Ge}function ce(J,ne){const{currentType:Ce}=ne;if(!(Ce===8||Ce===12))return!1;z(J);const Ge=J.currentPeek()===":";return J.resetPeek(),Ge}function he(J,ne){const{currentType:Ce}=ne;if(Ce!==10)return!1;const Ge=()=>{const de=J.currentPeek();return de==="{"?te(J.peek()):de==="@"||de==="%"||de==="|"||de===":"||de==="."||de===Wi||!de?!1:de===ao?(J.peek(),Ge()):He(J,!1)},rt=Ge();return J.resetPeek(),rt}function Qe(J){z(J);const ne=J.currentPeek()==="|";return J.resetPeek(),ne}function ke(J){const ne=z(J),Ce=J.currentPeek()==="%"&&J.peek()==="{";return J.resetPeek(),{isModulo:Ce,hasSpace:ne.length>0}}function He(J,ne=!0){const Ce=(rt=!1,de="",_e=!1)=>{const ct=J.currentPeek();return ct==="{"?de==="%"?!1:rt:ct==="@"||!ct?de==="%"?!0:rt:ct==="%"?(J.peek(),Ce(rt,"%",!0)):ct==="|"?de==="%"||_e?!0:!(de===Wi||de===ao):ct===Wi?(J.peek(),Ce(!0,Wi,_e)):ct===ao?(J.peek(),Ce(!0,ao,_e)):!0},Ge=Ce();return ne&&J.resetPeek(),Ge}function je(J,ne){const Ce=J.currentChar();return Ce===Cr?Cr:ne(Ce)?(J.next(),Ce):null}function Me(J){const ne=J.charCodeAt(0);return ne>=97&&ne<=122||ne>=65&&ne<=90||ne>=48&&ne<=57||ne===95||ne===36}function ae(J){return je(J,Me)}function ue(J){const ne=J.charCodeAt(0);return ne>=97&&ne<=122||ne>=65&&ne<=90||ne>=48&&ne<=57||ne===95||ne===36||ne===45}function Ee(J){return je(J,ue)}function xe(J){const ne=J.charCodeAt(0);return ne>=48&&ne<=57}function Ue(J){return je(J,xe)}function Xe(J){const ne=J.charCodeAt(0);return ne>=48&&ne<=57||ne>=65&&ne<=70||ne>=97&&ne<=102}function qe(J){return je(J,Xe)}function lt(J){let ne="",Ce="";for(;ne=Ue(J);)Ce+=ne;return Ce}function bt(J){G(J);const ne=J.currentChar();return ne!=="%"&&_(nt.EXPECTED_TOKEN,m(),0,ne),J.next(),"%"}function St(J){let ne="";for(;;){const Ce=J.currentChar();if(Ce==="{"||Ce==="}"||Ce==="@"||Ce==="|"||!Ce)break;if(Ce==="%")if(He(J))ne+=Ce,J.next();else break;else if(Ce===Wi||Ce===ao)if(He(J))ne+=Ce,J.next();else{if(Qe(J))break;ne+=Ce,J.next()}else ne+=Ce,J.next()}return ne}function kt(J){G(J);let ne="",Ce="";for(;ne=Ee(J);)Ce+=ne;return J.currentChar()===Cr&&_(nt.UNTERMINATED_CLOSING_BRACE,m(),0),Ce}function an(J){G(J);let ne="";return J.currentChar()==="-"?(J.next(),ne+=`-${lt(J)}`):ne+=lt(J),J.currentChar()===Cr&&_(nt.UNTERMINATED_CLOSING_BRACE,m(),0),ne}function Zt(J){return J!==ST&&J!==ao}function Gn(J){G(J),Z(J,"'");let ne="",Ce="";for(;ne=je(J,Zt);)ne==="\\"?Ce+=Wt(J):Ce+=ne;const Ge=J.currentChar();return Ge===ao||Ge===Cr?(_(nt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,m(),0),Ge===ao&&(J.next(),Z(J,"'")),Ce):(Z(J,"'"),Ce)}function Wt(J){const ne=J.currentChar();switch(ne){case"\\":case"'":return J.next(),`\\${ne}`;case"u":return zt(J,ne,4);case"U":return zt(J,ne,6);default:return _(nt.UNKNOWN_ESCAPE_SEQUENCE,m(),0,ne),""}}function zt(J,ne,Ce){Z(J,ne);let Ge="";for(let rt=0;rt<Ce;rt++){const de=qe(J);if(!de){_(nt.INVALID_UNICODE_ESCAPE_SEQUENCE,m(),0,`\\${ne}${Ge}${J.currentChar()}`);break}Ge+=de}return`\\${ne}${Ge}`}function jn(J){return J!=="{"&&J!=="}"&&J!==Wi&&J!==ao}function ko(J){G(J);let ne="",Ce="";for(;ne=je(J,jn);)Ce+=ne;return Ce}function Bo(J){let ne="",Ce="";for(;ne=ae(J);)Ce+=ne;return Ce}function Ae(J){const ne=Ce=>{const Ge=J.currentChar();return Ge==="{"||Ge==="%"||Ge==="@"||Ge==="|"||Ge==="("||Ge===")"||!Ge||Ge===Wi?Ce:(Ce+=Ge,J.next(),ne(Ce))};return ne("")}function gt(J){G(J);const ne=Z(J,"|");return G(J),ne}function za(J,ne){let Ce=null;switch(J.currentChar()){case"{":return ne.braceNest>=1&&_(nt.NOT_ALLOW_NEST_PLACEHOLDER,m(),0),J.next(),Ce=T(ne,2,"{"),G(J),ne.braceNest++,Ce;case"}":return ne.braceNest>0&&ne.currentType===2&&_(nt.EMPTY_PLACEHOLDER,m(),0),J.next(),Ce=T(ne,3,"}"),ne.braceNest--,ne.braceNest>0&&G(J),ne.inLinked&&ne.braceNest===0&&(ne.inLinked=!1),Ce;case"@":return ne.braceNest>0&&_(nt.UNTERMINATED_CLOSING_BRACE,m(),0),Ce=Mr(J,ne)||Q(ne),ne.braceNest=0,Ce;default:{let Ge=!0,rt=!0,de=!0;if(Qe(J))return ne.braceNest>0&&_(nt.UNTERMINATED_CLOSING_BRACE,m(),0),Ce=T(ne,1,gt(J)),ne.braceNest=0,ne.inLinked=!1,Ce;if(ne.braceNest>0&&(ne.currentType===5||ne.currentType===6||ne.currentType===7))return _(nt.UNTERMINATED_CLOSING_BRACE,m(),0),ne.braceNest=0,Ua(J,ne);if(Ge=H(J,ne))return Ce=T(ne,5,kt(J)),G(J),Ce;if(rt=X(J,ne))return Ce=T(ne,6,an(J)),G(J),Ce;if(de=re(J,ne))return Ce=T(ne,7,Gn(J)),G(J),Ce;if(!Ge&&!rt&&!de)return Ce=T(ne,13,ko(J)),_(nt.INVALID_TOKEN_IN_PLACEHOLDER,m(),0,Ce.value),G(J),Ce;break}}return Ce}function Mr(J,ne){const{currentType:Ce}=ne;let Ge=null;const rt=J.currentChar();switch((Ce===8||Ce===9||Ce===12||Ce===10)&&(rt===ao||rt===Wi)&&_(nt.INVALID_LINKED_FORMAT,m(),0),rt){case"@":return J.next(),Ge=T(ne,8,"@"),ne.inLinked=!0,Ge;case".":return G(J),J.next(),T(ne,9,".");case":":return G(J),J.next(),T(ne,10,":");default:return Qe(J)?(Ge=T(ne,1,gt(J)),ne.braceNest=0,ne.inLinked=!1,Ge):oe(J,ne)||ce(J,ne)?(G(J),Mr(J,ne)):U(J,ne)?(G(J),T(ne,12,Bo(J))):he(J,ne)?(G(J),rt==="{"?za(J,ne)||Ge:T(ne,11,Ae(J))):(Ce===8&&_(nt.INVALID_LINKED_FORMAT,m(),0),ne.braceNest=0,ne.inLinked=!1,Ua(J,ne))}}function Ua(J,ne){let Ce={type:14};if(ne.braceNest>0)return za(J,ne)||Q(ne);if(ne.inLinked)return Mr(J,ne)||Q(ne);switch(J.currentChar()){case"{":return za(J,ne)||Q(ne);case"}":return _(nt.UNBALANCED_CLOSING_BRACE,m(),0),J.next(),T(ne,3,"}");case"@":return Mr(J,ne)||Q(ne);default:{if(Qe(J))return Ce=T(ne,1,gt(J)),ne.braceNest=0,ne.inLinked=!1,Ce;const{isModulo:Ge,hasSpace:rt}=ke(J);if(Ge)return rt?T(ne,0,St(J)):T(ne,4,bt(J));if(He(J))return T(ne,0,St(J));break}}return Ce}function eu(){const{currentType:J,offset:ne,startLoc:Ce,endLoc:Ge}=S;return S.lastType=J,S.lastOffset=ne,S.lastStartLoc=Ce,S.lastEndLoc=Ge,S.offset=p(),S.startLoc=m(),d.currentChar()===Cr?T(S,14):Ua(d,S)}return{nextToken:eu,currentOffset:p,currentPosition:m,context:N}}const LK="parser",VK=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function jK(i,s,c){switch(i){case"\\\\":return"\\";case"\\'":return"'";default:{const d=parseInt(s||c,16);return d<=55295||d>=57344?String.fromCodePoint(d):"�"}}}function FK(i={}){const s=i.location!==!1,{onError:c,onWarn:d}=i;function p(H,X,re,oe,...U){const ce=H.currentPosition();if(ce.offset+=oe,ce.column+=oe,c){const he=s?eh(re,ce):null,Qe=qs(X,he,{domain:LK,args:U});c(Qe)}}function m(H,X,re,oe,...U){const ce=H.currentPosition();if(ce.offset+=oe,ce.column+=oe,d){const he=s?eh(re,ce):null;d(_K(X,he,U))}}function y(H,X,re){const oe={type:H};return s&&(oe.start=X,oe.end=X,oe.loc={start:re,end:re}),oe}function w(H,X,re,oe){s&&(H.end=X,H.loc&&(H.loc.end=re))}function S(H,X){const re=H.context(),oe=y(3,re.offset,re.startLoc);return oe.value=X,w(oe,H.currentOffset(),H.currentPosition()),oe}function N(H,X){const re=H.context(),{lastOffset:oe,lastStartLoc:U}=re,ce=y(5,oe,U);return ce.index=parseInt(X,10),H.nextToken(),w(ce,H.currentOffset(),H.currentPosition()),ce}function P(H,X,re){const oe=H.context(),{lastOffset:U,lastStartLoc:ce}=oe,he=y(4,U,ce);return he.key=X,re===!0&&(he.modulo=!0),H.nextToken(),w(he,H.currentOffset(),H.currentPosition()),he}function _(H,X){const re=H.context(),{lastOffset:oe,lastStartLoc:U}=re,ce=y(9,oe,U);return ce.value=X.replace(VK,jK),H.nextToken(),w(ce,H.currentOffset(),H.currentPosition()),ce}function T(H){const X=H.nextToken(),re=H.context(),{lastOffset:oe,lastStartLoc:U}=re,ce=y(8,oe,U);return X.type!==12?(p(H,nt.UNEXPECTED_EMPTY_LINKED_MODIFIER,re.lastStartLoc,0),ce.value="",w(ce,oe,U),{nextConsumeToken:X,node:ce}):(X.value==null&&p(H,nt.UNEXPECTED_LEXICAL_ANALYSIS,re.lastStartLoc,0,Ko(X)),ce.value=X.value||"",w(ce,H.currentOffset(),H.currentPosition()),{node:ce})}function Q(H,X){const re=H.context(),oe=y(7,re.offset,re.startLoc);return oe.value=X,w(oe,H.currentOffset(),H.currentPosition()),oe}function Z(H){const X=H.context(),re=y(6,X.offset,X.startLoc);let oe=H.nextToken();if(oe.type===9){const U=T(H);re.modifier=U.node,oe=U.nextConsumeToken||H.nextToken()}switch(oe.type!==10&&p(H,nt.UNEXPECTED_LEXICAL_ANALYSIS,X.lastStartLoc,0,Ko(oe)),oe=H.nextToken(),oe.type===2&&(oe=H.nextToken()),oe.type){case 11:oe.value==null&&p(H,nt.UNEXPECTED_LEXICAL_ANALYSIS,X.lastStartLoc,0,Ko(oe)),re.key=Q(H,oe.value||"");break;case 5:oe.value==null&&p(H,nt.UNEXPECTED_LEXICAL_ANALYSIS,X.lastStartLoc,0,Ko(oe)),re.key=P(H,oe.value||"");break;case 6:oe.value==null&&p(H,nt.UNEXPECTED_LEXICAL_ANALYSIS,X.lastStartLoc,0,Ko(oe)),re.key=N(H,oe.value||"");break;case 7:oe.value==null&&p(H,nt.UNEXPECTED_LEXICAL_ANALYSIS,X.lastStartLoc,0,Ko(oe)),re.key=_(H,oe.value||"");break;default:{p(H,nt.UNEXPECTED_EMPTY_LINKED_KEY,X.lastStartLoc,0);const U=H.context(),ce=y(7,U.offset,U.startLoc);return ce.value="",w(ce,U.offset,U.startLoc),re.key=ce,w(re,U.offset,U.startLoc),{nextConsumeToken:oe,node:re}}}return w(re,H.currentOffset(),H.currentPosition()),{node:re}}function z(H){const X=H.context(),re=X.currentType===1?H.currentOffset():X.offset,oe=X.currentType===1?X.endLoc:X.startLoc,U=y(2,re,oe);U.items=[];let ce=null,he=null;do{const He=ce||H.nextToken();switch(ce=null,He.type){case 0:He.value==null&&p(H,nt.UNEXPECTED_LEXICAL_ANALYSIS,X.lastStartLoc,0,Ko(He)),U.items.push(S(H,He.value||""));break;case 6:He.value==null&&p(H,nt.UNEXPECTED_LEXICAL_ANALYSIS,X.lastStartLoc,0,Ko(He)),U.items.push(N(H,He.value||""));break;case 4:he=!0;break;case 5:He.value==null&&p(H,nt.UNEXPECTED_LEXICAL_ANALYSIS,X.lastStartLoc,0,Ko(He)),U.items.push(P(H,He.value||"",!!he)),he&&(m(H,th.USE_MODULO_SYNTAX,X.lastStartLoc,0,Ko(He)),he=null);break;case 7:He.value==null&&p(H,nt.UNEXPECTED_LEXICAL_ANALYSIS,X.lastStartLoc,0,Ko(He)),U.items.push(_(H,He.value||""));break;case 8:{const je=Z(H);U.items.push(je.node),ce=je.nextConsumeToken||null;break}}}while(X.currentType!==14&&X.currentType!==1);const Qe=X.currentType===1?X.lastOffset:H.currentOffset(),ke=X.currentType===1?X.lastEndLoc:H.currentPosition();return w(U,Qe,ke),U}function G(H,X,re,oe){const U=H.context();let ce=oe.items.length===0;const he=y(1,X,re);he.cases=[],he.cases.push(oe);do{const Qe=z(H);ce||(ce=Qe.items.length===0),he.cases.push(Qe)}while(U.currentType!==14);return ce&&p(H,nt.MUST_HAVE_MESSAGES_IN_PLURAL,re,0),w(he,H.currentOffset(),H.currentPosition()),he}function te(H){const X=H.context(),{offset:re,startLoc:oe}=X,U=z(H);return X.currentType===14?U:G(H,re,oe,U)}function $(H){const X=BK(H,bT({},i)),re=X.context(),oe=y(0,re.offset,re.startLoc);return s&&oe.loc&&(oe.loc.source=H),oe.body=te(X),i.onCacheKey&&(oe.cacheKey=i.onCacheKey(H)),re.currentType!==14&&p(X,nt.UNEXPECTED_LEXICAL_ANALYSIS,re.lastStartLoc,0,H[re.offset]||""),w(oe,X.currentOffset(),X.currentPosition()),oe}return{parse:$}}function Ko(i){if(i.type===14)return"EOF";const s=(i.value||"").replace(/\r?\n/gu,"\\n");return s.length>10?s.slice(0,9)+"…":s}function ZK(i,s={}){const c={ast:i,helpers:new Set};return{context:()=>c,helper:d=>(c.helpers.add(d),d)}}function CT(i,s){for(let c=0;c<i.length;c++)vv(i[c],s)}function vv(i,s){switch(i.type){case 1:CT(i.cases,s),s.helper("plural");break;case 2:CT(i.items,s);break;case 6:{vv(i.key,s),s.helper("linked"),s.helper("type");break}case 5:s.helper("interpolate"),s.helper("list");break;case 4:s.helper("interpolate"),s.helper("named");break}}function WK(i,s={}){const c=ZK(i);c.helper("normalize"),i.body&&vv(i.body,c);const d=c.context();i.helpers=Array.from(d.helpers)}function zK(i){const s=i.body;return s.type===2?kT(s):s.cases.forEach(c=>kT(c)),i}function kT(i){if(i.items.length===1){const s=i.items[0];(s.type===3||s.type===9)&&(i.static=s.value,delete s.value)}else{const s=[];for(let c=0;c<i.items.length;c++){const d=i.items[c];if(!(d.type===3||d.type===9)||d.value==null)break;s.push(d.value)}if(s.length===i.items.length){i.static=wT(s);for(let c=0;c<i.items.length;c++){const d=i.items[c];(d.type===3||d.type===9)&&delete d.value}}}}const UK="minifier";function el(i){switch(i.t=i.type,i.type){case 0:{const s=i;el(s.body),s.b=s.body,delete s.body;break}case 1:{const s=i,c=s.cases;for(let d=0;d<c.length;d++)el(c[d]);s.c=c,delete s.cases;break}case 2:{const s=i,c=s.items;for(let d=0;d<c.length;d++)el(c[d]);s.i=c,delete s.items,s.static&&(s.s=s.static,delete s.static);break}case 3:case 9:case 8:case 7:{const s=i;s.value&&(s.v=s.value,delete s.value);break}case 6:{const s=i;el(s.key),s.k=s.key,delete s.key,s.modifier&&(el(s.modifier),s.m=s.modifier,delete s.modifier);break}case 5:{const s=i;s.i=s.index,delete s.index;break}case 4:{const s=i;s.k=s.key,delete s.key;break}default:throw qs(nt.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:UK,args:[i.type]})}delete i.type}const HK="parser";function YK(i,s){const{sourceMap:c,filename:d,breakLineCode:p,needIndent:m}=s,y=s.location!==!1,w={filename:d,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:p,needIndent:m,indentLevel:0};y&&i.loc&&(w.source=i.loc.source);const S=()=>w;function N(Z,z){w.code+=Z}function P(Z,z=!0){const G=z?p:"";N(m?G+" ".repeat(Z):G)}function _(Z=!0){const z=++w.indentLevel;Z&&P(z)}function T(Z=!0){const z=--w.indentLevel;Z&&P(z)}function Q(){P(w.indentLevel)}return{context:S,push:N,indent:_,deindent:T,newline:Q,helper:Z=>`_${Z}`,needIndent:()=>w.needIndent}}function XK(i,s){const{helper:c}=i;i.push(`${c("linked")}(`),tl(i,s.key),s.modifier?(i.push(", "),tl(i,s.modifier),i.push(", _type")):i.push(", undefined, _type"),i.push(")")}function GK(i,s){const{helper:c,needIndent:d}=i;i.push(`${c("normalize")}([`),i.indent(d());const p=s.items.length;for(let m=0;m<p&&(tl(i,s.items[m]),m!==p-1);m++)i.push(", ");i.deindent(d()),i.push("])")}function KK(i,s){const{helper:c,needIndent:d}=i;if(s.cases.length>1){i.push(`${c("plural")}([`),i.indent(d());const p=s.cases.length;for(let m=0;m<p&&(tl(i,s.cases[m]),m!==p-1);m++)i.push(", ");i.deindent(d()),i.push("])")}}function JK(i,s){s.body?tl(i,s.body):i.push("null")}function tl(i,s){const{helper:c}=i;switch(s.type){case 0:JK(i,s);break;case 1:KK(i,s);break;case 2:GK(i,s);break;case 6:XK(i,s);break;case 8:i.push(JSON.stringify(s.value),s);break;case 7:i.push(JSON.stringify(s.value),s);break;case 5:i.push(`${c("interpolate")}(${c("list")}(${s.index}))`,s);break;case 4:i.push(`${c("interpolate")}(${c("named")}(${JSON.stringify(s.key)}))`,s);break;case 9:i.push(JSON.stringify(s.value),s);break;case 3:i.push(JSON.stringify(s.value),s);break;default:throw qs(nt.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:HK,args:[s.type]})}}const $K=(i,s={})=>{const c=xT(s.mode)?s.mode:"normal",d=xT(s.filename)?s.filename:"message.intl",p=!!s.sourceMap,m=s.breakLineCode!=null?s.breakLineCode:c==="arrow"?";":`
|
|
164
|
-
`,y=s.needIndent?s.needIndent:c!=="arrow",w=i.helpers||[],S=YK(i,{mode:c,filename:d,sourceMap:p,breakLineCode:m,needIndent:y});S.push(c==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),S.indent(y),w.length>0&&(S.push(`const { ${wT(w.map(_=>`${_}: _${_}`),", ")} } = ctx`),S.newline()),S.push("return "),tl(S,i),S.deindent(y),S.push("}"),delete i.helpers;const{code:N,map:P}=S.context();return{ast:i,code:N,map:P?P.toJSON():void 0}};function qK(i,s={}){const c=bT({},s),d=!!c.jit,p=!!c.minify,m=c.optimize==null?!0:c.optimize,y=FK(c).parse(i);return d?(m&&zK(y),p&&el(y),{ast:y,code:""}):(WK(y,c),$K(y,c))}/*!
|
|
165
|
-
* core-base v9.14.0
|
|
166
|
-
* (c) 2024 kazuya kawaguchi
|
|
167
|
-
* Released under the MIT License.
|
|
168
|
-
*/function eJ(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Zi().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Zi().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Zi().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}const kr=[];kr[0]={w:[0],i:[3,0],"[":[4],o:[7]},kr[1]={w:[1],".":[2],"[":[4],o:[7]},kr[2]={w:[2],i:[3,0],0:[3,0]},kr[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},kr[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},kr[5]={"'":[4,0],o:8,l:[5,0]},kr[6]={'"':[4,0],o:8,l:[6,0]};const tJ=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function nJ(i){return tJ.test(i)}function oJ(i){const s=i.charCodeAt(0),c=i.charCodeAt(i.length-1);return s===c&&(s===34||s===39)?i.slice(1,-1):i}function iJ(i){if(i==null)return"o";switch(i.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return i;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function rJ(i){const s=i.trim();return i.charAt(0)==="0"&&isNaN(parseInt(i))?!1:nJ(s)?oJ(s):"*"+s}function aJ(i){const s=[];let c=-1,d=0,p=0,m,y,w,S,N,P,_;const T=[];T[0]=()=>{y===void 0?y=w:y+=w},T[1]=()=>{y!==void 0&&(s.push(y),y=void 0)},T[2]=()=>{T[0](),p++},T[3]=()=>{if(p>0)p--,d=4,T[0]();else{if(p=0,y===void 0||(y=rJ(y),y===!1))return!1;T[1]()}};function Q(){const Z=i[c+1];if(d===5&&Z==="'"||d===6&&Z==='"')return c++,w="\\"+Z,T[0](),!0}for(;d!==null;)if(c++,m=i[c],!(m==="\\"&&Q())){if(S=iJ(m),_=kr[d],N=_[S]||_.l||8,N===8||(d=N[0],N[1]!==void 0&&(P=T[N[1]],P&&(w=m,P()===!1))))return;if(d===7)return s}}const PT=new Map;function sJ(i,s){return yt(i)?i[s]:null}function lJ(i,s){if(!yt(i))return null;let c=PT.get(s);if(c||(c=aJ(s),c&&PT.set(s,c)),!c)return null;const d=c.length;let p=i,m=0;for(;m<d;){const y=p[c[m]];if(y===void 0||Ct(p))return null;p=y,m++}return p}const cJ=i=>i,uJ=i=>"",dJ="text",fJ=i=>i.length===0?"":xK(i),hJ=bK;function _T(i,s){return i=Math.abs(i),s===2?i?i>1?1:0:1:i?Math.min(i,2):0}function pJ(i){const s=un(i.pluralIndex)?i.pluralIndex:-1;return i.named&&(un(i.named.count)||un(i.named.n))?un(i.named.count)?i.named.count:un(i.named.n)?i.named.n:s:s}function mJ(i,s){s.count||(s.count=i),s.n||(s.n=i)}function gJ(i={}){const s=i.locale,c=pJ(i),d=yt(i.pluralRules)&&Ie(s)&&Ct(i.pluralRules[s])?i.pluralRules[s]:_T,p=yt(i.pluralRules)&&Ie(s)&&Ct(i.pluralRules[s])?_T:void 0,m=G=>G[d(c,G.length,p)],y=i.list||[],w=G=>y[G],S=i.named||{};un(i.pluralIndex)&&mJ(c,S);const N=G=>S[G];function P(G){return(Ct(i.messages)?i.messages(G):yt(i.messages)?i.messages[G]:!1)||(i.parent?i.parent.message(G):uJ)}const _=G=>i.modifiers?i.modifiers[G]:cJ,T=ot(i.processor)&&Ct(i.processor.normalize)?i.processor.normalize:fJ,Q=ot(i.processor)&&Ct(i.processor.interpolate)?i.processor.interpolate:hJ,Z=ot(i.processor)&&Ie(i.processor.type)?i.processor.type:dJ,z={list:w,named:N,plural:m,linked:(G,...te)=>{const[$,H]=te;let X="text",re="";te.length===1?yt($)?(re=$.modifier||re,X=$.type||X):Ie($)&&(re=$||re):te.length===2&&(Ie($)&&(re=$||re),Ie(H)&&(X=H||X));const oe=P(G)(z),U=X==="vnode"&&Tt(oe)&&re?oe[0]:oe;return re?_(re)(U,X):U},message:P,type:Z,interpolate:Q,normalize:T,values:Rn({},y,S)};return z}let Uc=null;function OJ(i){Uc=i}function vJ(i,s,c){Uc&&Uc.emit("i18n:init",{timestamp:Date.now(),i18n:i,version:s,meta:c})}const yJ=bJ("function:translate");function bJ(i){return s=>Uc&&Uc.emit(i,s)}const ET=th.__EXTEND_POINT__,La=Jf(ET),Yn={NOT_FOUND_KEY:ET,FALLBACK_TO_TRANSLATE:La(),CANNOT_FORMAT_NUMBER:La(),FALLBACK_TO_NUMBER_FORMAT:La(),CANNOT_FORMAT_DATE:La(),FALLBACK_TO_DATE_FORMAT:La(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:La(),__EXTEND_POINT__:La()},xJ={[Yn.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[Yn.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Yn.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Yn.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Yn.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Yn.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Yn.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function Va(i,...s){return gv(xJ[i],...s)}const TT=nt.__EXTEND_POINT__,ja=Jf(TT),On={INVALID_ARGUMENT:TT,INVALID_DATE_ARGUMENT:ja(),INVALID_ISO_DATE_ARGUMENT:ja(),NOT_SUPPORT_NON_STRING_MESSAGE:ja(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:ja(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:ja(),NOT_SUPPORT_LOCALE_TYPE:ja(),__EXTEND_POINT__:ja()};function Pi(i){return qs(i,null,process.env.NODE_ENV!=="production"?{messages:wJ}:void 0)}const wJ={[On.INVALID_ARGUMENT]:"Invalid arguments",[On.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[On.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[On.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[On.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[On.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[On.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function yv(i,s){return s.locale!=null?NT(s.locale):NT(i.locale)}let bv;function NT(i){if(Ie(i))return i;if(Ct(i)){if(i.resolvedOnce&&bv!=null)return bv;if(i.constructor.name==="Function"){const s=i();if(yK(s))throw Pi(On.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return bv=s}else throw Pi(On.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Pi(On.NOT_SUPPORT_LOCALE_TYPE)}function SJ(i,s,c){return[...new Set([c,...Tt(s)?s:yt(s)?Object.keys(s):Ie(s)?[s]:[c]])]}function AT(i,s,c){const d=Ie(c)?c:nl,p=i;p.__localeChainCache||(p.__localeChainCache=new Map);let m=p.__localeChainCache.get(d);if(!m){m=[];let y=[c];for(;Tt(y);)y=MT(m,y,s);const w=Tt(s)||!ot(s)?s:s.default?s.default:null;y=Ie(w)?[w]:w,Tt(y)&&MT(m,y,!1),p.__localeChainCache.set(d,m)}return m}function MT(i,s,c){let d=!0;for(let p=0;p<s.length&&ut(d);p++){const m=s[p];Ie(m)&&(d=CJ(i,s[p],c))}return d}function CJ(i,s,c){let d;const p=s.split("-");do{const m=p.join("-");d=kJ(i,m,c),p.splice(-1,1)}while(p.length&&d===!0);return d}function kJ(i,s,c){let d=!1;if(!i.includes(s)&&(d=!0,s)){d=s[s.length-1]!=="!";const p=s.replace(/!/g,"");i.push(p),(Tt(c)||ot(c))&&c[p]&&(d=c[p])}return d}const PJ="9.14.0",nh=-1,nl="en-US",oh="",RT=i=>`${i.charAt(0).toLocaleUpperCase()}${i.substr(1)}`;function _J(){return{upper:(i,s)=>s==="text"&&Ie(i)?i.toUpperCase():s==="vnode"&&yt(i)&&"__v_isVNode"in i?i.children.toUpperCase():i,lower:(i,s)=>s==="text"&&Ie(i)?i.toLowerCase():s==="vnode"&&yt(i)&&"__v_isVNode"in i?i.children.toLowerCase():i,capitalize:(i,s)=>s==="text"&&Ie(i)?RT(i):s==="vnode"&&yt(i)&&"__v_isVNode"in i?RT(i.children):i}}let IT;function QT(i){IT=i}let DT;function EJ(i){DT=i}let BT;function TJ(i){BT=i}let LT=null;const VT=i=>{LT=i},NJ=()=>LT;let jT=0;function AJ(i={}){const s=Ct(i.onWarn)?i.onWarn:dn,c=Ie(i.version)?i.version:PJ,d=Ie(i.locale)||Ct(i.locale)?i.locale:nl,p=Ct(d)?nl:d,m=Tt(i.fallbackLocale)||ot(i.fallbackLocale)||Ie(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:p,y=ot(i.messages)?i.messages:{[p]:{}},w=ot(i.datetimeFormats)?i.datetimeFormats:{[p]:{}},S=ot(i.numberFormats)?i.numberFormats:{[p]:{}},N=Rn({},i.modifiers||{},_J()),P=i.pluralRules||{},_=Ct(i.missing)?i.missing:null,T=ut(i.missingWarn)||Sr(i.missingWarn)?i.missingWarn:!0,Q=ut(i.fallbackWarn)||Sr(i.fallbackWarn)?i.fallbackWarn:!0,Z=!!i.fallbackFormat,z=!!i.unresolving,G=Ct(i.postTranslation)?i.postTranslation:null,te=ot(i.processor)?i.processor:null,$=ut(i.warnHtmlMessage)?i.warnHtmlMessage:!0,H=!!i.escapeParameter,X=Ct(i.messageCompiler)?i.messageCompiler:IT;process.env.NODE_ENV!=="production"&&Ct(i.messageCompiler)&&vT(Va(Yn.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const re=Ct(i.messageResolver)?i.messageResolver:DT||sJ,oe=Ct(i.localeFallbacker)?i.localeFallbacker:BT||SJ,U=yt(i.fallbackContext)?i.fallbackContext:void 0,ce=i,he=yt(ce.__datetimeFormatters)?ce.__datetimeFormatters:new Map,Qe=yt(ce.__numberFormatters)?ce.__numberFormatters:new Map,ke=yt(ce.__meta)?ce.__meta:{};jT++;const He={version:c,cid:jT,locale:d,fallbackLocale:m,messages:y,modifiers:N,pluralRules:P,missing:_,missingWarn:T,fallbackWarn:Q,fallbackFormat:Z,unresolving:z,postTranslation:G,processor:te,warnHtmlMessage:$,escapeParameter:H,messageCompiler:X,messageResolver:re,localeFallbacker:oe,fallbackContext:U,onWarn:s,__meta:ke};return He.datetimeFormats=w,He.numberFormats=S,He.__datetimeFormatters=he,He.__numberFormatters=Qe,process.env.NODE_ENV!=="production"&&(He.__v_emitter=ce.__v_emitter!=null?ce.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&vJ(He,c,ke),He}function ih(i,s){return i instanceof RegExp?i.test(s):i}function FT(i,s){return i instanceof RegExp?i.test(s):i}function xv(i,s,c,d,p){const{missing:m,onWarn:y}=i;if(process.env.NODE_ENV!=="production"){const w=i.__v_emitter;w&&w.emit("missing",{locale:c,key:s,type:p,groupId:`${p}:${s}`})}if(m!==null){const w=m(i,c,s,p);return Ie(w)?w:s}else return process.env.NODE_ENV!=="production"&&FT(d,s)&&y(Va(Yn.NOT_FOUND_KEY,{key:s,locale:c})),s}function Hc(i,s,c){const d=i;d.__localeChainCache=new Map,i.localeFallbacker(i,c,s)}function ZT(i,s){return i===s?!1:i.split("-")[0]===s.split("-")[0]}function MJ(i,s){const c=s.indexOf(i);if(c===-1)return!1;for(let d=c+1;d<s.length;d++)if(ZT(i,s[d]))return!0;return!1}function wv(i){return s=>RJ(s,i)}function RJ(i,s){const c=s.b||s.body;if((c.t||c.type)===1){const d=c,p=d.c||d.cases;return i.plural(p.reduce((m,y)=>[...m,WT(i,y)],[]))}else return WT(i,c)}function WT(i,s){const c=s.s||s.static;if(c)return i.type==="text"?c:i.normalize([c]);{const d=(s.i||s.items).reduce((p,m)=>[...p,Sv(i,m)],[]);return i.normalize(d)}}function Sv(i,s){const c=s.t||s.type;switch(c){case 3:{const d=s;return d.v||d.value}case 9:{const d=s;return d.v||d.value}case 4:{const d=s;return i.interpolate(i.named(d.k||d.key))}case 5:{const d=s;return i.interpolate(i.list(d.i!=null?d.i:d.index))}case 6:{const d=s,p=d.m||d.modifier;return i.linked(Sv(i,d.k||d.key),p?Sv(i,p):void 0,i.type)}case 7:{const d=s;return d.v||d.value}case 8:{const d=s;return d.v||d.value}default:throw new Error(`unhandled node type on format message part: ${c}`)}}const IJ="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function zT(i,s){s&&AK(i)&&dn(gv(IJ,{source:i}))}const UT=i=>i;let ol=Object.create(null);function HT(i){i.code===th.USE_MODULO_SYNTAX&&dn(`The use of named interpolation with modulo syntax is deprecated. It will be removed in v10.
|
|
169
|
-
reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format
|
|
170
|
-
(message compiler warning message: ${i.message})`)}const Pr=i=>yt(i)&&(i.t===0||i.type===0)&&("b"in i||"body"in i);function YT(i,s={}){let c=!1;const d=s.onError||TK;return s.onError=p=>{c=!0,d(p)},{...qK(i,s),detectError:c}}const QJ=(i,s)=>{if(!Ie(i))throw Pi(On.NOT_SUPPORT_NON_STRING_MESSAGE);process.env.NODE_ENV!=="production"&&(s.onWarn=HT);{const c=ut(s.warnHtmlMessage)?s.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&zT(i,c);const d=(s.onCacheKey||UT)(i),p=ol[d];if(p)return p;const{code:m,detectError:y}=YT(i,s),w=new Function(`return ${m}`)();return y?w:ol[d]=w}};function DJ(i,s){if(process.env.NODE_ENV!=="production"&&(s.onWarn=HT),__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&Ie(i)){const c=ut(s.warnHtmlMessage)?s.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&zT(i,c);const d=(s.onCacheKey||UT)(i),p=ol[d];if(p)return p;const{ast:m,detectError:y}=YT(i,{...s,location:process.env.NODE_ENV!=="production",jit:!0}),w=wv(m);return y?w:ol[d]=w}else{if(process.env.NODE_ENV!=="production"&&!Pr(i))return dn(`the message that is resolve with key '${s.key}' is not supported for jit compilation`),()=>i;const c=i.cacheKey;return c?ol[c]||(ol[c]=wv(i)):wv(i)}}const XT=()=>"",Jo=i=>Ct(i);function GT(i,...s){const{fallbackFormat:c,postTranslation:d,unresolving:p,messageCompiler:m,fallbackLocale:y,messages:w}=i,[S,N]=Cv(...s),P=ut(N.missingWarn)?N.missingWarn:i.missingWarn,_=ut(N.fallbackWarn)?N.fallbackWarn:i.fallbackWarn,T=ut(N.escapeParameter)?N.escapeParameter:i.escapeParameter,Q=!!N.resolvedMessage,Z=Ie(N.default)||ut(N.default)?ut(N.default)?m?S:()=>S:N.default:c?m?S:()=>S:"",z=c||Z!=="",G=yv(i,N);T&&BJ(N);let[te,$,H]=Q?[S,G,w[G]||{}]:KT(i,S,G,y,_,P),X=te,re=S;if(!Q&&!(Ie(X)||Pr(X)||Jo(X))&&z&&(X=Z,re=X),!Q&&(!(Ie(X)||Pr(X)||Jo(X))||!Ie($)))return p?nh:S;if(process.env.NODE_ENV!=="production"&&Ie(X)&&i.messageCompiler==null)return dn(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${S}'.`),S;let oe=!1;const U=()=>{oe=!0},ce=Jo(X)?X:JT(i,S,$,X,re,U);if(oe)return X;const he=FJ(i,$,H,N),Qe=gJ(he),ke=LJ(i,ce,Qe),He=d?d(ke,S):ke;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const je={timestamp:Date.now(),key:Ie(S)?S:Jo(X)?X.key:"",locale:$||(Jo(X)?X.locale:""),format:Ie(X)?X:Jo(X)?X.source:"",message:He};je.meta=Rn({},i.__meta,{}),yJ(je)}return He}function BJ(i){Tt(i.list)?i.list=i.list.map(s=>Ie(s)?hT(s):s):yt(i.named)&&Object.keys(i.named).forEach(s=>{Ie(i.named[s])&&(i.named[s]=hT(i.named[s]))})}function KT(i,s,c,d,p,m){const{messages:y,onWarn:w,messageResolver:S,localeFallbacker:N}=i,P=N(i,d,c);let _={},T,Q=null,Z=c,z=null;const G="translate";for(let te=0;te<P.length;te++){if(T=z=P[te],process.env.NODE_ENV!=="production"&&c!==T&&!ZT(c,T)&&ih(p,s)&&w(Va(Yn.FALLBACK_TO_TRANSLATE,{key:s,target:T})),process.env.NODE_ENV!=="production"&&c!==T){const re=i.__v_emitter;re&&re.emit("fallback",{type:G,key:s,from:Z,to:z,groupId:`${G}:${s}`})}_=y[T]||{};let $=null,H,X;if(process.env.NODE_ENV!=="production"&&Go&&($=window.performance.now(),H="intlify-message-resolve-start",X="intlify-message-resolve-end",wo&&wo(H)),(Q=S(_,s))===null&&(Q=_[s]),process.env.NODE_ENV!=="production"&&Go){const re=window.performance.now(),oe=i.__v_emitter;oe&&$&&Q&&oe.emit("message-resolve",{type:"message-resolve",key:s,message:Q,time:re-$,groupId:`${G}:${s}`}),H&&X&&wo&&Ba&&(wo(X),Ba("intlify message resolve",H,X))}if(Ie(Q)||Pr(Q)||Jo(Q))break;if(!MJ(T,P)){const re=xv(i,s,T,m,G);re!==s&&(Q=re)}Z=z}return[Q,T,_]}function JT(i,s,c,d,p,m){const{messageCompiler:y,warnHtmlMessage:w}=i;if(Jo(d)){const T=d;return T.locale=T.locale||c,T.key=T.key||s,T}if(y==null){const T=()=>d;return T.locale=c,T.key=s,T}let S=null,N,P;process.env.NODE_ENV!=="production"&&Go&&(S=window.performance.now(),N="intlify-message-compilation-start",P="intlify-message-compilation-end",wo&&wo(N));const _=y(d,VJ(i,c,p,d,w,m));if(process.env.NODE_ENV!=="production"&&Go){const T=window.performance.now(),Q=i.__v_emitter;Q&&S&&Q.emit("message-compilation",{type:"message-compilation",message:d,time:T-S,groupId:`translate:${s}`}),N&&P&&wo&&Ba&&(wo(P),Ba("intlify message compilation",N,P))}return _.locale=c,_.key=s,_.source=d,_}function LJ(i,s,c){let d=null,p,m;process.env.NODE_ENV!=="production"&&Go&&(d=window.performance.now(),p="intlify-message-evaluation-start",m="intlify-message-evaluation-end",wo&&wo(p));const y=s(c);if(process.env.NODE_ENV!=="production"&&Go){const w=window.performance.now(),S=i.__v_emitter;S&&d&&S.emit("message-evaluation",{type:"message-evaluation",value:y,time:w-d,groupId:`translate:${s.key}`}),p&&m&&wo&&Ba&&(wo(m),Ba("intlify message evaluation",p,m))}return y}function Cv(...i){const[s,c,d]=i,p={};if(!Ie(s)&&!un(s)&&!Jo(s)&&!Pr(s))throw Pi(On.INVALID_ARGUMENT);const m=un(s)?String(s):s;return un(c)?p.plural=c:Ie(c)?p.default=c:ot(c)&&!Gf(c)?p.named=c:Tt(c)&&(p.list=c),un(d)?p.plural=d:Ie(d)?p.default=d:ot(d)&&Rn(p,d),[m,p]}function VJ(i,s,c,d,p,m){return{locale:s,key:c,warnHtmlMessage:p,onError:y=>{if(m&&m(y),process.env.NODE_ENV!=="production"){const w=jJ(d),S=`Message compilation error: ${y.message}`,N=y.location&&w&&wK(w,y.location.start.offset,y.location.end.offset),P=i.__v_emitter;P&&w&&P.emit("compile-error",{message:w,error:y.message,start:y.location&&y.location.start.offset,end:y.location&&y.location.end.offset,groupId:`translate:${c}`}),console.error(N?`${S}
|
|
171
|
-
${N}`:S)}else throw y},onCacheKey:y=>mK(s,c,y)}}function jJ(i){if(Ie(i))return i;if(i.loc&&i.loc.source)return i.loc.source}function FJ(i,s,c,d){const{modifiers:p,pluralRules:m,messageResolver:y,fallbackLocale:w,fallbackWarn:S,missingWarn:N,fallbackContext:P}=i,_={locale:s,modifiers:p,pluralRules:m,messages:T=>{let Q=y(c,T);if(Q==null&&P){const[,,Z]=KT(P,T,s,w,S,N);Q=y(Z,T)}if(Ie(Q)||Pr(Q)){let Z=!1;const z=JT(i,T,s,Q,T,()=>{Z=!0});return Z?XT:z}else return Jo(Q)?Q:XT}};return i.processor&&(_.processor=i.processor),d.list&&(_.list=d.list),d.named&&(_.named=d.named),un(d.plural)&&(_.pluralIndex=d.plural),_}const $T=typeof Intl<"u",qT={dateTimeFormat:$T&&typeof Intl.DateTimeFormat<"u",numberFormat:$T&&typeof Intl.NumberFormat<"u"};function eN(i,...s){const{datetimeFormats:c,unresolving:d,fallbackLocale:p,onWarn:m,localeFallbacker:y}=i,{__datetimeFormatters:w}=i;if(process.env.NODE_ENV!=="production"&&!qT.dateTimeFormat)return m(Va(Yn.CANNOT_FORMAT_DATE)),oh;const[S,N,P,_]=kv(...s),T=ut(P.missingWarn)?P.missingWarn:i.missingWarn,Q=ut(P.fallbackWarn)?P.fallbackWarn:i.fallbackWarn,Z=!!P.part,z=yv(i,P),G=y(i,p,z);if(!Ie(S)||S==="")return new Intl.DateTimeFormat(z,_).format(N);let te={},$,H=null,X=z,re=null;const oe="datetime format";for(let he=0;he<G.length;he++){if($=re=G[he],process.env.NODE_ENV!=="production"&&z!==$&&ih(Q,S)&&m(Va(Yn.FALLBACK_TO_DATE_FORMAT,{key:S,target:$})),process.env.NODE_ENV!=="production"&&z!==$){const Qe=i.__v_emitter;Qe&&Qe.emit("fallback",{type:oe,key:S,from:X,to:re,groupId:`${oe}:${S}`})}if(te=c[$]||{},H=te[S],ot(H))break;xv(i,S,$,T,oe),X=re}if(!ot(H)||!Ie($))return d?nh:S;let U=`${$}__${S}`;Gf(_)||(U=`${U}__${JSON.stringify(_)}`);let ce=w.get(U);return ce||(ce=new Intl.DateTimeFormat($,Rn({},H,_)),w.set(U,ce)),Z?ce.formatToParts(N):ce.format(N)}const tN=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function kv(...i){const[s,c,d,p]=i,m={};let y={},w;if(Ie(s)){const S=s.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!S)throw Pi(On.INVALID_ISO_DATE_ARGUMENT);const N=S[3]?S[3].trim().startsWith("T")?`${S[1].trim()}${S[3].trim()}`:`${S[1].trim()}T${S[3].trim()}`:S[1].trim();w=new Date(N);try{w.toISOString()}catch{throw Pi(On.INVALID_ISO_DATE_ARGUMENT)}}else if(OK(s)){if(isNaN(s.getTime()))throw Pi(On.INVALID_DATE_ARGUMENT);w=s}else if(un(s))w=s;else throw Pi(On.INVALID_ARGUMENT);return Ie(c)?m.key=c:ot(c)&&Object.keys(c).forEach(S=>{tN.includes(S)?y[S]=c[S]:m[S]=c[S]}),Ie(d)?m.locale=d:ot(d)&&(y=d),ot(p)&&(y=p),[m.key||"",w,m,y]}function nN(i,s,c){const d=i;for(const p in c){const m=`${s}__${p}`;d.__datetimeFormatters.has(m)&&d.__datetimeFormatters.delete(m)}}function oN(i,...s){const{numberFormats:c,unresolving:d,fallbackLocale:p,onWarn:m,localeFallbacker:y}=i,{__numberFormatters:w}=i;if(process.env.NODE_ENV!=="production"&&!qT.numberFormat)return m(Va(Yn.CANNOT_FORMAT_NUMBER)),oh;const[S,N,P,_]=Pv(...s),T=ut(P.missingWarn)?P.missingWarn:i.missingWarn,Q=ut(P.fallbackWarn)?P.fallbackWarn:i.fallbackWarn,Z=!!P.part,z=yv(i,P),G=y(i,p,z);if(!Ie(S)||S==="")return new Intl.NumberFormat(z,_).format(N);let te={},$,H=null,X=z,re=null;const oe="number format";for(let he=0;he<G.length;he++){if($=re=G[he],process.env.NODE_ENV!=="production"&&z!==$&&ih(Q,S)&&m(Va(Yn.FALLBACK_TO_NUMBER_FORMAT,{key:S,target:$})),process.env.NODE_ENV!=="production"&&z!==$){const Qe=i.__v_emitter;Qe&&Qe.emit("fallback",{type:oe,key:S,from:X,to:re,groupId:`${oe}:${S}`})}if(te=c[$]||{},H=te[S],ot(H))break;xv(i,S,$,T,oe),X=re}if(!ot(H)||!Ie($))return d?nh:S;let U=`${$}__${S}`;Gf(_)||(U=`${U}__${JSON.stringify(_)}`);let ce=w.get(U);return ce||(ce=new Intl.NumberFormat($,Rn({},H,_)),w.set(U,ce)),Z?ce.formatToParts(N):ce.format(N)}const iN=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Pv(...i){const[s,c,d,p]=i,m={};let y={};if(!un(s))throw Pi(On.INVALID_ARGUMENT);const w=s;return Ie(c)?m.key=c:ot(c)&&Object.keys(c).forEach(S=>{iN.includes(S)?y[S]=c[S]:m[S]=c[S]}),Ie(d)?m.locale=d:ot(d)&&(y=d),ot(p)&&(y=p),[m.key||"",w,m,y]}function rN(i,s,c){const d=i;for(const p in c){const m=`${s}__${p}`;d.__numberFormatters.has(m)&&d.__numberFormatters.delete(m)}}eJ();function ZJ(){return aN().__VUE_DEVTOOLS_GLOBAL_HOOK__}function aN(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const WJ=typeof Proxy=="function",zJ="devtools-plugin:setup",UJ="plugin:settings:set";let Yc,_v;function HJ(){var i;return Yc!==void 0||(typeof window<"u"&&window.performance?(Yc=!0,_v=window.performance):typeof globalThis<"u"&&!((i=globalThis.perf_hooks)===null||i===void 0)&&i.performance?(Yc=!0,_v=globalThis.perf_hooks.performance):Yc=!1),Yc}function YJ(){return HJ()?_v.now():Date.now()}class XJ{constructor(s,c){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=s,this.hook=c;const d={};if(s.settings)for(const y in s.settings){const w=s.settings[y];d[y]=w.defaultValue}const p=`__vue-devtools-plugin-settings__${s.id}`;let m=Object.assign({},d);try{const y=localStorage.getItem(p),w=JSON.parse(y);Object.assign(m,w)}catch{}this.fallbacks={getSettings(){return m},setSettings(y){try{localStorage.setItem(p,JSON.stringify(y))}catch{}m=y},now(){return YJ()}},c&&c.on(UJ,(y,w)=>{y===this.plugin.id&&this.fallbacks.setSettings(w)}),this.proxiedOn=new Proxy({},{get:(y,w)=>this.target?this.target.on[w]:(...S)=>{this.onQueue.push({method:w,args:S})}}),this.proxiedTarget=new Proxy({},{get:(y,w)=>this.target?this.target[w]:w==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(w)?(...S)=>(this.targetQueue.push({method:w,args:S,resolve:()=>{}}),this.fallbacks[w](...S)):(...S)=>new Promise(N=>{this.targetQueue.push({method:w,args:S,resolve:N})})})}async setRealTarget(s){this.target=s;for(const c of this.onQueue)this.target.on[c.method](...c.args);for(const c of this.targetQueue)c.resolve(await this.target[c.method](...c.args))}}function GJ(i,s){const c=i,d=aN(),p=ZJ(),m=WJ&&c.enableEarlyProxy;if(p&&(d.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!m))p.emit(zJ,i,s);else{const y=m?new XJ(c,p):null;(d.__VUE_DEVTOOLS_PLUGINS__=d.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:c,setupFn:s,proxy:y}),y&&s(y.proxiedTarget)}}/*!
|
|
172
|
-
* vue-i18n v9.14.0
|
|
173
|
-
* (c) 2024 kazuya kawaguchi
|
|
174
|
-
* Released under the MIT License.
|
|
175
|
-
*/const KJ="9.14.0";function JJ(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Zi().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Zi().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Zi().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Zi().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Zi().__INTLIFY_PROD_DEVTOOLS__=!1)}const sN=Yn.__EXTEND_POINT__,zi=Jf(sN),Dt={FALLBACK_TO_ROOT:sN,NOT_SUPPORTED_PRESERVE:zi(),NOT_SUPPORTED_FORMATTER:zi(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:zi(),NOT_SUPPORTED_GET_CHOICE_INDEX:zi(),COMPONENT_NAME_LEGACY_COMPATIBLE:zi(),NOT_FOUND_PARENT_SCOPE:zi(),IGNORE_OBJ_FLATTEN:zi(),NOTICE_DROP_ALLOW_COMPOSITION:zi(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:zi()},$J={[Dt.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Dt.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[Dt.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[Dt.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[Dt.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[Dt.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[Dt.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Dt.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Dt.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze",[Dt.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function so(i,...s){return gv($J[i],...s)}const lN=On.__EXTEND_POINT__,lo=Jf(lN),mt={UNEXPECTED_RETURN_TYPE:lN,INVALID_ARGUMENT:lo(),MUST_BE_CALL_SETUP_TOP:lo(),NOT_INSTALLED:lo(),NOT_AVAILABLE_IN_LEGACY_MODE:lo(),REQUIRED_VALUE:lo(),INVALID_VALUE:lo(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:lo(),NOT_INSTALLED_WITH_PROVIDE:lo(),UNEXPECTED_ERROR:lo(),NOT_COMPATIBLE_LEGACY_VUE_I18N:lo(),BRIDGE_SUPPORT_VUE_2_ONLY:lo(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:lo(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:lo(),__EXTEND_POINT__:lo()};function fn(i,...s){return qs(i,null,process.env.NODE_ENV!=="production"?{messages:qJ,args:s}:void 0)}const qJ={[mt.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[mt.INVALID_ARGUMENT]:"Invalid argument",[mt.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[mt.NOT_INSTALLED]:"Need to install with `app.use` function",[mt.UNEXPECTED_ERROR]:"Unexpected error",[mt.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[mt.REQUIRED_VALUE]:"Required in value: {0}",[mt.INVALID_VALUE]:"Invalid value",[mt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[mt.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[mt.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[mt.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[mt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[mt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Ev=ki("__translateVNode"),Tv=ki("__datetimeParts"),Nv=ki("__numberParts"),Fa=ki("__enableEmitter"),Xc=ki("__disableEmitter"),cN=ki("__setPluralRules"),uN=ki("__injectWithOption"),Av=ki("__dispose");function Gc(i){if(!yt(i))return i;for(const s in i)if(Kf(i,s))if(!s.includes("."))yt(i[s])&&Gc(i[s]);else{const c=s.split("."),d=c.length-1;let p=i,m=!1;for(let y=0;y<d;y++){if(c[y]in p||(p[c[y]]={}),!yt(p[c[y]])){process.env.NODE_ENV!=="production"&&dn(so(Dt.IGNORE_OBJ_FLATTEN,{key:c[y]})),m=!0;break}p=p[c[y]]}m||(p[c[d]]=i[s],delete i[s]),yt(p[c[d]])&&Gc(p[c[d]])}return i}function rh(i,s){const{messages:c,__i18n:d,messageResolver:p,flatJson:m}=s,y=ot(c)?c:Tt(d)?{}:{[i]:{}};if(Tt(d)&&d.forEach(w=>{if("locale"in w&&"resource"in w){const{locale:S,resource:N}=w;S?(y[S]=y[S]||{},qf(N,y[S])):qf(N,y)}else Ie(w)&&qf(JSON.parse(w),y)}),p==null&&m)for(const w in y)Kf(y,w)&&Gc(y[w]);return y}function e$(i){return i.type}function dN(i,s,c){let d=yt(s.messages)?s.messages:{};"__i18nGlobal"in c&&(d=rh(i.locale.value,{messages:d,__i18n:c.__i18nGlobal}));const p=Object.keys(d);p.length&&p.forEach(m=>{i.mergeLocaleMessage(m,d[m])});{if(yt(s.datetimeFormats)){const m=Object.keys(s.datetimeFormats);m.length&&m.forEach(y=>{i.mergeDateTimeFormat(y,s.datetimeFormats[y])})}if(yt(s.numberFormats)){const m=Object.keys(s.numberFormats);m.length&&m.forEach(y=>{i.mergeNumberFormat(y,s.numberFormats[y])})}}}function fN(i){return o.createVNode(o.Text,null,i,0)}const hN=()=>[],t$=()=>!1;let pN=0;function mN(i){return(s,c,d,p)=>i(c,d,o.getCurrentInstance()||void 0,p)}function Mv(i={},s){const{__root:c,__injectWithOption:d}=i,p=c===void 0,m=i.flatJson,y=Go?o.ref:o.shallowRef,w=!!i.translateExistCompatible;process.env.NODE_ENV!=="production"&&w&&vT(so(Dt.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let S=ut(i.inheritLocale)?i.inheritLocale:!0;const N=y(c&&S?c.locale.value:Ie(i.locale)?i.locale:nl),P=y(c&&S?c.fallbackLocale.value:Ie(i.fallbackLocale)||Tt(i.fallbackLocale)||ot(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:N.value),_=y(rh(N.value,i)),T=y(ot(i.datetimeFormats)?i.datetimeFormats:{[N.value]:{}}),Q=y(ot(i.numberFormats)?i.numberFormats:{[N.value]:{}});let Z=c?c.missingWarn:ut(i.missingWarn)||Sr(i.missingWarn)?i.missingWarn:!0,z=c?c.fallbackWarn:ut(i.fallbackWarn)||Sr(i.fallbackWarn)?i.fallbackWarn:!0,G=c?c.fallbackRoot:ut(i.fallbackRoot)?i.fallbackRoot:!0,te=!!i.fallbackFormat,$=Ct(i.missing)?i.missing:null,H=Ct(i.missing)?mN(i.missing):null,X=Ct(i.postTranslation)?i.postTranslation:null,re=c?c.warnHtmlMessage:ut(i.warnHtmlMessage)?i.warnHtmlMessage:!0,oe=!!i.escapeParameter;const U=c?c.modifiers:ot(i.modifiers)?i.modifiers:{};let ce=i.pluralRules||c&&c.pluralRules,he;he=(()=>{p&&VT(null);const de={version:KJ,locale:N.value,fallbackLocale:P.value,messages:_.value,modifiers:U,pluralRules:ce,missing:H===null?void 0:H,missingWarn:Z,fallbackWarn:z,fallbackFormat:te,unresolving:!0,postTranslation:X===null?void 0:X,warnHtmlMessage:re,escapeParameter:oe,messageResolver:i.messageResolver,messageCompiler:i.messageCompiler,__meta:{framework:"vue"}};de.datetimeFormats=T.value,de.numberFormats=Q.value,de.__datetimeFormatters=ot(he)?he.__datetimeFormatters:void 0,de.__numberFormatters=ot(he)?he.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(de.__v_emitter=ot(he)?he.__v_emitter:void 0);const _e=AJ(de);return p&&VT(_e),_e})(),Hc(he,N.value,P.value);function Qe(){return[N.value,P.value,_.value,T.value,Q.value]}const ke=o.computed({get:()=>N.value,set:de=>{N.value=de,he.locale=N.value}}),He=o.computed({get:()=>P.value,set:de=>{P.value=de,he.fallbackLocale=P.value,Hc(he,N.value,de)}}),je=o.computed(()=>_.value),Me=o.computed(()=>T.value),ae=o.computed(()=>Q.value);function ue(){return Ct(X)?X:null}function Ee(de){X=de,he.postTranslation=de}function xe(){return $}function Ue(de){de!==null&&(H=mN(de)),$=de,he.missing=H}function Xe(de,_e){return de!=="translate"||!_e.resolvedMessage}const qe=(de,_e,ct,Ut,_i,cl)=>{Qe();let Rr;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,p||(he.fallbackContext=c?NJ():void 0),Rr=de(he)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,p||(he.fallbackContext=void 0)}if(ct!=="translate exists"&&un(Rr)&&Rr===nh||ct==="translate exists"&&!Rr){const[Hi,Yv]=_e();if(process.env.NODE_ENV!=="production"&&c&&Ie(Hi)&&Xe(ct,Yv)&&(G&&(ih(z,Hi)||FT(Z,Hi))&&dn(so(Dt.FALLBACK_TO_ROOT,{key:Hi,type:ct})),process.env.NODE_ENV!=="production")){const{__v_emitter:ul}=he;ul&&G&&ul.emit("fallback",{type:ct,key:Hi,to:"global",groupId:`${ct}:${Hi}`})}return c&&G?Ut(c):_i(Hi)}else{if(cl(Rr))return Rr;throw fn(mt.UNEXPECTED_RETURN_TYPE)}};function lt(...de){return qe(_e=>Reflect.apply(GT,null,[_e,...de]),()=>Cv(...de),"translate",_e=>Reflect.apply(_e.t,_e,[...de]),_e=>_e,_e=>Ie(_e))}function bt(...de){const[_e,ct,Ut]=de;if(Ut&&!yt(Ut))throw fn(mt.INVALID_ARGUMENT);return lt(_e,ct,Rn({resolvedMessage:!0},Ut||{}))}function St(...de){return qe(_e=>Reflect.apply(eN,null,[_e,...de]),()=>kv(...de),"datetime format",_e=>Reflect.apply(_e.d,_e,[...de]),()=>oh,_e=>Ie(_e))}function kt(...de){return qe(_e=>Reflect.apply(oN,null,[_e,...de]),()=>Pv(...de),"number format",_e=>Reflect.apply(_e.n,_e,[...de]),()=>oh,_e=>Ie(_e))}function an(de){return de.map(_e=>Ie(_e)||un(_e)||ut(_e)?fN(String(_e)):_e)}const Zt={normalize:an,interpolate:de=>de,type:"vnode"};function Gn(...de){return qe(_e=>{let ct;const Ut=_e;try{Ut.processor=Zt,ct=Reflect.apply(GT,null,[Ut,...de])}finally{Ut.processor=null}return ct},()=>Cv(...de),"translate",_e=>_e[Ev](...de),_e=>[fN(_e)],_e=>Tt(_e))}function Wt(...de){return qe(_e=>Reflect.apply(oN,null,[_e,...de]),()=>Pv(...de),"number format",_e=>_e[Nv](...de),hN,_e=>Ie(_e)||Tt(_e))}function zt(...de){return qe(_e=>Reflect.apply(eN,null,[_e,...de]),()=>kv(...de),"datetime format",_e=>_e[Tv](...de),hN,_e=>Ie(_e)||Tt(_e))}function jn(de){ce=de,he.pluralRules=ce}function ko(de,_e){return qe(()=>{if(!de)return!1;const ct=Ie(_e)?_e:N.value,Ut=gt(ct),_i=he.messageResolver(Ut,de);return w?_i!=null:Pr(_i)||Jo(_i)||Ie(_i)},()=>[de],"translate exists",ct=>Reflect.apply(ct.te,ct,[de,_e]),t$,ct=>ut(ct))}function Bo(de){let _e=null;const ct=AT(he,P.value,N.value);for(let Ut=0;Ut<ct.length;Ut++){const _i=_.value[ct[Ut]]||{},cl=he.messageResolver(_i,de);if(cl!=null){_e=cl;break}}return _e}function Ae(de){return Bo(de)??(c?c.tm(de)||{}:{})}function gt(de){return _.value[de]||{}}function za(de,_e){if(m){const ct={[de]:_e};for(const Ut in ct)Kf(ct,Ut)&&Gc(ct[Ut]);_e=ct[de]}_.value[de]=_e,he.messages=_.value}function Mr(de,_e){_.value[de]=_.value[de]||{};const ct={[de]:_e};if(m)for(const Ut in ct)Kf(ct,Ut)&&Gc(ct[Ut]);_e=ct[de],qf(_e,_.value[de]),he.messages=_.value}function Ua(de){return T.value[de]||{}}function eu(de,_e){T.value[de]=_e,he.datetimeFormats=T.value,nN(he,de,_e)}function J(de,_e){T.value[de]=Rn(T.value[de]||{},_e),he.datetimeFormats=T.value,nN(he,de,_e)}function ne(de){return Q.value[de]||{}}function Ce(de,_e){Q.value[de]=_e,he.numberFormats=Q.value,rN(he,de,_e)}function Ge(de,_e){Q.value[de]=Rn(Q.value[de]||{},_e),he.numberFormats=Q.value,rN(he,de,_e)}pN++,c&&Go&&(o.watch(c.locale,de=>{S&&(N.value=de,he.locale=de,Hc(he,N.value,P.value))}),o.watch(c.fallbackLocale,de=>{S&&(P.value=de,he.fallbackLocale=de,Hc(he,N.value,P.value))}));const rt={id:pN,locale:ke,fallbackLocale:He,get inheritLocale(){return S},set inheritLocale(de){S=de,de&&c&&(N.value=c.locale.value,P.value=c.fallbackLocale.value,Hc(he,N.value,P.value))},get availableLocales(){return Object.keys(_.value).sort()},messages:je,get modifiers(){return U},get pluralRules(){return ce||{}},get isGlobal(){return p},get missingWarn(){return Z},set missingWarn(de){Z=de,he.missingWarn=Z},get fallbackWarn(){return z},set fallbackWarn(de){z=de,he.fallbackWarn=z},get fallbackRoot(){return G},set fallbackRoot(de){G=de},get fallbackFormat(){return te},set fallbackFormat(de){te=de,he.fallbackFormat=te},get warnHtmlMessage(){return re},set warnHtmlMessage(de){re=de,he.warnHtmlMessage=de},get escapeParameter(){return oe},set escapeParameter(de){oe=de,he.escapeParameter=de},t:lt,getLocaleMessage:gt,setLocaleMessage:za,mergeLocaleMessage:Mr,getPostTranslationHandler:ue,setPostTranslationHandler:Ee,getMissingHandler:xe,setMissingHandler:Ue,[cN]:jn};return rt.datetimeFormats=Me,rt.numberFormats=ae,rt.rt=bt,rt.te=ko,rt.tm=Ae,rt.d=St,rt.n=kt,rt.getDateTimeFormat=Ua,rt.setDateTimeFormat=eu,rt.mergeDateTimeFormat=J,rt.getNumberFormat=ne,rt.setNumberFormat=Ce,rt.mergeNumberFormat=Ge,rt[uN]=d,rt[Ev]=Gn,rt[Tv]=zt,rt[Nv]=Wt,process.env.NODE_ENV!=="production"&&(rt[Fa]=de=>{he.__v_emitter=de},rt[Xc]=()=>{he.__v_emitter=void 0}),rt}function n$(i){const s=Ie(i.locale)?i.locale:nl,c=Ie(i.fallbackLocale)||Tt(i.fallbackLocale)||ot(i.fallbackLocale)||i.fallbackLocale===!1?i.fallbackLocale:s,d=Ct(i.missing)?i.missing:void 0,p=ut(i.silentTranslationWarn)||Sr(i.silentTranslationWarn)?!i.silentTranslationWarn:!0,m=ut(i.silentFallbackWarn)||Sr(i.silentFallbackWarn)?!i.silentFallbackWarn:!0,y=ut(i.fallbackRoot)?i.fallbackRoot:!0,w=!!i.formatFallbackMessages,S=ot(i.modifiers)?i.modifiers:{},N=i.pluralizationRules,P=Ct(i.postTranslation)?i.postTranslation:void 0,_=Ie(i.warnHtmlInMessage)?i.warnHtmlInMessage!=="off":!0,T=!!i.escapeParameterHtml,Q=ut(i.sync)?i.sync:!0;process.env.NODE_ENV!=="production"&&i.formatter&&dn(so(Dt.NOT_SUPPORTED_FORMATTER)),process.env.NODE_ENV!=="production"&&i.preserveDirectiveContent&&dn(so(Dt.NOT_SUPPORTED_PRESERVE_DIRECTIVE));let Z=i.messages;if(ot(i.sharedMessages)){const oe=i.sharedMessages;Z=Object.keys(oe).reduce((U,ce)=>{const he=U[ce]||(U[ce]={});return Rn(he,oe[ce]),U},Z||{})}const{__i18n:z,__root:G,__injectWithOption:te}=i,$=i.datetimeFormats,H=i.numberFormats,X=i.flatJson,re=i.translateExistCompatible;return{locale:s,fallbackLocale:c,messages:Z,flatJson:X,datetimeFormats:$,numberFormats:H,missing:d,missingWarn:p,fallbackWarn:m,fallbackRoot:y,fallbackFormat:w,modifiers:S,pluralRules:N,postTranslation:P,warnHtmlMessage:_,escapeParameter:T,messageResolver:i.messageResolver,inheritLocale:Q,translateExistCompatible:re,__i18n:z,__root:G,__injectWithOption:te}}function Rv(i={},s){{const c=Mv(n$(i)),{__extender:d}=i,p={id:c.id,get locale(){return c.locale.value},set locale(m){c.locale.value=m},get fallbackLocale(){return c.fallbackLocale.value},set fallbackLocale(m){c.fallbackLocale.value=m},get messages(){return c.messages.value},get datetimeFormats(){return c.datetimeFormats.value},get numberFormats(){return c.numberFormats.value},get availableLocales(){return c.availableLocales},get formatter(){return process.env.NODE_ENV!=="production"&&dn(so(Dt.NOT_SUPPORTED_FORMATTER)),{interpolate(){return[]}}},set formatter(m){process.env.NODE_ENV!=="production"&&dn(so(Dt.NOT_SUPPORTED_FORMATTER))},get missing(){return c.getMissingHandler()},set missing(m){c.setMissingHandler(m)},get silentTranslationWarn(){return ut(c.missingWarn)?!c.missingWarn:c.missingWarn},set silentTranslationWarn(m){c.missingWarn=ut(m)?!m:m},get silentFallbackWarn(){return ut(c.fallbackWarn)?!c.fallbackWarn:c.fallbackWarn},set silentFallbackWarn(m){c.fallbackWarn=ut(m)?!m:m},get modifiers(){return c.modifiers},get formatFallbackMessages(){return c.fallbackFormat},set formatFallbackMessages(m){c.fallbackFormat=m},get postTranslation(){return c.getPostTranslationHandler()},set postTranslation(m){c.setPostTranslationHandler(m)},get sync(){return c.inheritLocale},set sync(m){c.inheritLocale=m},get warnHtmlInMessage(){return c.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(m){c.warnHtmlMessage=m!=="off"},get escapeParameterHtml(){return c.escapeParameter},set escapeParameterHtml(m){c.escapeParameter=m},get preserveDirectiveContent(){return process.env.NODE_ENV!=="production"&&dn(so(Dt.NOT_SUPPORTED_PRESERVE_DIRECTIVE)),!0},set preserveDirectiveContent(m){process.env.NODE_ENV!=="production"&&dn(so(Dt.NOT_SUPPORTED_PRESERVE_DIRECTIVE))},get pluralizationRules(){return c.pluralRules||{}},__composer:c,t(...m){const[y,w,S]=m,N={};let P=null,_=null;if(!Ie(y))throw fn(mt.INVALID_ARGUMENT);const T=y;return Ie(w)?N.locale=w:Tt(w)?P=w:ot(w)&&(_=w),Tt(S)?P=S:ot(S)&&(_=S),Reflect.apply(c.t,c,[T,P||_||{},N])},rt(...m){return Reflect.apply(c.rt,c,[...m])},tc(...m){const[y,w,S]=m,N={plural:1};let P=null,_=null;if(!Ie(y))throw fn(mt.INVALID_ARGUMENT);const T=y;return Ie(w)?N.locale=w:un(w)?N.plural=w:Tt(w)?P=w:ot(w)&&(_=w),Ie(S)?N.locale=S:Tt(S)?P=S:ot(S)&&(_=S),Reflect.apply(c.t,c,[T,P||_||{},N])},te(m,y){return c.te(m,y)},tm(m){return c.tm(m)},getLocaleMessage(m){return c.getLocaleMessage(m)},setLocaleMessage(m,y){c.setLocaleMessage(m,y)},mergeLocaleMessage(m,y){c.mergeLocaleMessage(m,y)},d(...m){return Reflect.apply(c.d,c,[...m])},getDateTimeFormat(m){return c.getDateTimeFormat(m)},setDateTimeFormat(m,y){c.setDateTimeFormat(m,y)},mergeDateTimeFormat(m,y){c.mergeDateTimeFormat(m,y)},n(...m){return Reflect.apply(c.n,c,[...m])},getNumberFormat(m){return c.getNumberFormat(m)},setNumberFormat(m,y){c.setNumberFormat(m,y)},mergeNumberFormat(m,y){c.mergeNumberFormat(m,y)},getChoiceIndex(m,y){return process.env.NODE_ENV!=="production"&&dn(so(Dt.NOT_SUPPORTED_GET_CHOICE_INDEX)),-1}};return p.__extender=d,process.env.NODE_ENV!=="production"&&(p.__enableEmitter=m=>{const y=c;y[Fa]&&y[Fa](m)},p.__disableEmitter=()=>{const m=c;m[Xc]&&m[Xc]()}),p}}const Iv={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:i=>i==="parent"||i==="global",default:"parent"},i18n:{type:Object}};function o$({slots:i},s){return s.length===1&&s[0]==="default"?(i.default?i.default():[]).reduce((c,d)=>[...c,...d.type===o.Fragment?d.children:[d]],[]):s.reduce((c,d)=>{const p=i[d];return p&&(c[d]=p()),c},{})}function gN(i){return o.Fragment}const Qv=o.defineComponent({name:"i18n-t",props:Rn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:i=>un(i)||!isNaN(i)}},Iv),setup(i,s){const{slots:c,attrs:d}=s,p=i.i18n||Ui({useScope:i.scope,__useComponent:!0});return()=>{const m=Object.keys(c).filter(_=>_!=="_"),y={};i.locale&&(y.locale=i.locale),i.plural!==void 0&&(y.plural=Ie(i.plural)?+i.plural:i.plural);const w=o$(s,m),S=p[Ev](i.keypath,w,y),N=Rn({},d),P=Ie(i.tag)||yt(i.tag)?i.tag:gN();return o.h(P,N,S)}}});function i$(i){return Tt(i)&&!Ie(i[0])}function ON(i,s,c,d){const{slots:p,attrs:m}=s;return()=>{const y={part:!0};let w={};i.locale&&(y.locale=i.locale),Ie(i.format)?y.key=i.format:yt(i.format)&&(Ie(i.format.key)&&(y.key=i.format.key),w=Object.keys(i.format).reduce((T,Q)=>c.includes(Q)?Rn({},T,{[Q]:i.format[Q]}):T,{}));const S=d(i.value,y,w);let N=[y.key];Tt(S)?N=S.map((T,Q)=>{const Z=p[T.type],z=Z?Z({[T.type]:T.value,index:Q,parts:S}):[T.value];return i$(z)&&(z[0].key=`${T.type}-${Q}`),z}):Ie(S)&&(N=[S]);const P=Rn({},m),_=Ie(i.tag)||yt(i.tag)?i.tag:gN();return o.h(_,P,N)}}const vN=o.defineComponent({name:"i18n-n",props:Rn({value:{type:Number,required:!0},format:{type:[String,Object]}},Iv),setup(i,s){const c=i.i18n||Ui({useScope:i.scope,__useComponent:!0});return ON(i,s,iN,(...d)=>c[Nv](...d))}}),yN=o.defineComponent({name:"i18n-d",props:Rn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Iv),setup(i,s){const c=i.i18n||Ui({useScope:i.scope,__useComponent:!0});return ON(i,s,tN,(...d)=>c[Tv](...d))}});function r$(i,s){const c=i;if(i.mode==="composition")return c.__getInstance(s)||i.global;{const d=c.__getInstance(s);return d!=null?d.__composer:i.global.__composer}}function a$(i){const s=c=>{const{instance:d,modifiers:p,value:m}=c;if(!d||!d.$)throw fn(mt.UNEXPECTED_ERROR);const y=r$(i,d.$);process.env.NODE_ENV!=="production"&&p.preserve&&dn(so(Dt.NOT_SUPPORTED_PRESERVE));const w=bN(m);return[Reflect.apply(y.t,y,[...xN(w)]),y]};return{created:(c,d)=>{const[p,m]=s(d);Go&&i.global===m&&(c.__i18nWatcher=o.watch(m.locale,()=>{d.instance&&d.instance.$forceUpdate()})),c.__composer=m,c.textContent=p},unmounted:c=>{Go&&c.__i18nWatcher&&(c.__i18nWatcher(),c.__i18nWatcher=void 0,delete c.__i18nWatcher),c.__composer&&(c.__composer=void 0,delete c.__composer)},beforeUpdate:(c,{value:d})=>{if(c.__composer){const p=c.__composer,m=bN(d);c.textContent=Reflect.apply(p.t,p,[...xN(m)])}},getSSRProps:c=>{const[d]=s(c);return{textContent:d}}}}function bN(i){if(Ie(i))return{path:i};if(ot(i)){if(!("path"in i))throw fn(mt.REQUIRED_VALUE,"path");return i}else throw fn(mt.INVALID_VALUE)}function xN(i){const{path:s,locale:c,args:d,choice:p,plural:m}=i,y={},w=d||{};return Ie(c)&&(y.locale=c),un(p)&&(y.plural=p),un(m)&&(y.plural=m),[s,w,y]}function s$(i,s,...c){const d=ot(c[0])?c[0]:{},p=!!d.useI18nComponentName,m=ut(d.globalInstall)?d.globalInstall:!0;process.env.NODE_ENV!=="production"&&m&&p&&dn(so(Dt.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:Qv.name})),m&&([p?"i18n":Qv.name,"I18nT"].forEach(y=>i.component(y,Qv)),[vN.name,"I18nN"].forEach(y=>i.component(y,vN)),[yN.name,"I18nD"].forEach(y=>i.component(y,yN))),i.directive("t",a$(s))}const Dv={"vue-devtools-plugin-vue-i18n":"Vue I18n devtools","vue-i18n-resource-inspector":"I18n Resources","vue-i18n-timeline":"Vue I18n"},l$={"vue-i18n-resource-inspector":"Search for scopes ..."},c$={"vue-i18n-timeline":16764185},wN="vue-i18n: composer properties";let Bv;async function u$(i,s){return new Promise((c,d)=>{try{GJ({id:"vue-devtools-plugin-vue-i18n",label:Dv["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[wN],app:i},p=>{Bv=p,p.on.visitComponentTree(({componentInstance:y,treeNode:w})=>{d$(y,w,s)}),p.on.inspectComponent(({componentInstance:y,instanceData:w})=>{y.vnode.el&&y.vnode.el.__VUE_I18N__&&w&&(s.mode==="legacy"?y.vnode.el.__VUE_I18N__!==s.global.__composer&&CN(w,y.vnode.el.__VUE_I18N__):CN(w,y.vnode.el.__VUE_I18N__))}),p.addInspector({id:"vue-i18n-resource-inspector",label:Dv["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:l$["vue-i18n-resource-inspector"]}),p.on.getInspectorTree(y=>{y.app===i&&y.inspectorId==="vue-i18n-resource-inspector"&&g$(y,s)});const m=new Map;p.on.getInspectorState(async y=>{if(y.app===i&&y.inspectorId==="vue-i18n-resource-inspector")if(p.unhighlightElement(),v$(y,s),y.nodeId==="global"){if(!m.has(y.app)){const[w]=await p.getComponentInstances(y.app);m.set(y.app,w)}p.highlightElement(m.get(y.app))}else{const w=O$(y.nodeId,s);w&&p.highlightElement(w)}}),p.on.editInspectorState(y=>{y.app===i&&y.inspectorId==="vue-i18n-resource-inspector"&&b$(y,s)}),p.addTimelineLayer({id:"vue-i18n-timeline",label:Dv["vue-i18n-timeline"],color:c$["vue-i18n-timeline"]}),c(!0)})}catch(p){console.error(p),d(!1)}})}function SN(i){return i.type.name||i.type.displayName||i.type.__file||"Anonymous"}function d$(i,s,c){const d=c.mode==="composition"?c.global:c.global.__composer;if(i&&i.vnode.el&&i.vnode.el.__VUE_I18N__&&i.vnode.el.__VUE_I18N__!==d){const p={label:`i18n (${SN(i)} Scope)`,textColor:0,backgroundColor:16764185};s.tags.push(p)}}function CN(i,s){const c=wN;i.state.push({type:c,key:"locale",editable:!0,value:s.locale.value}),i.state.push({type:c,key:"availableLocales",editable:!1,value:s.availableLocales}),i.state.push({type:c,key:"fallbackLocale",editable:!0,value:s.fallbackLocale.value}),i.state.push({type:c,key:"inheritLocale",editable:!0,value:s.inheritLocale}),i.state.push({type:c,key:"messages",editable:!1,value:Lv(s.messages.value)}),i.state.push({type:c,key:"datetimeFormats",editable:!1,value:s.datetimeFormats.value}),i.state.push({type:c,key:"numberFormats",editable:!1,value:s.numberFormats.value})}function Lv(i){const s={};return Object.keys(i).forEach(c=>{const d=i[c];Ct(d)&&"source"in d?s[c]=m$(d):Pr(d)&&d.loc&&d.loc.source?s[c]=d.loc.source:yt(d)?s[c]=Lv(d):s[c]=d}),s}const f$={"<":"<",">":">",'"':""","&":"&"};function h$(i){return i.replace(/[<>"&]/g,p$)}function p$(i){return f$[i]||i}function m$(i){return{_custom:{type:"function",display:`<span>ƒ</span> ${i.source?`("${h$(i.source)}")`:"(?)"}`}}}function g$(i,s){i.rootNodes.push({id:"global",label:"Global Scope"});const c=s.mode==="composition"?s.global:s.global.__composer;for(const[d,p]of s.__instances){const m=s.mode==="composition"?p:p.__composer;c!==m&&i.rootNodes.push({id:m.id.toString(),label:`${SN(d)} Scope`})}}function O$(i,s){let c=null;if(i!=="global"){for(const[d,p]of s.__instances.entries())if(p.id.toString()===i){c=d;break}}return c}function kN(i,s){if(i==="global")return s.mode==="composition"?s.global:s.global.__composer;{const c=Array.from(s.__instances.values()).find(d=>d.id.toString()===i);return c?s.mode==="composition"?c:c.__composer:null}}function v$(i,s){const c=kN(i.nodeId,s);return c&&(i.state=y$(c)),null}function y$(i){const s={},c="Locale related info",d=[{type:c,key:"locale",editable:!0,value:i.locale.value},{type:c,key:"fallbackLocale",editable:!0,value:i.fallbackLocale.value},{type:c,key:"availableLocales",editable:!1,value:i.availableLocales},{type:c,key:"inheritLocale",editable:!0,value:i.inheritLocale}];s[c]=d;const p="Locale messages info",m=[{type:p,key:"messages",editable:!1,value:Lv(i.messages.value)}];s[p]=m;{const y="Datetime formats info",w=[{type:y,key:"datetimeFormats",editable:!1,value:i.datetimeFormats.value}];s[y]=w;const S="Datetime formats info",N=[{type:S,key:"numberFormats",editable:!1,value:i.numberFormats.value}];s[S]=N}return s}function Kc(i,s){if(Bv){let c;s&&"groupId"in s&&(c=s.groupId,delete s.groupId),Bv.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:i,groupId:c,time:Date.now(),meta:{},data:s||{},logType:i==="compile-error"?"error":i==="fallback"||i==="missing"?"warning":"default"}})}}function b$(i,s){const c=kN(i.nodeId,s);if(c){const[d]=i.path;d==="locale"&&Ie(i.state.value)?c.locale.value=i.state.value:d==="fallbackLocale"&&(Ie(i.state.value)||Tt(i.state.value)||yt(i.state.value))?c.fallbackLocale.value=i.state.value:d==="inheritLocale"&&ut(i.state.value)&&(c.inheritLocale=i.state.value)}}function x$(i,s,c){return{beforeCreate(){const d=o.getCurrentInstance();if(!d)throw fn(mt.UNEXPECTED_ERROR);const p=this.$options;if(p.i18n){const m=p.i18n;if(p.__i18n&&(m.__i18n=p.__i18n),m.__root=s,this===this.$root)this.$i18n=PN(i,m);else{m.__injectWithOption=!0,m.__extender=c.__vueI18nExtend,this.$i18n=Rv(m);const y=this.$i18n;y.__extender&&(y.__disposer=y.__extender(this.$i18n))}}else if(p.__i18n)if(this===this.$root)this.$i18n=PN(i,p);else{this.$i18n=Rv({__i18n:p.__i18n,__injectWithOption:!0,__extender:c.__vueI18nExtend,__root:s});const m=this.$i18n;m.__extender&&(m.__disposer=m.__extender(this.$i18n))}else this.$i18n=i;p.__i18nGlobal&&dN(s,p,p),this.$t=(...m)=>this.$i18n.t(...m),this.$rt=(...m)=>this.$i18n.rt(...m),this.$tc=(...m)=>this.$i18n.tc(...m),this.$te=(m,y)=>this.$i18n.te(m,y),this.$d=(...m)=>this.$i18n.d(...m),this.$n=(...m)=>this.$i18n.n(...m),this.$tm=m=>this.$i18n.tm(m),c.__setInstance(d,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const d=this.$i18n;this.$el.__VUE_I18N__=d.__composer;const p=this.__v_emitter=Ov();d.__enableEmitter&&d.__enableEmitter(p),p.on("*",Kc)}},unmounted(){const d=o.getCurrentInstance();if(!d)throw fn(mt.UNEXPECTED_ERROR);const p=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Kc),delete this.__v_emitter),this.$i18n&&(p.__disableEmitter&&p.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,p.__disposer&&(p.__disposer(),delete p.__disposer,delete p.__extender),c.__deleteInstance(d),delete this.$i18n}}}function PN(i,s){i.locale=s.locale||i.locale,i.fallbackLocale=s.fallbackLocale||i.fallbackLocale,i.missing=s.missing||i.missing,i.silentTranslationWarn=s.silentTranslationWarn||i.silentFallbackWarn,i.silentFallbackWarn=s.silentFallbackWarn||i.silentFallbackWarn,i.formatFallbackMessages=s.formatFallbackMessages||i.formatFallbackMessages,i.postTranslation=s.postTranslation||i.postTranslation,i.warnHtmlInMessage=s.warnHtmlInMessage||i.warnHtmlInMessage,i.escapeParameterHtml=s.escapeParameterHtml||i.escapeParameterHtml,i.sync=s.sync||i.sync,i.__composer[cN](s.pluralizationRules||i.pluralizationRules);const c=rh(i.locale,{messages:s.messages,__i18n:s.__i18n});return Object.keys(c).forEach(d=>i.mergeLocaleMessage(d,c[d])),s.datetimeFormats&&Object.keys(s.datetimeFormats).forEach(d=>i.mergeDateTimeFormat(d,s.datetimeFormats[d])),s.numberFormats&&Object.keys(s.numberFormats).forEach(d=>i.mergeNumberFormat(d,s.numberFormats[d])),i}const w$=ki("global-vue-i18n");function S$(i={},s){const c=__VUE_I18N_LEGACY_API__&&ut(i.legacy)?i.legacy:__VUE_I18N_LEGACY_API__,d=ut(i.globalInjection)?i.globalInjection:!0,p=__VUE_I18N_LEGACY_API__&&c?!!i.allowComposition:!0,m=new Map,[y,w]=C$(i,c),S=ki(process.env.NODE_ENV!=="production"?"vue-i18n":"");process.env.NODE_ENV!=="production"&&c&&p&&dn(so(Dt.NOTICE_DROP_ALLOW_COMPOSITION));function N(T){return m.get(T)||null}function P(T,Q){m.set(T,Q)}function _(T){m.delete(T)}{const T={get mode(){return __VUE_I18N_LEGACY_API__&&c?"legacy":"composition"},get allowComposition(){return p},async install(Q,...Z){if(process.env.NODE_ENV!=="production"&&(Q.__VUE_I18N__=T),Q.__VUE_I18N_SYMBOL__=S,Q.provide(Q.__VUE_I18N_SYMBOL__,T),ot(Z[0])){const te=Z[0];T.__composerExtend=te.__composerExtend,T.__vueI18nExtend=te.__vueI18nExtend}let z=null;!c&&d&&(z=R$(Q,T.global)),__VUE_I18N_FULL_INSTALL__&&s$(Q,T,...Z),__VUE_I18N_LEGACY_API__&&c&&Q.mixin(x$(w,w.__composer,T));const G=Q.unmount;if(Q.unmount=()=>{z&&z(),T.dispose(),G()},process.env.NODE_ENV!=="production"){if(!await u$(Q,T))throw fn(mt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const te=Ov();if(c){const $=w;$.__enableEmitter&&$.__enableEmitter(te)}else{const $=w;$[Fa]&&$[Fa](te)}te.on("*",Kc)}},get global(){return w},dispose(){y.stop()},__instances:m,__getInstance:N,__setInstance:P,__deleteInstance:_};return T}}function Ui(i={}){const s=o.getCurrentInstance();if(s==null)throw fn(mt.MUST_BE_CALL_SETUP_TOP);if(!s.isCE&&s.appContext.app!=null&&!s.appContext.app.__VUE_I18N_SYMBOL__)throw fn(mt.NOT_INSTALLED);const c=k$(s),d=_$(c),p=e$(s),m=P$(i,p);if(__VUE_I18N_LEGACY_API__&&c.mode==="legacy"&&!i.__useComponent){if(!c.allowComposition)throw fn(mt.NOT_AVAILABLE_IN_LEGACY_MODE);return A$(s,m,d,i)}if(m==="global")return dN(d,i,p),d;if(m==="parent"){let S=E$(c,s,i.__useComponent);return S==null&&(process.env.NODE_ENV!=="production"&&dn(so(Dt.NOT_FOUND_PARENT_SCOPE)),S=d),S}const y=c;let w=y.__getInstance(s);if(w==null){const S=Rn({},i);"__i18n"in p&&(S.__i18n=p.__i18n),d&&(S.__root=d),w=Mv(S),y.__composerExtend&&(w[Av]=y.__composerExtend(w)),N$(y,s,w),y.__setInstance(s,w)}return w}function C$(i,s,c){const d=o.effectScope();{const p=__VUE_I18N_LEGACY_API__&&s?d.run(()=>Rv(i)):d.run(()=>Mv(i));if(p==null)throw fn(mt.UNEXPECTED_ERROR);return[d,p]}}function k$(i){{const s=o.inject(i.isCE?w$:i.appContext.app.__VUE_I18N_SYMBOL__);if(!s)throw fn(i.isCE?mt.NOT_INSTALLED_WITH_PROVIDE:mt.UNEXPECTED_ERROR);return s}}function P$(i,s){return Gf(i)?"__i18n"in s?"local":"global":i.useScope?i.useScope:"local"}function _$(i){return i.mode==="composition"?i.global:i.global.__composer}function E$(i,s,c=!1){let d=null;const p=s.root;let m=T$(s,c);for(;m!=null;){const y=i;if(i.mode==="composition")d=y.__getInstance(m);else if(__VUE_I18N_LEGACY_API__){const w=y.__getInstance(m);w!=null&&(d=w.__composer,c&&d&&!d[uN]&&(d=null))}if(d!=null||p===m)break;m=m.parent}return d}function T$(i,s=!1){return i==null?null:s&&i.vnode.ctx||i.parent}function N$(i,s,c){let d=null;o.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&s.vnode.el){s.vnode.el.__VUE_I18N__=c,d=Ov();const p=c;p[Fa]&&p[Fa](d),d.on("*",Kc)}},s),o.onUnmounted(()=>{const p=c;process.env.NODE_ENV!=="production"&&s.vnode.el&&s.vnode.el.__VUE_I18N__&&(d&&d.off("*",Kc),p[Xc]&&p[Xc](),delete s.vnode.el.__VUE_I18N__),i.__deleteInstance(s);const m=p[Av];m&&(m(),delete p[Av])},s)}function A$(i,s,c,d={}){const p=s==="local",m=o.shallowRef(null);if(p&&i.proxy&&!(i.proxy.$options.i18n||i.proxy.$options.__i18n))throw fn(mt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const y=ut(d.inheritLocale)?d.inheritLocale:!Ie(d.locale),w=o.ref(!p||y?c.locale.value:Ie(d.locale)?d.locale:nl),S=o.ref(!p||y?c.fallbackLocale.value:Ie(d.fallbackLocale)||Tt(d.fallbackLocale)||ot(d.fallbackLocale)||d.fallbackLocale===!1?d.fallbackLocale:w.value),N=o.ref(rh(w.value,d)),P=o.ref(ot(d.datetimeFormats)?d.datetimeFormats:{[w.value]:{}}),_=o.ref(ot(d.numberFormats)?d.numberFormats:{[w.value]:{}}),T=p?c.missingWarn:ut(d.missingWarn)||Sr(d.missingWarn)?d.missingWarn:!0,Q=p?c.fallbackWarn:ut(d.fallbackWarn)||Sr(d.fallbackWarn)?d.fallbackWarn:!0,Z=p?c.fallbackRoot:ut(d.fallbackRoot)?d.fallbackRoot:!0,z=!!d.fallbackFormat,G=Ct(d.missing)?d.missing:null,te=Ct(d.postTranslation)?d.postTranslation:null,$=p?c.warnHtmlMessage:ut(d.warnHtmlMessage)?d.warnHtmlMessage:!0,H=!!d.escapeParameter,X=p?c.modifiers:ot(d.modifiers)?d.modifiers:{},re=d.pluralRules||p&&c.pluralRules;function oe(){return[w.value,S.value,N.value,P.value,_.value]}const U=o.computed({get:()=>m.value?m.value.locale.value:w.value,set:Ae=>{m.value&&(m.value.locale.value=Ae),w.value=Ae}}),ce=o.computed({get:()=>m.value?m.value.fallbackLocale.value:S.value,set:Ae=>{m.value&&(m.value.fallbackLocale.value=Ae),S.value=Ae}}),he=o.computed(()=>m.value?m.value.messages.value:N.value),Qe=o.computed(()=>P.value),ke=o.computed(()=>_.value);function He(){return m.value?m.value.getPostTranslationHandler():te}function je(Ae){m.value&&m.value.setPostTranslationHandler(Ae)}function Me(){return m.value?m.value.getMissingHandler():G}function ae(Ae){m.value&&m.value.setMissingHandler(Ae)}function ue(Ae){return oe(),Ae()}function Ee(...Ae){return m.value?ue(()=>Reflect.apply(m.value.t,null,[...Ae])):ue(()=>"")}function xe(...Ae){return m.value?Reflect.apply(m.value.rt,null,[...Ae]):""}function Ue(...Ae){return m.value?ue(()=>Reflect.apply(m.value.d,null,[...Ae])):ue(()=>"")}function Xe(...Ae){return m.value?ue(()=>Reflect.apply(m.value.n,null,[...Ae])):ue(()=>"")}function qe(Ae){return m.value?m.value.tm(Ae):{}}function lt(Ae,gt){return m.value?m.value.te(Ae,gt):!1}function bt(Ae){return m.value?m.value.getLocaleMessage(Ae):{}}function St(Ae,gt){m.value&&(m.value.setLocaleMessage(Ae,gt),N.value[Ae]=gt)}function kt(Ae,gt){m.value&&m.value.mergeLocaleMessage(Ae,gt)}function an(Ae){return m.value?m.value.getDateTimeFormat(Ae):{}}function Zt(Ae,gt){m.value&&(m.value.setDateTimeFormat(Ae,gt),P.value[Ae]=gt)}function Gn(Ae,gt){m.value&&m.value.mergeDateTimeFormat(Ae,gt)}function Wt(Ae){return m.value?m.value.getNumberFormat(Ae):{}}function zt(Ae,gt){m.value&&(m.value.setNumberFormat(Ae,gt),_.value[Ae]=gt)}function jn(Ae,gt){m.value&&m.value.mergeNumberFormat(Ae,gt)}const ko={get id(){return m.value?m.value.id:-1},locale:U,fallbackLocale:ce,messages:he,datetimeFormats:Qe,numberFormats:ke,get inheritLocale(){return m.value?m.value.inheritLocale:y},set inheritLocale(Ae){m.value&&(m.value.inheritLocale=Ae)},get availableLocales(){return m.value?m.value.availableLocales:Object.keys(N.value)},get modifiers(){return m.value?m.value.modifiers:X},get pluralRules(){return m.value?m.value.pluralRules:re},get isGlobal(){return m.value?m.value.isGlobal:!1},get missingWarn(){return m.value?m.value.missingWarn:T},set missingWarn(Ae){m.value&&(m.value.missingWarn=Ae)},get fallbackWarn(){return m.value?m.value.fallbackWarn:Q},set fallbackWarn(Ae){m.value&&(m.value.missingWarn=Ae)},get fallbackRoot(){return m.value?m.value.fallbackRoot:Z},set fallbackRoot(Ae){m.value&&(m.value.fallbackRoot=Ae)},get fallbackFormat(){return m.value?m.value.fallbackFormat:z},set fallbackFormat(Ae){m.value&&(m.value.fallbackFormat=Ae)},get warnHtmlMessage(){return m.value?m.value.warnHtmlMessage:$},set warnHtmlMessage(Ae){m.value&&(m.value.warnHtmlMessage=Ae)},get escapeParameter(){return m.value?m.value.escapeParameter:H},set escapeParameter(Ae){m.value&&(m.value.escapeParameter=Ae)},t:Ee,getPostTranslationHandler:He,setPostTranslationHandler:je,getMissingHandler:Me,setMissingHandler:ae,rt:xe,d:Ue,n:Xe,tm:qe,te:lt,getLocaleMessage:bt,setLocaleMessage:St,mergeLocaleMessage:kt,getDateTimeFormat:an,setDateTimeFormat:Zt,mergeDateTimeFormat:Gn,getNumberFormat:Wt,setNumberFormat:zt,mergeNumberFormat:jn};function Bo(Ae){Ae.locale.value=w.value,Ae.fallbackLocale.value=S.value,Object.keys(N.value).forEach(gt=>{Ae.mergeLocaleMessage(gt,N.value[gt])}),Object.keys(P.value).forEach(gt=>{Ae.mergeDateTimeFormat(gt,P.value[gt])}),Object.keys(_.value).forEach(gt=>{Ae.mergeNumberFormat(gt,_.value[gt])}),Ae.escapeParameter=H,Ae.fallbackFormat=z,Ae.fallbackRoot=Z,Ae.fallbackWarn=Q,Ae.missingWarn=T,Ae.warnHtmlMessage=$}return o.onBeforeMount(()=>{if(i.proxy==null||i.proxy.$i18n==null)throw fn(mt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const Ae=m.value=i.proxy.$i18n.__composer;s==="global"?(w.value=Ae.locale.value,S.value=Ae.fallbackLocale.value,N.value=Ae.messages.value,P.value=Ae.datetimeFormats.value,_.value=Ae.numberFormats.value):p&&Bo(Ae)}),ko}const M$=["locale","fallbackLocale","availableLocales"],_N=["t","rt","d","n","tm","te"];function R$(i,s){const c=Object.create(null);return M$.forEach(d=>{const p=Object.getOwnPropertyDescriptor(s,d);if(!p)throw fn(mt.UNEXPECTED_ERROR);const m=o.isRef(p.value)?{get(){return p.value.value},set(y){p.value.value=y}}:{get(){return p.get&&p.get()}};Object.defineProperty(c,d,m)}),i.config.globalProperties.$i18n=c,_N.forEach(d=>{const p=Object.getOwnPropertyDescriptor(s,d);if(!p||!p.value)throw fn(mt.UNEXPECTED_ERROR);Object.defineProperty(i.config.globalProperties,`$${d}`,p)}),()=>{delete i.config.globalProperties.$i18n,_N.forEach(d=>{delete i.config.globalProperties[`$${d}`]})}}if(JJ(),__INTLIFY_JIT_COMPILATION__?QT(DJ):QT(QJ),EJ(lJ),TJ(AT),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const i=Zi();i.__INTLIFY__=!0,OJ(i.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const _r={},ah=i=>(i.response&&(i.response.status===403&&console.log("error:403"),i.response.status===402&&console.log("error:402"),i.response.status===401&&console.log("error:401")),Promise.reject(i)),EN=(i,s)=>{const c=sessionStorage.getItem(s.constant.ACCESS_TOKEN);return c&&(i.headers[s.constant.ACCESS_TOKEN]=c),i.headers["X-Axios-With"]=!0,i},TN=i=>(i.status===402&&console.log("error:402"),i.headers["content-type"]=="application/json"?i.data:i);function I$(i,s){const c=h(s?{axios:s}:{}),d=c.axios;Object.keys(d).forEach(p=>{const m=Gt.create({baseURL:d[p],timeout:6e4});m.interceptors.request.use(y=>EN(y,c),ah),m.interceptors.response.use(TN,ah),m.toFind=(y,w)=>new Promise((S,N)=>{const P=Ui(),_=Fi.loading(w?.loading||P.t("axios.process.loading"));m({method:"post",...y}).then(T=>{if(!w||!w.custome)if(T.success)xt.success({title:P.t("axios.find.success.title"),content:P.t("axios.find.success.message")}),S(T);else{let Q=P.t("axios.find.error.message");w?.useMessage&&(Q=T.message||Q),xt.error({title:P.t("axios.find.error.title"),content:Q}),N({error:Q,...T})}else S(T)}).catch(T=>{const Q=P.t("axios.find.error.exception");xt.error({title:P.t("axios.find.error.title"),content:Q}),N({error:Q,...T})}).finally(()=>{_()})}),m.toSave=(y,w)=>new Promise((S,N)=>{const P=Ui(),_=Fi.loading(w?.loading||P.t("axios.process.loading"));m({method:"post",...y}).then(T=>{if(!w||!w.custome)if(T.success)xt.success({title:P.t("axios.save.success.title"),content:P.t("axios.save.success.message")}),S(T);else{let Q=P.t("axios.save.error.message");w?.useMessage&&(Q=T.message||Q),xt.error({title:P.t("axios.save.error.title"),content:Q}),N({error:Q,...T})}else S(T)}).catch(T=>{const Q=P.t("axios.save.error.exception");xt.error({title:P.t("axios.save.error.title"),content:Q}),N({error:Q,...T})}).finally(()=>{_()})}),m.toUpdate=(y,w)=>new Promise((S,N)=>{const P=Ui(),_=Fi.loading(w?.loading||P.t("axios.process.loading"));m({method:"post",...y}).then(T=>{if(!w||!w.custome)if(T.success)xt.success({title:P.t("axios.update.success.title"),content:P.t("axios.update.success.message")}),S(T);else{let Q=P.t("axios.update.error.message");w?.useMessage&&(Q=T.message||Q),xt.error({title:P.t("axios.update.error.title"),content:Q}),N({error:Q,...T})}else S(T)}).catch(T=>{const Q=P.t("axios.update.error.exception");xt.error({title:P.t("axios.update.error.title"),content:Q}),N({error:Q,...T})}).finally(()=>{_()})}),m.toDelete=(y,w)=>new Promise((S,N)=>{const P=Ui();if(!y.data||Array.isArray(y.data)&&y.data.length==0||typeof y.data=="object"&&Object.keys(y.data).length==0){const T=P.t("axios.delete.error.notempty");xt.error({title:P.t("axios.delete.error.title"),content:T}),N(T)}const _=()=>{const T=Fi.loading(w?.loading||P.t("axios.process.loading"));m({method:"post",...y}).then(Q=>{if(!w||!w.custome)if(Q.success)xt.success({title:P.t("axios.delete.success.title"),content:P.t("axios.delete.success.message")}),S(Q);else{let Z=P.t("axios.delete.error.message");w?.useMessage&&(Z=Q.message||Z),xt.error({title:P.t("axios.delete.error.title"),content:Z}),N({error:Z,...Q})}else S(Q)}).catch(Q=>{const Z=P.t("axios.delete.error.exception");xt.error({title:P.t("axios.delete.error.title"),content:Z}),N({error:Z,...Q})}).finally(()=>{T()})};xt.confirm({title:P.t("axios.delete.confirm.title"),content:P.t("axios.delete.confirm.message"),onOk:()=>{_()}})}),_r[p]=m}),i.provide("axios",_r)}_r.create=i=>{const s=h(),c=Gt.create(i);return c.interceptors.request.use(d=>EN(d,s),ah),c.interceptors.response.use(TN,ah),c},_r.install=I$;function NN(){const i=Ui();return{confirm:s=>xt.confirm({title:i.t("dialog.confirm.title"),...s}),info:s=>xt.info({title:i.t("dialog.info.title"),...s}),warning:s=>xt.warning({title:i.t("dialog.warning.title"),...s}),error:s=>xt.error({title:i.t("dialog.error.title"),content:"操作失败",...s||{}}),success:s=>xt.success({title:i.t("dialog.success.title"),content:"操作成功",...s||{}})}}class AN{principal;storage;config;i18n;constructor(){this.principal={},this.storage={},this.config=h(),this.i18n=Ui()}isLogin(){return(!this.principal||!this.principal.id)&&this.getPrincipal(),!!this.principal.id}doLogin(s){return new Promise((c,d)=>{_r.admin({url:"/api/security/login",method:"post",data:s}).then(p=>{p.success?(this.principal=p.principal,this.setStorage(this.config.constant.ACCESS_USER_INFO,JSON.stringify(p.principal)),this.setStorage(this.config.constant.ACCESS_TOKEN,p.token),c(p)):d(p)}).catch(p=>{d(p)})})}doLogout(){return new Promise(s=>{xt.confirm({title:this.i18n.t("store.session.logout.comfirm.title"),content:this.i18n.t("store.session.logout.comfirm.content"),onOk:()=>{this.delStorage(this.config.constant.ACCESS_TOKEN),this.delStorage(this.config.constant.ACCESS_USER_INFO),s(!0)}})})}getToken(){return this.getStorage(this.config.constant.ACCESS_TOKEN)}setStorage(s,c){this.storage[s]=c,sessionStorage.setItem(s,c)}getStorage(s){return this.storage[s]?this.storage[s]:(this.storage[s]=sessionStorage.getItem(s),this.storage[s])}delStorage(s){return delete this.storage[s],sessionStorage.removeItem(s)}getPrincipal(){if(!this.principal||!this.principal.id){const s=this.getStorage(this.config.constant.ACCESS_USER_INFO)||"{}";this.principal=JSON.parse(s)}return this.principal}}let Vv=null;function MN(){return Vv||(Vv=new AN),Vv}const Q$={submit:"提交","submit.ok":"已提交","submit.error":"提交失败","confirm.ok":"确定","confirm.cancel":"取消","global.setting.title":"设置"},D$={"store.session.logout.comfirm.title":"确认信息","store.session.logout.comfirm.content":"确定要退出系统么?","dialog.confirm.title":"确认信息","dialog.info.title":"提示信息","dialog.warning.title":"警告信息","dialog.error.title":"错误信息","dialog.success.title":"成功信息","axios.process.loading":"数据处理中...","axios.delete.confirm.title":"确认信息","axios.delete.confirm.message":"请确认是否要删除该数据?","axios.delete.error.title":"错误信息","axios.delete.error.notempty":"请选择要删除的数据!","axios.delete.error.message":"数据删除失败!","axios.delete.error.exception":"数据删除失败,未知异常!","axios.delete.success.title":"成功信息","axios.delete.success.message":"数据删除成功!","axios.update.error.title":"错误信息","axios.update.error.message":"数据更新失败!","axios.update.error.exception":"数据更新失败,未知异常!","axios.update.success.title":"成功信息","axios.update.success.message":"数据更新成功!","axios.save.error.title":"错误信息","axios.save.error.message":"数据保存失败!","axios.save.error.exception":"数据保存失败,未知异常!","axios.save.success.title":"成功信息","axios.save.success.message":"数据保存成功!","axios.find.error.title":"错误信息","axios.find.error.message":"数据查询失败!","axios.find.error.exception":"数据查询失败,未知异常!","axios.find.success.title":"成功信息","axios.find.success.message":"数据查询成功!"},B$={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},RN={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},jv={lang:ee({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},B$),timePickerLocale:ee({},RN)};jv.lang.ok="确定";const So="${label}不是一个有效的${type}",L$={locale:"zh-cn",Pagination:iK,DatePicker:jv,TimePicker:RN,Calendar:jv,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:So,method:So,array:So,object:So,number:So,date:So,boolean:So,integer:So,float:So,regexp:So,email:So,url:So,hex:So},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码已过期",refresh:"点击刷新",scanned:"已扫描"}};var IN={exports:{}};(function(i,s){(function(c,d){i.exports=d(bE)})(zf,function(c){function d(y){return y&&typeof y=="object"&&"default"in y?y:{default:y}}var p=d(c),m={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(y,w){return w==="W"?y+"周":y+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(y,w){var S=100*y+w;return S<600?"凌晨":S<900?"早上":S<1100?"上午":S<1300?"中午":S<1800?"下午":"晚上"}};return p.default.locale(m,null,!0),m})})(IN);var V$=IN.exports;const Fv={localeName:"zh-CN",...L$,dayjs:av(V$),...Q$,...D$},j$={submit:"Submit","submit.ok":"Submitted","submit.error":"Submit Failed","confirm.ok":"Yes","confirm.cancel":"No","global.setting.title":"Settings"},F$={"store.session.logout.comfirm.title":"Confirm message","store.session.logout.comfirm.content":"Are you sure you want out of the system?","dialog.confirm.title":"Confirm message","dialog.info.title":"Prompt message","dialog.warning.title":"Warning message","dialog.error.title":"Error message","dialog.success.title":"Success message","axios.process.loading":"Data processing...","axios.delete.confirm.title":"Confirm message","axios.delete.confirm.message":"Please confirm whether you want to delete this data?","axios.delete.error.title":"Error message","axios.delete.error.notempty":"Please select the data you want to delete!","axios.delete.error.message":"Data deletion failure!","axios.delete.error.exception":"Data deletion failed because an unknown exception occurred. Procedure!","axios.delete.success.title":"Success message","axios.delete.success.message":"Data deletion succeeded!","axios.update.error.title":"Error message","axios.update.error.message":"Data update failure!","axios.update.error.exception":"Data update failed because an unknown exception occurred. Procedure!","axios.update.success.title":"Success message","axios.update.success.message":"Data update succeeded!","axios.save.error.title":"Error message","axios.save.error.message":"Data save failure!","axios.save.error.exception":"Data save failed because an unknown exception occurred. Procedure!","axios.save.success.title":"Success message","axios.save.success.message":"Data save succeeded!","axios.find.error.title":"Error message","axios.find.error.message":"Data find failure!","axios.find.error.exception":"Data find failed because an unknown exception occurred. Procedure!","axios.find.success.title":"Success message","axios.find.success.message":"Data find succeeded!"};var QN={exports:{}};(function(i,s){(function(c,d){i.exports=d()})(zf,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(c){var d=["th","st","nd","rd"],p=c%100;return"["+c+(d[(p-20)%10]||d[p]||d[0])+"]"}}})})(QN);var Z$=QN.exports;const W$={localeName:"en-US",...Or,dayjs:av(Z$),...j$,...F$},DN="zh-CN",BN=Fv,z$=o.ref([Fv,W$]),Jc=o.ref(Fv),Zv=S$({legacy:!1,missingWarn:!1,fallbackWarn:!1,locale:DN,messages:{[DN]:BN}});KX.locale(BN.dayjs);function U$(i){Zv.global.locale.value=i;const s=document.querySelector("html");return s&&s.setAttribute("lang",i),i}function H$(i,s){return new Promise((c,d)=>{const p=Zv.global,m=z$.value.filter(y=>y.localeName==i);if(s)if(typeof s=="function")s().then(y=>{if(m.length==0){const w={...y,localeName:i};p.setLocaleMessage(i,w)}else Jc.value={...m[0],...y},p.setLocaleMessage(i,Jc.value)});else if(m.length==0){const y={...s,localeName:i};p.setLocaleMessage(i,y)}else Jc.value={...m[0],...s},p.setLocaleMessage(i,Jc.value);else m.length>0?p.setLocaleMessage(i,m[0]):d("local language not defined ,lang:"+i);c(U$(i))})}const Wv={i18n:Zv,loadLanguage:H$,langMessage:Jc};var LN={exports:{}};(function(i,s){(function(){var c,d=0xdeadbeefcafe,p=(d&16777215)==15715070;function m(M,D,W){M!=null&&(typeof M=="number"?this.fromNumber(M,D,W):D==null&&typeof M!="string"?this.fromString(M,256):this.fromString(M,D))}function y(){return new m(null)}function w(M,D,W,ie,be,Pe){for(;--Pe>=0;){var De=D*this[M++]+W[ie]+be;be=Math.floor(De/67108864),W[ie++]=De&67108863}return be}function S(M,D,W,ie,be,Pe){for(var De=D&32767,Fe=D>>15;--Pe>=0;){var It=this[M]&32767,yn=this[M++]>>15,Lo=Fe*It+yn*De;It=De*It+((Lo&32767)<<15)+W[ie]+(be&1073741823),be=(It>>>30)+(Lo>>>15)+Fe*yn+(be>>>30),W[ie++]=It&1073741823}return be}function N(M,D,W,ie,be,Pe){for(var De=D&16383,Fe=D>>14;--Pe>=0;){var It=this[M]&16383,yn=this[M++]>>14,Lo=Fe*It+yn*De;It=De*It+((Lo&16383)<<14)+W[ie]+be,be=(It>>28)+(Lo>>14)+Fe*yn,W[ie++]=It&268435455}return be}var P=typeof navigator<"u";P&&p&&navigator.appName=="Microsoft Internet Explorer"?(m.prototype.am=S,c=30):P&&p&&navigator.appName!="Netscape"?(m.prototype.am=w,c=26):(m.prototype.am=N,c=28),m.prototype.DB=c,m.prototype.DM=(1<<c)-1,m.prototype.DV=1<<c;var _=52;m.prototype.FV=Math.pow(2,_),m.prototype.F1=_-c,m.prototype.F2=2*c-_;var T="0123456789abcdefghijklmnopqrstuvwxyz",Q=new Array,Z,z;for(Z=48,z=0;z<=9;++z)Q[Z++]=z;for(Z=97,z=10;z<36;++z)Q[Z++]=z;for(Z=65,z=10;z<36;++z)Q[Z++]=z;function G(M){return T.charAt(M)}function te(M,D){var W=Q[M.charCodeAt(D)];return W??-1}function $(M){for(var D=this.t-1;D>=0;--D)M[D]=this[D];M.t=this.t,M.s=this.s}function H(M){this.t=1,this.s=M<0?-1:0,M>0?this[0]=M:M<-1?this[0]=M+this.DV:this.t=0}function X(M){var D=y();return D.fromInt(M),D}function re(M,D){var W;if(D==16)W=4;else if(D==8)W=3;else if(D==256)W=8;else if(D==2)W=1;else if(D==32)W=5;else if(D==4)W=2;else{this.fromRadix(M,D);return}this.t=0,this.s=0;for(var ie=M.length,be=!1,Pe=0;--ie>=0;){var De=W==8?M[ie]&255:te(M,ie);if(De<0){M.charAt(ie)=="-"&&(be=!0);continue}be=!1,Pe==0?this[this.t++]=De:Pe+W>this.DB?(this[this.t-1]|=(De&(1<<this.DB-Pe)-1)<<Pe,this[this.t++]=De>>this.DB-Pe):this[this.t-1]|=De<<Pe,Pe+=W,Pe>=this.DB&&(Pe-=this.DB)}W==8&&M[0]&128&&(this.s=-1,Pe>0&&(this[this.t-1]|=(1<<this.DB-Pe)-1<<Pe)),this.clamp(),be&&m.ZERO.subTo(this,this)}function oe(){for(var M=this.s&this.DM;this.t>0&&this[this.t-1]==M;)--this.t}function U(M){if(this.s<0)return"-"+this.negate().toString(M);var D;if(M==16)D=4;else if(M==8)D=3;else if(M==2)D=1;else if(M==32)D=5;else if(M==4)D=2;else return this.toRadix(M);var W=(1<<D)-1,ie,be=!1,Pe="",De=this.t,Fe=this.DB-De*this.DB%D;if(De-- >0)for(Fe<this.DB&&(ie=this[De]>>Fe)>0&&(be=!0,Pe=G(ie));De>=0;)Fe<D?(ie=(this[De]&(1<<Fe)-1)<<D-Fe,ie|=this[--De]>>(Fe+=this.DB-D)):(ie=this[De]>>(Fe-=D)&W,Fe<=0&&(Fe+=this.DB,--De)),ie>0&&(be=!0),be&&(Pe+=G(ie));return be?Pe:"0"}function ce(){var M=y();return m.ZERO.subTo(this,M),M}function he(){return this.s<0?this.negate():this}function Qe(M){var D=this.s-M.s;if(D!=0)return D;var W=this.t;if(D=W-M.t,D!=0)return this.s<0?-D:D;for(;--W>=0;)if((D=this[W]-M[W])!=0)return D;return 0}function ke(M){var D=1,W;return(W=M>>>16)!=0&&(M=W,D+=16),(W=M>>8)!=0&&(M=W,D+=8),(W=M>>4)!=0&&(M=W,D+=4),(W=M>>2)!=0&&(M=W,D+=2),(W=M>>1)!=0&&(M=W,D+=1),D}function He(){return this.t<=0?0:this.DB*(this.t-1)+ke(this[this.t-1]^this.s&this.DM)}function je(M,D){var W;for(W=this.t-1;W>=0;--W)D[W+M]=this[W];for(W=M-1;W>=0;--W)D[W]=0;D.t=this.t+M,D.s=this.s}function Me(M,D){for(var W=M;W<this.t;++W)D[W-M]=this[W];D.t=Math.max(this.t-M,0),D.s=this.s}function ae(M,D){var W=M%this.DB,ie=this.DB-W,be=(1<<ie)-1,Pe=Math.floor(M/this.DB),De=this.s<<W&this.DM,Fe;for(Fe=this.t-1;Fe>=0;--Fe)D[Fe+Pe+1]=this[Fe]>>ie|De,De=(this[Fe]&be)<<W;for(Fe=Pe-1;Fe>=0;--Fe)D[Fe]=0;D[Pe]=De,D.t=this.t+Pe+1,D.s=this.s,D.clamp()}function ue(M,D){D.s=this.s;var W=Math.floor(M/this.DB);if(W>=this.t){D.t=0;return}var ie=M%this.DB,be=this.DB-ie,Pe=(1<<ie)-1;D[0]=this[W]>>ie;for(var De=W+1;De<this.t;++De)D[De-W-1]|=(this[De]&Pe)<<be,D[De-W]=this[De]>>ie;ie>0&&(D[this.t-W-1]|=(this.s&Pe)<<be),D.t=this.t-W,D.clamp()}function Ee(M,D){for(var W=0,ie=0,be=Math.min(M.t,this.t);W<be;)ie+=this[W]-M[W],D[W++]=ie&this.DM,ie>>=this.DB;if(M.t<this.t){for(ie-=M.s;W<this.t;)ie+=this[W],D[W++]=ie&this.DM,ie>>=this.DB;ie+=this.s}else{for(ie+=this.s;W<M.t;)ie-=M[W],D[W++]=ie&this.DM,ie>>=this.DB;ie-=M.s}D.s=ie<0?-1:0,ie<-1?D[W++]=this.DV+ie:ie>0&&(D[W++]=ie),D.t=W,D.clamp()}function xe(M,D){var W=this.abs(),ie=M.abs(),be=W.t;for(D.t=be+ie.t;--be>=0;)D[be]=0;for(be=0;be<ie.t;++be)D[be+W.t]=W.am(0,ie[be],D,be,0,W.t);D.s=0,D.clamp(),this.s!=M.s&&m.ZERO.subTo(D,D)}function Ue(M){for(var D=this.abs(),W=M.t=2*D.t;--W>=0;)M[W]=0;for(W=0;W<D.t-1;++W){var ie=D.am(W,D[W],M,2*W,0,1);(M[W+D.t]+=D.am(W+1,2*D[W],M,2*W+1,ie,D.t-W-1))>=D.DV&&(M[W+D.t]-=D.DV,M[W+D.t+1]=1)}M.t>0&&(M[M.t-1]+=D.am(W,D[W],M,2*W,0,1)),M.s=0,M.clamp()}function Xe(M,D,W){var ie=M.abs();if(!(ie.t<=0)){var be=this.abs();if(be.t<ie.t){D?.fromInt(0),W!=null&&this.copyTo(W);return}W==null&&(W=y());var Pe=y(),De=this.s,Fe=M.s,It=this.DB-ke(ie[ie.t-1]);It>0?(ie.lShiftTo(It,Pe),be.lShiftTo(It,W)):(ie.copyTo(Pe),be.copyTo(W));var yn=Pe.t,Lo=Pe[yn-1];if(Lo!=0){var _o=Lo*(1<<this.F1)+(yn>1?Pe[yn-2]>>this.F2:0),Yi=this.FV/_o,ph=(1<<this.F1)/_o,ti=1<<this.F2,ni=W.t,mh=ni-yn,Ir=D??y();for(Pe.dlShiftTo(mh,Ir),W.compareTo(Ir)>=0&&(W[W.t++]=1,W.subTo(Ir,W)),m.ONE.dlShiftTo(yn,Ir),Ir.subTo(Pe,Pe);Pe.t<yn;)Pe[Pe.t++]=0;for(;--mh>=0;){var Kv=W[--ni]==Lo?this.DM:Math.floor(W[ni]*Yi+(W[ni-1]+ti)*ph);if((W[ni]+=Pe.am(0,Kv,W,mh,0,yn))<Kv)for(Pe.dlShiftTo(mh,Ir),W.subTo(Ir,W);W[ni]<--Kv;)W.subTo(Ir,W)}D!=null&&(W.drShiftTo(yn,D),De!=Fe&&m.ZERO.subTo(D,D)),W.t=yn,W.clamp(),It>0&&W.rShiftTo(It,W),De<0&&m.ZERO.subTo(W,W)}}}function qe(M){var D=y();return this.abs().divRemTo(M,null,D),this.s<0&&D.compareTo(m.ZERO)>0&&M.subTo(D,D),D}function lt(M){this.m=M}function bt(M){return M.s<0||M.compareTo(this.m)>=0?M.mod(this.m):M}function St(M){return M}function kt(M){M.divRemTo(this.m,null,M)}function an(M,D,W){M.multiplyTo(D,W),this.reduce(W)}function Zt(M,D){M.squareTo(D),this.reduce(D)}lt.prototype.convert=bt,lt.prototype.revert=St,lt.prototype.reduce=kt,lt.prototype.mulTo=an,lt.prototype.sqrTo=Zt;function Gn(){if(this.t<1)return 0;var M=this[0];if(!(M&1))return 0;var D=M&3;return D=D*(2-(M&15)*D)&15,D=D*(2-(M&255)*D)&255,D=D*(2-((M&65535)*D&65535))&65535,D=D*(2-M*D%this.DV)%this.DV,D>0?this.DV-D:-D}function Wt(M){this.m=M,this.mp=M.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<M.DB-15)-1,this.mt2=2*M.t}function zt(M){var D=y();return M.abs().dlShiftTo(this.m.t,D),D.divRemTo(this.m,null,D),M.s<0&&D.compareTo(m.ZERO)>0&&this.m.subTo(D,D),D}function jn(M){var D=y();return M.copyTo(D),this.reduce(D),D}function ko(M){for(;M.t<=this.mt2;)M[M.t++]=0;for(var D=0;D<this.m.t;++D){var W=M[D]&32767,ie=W*this.mpl+((W*this.mph+(M[D]>>15)*this.mpl&this.um)<<15)&M.DM;for(W=D+this.m.t,M[W]+=this.m.am(0,ie,M,D,0,this.m.t);M[W]>=M.DV;)M[W]-=M.DV,M[++W]++}M.clamp(),M.drShiftTo(this.m.t,M),M.compareTo(this.m)>=0&&M.subTo(this.m,M)}function Bo(M,D){M.squareTo(D),this.reduce(D)}function Ae(M,D,W){M.multiplyTo(D,W),this.reduce(W)}Wt.prototype.convert=zt,Wt.prototype.revert=jn,Wt.prototype.reduce=ko,Wt.prototype.mulTo=Ae,Wt.prototype.sqrTo=Bo;function gt(){return(this.t>0?this[0]&1:this.s)==0}function za(M,D){if(M>4294967295||M<1)return m.ONE;var W=y(),ie=y(),be=D.convert(this),Pe=ke(M)-1;for(be.copyTo(W);--Pe>=0;)if(D.sqrTo(W,ie),(M&1<<Pe)>0)D.mulTo(ie,be,W);else{var De=W;W=ie,ie=De}return D.revert(W)}function Mr(M,D){var W;return M<256||D.isEven()?W=new lt(D):W=new Wt(D),this.exp(M,W)}m.prototype.copyTo=$,m.prototype.fromInt=H,m.prototype.fromString=re,m.prototype.clamp=oe,m.prototype.dlShiftTo=je,m.prototype.drShiftTo=Me,m.prototype.lShiftTo=ae,m.prototype.rShiftTo=ue,m.prototype.subTo=Ee,m.prototype.multiplyTo=xe,m.prototype.squareTo=Ue,m.prototype.divRemTo=Xe,m.prototype.invDigit=Gn,m.prototype.isEven=gt,m.prototype.exp=za,m.prototype.toString=U,m.prototype.negate=ce,m.prototype.abs=he,m.prototype.compareTo=Qe,m.prototype.bitLength=He,m.prototype.mod=qe,m.prototype.modPowInt=Mr,m.ZERO=X(0),m.ONE=X(1);function Ua(){var M=y();return this.copyTo(M),M}function eu(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function J(){return this.t==0?this.s:this[0]<<24>>24}function ne(){return this.t==0?this.s:this[0]<<16>>16}function Ce(M){return Math.floor(Math.LN2*this.DB/Math.log(M))}function Ge(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function rt(M){if(M==null&&(M=10),this.signum()==0||M<2||M>36)return"0";var D=this.chunkSize(M),W=Math.pow(M,D),ie=X(W),be=y(),Pe=y(),De="";for(this.divRemTo(ie,be,Pe);be.signum()>0;)De=(W+Pe.intValue()).toString(M).substr(1)+De,be.divRemTo(ie,be,Pe);return Pe.intValue().toString(M)+De}function de(M,D){this.fromInt(0),D==null&&(D=10);for(var W=this.chunkSize(D),ie=Math.pow(D,W),be=!1,Pe=0,De=0,Fe=0;Fe<M.length;++Fe){var It=te(M,Fe);if(It<0){M.charAt(Fe)=="-"&&this.signum()==0&&(be=!0);continue}De=D*De+It,++Pe>=W&&(this.dMultiply(ie),this.dAddOffset(De,0),Pe=0,De=0)}Pe>0&&(this.dMultiply(Math.pow(D,Pe)),this.dAddOffset(De,0)),be&&m.ZERO.subTo(this,this)}function _e(M,D,W){if(typeof D=="number")if(M<2)this.fromInt(1);else for(this.fromNumber(M,W),this.testBit(M-1)||this.bitwiseTo(m.ONE.shiftLeft(M-1),ul,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(D);)this.dAddOffset(2,0),this.bitLength()>M&&this.subTo(m.ONE.shiftLeft(M-1),this);else{var ie=new Array,be=M&7;ie.length=(M>>3)+1,D.nextBytes(ie),be>0?ie[0]&=(1<<be)-1:ie[0]=0,this.fromString(ie,256)}}function ct(){var M=this.t,D=new Array;D[0]=this.s;var W=this.DB-M*this.DB%8,ie,be=0;if(M-- >0)for(W<this.DB&&(ie=this[M]>>W)!=(this.s&this.DM)>>W&&(D[be++]=ie|this.s<<this.DB-W);M>=0;)W<8?(ie=(this[M]&(1<<W)-1)<<8-W,ie|=this[--M]>>(W+=this.DB-8)):(ie=this[M]>>(W-=8)&255,W<=0&&(W+=this.DB,--M)),ie&128&&(ie|=-256),be==0&&(this.s&128)!=(ie&128)&&++be,(be>0||ie!=this.s)&&(D[be++]=ie);return D}function Ut(M){return this.compareTo(M)==0}function _i(M){return this.compareTo(M)<0?this:M}function cl(M){return this.compareTo(M)>0?this:M}function Rr(M,D,W){var ie,be,Pe=Math.min(M.t,this.t);for(ie=0;ie<Pe;++ie)W[ie]=D(this[ie],M[ie]);if(M.t<this.t){for(be=M.s&this.DM,ie=Pe;ie<this.t;++ie)W[ie]=D(this[ie],be);W.t=this.t}else{for(be=this.s&this.DM,ie=Pe;ie<M.t;++ie)W[ie]=D(be,M[ie]);W.t=M.t}W.s=D(this.s,M.s),W.clamp()}function Hi(M,D){return M&D}function Yv(M){var D=y();return this.bitwiseTo(M,Hi,D),D}function ul(M,D){return M|D}function Bq(M){var D=y();return this.bitwiseTo(M,ul,D),D}function r5(M,D){return M^D}function Lq(M){var D=y();return this.bitwiseTo(M,r5,D),D}function a5(M,D){return M&~D}function Vq(M){var D=y();return this.bitwiseTo(M,a5,D),D}function jq(){for(var M=y(),D=0;D<this.t;++D)M[D]=this.DM&~this[D];return M.t=this.t,M.s=~this.s,M}function Fq(M){var D=y();return M<0?this.rShiftTo(-M,D):this.lShiftTo(M,D),D}function Zq(M){var D=y();return M<0?this.lShiftTo(-M,D):this.rShiftTo(M,D),D}function Wq(M){if(M==0)return-1;var D=0;return M&65535||(M>>=16,D+=16),M&255||(M>>=8,D+=8),M&15||(M>>=4,D+=4),M&3||(M>>=2,D+=2),M&1||++D,D}function zq(){for(var M=0;M<this.t;++M)if(this[M]!=0)return M*this.DB+Wq(this[M]);return this.s<0?this.t*this.DB:-1}function Uq(M){for(var D=0;M!=0;)M&=M-1,++D;return D}function Hq(){for(var M=0,D=this.s&this.DM,W=0;W<this.t;++W)M+=Uq(this[W]^D);return M}function Yq(M){var D=Math.floor(M/this.DB);return D>=this.t?this.s!=0:(this[D]&1<<M%this.DB)!=0}function Xq(M,D){var W=m.ONE.shiftLeft(M);return this.bitwiseTo(W,D,W),W}function Gq(M){return this.changeBit(M,ul)}function Kq(M){return this.changeBit(M,a5)}function Jq(M){return this.changeBit(M,r5)}function $q(M,D){for(var W=0,ie=0,be=Math.min(M.t,this.t);W<be;)ie+=this[W]+M[W],D[W++]=ie&this.DM,ie>>=this.DB;if(M.t<this.t){for(ie+=M.s;W<this.t;)ie+=this[W],D[W++]=ie&this.DM,ie>>=this.DB;ie+=this.s}else{for(ie+=this.s;W<M.t;)ie+=M[W],D[W++]=ie&this.DM,ie>>=this.DB;ie+=M.s}D.s=ie<0?-1:0,ie>0?D[W++]=ie:ie<-1&&(D[W++]=this.DV+ie),D.t=W,D.clamp()}function qq(M){var D=y();return this.addTo(M,D),D}function eee(M){var D=y();return this.subTo(M,D),D}function tee(M){var D=y();return this.multiplyTo(M,D),D}function nee(){var M=y();return this.squareTo(M),M}function oee(M){var D=y();return this.divRemTo(M,D,null),D}function iee(M){var D=y();return this.divRemTo(M,null,D),D}function ree(M){var D=y(),W=y();return this.divRemTo(M,D,W),new Array(D,W)}function aee(M){this[this.t]=this.am(0,M-1,this,0,0,this.t),++this.t,this.clamp()}function see(M,D){if(M!=0){for(;this.t<=D;)this[this.t++]=0;for(this[D]+=M;this[D]>=this.DV;)this[D]-=this.DV,++D>=this.t&&(this[this.t++]=0),++this[D]}}function tu(){}function s5(M){return M}function lee(M,D,W){M.multiplyTo(D,W)}function cee(M,D){M.squareTo(D)}tu.prototype.convert=s5,tu.prototype.revert=s5,tu.prototype.mulTo=lee,tu.prototype.sqrTo=cee;function uee(M){return this.exp(M,new tu)}function dee(M,D,W){var ie=Math.min(this.t+M.t,D);for(W.s=0,W.t=ie;ie>0;)W[--ie]=0;var be;for(be=W.t-this.t;ie<be;++ie)W[ie+this.t]=this.am(0,M[ie],W,ie,0,this.t);for(be=Math.min(M.t,D);ie<be;++ie)this.am(0,M[ie],W,ie,0,D-ie);W.clamp()}function fee(M,D,W){--D;var ie=W.t=this.t+M.t-D;for(W.s=0;--ie>=0;)W[ie]=0;for(ie=Math.max(D-this.t,0);ie<M.t;++ie)W[this.t+ie-D]=this.am(D-ie,M[ie],W,0,0,this.t+ie-D);W.clamp(),W.drShiftTo(1,W)}function Ha(M){this.r2=y(),this.q3=y(),m.ONE.dlShiftTo(2*M.t,this.r2),this.mu=this.r2.divide(M),this.m=M}function hee(M){if(M.s<0||M.t>2*this.m.t)return M.mod(this.m);if(M.compareTo(this.m)<0)return M;var D=y();return M.copyTo(D),this.reduce(D),D}function pee(M){return M}function mee(M){for(M.drShiftTo(this.m.t-1,this.r2),M.t>this.m.t+1&&(M.t=this.m.t+1,M.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);M.compareTo(this.r2)<0;)M.dAddOffset(1,this.m.t+1);for(M.subTo(this.r2,M);M.compareTo(this.m)>=0;)M.subTo(this.m,M)}function gee(M,D){M.squareTo(D),this.reduce(D)}function Oee(M,D,W){M.multiplyTo(D,W),this.reduce(W)}Ha.prototype.convert=hee,Ha.prototype.revert=pee,Ha.prototype.reduce=mee,Ha.prototype.mulTo=Oee,Ha.prototype.sqrTo=gee;function vee(M,D){var W=M.bitLength(),ie,be=X(1),Pe;if(W<=0)return be;W<18?ie=1:W<48?ie=3:W<144?ie=4:W<768?ie=5:ie=6,W<8?Pe=new lt(D):D.isEven()?Pe=new Ha(D):Pe=new Wt(D);var De=new Array,Fe=3,It=ie-1,yn=(1<<ie)-1;if(De[1]=Pe.convert(this),ie>1){var Lo=y();for(Pe.sqrTo(De[1],Lo);Fe<=yn;)De[Fe]=y(),Pe.mulTo(Lo,De[Fe-2],De[Fe]),Fe+=2}var _o=M.t-1,Yi,ph=!0,ti=y(),ni;for(W=ke(M[_o])-1;_o>=0;){for(W>=It?Yi=M[_o]>>W-It&yn:(Yi=(M[_o]&(1<<W+1)-1)<<It-W,_o>0&&(Yi|=M[_o-1]>>this.DB+W-It)),Fe=ie;!(Yi&1);)Yi>>=1,--Fe;if((W-=Fe)<0&&(W+=this.DB,--_o),ph)De[Yi].copyTo(be),ph=!1;else{for(;Fe>1;)Pe.sqrTo(be,ti),Pe.sqrTo(ti,be),Fe-=2;Fe>0?Pe.sqrTo(be,ti):(ni=be,be=ti,ti=ni),Pe.mulTo(ti,De[Yi],be)}for(;_o>=0&&!(M[_o]&1<<W);)Pe.sqrTo(be,ti),ni=be,be=ti,ti=ni,--W<0&&(W=this.DB-1,--_o)}return Pe.revert(be)}function yee(M){var D=this.s<0?this.negate():this.clone(),W=M.s<0?M.negate():M.clone();if(D.compareTo(W)<0){var ie=D;D=W,W=ie}var be=D.getLowestSetBit(),Pe=W.getLowestSetBit();if(Pe<0)return D;for(be<Pe&&(Pe=be),Pe>0&&(D.rShiftTo(Pe,D),W.rShiftTo(Pe,W));D.signum()>0;)(be=D.getLowestSetBit())>0&&D.rShiftTo(be,D),(be=W.getLowestSetBit())>0&&W.rShiftTo(be,W),D.compareTo(W)>=0?(D.subTo(W,D),D.rShiftTo(1,D)):(W.subTo(D,W),W.rShiftTo(1,W));return Pe>0&&W.lShiftTo(Pe,W),W}function bee(M){if(M<=0)return 0;var D=this.DV%M,W=this.s<0?M-1:0;if(this.t>0)if(D==0)W=this[0]%M;else for(var ie=this.t-1;ie>=0;--ie)W=(D*W+this[ie])%M;return W}function xee(M){var D=M.isEven();if(this.isEven()&&D||M.signum()==0)return m.ZERO;for(var W=M.clone(),ie=this.clone(),be=X(1),Pe=X(0),De=X(0),Fe=X(1);W.signum()!=0;){for(;W.isEven();)W.rShiftTo(1,W),D?((!be.isEven()||!Pe.isEven())&&(be.addTo(this,be),Pe.subTo(M,Pe)),be.rShiftTo(1,be)):Pe.isEven()||Pe.subTo(M,Pe),Pe.rShiftTo(1,Pe);for(;ie.isEven();)ie.rShiftTo(1,ie),D?((!De.isEven()||!Fe.isEven())&&(De.addTo(this,De),Fe.subTo(M,Fe)),De.rShiftTo(1,De)):Fe.isEven()||Fe.subTo(M,Fe),Fe.rShiftTo(1,Fe);W.compareTo(ie)>=0?(W.subTo(ie,W),D&&be.subTo(De,be),Pe.subTo(Fe,Pe)):(ie.subTo(W,ie),D&&De.subTo(be,De),Fe.subTo(Pe,Fe))}if(ie.compareTo(m.ONE)!=0)return m.ZERO;if(Fe.compareTo(M)>=0)return Fe.subtract(M);if(Fe.signum()<0)Fe.addTo(M,Fe);else return Fe;return Fe.signum()<0?Fe.add(M):Fe}var Kn=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],wee=(1<<26)/Kn[Kn.length-1];function See(M){var D,W=this.abs();if(W.t==1&&W[0]<=Kn[Kn.length-1]){for(D=0;D<Kn.length;++D)if(W[0]==Kn[D])return!0;return!1}if(W.isEven())return!1;for(D=1;D<Kn.length;){for(var ie=Kn[D],be=D+1;be<Kn.length&&ie<wee;)ie*=Kn[be++];for(ie=W.modInt(ie);D<be;)if(ie%Kn[D++]==0)return!1}return W.millerRabin(M)}function Cee(M){var D=this.subtract(m.ONE),W=D.getLowestSetBit();if(W<=0)return!1;var ie=D.shiftRight(W);M=M+1>>1,M>Kn.length&&(M=Kn.length);for(var be=y(),Pe=0;Pe<M;++Pe){be.fromInt(Kn[Math.floor(Math.random()*Kn.length)]);var De=be.modPow(ie,this);if(De.compareTo(m.ONE)!=0&&De.compareTo(D)!=0){for(var Fe=1;Fe++<W&&De.compareTo(D)!=0;)if(De=De.modPowInt(2,this),De.compareTo(m.ONE)==0)return!1;if(De.compareTo(D)!=0)return!1}}return!0}m.prototype.chunkSize=Ce,m.prototype.toRadix=rt,m.prototype.fromRadix=de,m.prototype.fromNumber=_e,m.prototype.bitwiseTo=Rr,m.prototype.changeBit=Xq,m.prototype.addTo=$q,m.prototype.dMultiply=aee,m.prototype.dAddOffset=see,m.prototype.multiplyLowerTo=dee,m.prototype.multiplyUpperTo=fee,m.prototype.modInt=bee,m.prototype.millerRabin=Cee,m.prototype.clone=Ua,m.prototype.intValue=eu,m.prototype.byteValue=J,m.prototype.shortValue=ne,m.prototype.signum=Ge,m.prototype.toByteArray=ct,m.prototype.equals=Ut,m.prototype.min=_i,m.prototype.max=cl,m.prototype.and=Yv,m.prototype.or=Bq,m.prototype.xor=Lq,m.prototype.andNot=Vq,m.prototype.not=jq,m.prototype.shiftLeft=Fq,m.prototype.shiftRight=Zq,m.prototype.getLowestSetBit=zq,m.prototype.bitCount=Hq,m.prototype.testBit=Yq,m.prototype.setBit=Gq,m.prototype.clearBit=Kq,m.prototype.flipBit=Jq,m.prototype.add=qq,m.prototype.subtract=eee,m.prototype.multiply=tee,m.prototype.divide=oee,m.prototype.remainder=iee,m.prototype.divideAndRemainder=ree,m.prototype.modPow=vee,m.prototype.modInverse=xee,m.prototype.pow=uee,m.prototype.gcd=yee,m.prototype.isProbablePrime=See,m.prototype.square=nee,m.prototype.Barrett=Ha;var hh,Po,vn;function kee(M){Po[vn++]^=M&255,Po[vn++]^=M>>8&255,Po[vn++]^=M>>16&255,Po[vn++]^=M>>24&255,vn>=Gv&&(vn-=Gv)}function l5(){kee(new Date().getTime())}if(Po==null){Po=new Array,vn=0;var ei;if(typeof window<"u"&&window.crypto){if(window.crypto.getRandomValues){var c5=new Uint8Array(32);for(window.crypto.getRandomValues(c5),ei=0;ei<32;++ei)Po[vn++]=c5[ei]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var u5=window.crypto.random(32);for(ei=0;ei<u5.length;++ei)Po[vn++]=u5.charCodeAt(ei)&255}}for(;vn<Gv;)ei=Math.floor(65536*Math.random()),Po[vn++]=ei>>>8,Po[vn++]=ei&255;vn=0,l5()}function Pee(){if(hh==null){for(l5(),hh=Nee(),hh.init(Po),vn=0;vn<Po.length;++vn)Po[vn]=0;vn=0}return hh.next()}function _ee(M){var D;for(D=0;D<M.length;++D)M[D]=Pee()}function d5(){}d5.prototype.nextBytes=_ee;function Xv(){this.i=0,this.j=0,this.S=new Array}function Eee(M){var D,W,ie;for(D=0;D<256;++D)this.S[D]=D;for(W=0,D=0;D<256;++D)W=W+this.S[D]+M[D%M.length]&255,ie=this.S[D],this.S[D]=this.S[W],this.S[W]=ie;this.i=0,this.j=0}function Tee(){var M;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,M=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=M,this.S[M+this.S[this.i]&255]}Xv.prototype.init=Eee,Xv.prototype.next=Tee;function Nee(){return new Xv}var Gv=256;i.exports={default:m,BigInteger:m,SecureRandom:d5}}).call(zf)})(LN);var sh=LN.exports;const{BigInteger:il}=sh;function Y$(i){let s=i.toString(16);if(s[0]!=="-")s.length%2===1?s="0"+s:s.match(/^[0-7]/)||(s="00"+s);else{s=s.substr(1);let c=s.length;c%2===1?c+=1:s.match(/^[0-7]/)||(c+=2);let d="";for(let p=0;p<c;p++)d+="f";d=new il(d,16),s=d.xor(i).add(il.ONE),s=s.toString(16).replace(/^-/,"")}return s}class VN{constructor(){this.tlv=null,this.t="00",this.l="00",this.v=""}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){const s=this.v.length/2;let c=s.toString(16);return c.length%2===1&&(c="0"+c),s<128?c:(128+c.length/2).toString(16)+c}getValue(){return""}}class jN extends VN{constructor(s){super(),this.t="02",s&&(this.v=Y$(s))}getValue(){return this.v}}class X$ extends VN{constructor(s){super(),this.t="30",this.asn1Array=s}getValue(){return this.v=this.asn1Array.map(s=>s.getEncodedHex()).join(""),this.v}}function FN(i,s){return+i[s+2]<8?1:+i.substr(s+2,2)&128}function ZN(i,s){const c=FN(i,s),d=i.substr(s+2,c*2);return d?(+d[0]<8?new il(d,16):new il(d.substr(2),16)).intValue():-1}function zv(i,s){const c=FN(i,s);return s+(c+1)*2}var G$={encodeDer(i,s){const c=new jN(i),d=new jN(s);return new X$([c,d]).getEncodedHex()},decodeDer(i){const s=zv(i,0),c=zv(i,s),d=ZN(i,s),p=i.substr(c,d*2),m=c+p.length,y=zv(i,m),w=ZN(i,m),S=i.substr(y,w*2),N=new il(p,16),P=new il(S,16);return{r:N,s:P}}};const{BigInteger:Xn}=sh,WN=new Xn("2"),zN=new Xn("3");class Er{constructor(s,c){this.x=c,this.q=s}equals(s){return s===this?!0:this.q.equals(s.q)&&this.x.equals(s.x)}toBigInteger(){return this.x}negate(){return new Er(this.q,this.x.negate().mod(this.q))}add(s){return new Er(this.q,this.x.add(s.toBigInteger()).mod(this.q))}subtract(s){return new Er(this.q,this.x.subtract(s.toBigInteger()).mod(this.q))}multiply(s){return new Er(this.q,this.x.multiply(s.toBigInteger()).mod(this.q))}divide(s){return new Er(this.q,this.x.multiply(s.toBigInteger().modInverse(this.q)).mod(this.q))}square(){return new Er(this.q,this.x.square().mod(this.q))}}class Tr{constructor(s,c,d,p){this.curve=s,this.x=c,this.y=d,this.z=p??Xn.ONE,this.zinv=null}getX(){return this.zinv===null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}getY(){return this.zinv===null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}equals(s){return s===this?!0:this.isInfinity()?s.isInfinity():s.isInfinity()?this.isInfinity():s.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(s.z)).mod(this.curve.q).equals(Xn.ZERO)?s.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(s.z)).mod(this.curve.q).equals(Xn.ZERO):!1}isInfinity(){return this.x===null&&this.y===null?!0:this.z.equals(Xn.ZERO)&&!this.y.toBigInteger().equals(Xn.ZERO)}negate(){return new Tr(this.curve,this.x,this.y.negate(),this.z)}add(s){if(this.isInfinity())return s;if(s.isInfinity())return this;const c=this.x.toBigInteger(),d=this.y.toBigInteger(),p=this.z,m=s.x.toBigInteger(),y=s.y.toBigInteger(),w=s.z,S=this.curve.q,N=c.multiply(w).mod(S),P=m.multiply(p).mod(S),_=N.subtract(P),T=d.multiply(w).mod(S),Q=y.multiply(p).mod(S),Z=T.subtract(Q);if(Xn.ZERO.equals(_))return Xn.ZERO.equals(Z)?this.twice():this.curve.infinity;const z=N.add(P),G=p.multiply(w).mod(S),te=_.square().mod(S),$=_.multiply(te).mod(S),H=G.multiply(Z.square()).subtract(z.multiply(te)).mod(S),X=_.multiply(H).mod(S),re=Z.multiply(te.multiply(N).subtract(H)).subtract(T.multiply($)).mod(S),oe=$.multiply(G).mod(S);return new Tr(this.curve,this.curve.fromBigInteger(X),this.curve.fromBigInteger(re),oe)}twice(){if(this.isInfinity())return this;if(!this.y.toBigInteger().signum())return this.curve.infinity;const s=this.x.toBigInteger(),c=this.y.toBigInteger(),d=this.z,p=this.curve.q,m=this.curve.a.toBigInteger(),y=s.square().multiply(zN).add(m.multiply(d.square())).mod(p),w=c.shiftLeft(1).multiply(d).mod(p),S=c.square().mod(p),N=S.multiply(s).multiply(d).mod(p),P=w.square().mod(p),_=y.square().subtract(N.shiftLeft(3)).mod(p),T=w.multiply(_).mod(p),Q=y.multiply(N.shiftLeft(2).subtract(_)).subtract(P.shiftLeft(1).multiply(S)).mod(p),Z=w.multiply(P).mod(p);return new Tr(this.curve,this.curve.fromBigInteger(T),this.curve.fromBigInteger(Q),Z)}multiply(s){if(this.isInfinity())return this;if(!s.signum())return this.curve.infinity;const c=s.multiply(zN),d=this.negate();let p=this;for(let m=c.bitLength()-2;m>0;m--){p=p.twice();const y=c.testBit(m),w=s.testBit(m);y!==w&&(p=p.add(y?this:d))}return p}}var K$={ECPointFp:Tr,ECCurveFp:class{constructor(i,s,c){this.q=i,this.a=this.fromBigInteger(s),this.b=this.fromBigInteger(c),this.infinity=new Tr(this,null,null)}equals(i){return i===this?!0:this.q.equals(i.q)&&this.a.equals(i.a)&&this.b.equals(i.b)}fromBigInteger(i){return new Er(this.q,i)}decodePointHex(i){switch(parseInt(i.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:const s=this.fromBigInteger(new Xn(i.substr(2),16));let c=this.fromBigInteger(s.multiply(s.square()).add(s.multiply(this.a)).add(this.b).toBigInteger().modPow(this.q.divide(new Xn("4")).add(Xn.ONE),this.q));return c.toBigInteger().mod(WN).equals(new Xn(i.substr(0,2),16).subtract(WN))||(c=c.negate()),new Tr(this,s,c);case 4:case 6:case 7:const d=(i.length-2)/2,p=i.substr(2,d),m=i.substr(d+2,d);return new Tr(this,this.fromBigInteger(new Xn(p,16)),this.fromBigInteger(new Xn(m,16)));default:return null}}}};const{BigInteger:$o,SecureRandom:J$}=sh,{ECCurveFp:$$}=K$,q$=new J$,{curve:rl,G:eq,n:UN}=HN();function tq(){return rl}function HN(){const i=new $o("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),s=new $o("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),c=new $o("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16),d=new $$(i,s,c),p=d.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0"),m=new $o("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16);return{curve:d,G:p,n:m}}function nq(i,s,c){const d=(i?new $o(i,s,c):new $o(UN.bitLength(),q$)).mod(UN.subtract($o.ONE)).add($o.ONE),p=$c(d.toString(16),64),m=eq.multiply(d),y=$c(m.getX().toBigInteger().toString(16),64),w=$c(m.getY().toBigInteger().toString(16),64),S="04"+y+w;return{privateKey:p,publicKey:S}}function oq(i){if(i.length!==130)throw new Error("Invalid public key to compress");const s=(i.length-2)/2,c=i.substr(2,s),d=new $o(i.substr(s+2,s),16);let p="03";return d.mod(new $o("2")).equals($o.ZERO)&&(p="02"),p+c}function iq(i){i=unescape(encodeURIComponent(i));const s=i.length,c=[];for(let p=0;p<s;p++)c[p>>>2]|=(i.charCodeAt(p)&255)<<24-p%4*8;const d=[];for(let p=0;p<s;p++){const m=c[p>>>2]>>>24-p%4*8&255;d.push((m>>>4).toString(16)),d.push((m&15).toString(16))}return d.join("")}function $c(i,s){return i.length>=s?i:new Array(s-i.length+1).join("0")+i}function rq(i){return i.map(s=>(s=s.toString(16),s.length===1?"0"+s:s)).join("")}function aq(i){const s=[];let c=0;for(let d=0;d<i.length*2;d+=2)s[d>>>3]|=parseInt(i[c],10)<<24-d%8*4,c++;try{const d=[];for(let p=0;p<i.length;p++){const m=s[p>>>2]>>>24-p%4*8&255;d.push(String.fromCharCode(m))}return decodeURIComponent(escape(d.join("")))}catch{throw new Error("Malformed UTF-8 data")}}function sq(i){const s=[];let c=i.length;c%2!==0&&(i=$c(i,c+1)),c=i.length;for(let d=0;d<c;d+=2)s.push(parseInt(i.substr(d,2),16));return s}function lq(i){const s=rl.decodePointHex(i);if(!s)return!1;const c=s.getX();return s.getY().square().equals(c.multiply(c.square()).add(c.multiply(rl.a)).add(rl.b))}function cq(i,s){const c=rl.decodePointHex(i);if(!c)return!1;const d=rl.decodePointHex(s);return d?c.equals(d):!1}var uq={getGlobalCurve:tq,generateEcparam:HN,generateKeyPairHex:nq,compressPublicKeyHex:oq,utf8ToHex:iq,leftPad:$c,arrayToHex:rq,arrayToUtf8:aq,hexToArray:sq,verifyPublicKey:lq,comparePublicKeyHex:cq};const qo=new Uint32Array(68),Uv=new Uint32Array(64);function Do(i,s){const c=s&31;return i<<c|i>>>32-c}function YN(i,s){const c=[];for(let d=i.length-1;d>=0;d--)c[d]=(i[d]^s[d])&255;return c}function dq(i){return i^Do(i,9)^Do(i,17)}function fq(i){return i^Do(i,15)^Do(i,23)}function lh(i){let s=i.length*8,c=s%512;c=c>=448?512-c%448-1:448-c-1;const d=new Array((c-7)/8),p=new Array(8);for(let P=0,_=d.length;P<_;P++)d[P]=0;for(let P=0,_=p.length;P<_;P++)p[P]=0;s=s.toString(2);for(let P=7;P>=0;P--)if(s.length>8){const _=s.length-8;p[P]=parseInt(s.substr(_),2),s=s.substr(0,_)}else s.length>0&&(p[P]=parseInt(s,2),s="");const m=new Uint8Array([...i,128,...d,...p]),y=new DataView(m.buffer,0),w=m.length/64,S=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]);for(let P=0;P<w;P++){qo.fill(0),Uv.fill(0);const _=16*P;for(let ke=0;ke<16;ke++)qo[ke]=y.getUint32((_+ke)*4,!1);for(let ke=16;ke<68;ke++)qo[ke]=fq(qo[ke-16]^qo[ke-9]^Do(qo[ke-3],15))^Do(qo[ke-13],7)^qo[ke-6];for(let ke=0;ke<64;ke++)Uv[ke]=qo[ke]^qo[ke+4];const T=2043430169,Q=2055708042;let Z=S[0],z=S[1],G=S[2],te=S[3],$=S[4],H=S[5],X=S[6],re=S[7],oe,U,ce,he,Qe;for(let ke=0;ke<64;ke++)Qe=ke>=0&&ke<=15?T:Q,oe=Do(Do(Z,12)+$+Do(Qe,ke),7),U=oe^Do(Z,12),ce=(ke>=0&&ke<=15?Z^z^G:Z&z|Z&G|z&G)+te+U+Uv[ke],he=(ke>=0&&ke<=15?$^H^X:$&H|~$&X)+re+oe+qo[ke],te=G,G=Do(z,9),z=Z,Z=ce,re=X,X=Do(H,19),H=$,$=dq(he);S[0]^=Z,S[1]^=z,S[2]^=G,S[3]^=te,S[4]^=$,S[5]^=H,S[6]^=X,S[7]^=re}const N=[];for(let P=0,_=S.length;P<_;P++){const T=S[P];N.push((T&4278190080)>>>24,(T&16711680)>>>16,(T&65280)>>>8,T&255)}return N}const qc=64,XN=new Uint8Array(qc),GN=new Uint8Array(qc);for(let i=0;i<qc;i++)XN[i]=54,GN[i]=92;function hq(i,s){for(s.length>qc&&(s=lh(s));s.length<qc;)s.push(0);const c=YN(s,XN),d=YN(s,GN),p=lh([...c,...i]);return lh([...d,...p])}var KN={sm3:lh,hmac:hq};const{BigInteger:Co}=sh,{encodeDer:pq,decodeDer:mq}=G$,st=uq,al=KN.sm3,{G:Za,curve:JN,n:sl}=st.generateEcparam(),$N=0;function gq(i,s,c=1){i=typeof i=="string"?st.hexToArray(st.utf8ToHex(i)):Array.prototype.slice.call(i),s=st.getGlobalCurve().decodePointHex(s);const d=st.generateKeyPairHex(),p=new Co(d.privateKey,16);let m=d.publicKey;m.length>128&&(m=m.substr(m.length-128));const y=s.multiply(p),w=st.hexToArray(st.leftPad(y.getX().toBigInteger().toRadix(16),64)),S=st.hexToArray(st.leftPad(y.getY().toBigInteger().toRadix(16),64)),N=st.arrayToHex(al([].concat(w,i,S)));let P=1,_=0,T=[];const Q=[].concat(w,S),Z=()=>{T=al([...Q,P>>24&255,P>>16&255,P>>8&255,P&255]),P++,_=0};Z();for(let G=0,te=i.length;G<te;G++)_===T.length&&Z(),i[G]^=T[_++]&255;const z=st.arrayToHex(i);return c===$N?m+z+N:m+N+z}function Oq(i,s,c=1,{output:d="string"}={}){s=new Co(s,16);let p=i.substr(128,64),m=i.substr(192);c===$N&&(p=i.substr(i.length-64),m=i.substr(128,i.length-128-64));const y=st.hexToArray(m),w=st.getGlobalCurve().decodePointHex("04"+i.substr(0,128)).multiply(s),S=st.hexToArray(st.leftPad(w.getX().toBigInteger().toRadix(16),64)),N=st.hexToArray(st.leftPad(w.getY().toBigInteger().toRadix(16),64));let P=1,_=0,T=[];const Q=[].concat(S,N),Z=()=>{T=al([...Q,P>>24&255,P>>16&255,P>>8&255,P&255]),P++,_=0};Z();for(let z=0,G=y.length;z<G;z++)_===T.length&&Z(),y[z]^=T[_++]&255;return st.arrayToHex(al([].concat(S,y,N)))===p.toLowerCase()?d==="array"?y:st.arrayToUtf8(y):d==="array"?[]:""}function vq(i,s,{pointPool:c,der:d,hash:p,publicKey:m,userId:y}={}){let w=typeof i=="string"?st.utf8ToHex(i):st.arrayToHex(i);p&&(m=m||e5(s),w=qN(w,m,y));const S=new Co(s,16),N=new Co(w,16);let P=null,_=null,T=null;do{do{let Q;c&&c.length?Q=c.pop():Q=t5(),P=Q.k,_=N.add(Q.x1).mod(sl)}while(_.equals(Co.ZERO)||_.add(P).equals(sl));T=S.add(Co.ONE).modInverse(sl).multiply(P.subtract(_.multiply(S))).mod(sl)}while(T.equals(Co.ZERO));return d?pq(_,T):st.leftPad(_.toString(16),64)+st.leftPad(T.toString(16),64)}function yq(i,s,c,{der:d,hash:p,userId:m}={}){let y=typeof i=="string"?st.utf8ToHex(i):st.arrayToHex(i);p&&(y=qN(y,c,m));let w,S;if(d){const Z=mq(s);w=Z.r,S=Z.s}else w=new Co(s.substring(0,64),16),S=new Co(s.substring(64),16);const N=JN.decodePointHex(c),P=new Co(y,16),_=w.add(S).mod(sl);if(_.equals(Co.ZERO))return!1;const T=Za.multiply(S).add(N.multiply(_)),Q=P.add(T.getX().toBigInteger()).mod(sl);return w.equals(Q)}function qN(i,s,c="1234567812345678"){c=st.utf8ToHex(c);const d=st.leftPad(Za.curve.a.toBigInteger().toRadix(16),64),p=st.leftPad(Za.curve.b.toBigInteger().toRadix(16),64),m=st.leftPad(Za.getX().toBigInteger().toRadix(16),64),y=st.leftPad(Za.getY().toBigInteger().toRadix(16),64);let w,S;if(s.length===128)w=s.substr(0,64),S=s.substr(64,64);else{const T=Za.curve.decodePointHex(s);w=st.leftPad(T.getX().toBigInteger().toRadix(16),64),S=st.leftPad(T.getY().toBigInteger().toRadix(16),64)}const N=st.hexToArray(c+d+p+m+y+w+S),P=c.length*4;N.unshift(P&255),N.unshift(P>>8&255);const _=al(N);return st.arrayToHex(al(_.concat(st.hexToArray(i))))}function e5(i){const s=Za.multiply(new Co(i,16)),c=st.leftPad(s.getX().toBigInteger().toString(16),64),d=st.leftPad(s.getY().toBigInteger().toString(16),64);return"04"+c+d}function t5(){const i=st.generateKeyPairHex(),s=JN.decodePointHex(i.publicKey);return i.k=new Co(i.privateKey,16),i.x1=s.getX().toBigInteger(),i}var bq={generateKeyPairHex:st.generateKeyPairHex,compressPublicKeyHex:st.compressPublicKeyHex,comparePublicKeyHex:st.comparePublicKeyHex,doEncrypt:gq,doDecrypt:Oq,doSignature:vq,doVerifySignature:yq,getPublicKeyFromPrivateKey:e5,getPoint:t5,verifyPublicKey:st.verifyPublicKey};const{sm3:xq,hmac:wq}=KN;function Sq(i,s){return i.length>=s?i:new Array(s-i.length+1).join("0")+i}function n5(i){return i.map(s=>(s=s.toString(16),s.length===1?"0"+s:s)).join("")}function Cq(i){const s=[];let c=i.length;c%2!==0&&(i=Sq(i,c+1)),c=i.length;for(let d=0;d<c;d+=2)s.push(parseInt(i.substr(d,2),16));return s}function kq(i){const s=[];for(let c=0,d=i.length;c<d;c++){const p=i.codePointAt(c);if(p<=127)s.push(p);else if(p<=2047)s.push(192|p>>>6),s.push(128|p&63);else if(p<=55295||p>=57344&&p<=65535)s.push(224|p>>>12),s.push(128|p>>>6&63),s.push(128|p&63);else if(p>=65536&&p<=1114111)c++,s.push(240|p>>>18&28),s.push(128|p>>>12&63),s.push(128|p>>>6&63),s.push(128|p&63);else throw s.push(p),new Error("input is not supported")}return s}var Pq=function(i,s){if(i=typeof i=="string"?kq(i):Array.prototype.slice.call(i),s){if((s.mode||"hmac")!=="hmac")throw new Error("invalid mode");let c=s.key;if(!c)throw new Error("invalid key");return c=typeof c=="string"?Cq(c):Array.prototype.slice.call(c),n5(wq(i,c))}return n5(xq(i))};const Nr=0,_q=32,Wa=16,ch=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],uh=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Hv(i){const s=[];for(let c=0,d=i.length;c<d;c+=2)s.push(parseInt(i.substr(c,2),16));return s}function Eq(i){return i.map(s=>(s=s.toString(16),s.length===1?"0"+s:s)).join("")}function Tq(i){const s=[];for(let c=0,d=i.length;c<d;c++){const p=i.codePointAt(c);if(p<=127)s.push(p);else if(p<=2047)s.push(192|p>>>6),s.push(128|p&63);else if(p<=55295||p>=57344&&p<=65535)s.push(224|p>>>12),s.push(128|p>>>6&63),s.push(128|p&63);else if(p>=65536&&p<=1114111)c++,s.push(240|p>>>18&28),s.push(128|p>>>12&63),s.push(128|p>>>6&63),s.push(128|p&63);else throw s.push(p),new Error("input is not supported")}return s}function Nq(i){const s=[];for(let c=0,d=i.length;c<d;c++)i[c]>=240&&i[c]<=247?(s.push(String.fromCodePoint(((i[c]&7)<<18)+((i[c+1]&63)<<12)+((i[c+2]&63)<<6)+(i[c+3]&63))),c+=3):i[c]>=224&&i[c]<=239?(s.push(String.fromCodePoint(((i[c]&15)<<12)+((i[c+1]&63)<<6)+(i[c+2]&63))),c+=2):i[c]>=192&&i[c]<=223?(s.push(String.fromCodePoint(((i[c]&31)<<6)+(i[c+1]&63))),c++):s.push(String.fromCodePoint(i[c]));return s.join("")}function ll(i,s){const c=s&31;return i<<c|i>>>32-c}function Ar(i){return(ch[i>>>24&255]&255)<<24|(ch[i>>>16&255]&255)<<16|(ch[i>>>8&255]&255)<<8|ch[i&255]&255}function dh(i){return i^ll(i,2)^ll(i,10)^ll(i,18)^ll(i,24)}function fh(i){return i^ll(i,13)^ll(i,23)}function Aq(i,s,c){const d=new Array(4),p=new Array(4);for(let m=0;m<4;m++)p[0]=i[4*m]&255,p[1]=i[4*m+1]&255,p[2]=i[4*m+2]&255,p[3]=i[4*m+3]&255,d[m]=p[0]<<24|p[1]<<16|p[2]<<8|p[3];for(let m=0,y;m<32;m+=4)y=d[1]^d[2]^d[3]^c[m+0],d[0]^=dh(Ar(y)),y=d[2]^d[3]^d[0]^c[m+1],d[1]^=dh(Ar(y)),y=d[3]^d[0]^d[1]^c[m+2],d[2]^=dh(Ar(y)),y=d[0]^d[1]^d[2]^c[m+3],d[3]^=dh(Ar(y));for(let m=0;m<16;m+=4)s[m]=d[3-m/4]>>>24&255,s[m+1]=d[3-m/4]>>>16&255,s[m+2]=d[3-m/4]>>>8&255,s[m+3]=d[3-m/4]&255}function Mq(i,s,c){const d=new Array(4),p=new Array(4);for(let m=0;m<4;m++)p[0]=i[0+4*m]&255,p[1]=i[1+4*m]&255,p[2]=i[2+4*m]&255,p[3]=i[3+4*m]&255,d[m]=p[0]<<24|p[1]<<16|p[2]<<8|p[3];d[0]^=2746333894,d[1]^=1453994832,d[2]^=1736282519,d[3]^=2993693404;for(let m=0,y;m<32;m+=4)y=d[1]^d[2]^d[3]^uh[m+0],s[m+0]=d[0]^=fh(Ar(y)),y=d[2]^d[3]^d[0]^uh[m+1],s[m+1]=d[1]^=fh(Ar(y)),y=d[3]^d[0]^d[1]^uh[m+2],s[m+2]=d[2]^=fh(Ar(y)),y=d[0]^d[1]^d[2]^uh[m+3],s[m+3]=d[3]^=fh(Ar(y));if(c===Nr)for(let m=0,y;m<16;m++)y=s[m],s[m]=s[31-m],s[31-m]=y}function o5(i,s,c,{padding:d="pkcs#7",mode:p,iv:m=[],output:y="string"}={}){if(p==="cbc"&&(typeof m=="string"&&(m=Hv(m)),m.length!==128/8))throw new Error("iv is invalid");if(typeof s=="string"&&(s=Hv(s)),s.length!==128/8)throw new Error("key is invalid");if(typeof i=="string"?c!==Nr?i=Tq(i):i=Hv(i):i=[...i],(d==="pkcs#5"||d==="pkcs#7")&&c!==Nr){const T=Wa-i.length%Wa;for(let Q=0;Q<T;Q++)i.push(T)}const w=new Array(_q);Mq(s,w,c);const S=[];let N=m,P=i.length,_=0;for(;P>=Wa;){const T=i.slice(_,_+16),Q=new Array(16);if(p==="cbc")for(let Z=0;Z<Wa;Z++)c!==Nr&&(T[Z]^=N[Z]);Aq(T,Q,w);for(let Z=0;Z<Wa;Z++)p==="cbc"&&c===Nr&&(Q[Z]^=N[Z]),S[_+Z]=Q[Z];p==="cbc"&&(c!==Nr?N=Q:N=T),P-=Wa,_+=Wa}if((d==="pkcs#5"||d==="pkcs#7")&&c===Nr){const T=S.length,Q=S[T-1];for(let Z=1;Z<=Q;Z++)if(S[T-Z]!==Q)throw new Error("padding is invalid");S.splice(T-Q,Q)}return y!=="array"?c!==Nr?Eq(S):Nq(S):S}var Rq={encrypt(i,s,c){return o5(i,s,1,c)},decrypt(i,s,c){return o5(i,s,0,c)}},Iq={sm2:bq,sm3:Pq,sm4:Rq};function Qq(i){return"04"+Iq.sm2.doEncrypt(i,l.security.sm2PubKey,1)}const i5={sm2Encrypt:Qq},Dq={version:r,axios:_r,loadConfig:h,useDialog:NN,locales:Wv,useSession:MN,utils:i5,install(i,s){return h(s),_r.install(i,s?.axios),i.use(Wv.i18n),i}};t.UnioneSession=AN,t.axios=_r,t.default=Dq,t.loadConfig=h,t.locales=Wv,t.useDialog=NN,t.useSession=MN,t.utils=i5,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})}(nu,nu.exports);var ou=nu.exports;const Jv=h5(ou),p5={...{...{submit:"提交","submit.ok":"已提交","submit.error":"提交失败","confirm.ok":"确定","confirm.cancel":"取消","global.setting.title":"设置"},...{"pages.home":"首页"},...{"pages.layouts.userLayout.title":"user layout"}}},m5={...{submit:"Submit","submit.ok":"Submitted","submit.error":"Submit Failed","confirm.ok":"Yes","confirm.cancel":"No","global.setting.title":"Settings"},...{"pages.home":"Home"},...{"pages.layouts.userLayout.title":"user layout"}},g5=u.ref([p5,m5]);function O5(n,e){return Jv.locales.loadLanguage(n,()=>new Promise((t,o)=>{const r=g5.value.filter(a=>a.localeName==n);if(e)if(typeof e=="function")e().then(a=>{if(r.length==0){const l={...a,localeName:n};t(l)}else{const l={...r[0],...a};t(l)}});else if(r.length==0){const a={...e,localeName:n};t(a)}else{const a={...r[0],...e};t(a)}else r.length>0?t(r[0]):o("local language not defined ,lang:"+n)}))}const gh={...Jv.locales};gh.loadLanguage=O5;function dl(n){"@babel/helpers - typeof";return dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dl(n)}function v5(n,e){if(dl(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var o=t.call(n,e||"default");if(dl(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function y5(n){var e=v5(n,"string");return dl(e)=="symbol"?e:e+""}function b5(n,e,t){return(e=y5(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function $v(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,o)}return t}function Ke(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?$v(Object(t),!0).forEach(function(o){b5(n,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):$v(Object(t)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(t,o))})}return n}function q(){return q=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)({}).hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},q.apply(null,arguments)}const x5=Array.isArray,w5=n=>typeof n=="string",S5=n=>n!==null&&typeof n=="object";function Ya(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;return typeof n=="function"?n(e):n??t}function C5(n){let e;const t=new Promise(r=>{e=n(()=>{r(!0)})}),o=()=>{e?.()};return o.then=(r,a)=>t.then(r,a),o.promise=t,o}function Bt(){const n=[];for(let e=0;e<arguments.length;e++){const t=e<0||arguments.length<=e?void 0:arguments[e];if(t){if(w5(t))n.push(t);else if(x5(t))for(let o=0;o<t.length;o++){const r=Bt(t[o]);r&&n.push(r)}else if(S5(t))for(const o in t)t[o]&&n.push(o)}}return n.join(" ")}const k5=n=>n!=null&&n!=="",fl=(n,e)=>{const t=q({},n);return Object.keys(e).forEach(o=>{const r=t[o];if(r)r.type||r.default?r.default=e[o]:r.def?r.def(e[o]):t[o]={type:r,default:e[o]};else throw new Error(`not have ${o} prop`)}),t},P5=Symbol("skipFlatten"),hl=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const t=Array.isArray(n)?n:[n],o=[];return t.forEach(r=>{Array.isArray(r)?o.push(...hl(r,e)):r&&r.type===u.Fragment?r.key===P5?o.push(r):o.push(...hl(r.children,e)):r&&u.isVNode(r)?e&&!qv(r)?o.push(r):e||o.push(r):k5(r)&&o.push(r)}),o},iu=n=>{var e;let t=((e=n?.vnode)===null||e===void 0?void 0:e.el)||n&&(n.$el||n);for(;t&&!t.tagName;)t=t.nextSibling;return t};function qv(n){return n&&(n.type===u.Comment||n.type===u.Fragment&&n.children.length===0||n.type===u.Text&&n.children.trim()==="")}function e0(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const e=[];return n.forEach(t=>{Array.isArray(t)?e.push(...t):t?.type===u.Fragment?e.push(...e0(t.children)):e.push(t)}),e.filter(t=>!qv(t))}let t0=n=>setTimeout(n,16),n0=n=>clearTimeout(n);typeof window<"u"&&"requestAnimationFrame"in window&&(t0=n=>window.requestAnimationFrame(n),n0=n=>window.cancelAnimationFrame(n));let o0=0;const Oh=new Map;function i0(n){Oh.delete(n)}function pl(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;o0+=1;const t=o0;function o(r){if(r===0)i0(t),n();else{const a=t0(()=>{o(r-1)});Oh.set(t,a)}}return o(e),t}pl.cancel=n=>{const e=Oh.get(n);return i0(e),n0(e)};const ru=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return e},vh=n=>{const e=n;return e.install=function(t){t.component(e.displayName||e.name,n)},n};function r0(){return{type:[Function,Array]}}function $t(n){return{type:Object,default:n}}function Xa(n){return{type:Boolean,default:n}}function yh(n,e){const t={validator:()=>!0,default:n};return t}function a0(n){return{type:Array,default:n}}function s0(n){return{type:String,default:n}}function _5(n,e){return n?{type:n,default:e}:yh(e)}function E5(n,e,t,o){if(n&&n.addEventListener){let r=o;n.addEventListener(e,t,r)}return{remove:()=>{n&&n.removeEventListener&&n.removeEventListener(e,t)}}}const bh="anticon",T5=Symbol("GlobalFormContextKey"),N5=n=>{u.provide(T5,n)},A5=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:$t(),input:$t(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:$t(),pageHeader:$t(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:$t(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:$t(),pagination:$t(),theme:$t(),select:$t(),wave:$t()}),xh=Symbol("configProvider"),l0={getPrefixCls:(n,e)=>e||(n?`ant-${n}`:"ant"),iconPrefixCls:u.computed(()=>bh),getPopupContainer:u.computed(()=>()=>document.body),direction:u.computed(()=>"ltr")},au=()=>u.inject(xh,l0),M5=n=>u.provide(xh,n),c0=Symbol("DisabledContextKey"),wh=()=>u.inject(c0,u.ref(void 0)),R5=n=>{const e=wh();return u.provide(c0,u.computed(()=>{var t;return(t=n.value)!==null&&t!==void 0?t:e.value})),n},I5={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},Q5={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},u0={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},d0={lang:q({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},Q5),timePickerLocale:q({},u0)},co="${label} is not a valid ${type}",Qr={locale:"en",Pagination:I5,DatePicker:d0,TimePicker:u0,Calendar:d0,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:co,method:co,array:co,object:co,number:co,date:co,boolean:co,integer:co,float:co,regexp:co,email:co,url:co,hex:co},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},f0=u.defineComponent({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(n,e){let{slots:t}=e;const o=u.inject("localeData",{}),r=u.computed(()=>{const{componentName:l="global",defaultLocale:f}=n,h=f||Qr[l||"global"],{antLocale:g}=o,O=l&&g?g[l]:{};return q(q({},typeof h=="function"?h():h),O||{})}),a=u.computed(()=>{const{antLocale:l}=o,f=l&&l.locale;return l&&l.exist&&!f?Qr.locale:f});return()=>{const l=n.children||t.default,{antLocale:f}=o;return l?.(r.value,a.value,f)}}});function Sh(n,e,t){const o=u.inject("localeData",{});return[u.computed(()=>{const{antLocale:a}=o,l=u.unref(e)||Qr[n],f=a?a[n]:{};return q(q(q({},typeof l=="function"?l():l),f||{}),u.unref(t)||{})})]}function Ch(n){for(var e=0,t,o=0,r=n.length;r>=4;++o,r-=4)t=n.charCodeAt(o)&255|(n.charCodeAt(++o)&255)<<8|(n.charCodeAt(++o)&255)<<16|(n.charCodeAt(++o)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,e=(t&65535)*1540483477+((t>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(n.charCodeAt(o+2)&255)<<16;case 2:e^=(n.charCodeAt(o+1)&255)<<8;case 1:e^=n.charCodeAt(o)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}const h0="%";class D5{constructor(e){this.cache=new Map,this.instanceId=e}get(e){return this.cache.get(Array.isArray(e)?e.join(h0):e)||null}update(e,t){const o=Array.isArray(e)?e.join(h0):e,r=this.cache.get(o),a=t(r);a===null?this.cache.delete(o):this.cache.set(o,a)}}const p0="data-token-hash",Dr="data-css-hash",B5="data-cache-path",Ga="__cssinjs_instance__";function ml(){const n=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const e=document.body.querySelectorAll(`style[${Dr}]`)||[],{firstChild:t}=document.head;Array.from(e).forEach(r=>{r[Ga]=r[Ga]||n,r[Ga]===n&&document.head.insertBefore(r,t)});const o={};Array.from(document.querySelectorAll(`style[${Dr}]`)).forEach(r=>{var a;const l=r.getAttribute(Dr);o[l]?r[Ga]===n&&((a=r.parentNode)===null||a===void 0||a.removeChild(r)):o[l]=!0})}return new D5(n)}const m0=Symbol("StyleContextKey"),L5=()=>{var n,e,t;const o=u.getCurrentInstance();let r;if(o&&o.appContext){const a=(t=(e=(n=o.appContext)===null||n===void 0?void 0:n.config)===null||e===void 0?void 0:e.globalProperties)===null||t===void 0?void 0:t.__ANTDV_CSSINJS_CACHE__;a?r=a:(r=ml(),o.appContext.config.globalProperties&&(o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=r))}else r=ml();return r},g0={cache:ml(),defaultCache:!0,hashPriority:"low"},su=()=>{const n=L5();return u.inject(m0,u.shallowRef(q(q({},g0),{cache:n})))},V5=n=>{const e=su(),t=u.shallowRef(q(q({},g0),{cache:ml()}));return u.watch([()=>u.unref(n),e],()=>{const o=q({},e.value),r=u.unref(n);Object.keys(r).forEach(l=>{const f=r[l];r[l]!==void 0&&(o[l]=f)});const{cache:a}=r;o.cache=o.cache||ml(),o.defaultCache=!a&&e.value.defaultCache,t.value=o},{immediate:!0}),u.provide(m0,t),t},j5=()=>({autoClear:Xa(),mock:s0(),cache:$t(),defaultCache:Xa(),hashPriority:s0(),container:_5(),ssrInline:Xa(),transformers:a0(),linters:a0()});vh(u.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:j5(),setup(n,e){let{slots:t}=e;return V5(n),()=>{var o;return(o=t.default)===null||o===void 0?void 0:o.call(t)}}}));function F5(){return!1}let kh=!1;function Z5(){return kh}const W5=process.env.NODE_ENV==="production"?F5:Z5;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const n=window;if(typeof n.webpackHotUpdate=="function"){const e=n.webpackHotUpdate;n.webpackHotUpdate=function(){return kh=!0,setTimeout(()=>{kh=!1},0),e(...arguments)}}}function O0(n,e,t,o){const r=su(),a=u.shallowRef(""),l=u.shallowRef();u.watchEffect(()=>{a.value=[n,...e.value].join("%")});const f=W5(),h=g=>{r.value.cache.update(g,O=>{const[v=0,b]=O||[];return v-1===0?(o?.(b,!1),null):[v-1,b]})};return u.watch(a,(g,O)=>{O&&h(O),r.value.cache.update(g,v=>{const[b=0,x]=v||[];let C=x;process.env.NODE_ENV!=="production"&&x&&f&&(o?.(C,f),C=null);const k=C||t();return[b+1,k]}),l.value=r.value.cache.get(a.value)[1]},{immediate:!0}),u.onBeforeUnmount(()=>{h(a.value)}),l}function Vo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function v0(n,e){return n&&n.contains?n.contains(e):!1}const y0="data-vc-order",z5="vc-util-key",Ph=new Map;function b0(){let{mark:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n?n.startsWith("data-")?n:`data-${n}`:z5}function lu(n){return n.attachTo?n.attachTo:document.querySelector("head")||document.body}function U5(n){return n==="queue"?"prependQueue":n?"prepend":"append"}function x0(n){return Array.from((Ph.get(n)||n).children).filter(e=>e.tagName==="STYLE")}function w0(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Vo())return null;const{csp:t,prepend:o}=e,r=document.createElement("style");r.setAttribute(y0,U5(o)),t?.nonce&&(r.nonce=t?.nonce),r.innerHTML=n;const a=lu(e),{firstChild:l}=a;if(o){if(o==="queue"){const f=x0(a).filter(h=>["prepend","prependQueue"].includes(h.getAttribute(y0)));if(f.length)return a.insertBefore(r,f[f.length-1].nextSibling),r}a.insertBefore(r,l)}else a.appendChild(r);return r}function S0(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const t=lu(e);return x0(t).find(o=>o.getAttribute(b0(e))===n)}function cu(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const t=S0(n,e);t&&lu(e).removeChild(t)}function H5(n,e){const t=Ph.get(n);if(!t||!v0(document,t)){const o=w0("",e),{parentNode:r}=o;Ph.set(n,r),n.removeChild(o)}}function gl(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o,r,a;const l=lu(t);H5(l,t);const f=S0(e,t);if(f)return!((o=t.csp)===null||o===void 0)&&o.nonce&&f.nonce!==((r=t.csp)===null||r===void 0?void 0:r.nonce)&&(f.nonce=(a=t.csp)===null||a===void 0?void 0:a.nonce),f.innerHTML!==n&&(f.innerHTML=n),f;const h=w0(n,t);return h.setAttribute(b0(t),e),h}function Y5(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}class Ka{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o={map:this.cache};return e.forEach(r=>{var a;o?o=(a=o?.map)===null||a===void 0?void 0:a.get(r):o=void 0}),o?.value&&t&&(o.value[1]=this.cacheCallTimes++),o?.value}get(e){var t;return(t=this.internalGet(e,!0))===null||t===void 0?void 0:t[0]}has(e){return!!this.internalGet(e)}set(e,t){if(!this.has(e)){if(this.size()+1>Ka.MAX_CACHE_SIZE+Ka.MAX_CACHE_OFFSET){const[r]=this.keys.reduce((a,l)=>{const[,f]=a;return this.internalGet(l)[1]<f?[l,this.internalGet(l)[1]]:a},[this.keys[0],this.cacheCallTimes]);this.delete(r)}this.keys.push(e)}let o=this.cache;e.forEach((r,a)=>{if(a===e.length-1)o.set(r,{value:[t,this.cacheCallTimes++]});else{const l=o.get(r);l?l.map||(l.map=new Map):o.set(r,{map:new Map}),o=o.get(r).map}})}deleteByPath(e,t){var o;const r=e.get(t[0]);if(t.length===1)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),(o=r.value)===null||o===void 0?void 0:o[0];const a=this.deleteByPath(r.map,t.slice(1));return(!r.map||r.map.size===0)&&!r.value&&e.delete(t[0]),a}delete(e){if(this.has(e))return this.keys=this.keys.filter(t=>!Y5(t,e)),this.deleteByPath(this.cache,e)}}Ka.MAX_CACHE_SIZE=20,Ka.MAX_CACHE_OFFSET=5;let _h={};function X5(n,e){process.env.NODE_ENV!=="production"&&!n&&console!==void 0&&console.error(`Warning: ${e}`)}function G5(){_h={}}function K5(n,e,t){!e&&!_h[t]&&(n(!1,t),_h[t]=!0)}function Eh(n,e){K5(X5,n,e)}function J5(){}let Ja=J5;process.env.NODE_ENV!=="production"&&(Ja=(n,e,t)=>{Eh(n,`[ant-design-vue: ${e}] ${t}`),process.env.NODE_ENV==="test"&&G5()});let C0=0;class k0{constructor(e){this.derivatives=Array.isArray(e)?e:[e],this.id=C0,e.length===0&&Ja(e.length>0,"[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."),C0+=1}getDerivativeToken(e){return this.derivatives.reduce((t,o)=>o(e,t),void 0)}}const Th=new Ka;function P0(n){const e=Array.isArray(n)?n:[n];return Th.has(e)||Th.set(e,new k0(e)),Th.get(e)}const _0=new WeakMap;function uu(n){let e=_0.get(n)||"";return e||(Object.keys(n).forEach(t=>{const o=n[t];e+=t,o instanceof k0?e+=o.id:o&&typeof o=="object"?e+=uu(o):e+=o}),_0.set(n,e)),e}function $5(n,e){return Ch(`${e}_${uu(n)}`)}const Ol=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),E0="_bAmBoO_";function q5(n,e,t){var o,r;if(Vo()){gl(n,Ol);const a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",e?.(a),document.body.appendChild(a),process.env.NODE_ENV!=="production"&&(a.innerHTML="Test",a.style.zIndex="9999999");const l=t?t(a):(o=getComputedStyle(a).content)===null||o===void 0?void 0:o.includes(E0);return(r=a.parentNode)===null||r===void 0||r.removeChild(a),cu(Ol),l}return!1}let Nh;function eA(){return Nh===void 0&&(Nh=q5(`@layer ${Ol} { .${Ol} { content: "${E0}"!important; } }`,n=>{n.className=Ol})),Nh}const T0={},tA=process.env.NODE_ENV==="production",nA=process.env.NODE_ENV==="prerender",oA=!tA&&!nA?"css-dev-only-do-not-override":"css",Br=new Map;function iA(n){Br.set(n,(Br.get(n)||0)+1)}function rA(n,e){typeof document<"u"&&document.querySelectorAll(`style[${p0}="${n}"]`).forEach(o=>{var r;o[Ga]===e&&((r=o.parentNode)===null||r===void 0||r.removeChild(o))})}const aA=0;function sA(n,e){Br.set(n,(Br.get(n)||0)-1);const t=Array.from(Br.keys()),o=t.filter(r=>(Br.get(r)||0)<=0);t.length-o.length>aA&&o.forEach(r=>{rA(r,e),Br.delete(r)})}const lA=(n,e,t,o)=>{const r=t.getDerivativeToken(n);let a=q(q({},r),e);return o&&(a=o(a)),a};function cA(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.ref({});const o=su(),r=u.computed(()=>q({},...e.value)),a=u.computed(()=>uu(r.value)),l=u.computed(()=>uu(t.value.override||T0));return O0("token",u.computed(()=>[t.value.salt||"",n.value.id,a.value,l.value]),()=>{const{salt:h="",override:g=T0,formatToken:O,getComputedToken:v}=t.value,b=v?v(r.value,g,n.value):lA(r.value,g,n.value,O),x=$5(b,h);b._tokenKey=x,iA(x);const C=`${oA}-${Ch(x)}`;return b._hashId=C,[b,C]},h=>{var g;sA(h[0]._tokenKey,(g=o.value)===null||g===void 0?void 0:g.cache.instanceId)})}var uA={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},N0="comm",A0="rule",M0="decl",dA="@import",fA="@keyframes",hA="@layer",R0=Math.abs,Ah=String.fromCharCode;function I0(n){return n.trim()}function du(n,e,t){return n.replace(e,t)}function pA(n,e,t){return n.indexOf(e,t)}function vl(n,e){return n.charCodeAt(e)|0}function $a(n,e,t){return n.slice(e,t)}function ii(n){return n.length}function mA(n){return n.length}function fu(n,e){return e.push(n),n}var hu=1,qa=1,Q0=0,Eo=0,qt=0,es="";function Mh(n,e,t,o,r,a,l,f){return{value:n,root:e,parent:t,type:o,props:r,children:a,line:hu,column:qa,length:l,return:"",siblings:f}}function gA(){return qt}function OA(){return qt=Eo>0?vl(es,--Eo):0,qa--,qt===10&&(qa=1,hu--),qt}function jo(){return qt=Eo<Q0?vl(es,Eo++):0,qa++,qt===10&&(qa=1,hu++),qt}function Xi(){return vl(es,Eo)}function pu(){return Eo}function mu(n,e){return $a(es,n,e)}function yl(n){switch(n){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vA(n){return hu=qa=1,Q0=ii(es=n),Eo=0,[]}function yA(n){return es="",n}function Rh(n){return I0(mu(Eo-1,Ih(n===91?n+2:n===40?n+1:n)))}function bA(n){for(;(qt=Xi())&&qt<33;)jo();return yl(n)>2||yl(qt)>3?"":" "}function xA(n,e){for(;--e&&jo()&&!(qt<48||qt>102||qt>57&&qt<65||qt>70&&qt<97););return mu(n,pu()+(e<6&&Xi()==32&&jo()==32))}function Ih(n){for(;jo();)switch(qt){case n:return Eo;case 34:case 39:n!==34&&n!==39&&Ih(qt);break;case 40:n===41&&Ih(n);break;case 92:jo();break}return Eo}function wA(n,e){for(;jo()&&n+qt!==57;)if(n+qt===84&&Xi()===47)break;return"/*"+mu(e,Eo-1)+"*"+Ah(n===47?n:jo())}function SA(n){for(;!yl(Xi());)jo();return mu(n,Eo)}function CA(n){return yA(gu("",null,null,null,[""],n=vA(n),0,[0],n))}function gu(n,e,t,o,r,a,l,f,h){for(var g=0,O=0,v=l,b=0,x=0,C=0,k=1,L=1,A=1,E=0,F="",B=r,I=a,K=o,V=F;L;)switch(C=E,E=jo()){case 40:if(C!=108&&vl(V,v-1)==58){pA(V+=du(Rh(E),"&","&\f"),"&\f",R0(g?f[g-1]:0))!=-1&&(A=-1);break}case 34:case 39:case 91:V+=Rh(E);break;case 9:case 10:case 13:case 32:V+=bA(C);break;case 92:V+=xA(pu()-1,7);continue;case 47:switch(Xi()){case 42:case 47:fu(kA(wA(jo(),pu()),e,t,h),h),(yl(C||1)==5||yl(Xi()||1)==5)&&ii(V)&&$a(V,-1,void 0)!==" "&&(V+=" ");break;default:V+="/"}break;case 123*k:f[g++]=ii(V)*A;case 125*k:case 59:case 0:switch(E){case 0:case 125:L=0;case 59+O:A==-1&&(V=du(V,/\f/g,"")),x>0&&(ii(V)-v||k===0&&C===47)&&fu(x>32?B0(V+";",o,t,v-1,h):B0(du(V," ","")+";",o,t,v-2,h),h);break;case 59:V+=";";default:if(fu(K=D0(V,e,t,g,O,r,f,F,B=[],I=[],v,a),a),E===123)if(O===0)gu(V,e,K,K,B,a,v,f,I);else switch(b===99&&vl(V,3)===110?100:b){case 100:case 108:case 109:case 115:gu(n,K,K,o&&fu(D0(n,K,K,0,0,r,f,F,r,B=[],v,I),I),r,I,v,f,o?B:I);break;default:gu(V,K,K,K,[""],I,0,f,I)}}g=O=x=0,k=A=1,F=V="",v=l;break;case 58:v=1+ii(V),x=C;default:if(k<1){if(E==123)--k;else if(E==125&&k++==0&&OA()==125)continue}switch(V+=Ah(E),E*k){case 38:A=O>0?1:(V+="\f",-1);break;case 44:f[g++]=(ii(V)-1)*A,A=1;break;case 64:Xi()===45&&(V+=Rh(jo())),b=Xi(),O=v=ii(F=V+=SA(pu())),E++;break;case 45:C===45&&ii(V)==2&&(k=0)}}return a}function D0(n,e,t,o,r,a,l,f,h,g,O,v){for(var b=r-1,x=r===0?a:[""],C=mA(x),k=0,L=0,A=0;k<o;++k)for(var E=0,F=$a(n,b+1,b=R0(L=l[k])),B=n;E<C;++E)(B=I0(L>0?x[E]+" "+F:du(F,/&\f/g,x[E])))&&(h[A++]=B);return Mh(n,e,t,r===0?A0:f,h,g,O,v)}function kA(n,e,t,o){return Mh(n,e,t,N0,Ah(gA()),$a(n,2,-2),0,o)}function B0(n,e,t,o,r){return Mh(n,e,t,M0,$a(n,0,o),$a(n,o+1,-1),o,r)}function Qh(n,e){for(var t="",o=0;o<n.length;o++)t+=e(n[o],o,n,e)||"";return t}function PA(n,e,t,o){switch(n.type){case hA:if(n.children.length)break;case dA:case M0:return n.return=n.return||n.value;case N0:return"";case fA:return n.return=n.value+"{"+Qh(n.children,o)+"}";case A0:if(!ii(n.value=n.props.join(",")))return""}return ii(t=Qh(n.children,o))?n.return=n.value+"{"+t+"}":""}function L0(n,e){const{path:t,parentSelectors:o}=e;Eh(!1,`[Ant Design Vue CSS-in-JS] ${t?`Error in '${t}': `:""}${n}${o.length?` Selector info: ${o.join(" -> ")}`:""}`)}const _A=(n,e,t)=>{if(n==="content"){const o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof e!="string"||["normal","none","initial","inherit","unset"].indexOf(e)===-1&&!o.test(e)&&(e.charAt(0)!==e.charAt(e.length-1)||e.charAt(0)!=='"'&&e.charAt(0)!=="'"))&&L0(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${e}"'\`.`,t)}},EA=(n,e,t)=>{n==="animation"&&t.hashId&&e!=="none"&&L0(`You seem to be using hashed animation '${e}', in which case 'animationName' with Keyframe as value is recommended.`,t)},V0="data-ant-cssinjs-cache-path",TA="_FILE_STYLE__";let Lr,j0=!0;function NA(){var n;if(!Lr&&(Lr={},Vo())){const e=document.createElement("div");e.className=V0,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(r=>{const[a,l]=r.split(":");Lr[a]=l});const o=document.querySelector(`style[${V0}]`);o&&(j0=!1,(n=o.parentNode)===null||n===void 0||n.removeChild(o)),document.body.removeChild(e)}}function AA(n){return NA(),!!Lr[n]}function MA(n){const e=Lr[n];let t=null;if(e&&Vo())if(j0)t=TA;else{const o=document.querySelector(`style[${Dr}="${Lr[n]}"]`);o?t=o.innerHTML:delete Lr[n]}return[t,e]}const F0=Vo(),Z0="_skip_check_",W0="_multi_value_";function z0(n){return Qh(CA(n),PA).replace(/\{%%%\:[^;];}/g,";")}function RA(n){return typeof n=="object"&&n&&(Z0 in n||W0 in n)}function IA(n,e,t){if(!e)return n;const o=`.${e}`,r=t==="low"?`:where(${o})`:o;return n.split(",").map(l=>{var f;const h=l.trim().split(/\s+/);let g=h[0]||"";const O=((f=g.match(/^\w+/))===null||f===void 0?void 0:f[0])||"";return g=`${O}${r}${g.slice(O.length)}`,[g,...h.slice(1)].join(" ")}).join(",")}const Dh=new Set;process.env.NODE_ENV;const Bh=function(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:t,injectHash:o,parentSelectors:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:a,layer:l,path:f,hashPriority:h,transformers:g=[],linters:O=[]}=e;let v="",b={};function x(L){const A=L.getName(a);if(!b[A]){const[E]=Bh(L.style,e,{root:!1,parentSelectors:r});b[A]=`@keyframes ${L.getName(a)}${E}`}}function C(L){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return L.forEach(E=>{Array.isArray(E)?C(E,A):E&&A.push(E)}),A}if(C(Array.isArray(n)?n:[n]).forEach(L=>{const A=typeof L=="string"&&!t?{}:L;if(typeof A=="string")v+=`${A}
|
|
176
|
-
`;else if(A._keyframe)x(A);else{const E=g.reduce((F,B)=>{var I;return((I=B?.visit)===null||I===void 0?void 0:I.call(B,F))||F},A);Object.keys(E).forEach(F=>{var B;const I=E[F];if(typeof I=="object"&&I&&(F!=="animationName"||!I._keyframe)&&!RA(I)){let K=!1,V=F.trim(),j=!1;(t||o)&&a?V.startsWith("@")?K=!0:V=IA(F,a,h):t&&!a&&(V==="&"||V==="")&&(V="",j=!0);const[R,Y]=Bh(I,e,{root:j,injectHash:K,parentSelectors:[...r,V]});b=q(q({},b),Y),v+=`${V}${R}`}else{let K=function(j,R){process.env.NODE_ENV!=="production"&&(typeof I!="object"||!I?.[Z0])&&[_A,EA,...O].forEach(me=>me(j,R,{path:f,hashId:a,parentSelectors:r}));const Y=j.replace(/[A-Z]/g,me=>`-${me.toLowerCase()}`);let le=R;!uA[j]&&typeof le=="number"&&le!==0&&(le=`${le}px`),j==="animationName"&&R?._keyframe&&(x(R),le=R.getName(a)),v+=`${Y}:${le};`};const V=(B=I?.value)!==null&&B!==void 0?B:I;typeof I=="object"&&I?.[W0]&&Array.isArray(V)?V.forEach(j=>{K(F,j)}):K(F,V)}})}}),!t)v=`{${v}}`;else if(l&&eA()){const L=l.split(",");v=`@layer ${L[L.length-1].trim()} {${v}}`,L.length>1&&(v=`@layer ${l}{%%%:%}${v}`)}return[v,b]};function QA(n,e){return Ch(`${n.join("%")}${e}`)}function Lh(n,e){const t=su(),o=u.computed(()=>n.value.token._tokenKey),r=u.computed(()=>[o.value,...n.value.path]);let a=F0;return process.env.NODE_ENV!=="production"&&t.value.mock!==void 0&&(a=t.value.mock==="client"),O0("style",r,()=>{const{path:l,hashId:f,layer:h,nonce:g,clientOnly:O,order:v=0}=n.value,b=r.value.join("|");if(AA(b)){const[V,j]=MA(b);if(V)return[V,o.value,j,{},O,v]}const x=e(),{hashPriority:C,container:k,transformers:L,linters:A,cache:E}=t.value,[F,B]=Bh(x,{hashId:f,hashPriority:C,layer:h,path:l.join("-"),transformers:L,linters:A}),I=z0(F),K=QA(r.value,I);if(a){const V={mark:Dr,prepend:"queue",attachTo:k,priority:v},j=typeof g=="function"?g():g;j&&(V.csp={nonce:j});const R=gl(I,K,V);R[Ga]=E.instanceId,R.setAttribute(p0,o.value),process.env.NODE_ENV!=="production"&&R.setAttribute(B5,r.value.join("|")),Object.keys(B).forEach(Y=>{Dh.has(Y)||(Dh.add(Y),gl(z0(B[Y]),`_effect-${Y}`,{mark:Dr,prepend:"queue",attachTo:k}))})}return[I,o.value,K,B,O,v]},(l,f)=>{let[,,h]=l;(f||t.value.autoClear)&&F0&&cu(h,{mark:Dr})}),l=>l}class Ht{constructor(e,t){this._keyframe=!0,this.name=e,this.style=t}getName(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e?`${e}-${this.name}`:this.name}}const DA="4.2.4";function bn(n,e){BA(n)&&(n="100%");var t=LA(n);return n=e===360?n:Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(String(n*e),10)/100),Math.abs(n-e)<1e-6?1:(e===360?n=(n<0?n%e+e:n%e)/parseFloat(String(e)):n=n%e/parseFloat(String(e)),n)}function Ou(n){return Math.min(1,Math.max(0,n))}function BA(n){return typeof n=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1}function LA(n){return typeof n=="string"&&n.indexOf("%")!==-1}function U0(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function vu(n){return n<=1?"".concat(Number(n)*100,"%"):n}function Vr(n){return n.length===1?"0"+n:String(n)}function VA(n,e,t){return{r:bn(n,255)*255,g:bn(e,255)*255,b:bn(t,255)*255}}function H0(n,e,t){n=bn(n,255),e=bn(e,255),t=bn(t,255);var o=Math.max(n,e,t),r=Math.min(n,e,t),a=0,l=0,f=(o+r)/2;if(o===r)l=0,a=0;else{var h=o-r;switch(l=f>.5?h/(2-o-r):h/(o+r),o){case n:a=(e-t)/h+(e<t?6:0);break;case e:a=(t-n)/h+2;break;case t:a=(n-e)/h+4;break}a/=6}return{h:a,s:l,l:f}}function Vh(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*(6*t):t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function jA(n,e,t){var o,r,a;if(n=bn(n,360),e=bn(e,100),t=bn(t,100),e===0)r=t,a=t,o=t;else{var l=t<.5?t*(1+e):t+e-t*e,f=2*t-l;o=Vh(f,l,n+1/3),r=Vh(f,l,n),a=Vh(f,l,n-1/3)}return{r:o*255,g:r*255,b:a*255}}function jh(n,e,t){n=bn(n,255),e=bn(e,255),t=bn(t,255);var o=Math.max(n,e,t),r=Math.min(n,e,t),a=0,l=o,f=o-r,h=o===0?0:f/o;if(o===r)a=0;else{switch(o){case n:a=(e-t)/f+(e<t?6:0);break;case e:a=(t-n)/f+2;break;case t:a=(n-e)/f+4;break}a/=6}return{h:a,s:h,v:l}}function FA(n,e,t){n=bn(n,360)*6,e=bn(e,100),t=bn(t,100);var o=Math.floor(n),r=n-o,a=t*(1-e),l=t*(1-r*e),f=t*(1-(1-r)*e),h=o%6,g=[t,l,a,a,f,t][h],O=[f,t,t,l,a,a][h],v=[a,a,f,t,t,l][h];return{r:g*255,g:O*255,b:v*255}}function Fh(n,e,t,o){var r=[Vr(Math.round(n).toString(16)),Vr(Math.round(e).toString(16)),Vr(Math.round(t).toString(16))];return o&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function ZA(n,e,t,o,r){var a=[Vr(Math.round(n).toString(16)),Vr(Math.round(e).toString(16)),Vr(Math.round(t).toString(16)),Vr(WA(o))];return r&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function WA(n){return Math.round(parseFloat(n)*255).toString(16)}function Y0(n){return uo(n)/255}function uo(n){return parseInt(n,16)}function zA(n){return{r:n>>16,g:(n&65280)>>8,b:n&255}}var Zh={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ts(n){var e={r:0,g:0,b:0},t=1,o=null,r=null,a=null,l=!1,f=!1;return typeof n=="string"&&(n=YA(n)),typeof n=="object"&&(Ei(n.r)&&Ei(n.g)&&Ei(n.b)?(e=VA(n.r,n.g,n.b),l=!0,f=String(n.r).substr(-1)==="%"?"prgb":"rgb"):Ei(n.h)&&Ei(n.s)&&Ei(n.v)?(o=vu(n.s),r=vu(n.v),e=FA(n.h,o,r),l=!0,f="hsv"):Ei(n.h)&&Ei(n.s)&&Ei(n.l)&&(o=vu(n.s),a=vu(n.l),e=jA(n.h,o,a),l=!0,f="hsl"),Object.prototype.hasOwnProperty.call(n,"a")&&(t=n.a)),t=U0(t),{ok:l,format:n.format||f,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}var UA="[-\\+]?\\d+%?",HA="[-\\+]?\\d*\\.\\d+%?",Gi="(?:".concat(HA,")|(?:").concat(UA,")"),Wh="[\\s|\\(]+(".concat(Gi,")[,|\\s]+(").concat(Gi,")[,|\\s]+(").concat(Gi,")\\s*\\)?"),zh="[\\s|\\(]+(".concat(Gi,")[,|\\s]+(").concat(Gi,")[,|\\s]+(").concat(Gi,")[,|\\s]+(").concat(Gi,")\\s*\\)?"),Fo={CSS_UNIT:new RegExp(Gi),rgb:new RegExp("rgb"+Wh),rgba:new RegExp("rgba"+zh),hsl:new RegExp("hsl"+Wh),hsla:new RegExp("hsla"+zh),hsv:new RegExp("hsv"+Wh),hsva:new RegExp("hsva"+zh),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function YA(n){if(n=n.trim().toLowerCase(),n.length===0)return!1;var e=!1;if(Zh[n])n=Zh[n],e=!0;else if(n==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=Fo.rgb.exec(n);return t?{r:t[1],g:t[2],b:t[3]}:(t=Fo.rgba.exec(n),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Fo.hsl.exec(n),t?{h:t[1],s:t[2],l:t[3]}:(t=Fo.hsla.exec(n),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Fo.hsv.exec(n),t?{h:t[1],s:t[2],v:t[3]}:(t=Fo.hsva.exec(n),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Fo.hex8.exec(n),t?{r:uo(t[1]),g:uo(t[2]),b:uo(t[3]),a:Y0(t[4]),format:e?"name":"hex8"}:(t=Fo.hex6.exec(n),t?{r:uo(t[1]),g:uo(t[2]),b:uo(t[3]),format:e?"name":"hex"}:(t=Fo.hex4.exec(n),t?{r:uo(t[1]+t[1]),g:uo(t[2]+t[2]),b:uo(t[3]+t[3]),a:Y0(t[4]+t[4]),format:e?"name":"hex8"}:(t=Fo.hex3.exec(n),t?{r:uo(t[1]+t[1]),g:uo(t[2]+t[2]),b:uo(t[3]+t[3]),format:e?"name":"hex"}:!1)))))))))}function Ei(n){return!!Fo.CSS_UNIT.exec(String(n))}var xn=function(){function n(e,t){e===void 0&&(e=""),t===void 0&&(t={});var o;if(e instanceof n)return e;typeof e=="number"&&(e=zA(e)),this.originalInput=e;var r=ts(e);this.originalInput=e,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=t.format)!==null&&o!==void 0?o:r.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return n.prototype.isDark=function(){return this.getBrightness()<128},n.prototype.isLight=function(){return!this.isDark()},n.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},n.prototype.getLuminance=function(){var e=this.toRgb(),t,o,r,a=e.r/255,l=e.g/255,f=e.b/255;return a<=.03928?t=a/12.92:t=Math.pow((a+.055)/1.055,2.4),l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),f<=.03928?r=f/12.92:r=Math.pow((f+.055)/1.055,2.4),.2126*t+.7152*o+.0722*r},n.prototype.getAlpha=function(){return this.a},n.prototype.setAlpha=function(e){return this.a=U0(e),this.roundA=Math.round(100*this.a)/100,this},n.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},n.prototype.toHsv=function(){var e=jh(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},n.prototype.toHsvString=function(){var e=jh(this.r,this.g,this.b),t=Math.round(e.h*360),o=Math.round(e.s*100),r=Math.round(e.v*100);return this.a===1?"hsv(".concat(t,", ").concat(o,"%, ").concat(r,"%)"):"hsva(".concat(t,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},n.prototype.toHsl=function(){var e=H0(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},n.prototype.toHslString=function(){var e=H0(this.r,this.g,this.b),t=Math.round(e.h*360),o=Math.round(e.s*100),r=Math.round(e.l*100);return this.a===1?"hsl(".concat(t,", ").concat(o,"%, ").concat(r,"%)"):"hsla(".concat(t,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},n.prototype.toHex=function(e){return e===void 0&&(e=!1),Fh(this.r,this.g,this.b,e)},n.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},n.prototype.toHex8=function(e){return e===void 0&&(e=!1),ZA(this.r,this.g,this.b,this.a,e)},n.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},n.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},n.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},n.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(t,", ").concat(o,")"):"rgba(".concat(e,", ").concat(t,", ").concat(o,", ").concat(this.roundA,")")},n.prototype.toPercentageRgb=function(){var e=function(t){return"".concat(Math.round(bn(t,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},n.prototype.toPercentageRgbString=function(){var e=function(t){return Math.round(bn(t,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},n.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+Fh(this.r,this.g,this.b,!1),t=0,o=Object.entries(Zh);t<o.length;t++){var r=o[t],a=r[0],l=r[1];if(e===l)return a}return!1},n.prototype.toString=function(e){var t=!!e;e=e??this.format;var o=!1,r=this.a<1&&this.a>=0,a=!t&&r&&(e.startsWith("hex")||e==="name");return a?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(o=this.toRgbString()),e==="prgb"&&(o=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(o=this.toHexString()),e==="hex3"&&(o=this.toHexString(!0)),e==="hex4"&&(o=this.toHex8String(!0)),e==="hex8"&&(o=this.toHex8String()),e==="name"&&(o=this.toName()),e==="hsl"&&(o=this.toHslString()),e==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},n.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},n.prototype.clone=function(){return new n(this.toString())},n.prototype.lighten=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.l+=e/100,t.l=Ou(t.l),new n(t)},n.prototype.brighten=function(e){e===void 0&&(e=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),new n(t)},n.prototype.darken=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.l-=e/100,t.l=Ou(t.l),new n(t)},n.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},n.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},n.prototype.desaturate=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.s-=e/100,t.s=Ou(t.s),new n(t)},n.prototype.saturate=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.s+=e/100,t.s=Ou(t.s),new n(t)},n.prototype.greyscale=function(){return this.desaturate(100)},n.prototype.spin=function(e){var t=this.toHsl(),o=(t.h+e)%360;return t.h=o<0?360+o:o,new n(t)},n.prototype.mix=function(e,t){t===void 0&&(t=50);var o=this.toRgb(),r=new n(e).toRgb(),a=t/100,l={r:(r.r-o.r)*a+o.r,g:(r.g-o.g)*a+o.g,b:(r.b-o.b)*a+o.b,a:(r.a-o.a)*a+o.a};return new n(l)},n.prototype.analogous=function(e,t){e===void 0&&(e=6),t===void 0&&(t=30);var o=this.toHsl(),r=360/t,a=[this];for(o.h=(o.h-(r*e>>1)+720)%360;--e;)o.h=(o.h+r)%360,a.push(new n(o));return a},n.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new n(e)},n.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var t=this.toHsv(),o=t.h,r=t.s,a=t.v,l=[],f=1/e;e--;)l.push(new n({h:o,s:r,v:a})),a=(a+f)%1;return l},n.prototype.splitcomplement=function(){var e=this.toHsl(),t=e.h;return[this,new n({h:(t+72)%360,s:e.s,l:e.l}),new n({h:(t+216)%360,s:e.s,l:e.l})]},n.prototype.onBackground=function(e){var t=this.toRgb(),o=new n(e).toRgb(),r=t.a+o.a*(1-t.a);return new n({r:(t.r*t.a+o.r*o.a*(1-t.a))/r,g:(t.g*t.a+o.g*o.a*(1-t.a))/r,b:(t.b*t.a+o.b*o.a*(1-t.a))/r,a:r})},n.prototype.triad=function(){return this.polyad(3)},n.prototype.tetrad=function(){return this.polyad(4)},n.prototype.polyad=function(e){for(var t=this.toHsl(),o=t.h,r=[this],a=360/e,l=1;l<e;l++)r.push(new n({h:(o+l*a)%360,s:t.s,l:t.l}));return r},n.prototype.equals=function(e){return this.toRgbString()===new n(e).toRgbString()},n}(),yu=2,X0=.16,XA=.05,GA=.05,KA=.15,G0=5,K0=4,JA=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function J0(n){var e=n.r,t=n.g,o=n.b,r=jh(e,t,o);return{h:r.h*360,s:r.s,v:r.v}}function bu(n){var e=n.r,t=n.g,o=n.b;return"#".concat(Fh(e,t,o,!1))}function $A(n,e,t){var o=t/100,r={r:(e.r-n.r)*o+n.r,g:(e.g-n.g)*o+n.g,b:(e.b-n.b)*o+n.b};return r}function $0(n,e,t){var o;return Math.round(n.h)>=60&&Math.round(n.h)<=240?o=t?Math.round(n.h)-yu*e:Math.round(n.h)+yu*e:o=t?Math.round(n.h)+yu*e:Math.round(n.h)-yu*e,o<0?o+=360:o>=360&&(o-=360),o}function q0(n,e,t){if(n.h===0&&n.s===0)return n.s;var o;return t?o=n.s-X0*e:e===K0?o=n.s+X0:o=n.s+XA*e,o>1&&(o=1),t&&e===G0&&o>.1&&(o=.1),o<.06&&(o=.06),Number(o.toFixed(2))}function ey(n,e,t){var o;return t?o=n.v+GA*e:o=n.v-KA*e,o>1&&(o=1),Number(o.toFixed(2))}function jr(n){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[],o=ts(n),r=G0;r>0;r-=1){var a=J0(o),l=bu(ts({h:$0(a,r,!0),s:q0(a,r,!0),v:ey(a,r,!0)}));t.push(l)}t.push(bu(o));for(var f=1;f<=K0;f+=1){var h=J0(o),g=bu(ts({h:$0(h,f),s:q0(h,f),v:ey(h,f)}));t.push(g)}return e.theme==="dark"?JA.map(function(O){var v=O.index,b=O.opacity,x=bu($A(ts(e.backgroundColor||"#141414"),ts(t[v]),b*100));return x}):t}var Uh={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},xu={},Hh={};Object.keys(Uh).forEach(function(n){xu[n]=jr(Uh[n]),xu[n].primary=xu[n][5],Hh[n]=jr(Uh[n],{theme:"dark",backgroundColor:"#141414"}),Hh[n].primary=Hh[n][5]});var qA=xu.blue;const eM=n=>{const{controlHeight:e}=n;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function tM(n){const{sizeUnit:e,sizeStep:t}=n;return{sizeXXL:e*(t+8),sizeXL:e*(t+4),sizeLG:e*(t+2),sizeMD:e*(t+1),sizeMS:e*t,size:e*t,sizeSM:e*(t-1),sizeXS:e*(t-2),sizeXXS:e*(t-3)}}const ty={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},wu=q(q({},ty),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
177
|
-
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
178
|
-
'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function nM(n,e){let{generateColorPalettes:t,generateNeutralColorPalettes:o}=e;const{colorSuccess:r,colorWarning:a,colorError:l,colorInfo:f,colorPrimary:h,colorBgBase:g,colorTextBase:O}=n,v=t(h),b=t(r),x=t(a),C=t(l),k=t(f),L=o(g,O);return q(q({},L),{colorPrimaryBg:v[1],colorPrimaryBgHover:v[2],colorPrimaryBorder:v[3],colorPrimaryBorderHover:v[4],colorPrimaryHover:v[5],colorPrimary:v[6],colorPrimaryActive:v[7],colorPrimaryTextHover:v[8],colorPrimaryText:v[9],colorPrimaryTextActive:v[10],colorSuccessBg:b[1],colorSuccessBgHover:b[2],colorSuccessBorder:b[3],colorSuccessBorderHover:b[4],colorSuccessHover:b[4],colorSuccess:b[6],colorSuccessActive:b[7],colorSuccessTextHover:b[8],colorSuccessText:b[9],colorSuccessTextActive:b[10],colorErrorBg:C[1],colorErrorBgHover:C[2],colorErrorBorder:C[3],colorErrorBorderHover:C[4],colorErrorHover:C[5],colorError:C[6],colorErrorActive:C[7],colorErrorTextHover:C[8],colorErrorText:C[9],colorErrorTextActive:C[10],colorWarningBg:x[1],colorWarningBgHover:x[2],colorWarningBorder:x[3],colorWarningBorderHover:x[4],colorWarningHover:x[4],colorWarning:x[6],colorWarningActive:x[7],colorWarningTextHover:x[8],colorWarningText:x[9],colorWarningTextActive:x[10],colorInfoBg:k[1],colorInfoBgHover:k[2],colorInfoBorder:k[3],colorInfoBorderHover:k[4],colorInfoHover:k[4],colorInfo:k[6],colorInfoActive:k[7],colorInfoTextHover:k[8],colorInfoText:k[9],colorInfoTextActive:k[10],colorBgMask:new xn("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const oM=n=>{let e=n,t=n,o=n,r=n;return n<6&&n>=5?e=n+1:n<16&&n>=6?e=n+2:n>=16&&(e=16),n<7&&n>=5?t=4:n<8&&n>=7?t=5:n<14&&n>=8?t=6:n<16&&n>=14?t=7:n>=16&&(t=8),n<6&&n>=2?o=1:n>=6&&(o=2),n>4&&n<8?r=4:n>=8&&(r=6),{borderRadius:n>16?16:n,borderRadiusXS:o,borderRadiusSM:t,borderRadiusLG:e,borderRadiusOuter:r}};function iM(n){const{motionUnit:e,motionBase:t,borderRadius:o,lineWidth:r}=n;return q({motionDurationFast:`${(t+e).toFixed(1)}s`,motionDurationMid:`${(t+e*2).toFixed(1)}s`,motionDurationSlow:`${(t+e*3).toFixed(1)}s`,lineWidthBold:r+1},oM(o))}const Ti=(n,e)=>new xn(n).setAlpha(e).toRgbString(),bl=(n,e)=>new xn(n).darken(e).toHexString(),rM=n=>{const e=jr(n);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},aM=(n,e)=>{const t=n||"#fff",o=e||"#000";return{colorBgBase:t,colorTextBase:o,colorText:Ti(o,.88),colorTextSecondary:Ti(o,.65),colorTextTertiary:Ti(o,.45),colorTextQuaternary:Ti(o,.25),colorFill:Ti(o,.15),colorFillSecondary:Ti(o,.06),colorFillTertiary:Ti(o,.04),colorFillQuaternary:Ti(o,.02),colorBgLayout:bl(t,4),colorBgContainer:bl(t,0),colorBgElevated:bl(t,0),colorBgSpotlight:Ti(o,.85),colorBorder:bl(t,15),colorBorderSecondary:bl(t,6)}};function sM(n){const e=new Array(10).fill(null).map((t,o)=>{const r=o-1,a=n*Math.pow(2.71828,r/5),l=o>1?Math.floor(a):Math.ceil(a);return Math.floor(l/2)*2});return e[1]=n,e.map(t=>{const o=t+8;return{size:t,lineHeight:o/t}})}const lM=n=>{const e=sM(n),t=e.map(r=>r.size),o=e.map(r=>r.lineHeight);return{fontSizeSM:t[0],fontSize:t[1],fontSizeLG:t[2],fontSizeXL:t[3],fontSizeHeading1:t[6],fontSizeHeading2:t[5],fontSizeHeading3:t[4],fontSizeHeading4:t[3],fontSizeHeading5:t[2],lineHeight:o[1],lineHeightLG:o[2],lineHeightSM:o[0],lineHeightHeading1:o[6],lineHeightHeading2:o[5],lineHeightHeading3:o[4],lineHeightHeading4:o[3],lineHeightHeading5:o[2]}};function cM(n){const e=Object.keys(ty).map(t=>{const o=jr(n[t]);return new Array(10).fill(1).reduce((r,a,l)=>(r[`${t}-${l+1}`]=o[l],r),{})}).reduce((t,o)=>(t=q(q({},t),o),t),{});return q(q(q(q(q(q(q({},n),e),nM(n,{generateColorPalettes:rM,generateNeutralColorPalettes:aM})),lM(n.fontSize)),tM(n)),eM(n)),iM(n))}function Yh(n){return n>=0&&n<=255}function Su(n,e){const{r:t,g:o,b:r,a}=new xn(n).toRgb();if(a<1)return n;const{r:l,g:f,b:h}=new xn(e).toRgb();for(let g=.01;g<=1;g+=.01){const O=Math.round((t-l*(1-g))/g),v=Math.round((o-f*(1-g))/g),b=Math.round((r-h*(1-g))/g);if(Yh(O)&&Yh(v)&&Yh(b))return new xn({r:O,g:v,b,a:Math.round(g*100)/100}).toRgbString()}return new xn({r:t,g:o,b:r,a:1}).toRgbString()}var uM=function(n,e){var t={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(t[o[r]]=n[o[r]]);return t};function dM(n){const{override:e}=n,t=uM(n,["override"]),o=q({},e);Object.keys(wu).forEach(x=>{delete o[x]});const r=q(q({},t),o),a=480,l=576,f=768,h=992,g=1200,O=1600,v=2e3;return q(q(q({},r),{colorLink:r.colorInfoText,colorLinkHover:r.colorInfoHover,colorLinkActive:r.colorInfoActive,colorFillContent:r.colorFillSecondary,colorFillContentHover:r.colorFill,colorFillAlter:r.colorFillQuaternary,colorBgContainerDisabled:r.colorFillTertiary,colorBorderBg:r.colorBgContainer,colorSplit:Su(r.colorBorderSecondary,r.colorBgContainer),colorTextPlaceholder:r.colorTextQuaternary,colorTextDisabled:r.colorTextQuaternary,colorTextHeading:r.colorText,colorTextLabel:r.colorTextSecondary,colorTextDescription:r.colorTextTertiary,colorTextLightSolid:r.colorWhite,colorHighlight:r.colorError,colorBgTextHover:r.colorFillSecondary,colorBgTextActive:r.colorFill,colorIcon:r.colorTextTertiary,colorIconHover:r.colorText,colorErrorOutline:Su(r.colorErrorBg,r.colorBgContainer),colorWarningOutline:Su(r.colorWarningBg,r.colorBgContainer),fontSizeIcon:r.fontSizeSM,lineWidth:r.lineWidth,controlOutlineWidth:r.lineWidth*2,controlInteractiveSize:r.controlHeight/2,controlItemBgHover:r.colorFillTertiary,controlItemBgActive:r.colorPrimaryBg,controlItemBgActiveHover:r.colorPrimaryBgHover,controlItemBgActiveDisabled:r.colorFill,controlTmpOutline:r.colorFillQuaternary,controlOutline:Su(r.colorPrimaryBg,r.colorBgContainer),lineType:r.lineType,borderRadius:r.borderRadius,borderRadiusXS:r.borderRadiusXS,borderRadiusSM:r.borderRadiusSM,borderRadiusLG:r.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:r.sizeXXS,paddingXS:r.sizeXS,paddingSM:r.sizeSM,padding:r.size,paddingMD:r.sizeMD,paddingLG:r.sizeLG,paddingXL:r.sizeXL,paddingContentHorizontalLG:r.sizeLG,paddingContentVerticalLG:r.sizeMS,paddingContentHorizontal:r.sizeMS,paddingContentVertical:r.sizeSM,paddingContentHorizontalSM:r.size,paddingContentVerticalSM:r.sizeXS,marginXXS:r.sizeXXS,marginXS:r.sizeXS,marginSM:r.sizeSM,margin:r.size,marginMD:r.sizeMD,marginLG:r.sizeLG,marginXL:r.sizeXL,marginXXL:r.sizeXXL,boxShadow:`
|
|
179
|
-
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
180
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
181
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
182
|
-
`,boxShadowSecondary:`
|
|
183
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
184
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
185
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
186
|
-
`,boxShadowTertiary:`
|
|
187
|
-
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
188
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
189
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
190
|
-
`,screenXS:a,screenXSMin:a,screenXSMax:l-1,screenSM:l,screenSMMin:l,screenSMMax:f-1,screenMD:f,screenMDMin:f,screenMDMax:h-1,screenLG:h,screenLGMin:h,screenLGMax:g-1,screenXL:g,screenXLMin:g,screenXLMax:O-1,screenXXL:O,screenXXLMin:O,screenXXLMax:v-1,screenXXXL:v,screenXXXLMin:v,boxShadowPopoverArrow:"3px 3px 7px rgba(0, 0, 0, 0.1)",boxShadowCard:`
|
|
191
|
-
0 1px 2px -2px ${new xn("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
192
|
-
0 3px 6px 0 ${new xn("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
193
|
-
0 5px 12px 4px ${new xn("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
194
|
-
`,boxShadowDrawerRight:`
|
|
195
|
-
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
196
|
-
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
197
|
-
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
198
|
-
`,boxShadowDrawerLeft:`
|
|
199
|
-
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
200
|
-
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
201
|
-
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
202
|
-
`,boxShadowDrawerUp:`
|
|
203
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
204
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
205
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
206
|
-
`,boxShadowDrawerDown:`
|
|
207
|
-
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
208
|
-
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
209
|
-
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
210
|
-
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),o)}const Xh=n=>({boxSizing:"border-box",margin:0,padding:0,color:n.colorText,fontSize:n.fontSize,lineHeight:n.lineHeight,listStyle:"none",fontFamily:n.fontFamily}),fM=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),hM=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),pM=n=>({a:{color:n.colorLink,textDecoration:n.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${n.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:n.colorLinkHover},"&:active":{color:n.colorLinkActive},"&:active,\n &:hover":{textDecoration:n.linkHoverDecoration,outline:0},"&:focus":{textDecoration:n.linkFocusDecoration,outline:0},"&[disabled]":{color:n.colorTextDisabled,cursor:"not-allowed"}}}),mM=(n,e)=>{const{fontFamily:t,fontSize:o}=n,r=`[class^="${e}"], [class*=" ${e}"]`;return{[r]:{fontFamily:t,fontSize:o,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[r]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},gM=n=>({outline:`${n.lineWidthBold}px solid ${n.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),ny=n=>({"&:focus-visible":q({},gM(n))});function Fr(n,e,t){return o=>{const r=u.computed(()=>o?.value),[a,l,f]=xl(),{getPrefixCls:h,iconPrefixCls:g}=au(),O=u.computed(()=>h()),v=u.computed(()=>({theme:a.value,token:l.value,hashId:f.value,path:["Shared",O.value]}));Lh(v,()=>[{"&":pM(l.value)}]);const b=u.computed(()=>({theme:a.value,token:l.value,hashId:f.value,path:[n,r.value,g.value]}));return[Lh(b,()=>{const{token:x,flush:C}=vM(l.value),k=typeof t=="function"?t(x):t,L=q(q({},k),l.value[n]),A=`.${r.value}`,E=Ki(x,{componentCls:A,prefixCls:r.value,iconCls:`.${g.value}`,antCls:`.${O.value}`},L),F=e(E,{hashId:f.value,prefixCls:r.value,rootPrefixCls:O.value,iconPrefixCls:g.value,overrideComponentToken:l.value[n]});return C(n,L),[mM(l.value,r.value),F]}),f]}}const oy=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let Gh=!0;function Ki(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];if(!oy)return q({},...e);Gh=!1;const o={};return e.forEach(r=>{Object.keys(r).forEach(l=>{Object.defineProperty(o,l,{configurable:!0,enumerable:!0,get:()=>r[l]})})}),Gh=!0,o}function OM(){}function vM(n){let e,t=n,o=OM;return oy&&(e=new Set,t=new Proxy(n,{get(r,a){return Gh&&e.add(a),r[a]}}),o=(r,a)=>{Array.from(e)}),{token:t,keys:e,flush:o}}const yM=P0(cM),iy={token:wu,hashed:!0},ry=Symbol("DesignTokenContext"),Kh=u.shallowRef(),bM=n=>{u.provide(ry,n),u.watch(n,()=>{Kh.value=u.unref(n),u.triggerRef(Kh)},{immediate:!0,deep:!0})},xM=u.defineComponent({props:{value:$t()},setup(n,e){let{slots:t}=e;return bM(u.computed(()=>n.value)),()=>{var o;return(o=t.default)===null||o===void 0?void 0:o.call(t)}}});function xl(){const n=u.inject(ry,u.computed(()=>Kh.value||iy)),e=u.computed(()=>`${DA}-${n.value.hashed||""}`),t=u.computed(()=>n.value.theme||yM),o=cA(t,u.computed(()=>[wu,n.value.token]),u.computed(()=>({salt:e.value,override:q({override:n.value.token},n.value.components),formatToken:dM})));return[t,u.computed(()=>o.value[0]),u.computed(()=>n.value.hashed?o.value[1]:"")]}const ay=u.defineComponent({compatConfig:{MODE:3},setup(){const[,n]=xl(),e=u.computed(()=>new xn(n.value.colorBgBase).toHsl().l<.5?{opacity:.65}:{});return()=>u.createVNode("svg",{style:e.value,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},[u.createVNode("g",{fill:"none","fill-rule":"evenodd"},[u.createVNode("g",{transform:"translate(24 31.67)"},[u.createVNode("ellipse",{"fill-opacity":".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"},null),u.createVNode("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"},null),u.createVNode("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"},null),u.createVNode("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"},null),u.createVNode("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"},null)]),u.createVNode("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"},null),u.createVNode("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},[u.createVNode("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"},null),u.createVNode("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"},null)])])])}});ay.PRESENTED_IMAGE_DEFAULT=!0;const sy=u.defineComponent({compatConfig:{MODE:3},setup(){const[,n]=xl(),e=u.computed(()=>{const{colorFill:t,colorFillTertiary:o,colorFillQuaternary:r,colorBgContainer:a}=n.value;return{borderColor:new xn(t).onBackground(a).toHexString(),shadowColor:new xn(o).onBackground(a).toHexString(),contentColor:new xn(r).onBackground(a).toHexString()}});return()=>u.createVNode("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[u.createVNode("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd"},[u.createVNode("ellipse",{fill:e.value.shadowColor,cx:"32",cy:"33",rx:"32",ry:"7"},null),u.createVNode("g",{"fill-rule":"nonzero",stroke:e.value.borderColor},[u.createVNode("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"},null),u.createVNode("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:e.value.contentColor},null)])])])}});sy.PRESENTED_IMAGE_SIMPLE=!0;const wM=n=>{const{componentCls:e,margin:t,marginXS:o,marginXL:r,fontSize:a,lineHeight:l}=n;return{[e]:{marginInline:o,fontSize:a,lineHeight:l,textAlign:"center",[`${e}-image`]:{height:n.emptyImgHeight,marginBottom:o,opacity:n.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[`${e}-footer`]:{marginTop:t},"&-normal":{marginBlock:r,color:n.colorTextDisabled,[`${e}-image`]:{height:n.emptyImgHeightMD}},"&-small":{marginBlock:o,color:n.colorTextDisabled,[`${e}-image`]:{height:n.emptyImgHeightSM}}}}},SM=Fr("Empty",n=>{const{componentCls:e,controlHeightLG:t}=n,o=Ki(n,{emptyImgCls:`${e}-img`,emptyImgHeight:t*2.5,emptyImgHeightMD:t,emptyImgHeightSM:t*.875});return[wM(o)]});var CM=function(n,e){var t={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(t[o[r]]=n[o[r]]);return t};const ly=u.createVNode(ay,null,null),cy=u.createVNode(sy,null,null),kM=()=>({prefixCls:String,imageStyle:$t(),image:yh(),description:yh()}),Jh=u.defineComponent({name:"AEmpty",compatConfig:{MODE:3},inheritAttrs:!1,props:kM(),setup(n,e){let{slots:t={},attrs:o}=e;const{direction:r,prefixCls:a}=ri("empty",n),[l,f]=SM(a);return()=>{var h,g;const O=a.value,v=q(q({},n),o),{image:b=((h=t.image)===null||h===void 0?void 0:h.call(t))||ly,description:x=((g=t.description)===null||g===void 0?void 0:g.call(t))||void 0,imageStyle:C,class:k=""}=v,L=CM(v,["image","description","imageStyle","class"]);return l(u.createVNode(f0,{componentName:"Empty",children:A=>{const E=typeof x<"u"?x:A.description,F=typeof E=="string"?E:"empty";let B=null;return typeof b=="string"?B=u.createVNode("img",{alt:F,src:b},null):B=b,u.createVNode("div",Ke({class:Bt(O,k,f.value,{[`${O}-normal`]:b===cy,[`${O}-rtl`]:r.value==="rtl"})},L),[u.createVNode("div",{class:`${O}-image`,style:C},[B]),E&&u.createVNode("p",{class:`${O}-description`},[E]),t.default&&u.createVNode("div",{class:`${O}-footer`},[e0(t.default())])])}},null))}}});Jh.PRESENTED_IMAGE_DEFAULT=ly,Jh.PRESENTED_IMAGE_SIMPLE=cy;const wl=vh(Jh),uy=n=>{const{prefixCls:e}=ri("empty",n);return(o=>{switch(o){case"Table":case"List":return u.createVNode(wl,{image:wl.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return u.createVNode(wl,{image:wl.PRESENTED_IMAGE_SIMPLE,class:`${e.value}-small`},null);default:return u.createVNode(wl,null,null)}})(n.componentName)};function PM(n){return u.createVNode(uy,{componentName:n},null)}const dy=Symbol("SizeContextKey"),fy=()=>u.inject(dy,u.ref(void 0)),_M=n=>{const e=fy();return u.provide(dy,u.computed(()=>n.value||e.value)),n},ri=(n,e)=>{const t=fy(),o=wh(),r=u.inject(xh,q(q({},l0),{renderEmpty:V=>u.h(uy,{componentName:V})})),a=u.computed(()=>r.getPrefixCls(n,e.prefixCls)),l=u.computed(()=>{var V,j;return(V=e.direction)!==null&&V!==void 0?V:(j=r.direction)===null||j===void 0?void 0:j.value}),f=u.computed(()=>{var V;return(V=e.iconPrefixCls)!==null&&V!==void 0?V:r.iconPrefixCls.value}),h=u.computed(()=>r.getPrefixCls()),g=u.computed(()=>{var V;return(V=r.autoInsertSpaceInButton)===null||V===void 0?void 0:V.value}),O=r.renderEmpty,v=r.space,b=r.pageHeader,x=r.form,C=u.computed(()=>{var V,j;return(V=e.getTargetContainer)!==null&&V!==void 0?V:(j=r.getTargetContainer)===null||j===void 0?void 0:j.value}),k=u.computed(()=>{var V,j,R;return(j=(V=e.getContainer)!==null&&V!==void 0?V:e.getPopupContainer)!==null&&j!==void 0?j:(R=r.getPopupContainer)===null||R===void 0?void 0:R.value}),L=u.computed(()=>{var V,j;return(V=e.dropdownMatchSelectWidth)!==null&&V!==void 0?V:(j=r.dropdownMatchSelectWidth)===null||j===void 0?void 0:j.value}),A=u.computed(()=>{var V;return(e.virtual===void 0?((V=r.virtual)===null||V===void 0?void 0:V.value)!==!1:e.virtual!==!1)&&L.value!==!1}),E=u.computed(()=>e.size||t.value),F=u.computed(()=>{var V,j,R;return(V=e.autocomplete)!==null&&V!==void 0?V:(R=(j=r.input)===null||j===void 0?void 0:j.value)===null||R===void 0?void 0:R.autocomplete}),B=u.computed(()=>{var V;return(V=e.disabled)!==null&&V!==void 0?V:o.value}),I=u.computed(()=>{var V;return(V=e.csp)!==null&&V!==void 0?V:r.csp}),K=u.computed(()=>{var V,j;return(V=e.wave)!==null&&V!==void 0?V:(j=r.wave)===null||j===void 0?void 0:j.value});return{configProvider:r,prefixCls:a,direction:l,size:E,getTargetContainer:C,getPopupContainer:k,space:v,pageHeader:b,form:x,autoInsertSpaceInButton:g,renderEmpty:O,virtual:A,dropdownMatchSelectWidth:L,rootPrefixCls:h,getPrefixCls:r.getPrefixCls,autocomplete:F,csp:I,iconPrefixCls:f,disabled:B,select:r.select,wave:K}};function hy(n,e){const t=q({},n);for(let o=0;o<e.length;o+=1){const r=e[o];delete t[r]}return t}function EM(n,e){for(var t=0;t<e.length;t++){var o=e[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}function py(n,e,t){return t&&EM(n,t),n}function Cu(){return(Cu=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n}).apply(this,arguments)}function my(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}function gy(n,e){if(n==null)return{};var t,o,r={},a=Object.keys(n);for(o=0;o<a.length;o++)e.indexOf(t=a[o])>=0||(r[t]=n[t]);return r}function Oy(n){return((e=n)!=null&&typeof e=="object"&&Array.isArray(e)===!1)==1&&Object.prototype.toString.call(n)==="[object Object]";var e}var vy=Object.prototype,yy=vy.toString,TM=vy.hasOwnProperty,by=/^\s*function (\w+)/;function xy(n){var e,t=(e=n?.type)!==null&&e!==void 0?e:n;if(t){var o=t.toString().match(by);return o?o[1]:""}return""}var Zr=function(n){var e,t;return Oy(n)!==!1&&typeof(e=n.constructor)=="function"&&Oy(t=e.prototype)!==!1&&t.hasOwnProperty("isPrototypeOf")!==!1},wy=function(n){return n},In=wy;if(process.env.NODE_ENV!=="production"){var NM=typeof console<"u";In=NM?function(n){console.warn("[VueTypes warn]: "+n)}:wy}var Sl=function(n,e){return TM.call(n,e)},AM=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n},ns=Array.isArray||function(n){return yy.call(n)==="[object Array]"},os=function(n){return yy.call(n)==="[object Function]"},ku=function(n){return Zr(n)&&Sl(n,"_vueTypes_name")},Sy=function(n){return Zr(n)&&(Sl(n,"type")||["_vueTypes_name","validator","default","required"].some(function(e){return Sl(n,e)}))};function $h(n,e){return Object.defineProperty(n.bind(e),"__original",{value:n})}function Wr(n,e,t){var o;t===void 0&&(t=!1);var r=!0,a="";o=Zr(n)?n:{type:n};var l=ku(o)?o._vueTypes_name+" - ":"";if(Sy(o)&&o.type!==null){if(o.type===void 0||o.type===!0||!o.required&&e===void 0)return r;ns(o.type)?(r=o.type.some(function(v){return Wr(v,e,!0)===!0}),a=o.type.map(function(v){return xy(v)}).join(" or ")):r=(a=xy(o))==="Array"?ns(e):a==="Object"?Zr(e):a==="String"||a==="Number"||a==="Boolean"||a==="Function"?function(v){if(v==null)return"";var b=v.constructor.toString().match(by);return b?b[1]:""}(e)===a:e instanceof o.type}if(!r){var f=l+'value "'+e+'" should be of type "'+a+'"';return t===!1?(In(f),!1):f}if(Sl(o,"validator")&&os(o.validator)){var h=In,g=[];if(In=function(v){g.push(v)},r=o.validator(e),In=h,!r){var O=(g.length>1?"* ":"")+g.join(`
|
|
211
|
-
* `);return g.length=0,t===!1?(In(O),r):O}}return r}function fo(n,e){var t=Object.defineProperties(e,{_vueTypes_name:{value:n,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(r){return r!==void 0||this.default?os(r)||Wr(this,r,!0)===!0?(this.default=ns(r)?function(){return[].concat(r)}:Zr(r)?function(){return Object.assign({},r)}:r,this):(In(this._vueTypes_name+' - invalid default value: "'+r+'"'),this):this}}}),o=t.validator;return os(o)&&(t.validator=$h(o,t)),t}function ai(n,e){var t=fo(n,e);return Object.defineProperty(t,"validate",{value:function(o){return os(this.validator)&&In(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info:
|
|
212
|
-
`+JSON.stringify(this)),this.validator=$h(o,this),this}})}function Cy(n,e,t){var o,r,a=(o=e,r={},Object.getOwnPropertyNames(o).forEach(function(v){r[v]=Object.getOwnPropertyDescriptor(o,v)}),Object.defineProperties({},r));if(a._vueTypes_name=n,!Zr(t))return a;var l,f,h=t.validator,g=gy(t,["validator"]);if(os(h)){var O=a.validator;O&&(O=(f=(l=O).__original)!==null&&f!==void 0?f:l),a.validator=$h(O?function(v){return O.call(this,v)&&h.call(this,v)}:h,a)}return Object.assign(a,g)}function Pu(n){return n.replace(/^(?!\s*$)/gm," ")}var MM=function(){return ai("any",{})},RM=function(){return ai("function",{type:Function})},IM=function(){return ai("boolean",{type:Boolean})},QM=function(){return ai("string",{type:String})},DM=function(){return ai("number",{type:Number})},BM=function(){return ai("array",{type:Array})},LM=function(){return ai("object",{type:Object})},VM=function(){return fo("integer",{type:Number,validator:function(n){return AM(n)}})},jM=function(){return fo("symbol",{validator:function(n){return typeof n=="symbol"}})};function FM(n,e){if(e===void 0&&(e="custom validation failed"),typeof n!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return fo(n.name||"<<anonymous function>>",{validator:function(t){var o=n(t);return o||In(this._vueTypes_name+" - "+e),o}})}function ZM(n){if(!ns(n))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var e='oneOf - value should be one of "'+n.join('", "')+'".',t=n.reduce(function(o,r){if(r!=null){var a=r.constructor;o.indexOf(a)===-1&&o.push(a)}return o},[]);return fo("oneOf",{type:t.length>0?t:void 0,validator:function(o){var r=n.indexOf(o)!==-1;return r||In(e),r}})}function WM(n){if(!ns(n))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var e=!1,t=[],o=0;o<n.length;o+=1){var r=n[o];if(Sy(r)){if(ku(r)&&r._vueTypes_name==="oneOf"){t=t.concat(r.type);continue}if(os(r.validator)&&(e=!0),r.type!==!0&&r.type){t=t.concat(r.type);continue}}t.push(r)}return t=t.filter(function(a,l){return t.indexOf(a)===l}),fo("oneOfType",e?{type:t,validator:function(a){var l=[],f=n.some(function(h){var g=Wr(ku(h)&&h._vueTypes_name==="oneOf"?h.type||null:h,a,!0);return typeof g=="string"&&l.push(g),g===!0});return f||In("oneOfType - provided value does not match any of the "+l.length+` passed-in validators:
|
|
213
|
-
`+Pu(l.join(`
|
|
214
|
-
`))),f}}:{type:t})}function zM(n){return fo("arrayOf",{type:Array,validator:function(e){var t,o=e.every(function(r){return(t=Wr(n,r,!0))===!0});return o||In(`arrayOf - value validation error:
|
|
215
|
-
`+Pu(t)),o}})}function UM(n){return fo("instanceOf",{type:n})}function HM(n){return fo("objectOf",{type:Object,validator:function(e){var t,o=Object.keys(e).every(function(r){return(t=Wr(n,e[r],!0))===!0});return o||In(`objectOf - value validation error:
|
|
216
|
-
`+Pu(t)),o}})}function YM(n){var e=Object.keys(n),t=e.filter(function(r){var a;return!!(!((a=n[r])===null||a===void 0)&&a.required)}),o=fo("shape",{type:Object,validator:function(r){var a=this;if(!Zr(r))return!1;var l=Object.keys(r);if(t.length>0&&t.some(function(h){return l.indexOf(h)===-1})){var f=t.filter(function(h){return l.indexOf(h)===-1});return In(f.length===1?'shape - required property "'+f[0]+'" is not defined.':'shape - required properties "'+f.join('", "')+'" are not defined.'),!1}return l.every(function(h){if(e.indexOf(h)===-1)return a._vueTypes_isLoose===!0||(In('shape - shape definition does not include a "'+h+'" property. Allowed keys: "'+e.join('", "')+'".'),!1);var g=Wr(n[h],r[h],!0);return typeof g=="string"&&In('shape - "'+h+`" property validation error:
|
|
217
|
-
`+Pu(g)),g===!0})}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),o}var si=function(){function n(){}return n.extend=function(e){var t=this;if(ns(e))return e.forEach(function(v){return t.extend(v)}),this;var o=e.name,r=e.validate,a=r!==void 0&&r,l=e.getter,f=l!==void 0&&l,h=gy(e,["name","validate","getter"]);if(Sl(this,o))throw new TypeError('[VueTypes error]: Type "'+o+'" already defined');var g,O=h.type;return ku(O)?(delete h.type,Object.defineProperty(this,o,f?{get:function(){return Cy(o,O,h)}}:{value:function(){var v,b=Cy(o,O,h);return b.validator&&(b.validator=(v=b.validator).bind.apply(v,[b].concat([].slice.call(arguments)))),b}})):(g=f?{get:function(){var v=Object.assign({},h);return a?ai(o,v):fo(o,v)},enumerable:!0}:{value:function(){var v,b,x=Object.assign({},h);return v=a?ai(o,x):fo(o,x),x.validator&&(v.validator=(b=x.validator).bind.apply(b,[v].concat([].slice.call(arguments)))),v},enumerable:!0},Object.defineProperty(this,o,g))},py(n,null,[{key:"any",get:function(){return MM()}},{key:"func",get:function(){return RM().def(this.defaults.func)}},{key:"bool",get:function(){return IM().def(this.defaults.bool)}},{key:"string",get:function(){return QM().def(this.defaults.string)}},{key:"number",get:function(){return DM().def(this.defaults.number)}},{key:"array",get:function(){return BM().def(this.defaults.array)}},{key:"object",get:function(){return LM().def(this.defaults.object)}},{key:"integer",get:function(){return VM().def(this.defaults.integer)}},{key:"symbol",get:function(){return jM()}}]),n}();function ky(n){var e;return n===void 0&&(n={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(e=function(t){function o(){return t.apply(this,arguments)||this}return my(o,t),py(o,null,[{key:"sensibleDefaults",get:function(){return Cu({},this.defaults)},set:function(r){this.defaults=r!==!1?Cu({},r!==!0?r:n):{}}}]),o}(si)).defaults=Cu({},n),e}si.defaults={},si.custom=FM,si.oneOf=ZM,si.instanceOf=UM,si.oneOfType=WM,si.arrayOf=zM,si.objectOf=HM,si.shape=YM,si.utils={validate:function(n,e){return Wr(e,n,!0)===!0},toType:function(n,e,t){return t===void 0&&(t=!1),t?ai(n,e):fo(n,e)}},function(n){function e(){return n.apply(this,arguments)||this}return my(e,n),e}(ky());const Lt=ky({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});Lt.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);const Py=(n,e,t)=>{Eh(n,`[ant-design-vue: ${e}] ${t}`)};function XM(n){let{prefixCls:e,animation:t,transitionName:o}=n;return t?{name:`${e}-${t}`}:o?{name:o}:{}}function GM(n,e,t){u.render(u.cloneVNode(n,q({},e)),t)}const KM=n=>{if(!n)return!1;if(n.offsetParent)return!0;if(n.getBBox){const e=n.getBBox();if(e.width||e.height)return!0}if(n.getBoundingClientRect){const e=n.getBoundingClientRect();if(e.width||e.height)return!0}return!1};var _y=typeof global=="object"&&global&&global.Object===Object&&global,JM=typeof self=="object"&&self&&self.Object===Object&&self,Ji=_y||JM||Function("return this")(),_u=Ji.Symbol,Ey=Object.prototype,$M=Ey.hasOwnProperty,qM=Ey.toString,Cl=_u?_u.toStringTag:void 0;function e4(n){var e=$M.call(n,Cl),t=n[Cl];try{n[Cl]=void 0;var o=!0}catch{}var r=qM.call(n);return o&&(e?n[Cl]=t:delete n[Cl]),r}var t4=Object.prototype,n4=t4.toString;function o4(n){return n4.call(n)}var i4="[object Null]",r4="[object Undefined]",Ty=_u?_u.toStringTag:void 0;function kl(n){return n==null?n===void 0?r4:i4:Ty&&Ty in Object(n)?e4(n):o4(n)}function Ny(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var a4="[object AsyncFunction]",s4="[object Function]",l4="[object GeneratorFunction]",c4="[object Proxy]";function Ay(n){if(!Ny(n))return!1;var e=kl(n);return e==s4||e==l4||e==a4||e==c4}var qh=Ji["__core-js_shared__"],My=function(){var n=/[^.]+$/.exec(qh&&qh.keys&&qh.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function u4(n){return!!My&&My in n}var d4=Function.prototype,f4=d4.toString;function zr(n){if(n!=null){try{return f4.call(n)}catch{}try{return n+""}catch{}}return""}var h4=/[\\^$.*+?()[\]{}|]/g,p4=/^\[object .+?Constructor\]$/,m4=Function.prototype,g4=Object.prototype,O4=m4.toString,v4=g4.hasOwnProperty,y4=RegExp("^"+O4.call(v4).replace(h4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function b4(n){if(!Ny(n)||u4(n))return!1;var e=Ay(n)?y4:p4;return e.test(zr(n))}function x4(n,e){return n?.[e]}function Pl(n,e){var t=x4(n,e);return b4(t)?t:void 0}var ep=Pl(Ji,"Map"),w4=Array.isArray;function tp(n){return n!=null&&typeof n=="object"}var S4="[object Arguments]";function Ry(n){return tp(n)&&kl(n)==S4}var Iy=Object.prototype,C4=Iy.hasOwnProperty,k4=Iy.propertyIsEnumerable,P4=Ry(function(){return arguments}())?Ry:function(n){return tp(n)&&C4.call(n,"callee")&&!k4.call(n,"callee")};function _4(){return!1}var Qy=typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,Dy=Qy&&typeof module=="object"&&module&&!module.nodeType&&module,E4=Dy&&Dy.exports===Qy,By=E4?Ji.Buffer:void 0,T4=By?By.isBuffer:void 0,N4=T4||_4,A4=9007199254740991;function Ly(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=A4}var M4="[object Arguments]",R4="[object Array]",I4="[object Boolean]",Q4="[object Date]",D4="[object Error]",B4="[object Function]",L4="[object Map]",V4="[object Number]",j4="[object Object]",F4="[object RegExp]",Z4="[object Set]",W4="[object String]",z4="[object WeakMap]",U4="[object ArrayBuffer]",H4="[object DataView]",Y4="[object Float32Array]",X4="[object Float64Array]",G4="[object Int8Array]",K4="[object Int16Array]",J4="[object Int32Array]",$4="[object Uint8Array]",q4="[object Uint8ClampedArray]",eR="[object Uint16Array]",tR="[object Uint32Array]",Nt={};Nt[Y4]=Nt[X4]=Nt[G4]=Nt[K4]=Nt[J4]=Nt[$4]=Nt[q4]=Nt[eR]=Nt[tR]=!0,Nt[M4]=Nt[R4]=Nt[U4]=Nt[I4]=Nt[H4]=Nt[Q4]=Nt[D4]=Nt[B4]=Nt[L4]=Nt[V4]=Nt[j4]=Nt[F4]=Nt[Z4]=Nt[W4]=Nt[z4]=!1;function nR(n){return tp(n)&&Ly(n.length)&&!!Nt[kl(n)]}function oR(n){return function(e){return n(e)}}var Vy=typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,_l=Vy&&typeof module=="object"&&module&&!module.nodeType&&module,iR=_l&&_l.exports===Vy,np=iR&&_y.process,jy=function(){try{var n=_l&&_l.require&&_l.require("util").types;return n||np&&np.binding&&np.binding("util")}catch{}}(),Fy=jy&&jy.isTypedArray,rR=Fy?oR(Fy):nR,aR=Object.prototype;function Zy(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||aR;return n===t}function sR(n,e){return function(t){return n(e(t))}}var lR=sR(Object.keys,Object),cR=Object.prototype,uR=cR.hasOwnProperty;function dR(n){if(!Zy(n))return lR(n);var e=[];for(var t in Object(n))uR.call(n,t)&&t!="constructor"&&e.push(t);return e}function fR(n){return n!=null&&Ly(n.length)&&!Ay(n)}var op=Pl(Ji,"DataView"),ip=Pl(Ji,"Promise"),rp=Pl(Ji,"Set"),ap=Pl(Ji,"WeakMap"),Wy="[object Map]",hR="[object Object]",zy="[object Promise]",Uy="[object Set]",Hy="[object WeakMap]",Yy="[object DataView]",pR=zr(op),mR=zr(ep),gR=zr(ip),OR=zr(rp),vR=zr(ap),Ur=kl;(op&&Ur(new op(new ArrayBuffer(1)))!=Yy||ep&&Ur(new ep)!=Wy||ip&&Ur(ip.resolve())!=zy||rp&&Ur(new rp)!=Uy||ap&&Ur(new ap)!=Hy)&&(Ur=function(n){var e=kl(n),t=e==hR?n.constructor:void 0,o=t?zr(t):"";if(o)switch(o){case pR:return Yy;case mR:return Wy;case gR:return zy;case OR:return Uy;case vR:return Hy}return e}),ru("bottomLeft","bottomRight","topLeft","topRight");const Xy=function(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return q(n?{name:n,appear:!0,enterFromClass:`${n}-enter ${n}-enter-prepare ${n}-enter-start`,enterActiveClass:`${n}-enter ${n}-enter-prepare`,enterToClass:`${n}-enter ${n}-enter-active`,leaveFromClass:` ${n}-leave`,leaveActiveClass:`${n}-leave ${n}-leave-active`,leaveToClass:`${n}-leave ${n}-leave-active`}:{css:!1},e)},Gy=function(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return q(n?{name:n,appear:!0,appearActiveClass:`${n}`,appearToClass:`${n}-appear ${n}-appear-active`,enterFromClass:`${n}-appear ${n}-enter ${n}-appear-prepare ${n}-enter-prepare`,enterActiveClass:`${n}`,enterToClass:`${n}-enter ${n}-appear ${n}-appear-active ${n}-enter-active`,leaveActiveClass:`${n} ${n}-leave`,leaveToClass:`${n}-leave-active`}:{css:!1},e)},Eu=(n,e,t)=>t!==void 0?t:`${n}-${e}`,Ky=Symbol("PortalContextKey"),Jy=function(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};u.provide(Ky,{inTriggerContext:e.inTriggerContext,shouldRender:u.computed(()=>{const{sPopupVisible:t,popupRef:o,forceRender:r,autoDestroy:a}=n||{};let l=!1;return(t||o||r)&&(l=!0),!t&&a&&(l=!1),l})})},yR=()=>{Jy({},{inTriggerContext:!1});const n=u.inject(Ky,{shouldRender:u.computed(()=>!1),inTriggerContext:!1});return{shouldRender:u.computed(()=>n.shouldRender.value||n.inTriggerContext===!1)}},$y=u.defineComponent({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:Lt.func.isRequired,didUpdate:Function},setup(n,e){let{slots:t}=e,o=!0,r;const{shouldRender:a}=yR();function l(){a.value&&(r=n.getContainer())}u.onBeforeMount(()=>{o=!1,l()}),u.onMounted(()=>{r||l()});const f=u.watch(a,()=>{a.value&&!r&&(r=n.getContainer()),r&&f()});return u.onUpdated(()=>{u.nextTick(()=>{var h;a.value&&((h=n.didUpdate)===null||h===void 0||h.call(n,n))})}),()=>{var h;return a.value?o?(h=t.default)===null||h===void 0?void 0:h.call(t):r?u.createVNode(u.Teleport,{to:r},t):null:null}}});let sp;function bR(n){if(typeof document>"u")return 0;if(sp===void 0){const e=document.createElement("div");e.style.width="100%",e.style.height="200px";const t=document.createElement("div"),o=t.style;o.position="absolute",o.top="0",o.left="0",o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",t.appendChild(e),document.body.appendChild(t);const r=e.offsetWidth;t.style.overflow="scroll";let a=e.offsetWidth;r===a&&(a=t.clientWidth),document.body.removeChild(t),sp=r-a}return sp}const xR=`vc-util-locker-${Date.now()}`;let qy=0;function wR(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function SR(n){const e=u.computed(()=>!!n&&!!n.value);qy+=1;const t=`${xR}_${qy}`;u.watchEffect(o=>{if(Vo()){if(e.value){const r=bR(),a=wR();gl(`
|
|
218
|
-
html body {
|
|
219
|
-
overflow-y: hidden;
|
|
220
|
-
${a?`width: calc(100% - ${r}px);`:""}
|
|
221
|
-
}`,t)}else cu(t);o(()=>{cu(t)})}},{flush:"post"})}let Hr=0;const Tu=Vo(),eb=n=>{if(!Tu)return null;if(n){if(typeof n=="string")return document.querySelectorAll(n)[0];if(typeof n=="function")return n();if(typeof n=="object"&&n instanceof window.HTMLElement)return n}return document.body},CR=u.defineComponent({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:Lt.any,visible:{type:Boolean,default:void 0},autoLock:Xa(),didUpdate:Function},setup(n,e){let{slots:t}=e;const o=u.shallowRef(),r=u.shallowRef(),a=u.shallowRef(),l=u.shallowRef(1),f=Vo()&&document.createElement("div"),h=()=>{var x,C;o.value===f&&((C=(x=o.value)===null||x===void 0?void 0:x.parentNode)===null||C===void 0||C.removeChild(o.value)),o.value=null};let g=null;const O=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||o.value&&!o.value.parentNode?(g=eb(n.getContainer),g?(g.appendChild(o.value),!0):!1):!0},v=()=>Tu?(o.value||(o.value=f,O(!0)),b(),o.value):null,b=()=>{const{wrapperClassName:x}=n;o.value&&x&&x!==o.value.className&&(o.value.className=x)};return u.onUpdated(()=>{b(),O()}),SR(u.computed(()=>n.autoLock&&n.visible&&Vo()&&(o.value===document.body||o.value===f))),u.onMounted(()=>{let x=!1;u.watch([()=>n.visible,()=>n.getContainer],(C,k)=>{let[L,A]=C,[E,F]=k;Tu&&(g=eb(n.getContainer),g===document.body&&(L&&!E?Hr+=1:x&&(Hr-=1))),x&&(typeof A=="function"&&typeof F=="function"?A.toString()!==F.toString():A!==F)&&h(),x=!0},{immediate:!0,flush:"post"}),u.nextTick(()=>{O()||(a.value=pl(()=>{l.value+=1}))})}),u.onBeforeUnmount(()=>{const{visible:x}=n;Tu&&g===document.body&&(Hr=x&&Hr?Hr-1:Hr),h(),pl.cancel(a.value)}),()=>{const{forceRender:x,visible:C}=n;let k=null;const L={getOpenCount:()=>Hr,getContainer:v};return l.value&&(x||C||r.value)&&(k=u.createVNode($y,{getContainer:v,ref:r,didUpdate:n.didUpdate},{default:()=>{var A;return(A=t.default)===null||A===void 0?void 0:A.call(t,L)}})),k}}}),et={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){const{keyCode:t}=e;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=et.F1&&t<=et.F12)return!1;switch(t){case et.ALT:case et.CAPS_LOCK:case et.CONTEXT_MENU:case et.CTRL:case et.DOWN:case et.END:case et.ESC:case et.HOME:case et.INSERT:case et.LEFT:case et.MAC_FF_META:case et.META:case et.NUMLOCK:case et.NUM_CENTER:case et.PAGE_DOWN:case et.PAGE_UP:case et.PAUSE:case et.PRINT_SCREEN:case et.RIGHT:case et.SHIFT:case et.UP:case et.WIN_KEY:case et.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=et.ZERO&&e<=et.NINE||e>=et.NUM_ZERO&&e<=et.NUM_MULTIPLY||e>=et.A&&e<=et.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&e===0)return!0;switch(e){case et.SPACE:case et.QUESTION_MARK:case et.NUM_PLUS:case et.NUM_MINUS:case et.NUM_PERIOD:case et.NUM_DIVISION:case et.SEMICOLON:case et.DASH:case et.EQUALS:case et.COMMA:case et.PERIOD:case et.SLASH:case et.APOSTROPHE:case et.SINGLE_QUOTE:case et.OPEN_SQUARE_BRACKET:case et.BACKSLASH:case et.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},tb=`accept acceptcharset accesskey action allowfullscreen allowtransparency
|
|
222
|
-
alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
|
|
223
|
-
charset checked classid classname colspan cols content contenteditable contextmenu
|
|
224
|
-
controls coords crossorigin data datetime default defer dir disabled download draggable
|
|
225
|
-
enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
|
|
226
|
-
headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
|
|
227
|
-
is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
|
|
228
|
-
mediagroup method min minlength multiple muted name novalidate nonce open
|
|
229
|
-
optimum pattern placeholder poster preload radiogroup readonly rel required
|
|
230
|
-
reversed role rowspan rows sandbox scope scoped scrolling seamless selected
|
|
231
|
-
shape size sizes span spellcheck src srcdoc srclang srcset start step style
|
|
232
|
-
summary tabindex target title type usemap value width wmode wrap onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
|
|
233
|
-
onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
|
|
234
|
-
onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
|
|
235
|
-
onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
|
|
236
|
-
onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
|
|
237
|
-
onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
|
|
238
|
-
onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`.split(/[\s\n]+/),kR="aria-",PR="data-";function nb(n,e){return n.indexOf(e)===0}function _R(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t;e===!1?t={aria:!0,data:!0,attr:!0}:e===!0?t={aria:!0}:t=q({},e);const o={};return Object.keys(n).forEach(r=>{(t.aria&&(r==="role"||nb(r,kR))||t.data&&nb(r,PR)||t.attr&&(tb.includes(r)||tb.includes(r.toLowerCase())))&&(o[r]=n[r])}),o}function Yr(n){const e=typeof n=="function"?n():n,t=u.ref(e);function o(r){t.value=r}return[t,o]}var ER=Symbol("iconContext"),ob=function(){return u.inject(ER,{prefixCls:u.ref("anticon"),rootClassName:u.ref(""),csp:u.ref()})};function lp(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function TR(n,e){return n&&n.contains?n.contains(e):!1}var ib="data-vc-order",NR="vc-icon-key",cp=new Map;function rb(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=n.mark;return e?e.startsWith("data-")?e:"data-".concat(e):NR}function up(n){if(n.attachTo)return n.attachTo;var e=document.querySelector("head");return e||document.body}function AR(n){return n==="queue"?"prependQueue":n?"prepend":"append"}function ab(n){return Array.from((cp.get(n)||n).children).filter(function(e){return e.tagName==="STYLE"})}function sb(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!lp())return null;var t=e.csp,o=e.prepend,r=document.createElement("style");r.setAttribute(ib,AR(o)),t&&t.nonce&&(r.nonce=t.nonce),r.innerHTML=n;var a=up(e),l=a.firstChild;if(o){if(o==="queue"){var f=ab(a).filter(function(h){return["prepend","prependQueue"].includes(h.getAttribute(ib))});if(f.length)return a.insertBefore(r,f[f.length-1].nextSibling),r}a.insertBefore(r,l)}else a.appendChild(r);return r}function MR(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=up(e);return ab(t).find(function(o){return o.getAttribute(rb(e))===n})}function RR(n,e){var t=cp.get(n);if(!t||!TR(document,t)){var o=sb("",e),r=o.parentNode;cp.set(n,r),n.removeChild(o)}}function IR(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=up(t);RR(o,t);var r=MR(e,t);if(r)return t.csp&&t.csp.nonce&&r.nonce!==t.csp.nonce&&(r.nonce=t.csp.nonce),r.innerHTML!==n&&(r.innerHTML=n),r;var a=sb(n,t);return a.setAttribute(rb(t),e),a}function lb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){QR(n,r,t[r])})}return n}function QR(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function DR(n,e){process.env.NODE_ENV!=="production"&&!n&&console!==void 0&&console.error("Warning: ".concat(e))}function BR(n,e){DR(n,"[@ant-design/icons-vue] ".concat(e))}function cb(n){return typeof n=="object"&&typeof n.name=="string"&&typeof n.theme=="string"&&(typeof n.icon=="object"||typeof n.icon=="function")}function dp(n,e,t){return t?u.h(n.tag,lb({key:e},t,n.attrs),(n.children||[]).map(function(o,r){return dp(o,"".concat(e,"-").concat(n.tag,"-").concat(r))})):u.h(n.tag,lb({key:e},n.attrs),(n.children||[]).map(function(o,r){return dp(o,"".concat(e,"-").concat(n.tag,"-").concat(r))}))}function ub(n){return jr(n)[0]}function db(n){return n?Array.isArray(n)?n:[n]:[]}var LR=`
|
|
239
|
-
.anticon {
|
|
240
|
-
display: inline-block;
|
|
241
|
-
color: inherit;
|
|
242
|
-
font-style: normal;
|
|
243
|
-
line-height: 0;
|
|
244
|
-
text-align: center;
|
|
245
|
-
text-transform: none;
|
|
246
|
-
vertical-align: -0.125em;
|
|
247
|
-
text-rendering: optimizeLegibility;
|
|
248
|
-
-webkit-font-smoothing: antialiased;
|
|
249
|
-
-moz-osx-font-smoothing: grayscale;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.anticon > * {
|
|
253
|
-
line-height: 1;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.anticon svg {
|
|
257
|
-
display: inline-block;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.anticon::before {
|
|
261
|
-
display: none;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.anticon .anticon-icon {
|
|
265
|
-
display: block;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.anticon[tabindex] {
|
|
269
|
-
cursor: pointer;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.anticon-spin::before,
|
|
273
|
-
.anticon-spin {
|
|
274
|
-
display: inline-block;
|
|
275
|
-
-webkit-animation: loadingCircle 1s infinite linear;
|
|
276
|
-
animation: loadingCircle 1s infinite linear;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
@-webkit-keyframes loadingCircle {
|
|
280
|
-
100% {
|
|
281
|
-
-webkit-transform: rotate(360deg);
|
|
282
|
-
transform: rotate(360deg);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
@keyframes loadingCircle {
|
|
287
|
-
100% {
|
|
288
|
-
-webkit-transform: rotate(360deg);
|
|
289
|
-
transform: rotate(360deg);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
`;function fb(n){return n&&n.getRootNode&&n.getRootNode()}function VR(n){return lp()?fb(n)instanceof ShadowRoot:!1}function jR(n){return VR(n)?fb(n):null}var FR=function(){var e=ob(),t=e.prefixCls,o=e.csp,r=u.getCurrentInstance(),a=LR;t&&(a=a.replace(/anticon/g,t.value)),u.nextTick(function(){if(lp()){var l=r.vnode.el,f=jR(l);IR(a,"@ant-design-vue-icons",{prepend:!0,csp:o.value,attachTo:f})}})},ZR=["icon","primaryColor","secondaryColor"];function WR(n,e){if(n==null)return{};var t=zR(n,e),o,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)o=a[r],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(t[o]=n[o])}return t}function zR(n,e){if(n==null)return{};var t={},o=Object.keys(n),r,a;for(a=0;a<o.length;a++)r=o[a],!(e.indexOf(r)>=0)&&(t[r]=n[r]);return t}function Nu(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){UR(n,r,t[r])})}return n}function UR(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var El=u.reactive({primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1});function HR(n){var e=n.primaryColor,t=n.secondaryColor;El.primaryColor=e,El.secondaryColor=t||ub(e),El.calculated=!!t}function YR(){return Nu({},El)}var $i=function(e,t){var o=Nu({},e,t.attrs),r=o.icon,a=o.primaryColor,l=o.secondaryColor,f=WR(o,ZR),h=El;if(a&&(h={primaryColor:a,secondaryColor:l||ub(a)}),BR(cb(r),"icon should be icon definiton, but got ".concat(r)),!cb(r))return null;var g=r;return g&&typeof g.icon=="function"&&(g=Nu({},g,{icon:g.icon(h.primaryColor,h.secondaryColor)})),dp(g.icon,"svg-".concat(g.name),Nu({},f,{"data-icon":g.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};$i.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},$i.inheritAttrs=!1,$i.displayName="IconBase",$i.getTwoToneColors=YR,$i.setTwoToneColors=HR;function XR(n,e){return $R(n)||JR(n,e)||KR(n,e)||GR()}function GR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
293
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KR(n,e){if(n){if(typeof n=="string")return hb(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hb(n,e)}}function hb(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,o=new Array(e);t<e;t++)o[t]=n[t];return o}function JR(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var o=[],r=!0,a=!1,l,f;try{for(t=t.call(n);!(r=(l=t.next()).done)&&(o.push(l.value),!(e&&o.length===e));r=!0);}catch(h){a=!0,f=h}finally{try{!r&&t.return!=null&&t.return()}finally{if(a)throw f}}return o}}function $R(n){if(Array.isArray(n))return n}function pb(n){var e=db(n),t=XR(e,2),o=t[0],r=t[1];return $i.setTwoToneColors({primaryColor:o,secondaryColor:r})}function qR(){var n=$i.getTwoToneColors();return n.calculated?[n.primaryColor,n.secondaryColor]:n.primaryColor}var eI=u.defineComponent({name:"InsertStyles",setup:function(){return FR(),function(){return null}}}),tI=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function nI(n,e){return aI(n)||rI(n,e)||iI(n,e)||oI()}function oI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
294
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iI(n,e){if(n){if(typeof n=="string")return mb(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return mb(n,e)}}function mb(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,o=new Array(e);t<e;t++)o[t]=n[t];return o}function rI(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var o=[],r=!0,a=!1,l,f;try{for(t=t.call(n);!(r=(l=t.next()).done)&&(o.push(l.value),!(e&&o.length===e));r=!0);}catch(h){a=!0,f=h}finally{try{!r&&t.return!=null&&t.return()}finally{if(a)throw f}}return o}}function aI(n){if(Array.isArray(n))return n}function gb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){Tl(n,r,t[r])})}return n}function Tl(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function sI(n,e){if(n==null)return{};var t=lI(n,e),o,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)o=a[r],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(t[o]=n[o])}return t}function lI(n,e){if(n==null)return{};var t={},o=Object.keys(n),r,a;for(a=0;a<o.length;a++)r=o[a],!(e.indexOf(r)>=0)&&(t[r]=n[r]);return t}pb(qA.primary);var Qn=function(e,t){var o,r=gb({},e,t.attrs),a=r.class,l=r.icon,f=r.spin,h=r.rotate,g=r.tabindex,O=r.twoToneColor,v=r.onClick,b=sI(r,tI),x=ob(),C=x.prefixCls,k=x.rootClassName,L=(o={},Tl(o,k.value,!!k.value),Tl(o,C.value,!0),Tl(o,"".concat(C.value,"-").concat(l.name),!!l.name),Tl(o,"".concat(C.value,"-spin"),!!f||l.name==="loading"),o),A=g;A===void 0&&v&&(A=-1);var E=h?{msTransform:"rotate(".concat(h,"deg)"),transform:"rotate(".concat(h,"deg)")}:void 0,F=db(O),B=nI(F,2),I=B[0],K=B[1];return u.createVNode("span",gb({role:"img","aria-label":l.name},b,{onClick:v,class:[L,a],tabindex:A}),[u.createVNode($i,{icon:l,primaryColor:I,secondaryColor:K,style:E},null),u.createVNode(eI,null,null)])};Qn.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]},Qn.displayName="AntdIcon",Qn.inheritAttrs=!1,Qn.getTwoToneColor=qR,Qn.setTwoToneColor=pb;var cI={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function Ob(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){uI(n,r,t[r])})}return n}function uI(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Xr=function(e,t){var o=Ob({},e,t.attrs);return u.createVNode(Qn,Ob({},o,{icon:cI}),null)};Xr.displayName="LoadingOutlined",Xr.inheritAttrs=!1;var dI={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function vb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){fI(n,r,t[r])})}return n}function fI(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var is=function(e,t){var o=vb({},e,t.attrs);return u.createVNode(Qn,vb({},o,{icon:dI}),null)};is.displayName="CloseOutlined",is.inheritAttrs=!1;var hI={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function yb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){pI(n,r,t[r])})}return n}function pI(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Gr=function(e,t){var o=yb({},e,t.attrs);return u.createVNode(Qn,yb({},o,{icon:hI}),null)};Gr.displayName="CloseCircleFilled",Gr.inheritAttrs=!1;function bb(n){const e=Symbol("contextKey");return{useProvide:(r,a)=>{const l=u.reactive({});return u.provide(e,l),u.watchEffect(()=>{q(l,r,a||{})}),l},useInject:()=>u.inject(e,n)||{}}}const mI=n=>{const{componentCls:e}=n;return{[e]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},gI=n=>{const{componentCls:e}=n;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item`]:{"&:empty":{display:"none"}}}}},OI=Fr("Space",n=>[gI(n),mI(n)]);var vI="[object Map]",yI="[object Set]",bI=Object.prototype,xI=bI.hasOwnProperty;function xb(n){if(n==null)return!0;if(fR(n)&&(w4(n)||typeof n=="string"||typeof n.splice=="function"||N4(n)||rR(n)||P4(n)))return!n.length;var e=Ur(n);if(e==vI||e==yI)return!n.size;if(Zy(n))return!dR(n).length;for(var t in n)if(xI.call(n,t))return!1;return!0}const wI=()=>({compactSize:String,compactDirection:Lt.oneOf(ru("horizontal","vertical")).def("horizontal"),isFirstItem:Xa(),isLastItem:Xa()}),Au=bb(null),SI=(n,e)=>{const t=Au.useInject(),o=u.computed(()=>{if(!t||xb(t))return"";const{compactDirection:r,isFirstItem:a,isLastItem:l}=t,f=r==="vertical"?"-vertical-":"-";return Bt({[`${n.value}-compact${f}item`]:!0,[`${n.value}-compact${f}first-item`]:a,[`${n.value}-compact${f}last-item`]:l,[`${n.value}-compact${f}item-rtl`]:e.value==="rtl"})});return{compactSize:u.computed(()=>t?.compactSize),compactDirection:u.computed(()=>t?.compactDirection),compactItemClassnames:o}};u.defineComponent({name:"NoCompactStyle",setup(n,e){let{slots:t}=e;return Au.useProvide(null),()=>{var o;return(o=t.default)===null||o===void 0?void 0:o.call(t)}}});const CI=()=>({prefixCls:String,size:{type:String},direction:Lt.oneOf(ru("horizontal","vertical")).def("horizontal"),align:Lt.oneOf(ru("start","end","center","baseline")),block:{type:Boolean,default:void 0}}),kI=u.defineComponent({name:"CompactItem",props:wI(),setup(n,e){let{slots:t}=e;return Au.useProvide(n),()=>{var o;return(o=t.default)===null||o===void 0?void 0:o.call(t)}}});u.defineComponent({name:"ASpaceCompact",inheritAttrs:!1,props:CI(),setup(n,e){let{attrs:t,slots:o}=e;const{prefixCls:r,direction:a}=ri("space-compact",n),l=Au.useInject(),[f,h]=OI(r),g=u.computed(()=>Bt(r.value,h.value,{[`${r.value}-rtl`]:a.value==="rtl",[`${r.value}-block`]:n.block,[`${r.value}-vertical`]:n.direction==="vertical"}));return()=>{var O;const v=hl(((O=o.default)===null||O===void 0?void 0:O.call(o))||[]);return v.length===0?null:f(u.createVNode("div",Ke(Ke({},t),{},{class:[g.value,t.class]}),[v.map((b,x)=>{var C;const k=b&&b.key||`${r.value}-item-${x}`,L=!l||xb(l);return u.createVNode(kI,{key:k,compactSize:(C=n.size)!==null&&C!==void 0?C:"middle",compactDirection:n.direction,isFirstItem:x===0&&(L||l?.isFirstItem),isLastItem:x===v.length-1&&(L||l?.isLastItem)},{default:()=>[b]})})]))}}});const PI=n=>({animationDuration:n,animationFillMode:"both"}),_I=n=>({animationDuration:n,animationFillMode:"both"}),wb=function(n,e,t,o){const a=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
|
|
295
|
-
${a}${n}-enter,
|
|
296
|
-
${a}${n}-appear
|
|
297
|
-
`]:q(q({},PI(o)),{animationPlayState:"paused"}),[`${a}${n}-leave`]:q(q({},_I(o)),{animationPlayState:"paused"}),[`
|
|
298
|
-
${a}${n}-enter${n}-enter-active,
|
|
299
|
-
${a}${n}-appear${n}-appear-active
|
|
300
|
-
`]:{animationName:e,animationPlayState:"running"},[`${a}${n}-leave${n}-leave-active`]:{animationName:t,animationPlayState:"running",pointerEvents:"none"}}},EI=new Ht("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),TI=new Ht("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),NI=function(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:t}=n,o=`${t}-fade`,r=e?"&":"";return[wb(o,EI,TI,n.motionDurationMid,e),{[`
|
|
301
|
-
${r}${o}-enter,
|
|
302
|
-
${r}${o}-appear
|
|
303
|
-
`]:{opacity:0,animationTimingFunction:"linear"},[`${r}${o}-leave`]:{animationTimingFunction:"linear"}}]},AI=new Ht("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),MI=new Ht("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Sb=new Ht("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Cb=new Ht("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),RI=new Ht("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),II=new Ht("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),QI=new Ht("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),DI=new Ht("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),BI=new Ht("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),LI=new Ht("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),VI=new Ht("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),jI=new Ht("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),FI={zoom:{inKeyframes:AI,outKeyframes:MI},"zoom-big":{inKeyframes:Sb,outKeyframes:Cb},"zoom-big-fast":{inKeyframes:Sb,outKeyframes:Cb},"zoom-left":{inKeyframes:QI,outKeyframes:DI},"zoom-right":{inKeyframes:BI,outKeyframes:LI},"zoom-up":{inKeyframes:RI,outKeyframes:II},"zoom-down":{inKeyframes:VI,outKeyframes:jI}},ZI=(n,e)=>{const{antCls:t}=n,o=`${t}-${e}`,{inKeyframes:r,outKeyframes:a}=FI[e];return[wb(o,r,a,n.motionDurationMid),{[`
|
|
304
|
-
${o}-enter,
|
|
305
|
-
${o}-appear
|
|
306
|
-
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:n.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${o}-leave`]:{animationTimingFunction:n.motionEaseInOutCirc}}]};function WI(n,e,t){const{focusElCls:o,focus:r,borderElCls:a}=t,l=a?"> *":"",f=["hover",r?"focus":null,"active"].filter(Boolean).map(h=>`&:${h} ${l}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:-n.lineWidth},"&-item":q(q({[f]:{zIndex:2}},o?{[`&${o}`]:{zIndex:2}}:{}),{[`&[disabled] ${l}`]:{zIndex:0}})}}function zI(n,e,t){const{borderElCls:o}=t,r=o?`> ${o}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${r}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${r}, &${n}-sm ${r}, &${n}-lg ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${r}, &${n}-sm ${r}, &${n}-lg ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function UI(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:t}=n,o=`${t}-compact`;return{[o]:q(q({},WI(n,o,e)),zI(t,o,e))}}var HI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function kb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){YI(n,r,t[r])})}return n}function YI(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var fp=function(e,t){var o=kb({},e,t.attrs);return u.createVNode(Qn,kb({},o,{icon:HI}),null)};fp.displayName="CheckCircleOutlined",fp.inheritAttrs=!1;var XI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};function Pb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){GI(n,r,t[r])})}return n}function GI(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var hp=function(e,t){var o=Pb({},e,t.attrs);return u.createVNode(Qn,Pb({},o,{icon:XI}),null)};hp.displayName="ExclamationCircleOutlined",hp.inheritAttrs=!1;var KI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};function _b(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){JI(n,r,t[r])})}return n}function JI(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var pp=function(e,t){var o=_b({},e,t.attrs);return u.createVNode(Qn,_b({},o,{icon:KI}),null)};pp.displayName="InfoCircleOutlined",pp.inheritAttrs=!1;var $I={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"};function Eb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){qI(n,r,t[r])})}return n}function qI(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var mp=function(e,t){var o=Eb({},e,t.attrs);return u.createVNode(Qn,Eb({},o,{icon:$I}),null)};mp.displayName="CloseCircleOutlined",mp.inheritAttrs=!1;var eQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function Tb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){tQ(n,r,t[r])})}return n}function tQ(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Kr=function(e,t){var o=Tb({},e,t.attrs);return u.createVNode(Qn,Tb({},o,{icon:eQ}),null)};Kr.displayName="CheckCircleFilled",Kr.inheritAttrs=!1;var nQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};function Nb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){oQ(n,r,t[r])})}return n}function oQ(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Jr=function(e,t){var o=Nb({},e,t.attrs);return u.createVNode(Qn,Nb({},o,{icon:nQ}),null)};Jr.displayName="ExclamationCircleFilled",Jr.inheritAttrs=!1;var iQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};function Ab(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){rQ(n,r,t[r])})}return n}function rQ(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var $r=function(e,t){var o=Ab({},e,t.attrs);return u.createVNode(Qn,Ab({},o,{icon:iQ}),null)};$r.displayName="InfoCircleFilled",$r.inheritAttrs=!1;const aQ=n=>{const{componentCls:e,colorPrimary:t}=n;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${t})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${n.motionEaseOutCirc}`,`opacity 2s ${n.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},sQ=Fr("Wave",n=>[aQ(n)]);function lQ(n){const e=(n||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return e&&e[1]&&e[2]&&e[3]?!(e[1]===e[2]&&e[2]===e[3]):!0}function gp(n){return n&&n!=="#fff"&&n!=="#ffffff"&&n!=="rgb(255, 255, 255)"&&n!=="rgba(255, 255, 255, 1)"&&lQ(n)&&!/rgba\((?:\d*, ){3}0\)/.test(n)&&n!=="transparent"}function cQ(n){const{borderTopColor:e,borderColor:t,backgroundColor:o}=getComputedStyle(n);return gp(e)?e:gp(t)?t:gp(o)?o:null}function Op(n){return Number.isNaN(n)?0:n}const uQ=u.defineComponent({props:{target:$t(),className:String},setup(n){const e=u.shallowRef(null),[t,o]=Yr(null),[r,a]=Yr([]),[l,f]=Yr(0),[h,g]=Yr(0),[O,v]=Yr(0),[b,x]=Yr(0),[C,k]=Yr(!1);function L(){const{target:V}=n,j=getComputedStyle(V);o(cQ(V));const R=j.position==="static",{borderLeftWidth:Y,borderTopWidth:le}=j;f(R?V.offsetLeft:Op(-parseFloat(Y))),g(R?V.offsetTop:Op(-parseFloat(le))),v(V.offsetWidth),x(V.offsetHeight);const{borderTopLeftRadius:me,borderTopRightRadius:ze,borderBottomLeftRadius:we,borderBottomRightRadius:se}=j;a([me,ze,se,we].map(Oe=>Op(parseFloat(Oe))))}let A,E,F;const B=()=>{clearTimeout(F),pl.cancel(E),A?.disconnect()},I=()=>{var V;const j=(V=e.value)===null||V===void 0?void 0:V.parentElement;j&&(u.render(null,j),j.parentElement&&j.parentElement.removeChild(j))};u.onMounted(()=>{B(),F=setTimeout(()=>{I()},5e3);const{target:V}=n;V&&(E=pl(()=>{L(),k(!0)}),typeof ResizeObserver<"u"&&(A=new ResizeObserver(L),A.observe(V)))}),u.onBeforeUnmount(()=>{B()});const K=V=>{V.propertyName==="opacity"&&I()};return()=>{if(!C.value)return null;const V={left:`${l.value}px`,top:`${h.value}px`,width:`${O.value}px`,height:`${b.value}px`,borderRadius:r.value.map(j=>`${j}px`).join(" ")};return t&&(V["--wave-color"]=t.value),u.createVNode(u.Transition,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[u.createVNode("div",{ref:e,class:n.className,style:V,onTransitionend:K},null)]})}}});function dQ(n,e){const t=document.createElement("div");return t.style.position="absolute",t.style.left="0px",t.style.top="0px",n?.insertBefore(t,n?.firstChild),u.render(u.createVNode(uQ,{target:n,className:e},null),t),()=>{u.render(null,t),t.parentElement&&t.parentElement.removeChild(t)}}function fQ(n,e){const t=u.getCurrentInstance();let o;function r(){var a;const l=iu(t);o?.(),!(!((a=e?.value)===null||a===void 0)&&a.disabled||!l)&&(o=dQ(l,n.value))}return u.onBeforeUnmount(()=>{o?.()}),r}const hQ=u.defineComponent({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(n,e){let{slots:t}=e;const o=u.getCurrentInstance(),{prefixCls:r,wave:a}=ri("wave",n),[,l]=sQ(r),f=fQ(u.computed(()=>Bt(r.value,l.value)),a);let h;const g=()=>{iu(o).removeEventListener("click",h,!0)};return u.onMounted(()=>{u.watch(()=>n.disabled,()=>{g(),u.nextTick(()=>{const O=iu(o);O?.removeEventListener("click",h,!0),!(!O||O.nodeType!==1||n.disabled)&&(h=v=>{v.target.tagName==="INPUT"||!KM(v.target)||!O.getAttribute||O.getAttribute("disabled")||O.disabled||O.className.includes("disabled")||O.className.includes("-leave")||f()},O.addEventListener("click",h,!0))})},{immediate:!0,flush:"post"})}),u.onBeforeUnmount(()=>{g()}),()=>{var O;return(O=t.default)===null||O===void 0?void 0:O.call(t)[0]}}});function Mb(n){return n==="danger"?{danger:!0}:{type:n}}const pQ=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:Lt.any,href:String,target:String,title:String,onClick:r0(),onMousedown:r0()}),Rb=n=>{n&&(n.style.width="0px",n.style.opacity="0",n.style.transform="scale(0)")},Ib=n=>{u.nextTick(()=>{n&&(n.style.width=`${n.scrollWidth}px`,n.style.opacity="1",n.style.transform="scale(1)")})},Qb=n=>{n&&n.style&&(n.style.width=null,n.style.opacity=null,n.style.transform=null)},mQ=u.defineComponent({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(n){return()=>{const{existIcon:e,prefixCls:t,loading:o}=n;if(e)return u.createVNode("span",{class:`${t}-loading-icon`},[u.createVNode(Xr,null,null)]);const r=!!o;return u.createVNode(u.Transition,{name:`${t}-loading-icon-motion`,onBeforeEnter:Rb,onEnter:Ib,onAfterEnter:Qb,onBeforeLeave:Ib,onLeave:a=>{setTimeout(()=>{Rb(a)})},onAfterLeave:Qb},{default:()=>[r?u.createVNode("span",{class:`${t}-loading-icon`},[u.createVNode(Xr,null,null)]):null]})}}}),Db=(n,e)=>({[`> span, > ${n}`]:{"&:not(:last-child)":{[`&, & > ${n}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${n}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),gQ=n=>{const{componentCls:e,fontSize:t,lineWidth:o,colorPrimaryHover:r,colorErrorHover:a}=n;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-o,[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:t}},Db(`${e}-primary`,r),Db(`${e}-danger`,a)]}};function OQ(n,e){return{[`&-item:not(${e}-last-item)`]:{marginBottom:-n.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function vQ(n,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${n}-sm, &${n}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${n}-sm, &${n}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function yQ(n){const e=`${n.componentCls}-compact-vertical`;return{[e]:q(q({},OQ(n,e)),vQ(n.componentCls,e))}}const bQ=n=>{const{componentCls:e,iconCls:t}=n;return{[e]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${n.lineWidth}px ${n.lineType} transparent`,cursor:"pointer",transition:`all ${n.motionDurationMid} ${n.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:n.lineHeight,color:n.colorText,"> span":{display:"inline-block"},[`> ${t} + span, > span + ${t}`]:{marginInlineStart:n.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":q({},ny(n)),[`&-icon-only${e}-compact-item`]:{flex:"none"},[`&-compact-item${e}-primary`]:{[`&:not([disabled]) + ${e}-compact-item${e}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-n.lineWidth,insetInlineStart:-n.lineWidth,display:"inline-block",width:n.lineWidth,height:`calc(100% + ${n.lineWidth*2}px)`,backgroundColor:n.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${e}-primary`]:{[`&:not([disabled]) + ${e}-compact-vertical-item${e}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-n.lineWidth,insetInlineStart:-n.lineWidth,display:"inline-block",width:`calc(100% + ${n.lineWidth*2}px)`,height:n.lineWidth,backgroundColor:n.colorPrimaryHover,content:'""'}}}}}}},Ni=(n,e)=>({"&:not(:disabled)":{"&:hover":n,"&:active":e}}),xQ=n=>({minWidth:n.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),wQ=n=>({borderRadius:n.controlHeight,paddingInlineStart:n.controlHeight/2,paddingInlineEnd:n.controlHeight/2}),vp=n=>({cursor:"not-allowed",borderColor:n.colorBorder,color:n.colorTextDisabled,backgroundColor:n.colorBgContainerDisabled,boxShadow:"none"}),Mu=(n,e,t,o,r,a,l)=>({[`&${n}-background-ghost`]:q(q({color:e||void 0,backgroundColor:"transparent",borderColor:t||void 0,boxShadow:"none"},Ni(q({backgroundColor:"transparent"},a),q({backgroundColor:"transparent"},l))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:r||void 0}})}),yp=n=>({"&:disabled":q({},vp(n))}),Bb=n=>q({},yp(n)),Ru=n=>({"&:disabled":{cursor:"not-allowed",color:n.colorTextDisabled}}),Lb=n=>q(q(q(q(q({},Bb(n)),{backgroundColor:n.colorBgContainer,borderColor:n.colorBorder,boxShadow:`0 ${n.controlOutlineWidth}px 0 ${n.controlTmpOutline}`}),Ni({color:n.colorPrimaryHover,borderColor:n.colorPrimaryHover},{color:n.colorPrimaryActive,borderColor:n.colorPrimaryActive})),Mu(n.componentCls,n.colorBgContainer,n.colorBgContainer,n.colorTextDisabled,n.colorBorder)),{[`&${n.componentCls}-dangerous`]:q(q(q({color:n.colorError,borderColor:n.colorError},Ni({color:n.colorErrorHover,borderColor:n.colorErrorBorderHover},{color:n.colorErrorActive,borderColor:n.colorErrorActive})),Mu(n.componentCls,n.colorError,n.colorError,n.colorTextDisabled,n.colorBorder)),yp(n))}),SQ=n=>q(q(q(q(q({},Bb(n)),{color:n.colorTextLightSolid,backgroundColor:n.colorPrimary,boxShadow:`0 ${n.controlOutlineWidth}px 0 ${n.controlOutline}`}),Ni({color:n.colorTextLightSolid,backgroundColor:n.colorPrimaryHover},{color:n.colorTextLightSolid,backgroundColor:n.colorPrimaryActive})),Mu(n.componentCls,n.colorPrimary,n.colorPrimary,n.colorTextDisabled,n.colorBorder,{color:n.colorPrimaryHover,borderColor:n.colorPrimaryHover},{color:n.colorPrimaryActive,borderColor:n.colorPrimaryActive})),{[`&${n.componentCls}-dangerous`]:q(q(q({backgroundColor:n.colorError,boxShadow:`0 ${n.controlOutlineWidth}px 0 ${n.colorErrorOutline}`},Ni({backgroundColor:n.colorErrorHover},{backgroundColor:n.colorErrorActive})),Mu(n.componentCls,n.colorError,n.colorError,n.colorTextDisabled,n.colorBorder,{color:n.colorErrorHover,borderColor:n.colorErrorHover},{color:n.colorErrorActive,borderColor:n.colorErrorActive})),yp(n))}),CQ=n=>q(q({},Lb(n)),{borderStyle:"dashed"}),kQ=n=>q(q(q({color:n.colorLink},Ni({color:n.colorLinkHover},{color:n.colorLinkActive})),Ru(n)),{[`&${n.componentCls}-dangerous`]:q(q({color:n.colorError},Ni({color:n.colorErrorHover},{color:n.colorErrorActive})),Ru(n))}),PQ=n=>q(q(q({},Ni({color:n.colorText,backgroundColor:n.colorBgTextHover},{color:n.colorText,backgroundColor:n.colorBgTextActive})),Ru(n)),{[`&${n.componentCls}-dangerous`]:q(q({color:n.colorError},Ru(n)),Ni({color:n.colorErrorHover,backgroundColor:n.colorErrorBg},{color:n.colorErrorHover,backgroundColor:n.colorErrorBg}))}),_Q=n=>q(q({},vp(n)),{[`&${n.componentCls}:hover`]:q({},vp(n))}),EQ=n=>{const{componentCls:e}=n;return{[`${e}-default`]:Lb(n),[`${e}-primary`]:SQ(n),[`${e}-dashed`]:CQ(n),[`${e}-link`]:kQ(n),[`${e}-text`]:PQ(n),[`${e}-disabled`]:_Q(n)}},bp=function(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:t,iconCls:o,controlHeight:r,fontSize:a,lineHeight:l,lineWidth:f,borderRadius:h,buttonPaddingHorizontal:g}=n,O=Math.max(0,(r-a*l)/2-f),v=g-f,b=`${t}-icon-only`;return[{[`${t}${e}`]:{fontSize:a,height:r,padding:`${O}px ${v}px`,borderRadius:h,[`&${b}`]:{width:r,paddingInlineStart:0,paddingInlineEnd:0,[`&${t}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${t}-loading`]:{opacity:n.opacityLoading,cursor:"default"},[`${t}-loading-icon`]:{transition:`width ${n.motionDurationSlow} ${n.motionEaseInOut}, opacity ${n.motionDurationSlow} ${n.motionEaseInOut}`},[`&:not(${b}) ${t}-loading-icon > ${o}`]:{marginInlineEnd:n.marginXS}}},{[`${t}${t}-circle${e}`]:xQ(n)},{[`${t}${t}-round${e}`]:wQ(n)}]},TQ=n=>bp(n),NQ=n=>{const e=Ki(n,{controlHeight:n.controlHeightSM,padding:n.paddingXS,buttonPaddingHorizontal:8,borderRadius:n.borderRadiusSM});return bp(e,`${n.componentCls}-sm`)},AQ=n=>{const e=Ki(n,{controlHeight:n.controlHeightLG,fontSize:n.fontSizeLG,borderRadius:n.borderRadiusLG});return bp(e,`${n.componentCls}-lg`)},MQ=n=>{const{componentCls:e}=n;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},RQ=Fr("Button",n=>{const{controlTmpOutline:e,paddingContentHorizontal:t}=n,o=Ki(n,{colorOutlineDefault:e,buttonPaddingHorizontal:t});return[bQ(o),NQ(o),TQ(o),AQ(o),MQ(o),EQ(o),gQ(o),UI(n,{focus:!1}),yQ(n)]}),IQ=()=>({prefixCls:String,size:{type:String}}),Vb=bb(),xp=u.defineComponent({compatConfig:{MODE:3},name:"AButtonGroup",props:IQ(),setup(n,e){let{slots:t}=e;const{prefixCls:o,direction:r}=ri("btn-group",n),[,,a]=xl();Vb.useProvide(u.reactive({size:u.computed(()=>n.size)}));const l=u.computed(()=>{const{size:f}=n;let h="";switch(f){case"large":h="lg";break;case"small":h="sm";break;case"middle":case void 0:break;default:Py(!f,"Button.Group","Invalid prop `size`.")}return{[`${o.value}`]:!0,[`${o.value}-${h}`]:h,[`${o.value}-rtl`]:r.value==="rtl",[a.value]:!0}});return()=>{var f;return u.createVNode("div",{class:l.value},[hl((f=t.default)===null||f===void 0?void 0:f.call(t))])}}}),jb=/^[\u4e00-\u9fa5]{2}$/,Fb=jb.test.bind(jb);function Iu(n){return n==="text"||n==="link"}const qr=u.defineComponent({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:fl(pQ(),{type:"default"}),slots:Object,setup(n,e){let{slots:t,attrs:o,emit:r,expose:a}=e;const{prefixCls:l,autoInsertSpaceInButton:f,direction:h,size:g}=ri("btn",n),[O,v]=RQ(l),b=Vb.useInject(),x=wh(),C=u.computed(()=>{var se;return(se=n.disabled)!==null&&se!==void 0?se:x.value}),k=u.shallowRef(null),L=u.shallowRef(void 0);let A=!1;const E=u.shallowRef(!1),F=u.shallowRef(!1),B=u.computed(()=>f.value!==!1),{compactSize:I,compactItemClassnames:K}=SI(l,h),V=u.computed(()=>typeof n.loading=="object"&&n.loading.delay?n.loading.delay||!0:!!n.loading);u.watch(V,se=>{clearTimeout(L.value),typeof V.value=="number"?L.value=setTimeout(()=>{E.value=se},V.value):E.value=se},{immediate:!0});const j=u.computed(()=>{const{type:se,shape:Oe="default",ghost:Le,block:ge,danger:$e}=n,Te=l.value,ye={large:"lg",small:"sm",middle:void 0},pt=I.value||b?.size||g.value,Se=pt&&ye[pt]||"";return[K.value,{[v.value]:!0,[`${Te}`]:!0,[`${Te}-${Oe}`]:Oe!=="default"&&Oe,[`${Te}-${se}`]:se,[`${Te}-${Se}`]:Se,[`${Te}-loading`]:E.value,[`${Te}-background-ghost`]:Le&&!Iu(se),[`${Te}-two-chinese-chars`]:F.value&&B.value,[`${Te}-block`]:ge,[`${Te}-dangerous`]:!!$e,[`${Te}-rtl`]:h.value==="rtl"}]}),R=()=>{const se=k.value;if(!se||f.value===!1)return;const Oe=se.textContent;A&&Fb(Oe)?F.value||(F.value=!0):F.value&&(F.value=!1)},Y=se=>{if(E.value||C.value){se.preventDefault();return}r("click",se)},le=se=>{r("mousedown",se)},me=(se,Oe)=>{const Le=Oe?" ":"";if(se.type===u.Text){let ge=se.children.trim();return Fb(ge)&&(ge=ge.split("").join(Le)),u.createVNode("span",null,[ge])}return se};return u.watchEffect(()=>{Py(!(n.ghost&&Iu(n.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),u.onMounted(R),u.onUpdated(R),u.onBeforeUnmount(()=>{L.value&&clearTimeout(L.value)}),a({focus:()=>{var se;(se=k.value)===null||se===void 0||se.focus()},blur:()=>{var se;(se=k.value)===null||se===void 0||se.blur()}}),()=>{var se,Oe;const{icon:Le=(se=t.icon)===null||se===void 0?void 0:se.call(t)}=n,ge=hl((Oe=t.default)===null||Oe===void 0?void 0:Oe.call(t));A=ge.length===1&&!Le&&!Iu(n.type);const{type:$e,htmlType:Te,href:ye,title:pt,target:Se}=n,We=E.value?"loading":Le,wt=q(q({},o),{title:pt,disabled:C.value,class:[j.value,o.class,{[`${l.value}-icon-only`]:ge.length===0&&!!We}],onClick:Y,onMousedown:le});C.value||delete wt.disabled;const vo=Le&&!E.value?Le:u.createVNode(mQ,{existIcon:!!Le,prefixCls:l.value,loading:!!E.value},null),Ne=ge.map(ht=>me(ht,A&&B.value));if(ye!==void 0)return O(u.createVNode("a",Ke(Ke({},wt),{},{href:ye,target:Se,ref:k}),[vo,Ne]));let mn=u.createVNode("button",Ke(Ke({},wt),{},{ref:k,type:Te}),[vo,Ne]);if(!Iu($e)){const ht=function(){return mn}();mn=u.createVNode(hQ,{ref:"wave",disabled:!!E.value},{default:()=>[ht]})}return O(mn)}}});qr.Group=xp,qr.install=function(n){return n.component(qr.name,qr),n.component(xp.name,xp),n};const QQ=()=>Vo()&&window.document.documentElement;let Qu=q({},Qr.Modal);function DQ(n){n?Qu=q(q({},Qu),n):Qu=q({},Qr.Modal)}function BQ(){return Qu}const wp="internalMark",Du=u.defineComponent({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(n,e){let{slots:t}=e;Ja(n.ANT_MARK__===wp,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");const o=u.reactive({antLocale:q(q({},n.locale),{exist:!0}),ANT_MARK__:wp});return u.provide("localeData",o),u.watch(()=>n.locale,r=>{DQ(r&&r.Modal),o.antLocale=q(q({},r),{exist:!0})},{immediate:!0}),()=>{var r;return(r=t.default)===null||r===void 0?void 0:r.call(t)}}});Du.install=function(n){return n.component(Du.name,Du),n};const LQ=vh(Du),Bu=u.defineComponent({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(n,e){let{attrs:t,slots:o}=e,r,a=!1;const l=u.computed(()=>n.duration===void 0?4.5:n.duration),f=()=>{l.value&&!a&&(r=setTimeout(()=>{g()},l.value*1e3))},h=()=>{r&&(clearTimeout(r),r=null)},g=v=>{v&&v.stopPropagation(),h();const{onClose:b,noticeKey:x}=n;b&&b(x)},O=()=>{h(),f()};return u.onMounted(()=>{f()}),u.onUnmounted(()=>{a=!0,h()}),u.watch([l,()=>n.updateMark,()=>n.visible],(v,b)=>{let[x,C,k]=v,[L,A,E]=b;(x!==L||C!==A||k!==E&&E)&&O()},{flush:"post"}),()=>{var v,b;const{prefixCls:x,closable:C,closeIcon:k=(v=o.closeIcon)===null||v===void 0?void 0:v.call(o),onClick:L,holder:A}=n,{class:E,style:F}=t,B=`${x}-notice`,I=Object.keys(t).reduce((V,j)=>((j.startsWith("data-")||j.startsWith("aria-")||j==="role")&&(V[j]=t[j]),V),{}),K=u.createVNode("div",Ke({class:Bt(B,E,{[`${B}-closable`]:C}),style:F,onMouseenter:h,onMouseleave:f,onClick:L},I),[u.createVNode("div",{class:`${B}-content`},[(b=o.default)===null||b===void 0?void 0:b.call(o)]),C?u.createVNode("a",{tabindex:0,onClick:g,class:`${B}-close`},[k||u.createVNode("span",{class:`${B}-close-x`},null)]):null]);return A?u.createVNode(u.Teleport,{to:A},{default:()=>K}):K}}});var VQ=function(n,e){var t={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(t[o[r]]=n[o[r]]);return t};let Zb=0;const jQ=Date.now();function Wb(){const n=Zb;return Zb+=1,`rcNotification_${jQ}_${n}`}const Lu=u.defineComponent({name:"Notification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId"],setup(n,e){let{attrs:t,expose:o,slots:r}=e;const a=new Map,l=u.ref([]),f=u.computed(()=>{const{prefixCls:O,animation:v="fade"}=n;let b=n.transitionName;return!b&&v&&(b=`${O}-${v}`),Gy(b)}),h=(O,v)=>{const b=O.key||Wb(),x=q(q({},O),{key:b}),{maxCount:C}=n,k=l.value.map(A=>A.notice.key).indexOf(b),L=l.value.concat();k!==-1?L.splice(k,1,{notice:x,holderCallback:v}):(C&&l.value.length>=C&&(x.key=L[0].notice.key,x.updateMark=Wb(),x.userPassKey=b,L.shift()),L.push({notice:x,holderCallback:v})),l.value=L},g=O=>{l.value=u.toRaw(l.value).filter(v=>{let{notice:{key:b,userPassKey:x}}=v;return(x||b)!==O})};return o({add:h,remove:g,notices:l}),()=>{var O;const{prefixCls:v,closeIcon:b=(O=r.closeIcon)===null||O===void 0?void 0:O.call(r,{prefixCls:v})}=n,x=l.value.map((k,L)=>{let{notice:A,holderCallback:E}=k;const F=L===l.value.length-1?A.updateMark:void 0,{key:B,userPassKey:I}=A,{content:K}=A,V=q(q(q({prefixCls:v,closeIcon:typeof b=="function"?b({prefixCls:v}):b},A),A.props),{key:B,noticeKey:I||B,updateMark:F,onClose:j=>{var R;g(j),(R=A.onClose)===null||R===void 0||R.call(A)},onClick:A.onClick});return E?u.createVNode("div",{key:B,class:`${v}-hook-holder`,ref:j=>{typeof B>"u"||(j?(a.set(B,j),E(j,V)):a.delete(B))}},null):u.createVNode(Bu,Ke(Ke({},V),{},{class:Bt(V.class,n.hashId)}),{default:()=>[typeof K=="function"?K({prefixCls:v}):K]})}),C={[v]:1,[t.class]:!!t.class,[n.hashId]:!0};return u.createVNode("div",{class:C,style:t.style||{top:"65px",left:"50%"}},[u.createVNode(u.TransitionGroup,Ke({tag:"div"},f.value),{default:()=>[x]})])}}});Lu.newInstance=function(e,t){const o=e||{},{name:r="notification",getContainer:a,appContext:l,prefixCls:f,rootPrefixCls:h,transitionName:g,hasTransitionName:O,useStyle:v}=o,b=VQ(o,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),x=document.createElement("div");a?a().appendChild(x):document.body.appendChild(x);const C=u.defineComponent({compatConfig:{MODE:3},name:"NotificationWrapper",setup(L,A){let{attrs:E}=A;const F=u.shallowRef(),B=u.computed(()=>wn.getPrefixCls(r,f)),[,I]=v(B);return u.onMounted(()=>{t({notice(K){var V;(V=F.value)===null||V===void 0||V.add(K)},removeNotice(K){var V;(V=F.value)===null||V===void 0||V.remove(K)},destroy(){u.render(null,x),x.parentNode&&x.parentNode.removeChild(x)},component:F})}),()=>{const K=wn,V=K.getRootPrefixCls(h,B.value),j=O?g:`${B.value}-${g}`;return u.createVNode(O1,Ke(Ke({},K),{},{prefixCls:V}),{default:()=>[u.createVNode(Lu,Ke(Ke({ref:F},E),{},{prefixCls:B.value,transitionName:j,hashId:I.value}),null)]})}}}),k=u.createVNode(C,b);k.appContext=l||k.appContext,u.render(k,x)};let zb=0;const FQ=Date.now();function Ub(){const n=zb;return zb+=1,`rcNotification_${FQ}_${n}`}const ZQ=u.defineComponent({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(n,e){let{attrs:t,slots:o}=e;const r=new Map,a=u.computed(()=>n.notices),l=u.computed(()=>{let O=n.transitionName;if(!O&&n.animation)switch(typeof n.animation){case"string":O=n.animation;break;case"function":O=n.animation().name;break;case"object":O=n.animation.name;break;default:O=`${n.prefixCls}-fade`;break}return Gy(O)}),f=O=>n.remove(O),h=u.ref({});u.watch(a,()=>{const O={};Object.keys(h.value).forEach(v=>{O[v]=[]}),n.notices.forEach(v=>{const{placement:b="topRight"}=v.notice;b&&(O[b]=O[b]||[],O[b].push(v))}),h.value=O});const g=u.computed(()=>Object.keys(h.value));return()=>{var O;const{prefixCls:v,closeIcon:b=(O=o.closeIcon)===null||O===void 0?void 0:O.call(o,{prefixCls:v})}=n,x=g.value.map(C=>{var k,L;const A=h.value[C],E=(k=n.getClassName)===null||k===void 0?void 0:k.call(n,C),F=(L=n.getStyles)===null||L===void 0?void 0:L.call(n,C),B=A.map((V,j)=>{let{notice:R,holderCallback:Y}=V;const le=j===a.value.length-1?R.updateMark:void 0,{key:me,userPassKey:ze}=R,{content:we}=R,se=q(q(q({prefixCls:v,closeIcon:typeof b=="function"?b({prefixCls:v}):b},R),R.props),{key:me,noticeKey:ze||me,updateMark:le,onClose:Oe=>{var Le;f(Oe),(Le=R.onClose)===null||Le===void 0||Le.call(R)},onClick:R.onClick});return Y?u.createVNode("div",{key:me,class:`${v}-hook-holder`,ref:Oe=>{typeof me>"u"||(Oe?(r.set(me,Oe),Y(Oe,se)):r.delete(me))}},null):u.createVNode(Bu,Ke(Ke({},se),{},{class:Bt(se.class,n.hashId)}),{default:()=>[typeof we=="function"?we({prefixCls:v}):we]})}),I={[v]:1,[`${v}-${C}`]:1,[t.class]:!!t.class,[n.hashId]:!0,[E]:!!E};function K(){var V;A.length>0||(Reflect.deleteProperty(h.value,C),(V=n.onAllRemoved)===null||V===void 0||V.call(n))}return u.createVNode("div",{key:C,class:I,style:t.style||F||{top:"65px",left:"50%"}},[u.createVNode(u.TransitionGroup,Ke(Ke({tag:"div"},l.value),{},{onAfterLeave:K}),{default:()=>[B]})])});return u.createVNode($y,{getContainer:n.getContainer},{default:()=>[x]})}}});var WQ=function(n,e){var t={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(t[o[r]]=n[o[r]]);return t};const zQ=()=>document.body;let Hb=0;function UQ(){const n={};for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.forEach(r=>{r&&Object.keys(r).forEach(a=>{const l=r[a];l!==void 0&&(n[a]=l)})}),n}function Yb(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:e=zQ,motion:t,prefixCls:o,maxCount:r,getClassName:a,getStyles:l,onAllRemoved:f}=n,h=WQ(n,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),g=u.shallowRef([]),O=u.shallowRef(),v=(A,E)=>{const F=A.key||Ub(),B=q(q({},A),{key:F}),I=g.value.map(V=>V.notice.key).indexOf(F),K=g.value.concat();I!==-1?K.splice(I,1,{notice:B,holderCallback:E}):(r&&g.value.length>=r&&(B.key=K[0].notice.key,B.updateMark=Ub(),B.userPassKey=F,K.shift()),K.push({notice:B,holderCallback:E})),g.value=K},b=A=>{g.value=g.value.filter(E=>{let{notice:{key:F,userPassKey:B}}=E;return(B||F)!==A})},x=()=>{g.value=[]},C=()=>u.createVNode(ZQ,{ref:O,prefixCls:o,maxCount:r,notices:g.value,remove:b,getClassName:a,getStyles:l,animation:t,hashId:n.hashId,onAllRemoved:f,getContainer:e},null),k=u.shallowRef([]),L={open:A=>{const E=UQ(h,A);(E.key===null||E.key===void 0)&&(E.key=`vc-notification-${Hb}`,Hb+=1),k.value=[...k.value,{type:"open",config:E}]},close:A=>{k.value=[...k.value,{type:"close",key:A}]},destroy:()=>{k.value=[...k.value,{type:"destroy"}]}};return u.watch(k,()=>{k.value.length&&(k.value.forEach(A=>{switch(A.type){case"open":v(A.config);break;case"close":b(A.key);break;case"destroy":x();break}}),k.value=[])}),[L,C]}const HQ=n=>{const{componentCls:e,iconCls:t,boxShadowSecondary:o,colorBgElevated:r,colorSuccess:a,colorError:l,colorWarning:f,colorInfo:h,fontSizeLG:g,motionEaseInOutCirc:O,motionDurationSlow:v,marginXS:b,paddingXS:x,borderRadiusLG:C,zIndexPopup:k,messageNoticeContentPadding:L}=n,A=new Ht("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:x,transform:"translateY(0)",opacity:1}}),E=new Ht("MessageMoveOut",{"0%":{maxHeight:n.height,padding:x,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[e]:q(q({},Xh(n)),{position:"fixed",top:b,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:k,[`${e}-move-up`]:{animationFillMode:"forwards"},[`
|
|
307
|
-
${e}-move-up-appear,
|
|
308
|
-
${e}-move-up-enter
|
|
309
|
-
`]:{animationName:A,animationDuration:v,animationPlayState:"paused",animationTimingFunction:O},[`
|
|
310
|
-
${e}-move-up-appear${e}-move-up-appear-active,
|
|
311
|
-
${e}-move-up-enter${e}-move-up-enter-active
|
|
312
|
-
`]:{animationPlayState:"running"},[`${e}-move-up-leave`]:{animationName:E,animationDuration:v,animationPlayState:"paused",animationTimingFunction:O},[`${e}-move-up-leave${e}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[`${e}-notice`]:{padding:x,textAlign:"center",[t]:{verticalAlign:"text-bottom",marginInlineEnd:b,fontSize:g},[`${e}-notice-content`]:{display:"inline-block",padding:L,background:r,borderRadius:C,boxShadow:o,pointerEvents:"all"},[`${e}-success ${t}`]:{color:a},[`${e}-error ${t}`]:{color:l},[`${e}-warning ${t}`]:{color:f},[`
|
|
313
|
-
${e}-info ${t},
|
|
314
|
-
${e}-loading ${t}`]:{color:h}}},{[`${e}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},Sp=Fr("Message",n=>{const e=Ki(n,{messageNoticeContentPadding:`${(n.controlHeightLG-n.fontSize*n.lineHeight)/2}px ${n.paddingSM}px`});return[HQ(e)]},n=>({height:150,zIndexPopup:n.zIndexPopupBase+10})),YQ={info:u.createVNode($r,null,null),success:u.createVNode(Kr,null,null),error:u.createVNode(Gr,null,null),warning:u.createVNode(Jr,null,null),loading:u.createVNode(Xr,null,null)},Xb=u.defineComponent({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(n,e){let{slots:t}=e;return()=>{var o;return u.createVNode("div",{class:Bt(`${n.prefixCls}-custom-content`,`${n.prefixCls}-${n.type}`)},[n.icon||YQ[n.type],u.createVNode("span",null,[(o=t.default)===null||o===void 0?void 0:o.call(t)])])}}});u.defineComponent({name:"PurePanel",inheritAttrs:!1,props:["prefixCls","class","type","icon","content"],setup(n,e){let{slots:t,attrs:o}=e;var r;const{getPrefixCls:a}=au(),l=u.computed(()=>n.prefixCls||a("message")),[,f]=Sp(l);return u.createVNode(Bu,Ke(Ke({},o),{},{prefixCls:l.value,class:Bt(f.value,`${l.value}-notice-pure-panel`),noticeKey:"pure",duration:null}),{default:()=>[u.createVNode(Xb,{prefixCls:l.value,type:n.type,icon:n.icon},{default:()=>[(r=t.default)===null||r===void 0?void 0:r.call(t)]})]})}});var XQ=function(n,e){var t={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(t[o[r]]=n[o[r]]);return t};const GQ=8,KQ=3,JQ=u.defineComponent({name:"Holder",inheritAttrs:!1,props:["top","prefixCls","getContainer","maxCount","duration","rtl","transitionName","onAllRemoved","animation","staticGetContainer"],setup(n,e){let{expose:t}=e;var o,r;const{getPrefixCls:a,getPopupContainer:l}=ri("message",n),f=u.computed(()=>a("message",n.prefixCls)),[,h]=Sp(f),g=()=>{var k;const L=(k=n.top)!==null&&k!==void 0?k:GQ;return{left:"50%",transform:"translateX(-50%)",top:typeof L=="number"?`${L}px`:L}},O=()=>Bt(h.value,n.rtl?`${f.value}-rtl`:""),v=()=>{var k;return XM({prefixCls:f.value,animation:(k=n.animation)!==null&&k!==void 0?k:"move-up",transitionName:n.transitionName})},b=u.createVNode("span",{class:`${f.value}-close-x`},[u.createVNode(is,{class:`${f.value}-close-icon`},null)]),[x,C]=Yb({getStyles:g,prefixCls:f.value,getClassName:O,motion:v,closable:!1,closeIcon:b,duration:(o=n.duration)!==null&&o!==void 0?o:KQ,getContainer:(r=n.staticGetContainer)!==null&&r!==void 0?r:l.value,maxCount:n.maxCount,onAllRemoved:n.onAllRemoved});return t(q(q({},x),{prefixCls:f,hashId:h})),C}});let Gb=0;function $Q(n){const e=u.shallowRef(null),t=Symbol("messageHolderKey"),o=h=>{var g;(g=e.value)===null||g===void 0||g.close(h)},r=h=>{if(!e.value){const I=()=>{};return I.then=()=>{},I}const{open:g,prefixCls:O,hashId:v}=e.value,b=`${O}-notice`,{content:x,icon:C,type:k,key:L,class:A,onClose:E}=h,F=XQ(h,["content","icon","type","key","class","onClose"]);let B=L;return B==null&&(Gb+=1,B=`antd-message-${Gb}`),C5(I=>(g(q(q({},F),{key:B,content:()=>u.createVNode(Xb,{prefixCls:O,type:k,icon:typeof C=="function"?C():C},{default:()=>[typeof x=="function"?x():x]}),placement:"top",class:Bt(k&&`${b}-${k}`,v,A),onClose:()=>{E?.(),I()}})),()=>{o(B)}))},l={open:r,destroy:h=>{var g;h!==void 0?o(h):(g=e.value)===null||g===void 0||g.destroy()}};return["info","success","warning","error","loading"].forEach(h=>{const g=(O,v,b)=>{let x;O&&typeof O=="object"&&"content"in O?x=O:x={content:O};let C,k;typeof v=="function"?k=v:(C=v,k=b);const L=q(q({onClose:k,duration:C},x),{type:h});return r(L)};l[h]=g}),[l,()=>u.createVNode(JQ,Ke(Ke({key:t},n),{},{ref:e}),null)]}function qQ(n){return $Q(n)}let Kb=3,Jb,Fn,e6=1,$b="",qb="move-up",e1=!1,t1=()=>document.body,n1,o1=!1;function t6(){return e6++}function n6(n){n.top!==void 0&&(Jb=n.top,Fn=null),n.duration!==void 0&&(Kb=n.duration),n.prefixCls!==void 0&&($b=n.prefixCls),n.getContainer!==void 0&&(t1=n.getContainer,Fn=null),n.transitionName!==void 0&&(qb=n.transitionName,Fn=null,e1=!0),n.maxCount!==void 0&&(n1=n.maxCount,Fn=null),n.rtl!==void 0&&(o1=n.rtl)}function o6(n,e){if(Fn){e(Fn);return}Lu.newInstance({appContext:n.appContext,prefixCls:n.prefixCls||$b,rootPrefixCls:n.rootPrefixCls,transitionName:qb,hasTransitionName:e1,style:{top:Jb},getContainer:t1||n.getPopupContainer,maxCount:n1,name:"message",useStyle:Sp},t=>{if(Fn){e(Fn);return}Fn=t,e(t)})}const i1={info:$r,success:Kr,error:Gr,warning:Jr,loading:Xr},i6=Object.keys(i1);function r6(n){const e=n.duration!==void 0?n.duration:Kb,t=n.key||t6(),o=new Promise(a=>{const l=()=>(typeof n.onClose=="function"&&n.onClose(),a(!0));o6(n,f=>{f.notice({key:t,duration:e,style:n.style||{},class:n.class,content:h=>{let{prefixCls:g}=h;const O=i1[n.type],v=O?u.createVNode(O,null,null):"",b=Bt(`${g}-custom-content`,{[`${g}-${n.type}`]:n.type,[`${g}-rtl`]:o1===!0});return u.createVNode("div",{class:b},[typeof n.icon=="function"?n.icon():n.icon||v,u.createVNode("span",null,[typeof n.content=="function"?n.content():n.content])])},onClose:l,onClick:n.onClick})})}),r=()=>{Fn&&Fn.removeNotice(t)};return r.then=(a,l)=>o.then(a,l),r.promise=o,r}function a6(n){return Object.prototype.toString.call(n)==="[object Object]"&&!!n.content}const rs={open:r6,config:n6,destroy(n){if(Fn)if(n){const{removeNotice:e}=Fn;e(n)}else{const{destroy:e}=Fn;e(),Fn=null}}};function s6(n,e){n[e]=(t,o,r)=>a6(t)?n.open(q(q({},t),{type:e})):(typeof o=="function"&&(r=o,o=void 0),n.open({content:t,duration:o,type:e,onClose:r}))}i6.forEach(n=>s6(rs,n)),rs.warn=rs.warning,rs.useMessage=qQ;const l6=n=>{const{componentCls:e,width:t,notificationMarginEdge:o}=n,r=new Ht("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),a=new Ht("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),l=new Ht("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:t},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${e}-top, &${e}-bottom`]:{marginInline:0},[`&${e}-top`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:r}},[`&${e}-bottom`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:a}},[`&${e}-topLeft, &${e}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:o,[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:l}}}},c6=n=>{const{iconCls:e,componentCls:t,boxShadowSecondary:o,fontSizeLG:r,notificationMarginBottom:a,borderRadiusLG:l,colorSuccess:f,colorInfo:h,colorWarning:g,colorError:O,colorTextHeading:v,notificationBg:b,notificationPadding:x,notificationMarginEdge:C,motionDurationMid:k,motionEaseInOut:L,fontSize:A,lineHeight:E,width:F,notificationIconSize:B}=n,I=`${t}-notice`,K=new Ht("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:F},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),V=new Ht("antNotificationFadeOut",{"0%":{maxHeight:n.animationMaxHeight,marginBottom:a,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:q(q(q(q({},Xh(n)),{position:"fixed",zIndex:n.zIndexPopup,marginInlineEnd:C,[`${t}-hook-holder`]:{position:"relative"},[`&${t}-top, &${t}-bottom`]:{[`${t}-notice`]:{marginInline:"auto auto"}},[`&${t}-topLeft, &${t}-bottomLeft`]:{[`${t}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:n.motionDurationMid,animationTimingFunction:L,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${t}-fade-leave`]:{animationTimingFunction:L,animationFillMode:"both",animationDuration:k,animationPlayState:"paused"},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:K,animationPlayState:"running"},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:V,animationPlayState:"running"}}),l6(n)),{"&-rtl":{direction:"rtl",[`${t}-notice-btn`]:{float:"left"}}})},{[I]:{position:"relative",width:F,maxWidth:`calc(100vw - ${C*2}px)`,marginBottom:a,marginInlineStart:"auto",padding:x,overflow:"hidden",lineHeight:E,wordWrap:"break-word",background:b,borderRadius:l,boxShadow:o,[`${t}-close-icon`]:{fontSize:A,cursor:"pointer"},[`${I}-message`]:{marginBottom:n.marginXS,color:v,fontSize:r,lineHeight:n.lineHeightLG},[`${I}-description`]:{fontSize:A},[`&${I}-closable ${I}-message`]:{paddingInlineEnd:n.paddingLG},[`${I}-with-icon ${I}-message`]:{marginBottom:n.marginXS,marginInlineStart:n.marginSM+B,fontSize:r},[`${I}-with-icon ${I}-description`]:{marginInlineStart:n.marginSM+B,fontSize:A},[`${I}-icon`]:{position:"absolute",fontSize:B,lineHeight:0,[`&-success${e}`]:{color:f},[`&-info${e}`]:{color:h},[`&-warning${e}`]:{color:g},[`&-error${e}`]:{color:O}},[`${I}-close`]:{position:"absolute",top:n.notificationPaddingVertical,insetInlineEnd:n.notificationPaddingHorizontal,color:n.colorIcon,outline:"none",width:n.notificationCloseButtonSize,height:n.notificationCloseButtonSize,borderRadius:n.borderRadiusSM,transition:`background-color ${n.motionDurationMid}, color ${n.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:n.colorIconHover,backgroundColor:n.wireframe?"transparent":n.colorFillContent}},[`${I}-btn`]:{float:"right",marginTop:n.marginSM}}},{[`${I}-pure-panel`]:{margin:0}}]},Cp=Fr("Notification",n=>{const e=n.paddingMD,t=n.paddingLG,o=Ki(n,{notificationBg:n.colorBgElevated,notificationPaddingVertical:e,notificationPaddingHorizontal:t,notificationPadding:`${n.paddingMD}px ${n.paddingContentHorizontalLG}px`,notificationMarginBottom:n.margin,notificationMarginEdge:n.marginLG,animationMaxHeight:150,notificationIconSize:n.fontSizeLG*n.lineHeightLG,notificationCloseButtonSize:n.controlHeightLG*.55});return[c6(o)]},n=>({zIndexPopup:n.zIndexPopupBase+50,width:384}));function r1(n,e){return e||u.createVNode("span",{class:`${n}-close-x`},[u.createVNode(is,{class:`${n}-close-icon`},null)])}u.createVNode($r,null,null),u.createVNode(Kr,null,null),u.createVNode(Gr,null,null),u.createVNode(Jr,null,null),u.createVNode(Xr,null,null);const u6={success:Kr,info:$r,error:Gr,warning:Jr};function a1(n){let{prefixCls:e,icon:t,type:o,message:r,description:a,btn:l}=n,f=null;if(t)f=u.createVNode("span",{class:`${e}-icon`},[Ya(t)]);else if(o){const h=u6[o];f=u.createVNode(h,{class:`${e}-icon ${e}-icon-${o}`},null)}return u.createVNode("div",{class:Bt({[`${e}-with-icon`]:f}),role:"alert"},[f,u.createVNode("div",{class:`${e}-message`},[r]),u.createVNode("div",{class:`${e}-description`},[a]),l&&u.createVNode("div",{class:`${e}-btn`},[l])])}u.defineComponent({name:"PurePanel",inheritAttrs:!1,props:["prefixCls","icon","type","message","description","btn","closeIcon"],setup(n){const{getPrefixCls:e}=ri("notification",n),t=u.computed(()=>n.prefixCls||e("notification")),o=u.computed(()=>`${t.value}-notice`),[,r]=Cp(t);return()=>u.createVNode(Bu,Ke(Ke({},n),{},{prefixCls:t.value,class:Bt(r.value,`${o.value}-pure-panel`),noticeKey:"pure",duration:null,closable:n.closable,closeIcon:r1(t.value,n.closeIcon)}),{default:()=>[u.createVNode(a1,{prefixCls:o.value,icon:n.icon,type:n.type,message:n.message,description:n.description,btn:n.btn},null)]})}});function s1(n,e,t){let o;switch(e=typeof e=="number"?`${e}px`:e,t=typeof t=="number"?`${t}px`:t,n){case"top":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:e,bottom:"auto"};break;case"topLeft":o={left:0,top:e,bottom:"auto"};break;case"topRight":o={right:0,top:e,bottom:"auto"};break;case"bottom":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:t};break;case"bottomLeft":o={left:0,top:"auto",bottom:t};break;default:o={right:0,top:"auto",bottom:t};break}return o}function d6(n){return{name:`${n}-fade`}}var f6=function(n,e){var t={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(t[o[r]]=n[o[r]]);return t};const l1=24,h6=4.5,p6=u.defineComponent({name:"Holder",inheritAttrs:!1,props:["prefixCls","class","type","icon","content","onAllRemoved"],setup(n,e){let{expose:t}=e;const{getPrefixCls:o,getPopupContainer:r}=ri("notification",n),a=u.computed(()=>n.prefixCls||o("notification")),l=b=>{var x,C;return s1(b,(x=n.top)!==null&&x!==void 0?x:l1,(C=n.bottom)!==null&&C!==void 0?C:l1)},[,f]=Cp(a),h=()=>Bt(f.value,{[`${a.value}-rtl`]:n.rtl}),g=()=>d6(a.value),[O,v]=Yb({prefixCls:a.value,getStyles:l,getClassName:h,motion:g,closable:!0,closeIcon:r1(a.value),duration:h6,getContainer:()=>{var b,x;return((b=n.getPopupContainer)===null||b===void 0?void 0:b.call(n))||((x=r.value)===null||x===void 0?void 0:x.call(r))||document.body},maxCount:n.maxCount,hashId:f.value,onAllRemoved:n.onAllRemoved});return t(q(q({},O),{prefixCls:a.value,hashId:f})),v}});function m6(n){const e=u.shallowRef(null),t=Symbol("notificationHolderKey"),o=f=>{if(!e.value)return;const{open:h,prefixCls:g,hashId:O}=e.value,v=`${g}-notice`,{message:b,description:x,icon:C,type:k,btn:L,class:A}=f,E=f6(f,["message","description","icon","type","btn","class"]);return h(q(q({placement:"topRight"},E),{content:()=>u.createVNode(a1,{prefixCls:v,icon:typeof C=="function"?C():C,type:k,message:typeof b=="function"?b():b,description:typeof x=="function"?x():x,btn:typeof L=="function"?L():L},null),class:Bt(k&&`${v}-${k}`,O,A)}))},a={open:o,destroy:f=>{var h,g;f!==void 0?(h=e.value)===null||h===void 0||h.close(f):(g=e.value)===null||g===void 0||g.destroy()}};return["success","info","warning","error"].forEach(f=>{a[f]=h=>o(q(q({},h),{type:f}))}),[a,()=>u.createVNode(p6,Ke(Ke({key:t},n),{},{ref:e}),null)]}function g6(n){return m6(n)}const ea={};let c1=4.5,u1="24px",d1="24px",kp="",f1="topRight",h1=()=>document.body,p1=null,Pp=!1,m1;function O6(n){const{duration:e,placement:t,bottom:o,top:r,getContainer:a,closeIcon:l,prefixCls:f}=n;f!==void 0&&(kp=f),e!==void 0&&(c1=e),t!==void 0&&(f1=t),o!==void 0&&(d1=typeof o=="number"?`${o}px`:o),r!==void 0&&(u1=typeof r=="number"?`${r}px`:r),a!==void 0&&(h1=a),l!==void 0&&(p1=l),n.rtl!==void 0&&(Pp=n.rtl),n.maxCount!==void 0&&(m1=n.maxCount)}function v6(n,e){let{prefixCls:t,placement:o=f1,getContainer:r=h1,top:a,bottom:l,closeIcon:f=p1,appContext:h}=n;const{getPrefixCls:g}=T6(),O=g("notification",t||kp),v=`${O}-${o}-${Pp}`,b=ea[v];if(b){Promise.resolve(b).then(C=>{e(C)});return}const x=Bt(`${O}-${o}`,{[`${O}-rtl`]:Pp===!0});Lu.newInstance({name:"notification",prefixCls:t||kp,useStyle:Cp,class:x,style:s1(o,a??u1,l??d1),appContext:h,getContainer:r,closeIcon:C=>{let{prefixCls:k}=C;return u.createVNode("span",{class:`${k}-close-x`},[Ya(f,{},u.createVNode(is,{class:`${k}-close-icon`},null))])},maxCount:m1,hasTransitionName:!0},C=>{ea[v]=C,e(C)})}const y6={success:fp,info:pp,error:mp,warning:hp};function b6(n){const{icon:e,type:t,description:o,message:r,btn:a}=n,l=n.duration===void 0?c1:n.duration;v6(n,f=>{f.notice({content:h=>{let{prefixCls:g}=h;const O=`${g}-notice`;let v=null;if(e)v=()=>u.createVNode("span",{class:`${O}-icon`},[Ya(e)]);else if(t){const b=y6[t];v=()=>u.createVNode(b,{class:`${O}-icon ${O}-icon-${t}`},null)}return u.createVNode("div",{class:v?`${O}-with-icon`:""},[v&&v(),u.createVNode("div",{class:`${O}-message`},[!o&&v?u.createVNode("span",{class:`${O}-message-single-line-auto-margin`},null):null,Ya(r)]),u.createVNode("div",{class:`${O}-description`},[Ya(o)]),a?u.createVNode("span",{class:`${O}-btn`},[Ya(a)]):null])},duration:l,closable:!0,onClose:n.onClose,onClick:n.onClick,key:n.key,style:n.style||{},class:n.class})})}const as={open:b6,close(n){Object.keys(ea).forEach(e=>Promise.resolve(ea[e]).then(t=>{t.removeNotice(n)}))},config:O6,destroy(){Object.keys(ea).forEach(n=>{Promise.resolve(ea[n]).then(e=>{e.destroy()}),delete ea[n]})}};["success","info","warning","error"].forEach(n=>{as[n]=e=>as.open(q(q({},e),{type:n}))}),as.warn=as.warning,as.useNotification=g6;const x6=`-ant-${Date.now()}-${Math.random()}`;function w6(n,e){const t={},o=(l,f)=>{let h=l.clone();return h=f?.(h)||h,h.toRgbString()},r=(l,f)=>{const h=new xn(l),g=jr(h.toRgbString());t[`${f}-color`]=o(h),t[`${f}-color-disabled`]=g[1],t[`${f}-color-hover`]=g[4],t[`${f}-color-active`]=g[6],t[`${f}-color-outline`]=h.clone().setAlpha(.2).toRgbString(),t[`${f}-color-deprecated-bg`]=g[0],t[`${f}-color-deprecated-border`]=g[2]};if(e.primaryColor){r(e.primaryColor,"primary");const l=new xn(e.primaryColor),f=jr(l.toRgbString());f.forEach((g,O)=>{t[`primary-${O+1}`]=g}),t["primary-color-deprecated-l-35"]=o(l,g=>g.lighten(35)),t["primary-color-deprecated-l-20"]=o(l,g=>g.lighten(20)),t["primary-color-deprecated-t-20"]=o(l,g=>g.tint(20)),t["primary-color-deprecated-t-50"]=o(l,g=>g.tint(50)),t["primary-color-deprecated-f-12"]=o(l,g=>g.setAlpha(g.getAlpha()*.12));const h=new xn(f[0]);t["primary-color-active-deprecated-f-30"]=o(h,g=>g.setAlpha(g.getAlpha()*.3)),t["primary-color-active-deprecated-d-02"]=o(h,g=>g.darken(2))}return e.successColor&&r(e.successColor,"success"),e.warningColor&&r(e.warningColor,"warning"),e.errorColor&&r(e.errorColor,"error"),e.infoColor&&r(e.infoColor,"info"),`
|
|
315
|
-
:root {
|
|
316
|
-
${Object.keys(t).map(l=>`--${n}-${l}: ${t[l]};`).join(`
|
|
317
|
-
`)}
|
|
318
|
-
}
|
|
319
|
-
`.trim()}function S6(n,e){const t=w6(n,e);Vo()?gl(t,`${x6}-dynamic-theme`):Ja(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const C6=n=>{const[e,t]=xl();return Lh(u.computed(()=>({theme:e.value,token:t.value,hashId:"",path:["ant-design-icons",n.value]})),()=>[{[`.${n.value}`]:q(q({},fM()),{[`.${n.value} .${n.value}-icon`]:{display:"block"}})}])};function k6(n,e){const t=u.computed(()=>n?.value||{}),o=u.computed(()=>t.value.inherit===!1||!e?.value?iy:e.value);return u.computed(()=>{if(!n?.value)return e?.value;const a=q({},o.value.components);return Object.keys(n.value.components||{}).forEach(l=>{a[l]=q(q({},a[l]),n.value.components[l])}),q(q(q({},o.value),t.value),{token:q(q({},o.value.token),t.value.token),components:a})})}var P6=function(n,e){var t={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(t[o[r]]=n[o[r]]);return t};const _6="ant";function ss(){return wn.prefixCls||_6}function g1(){return wn.iconPrefixCls||bh}const _p=u.reactive({}),wn=u.reactive({});u.watchEffect(()=>{q(wn,_p),wn.prefixCls=ss(),wn.iconPrefixCls=g1(),wn.getPrefixCls=(n,e)=>e||(n?`${wn.prefixCls}-${n}`:wn.prefixCls),wn.getRootPrefixCls=()=>wn.prefixCls?wn.prefixCls:ss()});let Ep;const E6=n=>{Ep&&Ep(),Ep=u.watchEffect(()=>{q(_p,u.reactive(n)),q(wn,u.reactive(n))}),n.theme&&S6(ss(),n.theme)},T6=()=>({getPrefixCls:(n,e)=>e||(n?`${ss()}-${n}`:ss()),getIconPrefixCls:g1,getRootPrefixCls:()=>wn.prefixCls?wn.prefixCls:ss()}),Nl=u.defineComponent({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:A5(),setup(n,e){let{slots:t}=e;const o=au(),r=(se,Oe)=>{const{prefixCls:Le="ant"}=n;if(Oe)return Oe;const ge=Le||o.getPrefixCls("");return se?`${ge}-${se}`:ge},a=u.computed(()=>n.iconPrefixCls||o.iconPrefixCls.value||bh),l=u.computed(()=>a.value!==o.iconPrefixCls.value),f=u.computed(()=>{var se;return n.csp||((se=o.csp)===null||se===void 0?void 0:se.value)}),h=C6(a),g=k6(u.computed(()=>n.theme),u.computed(()=>{var se;return(se=o.theme)===null||se===void 0?void 0:se.value})),O=se=>(n.renderEmpty||t.renderEmpty||o.renderEmpty||PM)(se),v=u.computed(()=>{var se,Oe;return(se=n.autoInsertSpaceInButton)!==null&&se!==void 0?se:(Oe=o.autoInsertSpaceInButton)===null||Oe===void 0?void 0:Oe.value}),b=u.computed(()=>{var se;return n.locale||((se=o.locale)===null||se===void 0?void 0:se.value)});u.watch(b,()=>{_p.locale=b.value},{immediate:!0});const x=u.computed(()=>{var se;return n.direction||((se=o.direction)===null||se===void 0?void 0:se.value)}),C=u.computed(()=>{var se,Oe;return(se=n.space)!==null&&se!==void 0?se:(Oe=o.space)===null||Oe===void 0?void 0:Oe.value}),k=u.computed(()=>{var se,Oe;return(se=n.virtual)!==null&&se!==void 0?se:(Oe=o.virtual)===null||Oe===void 0?void 0:Oe.value}),L=u.computed(()=>{var se,Oe;return(se=n.dropdownMatchSelectWidth)!==null&&se!==void 0?se:(Oe=o.dropdownMatchSelectWidth)===null||Oe===void 0?void 0:Oe.value}),A=u.computed(()=>{var se;return n.getTargetContainer!==void 0?n.getTargetContainer:(se=o.getTargetContainer)===null||se===void 0?void 0:se.value}),E=u.computed(()=>{var se;return n.getPopupContainer!==void 0?n.getPopupContainer:(se=o.getPopupContainer)===null||se===void 0?void 0:se.value}),F=u.computed(()=>{var se;return n.pageHeader!==void 0?n.pageHeader:(se=o.pageHeader)===null||se===void 0?void 0:se.value}),B=u.computed(()=>{var se;return n.input!==void 0?n.input:(se=o.input)===null||se===void 0?void 0:se.value}),I=u.computed(()=>{var se;return n.pagination!==void 0?n.pagination:(se=o.pagination)===null||se===void 0?void 0:se.value}),K=u.computed(()=>{var se;return n.form!==void 0?n.form:(se=o.form)===null||se===void 0?void 0:se.value}),V=u.computed(()=>{var se;return n.select!==void 0?n.select:(se=o.select)===null||se===void 0?void 0:se.value}),j=u.computed(()=>n.componentSize),R=u.computed(()=>n.componentDisabled),Y=u.computed(()=>{var se,Oe;return(se=n.wave)!==null&&se!==void 0?se:(Oe=o.wave)===null||Oe===void 0?void 0:Oe.value}),le={csp:f,autoInsertSpaceInButton:v,locale:b,direction:x,space:C,virtual:k,dropdownMatchSelectWidth:L,getPrefixCls:r,iconPrefixCls:a,theme:u.computed(()=>{var se,Oe;return(se=g.value)!==null&&se!==void 0?se:(Oe=o.theme)===null||Oe===void 0?void 0:Oe.value}),renderEmpty:O,getTargetContainer:A,getPopupContainer:E,pageHeader:F,input:B,pagination:I,form:K,select:V,componentSize:j,componentDisabled:R,transformCellText:u.computed(()=>n.transformCellText),wave:Y},me=u.computed(()=>{const se=g.value||{},{algorithm:Oe,token:Le}=se,ge=P6(se,["algorithm","token"]),$e=Oe&&(!Array.isArray(Oe)||Oe.length>0)?P0(Oe):void 0;return q(q({},ge),{theme:$e,token:q(q({},wu),Le)})}),ze=u.computed(()=>{var se,Oe;let Le={};return b.value&&(Le=((se=b.value.Form)===null||se===void 0?void 0:se.defaultValidateMessages)||((Oe=Qr.Form)===null||Oe===void 0?void 0:Oe.defaultValidateMessages)||{}),n.form&&n.form.validateMessages&&(Le=q(q({},Le),n.form.validateMessages)),Le});M5(le),N5({validateMessages:ze}),_M(j),R5(R);const we=se=>{var Oe,Le;let ge=l.value?h((Oe=t.default)===null||Oe===void 0?void 0:Oe.call(t)):(Le=t.default)===null||Le===void 0?void 0:Le.call(t);if(n.theme){const $e=function(){return ge}();ge=u.createVNode(xM,{value:me.value},{default:()=>[$e]})}return u.createVNode(LQ,{locale:b.value||se,ANT_MARK__:wp},{default:()=>[ge]})};return u.watchEffect(()=>{x.value&&(rs.config({rtl:x.value==="rtl"}),as.config({rtl:x.value==="rtl"}))}),()=>u.createVNode(f0,{children:(se,Oe,Le)=>we(Le)},null)}});Nl.config=E6,Nl.install=function(n){n.component(Nl.name,Nl)};const O1=Nl;function Tp(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:Lt.shape({x:Number,y:Number}).loose,title:Lt.any,footer:Lt.any,transitionName:String,maskTransitionName:String,animation:Lt.any,maskAnimation:Lt.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:Lt.any,maskProps:Lt.any,wrapProps:Lt.any,getContainer:Lt.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:Lt.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function v1(n,e,t){let o=e;return!o&&t&&(o=`${n}-${t}`),o}let y1=-1;function N6(){return y1+=1,y1}function b1(n,e){let t=n[`page${e?"Y":"X"}Offset`];const o=`scroll${e?"Top":"Left"}`;if(typeof t!="number"){const r=n.document;t=r.documentElement[o],typeof t!="number"&&(t=r.body[o])}return t}function A6(n){const e=n.getBoundingClientRect(),t={left:e.left,top:e.top},o=n.ownerDocument,r=o.defaultView||o.parentWindow;return t.left+=b1(r),t.top+=b1(r,!0),t}const x1={width:0,height:0,overflow:"hidden",outline:"none"},M6=u.defineComponent({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:q(q({},Tp()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(n,e){let{expose:t,slots:o,attrs:r}=e;const a=u.ref(),l=u.ref(),f=u.ref();t({focus:()=>{var b;(b=a.value)===null||b===void 0||b.focus()},changeActive:b=>{const{activeElement:x}=document;b&&x===l.value?a.value.focus():!b&&x===a.value&&l.value.focus()}});const h=u.ref(),g=u.computed(()=>{const{width:b,height:x}=n,C={};return b!==void 0&&(C.width=typeof b=="number"?`${b}px`:b),x!==void 0&&(C.height=typeof x=="number"?`${x}px`:x),h.value&&(C.transformOrigin=h.value),C}),O=()=>{u.nextTick(()=>{if(f.value){const b=A6(f.value);h.value=n.mousePosition?`${n.mousePosition.x-b.left}px ${n.mousePosition.y-b.top}px`:""}})},v=b=>{n.onVisibleChanged(b)};return()=>{var b,x,C,k;const{prefixCls:L,footer:A=(b=o.footer)===null||b===void 0?void 0:b.call(o),title:E=(x=o.title)===null||x===void 0?void 0:x.call(o),ariaId:F,closable:B,closeIcon:I=(C=o.closeIcon)===null||C===void 0?void 0:C.call(o),onClose:K,bodyStyle:V,bodyProps:j,onMousedown:R,onMouseup:Y,visible:le,modalRender:me=o.modalRender,destroyOnClose:ze,motionName:we}=n;let se;A&&(se=u.createVNode("div",{class:`${L}-footer`},[A]));let Oe;E&&(Oe=u.createVNode("div",{class:`${L}-header`},[u.createVNode("div",{class:`${L}-title`,id:F},[E])]));let Le;B&&(Le=u.createVNode("button",{type:"button",onClick:K,"aria-label":"Close",class:`${L}-close`},[I||u.createVNode("span",{class:`${L}-close-x`},null)]));const ge=u.createVNode("div",{class:`${L}-content`},[Le,Oe,u.createVNode("div",Ke({class:`${L}-body`,style:V},j),[(k=o.default)===null||k===void 0?void 0:k.call(o)]),se]),$e=Xy(we);return u.createVNode(u.Transition,Ke(Ke({},$e),{},{onBeforeEnter:O,onAfterEnter:()=>v(!0),onAfterLeave:()=>v(!1)}),{default:()=>[le||!ze?u.withDirectives(u.createVNode("div",Ke(Ke({},r),{},{ref:f,key:"dialog-element",role:"document",style:[g.value,r.style],class:[L,r.class],onMousedown:R,onMouseup:Y}),[u.createVNode("div",{tabindex:0,ref:a,style:x1,"aria-hidden":"true"},null),me?me({originVNode:ge}):ge,u.createVNode("div",{tabindex:0,ref:l,style:x1,"aria-hidden":"true"},null)]),[[u.vShow,le]]):null]})}}}),R6=u.defineComponent({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(n,e){return()=>{const{prefixCls:t,visible:o,maskProps:r,motionName:a}=n,l=Xy(a);return u.createVNode(u.Transition,l,{default:()=>[u.withDirectives(u.createVNode("div",Ke({class:`${t}-mask`},r),null),[[u.vShow,o]])]})}}}),w1=u.defineComponent({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:fl(q(q({},Tp()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(n,e){let{attrs:t,slots:o}=e;const r=u.shallowRef(),a=u.shallowRef(),l=u.shallowRef(),f=u.shallowRef(n.visible),h=u.shallowRef(`vcDialogTitle${N6()}`),g=A=>{var E,F;if(A)v0(a.value,document.activeElement)||(r.value=document.activeElement,(E=l.value)===null||E===void 0||E.focus());else{const B=f.value;if(f.value=!1,n.mask&&r.value&&n.focusTriggerAfterClose){try{r.value.focus({preventScroll:!0})}catch{}r.value=null}B&&((F=n.afterClose)===null||F===void 0||F.call(n))}},O=A=>{var E;(E=n.onClose)===null||E===void 0||E.call(n,A)},v=u.shallowRef(!1),b=u.shallowRef(),x=()=>{clearTimeout(b.value),v.value=!0},C=()=>{b.value=setTimeout(()=>{v.value=!1})},k=A=>{if(!n.maskClosable)return null;v.value?v.value=!1:a.value===A.target&&O(A)},L=A=>{if(n.keyboard&&A.keyCode===et.ESC){A.stopPropagation(),O(A);return}n.visible&&A.keyCode===et.TAB&&l.value.changeActive(!A.shiftKey)};return u.watch(()=>n.visible,()=>{n.visible&&(f.value=!0)},{flush:"post"}),u.onBeforeUnmount(()=>{var A;clearTimeout(b.value),(A=n.scrollLocker)===null||A===void 0||A.unLock()}),u.watchEffect(()=>{var A,E;(A=n.scrollLocker)===null||A===void 0||A.unLock(),f.value&&((E=n.scrollLocker)===null||E===void 0||E.lock())}),()=>{const{prefixCls:A,mask:E,visible:F,maskTransitionName:B,maskAnimation:I,zIndex:K,wrapClassName:V,rootClassName:j,wrapStyle:R,closable:Y,maskProps:le,maskStyle:me,transitionName:ze,animation:we,wrapProps:se,title:Oe=o.title}=n,{style:Le,class:ge}=t;return u.createVNode("div",Ke({class:[`${A}-root`,j]},_R(n,{data:!0})),[u.createVNode(R6,{prefixCls:A,visible:E&&F,motionName:v1(A,B,I),style:q({zIndex:K},me),maskProps:le},null),u.createVNode("div",Ke({tabIndex:-1,onKeydown:L,class:Bt(`${A}-wrap`,V),ref:a,onClick:k,role:"dialog","aria-labelledby":Oe?h.value:null,style:q(q({zIndex:K},R),{display:f.value?null:"none"})},se),[u.createVNode(M6,Ke(Ke({},hy(n,["scrollLocker"])),{},{style:Le,class:ge,onMousedown:x,onMouseup:C,ref:l,closable:Y,ariaId:h.value,prefixCls:A,visible:F,onClose:O,onVisibleChanged:g,motionName:v1(A,ze,we)}),o)])])}}}),I6=Tp(),Q6=u.defineComponent({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:fl(I6,{visible:!1}),setup(n,e){let{attrs:t,slots:o}=e;const r=u.ref(n.visible);return Jy({},{inTriggerContext:!1}),u.watch(()=>n.visible,()=>{n.visible&&(r.value=!0)},{flush:"post"}),()=>{const{visible:a,getContainer:l,forceRender:f,destroyOnClose:h=!1,afterClose:g}=n;let O=q(q(q({},n),t),{ref:"_component",key:"dialog"});return l===!1?u.createVNode(w1,Ke(Ke({},O),{},{getOpenCount:()=>2}),o):!f&&h&&!r.value?null:u.createVNode(CR,{autoLock:!0,visible:a,forceRender:f,getContainer:l},{default:v=>(O=q(q(q({},O),v),{afterClose:()=>{g?.(),r.value=!1}}),u.createVNode(w1,O,o))})}}});function S1(n){return{position:n,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const D6=n=>{const{componentCls:e}=n;return[{[`${e}-root`]:{[`${e}${n.antCls}-zoom-enter, ${e}${n.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:n.motionDurationSlow,userSelect:"none"},[`${e}${n.antCls}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:q(q({},S1("fixed")),{zIndex:n.zIndexPopupBase,height:"100%",backgroundColor:n.colorBgMask,[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:q(q({},S1("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:NI(n)}]},B6=n=>{const{componentCls:e}=n;return[{[`${e}-root`]:{[`${e}-wrap`]:{zIndex:n.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${n.screenSMMax})`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${n.marginXS} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:q(q({},Xh(n)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${n.margin*2}px)`,margin:"0 auto",paddingBottom:n.paddingLG,[`${e}-title`]:{margin:0,color:n.modalHeadingColor,fontWeight:n.fontWeightStrong,fontSize:n.modalHeaderTitleFontSize,lineHeight:n.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${e}-content`]:{position:"relative",backgroundColor:n.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:n.borderRadiusLG,boxShadow:n.boxShadowSecondary,pointerEvents:"auto",padding:`${n.paddingMD}px ${n.paddingContentHorizontalLG}px`},[`${e}-close`]:q({position:"absolute",top:(n.modalHeaderCloseSize-n.modalCloseBtnSize)/2,insetInlineEnd:(n.modalHeaderCloseSize-n.modalCloseBtnSize)/2,zIndex:n.zIndexPopupBase+10,padding:0,color:n.modalCloseColor,fontWeight:n.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:n.borderRadiusSM,width:n.modalConfirmIconSize,height:n.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${n.motionDurationMid}, background-color ${n.motionDurationMid}`,"&-x":{display:"block",fontSize:n.fontSizeLG,fontStyle:"normal",lineHeight:`${n.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:n.modalIconHoverColor,backgroundColor:n.wireframe?"transparent":n.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:n.wireframe?"transparent":n.colorFillContentHover}},ny(n)),[`${e}-header`]:{color:n.colorText,background:n.modalHeaderBg,borderRadius:`${n.borderRadiusLG}px ${n.borderRadiusLG}px 0 0`,marginBottom:n.marginXS},[`${e}-body`]:{fontSize:n.fontSize,lineHeight:n.lineHeight,wordWrap:"break-word"},[`${e}-footer`]:{textAlign:"end",background:n.modalFooterBg,marginTop:n.marginSM,[`${n.antCls}-btn + ${n.antCls}-btn:not(${n.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:n.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-content,
|
|
320
|
-
${e}-body,
|
|
321
|
-
${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},L6=n=>{const{componentCls:e}=n,t=`${e}-confirm`;return{[t]:{"&-rtl":{direction:"rtl"},[`${n.antCls}-modal-header`]:{display:"none"},[`${t}-body-wrapper`]:q({},hM()),[`${t}-body`]:{display:"flex",flexWrap:"wrap",alignItems:"center",[`${t}-title`]:{flex:"0 0 100%",display:"block",overflow:"hidden",color:n.colorTextHeading,fontWeight:n.fontWeightStrong,fontSize:n.modalHeaderTitleFontSize,lineHeight:n.modalHeaderTitleLineHeight,[`+ ${t}-content`]:{marginBlockStart:n.marginXS,flexBasis:"100%",maxWidth:`calc(100% - ${n.modalConfirmIconSize+n.marginSM}px)`}},[`${t}-content`]:{color:n.colorText,fontSize:n.fontSize},[`> ${n.iconCls}`]:{flex:"none",marginInlineEnd:n.marginSM,fontSize:n.modalConfirmIconSize,[`+ ${t}-title`]:{flex:1},[`+ ${t}-title + ${t}-content`]:{marginInlineStart:n.modalConfirmIconSize+n.marginSM}}},[`${t}-btns`]:{textAlign:"end",marginTop:n.marginSM,[`${n.antCls}-btn + ${n.antCls}-btn`]:{marginBottom:0,marginInlineStart:n.marginXS}}},[`${t}-error ${t}-body > ${n.iconCls}`]:{color:n.colorError},[`${t}-warning ${t}-body > ${n.iconCls},
|
|
322
|
-
${t}-confirm ${t}-body > ${n.iconCls}`]:{color:n.colorWarning},[`${t}-info ${t}-body > ${n.iconCls}`]:{color:n.colorInfo},[`${t}-success ${t}-body > ${n.iconCls}`]:{color:n.colorSuccess},[`${e}-zoom-leave ${e}-btns`]:{pointerEvents:"none"}}},V6=n=>{const{componentCls:e}=n;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},j6=n=>{const{componentCls:e,antCls:t}=n,o=`${e}-confirm`;return{[e]:{[`${e}-content`]:{padding:0},[`${e}-header`]:{padding:n.modalHeaderPadding,borderBottom:`${n.modalHeaderBorderWidth}px ${n.modalHeaderBorderStyle} ${n.modalHeaderBorderColorSplit}`,marginBottom:0},[`${e}-body`]:{padding:n.modalBodyPadding},[`${e}-footer`]:{padding:`${n.modalFooterPaddingVertical}px ${n.modalFooterPaddingHorizontal}px`,borderTop:`${n.modalFooterBorderWidth}px ${n.modalFooterBorderStyle} ${n.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${n.borderRadiusLG}px ${n.borderRadiusLG}px`,marginTop:0}},[o]:{[`${t}-modal-body`]:{padding:`${n.padding*2}px ${n.padding*2}px ${n.paddingLG}px`},[`${o}-body`]:{[`> ${n.iconCls}`]:{marginInlineEnd:n.margin,[`+ ${o}-title + ${o}-content`]:{marginInlineStart:n.modalConfirmIconSize+n.margin}}},[`${o}-btns`]:{marginTop:n.marginLG}}}},F6=Fr("Modal",n=>{const e=n.padding,t=n.fontSizeHeading5,o=n.lineHeightHeading5,r=Ki(n,{modalBodyPadding:n.paddingLG,modalHeaderBg:n.colorBgElevated,modalHeaderPadding:`${e}px ${n.paddingLG}px`,modalHeaderBorderWidth:n.lineWidth,modalHeaderBorderStyle:n.lineType,modalHeaderTitleLineHeight:o,modalHeaderTitleFontSize:t,modalHeaderBorderColorSplit:n.colorSplit,modalHeaderCloseSize:o*t+e*2,modalContentBg:n.colorBgElevated,modalHeadingColor:n.colorTextHeading,modalCloseColor:n.colorTextDescription,modalFooterBg:"transparent",modalFooterBorderColorSplit:n.colorSplit,modalFooterBorderStyle:n.lineType,modalFooterPaddingVertical:n.paddingXS,modalFooterPaddingHorizontal:n.padding,modalFooterBorderWidth:n.lineWidth,modalConfirmTitleFontSize:n.fontSizeLG,modalIconHoverColor:n.colorIconHover,modalConfirmIconSize:n.fontSize*n.lineHeight,modalCloseBtnSize:n.controlHeightLG*.55});return[B6(r),L6(r),V6(r),D6(r),n.wireframe&&j6(r),ZI(r,"zoom")]});var Z6=function(n,e){var t={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&e.indexOf(o)<0&&(t[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(n);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(n,o[r])&&(t[o[r]]=n[o[r]]);return t};let Np;const W6=n=>{Np={x:n.pageX,y:n.pageY},setTimeout(()=>Np=null,100)};QQ()&&E5(document.documentElement,"click",W6,!0);const z6=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:Lt.any,closable:{type:Boolean,default:void 0},closeIcon:Lt.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:Lt.any,okText:Lt.any,okType:String,cancelText:Lt.any,icon:Lt.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:$t(),cancelButtonProps:$t(),destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:$t(),maskStyle:$t(),mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function,mousePosition:$t()}),Vt=u.defineComponent({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:fl(z6(),{width:520,confirmLoading:!1,okType:"primary"}),setup(n,e){let{emit:t,slots:o,attrs:r}=e;const[a]=Sh("Modal"),{prefixCls:l,rootPrefixCls:f,direction:h,getPopupContainer:g}=ri("modal",n),[O,v]=F6(l);Ja(n.visible===void 0,"Modal","`visible` will be removed in next major version, please use `open` instead.");const b=k=>{t("update:visible",!1),t("update:open",!1),t("cancel",k),t("change",!1)},x=k=>{t("ok",k)},C=()=>{var k,L;const{okText:A=(k=o.okText)===null||k===void 0?void 0:k.call(o),okType:E,cancelText:F=(L=o.cancelText)===null||L===void 0?void 0:L.call(o),confirmLoading:B}=n;return u.createVNode(u.Fragment,null,[u.createVNode(qr,Ke({onClick:b},n.cancelButtonProps),{default:()=>[F||a.value.cancelText]}),u.createVNode(qr,Ke(Ke({},Mb(E)),{},{loading:B,onClick:x},n.okButtonProps),{default:()=>[A||a.value.okText]})])};return()=>{var k,L;const{prefixCls:A,visible:E,open:F,wrapClassName:B,centered:I,getContainer:K,closeIcon:V=(k=o.closeIcon)===null||k===void 0?void 0:k.call(o),focusTriggerAfterClose:j=!0}=n,R=Z6(n,["prefixCls","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),Y=Bt(B,{[`${l.value}-centered`]:!!I,[`${l.value}-wrap-rtl`]:h.value==="rtl"});return O(u.createVNode(Q6,Ke(Ke(Ke({},R),r),{},{rootClassName:v.value,class:Bt(v.value,r.class),getContainer:K||g?.value,prefixCls:l.value,wrapClassName:Y,visible:F??E,onClose:b,focusTriggerAfterClose:j,transitionName:Eu(f.value,"zoom",n.transitionName),maskTransitionName:Eu(f.value,"fade",n.maskTransitionName),mousePosition:(L=R.mousePosition)!==null&&L!==void 0?L:Np}),q(q({},o),{footer:o.footer||C,closeIcon:()=>u.createVNode("span",{class:`${l.value}-close-x`},[V||u.createVNode(is,{class:`${l.value}-close-icon`},null)])})))}}}),U6=()=>{const n=u.shallowRef(!1);return u.onBeforeUnmount(()=>{n.value=!0}),n},H6={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:$t(),emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function C1(n){return!!(n&&n.then)}const k1=u.defineComponent({compatConfig:{MODE:3},name:"ActionButton",props:H6,setup(n,e){let{slots:t}=e;const o=u.shallowRef(!1),r=u.shallowRef(),a=u.shallowRef(!1);let l;const f=U6();u.onMounted(()=>{n.autofocus&&(l=setTimeout(()=>{var v,b;return(b=(v=iu(r.value))===null||v===void 0?void 0:v.focus)===null||b===void 0?void 0:b.call(v)}))}),u.onBeforeUnmount(()=>{clearTimeout(l)});const h=function(){for(var v,b=arguments.length,x=new Array(b),C=0;C<b;C++)x[C]=arguments[C];(v=n.close)===null||v===void 0||v.call(n,...x)},g=v=>{C1(v)&&(a.value=!0,v.then(function(){f.value||(a.value=!1),h(...arguments),o.value=!1},b=>(f.value||(a.value=!1),o.value=!1,Promise.reject(b))))},O=v=>{const{actionFn:b}=n;if(o.value)return;if(o.value=!0,!b){h();return}let x;if(n.emitEvent){if(x=b(v),n.quitOnNullishReturnValue&&!C1(x)){o.value=!1,h(v);return}}else if(b.length)x=b(n.close),o.value=!1;else if(x=b(),!x){h();return}g(x)};return()=>{const{type:v,prefixCls:b,buttonProps:x}=n;return u.createVNode(qr,Ke(Ke(Ke({},Mb(v)),{},{onClick:O,loading:a.value,prefixCls:b},x),{},{ref:r}),t)}}});function ls(n){return typeof n=="function"?n():n}const P1=u.defineComponent({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","open","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName","confirmPrefixCls","footer"],setup(n,e){let{attrs:t}=e;const[o]=Sh("Modal");return process.env.NODE_ENV!=="production"&&Ja(n.visible===void 0,"Modal","`visible` is deprecated, please use `open` instead."),()=>{const{icon:r,onCancel:a,onOk:l,close:f,okText:h,closable:g=!1,zIndex:O,afterClose:v,keyboard:b,centered:x,getContainer:C,maskStyle:k,okButtonProps:L,cancelButtonProps:A,okCancel:E,width:F=416,mask:B=!0,maskClosable:I=!1,type:K,open:V,title:j,content:R,direction:Y,closeIcon:le,modalRender:me,focusTriggerAfterClose:ze,rootPrefixCls:we,bodyStyle:se,wrapClassName:Oe,footer:Le}=n;let ge=r;if(!r&&r!==null)switch(K){case"info":ge=u.createVNode($r,null,null);break;case"success":ge=u.createVNode(Kr,null,null);break;case"error":ge=u.createVNode(Gr,null,null);break;default:ge=u.createVNode(Jr,null,null)}const $e=n.okType||"primary",Te=n.prefixCls||"ant-modal",ye=`${Te}-confirm`,pt=t.style||{},Se=E??K==="confirm",We=n.autoFocusButton===null?!1:n.autoFocusButton||"ok",wt=`${Te}-confirm`,vo=Bt(wt,`${wt}-${n.type}`,{[`${wt}-rtl`]:Y==="rtl"},t.class),Ne=o.value,mn=Se&&u.createVNode(k1,{actionFn:a,close:f,autofocus:We==="cancel",buttonProps:A,prefixCls:`${we}-btn`},{default:()=>[ls(n.cancelText)||Ne.cancelText]});return u.createVNode(Vt,{prefixCls:Te,class:vo,wrapClassName:Bt({[`${wt}-centered`]:!!x},Oe),onCancel:ht=>f?.({triggerCancel:!0},ht),open:V,title:"",footer:"",transitionName:Eu(we,"zoom",n.transitionName),maskTransitionName:Eu(we,"fade",n.maskTransitionName),mask:B,maskClosable:I,maskStyle:k,style:pt,bodyStyle:se,width:F,zIndex:O,afterClose:v,keyboard:b,centered:x,getContainer:C,closable:g,closeIcon:le,modalRender:me,focusTriggerAfterClose:ze},{default:()=>[u.createVNode("div",{class:`${ye}-body-wrapper`},[u.createVNode("div",{class:`${ye}-body`},[ls(ge),j===void 0?null:u.createVNode("span",{class:`${ye}-title`},[ls(j)]),u.createVNode("div",{class:`${ye}-content`},[ls(R)])]),Le!==void 0?ls(Le):u.createVNode("div",{class:`${ye}-btns`},[mn,u.createVNode(k1,{type:$e,actionFn:l,close:f,autofocus:We==="ok",buttonProps:L,prefixCls:`${we}-btn`},{default:()=>[ls(h)||(Se?Ne.okText:Ne.justOkText)]})])])]})}}}),ta=[],Al=n=>{const e=document.createDocumentFragment();let t=q(q({},hy(n,["parentContext","appContext"])),{close:a,open:!0}),o=null;function r(){o&&(u.render(null,e),o=null);for(var g=arguments.length,O=new Array(g),v=0;v<g;v++)O[v]=arguments[v];const b=O.some(x=>x&&x.triggerCancel);n.onCancel&&b&&n.onCancel(()=>{},...O.slice(1));for(let x=0;x<ta.length;x++)if(ta[x]===a){ta.splice(x,1);break}}function a(){for(var g=arguments.length,O=new Array(g),v=0;v<g;v++)O[v]=arguments[v];t=q(q({},t),{open:!1,afterClose:()=>{typeof n.afterClose=="function"&&n.afterClose(),r.apply(this,O)}}),t.visible&&delete t.visible,l(t)}function l(g){typeof g=="function"?t=g(t):t=q(q({},t),g),o&&GM(o,t,e)}const f=g=>{const O=wn,v=O.prefixCls,b=g.prefixCls||`${v}-modal`,x=O.iconPrefixCls,C=BQ();return u.createVNode(O1,Ke(Ke({},O),{},{prefixCls:v}),{default:()=>[u.createVNode(P1,Ke(Ke({},g),{},{rootPrefixCls:v,prefixCls:b,iconPrefixCls:x,locale:C,cancelText:g.cancelText||C.cancelText}),null)]})};function h(g){const O=u.createVNode(f,q({},g));return O.appContext=n.parentContext||n.appContext||O.appContext,u.render(O,e),O}return o=h(t),ta.push(a),{destroy:a,update:l}};function _1(n){return q(q({},n),{type:"warning"})}function E1(n){return q(q({},n),{type:"info"})}function T1(n){return q(q({},n),{type:"success"})}function N1(n){return q(q({},n),{type:"error"})}function A1(n){return q(q({},n),{type:"confirm"})}const Y6=()=>({config:Object,afterClose:Function,destroyAction:Function,open:Boolean}),X6=u.defineComponent({name:"HookModal",inheritAttrs:!1,props:fl(Y6(),{config:{width:520,okType:"primary"}}),setup(n,e){let{expose:t}=e;var o;const r=u.computed(()=>n.open),a=u.computed(()=>n.config),{direction:l,getPrefixCls:f}=au(),h=f("modal"),g=f(),O=()=>{var C,k;n?.afterClose(),(k=(C=a.value).afterClose)===null||k===void 0||k.call(C)},v=function(){n.destroyAction(...arguments)};t({destroy:v});const b=(o=a.value.okCancel)!==null&&o!==void 0?o:a.value.type==="confirm",[x]=Sh("Modal",Qr.Modal);return()=>u.createVNode(P1,Ke(Ke({prefixCls:h,rootPrefixCls:g},a.value),{},{close:v,open:r.value,afterClose:O,okText:a.value.okText||(b?x?.value.okText:x?.value.justOkText),direction:a.value.direction||l.value,cancelText:a.value.cancelText||x?.value.cancelText}),null)}});let M1=0;const G6=u.defineComponent({name:"ElementsHolder",inheritAttrs:!1,setup(n,e){let{expose:t}=e;const o=u.shallowRef([]);return t({addModal:a=>(o.value.push(a),o.value=o.value.slice(),()=>{o.value=o.value.filter(l=>l!==a)})}),()=>o.value.map(a=>a())}});function K6(){const n=u.shallowRef(null),e=u.shallowRef([]);u.watch(e,()=>{e.value.length&&([...e.value].forEach(l=>{l()}),e.value=[])},{immediate:!0});const t=a=>function(f){var h;M1+=1;const g=u.shallowRef(!0),O=u.shallowRef(null),v=u.shallowRef(u.unref(f)),b=u.shallowRef({});u.watch(()=>f,F=>{L(q(q({},u.isRef(F)?F.value:F),b.value))});const x=function(){g.value=!1;for(var F=arguments.length,B=new Array(F),I=0;I<F;I++)B[I]=arguments[I];const K=B.some(V=>V&&V.triggerCancel);v.value.onCancel&&K&&v.value.onCancel(()=>{},...B.slice(1))};let C;const k=()=>u.createVNode(X6,{key:`modal-${M1}`,config:a(v.value),ref:O,open:g.value,destroyAction:x,afterClose:()=>{C?.()}},null);C=(h=n.value)===null||h===void 0?void 0:h.addModal(k),C&&ta.push(C);const L=F=>{v.value=q(q({},v.value),F)};return{destroy:()=>{O.value?x():e.value=[...e.value,x]},update:F=>{b.value=F,O.value?L(F):e.value=[...e.value,()=>L(F)]}}},o=u.computed(()=>({info:t(E1),success:t(T1),error:t(N1),warning:t(_1),confirm:t(A1)})),r=Symbol("modalHolderKey");return[o.value,()=>u.createVNode(G6,{key:r,ref:n},null)]}function R1(n){return Al(_1(n))}Vt.useModal=K6,Vt.info=function(e){return Al(E1(e))},Vt.success=function(e){return Al(T1(e))},Vt.error=function(e){return Al(N1(e))},Vt.warning=R1,Vt.warn=R1,Vt.confirm=function(e){return Al(A1(e))},Vt.destroyAll=function(){for(;ta.length;){const e=ta.pop();e&&e()}},Vt.install=function(n){return n.component(Vt.name,Vt),n};var J6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"};function I1(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},o=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),o.forEach(function(r){$6(n,r,t[r])})}return n}function $6(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var Ai=function(e,t){var o=I1({},e,t.attrs);return u.createVNode(Qn,I1({},o,{icon:J6}),null)};Ai.displayName="FormOutlined",Ai.inheritAttrs=!1;class Ap{define;model;$css;$settings;$widgetList;$widgetMap;$dataModels;$dataModelMap;$axios;$axiosProccess;constructor(e={sn:"new_",title:"新建页面",types:"setting",vers:1,configs:{widgetList:[],dataModels:[]}}){const t=e.configs||{};this.model=u.ref("run"),this.define=u.ref(e),this.$css=u.ref(t.css||""),this.$widgetList=u.ref([]),this.$widgetMap=u.ref({}),this.$dataModels=u.ref([]),this.$dataModelMap=u.ref({}),this.$settings=u.ref({ctx:"/portal",timeout:6e4,...t.settings||{}}),this.$axiosProccess=u.ref({}),this.$initAxios(),this.loadConfig(t)}$initAxios(){this.$axios=ou.axios.create({baseURL:this.$settings.value.ctx,timeout:this.$settings.value.timeout})}load(e,t){if(this.define.value.sn=e,e=="new_"){console.log("新建/本地页面sn:"+e+",define:",t),t&&t.configs&&(this.define.value=t,this.loadConfig(t.configs));return}const o=sessionStorage.getItem("PAGE_DEFINE:"+e);if(o){this.define.value=JSON.parse(o),this.loadConfig(this.define.value.configs),console.log("从会话缓存中加载页面sn:"+e+",define:",this.define.value);return}this.$axios({url:"/api/page/define/load/"+e,method:"post"}).then(r=>{r.success&&(this.define.value=r.body,r.body.configs?this.define.value.configs=JSON.parse(r.body.configs):this.define.value.configs={widgetList:[],dataModels:[]},this.loadConfig(this.define.value.configs),sessionStorage.setItem("PAGE_DEFINE:"+e,JSON.stringify(this.define.value)),console.log("从远程服务加载页面sn:"+e+",define:",this.define.value))})}save(){return new Promise((e,t)=>{if(this.$axiosProccess.value.save){console.warn("unione form editor save process runing,sn:"+this.define.value.sn),t();return}this.$axiosProccess.value.save=!0;const o={widgetList:this.$widgetList.value,dataModels:this.$dataModels.value,settings:this.$settings.value},r={...this.define.value};r.configs=o,this.$axios({url:"/api/page/define/save",method:"post",data:r}).then(a=>{this.$axiosProccess.value.save=!1,a.success?(rs.success(a.message),this.define.value=a.body,sessionStorage.setItem("PAGE_CONFIG:"+a.sn,a.configs),e(a.body)):(Vt.error({title:"错误信息",content:a.message}),t())}).catch(a=>{console.error("页面配置保存失败",a),Vt.error({title:"错误信息",content:"页面配置保存失败"})}).finally(()=>{this.$axiosProccess.value.save=!1})})}loadConfig(e){this.$widgetList.value=e.widgetList||[],this.$widgetMap.value={},this.$processWidget(this.$widgetList.value),this.$dataModels.value=e.dataModels||[],this.$dataModelMap.value={},this.$dataModels.value.forEach(t=>{this.$dataModelMap.value[t.sn]=t})}setModel(e){this.model.value=e}widget(e,t){if(t){const o={...t,wid:e};this.$widgetMap.value[e]||(this.$widgetList.value.push(o),o.configs?.widgets&&this.$processWidget(o.configs.widgets)),this.$widgetMap.value[e]=o}else return this.$widgetMap.value[e]}widgets(e){if(e)this.$widgetList.value=e,this.$widgetMap.value={},this.$processWidget(e);else return this.$widgetList.value}$processWidget(e){e.forEach(t=>{this.$widgetMap.value[t.wid]=t,t.configs?.widgets&&this.$processWidget(t.configs.widgets)})}dataModel(e,t){if(t){const o={...t,sn:e};this.$dataModelMap.value[e]||this.$dataModels.value.push(o),this.$dataModelMap.value[e]=o}else return this.$dataModelMap.value[e]}dataModels(e){if(e)this.$dataModels.value=e,this.$dataModelMap.value={},e.forEach(t=>{this.$dataModelMap.value[t.sn]=t});else return this.$dataModels.value}settings(e){if(e)this.$settings.value={...this.$settings.value,...e};else return this.$settings.value||{}}}const q6={class:"widget-setting-dialog"},e3=u.defineComponent({__name:"widget",props:{model:{type:String,required:!1},settingTitle:{type:String,default:"组件设置"},custome:{type:Boolean,default:!1}},emits:["setting","saving"],setup(n,{emit:e}){const t=e,o=u.ref();function r(){o.value?.open(),t("setting")}function a(){t("saving"),o.value?.close()}return(l,f)=>{const h=u.resolveComponent("SettingOutlined"),g=u.resolveComponent("a-tooltip"),O=u.resolveComponent("a-modal");return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["unione-widget",n.model])},[u.createVNode(g,{title:n.settingTitle},{default:u.withCtx(()=>[n.model=="edit"&&(l.$slots["widget-setting"]||n.custome)?(u.openBlock(),u.createBlock(h,{key:0,class:"widget-setting",onClick:r})):u.createCommentVNode("",!0)]),_:1},8,["title"]),u.renderSlot(l.$slots,"default",{},void 0,!0),n.model=="edit"&&l.$slots["widget-setting"]?(u.openBlock(),u.createBlock(O,{key:0,title:n.settingTitle,ref_key:"settingModal",ref:o,centered:"",width:"80%",onOk:a},{default:u.withCtx(()=>[u.createElementVNode("div",q6,[u.renderSlot(l.$slots,"widget-setting",{},void 0,!0)])]),_:3},8,["title"])):u.createCommentVNode("",!0)],2)}}}),hn=(n,e)=>{const t=n.__vccOpts||n;for(const[o,r]of e)t[o]=r;return t},cs=hn(e3,[["__scopeId","data-v-af42a5b2"]]);class Ot{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,o){[e,t]=us(this,e,t);let r=[];return this.decompose(0,e,r,2),o.length&&o.decompose(0,o.length,r,3),this.decompose(t,this.length,r,1),li.from(r,this.length-(t-e)+o.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=us(this,e,t);let o=[];return this.decompose(e,t,o,0),li.from(o,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),o=this.length-this.scanIdentical(e,-1),r=new Ml(this),a=new Ml(e);for(let l=t,f=t;;){if(r.next(l),a.next(l),l=0,r.lineBreak!=a.lineBreak||r.done!=a.done||r.value!=a.value)return!1;if(f+=r.value.length,r.done||f>=o)return!0}}iter(e=1){return new Ml(this,e)}iterRange(e,t=this.length){return new D1(this,e,t)}iterLines(e,t){let o;if(e==null)o=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;o=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new B1(o)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ot.empty:e.length<=32?new Yt(e):li.from(Yt.split(e,[]))}}class Yt extends Ot{constructor(e,t=t3(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,o,r){for(let a=0;;a++){let l=this.text[a],f=r+l.length;if((t?o:f)>=e)return new n3(r,f,o,l);r=f+1,o++}}decompose(e,t,o,r){let a=e<=0&&t>=this.length?this:new Yt(Q1(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let l=o.pop(),f=Vu(a.text,l.text.slice(),0,a.length);if(f.length<=32)o.push(new Yt(f,l.length+a.length));else{let h=f.length>>1;o.push(new Yt(f.slice(0,h)),new Yt(f.slice(h)))}}else o.push(a)}replace(e,t,o){if(!(o instanceof Yt))return super.replace(e,t,o);[e,t]=us(this,e,t);let r=Vu(this.text,Vu(o.text,Q1(this.text,0,e)),t),a=this.length+o.length-(t-e);return r.length<=32?new Yt(r,a):li.from(Yt.split(r,[]),a)}sliceString(e,t=this.length,o=`
|
|
323
|
-
`){[e,t]=us(this,e,t);let r="";for(let a=0,l=0;a<=t&&l<this.text.length;l++){let f=this.text[l],h=a+f.length;a>e&&l&&(r+=o),e<h&&t>a&&(r+=f.slice(Math.max(0,e-a),t-a)),a=h+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let o=[],r=-1;for(let a of e)o.push(a),r+=a.length+1,o.length==32&&(t.push(new Yt(o,r)),o=[],r=-1);return r>-1&&t.push(new Yt(o,r)),t}}class li extends Ot{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let o of e)this.lines+=o.lines}lineInner(e,t,o,r){for(let a=0;;a++){let l=this.children[a],f=r+l.length,h=o+l.lines-1;if((t?h:f)>=e)return l.lineInner(e,t,o,r);r=f+1,o=h+1}}decompose(e,t,o,r){for(let a=0,l=0;l<=t&&a<this.children.length;a++){let f=this.children[a],h=l+f.length;if(e<=h&&t>=l){let g=r&((l<=e?1:0)|(h>=t?2:0));l>=e&&h<=t&&!g?o.push(f):f.decompose(e-l,t-l,o,g)}l=h+1}}replace(e,t,o){if([e,t]=us(this,e,t),o.lines<this.lines)for(let r=0,a=0;r<this.children.length;r++){let l=this.children[r],f=a+l.length;if(e>=a&&t<=f){let h=l.replace(e-a,t-a,o),g=this.lines-l.lines+h.lines;if(h.lines<g>>4&&h.lines>g>>6){let O=this.children.slice();return O[r]=h,new li(O,this.length-(t-e)+o.length)}return super.replace(a,f,h)}a=f+1}return super.replace(e,t,o)}sliceString(e,t=this.length,o=`
|
|
324
|
-
`){[e,t]=us(this,e,t);let r="";for(let a=0,l=0;a<this.children.length&&l<=t;a++){let f=this.children[a],h=l+f.length;l>e&&a&&(r+=o),e<h&&t>l&&(r+=f.sliceString(e-l,t-l,o)),l=h+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof li))return 0;let o=0,[r,a,l,f]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,a+=t){if(r==l||a==f)return o;let h=this.children[r],g=e.children[a];if(h!=g)return o+h.scanIdentical(g,t);o+=h.length+1}}static from(e,t=e.reduce((o,r)=>o+r.length+1,-1)){let o=0;for(let x of e)o+=x.lines;if(o<32){let x=[];for(let C of e)C.flatten(x);return new Yt(x,t)}let r=Math.max(32,o>>5),a=r<<1,l=r>>1,f=[],h=0,g=-1,O=[];function v(x){let C;if(x.lines>a&&x instanceof li)for(let k of x.children)v(k);else x.lines>l&&(h>l||!h)?(b(),f.push(x)):x instanceof Yt&&h&&(C=O[O.length-1])instanceof Yt&&x.lines+C.lines<=32?(h+=x.lines,g+=x.length+1,O[O.length-1]=new Yt(C.text.concat(x.text),C.length+1+x.length)):(h+x.lines>r&&b(),h+=x.lines,g+=x.length+1,O.push(x))}function b(){h!=0&&(f.push(O.length==1?O[0]:li.from(O,g)),g=-1,h=O.length=0)}for(let x of e)v(x);return b(),f.length==1?f[0]:new li(f,t)}}Ot.empty=new Yt([""],0);function t3(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Vu(n,e,t=0,o=1e9){for(let r=0,a=0,l=!0;a<n.length&&r<=o;a++){let f=n[a],h=r+f.length;h>=t&&(h>o&&(f=f.slice(0,o-r)),r<t&&(f=f.slice(t-r)),l?(e[e.length-1]+=f,l=!1):e.push(f)),r=h+1}return e}function Q1(n,e,t){return Vu(n,[""],e,t)}class Ml{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Yt?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let o=this.nodes.length-1,r=this.nodes[o],a=this.offsets[o],l=a>>1,f=r instanceof Yt?r.text.length:r.children.length;if(l==(t>0?f:0)){if(o==0)return this.done=!0,this.value="",this;t>0&&this.offsets[o-1]++,this.nodes.pop(),this.offsets.pop()}else if((a&1)==(t>0?0:1)){if(this.offsets[o]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
325
|
-
`,this;e--}else if(r instanceof Yt){let h=r.text[l+(t<0?-1:0)];if(this.offsets[o]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=r.children[l+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[o]+=t):(t<0&&this.offsets[o]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof Yt?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class D1{constructor(e,t,o){this.value="",this.done=!1,this.cursor=new Ml(e,t>o?-1:1),this.pos=t>o?e.length:0,this.from=Math.min(t,o),this.to=Math.max(t,o)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let o=t<0?this.pos-this.from:this.to-this.pos;e>o&&(e=o),o-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=o?r:t<0?r.slice(r.length-o):r.slice(0,o),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class B1{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:o,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):o?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ot.prototype[Symbol.iterator]=function(){return this.iter()},Ml.prototype[Symbol.iterator]=D1.prototype[Symbol.iterator]=B1.prototype[Symbol.iterator]=function(){return this});class n3{constructor(e,t,o,r){this.from=e,this.to=t,this.number=o,this.text=r}get length(){return this.to-this.from}}function us(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let ds="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;n<ds.length;n++)ds[n]+=ds[n-1];function o3(n){for(let e=1;e<ds.length;e+=2)if(ds[e]>n)return ds[e-1]<=n;return!1}function L1(n){return n>=127462&&n<=127487}const V1=8205;function Sn(n,e,t=!0,o=!0){return(t?j1:i3)(n,e,o)}function j1(n,e,t){if(e==n.length)return e;e&&F1(n.charCodeAt(e))&&Z1(n.charCodeAt(e-1))&&e--;let o=Cn(n,e);for(e+=To(o);e<n.length;){let r=Cn(n,e);if(o==V1||r==V1||t&&o3(r))e+=To(r),o=r;else if(L1(r)){let a=0,l=e-2;for(;l>=0&&L1(Cn(n,l));)a++,l-=2;if(a%2==0)break;e+=2}else break}return e}function i3(n,e,t){for(;e>0;){let o=j1(n,e-2,t);if(o<e)return o;e--}return 0}function F1(n){return n>=56320&&n<57344}function Z1(n){return n>=55296&&n<56320}function Cn(n,e){let t=n.charCodeAt(e);if(!Z1(t)||e+1==n.length)return t;let o=n.charCodeAt(e+1);return F1(o)?(t-55296<<10)+(o-56320)+65536:t}function Mp(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function To(n){return n<65536?1:2}const Rp=/\r\n?|\n/;var kn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(kn||(kn={}));class ci{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let o=this.sections[t+1];e+=o<0?this.sections[t]:o}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,o=0,r=0;t<this.sections.length;){let a=this.sections[t++],l=this.sections[t++];l<0?(e(o,r,a),r+=a):r+=l,o+=a}}iterChangedRanges(e,t=!1){Ip(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let o=this.sections[t++],r=this.sections[t++];r<0?e.push(o,r):e.push(r,o)}return new ci(e)}composeDesc(e){return this.empty?e:e.empty?this:W1(this,e)}mapDesc(e,t=!1){return e.empty?this:Qp(this,e,t)}mapPos(e,t=-1,o=kn.Simple){let r=0,a=0;for(let l=0;l<this.sections.length;){let f=this.sections[l++],h=this.sections[l++],g=r+f;if(h<0){if(g>e)return a+(e-r);a+=f}else{if(o!=kn.Simple&&g>=e&&(o==kn.TrackDel&&r<e&&g>e||o==kn.TrackBefore&&r<e||o==kn.TrackAfter&&g>e))return null;if(g>e||g==e&&t<0&&!f)return e==r||t<0?a:a+h;a+=h}r=g}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return a}touchesRange(e,t=e){for(let o=0,r=0;o<this.sections.length&&r<=t;){let a=this.sections[o++],l=this.sections[o++],f=r+a;if(l>=0&&r<=t&&f>=e)return r<e&&f>t?"cover":!0;r=f}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let o=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+o+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ci(e)}static create(e){return new ci(e)}}class sn extends ci{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ip(this,(t,o,r,a,l)=>e=e.replace(r,r+(o-t),l),!1),e}mapDesc(e,t=!1){return Qp(this,e,t,!0)}invert(e){let t=this.sections.slice(),o=[];for(let r=0,a=0;r<t.length;r+=2){let l=t[r],f=t[r+1];if(f>=0){t[r]=f,t[r+1]=l;let h=r>>1;for(;o.length<h;)o.push(Ot.empty);o.push(l?e.slice(a,a+l):Ot.empty)}a+=l}return new sn(t,o)}compose(e){return this.empty?e:e.empty?this:W1(this,e,!0)}map(e,t=!1){return e.empty?this:Qp(this,e,t,!0)}iterChanges(e,t=!1){Ip(this,e,t)}get desc(){return ci.create(this.sections)}filter(e){let t=[],o=[],r=[],a=new Rl(this);e:for(let l=0,f=0;;){let h=l==e.length?1e9:e[l++];for(;f<h||f==h&&a.len==0;){if(a.done)break e;let O=Math.min(a.len,h-f);Dn(r,O,-1);let v=a.ins==-1?-1:a.off==0?a.ins:0;Dn(t,O,v),v>0&&qi(o,t,a.text),a.forward(O),f+=O}let g=e[l++];for(;f<g;){if(a.done)break e;let O=Math.min(a.len,g-f);Dn(t,O,-1),Dn(r,O,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(O),f+=O}}return{changes:new sn(t,o),filtered:ci.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let o=this.sections[t],r=this.sections[t+1];r<0?e.push(o):r==0?e.push([o]):e.push([o].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,o){let r=[],a=[],l=0,f=null;function h(O=!1){if(!O&&!r.length)return;l<t&&Dn(r,t-l,-1);let v=new sn(r,a);f=f?f.compose(v.map(f)):v,r=[],a=[],l=0}function g(O){if(Array.isArray(O))for(let v of O)g(v);else if(O instanceof sn){if(O.length!=t)throw new RangeError(`Mismatched change set length (got ${O.length}, expected ${t})`);h(),f=f?f.compose(O.map(f)):O}else{let{from:v,to:b=v,insert:x}=O;if(v>b||v<0||b>t)throw new RangeError(`Invalid change range ${v} to ${b} (in doc of length ${t})`);let C=x?typeof x=="string"?Ot.of(x.split(o||Rp)):x:Ot.empty,k=C.length;if(v==b&&k==0)return;v<l&&h(),v>l&&Dn(r,v-l,-1),Dn(r,b-v,k),qi(a,r,C),l=b}}return g(e),h(!f),f}static empty(e){return new sn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],o=[];for(let r=0;r<e.length;r++){let a=e[r];if(typeof a=="number")t.push(a,-1);else{if(!Array.isArray(a)||typeof a[0]!="number"||a.some((l,f)=>f&&typeof l!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(a.length==1)t.push(a[0],0);else{for(;o.length<r;)o.push(Ot.empty);o[r]=Ot.of(a.slice(1)),t.push(a[0],o[r].length)}}}return new sn(t,o)}static createSet(e,t){return new sn(e,t)}}function Dn(n,e,t,o=!1){if(e==0&&t<=0)return;let r=n.length-2;r>=0&&t<=0&&t==n[r+1]?n[r]+=e:e==0&&n[r]==0?n[r+1]+=t:o?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function qi(n,e,t){if(t.length==0)return;let o=e.length-2>>1;if(o<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<o;)n.push(Ot.empty);n.push(t)}}function Ip(n,e,t){let o=n.inserted;for(let r=0,a=0,l=0;l<n.sections.length;){let f=n.sections[l++],h=n.sections[l++];if(h<0)r+=f,a+=f;else{let g=r,O=a,v=Ot.empty;for(;g+=f,O+=h,h&&o&&(v=v.append(o[l-2>>1])),!(t||l==n.sections.length||n.sections[l+1]<0);)f=n.sections[l++],h=n.sections[l++];e(r,g,a,O,v),r=g,a=O}}}function Qp(n,e,t,o=!1){let r=[],a=o?[]:null,l=new Rl(n),f=new Rl(e);for(let h=-1;;)if(l.ins==-1&&f.ins==-1){let g=Math.min(l.len,f.len);Dn(r,g,-1),l.forward(g),f.forward(g)}else if(f.ins>=0&&(l.ins<0||h==l.i||l.off==0&&(f.len<l.len||f.len==l.len&&!t))){let g=f.len;for(Dn(r,f.ins,-1);g;){let O=Math.min(l.len,g);l.ins>=0&&h<l.i&&l.len<=O&&(Dn(r,0,l.ins),a&&qi(a,r,l.text),h=l.i),l.forward(O),g-=O}f.next()}else if(l.ins>=0){let g=0,O=l.len;for(;O;)if(f.ins==-1){let v=Math.min(O,f.len);g+=v,O-=v,f.forward(v)}else if(f.ins==0&&f.len<O)O-=f.len,f.next();else break;Dn(r,g,h<l.i?l.ins:0),a&&h<l.i&&qi(a,r,l.text),h=l.i,l.forward(l.len-O)}else{if(l.done&&f.done)return a?sn.createSet(r,a):ci.create(r);throw new Error("Mismatched change set lengths")}}function W1(n,e,t=!1){let o=[],r=t?[]:null,a=new Rl(n),l=new Rl(e);for(let f=!1;;){if(a.done&&l.done)return r?sn.createSet(o,r):ci.create(o);if(a.ins==0)Dn(o,a.len,0,f),a.next();else if(l.len==0&&!l.done)Dn(o,0,l.ins,f),r&&qi(r,o,l.text),l.next();else{if(a.done||l.done)throw new Error("Mismatched change set lengths");{let h=Math.min(a.len2,l.len),g=o.length;if(a.ins==-1){let O=l.ins==-1?-1:l.off?0:l.ins;Dn(o,h,O,f),r&&O&&qi(r,o,l.text)}else l.ins==-1?(Dn(o,a.off?0:a.len,h,f),r&&qi(r,o,a.textBit(h))):(Dn(o,a.off?0:a.len,l.off?0:l.ins,f),r&&!l.off&&qi(r,o,l.text));f=(a.ins>h||l.ins>=0&&l.len>h)&&(f||o.length>g),a.forward2(h),l.forward(h)}}}}class Rl{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Ot.empty:e[t]}textBit(e){let{inserted:t}=this.set,o=this.i-2>>1;return o>=t.length&&!e?Ot.empty:t[o].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class na{constructor(e,t,o){this.from=e,this.to=t,this.flags=o}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let o,r;return this.empty?o=r=e.mapPos(this.from,t):(o=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),o==this.from&&r==this.to?this:new na(o,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return ve.range(e,t);let o=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return ve.range(this.anchor,o)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ve.range(e.anchor,e.head)}static create(e,t,o){return new na(e,t,o)}}class ve{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:ve.create(this.ranges.map(o=>o.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let o=0;o<this.ranges.length;o++)if(!this.ranges[o].eq(e.ranges[o],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ve([this.main],0)}addRange(e,t=!0){return ve.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let o=this.ranges.slice();return o[t]=e,ve.create(o,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ve(e.ranges.map(t=>na.fromJSON(t)),e.main)}static single(e,t=e){return new ve([ve.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let o=0,r=0;r<e.length;r++){let a=e[r];if(a.empty?a.from<=o:a.from<o)return ve.normalized(e.slice(),t);o=a.to}return new ve(e,t)}static cursor(e,t=0,o,r){return na.create(e,e,(t==0?0:t<0?8:16)|(o==null?7:Math.min(6,o))|(r??16777215)<<6)}static range(e,t,o,r){let a=(o??16777215)<<6|(r==null?7:Math.min(6,r));return t<e?na.create(t,e,48|a):na.create(e,t,(t>e?8:0)|a)}static normalized(e,t=0){let o=e[t];e.sort((r,a)=>r.from-a.from),t=e.indexOf(o);for(let r=1;r<e.length;r++){let a=e[r],l=e[r-1];if(a.empty?a.from<=l.to:a.from<l.to){let f=l.from,h=Math.max(a.to,l.to);r<=t&&t--,e.splice(--r,2,a.anchor>a.head?ve.range(h,f):ve.range(f,h))}}return new ve(e,t)}}function z1(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Dp=0;class Ve{constructor(e,t,o,r,a){this.combine=e,this.compareInput=t,this.compare=o,this.isStatic=r,this.id=Dp++,this.default=e([]),this.extensions=typeof a=="function"?a(this):a}get reader(){return this}static define(e={}){return new Ve(e.combine||(t=>t),e.compareInput||((t,o)=>t===o),e.compare||(e.combine?(t,o)=>t===o:Bp),!!e.static,e.enables)}of(e){return new ju([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ju(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new ju(e,this,2,t)}from(e,t){return t||(t=o=>o),this.compute([e],o=>t(o.field(e)))}}function Bp(n,e){return n==e||n.length==e.length&&n.every((t,o)=>t===e[o])}class ju{constructor(e,t,o,r){this.dependencies=e,this.facet=t,this.type=o,this.value=r,this.id=Dp++}dynamicSlot(e){var t;let o=this.value,r=this.facet.compareInput,a=this.id,l=e[a]>>1,f=this.type==2,h=!1,g=!1,O=[];for(let v of this.dependencies)v=="doc"?h=!0:v=="selection"?g=!0:((t=e[v.id])!==null&&t!==void 0?t:1)&1||O.push(e[v.id]);return{create(v){return v.values[l]=o(v),1},update(v,b){if(h&&b.docChanged||g&&(b.docChanged||b.selection)||Lp(v,O)){let x=o(v);if(f?!U1(x,v.values[l],r):!r(x,v.values[l]))return v.values[l]=x,1}return 0},reconfigure:(v,b)=>{let x,C=b.config.address[a];if(C!=null){let k=Zu(b,C);if(this.dependencies.every(L=>L instanceof Ve?b.facet(L)===v.facet(L):L instanceof pn?b.field(L,!1)==v.field(L,!1):!0)||(f?U1(x=o(v),k,r):r(x=o(v),k)))return v.values[l]=k,0}else x=o(v);return v.values[l]=x,1}}}}function U1(n,e,t){if(n.length!=e.length)return!1;for(let o=0;o<n.length;o++)if(!t(n[o],e[o]))return!1;return!0}function Lp(n,e){let t=!1;for(let o of e)Dl(n,o)&1&&(t=!0);return t}function r3(n,e,t){let o=t.map(h=>n[h.id]),r=t.map(h=>h.type),a=o.filter(h=>!(h&1)),l=n[e.id]>>1;function f(h){let g=[];for(let O=0;O<o.length;O++){let v=Zu(h,o[O]);if(r[O]==2)for(let b of v)g.push(b);else g.push(v)}return e.combine(g)}return{create(h){for(let g of o)Dl(h,g);return h.values[l]=f(h),1},update(h,g){if(!Lp(h,a))return 0;let O=f(h);return e.compare(O,h.values[l])?0:(h.values[l]=O,1)},reconfigure(h,g){let O=Lp(h,o),v=g.config.facets[e.id],b=g.facet(e);if(v&&!O&&Bp(t,v))return h.values[l]=b,0;let x=f(h);return e.compare(x,b)?(h.values[l]=b,0):(h.values[l]=x,1)}}}const H1=Ve.define({static:!0});class pn{constructor(e,t,o,r,a){this.id=e,this.createF=t,this.updateF=o,this.compareF=r,this.spec=a,this.provides=void 0}static define(e){let t=new pn(Dp++,e.create,e.update,e.compare||((o,r)=>o===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(H1).find(o=>o.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:o=>(o.values[t]=this.create(o),1),update:(o,r)=>{let a=o.values[t],l=this.updateF(a,r);return this.compareF(a,l)?0:(o.values[t]=l,1)},reconfigure:(o,r)=>r.config.address[this.id]!=null?(o.values[t]=r.field(this),0):(o.values[t]=this.create(o),1)}}init(e){return[this,H1.of({field:this,create:e})]}get extension(){return this}}const oa={lowest:4,low:3,default:2,high:1,highest:0};function Il(n){return e=>new Y1(e,n)}const er={highest:Il(oa.highest),high:Il(oa.high),default:Il(oa.default),low:Il(oa.low),lowest:Il(oa.lowest)};class Y1{constructor(e,t){this.inner=e,this.prec=t}}class Ql{of(e){return new Vp(this,e)}reconfigure(e){return Ql.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Vp{constructor(e,t){this.compartment=e,this.inner=t}}class Fu{constructor(e,t,o,r,a,l){for(this.base=e,this.compartments=t,this.dynamicSlots=o,this.address=r,this.staticValues=a,this.facets=l,this.statusTemplate=[];this.statusTemplate.length<o.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,o){let r=[],a=Object.create(null),l=new Map;for(let b of a3(e,t,l))b instanceof pn?r.push(b):(a[b.facet.id]||(a[b.facet.id]=[])).push(b);let f=Object.create(null),h=[],g=[];for(let b of r)f[b.id]=g.length<<1,g.push(x=>b.slot(x));let O=o?.config.facets;for(let b in a){let x=a[b],C=x[0].facet,k=O&&O[b]||[];if(x.every(L=>L.type==0))if(f[C.id]=h.length<<1|1,Bp(k,x))h.push(o.facet(C));else{let L=C.combine(x.map(A=>A.value));h.push(o&&C.compare(L,o.facet(C))?o.facet(C):L)}else{for(let L of x)L.type==0?(f[L.id]=h.length<<1|1,h.push(L.value)):(f[L.id]=g.length<<1,g.push(A=>L.dynamicSlot(A)));f[C.id]=g.length<<1,g.push(L=>r3(L,C,x))}}let v=g.map(b=>b(f));return new Fu(e,l,v,f,h,a)}}function a3(n,e,t){let o=[[],[],[],[],[]],r=new Map;function a(l,f){let h=r.get(l);if(h!=null){if(h<=f)return;let g=o[h].indexOf(l);g>-1&&o[h].splice(g,1),l instanceof Vp&&t.delete(l.compartment)}if(r.set(l,f),Array.isArray(l))for(let g of l)a(g,f);else if(l instanceof Vp){if(t.has(l.compartment))throw new RangeError("Duplicate use of compartment in extensions");let g=e.get(l.compartment)||l.inner;t.set(l.compartment,g),a(g,f)}else if(l instanceof Y1)a(l.inner,l.prec);else if(l instanceof pn)o[f].push(l),l.provides&&a(l.provides,f);else if(l instanceof ju)o[f].push(l),l.facet.extensions&&a(l.facet.extensions,oa.default);else{let g=l.extension;if(!g)throw new Error(`Unrecognized extension value in extension set (${l}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(g,f)}}return a(n,oa.default),o.reduce((l,f)=>l.concat(f))}function Dl(n,e){if(e&1)return 2;let t=e>>1,o=n.status[t];if(o==4)throw new Error("Cyclic dependency between fields and/or facets");if(o&2)return o;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function Zu(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const X1=Ve.define(),jp=Ve.define({combine:n=>n.some(e=>e),static:!0}),G1=Ve.define({combine:n=>n.length?n[0]:void 0,static:!0}),K1=Ve.define(),J1=Ve.define(),$1=Ve.define(),q1=Ve.define({combine:n=>n.length?n[0]:!1});class Mi{constructor(e,t){this.type=e,this.value=t}static define(){return new s3}}class s3{of(e){return new Mi(this,e)}}class l3{constructor(e){this.map=e}of(e){return new it(this,e)}}class it{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new it(this.type,t)}is(e){return this.type==e}static define(e={}){return new l3(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let o=[];for(let r of e){let a=r.map(t);a&&o.push(a)}return o}}it.reconfigure=it.define(),it.appendConfig=it.define();class en{constructor(e,t,o,r,a,l){this.startState=e,this.changes=t,this.selection=o,this.effects=r,this.annotations=a,this.scrollIntoView=l,this._doc=null,this._state=null,o&&z1(o,t.newLength),a.some(f=>f.type==en.time)||(this.annotations=a.concat(en.time.of(Date.now())))}static create(e,t,o,r,a,l){return new en(e,t,o,r,a,l)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(en.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}en.time=Mi.define(),en.userEvent=Mi.define(),en.addToHistory=Mi.define(),en.remote=Mi.define();function c3(n,e){let t=[];for(let o=0,r=0;;){let a,l;if(o<n.length&&(r==e.length||e[r]>=n[o]))a=n[o++],l=n[o++];else if(r<e.length)a=e[r++],l=e[r++];else return t;!t.length||t[t.length-1]<a?t.push(a,l):t[t.length-1]<l&&(t[t.length-1]=l)}}function ex(n,e,t){var o;let r,a,l;return t?(r=e.changes,a=sn.empty(e.changes.length),l=n.changes.compose(e.changes)):(r=e.changes.map(n.changes),a=n.changes.mapDesc(e.changes,!0),l=n.changes.compose(r)),{changes:l,selection:e.selection?e.selection.map(a):(o=n.selection)===null||o===void 0?void 0:o.map(r),effects:it.mapEffects(n.effects,r).concat(it.mapEffects(e.effects,a)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function Fp(n,e,t){let o=e.selection,r=fs(e.annotations);return e.userEvent&&(r=r.concat(en.userEvent.of(e.userEvent))),{changes:e.changes instanceof sn?e.changes:sn.of(e.changes||[],t,n.facet(G1)),selection:o&&(o instanceof ve?o:ve.single(o.anchor,o.head)),effects:fs(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function tx(n,e,t){let o=Fp(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let a=1;a<e.length;a++){e[a].filter===!1&&(t=!1);let l=!!e[a].sequential;o=ex(o,Fp(n,e[a],l?o.changes.newLength:n.doc.length),l)}let r=en.create(n,o.changes,o.selection,o.effects,o.annotations,o.scrollIntoView);return d3(t?u3(r):r)}function u3(n){let e=n.startState,t=!0;for(let r of e.facet(K1)){let a=r(n);if(a===!1){t=!1;break}Array.isArray(a)&&(t=t===!0?a:c3(t,a))}if(t!==!0){let r,a;if(t===!1)a=n.changes.invertedDesc,r=sn.empty(e.doc.length);else{let l=n.changes.filter(t);r=l.changes,a=l.filtered.mapDesc(l.changes).invertedDesc}n=en.create(e,r,n.selection&&n.selection.map(a),it.mapEffects(n.effects,a),n.annotations,n.scrollIntoView)}let o=e.facet(J1);for(let r=o.length-1;r>=0;r--){let a=o[r](n);a instanceof en?n=a:Array.isArray(a)&&a.length==1&&a[0]instanceof en?n=a[0]:n=tx(e,fs(a),!1)}return n}function d3(n){let e=n.startState,t=e.facet($1),o=n;for(let r=t.length-1;r>=0;r--){let a=t[r](n);a&&Object.keys(a).length&&(o=ex(o,Fp(e,a,n.changes.newLength),!0))}return o==n?n:en.create(e,n.changes,n.selection,o.effects,o.annotations,o.scrollIntoView)}const f3=[];function fs(n){return n==null?f3:Array.isArray(n)?n:[n]}var Qt=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Qt||(Qt={}));const h3=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Zp;try{Zp=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function p3(n){if(Zp)return Zp.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||h3.test(t)))return!0}return!1}function m3(n){return e=>{if(!/\S/.test(e))return Qt.Space;if(p3(e))return Qt.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return Qt.Word;return Qt.Other}}class ft{constructor(e,t,o,r,a,l){this.config=e,this.doc=t,this.selection=o,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=a,l&&(l._state=this);for(let f=0;f<this.config.dynamicSlots.length;f++)Dl(this,f<<1);this.computeSlot=null}field(e,t=!0){let o=this.config.address[e.id];if(o==null){if(t)throw new RangeError("Field is not present in this state");return}return Dl(this,o),Zu(this,o)}update(...e){return tx(this,e,!0)}applyTransaction(e){let t=this.config,{base:o,compartments:r}=t;for(let f of e.effects)f.is(Ql.reconfigure)?(t&&(r=new Map,t.compartments.forEach((h,g)=>r.set(g,h)),t=null),r.set(f.value.compartment,f.value.extension)):f.is(it.reconfigure)?(t=null,o=f.value):f.is(it.appendConfig)&&(t=null,o=fs(o).concat(f.value));let a;t?a=e.startState.values.slice():(t=Fu.resolve(o,r,this),a=new ft(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(h,g)=>g.reconfigure(h,this),null).values);let l=e.startState.facet(jp)?e.newSelection:e.newSelection.asSingle();new ft(t,e.newDoc,l,a,(f,h)=>h.update(f,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:ve.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,o=e(t.ranges[0]),r=this.changes(o.changes),a=[o.range],l=fs(o.effects);for(let f=1;f<t.ranges.length;f++){let h=e(t.ranges[f]),g=this.changes(h.changes),O=g.map(r);for(let b=0;b<f;b++)a[b]=a[b].map(O);let v=r.mapDesc(g,!0);a.push(h.range.map(v)),r=r.compose(O),l=it.mapEffects(l,O).concat(it.mapEffects(fs(h.effects),v))}return{changes:r,selection:ve.create(a,t.mainIndex),effects:l}}changes(e=[]){return e instanceof sn?e:sn.of(e,this.doc.length,this.facet(ft.lineSeparator))}toText(e){return Ot.of(e.split(this.facet(ft.lineSeparator)||Rp))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Dl(this,t),Zu(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let o in e){let r=e[o];r instanceof pn&&this.config.address[r.id]!=null&&(t[o]=r.spec.toJSON(this.field(e[o]),this))}return t}static fromJSON(e,t={},o){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(o){for(let a in o)if(Object.prototype.hasOwnProperty.call(e,a)){let l=o[a],f=e[a];r.push(l.init(h=>l.spec.fromJSON(f,h)))}}return ft.create({doc:e.doc,selection:ve.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Fu.resolve(e.extensions||[],new Map),o=e.doc instanceof Ot?e.doc:Ot.of((e.doc||"").split(t.staticFacet(ft.lineSeparator)||Rp)),r=e.selection?e.selection instanceof ve?e.selection:ve.single(e.selection.anchor,e.selection.head):ve.single(0);return z1(r,o.length),t.staticFacet(jp)||(r=r.asSingle()),new ft(t,o,r,t.dynamicSlots.map(()=>null),(a,l)=>l.create(a),null)}get tabSize(){return this.facet(ft.tabSize)}get lineBreak(){return this.facet(ft.lineSeparator)||`
|
|
326
|
-
`}get readOnly(){return this.facet(q1)}phrase(e,...t){for(let o of this.facet(ft.phrases))if(Object.prototype.hasOwnProperty.call(o,e)){e=o[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(o,r)=>{if(r=="$")return"$";let a=+(r||1);return!a||a>t.length?o:t[a-1]})),e}languageDataAt(e,t,o=-1){let r=[];for(let a of this.facet(X1))for(let l of a(this,t,o))Object.prototype.hasOwnProperty.call(l,e)&&r.push(l[e]);return r}charCategorizer(e){return m3(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:o,length:r}=this.doc.lineAt(e),a=this.charCategorizer(e),l=e-o,f=e-o;for(;l>0;){let h=Sn(t,l,!1);if(a(t.slice(h,l))!=Qt.Word)break;l=h}for(;f<r;){let h=Sn(t,f);if(a(t.slice(f,h))!=Qt.Word)break;f=h}return l==f?null:ve.range(l+o,f+o)}}ft.allowMultipleSelections=jp,ft.tabSize=Ve.define({combine:n=>n.length?n[0]:4}),ft.lineSeparator=G1,ft.readOnly=q1,ft.phrases=Ve.define({compare(n,e){let t=Object.keys(n),o=Object.keys(e);return t.length==o.length&&t.every(r=>n[r]==e[r])}}),ft.languageData=X1,ft.changeFilter=K1,ft.transactionFilter=J1,ft.transactionExtender=$1,Ql.reconfigure=it.define();function ui(n,e,t={}){let o={};for(let r of n)for(let a of Object.keys(r)){let l=r[a],f=o[a];if(f===void 0)o[a]=l;else if(!(f===l||l===void 0))if(Object.hasOwnProperty.call(t,a))o[a]=t[a](f,l);else throw new Error("Config merge conflict for field "+a)}for(let r in e)o[r]===void 0&&(o[r]=e[r]);return o}class ia{eq(e){return this==e}range(e,t=e){return Wp.create(e,t,this)}}ia.prototype.startSide=ia.prototype.endSide=0,ia.prototype.point=!1,ia.prototype.mapMode=kn.TrackDel;let Wp=class f5{constructor(e,t,o){this.from=e,this.to=t,this.value=o}static create(e,t,o){return new f5(e,t,o)}};function zp(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Up{constructor(e,t,o,r){this.from=e,this.to=t,this.value=o,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,o,r=0){let a=o?this.to:this.from;for(let l=r,f=a.length;;){if(l==f)return l;let h=l+f>>1,g=a[h]-e||(o?this.value[h].endSide:this.value[h].startSide)-t;if(h==l)return g>=0?l:f;g>=0?f=h:l=h+1}}between(e,t,o,r){for(let a=this.findIndex(t,-1e9,!0),l=this.findIndex(o,1e9,!1,a);a<l;a++)if(r(this.from[a]+e,this.to[a]+e,this.value[a])===!1)return!1}map(e,t){let o=[],r=[],a=[],l=-1,f=-1;for(let h=0;h<this.value.length;h++){let g=this.value[h],O=this.from[h]+e,v=this.to[h]+e,b,x;if(O==v){let C=t.mapPos(O,g.startSide,g.mapMode);if(C==null||(b=x=C,g.startSide!=g.endSide&&(x=t.mapPos(O,g.endSide),x<b)))continue}else if(b=t.mapPos(O,g.startSide),x=t.mapPos(v,g.endSide),b>x||b==x&&g.startSide>0&&g.endSide<=0)continue;(x-b||g.endSide-g.startSide)<0||(l<0&&(l=b),g.point&&(f=Math.max(f,x-b)),o.push(g),r.push(b-l),a.push(x-l))}return{mapped:o.length?new Up(r,a,o,f):null,pos:l}}}class vt{constructor(e,t,o,r){this.chunkPos=e,this.chunk=t,this.nextLayer=o,this.maxPoint=r}static create(e,t,o,r){return new vt(e,t,o,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:o=!1,filterFrom:r=0,filterTo:a=this.length}=e,l=e.filter;if(t.length==0&&!l)return this;if(o&&(t=t.slice().sort(zp)),this.isEmpty)return t.length?vt.of(t):this;let f=new ox(this,null,-1).goto(0),h=0,g=[],O=new tr;for(;f.value||h<t.length;)if(h<t.length&&(f.from-t[h].from||f.startSide-t[h].value.startSide)>=0){let v=t[h++];O.addInner(v.from,v.to,v.value)||g.push(v)}else f.rangeIndex==1&&f.chunkIndex<this.chunk.length&&(h==t.length||this.chunkEnd(f.chunkIndex)<t[h].from)&&(!l||r>this.chunkEnd(f.chunkIndex)||a<this.chunkPos[f.chunkIndex])&&O.addChunk(this.chunkPos[f.chunkIndex],this.chunk[f.chunkIndex])?f.nextChunk():((!l||r>f.to||a<f.from||l(f.from,f.to,f.value))&&(O.addInner(f.from,f.to,f.value)||g.push(Wp.create(f.from,f.to,f.value))),f.next());return O.finishInner(this.nextLayer.isEmpty&&!g.length?vt.empty:this.nextLayer.update({add:g,filter:l,filterFrom:r,filterTo:a}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],o=[],r=-1;for(let l=0;l<this.chunk.length;l++){let f=this.chunkPos[l],h=this.chunk[l],g=e.touchesRange(f,f+h.length);if(g===!1)r=Math.max(r,h.maxPoint),t.push(h),o.push(e.mapPos(f));else if(g===!0){let{mapped:O,pos:v}=h.map(f,e);O&&(r=Math.max(r,O.maxPoint),t.push(O),o.push(v))}}let a=this.nextLayer.map(e);return t.length==0?a:new vt(o,t,a||vt.empty,r)}between(e,t,o){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let a=this.chunkPos[r],l=this.chunk[r];if(t>=a&&e<=a+l.length&&l.between(a,e-a,t-a,o)===!1)return}this.nextLayer.between(e,t,o)}}iter(e=0){return Bl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Bl.from(e).goto(t)}static compare(e,t,o,r,a=-1){let l=e.filter(v=>v.maxPoint>0||!v.isEmpty&&v.maxPoint>=a),f=t.filter(v=>v.maxPoint>0||!v.isEmpty&&v.maxPoint>=a),h=nx(l,f,o),g=new Ll(l,h,a),O=new Ll(f,h,a);o.iterGaps((v,b,x)=>ix(g,v,O,b,x,r)),o.empty&&o.length==0&&ix(g,0,O,0,0,r)}static eq(e,t,o=0,r){r==null&&(r=999999999);let a=e.filter(O=>!O.isEmpty&&t.indexOf(O)<0),l=t.filter(O=>!O.isEmpty&&e.indexOf(O)<0);if(a.length!=l.length)return!1;if(!a.length)return!0;let f=nx(a,l),h=new Ll(a,f,0).goto(o),g=new Ll(l,f,0).goto(o);for(;;){if(h.to!=g.to||!Yp(h.active,g.active)||h.point&&(!g.point||!h.point.eq(g.point)))return!1;if(h.to>r)return!0;h.next(),g.next()}}static spans(e,t,o,r,a=-1){let l=new Ll(e,null,a).goto(t),f=t,h=l.openStart;for(;;){let g=Math.min(l.to,o);if(l.point){let O=l.activeForPoint(l.to),v=l.pointFrom<t?O.length+1:l.point.startSide<0?O.length:Math.min(O.length,h);r.point(f,g,l.point,O,v,l.pointRank),h=Math.min(l.openEnd(g),O.length)}else g>f&&(r.span(f,g,l.active,h),h=l.openEnd(g));if(l.to>o)return h+(l.point&&l.to>o?1:0);f=l.to,l.next()}}static of(e,t=!1){let o=new tr;for(let r of e instanceof Wp?[e]:t?g3(e):e)o.add(r.from,r.to,r.value);return o.finish()}static join(e){if(!e.length)return vt.empty;let t=e[e.length-1];for(let o=e.length-2;o>=0;o--)for(let r=e[o];r!=vt.empty;r=r.nextLayer)t=new vt(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}vt.empty=new vt([],[],null,-1);function g3(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let o=n[t];if(zp(e,o)>0)return n.slice().sort(zp);e=o}return n}vt.empty.nextLayer=vt.empty;class tr{finishChunk(e){this.chunks.push(new Up(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,o){this.addInner(e,t,o)||(this.nextLayer||(this.nextLayer=new tr)).add(e,t,o)}addInner(e,t,o){let r=e-this.lastTo||o.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||o.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=o,this.lastFrom=e,this.lastTo=t,this.value.push(o),o.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let o=t.value.length-1;return this.last=t.value[o],this.lastFrom=t.from[o]+e,this.lastTo=t.to[o]+e,!0}finish(){return this.finishInner(vt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=vt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function nx(n,e,t){let o=new Map;for(let a of n)for(let l=0;l<a.chunk.length;l++)a.chunk[l].maxPoint<=0&&o.set(a.chunk[l],a.chunkPos[l]);let r=new Set;for(let a of e)for(let l=0;l<a.chunk.length;l++){let f=o.get(a.chunk[l]);f!=null&&(t?t.mapPos(f):f)==a.chunkPos[l]&&!t?.touchesRange(f,f+a.chunk[l].length)&&r.add(a.chunk[l])}return r}class ox{constructor(e,t,o,r=0){this.layer=e,this.skip=t,this.minPoint=o,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,o){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,o=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!o||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],o=e+t.from[this.rangeIndex];if(this.from=o,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Bl{constructor(e){this.heap=e}static from(e,t=null,o=-1){let r=[];for(let a=0;a<e.length;a++)for(let l=e[a];!l.isEmpty;l=l.nextLayer)l.maxPoint>=o&&r.push(new ox(l,t,o,a));return r.length==1?r[0]:new Bl(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let o of this.heap)o.goto(e,t);for(let o=this.heap.length>>1;o>=0;o--)Hp(this.heap,o);return this.next(),this}forward(e,t){for(let o of this.heap)o.forward(e,t);for(let o=this.heap.length>>1;o>=0;o--)Hp(this.heap,o);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Hp(this.heap,0)}}}function Hp(n,e){for(let t=n[e];;){let o=(e<<1)+1;if(o>=n.length)break;let r=n[o];if(o+1<n.length&&r.compare(n[o+1])>=0&&(r=n[o+1],o++),t.compare(r)<0)break;n[o]=t,n[e]=r,e=o}}class Ll{constructor(e,t,o){this.minPoint=o,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Bl.from(e,t,o)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Wu(this.active,e),Wu(this.activeTo,e),Wu(this.activeRank,e),this.minActive=rx(this.active,this.activeTo)}addActive(e){let t=0,{value:o,to:r,rank:a}=this.cursor;for(;t<this.activeRank.length&&(a-this.activeRank[t]||r-this.activeTo[t])>0;)t++;zu(this.active,t,o),zu(this.activeTo,t,r),zu(this.activeRank,t,a),e&&zu(e,t,this.cursor.from),this.minActive=rx(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let o=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),o&&Wu(o,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let a=this.cursor.value;if(!a.point)this.addActive(o),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=a,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=a.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(o){this.openStart=0;for(let r=o.length-1;r>=0&&o[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let o=this.active.length-1;o>=0&&!(this.activeRank[o]<this.pointRank);o--)(this.activeTo[o]>e||this.activeTo[o]==e&&this.active[o].endSide>=this.point.endSide)&&t.push(this.active[o]);return t.reverse()}openEnd(e){let t=0;for(let o=this.activeTo.length-1;o>=0&&this.activeTo[o]>e;o--)t++;return t}}function ix(n,e,t,o,r,a){n.goto(e),t.goto(o);let l=o+r,f=o,h=o-e;for(;;){let g=n.to+h-t.to||n.endSide-t.endSide,O=g<0?n.to+h:t.to,v=Math.min(O,l);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Yp(n.activeForPoint(n.to),t.activeForPoint(t.to))||a.comparePoint(f,v,n.point,t.point):v>f&&!Yp(n.active,t.active)&&a.compareRange(f,v,n.active,t.active),O>l)break;f=O,g<=0&&n.next(),g>=0&&t.next()}}function Yp(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!n[t].eq(e[t]))return!1;return!0}function Wu(n,e){for(let t=e,o=n.length-1;t<o;t++)n[t]=n[t+1];n.pop()}function zu(n,e,t){for(let o=n.length-1;o>=e;o--)n[o+1]=n[o];n[e]=t}function rx(n,e){let t=-1,o=1e9;for(let r=0;r<e.length;r++)(e[r]-o||n[r].endSide-n[t].endSide)<0&&(t=r,o=e[r]);return t}function hs(n,e,t=n.length){let o=0;for(let r=0;r<t;)n.charCodeAt(r)==9?(o+=e-o%e,r++):(o++,r=Sn(n,r));return o}function Xp(n,e,t,o){for(let r=0,a=0;;){if(a>=e)return r;if(r==n.length)break;a+=n.charCodeAt(r)==9?t-a%t:1,r=Sn(n,r)}return o===!0?-1:n.length}const Gp="ͼ",ax=typeof Symbol>"u"?"__"+Gp:Symbol.for(Gp),Kp=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),sx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class nr{constructor(e,t){this.rules=[];let{finish:o}=t||{};function r(l){return/^@/.test(l)?[l]:l.split(/,\s*/)}function a(l,f,h,g){let O=[],v=/^@(\w+)\b/.exec(l[0]),b=v&&v[1]=="keyframes";if(v&&f==null)return h.push(l[0]+";");for(let x in f){let C=f[x];if(/&/.test(x))a(x.split(/,\s*/).map(k=>l.map(L=>k.replace(/&/,L))).reduce((k,L)=>k.concat(L)),C,h);else if(C&&typeof C=="object"){if(!v)throw new RangeError("The value of a property ("+x+") should be a primitive value.");a(r(x),C,O,b)}else C!=null&&O.push(x.replace(/_.*/,"").replace(/[A-Z]/g,k=>"-"+k.toLowerCase())+": "+C+";")}(O.length||b)&&h.push((o&&!v&&!g?l.map(o):l).join(", ")+" {"+O.join(" ")+"}")}for(let l in e)a(r(l),e[l],this.rules)}getRules(){return this.rules.join(`
|
|
327
|
-
`)}static newName(){let e=sx[ax]||1;return sx[ax]=e+1,Gp+e.toString(36)}static mount(e,t,o){let r=e[Kp],a=o&&o.nonce;r?a&&r.setNonce(a):r=new O3(e,a),r.mount(Array.isArray(t)?t:[t],e)}}let lx=new Map;class O3{constructor(e,t){let o=e.ownerDocument||e,r=o.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let a=lx.get(o);if(a)return e[Kp]=a;this.sheet=new r.CSSStyleSheet,lx.set(o,this)}else this.styleTag=o.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Kp]=this}mount(e,t){let o=this.sheet,r=0,a=0;for(let l=0;l<e.length;l++){let f=e[l],h=this.modules.indexOf(f);if(h<a&&h>-1&&(this.modules.splice(h,1),a--,h=-1),h==-1){if(this.modules.splice(a++,0,f),o)for(let g=0;g<f.rules.length;g++)o.insertRule(f.rules[g],r++)}else{for(;a<h;)r+=this.modules[a++].rules.length;r+=f.rules.length,a++}}if(o)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let l="";for(let h=0;h<this.modules.length;h++)l+=this.modules[h].getRules()+`
|
|
328
|
-
`;this.styleTag.textContent=l;let f=t.head||t;this.styleTag.parentNode!=f&&f.insertBefore(this.styleTag,f.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var or={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Vl={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},v3=typeof navigator<"u"&&/Mac/.test(navigator.platform),y3=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Pn=0;Pn<10;Pn++)or[48+Pn]=or[96+Pn]=String(Pn);for(var Pn=1;Pn<=24;Pn++)or[Pn+111]="F"+Pn;for(var Pn=65;Pn<=90;Pn++)or[Pn]=String.fromCharCode(Pn+32),Vl[Pn]=String.fromCharCode(Pn);for(var Jp in or)Vl.hasOwnProperty(Jp)||(Vl[Jp]=or[Jp]);function b3(n){var e=v3&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||y3&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Vl:or)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function jl(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function $p(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function x3(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Uu(n,e){if(!e.anchorNode)return!1;try{return $p(n,e.anchorNode)}catch{return!1}}function ps(n){return n.nodeType==3?aa(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Fl(n,e,t,o){return t?cx(n,e,t,o,-1)||cx(n,e,t,o,1):!1}function ra(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Hu(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function cx(n,e,t,o,r){for(;;){if(n==t&&e==o)return!0;if(e==(r<0?0:Ri(n))){if(n.nodeName=="DIV")return!1;let a=n.parentNode;if(!a||a.nodeType!=1)return!1;e=ra(n)+(r<0?0:1),n=a}else if(n.nodeType==1){if(n=n.childNodes[e+(r<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=r<0?Ri(n):0}else return!1}}function Ri(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Zl(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function w3(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function ux(n,e){let t=e.width/n.offsetWidth,o=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(o>.995&&o<1.005||!isFinite(o)||Math.abs(e.height-n.offsetHeight)<1)&&(o=1),{scaleX:t,scaleY:o}}function S3(n,e,t,o,r,a,l,f){let h=n.ownerDocument,g=h.defaultView||window;for(let O=n,v=!1;O&&!v;)if(O.nodeType==1){let b,x=O==h.body,C=1,k=1;if(x)b=w3(g);else{if(/^(fixed|sticky)$/.test(getComputedStyle(O).position)&&(v=!0),O.scrollHeight<=O.clientHeight&&O.scrollWidth<=O.clientWidth){O=O.assignedSlot||O.parentNode;continue}let E=O.getBoundingClientRect();({scaleX:C,scaleY:k}=ux(O,E)),b={left:E.left,right:E.left+O.clientWidth*C,top:E.top,bottom:E.top+O.clientHeight*k}}let L=0,A=0;if(r=="nearest")e.top<b.top?(A=-(b.top-e.top+l),t>0&&e.bottom>b.bottom+A&&(A=e.bottom-b.bottom+A+l)):e.bottom>b.bottom&&(A=e.bottom-b.bottom+l,t<0&&e.top-A<b.top&&(A=-(b.top+A-e.top+l)));else{let E=e.bottom-e.top,F=b.bottom-b.top;A=(r=="center"&&E<=F?e.top+E/2-F/2:r=="start"||r=="center"&&t<0?e.top-l:e.bottom-F+l)-b.top}if(o=="nearest"?e.left<b.left?(L=-(b.left-e.left+a),t>0&&e.right>b.right+L&&(L=e.right-b.right+L+a)):e.right>b.right&&(L=e.right-b.right+a,t<0&&e.left<b.left+L&&(L=-(b.left+L-e.left+a))):L=(o=="center"?e.left+(e.right-e.left)/2-(b.right-b.left)/2:o=="start"==f?e.left-a:e.right-(b.right-b.left)+a)-b.left,L||A)if(x)g.scrollBy(L,A);else{let E=0,F=0;if(A){let B=O.scrollTop;O.scrollTop+=A/k,F=(O.scrollTop-B)*k}if(L){let B=O.scrollLeft;O.scrollLeft+=L/C,E=(O.scrollLeft-B)*C}e={left:e.left-E,top:e.top-F,right:e.right-E,bottom:e.bottom-F},E&&Math.abs(E-L)<1&&(o="nearest"),F&&Math.abs(F-A)<1&&(r="nearest")}if(x)break;O=O.assignedSlot||O.parentNode}else if(O.nodeType==11)O=O.host;else break}function C3(n){let e=n.ownerDocument,t,o;for(let r=n.parentNode;r&&!(r==e.body||t&&o);)if(r.nodeType==1)!o&&r.scrollHeight>r.clientHeight&&(o=r),!t&&r.scrollWidth>r.clientWidth&&(t=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:t,y:o}}class k3{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:o}=e;this.set(t,Math.min(e.anchorOffset,t?Ri(t):0),o,Math.min(e.focusOffset,o?Ri(o):0))}set(e,t,o,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=o,this.focusOffset=r}}let ms=null;function dx(n){if(n.setActive)return n.setActive();if(ms)return n.focus(ms);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(ms==null?{get preventScroll(){return ms={preventScroll:!0},!0}}:void 0),!ms){ms=!1;for(let t=0;t<e.length;){let o=e[t++],r=e[t++],a=e[t++];o.scrollTop!=r&&(o.scrollTop=r),o.scrollLeft!=a&&(o.scrollLeft=a)}}}let fx;function aa(n,e,t=e){let o=fx||(fx=document.createRange());return o.setEnd(n,t),o.setStart(n,e),o}function gs(n,e,t,o){let r={key:e,code:e,keyCode:t,which:t,cancelable:!0};o&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=o);let a=new KeyboardEvent("keydown",r);a.synthetic=!0,n.dispatchEvent(a);let l=new KeyboardEvent("keyup",r);return l.synthetic=!0,n.dispatchEvent(l),a.defaultPrevented||l.defaultPrevented}function P3(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function hx(n){for(;n.attributes.length;)n.removeAttributeNode(n.attributes[0])}function _3(n,e){let t=e.focusNode,o=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=o)return!1;for(o=Math.min(o,Ri(t));;)if(o){if(t.nodeType!=1)return!1;let r=t.childNodes[o-1];r.contentEditable=="false"?o--:(t=r,o=Ri(t))}else{if(t==n)return!0;o=ra(t),t=t.parentNode}}function px(n){return n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function mx(n,e){for(let t=n,o=e;;){if(t.nodeType==3&&o>0)return{node:t,offset:o};if(t.nodeType==1&&o>0){if(t.contentEditable=="false")return null;t=t.childNodes[o-1],o=Ri(t)}else if(t.parentNode&&!Hu(t))o=ra(t),t=t.parentNode;else return null}}function gx(n,e){for(let t=n,o=e;;){if(t.nodeType==3&&o<t.nodeValue.length)return{node:t,offset:o};if(t.nodeType==1&&o<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[o],o=0}else if(t.parentNode&&!Hu(t))o=ra(t)+1,t=t.parentNode;else return null}}class Bn{constructor(e,t,o=!0){this.node=e,this.offset=t,this.precise=o}static before(e,t){return new Bn(e.parentNode,ra(e),t)}static after(e,t){return new Bn(e.parentNode,ra(e)+1,t)}}const qp=[];class Pt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let o of this.children){if(o==e)return t;t+=o.length+o.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let o=this.dom,r=null,a;for(let l of this.children){if(l.flags&7){if(!l.dom&&(a=r?r.nextSibling:o.firstChild)){let f=Pt.get(a);(!f||!f.parent&&f.canReuseDOM(l))&&l.reuseDOM(a)}l.sync(e,t),l.flags&=-8}if(a=r?r.nextSibling:o.firstChild,t&&!t.written&&t.node==o&&a!=l.dom&&(t.written=!0),l.dom.parentNode==o)for(;a&&a!=l.dom;)a=Ox(a);else o.insertBefore(l.dom,a);r=l.dom}for(a=r?r.nextSibling:o.firstChild,a&&t&&t.node==o&&(t.written=!0);a;)a=Ox(a)}else if(this.flags&1)for(let o of this.children)o.flags&7&&(o.sync(e,t),o.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let o;if(e==this.dom)o=this.dom.childNodes[t];else{let r=Ri(e)==0?0:t==0?-1:1;for(;;){let a=e.parentNode;if(a==this.dom)break;r==0&&a.firstChild!=a.lastChild&&(e==a.firstChild?r=-1:r=1),e=a}r<0?o=e:o=e.nextSibling}if(o==this.dom.firstChild)return 0;for(;o&&!Pt.get(o);)o=o.nextSibling;if(!o)return this.length;for(let r=0,a=0;;r++){let l=this.children[r];if(l.dom==o)return a;a+=l.length+l.breakAfter}}domBoundsAround(e,t,o=0){let r=-1,a=-1,l=-1,f=-1;for(let h=0,g=o,O=o;h<this.children.length;h++){let v=this.children[h],b=g+v.length;if(g<e&&b>t)return v.domBoundsAround(e,t,g);if(b>=e&&r==-1&&(r=h,a=g),g>t&&v.dom.parentNode==this.dom){l=h,f=O;break}O=b,g=b+v.breakAfter}return{from:a,to:f<0?o+this.length:f,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:l<this.children.length&&l>=0?this.children[l].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,o=qp){this.markDirty();for(let r=e;r<t;r++){let a=this.children[r];a.parent==this&&o.indexOf(a)<0&&a.destroy()}this.children.splice(e,t-e,...o);for(let r=0;r<o.length;r++)o[r].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new vx(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,o,r,a,l){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}Pt.prototype.breakAfter=0;function Ox(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class vx{constructor(e,t,o){this.children=e,this.pos=t,this.i=o,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let o=this.children[--this.i];this.pos-=o.length+o.breakAfter}}}function yx(n,e,t,o,r,a,l,f,h){let{children:g}=n,O=g.length?g[e]:null,v=a.length?a[a.length-1]:null,b=v?v.breakAfter:l;if(!(e==o&&O&&!l&&!b&&a.length<2&&O.merge(t,r,a.length?v:null,t==0,f,h))){if(o<g.length){let x=g[o];x&&(r<x.length||x.breakAfter&&v?.breakAfter)?(e==o&&(x=x.split(r),r=0),!b&&v&&x.merge(0,r,v,!0,0,h)?a[a.length-1]=x:((r||x.children.length&&!x.children[0].length)&&x.merge(0,r,null,!1,0,h),a.push(x))):x?.breakAfter&&(v?v.breakAfter=1:l=1),o++}for(O&&(O.breakAfter=l,t>0&&(!l&&a.length&&O.merge(t,O.length,a[0],!1,f,0)?O.breakAfter=a.shift().breakAfter:(t<O.length||O.children.length&&O.children[O.children.length-1].length==0)&&O.merge(t,O.length,null,!1,f,0),e++));e<o&&a.length;)if(g[o-1].become(a[a.length-1]))o--,a.pop(),h=a.length?0:f;else if(g[e].become(a[0]))e++,a.shift(),f=a.length?0:h;else break;!a.length&&e&&o<g.length&&!g[e-1].breakAfter&&g[o].merge(0,0,g[e-1],!1,f,h)&&e--,(e<o||a.length)&&n.replaceChildren(e,o,a)}}function bx(n,e,t,o,r,a){let l=n.childCursor(),{i:f,off:h}=l.findPos(t,1),{i:g,off:O}=l.findPos(e,-1),v=e-t;for(let b of o)v+=b.length;n.length+=v,yx(n,g,O,f,h,o,0,r,a)}let Jn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},em=typeof document<"u"?document:{documentElement:{style:{}}};const tm=/Edge\/(\d+)/.exec(Jn.userAgent),xx=/MSIE \d/.test(Jn.userAgent),nm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Jn.userAgent),Yu=!!(xx||nm||tm),wx=!Yu&&/gecko\/(\d+)/i.test(Jn.userAgent),om=!Yu&&/Chrome\/(\d+)/.exec(Jn.userAgent),Sx="webkitFontSmoothing"in em.documentElement.style,Cx=!Yu&&/Apple Computer/.test(Jn.vendor),kx=Cx&&(/Mobile\/\w+/.test(Jn.userAgent)||Jn.maxTouchPoints>2);var Ze={mac:kx||/Mac/.test(Jn.platform),windows:/Win/.test(Jn.platform),linux:/Linux|X11/.test(Jn.platform),ie:Yu,ie_version:xx?em.documentMode||6:nm?+nm[1]:tm?+tm[1]:0,gecko:wx,gecko_version:wx?+(/Firefox\/(\d+)/.exec(Jn.userAgent)||[0,0])[1]:0,chrome:!!om,chrome_version:om?+om[1]:0,ios:kx,android:/Android\b/.test(Jn.userAgent),webkit:Sx,safari:Cx,webkit_version:Sx?+(/\bAppleWebKit\/(\d+)/.exec(Jn.userAgent)||[0,0])[1]:0,tabSize:em.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const E3=256;class Zo extends Pt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,o){return this.flags&8||o&&(!(o instanceof Zo)||this.length-(t-e)+o.length>E3||o.flags&8)?!1:(this.text=this.text.slice(0,e)+(o?o.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Zo(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Bn(this.dom,e)}domBoundsAround(e,t,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return T3(this.dom,e,t)}}class Ii extends Pt{constructor(e,t=[],o=0){super(),this.mark=e,this.children=t,this.length=o;for(let r of t)r.setParent(this)}setAttrs(e){if(hx(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,o,r,a,l){return o&&(!(o instanceof Ii&&o.mark.eq(this.mark))||e&&a<=0||t<this.length&&l<=0)?!1:(bx(this,e,t,o?o.children.slice():[],a-1,l-1),this.markDirty(),!0)}split(e){let t=[],o=0,r=-1,a=0;for(let f of this.children){let h=o+f.length;h>e&&t.push(o<e?f.split(e-o):f),r<0&&o>=e&&(r=a),o=h,a++}let l=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Ii(this.mark,t,l)}domAtPos(e){return Px(this,e)}coordsAt(e,t){return Ex(this,e,t)}}function T3(n,e,t){let o=n.nodeValue.length;e>o&&(e=o);let r=e,a=e,l=0;e==0&&t<0||e==o&&t>=0?Ze.chrome||Ze.gecko||(e?(r--,l=1):a<o&&(a++,l=-1)):t<0?r--:a<o&&a++;let f=aa(n,r,a).getClientRects();if(!f.length)return null;let h=f[(l?l<0:t>=0)?0:f.length-1];return Ze.safari&&!l&&h.width==0&&(h=Array.prototype.find.call(f,g=>g.width)||h),l?Zl(h,l<0):h||null}class ir extends Pt{static create(e,t,o){return new ir(e,t,o)}constructor(e,t,o){super(),this.widget=e,this.length=t,this.side=o,this.prevWidget=null}split(e){let t=ir.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,o,r,a,l){return o&&(!(o instanceof ir)||!this.widget.compare(o.widget)||e>0&&a<=0||t<this.length&&l<=0)?!1:(this.length=e+(o?o.length:0)+(this.length-t),!0)}become(e){return e instanceof ir&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Ot.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,o=t&&t.state.doc,r=this.posAtStart;return o?o.slice(r,r+this.length):Ot.empty}domAtPos(e){return(this.length?e==0:this.side>0)?Bn.before(this.dom):Bn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let o=this.widget.coordsAt(this.dom,e,t);if(o)return o;let r=this.dom.getClientRects(),a=null;if(!r.length)return null;let l=this.side?this.side<0:e>0;for(let f=l?r.length-1:0;a=r[f],!(e>0?f==0:f==r.length-1||a.top<a.bottom);f+=l?-1:1);return Zl(a,!l)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Os extends Pt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Os&&e.side==this.side}split(){return new Os(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?Bn.before(this.dom):Bn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ot.empty}get isHidden(){return!0}}Zo.prototype.children=ir.prototype.children=Os.prototype.children=qp;function Px(n,e){let t=n.dom,{children:o}=n,r=0;for(let a=0;r<o.length;r++){let l=o[r],f=a+l.length;if(!(f==a&&l.getSide()<=0)){if(e>a&&e<f&&l.dom.parentNode==t)return l.domAtPos(e-a);if(e<=a)break;a=f}}for(let a=r;a>0;a--){let l=o[a-1];if(l.dom.parentNode==t)return l.domAtPos(l.length)}for(let a=r;a<o.length;a++){let l=o[a];if(l.dom.parentNode==t)return l.domAtPos(0)}return new Bn(t,0)}function _x(n,e,t){let o,{children:r}=n;t>0&&e instanceof Ii&&r.length&&(o=r[r.length-1])instanceof Ii&&o.mark.eq(e.mark)?_x(o,e.children[0],t-1):(r.push(e),e.setParent(n)),n.length+=e.length}function Ex(n,e,t){let o=null,r=-1,a=null,l=-1;function f(g,O){for(let v=0,b=0;v<g.children.length&&b<=O;v++){let x=g.children[v],C=b+x.length;C>=O&&(x.children.length?f(x,O-b):(!a||a.isHidden&&t>0)&&(C>O||b==C&&x.getSide()>0)?(a=x,l=O-b):(b<O||b==C&&x.getSide()<0&&!x.isHidden)&&(o=x,r=O-b)),b=C}}f(n,e);let h=(t<0?o:a)||o||a;return h?h.coordsAt(Math.max(0,h==o?r:l),t):N3(n)}function N3(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=ps(e);return t[t.length-1]||null}function im(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Tx=Object.create(null);function Xu(n,e,t){if(n==e)return!0;n||(n=Tx),e||(e=Tx);let o=Object.keys(n),r=Object.keys(e);if(o.length-(t&&o.indexOf(t)>-1?1:0)!=r.length-(t&&r.indexOf(t)>-1?1:0))return!1;for(let a of o)if(a!=t&&(r.indexOf(a)==-1||n[a]!==e[a]))return!1;return!0}function rm(n,e,t){let o=!1;if(e)for(let r in e)t&&r in t||(o=!0,r=="style"?n.style.cssText="":n.removeAttribute(r));if(t)for(let r in t)e&&e[r]==t[r]||(o=!0,r=="style"?n.style.cssText=t[r]:n.setAttribute(r,t[r]));return o}function A3(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let o=n.attributes[t];e[o.name]=o.value}return e}class di{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,o){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Zn=function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n}(Zn||(Zn={}));class Ye extends ia{constructor(e,t,o,r){super(),this.startSide=e,this.endSide=t,this.widget=o,this.spec=r}get heightRelevant(){return!1}static mark(e){return new Wl(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),o=!!e.block;return t+=o&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new rr(e,t,t,o,e.widget||null,!1)}static replace(e){let t=!!e.block,o,r;if(e.isBlockGap)o=-5e8,r=4e8;else{let{start:a,end:l}=Nx(e,t);o=(a?t?-3e8:-1:5e8)-1,r=(l?t?2e8:1:-6e8)+1}return new rr(e,o,r,t,e.widget||null,!0)}static line(e){return new zl(e)}static set(e,t=!1){return vt.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ye.none=vt.empty;class Wl extends Ye{constructor(e){let{start:t,end:o}=Nx(e);super(t?-1:5e8,o?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,o;return this==e||e instanceof Wl&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((o=e.attrs)===null||o===void 0?void 0:o.class))&&Xu(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Wl.prototype.point=!1;class zl extends Ye{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof zl&&this.spec.class==e.spec.class&&Xu(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}zl.prototype.mapMode=kn.TrackBefore,zl.prototype.point=!0;class rr extends Ye{constructor(e,t,o,r,a,l){super(t,o,a,e),this.block=r,this.isReplace=l,this.mapMode=r?t<=0?kn.TrackBefore:kn.TrackAfter:kn.TrackDel}get type(){return this.startSide!=this.endSide?Zn.WidgetRange:this.startSide<=0?Zn.WidgetBefore:Zn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof rr&&M3(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}rr.prototype.point=!0;function Nx(n,e=!1){let{inclusiveStart:t,inclusiveEnd:o}=n;return t==null&&(t=n.inclusive),o==null&&(o=n.inclusive),{start:t??e,end:o??e}}function M3(n,e){return n==e||!!(n&&e&&n.compare(e))}function am(n,e,t,o=0){let r=t.length-1;r>=0&&t[r]+o>=n?t[r]=Math.max(t[r],e):t.push(n,e)}class tn extends Pt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,o,r,a,l){if(o){if(!(o instanceof tn))return!1;this.dom||o.transferDOM(this)}return r&&this.setDeco(o?o.attrs:null),bx(this,e,t,o?o.children.slice():[],a,l),!0}split(e){let t=new tn;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:o,off:r}=this.childPos(e);r&&(t.append(this.children[o].split(r),0),this.children[o].merge(r,this.children[o].length,null,!1,0,0),o++);for(let a=o;a<this.children.length;a++)t.append(this.children[a],0);for(;o>0&&this.children[o-1].length==0;)this.children[--o].destroy();return this.children.length=o,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Xu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){_x(this,e,t)}addLineDeco(e){let t=e.spec.attributes,o=e.spec.class;t&&(this.attrs=im(t,this.attrs||{})),o&&(this.attrs=im({class:o},this.attrs||{}))}domAtPos(e){return Px(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var o;this.dom?this.flags&4&&(hx(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(rm(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&Pt.get(r)instanceof Ii;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((o=Pt.get(r))===null||o===void 0?void 0:o.isEditable)==!1&&(!Ze.ios||!this.children.some(a=>a instanceof Zo))){let a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let o of this.children){if(!(o instanceof Zo)||/[^ -~]/.test(o.text))return null;let r=ps(o.dom);if(r.length!=1)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let o=Ex(this,e,t);if(!this.children.length&&o&&this.parent){let{heightOracle:r}=this.parent.view.viewState,a=o.bottom-o.top;if(Math.abs(a-r.lineHeight)<2&&r.textHeight<a){let l=(a-r.textHeight)/2;return{top:o.top+l,bottom:o.bottom-l,left:o.left,right:o.left}}}return o}become(e){return e instanceof tn&&this.children.length==0&&e.children.length==0&&Xu(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let o=0,r=0;o<e.children.length;o++){let a=e.children[o],l=r+a.length;if(l>=t){if(a instanceof tn)return a;if(l>t)break}r=l+a.breakAfter}return null}}class Qi extends Pt{constructor(e,t,o){super(),this.widget=e,this.length=t,this.deco=o,this.breakAfter=0,this.prevWidget=null}merge(e,t,o,r,a,l){return o&&(!(o instanceof Qi)||!this.widget.compare(o.widget)||e>0&&a<=0||t<this.length&&l<=0)?!1:(this.length=e+(o?o.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?Bn.before(this.dom):Bn.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let o=new Qi(this.widget,t,this.deco);return o.breakAfter=this.breakAfter,o}get children(){return qp}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ot.empty}domBoundsAround(){return null}become(e){return e instanceof Qi&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let o=this.widget.coordsAt(this.dom,e,t);return o||(this.widget instanceof sm?null:Zl(this.dom.getBoundingClientRect(),this.length?e==0:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:o}=this.deco;return t==o?!1:e<0?t<0:o>0}}class sm extends di{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Ul{constructor(e,t,o,r){this.doc=e,this.pos=t,this.end=o,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Qi&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new tn),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Gu(new Os(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Qi)&&this.getLine()}buildText(e,t,o){for(;e>0;){if(this.textOff==this.text.length){let{value:a,lineBreak:l,done:f}=this.cursor.next(this.skip);if(this.skip=0,f)throw new Error("Ran out of text content when drawing inline views");if(l){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=a,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-o)),this.getLine().append(Gu(new Zo(this.text.slice(this.textOff,this.textOff+r)),t),o),this.atCursorPos=!0,this.textOff+=r,e-=r,o=0}}span(e,t,o,r){this.buildText(t-e,o,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,o,r,a,l){if(this.disallowBlockEffectsFor[l]&&o instanceof rr){if(o.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let f=t-e;if(o instanceof rr)if(o.block)o.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Qi(o.widget||vs.block,f,o));else{let h=ir.create(o.widget||vs.inline,f,f?0:o.startSide),g=this.atCursorPos&&!h.isEditable&&a<=r.length&&(e<t||o.startSide>0),O=!h.isEditable&&(e<t||a>r.length||o.startSide<=0),v=this.getLine();this.pendingBuffer==2&&!g&&!h.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),g&&(v.append(Gu(new Os(1),r),a),a=r.length+Math.max(0,a-r.length)),v.append(Gu(h,r),a),this.atCursorPos=O,this.pendingBuffer=O?e<t||a>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(o);f&&(this.textOff+f<=this.text.length?this.textOff+=f:(this.skip+=f-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=a)}static build(e,t,o,r,a){let l=new Ul(e,t,o,a);return l.openEnd=vt.spans(r,t,o,l),l.openStart<0&&(l.openStart=l.openEnd),l.finish(l.openEnd),l}}function Gu(n,e){for(let t of e)n=new Ii(t,[n],n.length);return n}class vs extends di{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}vs.inline=new vs("span"),vs.block=new vs("div");var At=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(At||(At={}));const sa=At.LTR,lm=At.RTL;function Ax(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const R3=Ax("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),I3=Ax("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),cm=Object.create(null),fi=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);cm[e]=t,cm[t]=-e}function Mx(n){return n<=247?R3[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?I3[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8204?256:64336<=n&&n<=65023?4:1}const Q3=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class ar{get dir(){return this.level%2?lm:sa}constructor(e,t,o){this.from=e,this.to=t,this.level=o}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,o,r){let a=-1;for(let l=0;l<e.length;l++){let f=e[l];if(f.from<=t&&f.to>=t){if(f.level==o)return l;(a<0||(r!=0?r<0?f.from<t:f.to>t:e[a].level>f.level))&&(a=l)}}if(a<0)throw new RangeError("Index out of range");return a}}function Rx(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let o=n[t],r=e[t];if(o.from!=r.from||o.to!=r.to||o.direction!=r.direction||!Rx(o.inner,r.inner))return!1}return!0}const _t=[];function D3(n,e,t,o,r){for(let a=0;a<=o.length;a++){let l=a?o[a-1].to:e,f=a<o.length?o[a].from:t,h=a?256:r;for(let g=l,O=h,v=h;g<f;g++){let b=Mx(n.charCodeAt(g));b==512?b=O:b==8&&v==4&&(b=16),_t[g]=b==4?2:b,b&7&&(v=b),O=b}for(let g=l,O=h,v=h;g<f;g++){let b=_t[g];if(b==128)g<f-1&&O==_t[g+1]&&O&24?b=_t[g]=O:_t[g]=256;else if(b==64){let x=g+1;for(;x<f&&_t[x]==64;)x++;let C=g&&O==8||x<t&&_t[x]==8?v==1?1:8:256;for(let k=g;k<x;k++)_t[k]=C;g=x-1}else b==8&&v==1&&(_t[g]=1);O=b,b&7&&(v=b)}}}function B3(n,e,t,o,r){let a=r==1?2:1;for(let l=0,f=0,h=0;l<=o.length;l++){let g=l?o[l-1].to:e,O=l<o.length?o[l].from:t;for(let v=g,b,x,C;v<O;v++)if(x=cm[b=n.charCodeAt(v)])if(x<0){for(let k=f-3;k>=0;k-=3)if(fi[k+1]==-x){let L=fi[k+2],A=L&2?r:L&4?L&1?a:r:0;A&&(_t[v]=_t[fi[k]]=A),f=k;break}}else{if(fi.length==189)break;fi[f++]=v,fi[f++]=b,fi[f++]=h}else if((C=_t[v])==2||C==1){let k=C==r;h=k?0:1;for(let L=f-3;L>=0;L-=3){let A=fi[L+2];if(A&2)break;if(k)fi[L+2]|=2;else{if(A&4)break;fi[L+2]|=4}}}}}function L3(n,e,t,o){for(let r=0,a=o;r<=t.length;r++){let l=r?t[r-1].to:n,f=r<t.length?t[r].from:e;for(let h=l;h<f;){let g=_t[h];if(g==256){let O=h+1;for(;;)if(O==f){if(r==t.length)break;O=t[r++].to,f=r<t.length?t[r].from:e}else if(_t[O]==256)O++;else break;let v=a==1,b=(O<e?_t[O]:o)==1,x=v==b?v?1:2:o;for(let C=O,k=r,L=k?t[k-1].to:n;C>h;)C==L&&(C=t[--k].from,L=k?t[k-1].to:n),_t[--C]=x;h=O}else a=g,h++}}}function um(n,e,t,o,r,a,l){let f=o%2?2:1;if(o%2==r%2)for(let h=e,g=0;h<t;){let O=!0,v=!1;if(g==a.length||h<a[g].from){let k=_t[h];k!=f&&(O=!1,v=k==16)}let b=!O&&f==1?[]:null,x=O?o:o+1,C=h;e:for(;;)if(g<a.length&&C==a[g].from){if(v)break e;let k=a[g];if(!O)for(let L=k.to,A=g+1;;){if(L==t)break e;if(A<a.length&&a[A].from==L)L=a[A++].to;else{if(_t[L]==f)break e;break}}if(g++,b)b.push(k);else{k.from>h&&l.push(new ar(h,k.from,x));let L=k.direction==sa!=!(x%2);dm(n,L?o+1:o,r,k.inner,k.from,k.to,l),h=k.to}C=k.to}else{if(C==t||(O?_t[C]!=f:_t[C]==f))break;C++}b?um(n,h,C,o+1,r,b,l):h<C&&l.push(new ar(h,C,x)),h=C}else for(let h=t,g=a.length;h>e;){let O=!0,v=!1;if(!g||h>a[g-1].to){let k=_t[h-1];k!=f&&(O=!1,v=k==16)}let b=!O&&f==1?[]:null,x=O?o:o+1,C=h;e:for(;;)if(g&&C==a[g-1].to){if(v)break e;let k=a[--g];if(!O)for(let L=k.from,A=g;;){if(L==e)break e;if(A&&a[A-1].to==L)L=a[--A].from;else{if(_t[L-1]==f)break e;break}}if(b)b.push(k);else{k.to<h&&l.push(new ar(k.to,h,x));let L=k.direction==sa!=!(x%2);dm(n,L?o+1:o,r,k.inner,k.from,k.to,l),h=k.from}C=k.from}else{if(C==e||(O?_t[C-1]!=f:_t[C-1]==f))break;C--}b?um(n,C,h,o+1,r,b,l):C<h&&l.push(new ar(C,h,x)),h=C}}function dm(n,e,t,o,r,a,l){let f=e%2?2:1;D3(n,r,a,o,f),B3(n,r,a,o,f),L3(r,a,o,f),um(n,r,a,e,t,o,l)}function V3(n,e,t){if(!n)return[new ar(0,0,e==lm?1:0)];if(e==sa&&!t.length&&!Q3.test(n))return Ix(n.length);if(t.length)for(;n.length>_t.length;)_t[_t.length]=256;let o=[],r=e==sa?0:1;return dm(n,r,r,t,0,n.length,o),o}function Ix(n){return[new ar(0,n,0)]}let Qx="";function j3(n,e,t,o,r){var a;let l=o.head-n.from,f=ar.find(e,l,(a=o.bidiLevel)!==null&&a!==void 0?a:-1,o.assoc),h=e[f],g=h.side(r,t);if(l==g){let b=f+=r?1:-1;if(b<0||b>=e.length)return null;h=e[f=b],l=h.side(!r,t),g=h.side(r,t)}let O=Sn(n.text,l,h.forward(r,t));(O<h.from||O>h.to)&&(O=g),Qx=n.text.slice(Math.min(l,O),Math.max(l,O));let v=f==(r?e.length-1:0)?null:e[f+(r?1:-1)];return v&&O==g&&v.level+(r?0:1)<h.level?ve.cursor(v.side(!r,t)+n.from,v.forward(r,t)?1:-1,v.level):ve.cursor(O+n.from,h.forward(r,t)?-1:1,h.level)}function F3(n,e,t){for(let o=e;o<t;o++){let r=Mx(n.charCodeAt(o));if(r==1)return sa;if(r==2||r==4)return lm}return sa}const Dx=Ve.define(),Bx=Ve.define(),Lx=Ve.define(),Vx=Ve.define(),fm=Ve.define(),jx=Ve.define(),Fx=Ve.define(),hm=Ve.define(),pm=Ve.define(),Zx=Ve.define({combine:n=>n.some(e=>e)}),Wx=Ve.define({combine:n=>n.some(e=>e)}),zx=Ve.define();class ys{constructor(e,t="nearest",o="nearest",r=5,a=5,l=!1){this.range=e,this.y=t,this.x=o,this.yMargin=r,this.xMargin=a,this.isSnapshot=l}map(e){return e.empty?this:new ys(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ys(ve.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Ku=it.define({map:(n,e)=>n.map(e)}),Ux=it.define();function $n(n,e,t){let o=n.facet(Vx);o.length?o[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const sr=Ve.define({combine:n=>n.length?n[0]:!0});let Z3=0;const Hl=Ve.define();class Xt{constructor(e,t,o,r,a){this.id=e,this.create=t,this.domEventHandlers=o,this.domEventObservers=r,this.extension=a(this)}static define(e,t){const{eventHandlers:o,eventObservers:r,provide:a,decorations:l}=t||{};return new Xt(Z3++,e,o,r,f=>{let h=[Hl.of(f)];return l&&h.push(Yl.of(g=>{let O=g.plugin(f);return O?l(O):Ye.none})),a&&h.push(a(f)),h})}static fromClass(e,t){return Xt.define(o=>new e(o),t)}}class mm{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(o){if($n(t.state,o,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){$n(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(o){$n(e.state,o,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Hx=Ve.define(),gm=Ve.define(),Yl=Ve.define(),Yx=Ve.define(),Om=Ve.define(),Xx=Ve.define();function Gx(n,e){let t=n.state.facet(Xx);if(!t.length)return t;let o=t.map(a=>a instanceof Function?a(n):a),r=[];return vt.spans(o,e.from,e.to,{point(){},span(a,l,f,h){let g=a-e.from,O=l-e.from,v=r;for(let b=f.length-1;b>=0;b--,h--){let x=f[b].spec.bidiIsolate,C;if(x==null&&(x=F3(e.text,g,O)),h>0&&v.length&&(C=v[v.length-1]).to==g&&C.direction==x)C.to=O,v=C.inner;else{let k={from:g,to:O,direction:x,inner:[]};v.push(k),v=k.inner}}}}),r}const Kx=Ve.define();function Jx(n){let e=0,t=0,o=0,r=0;for(let a of n.state.facet(Kx)){let l=a(n);l&&(l.left!=null&&(e=Math.max(e,l.left)),l.right!=null&&(t=Math.max(t,l.right)),l.top!=null&&(o=Math.max(o,l.top)),l.bottom!=null&&(r=Math.max(r,l.bottom)))}return{left:e,right:t,top:o,bottom:r}}const Xl=Ve.define();class No{constructor(e,t,o,r){this.fromA=e,this.toA=t,this.fromB=o,this.toB=r}join(e){return new No(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,o=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>o.toA)){if(r.toA<o.fromA)break;o=o.join(r),e.splice(t-1,1)}}return e.splice(t,0,o),e}static extendWithRanges(e,t){if(t.length==0)return e;let o=[];for(let r=0,a=0,l=0,f=0;;r++){let h=r==e.length?null:e[r],g=l-f,O=h?h.fromB:1e9;for(;a<t.length&&t[a]<O;){let v=t[a],b=t[a+1],x=Math.max(f,v),C=Math.min(O,b);if(x<=C&&new No(x+g,C+g,x,C).addToSet(o),b>O)break;a+=2}if(!h)return o;new No(h.fromA,h.toA,h.fromB,h.toB).addToSet(o),l=h.toA,f=h.toB}}}class Ju{constructor(e,t,o){this.view=e,this.state=t,this.transactions=o,this.flags=0,this.startState=e.state,this.changes=sn.empty(this.startState.doc.length);for(let a of o)this.changes=this.changes.compose(a.changes);let r=[];this.changes.iterChangedRanges((a,l,f,h)=>r.push(new No(a,l,f,h))),this.changedRanges=r}static create(e,t,o){return new Ju(e,t,o)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class $x extends Pt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Ye.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new tn],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new No(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let o=e.changedRanges;this.minWidth>0&&o.length&&(o.every(({fromA:g,toA:O})=>O<this.minWidthFrom||g>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?r=this.domChanged.newSel.head:!G3(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let a=r>-1?z3(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:g,to:O}=this.hasComposition;o=new No(g,O,e.changes.mapPos(g,-1),e.changes.mapPos(O,1)).addToSet(o.slice())}this.hasComposition=a?{from:a.range.fromB,to:a.range.toB}:null,(Ze.ie||Ze.chrome)&&!a&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let l=this.decorations,f=this.updateDeco(),h=Y3(l,f,e.changes);return o=No.extendWithRanges(o,h),!(this.flags&7)&&o.length==0?!1:(this.updateInner(o,e.startState.doc.length,a),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,o){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,o);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let l=Ze.chrome||Ze.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,l),this.flags&=-8,l&&(l.written||r.selectionRange.focusNode!=l.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(l=>l.flags&=-9);let a=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let l of this.children)l instanceof Qi&&l.widget instanceof sm&&a.push(l.dom);r.updateGaps(a)}updateChildren(e,t,o){let r=o?o.range.addToSet(e.slice()):e,a=this.childCursor(t);for(let l=r.length-1;;l--){let f=l>=0?r[l]:null;if(!f)break;let{fromA:h,toA:g,fromB:O,toB:v}=f,b,x,C,k;if(o&&o.range.fromB<v&&o.range.toB>O){let B=Ul.build(this.view.state.doc,O,o.range.fromB,this.decorations,this.dynamicDecorationMap),I=Ul.build(this.view.state.doc,o.range.toB,v,this.decorations,this.dynamicDecorationMap);x=B.breakAtStart,C=B.openStart,k=I.openEnd;let K=this.compositionView(o);I.breakAtStart?K.breakAfter=1:I.content.length&&K.merge(K.length,K.length,I.content[0],!1,I.openStart,0)&&(K.breakAfter=I.content[0].breakAfter,I.content.shift()),B.content.length&&K.merge(0,0,B.content[B.content.length-1],!0,0,B.openEnd)&&B.content.pop(),b=B.content.concat(K).concat(I.content)}else({content:b,breakAtStart:x,openStart:C,openEnd:k}=Ul.build(this.view.state.doc,O,v,this.decorations,this.dynamicDecorationMap));let{i:L,off:A}=a.findPos(g,1),{i:E,off:F}=a.findPos(h,-1);yx(this,E,F,L,A,b,x,C,k)}o&&this.fixCompositionDOM(o)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let o of t.effects)o.is(Ux)&&(this.editContextFormatting=o.value)}compositionView(e){let t=new Zo(e.text.nodeValue);t.flags|=8;for(let{deco:r}of e.marks)t=new Ii(r,[t],t.length);let o=new tn;return o.append(t,0),o}fixCompositionDOM(e){let t=(a,l)=>{l.flags|=8|(l.children.some(h=>h.flags&7)?1:0),this.markedForComposition.add(l);let f=Pt.get(a);f&&f!=l&&(f.dom=null),l.setDOM(a)},o=this.childPos(e.range.fromB,1),r=this.children[o.i];t(e.line,r);for(let a=e.marks.length-1;a>=-1;a--)o=r.childPos(o.off,1),r=r.children[o.i],t(a>=0?e.marks[a].node:e.text,r)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let o=this.view.root.activeElement,r=o==this.dom,a=!r&&Uu(this.dom,this.view.observer.selectionRange)&&!(o&&this.dom.contains(o));if(!(r||t||a))return;let l=this.forceSelection;this.forceSelection=!1;let f=this.view.state.selection.main,h=this.moveToLine(this.domAtPos(f.anchor)),g=f.empty?h:this.moveToLine(this.domAtPos(f.head));if(Ze.gecko&&f.empty&&!this.hasComposition&&W3(h)){let v=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(v,h.node.childNodes[h.offset]||null)),h=g=new Bn(v,0),l=!0}let O=this.view.observer.selectionRange;(l||!O.focusNode||(!Fl(h.node,h.offset,O.anchorNode,O.anchorOffset)||!Fl(g.node,g.offset,O.focusNode,O.focusOffset))&&!this.suppressWidgetCursorChange(O,f))&&(this.view.observer.ignore(()=>{Ze.android&&Ze.chrome&&this.dom.contains(O.focusNode)&&X3(O.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let v=jl(this.view.root);if(v)if(f.empty){if(Ze.gecko){let b=U3(h.node,h.offset);if(b&&b!=3){let x=(b==1?mx:gx)(h.node,h.offset);x&&(h=new Bn(x.node,x.offset))}}v.collapse(h.node,h.offset),f.bidiLevel!=null&&v.caretBidiLevel!==void 0&&(v.caretBidiLevel=f.bidiLevel)}else if(v.extend){v.collapse(h.node,h.offset);try{v.extend(g.node,g.offset)}catch{}}else{let b=document.createRange();f.anchor>f.head&&([h,g]=[g,h]),b.setEnd(g.node,g.offset),b.setStart(h.node,h.offset),v.removeAllRanges(),v.addRange(b)}a&&this.view.root.activeElement==this.dom&&(this.dom.blur(),o&&o.focus())}),this.view.observer.setSelectionRange(h,g)),this.impreciseAnchor=h.precise?null:new Bn(O.anchorNode,O.anchorOffset),this.impreciseHead=g.precise?null:new Bn(O.focusNode,O.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Fl(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,o=jl(e.root),{anchorNode:r,anchorOffset:a}=e.observer.selectionRange;if(!o||!t.empty||!t.assoc||!o.modify)return;let l=tn.find(this,t.head);if(!l)return;let f=l.posAtStart;if(t.head==f||t.head==f+l.length)return;let h=this.coordsAt(t.head,-1),g=this.coordsAt(t.head,1);if(!h||!g||h.bottom>g.top)return;let O=this.domAtPos(t.head+t.assoc);o.collapse(O.node,O.offset),o.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let v=e.observer.selectionRange;e.docView.posFromDOM(v.anchorNode,v.anchorOffset)!=t.from&&o.collapse(r,a)}moveToLine(e){let t=this.dom,o;if(e.node!=t)return e;for(let r=e.offset;!o&&r<t.childNodes.length;r++){let a=Pt.get(t.childNodes[r]);a instanceof tn&&(o=a.domAtPos(0))}for(let r=e.offset-1;!o&&r>=0;r--){let a=Pt.get(t.childNodes[r]);a instanceof tn&&(o=a.domAtPos(a.length))}return o?new Bn(o.node,o.offset,!0):e}nearest(e){for(let t=e;t;){let o=Pt.get(t);if(o&&o.rootView==this)return o;t=t.parentNode}return null}posFromDOM(e,t){let o=this.nearest(e);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(e,t)+o.posAtStart}domAtPos(e){let{i:t,off:o}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let r=this.children[t];if(o<r.length||r instanceof tn)break;t++,o=0}return this.children[t].domAtPos(o)}coordsAt(e,t){let o=null,r=0;for(let a=this.length,l=this.children.length-1;l>=0;l--){let f=this.children[l],h=a-f.breakAfter,g=h-f.length;if(h<e)break;if(g<=e&&(g<e||f.covers(-1))&&(h>e||f.covers(1))&&(!o||f instanceof tn&&!(o instanceof tn&&t>=0)))o=f,r=g;else if(o&&g==e&&h==e&&f instanceof Qi&&Math.abs(t)<2){if(f.deco.startSide<0)break;l&&(o=null)}a=g}return o?o.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:o}=this.childPos(e,1),r=this.children[t];if(!(r instanceof tn))return null;for(;r.children.length;){let{i:f,off:h}=r.childPos(o,1);for(;;f++){if(f==r.children.length)return null;if((r=r.children[f]).length)break}o=h}if(!(r instanceof Zo))return null;let a=Sn(r.text,o);if(a==o)return null;let l=aa(r.dom,o,a).getClientRects();for(let f=0;f<l.length;f++){let h=l[f];if(f==l.length-1||h.top<h.bottom&&h.left<h.right)return h}return null}measureVisibleLineHeights(e){let t=[],{from:o,to:r}=e,a=this.view.contentDOM.clientWidth,l=a>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,f=-1,h=this.view.textDirection==At.LTR;for(let g=0,O=0;O<this.children.length;O++){let v=this.children[O],b=g+v.length;if(b>r)break;if(g>=o){let x=v.dom.getBoundingClientRect();if(t.push(x.height),l){let C=v.dom.lastChild,k=C?ps(C):[];if(k.length){let L=k[k.length-1],A=h?L.right-x.left:x.right-L.left;A>f&&(f=A,this.minWidth=a,this.minWidthFrom=g,this.minWidthTo=b)}}}g=b+v.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?At.RTL:At.LTR}measureTextSize(){for(let a of this.children)if(a instanceof tn){let l=a.measureTextSize();if(l)return l}let e=document.createElement("div"),t,o,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let a=ps(e.firstChild)[0];t=e.getBoundingClientRect().height,o=a?a.width/27:7,r=a?a.height:t,e.remove()}),{lineHeight:t,charWidth:o,textHeight:r}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new vx(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let o=0,r=0;;r++){let a=r==t.viewports.length?null:t.viewports[r],l=a?a.from-1:this.length;if(l>o){let f=(t.lineBlockAt(l).bottom-t.lineBlockAt(o).top)/this.view.scaleY;e.push(Ye.replace({widget:new sm(f),block:!0,inclusive:!0,isBlockGap:!0}).range(o,l))}if(!a)break;o=a.to+1}return Ye.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Yl).map(a=>(this.dynamicDecorationMap[e++]=typeof a=="function")?a(this.view):a),o=!1,r=this.view.state.facet(Yx).map((a,l)=>{let f=typeof a=="function";return f&&(o=!0),f?a(this.view):a});for(r.length&&(this.dynamicDecorationMap[e++]=o,t.push(vt.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let g=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=g.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let g of this.view.state.facet(zx))try{if(g(this.view,e.range,e))return!0}catch(O){$n(this.view.state,O,"scroll handler")}let{range:t}=e,o=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),r;if(!o)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(o={left:Math.min(o.left,r.left),top:Math.min(o.top,r.top),right:Math.max(o.right,r.right),bottom:Math.max(o.bottom,r.bottom)});let a=Jx(this.view),l={left:o.left-a.left,top:o.top-a.top,right:o.right+a.right,bottom:o.bottom+a.bottom},{offsetWidth:f,offsetHeight:h}=this.view.scrollDOM;S3(this.view.scrollDOM,l,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,f),-f),Math.max(Math.min(e.yMargin,h),-h),this.view.textDirection==At.LTR)}}function W3(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function qx(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let o=mx(t.focusNode,t.focusOffset),r=gx(t.focusNode,t.focusOffset),a=o||r;if(r&&o&&r.node!=o.node){let f=Pt.get(r.node);if(!f||f instanceof Zo&&f.text!=r.node.nodeValue)a=r;else if(n.docView.lastCompositionAfterCursor){let h=Pt.get(o.node);!h||h instanceof Zo&&h.text!=o.node.nodeValue||(a=r)}}if(n.docView.lastCompositionAfterCursor=a!=o,!a)return null;let l=e-a.offset;return{from:l,to:l+a.node.nodeValue.length,node:a.node}}function z3(n,e,t){let o=qx(n,t);if(!o)return null;let{node:r,from:a,to:l}=o,f=r.nodeValue;if(/[\n\r]/.test(f)||n.state.doc.sliceString(o.from,o.to)!=f)return null;let h=e.invertedDesc,g=new No(h.mapPos(a),h.mapPos(l),a,l),O=[];for(let v=r.parentNode;;v=v.parentNode){let b=Pt.get(v);if(b instanceof Ii)O.push({node:v,deco:b.mark});else{if(b instanceof tn||v.nodeName=="DIV"&&v.parentNode==n.contentDOM)return{range:g,text:r,marks:O,line:v};if(v!=n.contentDOM)O.push({node:v,deco:new Wl({inclusive:!0,attributes:A3(v),tagName:v.tagName.toLowerCase()})});else return null}}}function U3(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}let H3=class{constructor(){this.changes=[]}compareRange(e,t){am(e,t,this.changes)}comparePoint(e,t){am(e,t,this.changes)}};function Y3(n,e,t){let o=new H3;return vt.compare(n,e,t,o),o.changes}function X3(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function G3(n,e){let t=!1;return e&&n.iterChangedRanges((o,r)=>{o<e.to&&r>e.from&&(t=!0)}),t}function K3(n,e,t=1){let o=n.charCategorizer(e),r=n.doc.lineAt(e),a=e-r.from;if(r.length==0)return ve.cursor(e);a==0?t=1:a==r.length&&(t=-1);let l=a,f=a;t<0?l=Sn(r.text,a,!1):f=Sn(r.text,a);let h=o(r.text.slice(l,f));for(;l>0;){let g=Sn(r.text,l,!1);if(o(r.text.slice(g,l))!=h)break;l=g}for(;f<r.length;){let g=Sn(r.text,f);if(o(r.text.slice(f,g))!=h)break;f=g}return ve.range(l+r.from,f+r.from)}function J3(n,e){return e.left>n?e.left-n:Math.max(0,n-e.right)}function $3(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function vm(n,e){return n.top<e.bottom-1&&n.bottom>e.top+1}function ew(n,e){return e<n.top?{top:e,left:n.left,right:n.right,bottom:n.bottom}:n}function tw(n,e){return e>n.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function ym(n,e,t){let o,r,a,l,f=!1,h,g,O,v;for(let C=n.firstChild;C;C=C.nextSibling){let k=ps(C);for(let L=0;L<k.length;L++){let A=k[L];r&&vm(r,A)&&(A=ew(tw(A,r.bottom),r.top));let E=J3(e,A),F=$3(t,A);if(E==0&&F==0)return C.nodeType==3?nw(C,e,t):ym(C,e,t);if(!o||l>F||l==F&&a>E){o=C,r=A,a=E,l=F;let B=F?t<A.top?-1:1:E?e<A.left?-1:1:0;f=!B||(B>0?L<k.length-1:L>0)}E==0?t>A.bottom&&(!O||O.bottom<A.bottom)?(h=C,O=A):t<A.top&&(!v||v.top>A.top)&&(g=C,v=A):O&&vm(O,A)?O=tw(O,A.bottom):v&&vm(v,A)&&(v=ew(v,A.top))}}if(O&&O.bottom>=t?(o=h,r=O):v&&v.top<=t&&(o=g,r=v),!o)return{node:n,offset:0};let b=Math.max(r.left,Math.min(r.right,e));if(o.nodeType==3)return nw(o,b,t);if(f&&o.contentEditable!="false")return ym(o,b,t);let x=Array.prototype.indexOf.call(n.childNodes,o)+(e>=(r.left+r.right)/2?1:0);return{node:n,offset:x}}function nw(n,e,t){let o=n.nodeValue.length,r=-1,a=1e9,l=0;for(let f=0;f<o;f++){let h=aa(n,f,f+1).getClientRects();for(let g=0;g<h.length;g++){let O=h[g];if(O.top==O.bottom)continue;l||(l=e-O.left);let v=(O.top>t?O.top-t:t-O.bottom)-1;if(O.left-1<=e&&O.right+1>=e&&v<a){let b=e>=(O.left+O.right)/2,x=b;if((Ze.chrome||Ze.gecko)&&aa(n,f).getBoundingClientRect().left==O.right&&(x=!b),v<=0)return{node:n,offset:f+(x?1:0)};r=f+(x?1:0),a=v}}}return{node:n,offset:r>-1?r:l>0?n.nodeValue.length:0}}function ow(n,e,t,o=-1){var r,a;let l=n.contentDOM.getBoundingClientRect(),f=l.top+n.viewState.paddingTop,h,{docHeight:g}=n.viewState,{x:O,y:v}=e,b=v-f;if(b<0)return 0;if(b>g)return n.state.doc.length;for(let B=n.viewState.heightOracle.textHeight/2,I=!1;h=n.elementAtHeight(b),h.type!=Zn.Text;)for(;b=o>0?h.bottom+B:h.top-B,!(b>=0&&b<=g);){if(I)return t?null:0;I=!0,o=-o}v=f+b;let x=h.from;if(x<n.viewport.from)return n.viewport.from==0?0:t?null:iw(n,l,h,O,v);if(x>n.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:iw(n,l,h,O,v);let C=n.dom.ownerDocument,k=n.root.elementFromPoint?n.root:C,L=k.elementFromPoint(O,v);L&&!n.contentDOM.contains(L)&&(L=null),L||(O=Math.max(l.left+1,Math.min(l.right-1,O)),L=k.elementFromPoint(O,v),L&&!n.contentDOM.contains(L)&&(L=null));let A,E=-1;if(L&&((r=n.docView.nearest(L))===null||r===void 0?void 0:r.isEditable)!=!1){if(C.caretPositionFromPoint){let B=C.caretPositionFromPoint(O,v);B&&({offsetNode:A,offset:E}=B)}else if(C.caretRangeFromPoint){let B=C.caretRangeFromPoint(O,v);B&&({startContainer:A,startOffset:E}=B,(!n.contentDOM.contains(A)||Ze.safari&&q3(A,E,O)||Ze.chrome&&e8(A,E,O))&&(A=void 0))}}if(!A||!n.docView.dom.contains(A)){let B=tn.find(n.docView,x);if(!B)return b>h.top+h.height/2?h.to:h.from;({node:A,offset:E}=ym(B.dom,O,v))}let F=n.docView.nearest(A);if(!F)return null;if(F.isWidget&&((a=F.dom)===null||a===void 0?void 0:a.nodeType)==1){let B=F.dom.getBoundingClientRect();return e.y<B.top||e.y<=B.bottom&&e.x<=(B.left+B.right)/2?F.posAtStart:F.posAtEnd}else return F.localPosFromDOM(A,E)+F.posAtStart}function iw(n,e,t,o,r){let a=Math.round((o-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let f=n.viewState.heightOracle.textHeight,h=Math.floor((r-t.top-(n.defaultLineHeight-f)*.5)/f);a+=h*n.viewState.heightOracle.lineLength}let l=n.state.sliceDoc(t.from,t.to);return t.from+Xp(l,a,n.state.tabSize)}function q3(n,e,t){let o;if(n.nodeType!=3||e!=(o=n.nodeValue.length))return!1;for(let r=n.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return aa(n,o-1,o).getBoundingClientRect().left>t}function e8(n,e,t){if(e!=0)return!1;for(let r=n;;){let a=r.parentNode;if(!a||a.nodeType!=1||a.firstChild!=r)return!1;if(a.classList.contains("cm-line"))break;r=a}let o=n.nodeType==1?n.getBoundingClientRect():aa(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-o.left>5}function bm(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let o of t.type)if(o.to>e||o.to==e&&(o.to==t.to||o.type==Zn.Text))return o}return t}function t8(n,e,t,o){let r=bm(n,e.head),a=!o||r.type!=Zn.Text||!(n.lineWrapping||r.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(a){let l=n.dom.getBoundingClientRect(),f=n.textDirectionAt(r.from),h=n.posAtCoords({x:t==(f==At.LTR)?l.right-1:l.left+1,y:(a.top+a.bottom)/2});if(h!=null)return ve.cursor(h,t?-1:1)}return ve.cursor(t?r.to:r.from,t?-1:1)}function rw(n,e,t,o){let r=n.state.doc.lineAt(e.head),a=n.bidiSpans(r),l=n.textDirectionAt(r.from);for(let f=e,h=null;;){let g=j3(r,a,l,f,t),O=Qx;if(!g){if(r.number==(t?n.state.doc.lines:1))return f;O=`
|
|
329
|
-
`,r=n.state.doc.line(r.number+(t?1:-1)),a=n.bidiSpans(r),g=n.visualLineSide(r,!t)}if(h){if(!h(O))return f}else{if(!o)return g;h=o(O)}f=g}}function n8(n,e,t){let o=n.state.charCategorizer(e),r=o(t);return a=>{let l=o(a);return r==Qt.Space&&(r=l),r==l}}function o8(n,e,t,o){let r=e.head,a=t?1:-1;if(r==(t?n.state.doc.length:0))return ve.cursor(r,e.assoc);let l=e.goalColumn,f,h=n.contentDOM.getBoundingClientRect(),g=n.coordsAtPos(r,e.assoc||-1),O=n.documentTop;if(g)l==null&&(l=g.left-h.left),f=a<0?g.top:g.bottom;else{let x=n.viewState.lineBlockAt(r);l==null&&(l=Math.min(h.right-h.left,n.defaultCharacterWidth*(r-x.from))),f=(a<0?x.top:x.bottom)+O}let v=h.left+l,b=o??n.viewState.heightOracle.textHeight>>1;for(let x=0;;x+=10){let C=f+(b+x)*a,k=ow(n,{x:v,y:C},!1,a);if(C<h.top||C>h.bottom||(a<0?k<r:k>r)){let L=n.docView.coordsForChar(k),A=!L||C<L.top?-1:1;return ve.cursor(k,A,void 0,l)}}}function $u(n,e,t){for(;;){let o=0;for(let r of n)r.between(e-1,e+1,(a,l,f)=>{if(e>a&&e<l){let h=o||t||(e-a<l-e?-1:1);e=h<0?a:l,o=h}});if(!o)return e}}function xm(n,e,t){let o=$u(n.state.facet(Om).map(r=>r(n)),t.from,e.head>t.from?-1:1);return o==t.from?t:ve.cursor(o,o<t.from?1:-1)}const Gl="";class i8{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ft.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Gl}readRange(e,t){if(!e)return this;let o=e.parentNode;for(let r=e;;){this.findPointBefore(o,r);let a=this.text.length;this.readNode(r);let l=r.nextSibling;if(l==t)break;let f=Pt.get(r),h=Pt.get(l);(f&&h?f.breakAfter:(f?f.breakAfter:Hu(r))||Hu(l)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>a)&&this.lineBreak(),r=l}return this.findPointBefore(o,t),this}readTextNode(e){let t=e.nodeValue;for(let o of this.points)o.node==e&&(o.pos=this.text.length+Math.min(o.offset,t.length));for(let o=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let a=-1,l=1,f;if(this.lineSeparator?(a=t.indexOf(this.lineSeparator,o),l=this.lineSeparator.length):(f=r.exec(t))&&(a=f.index,l=f[0].length),this.append(t.slice(o,a<0?t.length:a)),a<0)break;if(this.lineBreak(),l>1)for(let h of this.points)h.node==e&&h.pos>this.text.length&&(h.pos-=l-1);o=a+l}}readNode(e){if(e.cmIgnore)return;let t=Pt.get(e),o=t&&t.overrideDOMText;if(o!=null){this.findPointInside(e,o.length);for(let r=o.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let o of this.points)o.node==e&&e.childNodes[o.offset]==t&&(o.pos=this.text.length)}findPointInside(e,t){for(let o of this.points)(e.nodeType==3?o.node==e:e.contains(o.node))&&(o.pos=this.text.length+(r8(e,o.node,o.offset)?t:0))}}function r8(n,e,t){for(;;){if(!e||t<Ri(e))return!1;if(e==n)return!0;t=ra(e)+1,e=e.parentNode}}class aw{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class a8{constructor(e,t,o,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:a,impreciseAnchor:l}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,o,0))){let f=a||l?[]:c8(e),h=new i8(f,e.state);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=u8(f,this.bounds.from)}else{let f=e.observer.selectionRange,h=a&&a.node==f.focusNode&&a.offset==f.focusOffset||!$p(e.contentDOM,f.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(f.focusNode,f.focusOffset),g=l&&l.node==f.anchorNode&&l.offset==f.anchorOffset||!$p(e.contentDOM,f.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(f.anchorNode,f.anchorOffset),O=e.viewport;if((Ze.ios||Ze.chrome)&&e.state.selection.main.empty&&h!=g&&(O.from>0||O.to<e.state.doc.length)){let v=Math.min(h,g),b=Math.max(h,g),x=O.from-v,C=O.to-b;(x==0||x==1||v==0)&&(C==0||C==-1||b==e.state.doc.length)&&(h=0,g=e.state.doc.length)}this.newSel=ve.single(g,h)}}}function sw(n,e){let t,{newSel:o}=e,r=n.state.selection.main,a=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:l,to:f}=e.bounds,h=r.from,g=null;(a===8||Ze.android&&e.text.length<f-l)&&(h=r.to,g="end");let O=l8(n.state.doc.sliceString(l,f,Gl),e.text,h-l,g);O&&(Ze.chrome&&a==13&&O.toB==O.from+2&&e.text.slice(O.from,O.toB)==Gl+Gl&&O.toB--,t={from:l+O.from,to:l+O.toA,insert:Ot.of(e.text.slice(O.from,O.toB).split(Gl))})}else o&&(!n.hasFocus&&n.state.facet(sr)||o.main.eq(r))&&(o=null);if(!t&&!o)return!1;if(!t&&e.typeOver&&!r.empty&&o&&o.main.empty?t={from:r.from,to:r.to,insert:n.state.doc.slice(r.from,r.to)}:t&&t.from>=r.from&&t.to<=r.to&&(t.from!=r.from||t.to!=r.to)&&r.to-r.from-(t.to-t.from)<=4?t={from:r.from,to:r.to,insert:n.state.doc.slice(r.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,r.to))}:(Ze.mac||Ze.android)&&t&&t.from==t.to&&t.from==r.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(o&&t.insert.length==2&&(o=ve.single(o.main.anchor-1,o.main.head-1)),t={from:r.from,to:r.to,insert:Ot.of([" "])}):Ze.chrome&&t&&t.from==t.to&&t.from==r.head&&t.insert.toString()==`
|
|
330
|
-
`&&n.lineWrapping&&(o&&(o=ve.single(o.main.anchor-1,o.main.head-1)),t={from:r.from,to:r.to,insert:Ot.of([" "])}),t)return wm(n,t,o,a);if(o&&!o.main.eq(r)){let l=!1,f="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(l=!0),f=n.inputState.lastSelectionOrigin),n.dispatch({selection:o,scrollIntoView:l,userEvent:f}),!0}else return!1}function wm(n,e,t,o=-1){if(Ze.ios&&n.inputState.flushIOSKey(e))return!0;let r=n.state.selection.main;if(Ze.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&n.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&gs(n.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||o==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&gs(n.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&gs(n.contentDOM,"Delete",46)))return!0;let a=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let l,f=()=>l||(l=s8(n,e,t));return n.state.facet(jx).some(h=>h(n,e.from,e.to,a,f))||n.dispatch(f()),!0}function s8(n,e,t){let o,r=n.state,a=r.selection.main;if(e.from>=a.from&&e.to<=a.to&&e.to-e.from>=(a.to-a.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let f=a.from<e.from?r.sliceDoc(a.from,e.from):"",h=a.to>e.to?r.sliceDoc(e.to,a.to):"";o=r.replaceSelection(n.state.toText(f+e.insert.sliceString(0,void 0,n.state.lineBreak)+h))}else{let f=r.changes(e),h=t&&t.main.to<=f.newLength?t.main:void 0;if(r.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=a.to&&e.to>=a.to-10){let g=n.state.sliceDoc(e.from,e.to),O,v=t&&qx(n,t.main.head);if(v){let C=e.insert.length-(e.to-e.from);O={from:v.from,to:v.to-C}}else O=n.state.doc.lineAt(a.head);let b=a.to-e.to,x=a.to-a.from;o=r.changeByRange(C=>{if(C.from==a.from&&C.to==a.to)return{changes:f,range:h||C.map(f)};let k=C.to-b,L=k-g.length;if(C.to-C.from!=x||n.state.sliceDoc(L,k)!=g||C.to>=O.from&&C.from<=O.to)return{range:C};let A=r.changes({from:L,to:k,insert:e.insert}),E=C.to-a.to;return{changes:A,range:h?ve.range(Math.max(0,h.anchor+E),Math.max(0,h.head+E)):C.map(A)}})}else o={changes:f,selection:h&&r.selection.replaceRange(h)}}let l="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,l+=".compose",n.inputState.compositionFirstChange&&(l+=".start",n.inputState.compositionFirstChange=!1)),r.update(o,{userEvent:l,scrollIntoView:!0})}function l8(n,e,t,o){let r=Math.min(n.length,e.length),a=0;for(;a<r&&n.charCodeAt(a)==e.charCodeAt(a);)a++;if(a==r&&n.length==e.length)return null;let l=n.length,f=e.length;for(;l>0&&f>0&&n.charCodeAt(l-1)==e.charCodeAt(f-1);)l--,f--;if(o=="end"){let h=Math.max(0,a-Math.min(l,f));t-=l+h-a}if(l<a&&n.length<e.length){let h=t<=a&&t>=l?a-t:0;a-=h,f=a+(f-l),l=a}else if(f<a){let h=t<=a&&t>=f?a-t:0;a-=h,l=a+(l-f),f=a}return{from:a,toA:l,toB:f}}function c8(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:o,focusNode:r,focusOffset:a}=n.observer.selectionRange;return t&&(e.push(new aw(t,o)),(r!=t||a!=o)&&e.push(new aw(r,a))),e}function u8(n,e){if(n.length==0)return null;let t=n[0].pos,o=n.length==2?n[1].pos:t;return t>-1&&o>-1?ve.single(t+e,o+e):null}class d8{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Ze.safari&&e.contentDOM.addEventListener("input",()=>null),Ze.gecko&&_8(e.contentDOM.ownerDocument)}handleEvent(e){!y8(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let o=this.handlers[e];if(o){for(let r of o.observers)r(this.view,t);for(let r of o.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=f8(e),o=this.handlers,r=this.view.contentDOM;for(let a in t)if(a!="scroll"){let l=!t[a].handlers.length,f=o[a];f&&l!=!f.handlers.length&&(r.removeEventListener(a,this.handleEvent),f=null),f||r.addEventListener(a,this.handleEvent,{passive:l})}for(let a in o)a!="scroll"&&!t[a]&&r.removeEventListener(a,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&uw.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Ze.android&&Ze.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Ze.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=cw.find(o=>o.keyCode==e.keyCode))&&!e.ctrlKey||h8.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,gs(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Ze.safari&&!Ze.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function lw(n,e){return(t,o)=>{try{return e.call(n,o,t)}catch(r){$n(t.state,r)}}}function f8(n){let e=Object.create(null);function t(o){return e[o]||(e[o]={observers:[],handlers:[]})}for(let o of n){let r=o.spec;if(r&&r.domEventHandlers)for(let a in r.domEventHandlers){let l=r.domEventHandlers[a];l&&t(a).handlers.push(lw(o.value,l))}if(r&&r.domEventObservers)for(let a in r.domEventObservers){let l=r.domEventObservers[a];l&&t(a).observers.push(lw(o.value,l))}}for(let o in Wo)t(o).handlers.push(Wo[o]);for(let o in Ao)t(o).observers.push(Ao[o]);return e}const cw=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],h8="dthko",uw=[16,17,18,20,91,92,224,225],qu=6;function ed(n){return Math.max(0,n)*.7+8}function p8(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class m8{constructor(e,t,o,r){this.view=e,this.startEvent=t,this.style=o,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=C3(e.contentDOM),this.atoms=e.state.facet(Om).map(l=>l(e));let a=e.contentDOM.ownerDocument;a.addEventListener("mousemove",this.move=this.move.bind(this)),a.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ft.allowMultipleSelections)&&g8(e,t),this.dragging=v8(e,t)&&yw(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&p8(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,o=0,r=0,a=0,l=this.view.win.innerWidth,f=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:l}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:a,bottom:f}=this.scrollParents.y.getBoundingClientRect());let h=Jx(this.view);e.clientX-h.left<=r+qu?t=-ed(r-e.clientX):e.clientX+h.right>=l-qu&&(t=ed(e.clientX-l)),e.clientY-h.top<=a+qu?o=-ed(a-e.clientY):e.clientY+h.bottom>=f-qu&&(o=ed(e.clientY-f)),this.setScrollSpeed(t,o)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let o=0;o<e.ranges.length;o++){let r=e.ranges[o],a=null;if(r.empty){let l=$u(this.atoms,r.from,0);l!=r.from&&(a=ve.cursor(l,-1))}else{let l=$u(this.atoms,r.from,-1),f=$u(this.atoms,r.to,1);(l!=r.from||f!=r.to)&&(a=ve.range(r.from==r.anchor?l:f,r.from==r.head?l:f))}a&&(t||(t=e.ranges.slice()),t[o]=a)}return t?ve.create(t,e.mainIndex):e}select(e){let{view:t}=this,o=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!o.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:o,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function g8(n,e){let t=n.state.facet(Dx);return t.length?t[0](e):Ze.mac?e.metaKey:e.ctrlKey}function O8(n,e){let t=n.state.facet(Bx);return t.length?t[0](e):Ze.mac?!e.altKey:!e.ctrlKey}function v8(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let o=jl(n.root);if(!o||o.rangeCount==0)return!0;let r=o.getRangeAt(0).getClientRects();for(let a=0;a<r.length;a++){let l=r[a];if(l.left<=e.clientX&&l.right>=e.clientX&&l.top<=e.clientY&&l.bottom>=e.clientY)return!0}return!1}function y8(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,o;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(o=Pt.get(t))&&o.ignoreEvent(e))return!1;return!0}const Wo=Object.create(null),Ao=Object.create(null),dw=Ze.ie&&Ze.ie_version<15||Ze.ios&&Ze.webkit_version<604;function b8(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),fw(n,t.value)},50)}function td(n,e,t){for(let o of n.facet(e))t=o(t,n);return t}function fw(n,e){e=td(n.state,hm,e);let{state:t}=n,o,r=1,a=t.toText(e),l=a.lines==t.selection.ranges.length;if(Sm!=null&&t.selection.ranges.every(h=>h.empty)&&Sm==a.toString()){let h=-1;o=t.changeByRange(g=>{let O=t.doc.lineAt(g.from);if(O.from==h)return{range:g};h=O.from;let v=t.toText((l?a.line(r++).text:e)+t.lineBreak);return{changes:{from:O.from,insert:v},range:ve.cursor(g.from+v.length)}})}else l?o=t.changeByRange(h=>{let g=a.line(r++);return{changes:{from:h.from,to:h.to,insert:g.text},range:ve.cursor(h.from+g.length)}}):o=t.replaceSelection(a);n.dispatch(o,{userEvent:"input.paste",scrollIntoView:!0})}Ao.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft},Wo.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1),Ao.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")},Ao.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")},Wo.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let o of n.state.facet(Lx))if(t=o(n,e),t)break;if(!t&&e.button==0&&(t=S8(n,e)),t){let o=!n.hasFocus;n.inputState.startMouseSelection(new m8(n,e,t,o)),o&&n.observer.ignore(()=>{dx(n.contentDOM);let a=n.root.activeElement;a&&!a.contains(n.contentDOM)&&a.blur()});let r=n.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}return!1};function hw(n,e,t,o){if(o==1)return ve.cursor(e,t);if(o==2)return K3(n.state,e,t);{let r=tn.find(n.docView,e),a=n.state.doc.lineAt(r?r.posAtEnd:e),l=r?r.posAtStart:a.from,f=r?r.posAtEnd:a.to;return f<n.state.doc.length&&f==a.to&&f++,ve.range(l,f)}}let pw=(n,e,t)=>e>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function x8(n,e,t,o){let r=tn.find(n.docView,e);if(!r)return 1;let a=e-r.posAtStart;if(a==0)return 1;if(a==r.length)return-1;let l=r.coordsAt(a,-1);if(l&&pw(t,o,l))return-1;let f=r.coordsAt(a,1);return f&&pw(t,o,f)?1:l&&l.bottom>=o?-1:1}function mw(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:x8(n,t,e.clientX,e.clientY)}}const w8=Ze.ie&&Ze.ie_version<=11;let gw=null,Ow=0,vw=0;function yw(n){if(!w8)return n.detail;let e=gw,t=vw;return gw=n,vw=Date.now(),Ow=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(Ow+1)%3:1}function S8(n,e){let t=mw(n,e),o=yw(e),r=n.state.selection;return{update(a){a.docChanged&&(t.pos=a.changes.mapPos(t.pos),r=r.map(a.changes))},get(a,l,f){let h=mw(n,a),g,O=hw(n,h.pos,h.bias,o);if(t.pos!=h.pos&&!l){let v=hw(n,t.pos,t.bias,o),b=Math.min(v.from,O.from),x=Math.max(v.to,O.to);O=b<O.from?ve.range(b,x):ve.range(x,b)}return l?r.replaceRange(r.main.extend(O.from,O.to)):f&&o==1&&r.ranges.length>1&&(g=C8(r,h.pos))?g:f?r.addRange(O):ve.create([O])}}}function C8(n,e){for(let t=0;t<n.ranges.length;t++){let{from:o,to:r}=n.ranges[t];if(o<=e&&r>=e)return ve.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}Wo.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let r=n.docView.nearest(e.target);if(r&&r.isWidget){let a=r.posAtStart,l=a+r.length;(a>=t.to||l<=t.from)&&(t=ve.range(a,l))}}let{inputState:o}=n;return o.mouseSelection&&(o.mouseSelection.dragging=!0),o.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",td(n.state,pm,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Wo.dragend=n=>(n.inputState.draggedContent=null,!1);function bw(n,e,t,o){if(t=td(n.state,hm,t),!t)return;let r=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:a}=n.inputState,l=o&&a&&O8(n,e)?{from:a.from,to:a.to}:null,f={from:r,insert:t},h=n.state.changes(l?[l,f]:f);n.focus(),n.dispatch({changes:h,selection:{anchor:h.mapPos(r,-1),head:h.mapPos(r,1)},userEvent:l?"move.drop":"input.drop"}),n.inputState.draggedContent=null}Wo.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let o=Array(t.length),r=0,a=()=>{++r==t.length&&bw(n,e,o.filter(l=>l!=null).join(n.state.lineBreak),!1)};for(let l=0;l<t.length;l++){let f=new FileReader;f.onerror=a,f.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(f.result)||(o[l]=f.result),a()},f.readAsText(t[l])}return!0}else{let o=e.dataTransfer.getData("Text");if(o)return bw(n,e,o,!0),!0}return!1},Wo.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=dw?null:e.clipboardData;return t?(fw(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(b8(n),!1)};function k8(n,e){let t=n.dom.parentNode;if(!t)return;let o=t.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.value=e,o.focus(),o.selectionEnd=e.length,o.selectionStart=0,setTimeout(()=>{o.remove(),n.focus()},50)}function P8(n){let e=[],t=[],o=!1;for(let r of n.selection.ranges)r.empty||(e.push(n.sliceDoc(r.from,r.to)),t.push(r));if(!e.length){let r=-1;for(let{from:a}of n.selection.ranges){let l=n.doc.lineAt(a);l.number>r&&(e.push(l.text),t.push({from:l.from,to:Math.min(n.doc.length,l.to+1)})),r=l.number}o=!0}return{text:td(n,pm,e.join(n.lineBreak)),ranges:t,linewise:o}}let Sm=null;Wo.copy=Wo.cut=(n,e)=>{let{text:t,ranges:o,linewise:r}=P8(n.state);if(!t&&!r)return!1;Sm=r?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:o,scrollIntoView:!0,userEvent:"delete.cut"});let a=dw?null:e.clipboardData;return a?(a.clearData(),a.setData("text/plain",t),!0):(k8(n,t),!1)};const xw=Mi.define();function ww(n,e){let t=[];for(let o of n.facet(Fx)){let r=o(n,e);r&&t.push(r)}return t?n.update({effects:t,annotations:xw.of(!0)}):null}function Sw(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=ww(n.state,e);t?n.dispatch(t):n.update([])}},10)}Ao.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),Sw(n)},Ao.blur=n=>{n.observer.clearSelectionRange(),Sw(n)},Ao.compositionstart=Ao.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))},Ao.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Ze.chrome&&Ze.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))},Ao.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()},Wo.beforeinput=(n,e)=>{var t,o;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let a=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),l=e.getTargetRanges();if(a&&l.length){let f=l[0],h=n.posAtDOM(f.startContainer,f.startOffset),g=n.posAtDOM(f.endContainer,f.endOffset);return wm(n,{from:h,to:g,insert:n.state.toText(a)},null),!0}}let r;if(Ze.chrome&&Ze.android&&(r=cw.find(a=>a.inputType==e.inputType))&&(n.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let a=((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0;setTimeout(()=>{var l;(((l=window.visualViewport)===null||l===void 0?void 0:l.height)||0)>a+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Ze.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Ze.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>Ao.compositionend(n,e),20),!1};const Cw=new Set;function _8(n){Cw.has(n)||(Cw.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const kw=["pre-wrap","normal","pre-line","break-spaces"];let bs=!1;function Pw(){bs=!1}class E8{constructor(e){this.lineWrapping=e,this.doc=Ot.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let o=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(o+=Math.max(0,Math.ceil((t-e-o*this.lineLength*.5)/this.lineLength))),this.lineHeight*o}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return kw.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let o=0;o<e.length;o++){let r=e[o];r<0?o++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,o,r,a,l){let f=kw.indexOf(e)>-1,h=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=f;if(this.lineWrapping=f,this.lineHeight=t,this.charWidth=o,this.textHeight=r,this.lineLength=a,h){this.heightSamples={};for(let g=0;g<l.length;g++){let O=l[g];O<0?g++:this.heightSamples[Math.floor(O*10)]=!0}}return h}}class T8{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class hi{constructor(e,t,o,r,a){this.from=e,this.length=t,this.top=o,this.height=r,this._content=a}get type(){return typeof this._content=="number"?Zn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof rr?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new hi(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Mt=function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n}(Mt||(Mt={}));const nd=.001;class Wn{constructor(e,t,o=2){this.length=e,this.height=t,this.flags=o}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>nd&&(bs=!0),this.height=e)}replace(e,t,o){return Wn.of(o)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,o,r){let a=this,l=o.doc;for(let f=r.length-1;f>=0;f--){let{fromA:h,toA:g,fromB:O,toB:v}=r[f],b=a.lineAt(h,Mt.ByPosNoHeight,o.setDoc(t),0,0),x=b.to>=g?b:a.lineAt(g,Mt.ByPosNoHeight,o,0,0);for(v+=x.to-g,g=x.to;f>0&&b.from<=r[f-1].toA;)h=r[f-1].fromA,O=r[f-1].fromB,f--,h<b.from&&(b=a.lineAt(h,Mt.ByPosNoHeight,o,0,0));O+=b.from-h,h=b.from;let C=Cm.build(o.setDoc(l),e,O,v);a=od(a,a.replace(h,g,C))}return a.updateHeight(o,0)}static empty(){return new ho(0,0)}static of(e){if(e.length==1)return e[0];let t=0,o=e.length,r=0,a=0;for(;;)if(t==o)if(r>a*2){let f=e[t-1];f.break?e.splice(--t,1,f.left,null,f.right):e.splice(--t,1,f.left,f.right),o+=1+f.break,r-=f.size}else if(a>r*2){let f=e[o];f.break?e.splice(o,1,f.left,null,f.right):e.splice(o,1,f.left,f.right),o+=2+f.break,a-=f.size}else break;else if(r<a){let f=e[t++];f&&(r+=f.size)}else{let f=e[--o];f&&(a+=f.size)}let l=0;return e[t-1]==null?(l=1,t--):e[t]==null&&(l=1,o++),new N8(Wn.of(e.slice(0,t)),l,Wn.of(e.slice(o)))}}function od(n,e){return n==e?n:(n.constructor!=e.constructor&&(bs=!0),e)}Wn.prototype.size=1;class _w extends Wn{constructor(e,t,o){super(e,t),this.deco=o}blockAt(e,t,o,r){return new hi(r,this.length,o,this.height,this.deco||0)}lineAt(e,t,o,r,a){return this.blockAt(0,o,r,a)}forEachLine(e,t,o,r,a,l){e<=a+this.length&&t>=a&&l(this.blockAt(0,o,r,a))}updateHeight(e,t=0,o=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class ho extends _w{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,o,r){return new hi(r,this.length,o,this.height,this.breaks)}replace(e,t,o){let r=o[0];return o.length==1&&(r instanceof ho||r instanceof _n&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof _n?r=new ho(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Wn.of(o)}updateHeight(e,t=0,o=!1,r){return r&&r.from<=t&&r.more?this.setHeight(r.heights[r.index++]):(o||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class _n extends Wn{constructor(e){super(e,0)}heightMetrics(e,t){let o=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,a=r-o+1,l,f=0;if(e.lineWrapping){let h=Math.min(this.height,e.lineHeight*a);l=h/a,this.length>a+1&&(f=(this.height-h)/(this.length-a-1))}else l=this.height/a;return{firstLine:o,lastLine:r,perLine:l,perChar:f}}blockAt(e,t,o,r){let{firstLine:a,lastLine:l,perLine:f,perChar:h}=this.heightMetrics(t,r);if(t.lineWrapping){let g=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-o)/this.height))*this.length)),O=t.doc.lineAt(g),v=f+O.length*h,b=Math.max(o,e-v/2);return new hi(O.from,O.length,b,v,0)}else{let g=Math.max(0,Math.min(l-a,Math.floor((e-o)/f))),{from:O,length:v}=t.doc.line(a+g);return new hi(O,v,o+f*g,f,0)}}lineAt(e,t,o,r,a){if(t==Mt.ByHeight)return this.blockAt(e,o,r,a);if(t==Mt.ByPosNoHeight){let{from:x,to:C}=o.doc.lineAt(e);return new hi(x,C-x,0,0,0)}let{firstLine:l,perLine:f,perChar:h}=this.heightMetrics(o,a),g=o.doc.lineAt(e),O=f+g.length*h,v=g.number-l,b=r+f*v+h*(g.from-a-v);return new hi(g.from,g.length,Math.max(r,Math.min(b,r+this.height-O)),O,0)}forEachLine(e,t,o,r,a,l){e=Math.max(e,a),t=Math.min(t,a+this.length);let{firstLine:f,perLine:h,perChar:g}=this.heightMetrics(o,a);for(let O=e,v=r;O<=t;){let b=o.doc.lineAt(O);if(O==e){let C=b.number-f;v+=h*C+g*(e-a-C)}let x=h+g*b.length;l(new hi(b.from,b.length,v,x,0)),v+=x,O=b.to+1}}replace(e,t,o){let r=this.length-t;if(r>0){let a=o[o.length-1];a instanceof _n?o[o.length-1]=new _n(a.length+r):o.push(null,new _n(r-1))}if(e>0){let a=o[0];a instanceof _n?o[0]=new _n(e+a.length):o.unshift(new _n(e-1),null)}return Wn.of(o)}decomposeLeft(e,t){t.push(new _n(e-1),null)}decomposeRight(e,t){t.push(null,new _n(this.length-e-1))}updateHeight(e,t=0,o=!1,r){let a=t+this.length;if(r&&r.from<=t+this.length&&r.more){let l=[],f=Math.max(t,r.from),h=-1;for(r.from>t&&l.push(new _n(r.from-t-1).updateHeight(e,t));f<=a&&r.more;){let O=e.doc.lineAt(f).length;l.length&&l.push(null);let v=r.heights[r.index++];h==-1?h=v:Math.abs(v-h)>=nd&&(h=-2);let b=new ho(O,v);b.outdated=!1,l.push(b),f+=O+1}f<=a&&l.push(null,new _n(a-f).updateHeight(e,f));let g=Wn.of(l);return(h<0||Math.abs(g.height-this.height)>=nd||Math.abs(h-this.heightMetrics(e,t).perLine)>=nd)&&(bs=!0),od(this,g)}else(o||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class N8 extends Wn{constructor(e,t,o){super(e.length+t+o.length,e.height+o.height,t|(e.outdated||o.outdated?2:0)),this.left=e,this.right=o,this.size=e.size+o.size}get break(){return this.flags&1}blockAt(e,t,o,r){let a=o+this.left.height;return e<a?this.left.blockAt(e,t,o,r):this.right.blockAt(e,t,a,r+this.left.length+this.break)}lineAt(e,t,o,r,a){let l=r+this.left.height,f=a+this.left.length+this.break,h=t==Mt.ByHeight?e<l:e<f,g=h?this.left.lineAt(e,t,o,r,a):this.right.lineAt(e,t,o,l,f);if(this.break||(h?g.to<f:g.from>f))return g;let O=t==Mt.ByPosNoHeight?Mt.ByPosNoHeight:Mt.ByPos;return h?g.join(this.right.lineAt(f,O,o,l,f)):this.left.lineAt(f,O,o,r,a).join(g)}forEachLine(e,t,o,r,a,l){let f=r+this.left.height,h=a+this.left.length+this.break;if(this.break)e<h&&this.left.forEachLine(e,t,o,r,a,l),t>=h&&this.right.forEachLine(e,t,o,f,h,l);else{let g=this.lineAt(h,Mt.ByPos,o,r,a);e<g.from&&this.left.forEachLine(e,g.from-1,o,r,a,l),g.to>=e&&g.from<=t&&l(g),t>g.to&&this.right.forEachLine(g.to+1,t,o,f,h,l)}}replace(e,t,o){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,o),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,o));let a=[];e>0&&this.decomposeLeft(e,a);let l=a.length;for(let f of o)a.push(f);if(e>0&&Ew(a,l-1),t<this.length){let f=a.length;this.decomposeRight(t,a),Ew(a,f)}return Wn.of(a)}decomposeLeft(e,t){let o=this.left.length;if(e<=o)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(o++,e>=o&&t.push(null)),e>o&&this.right.decomposeLeft(e-o,t)}decomposeRight(e,t){let o=this.left.length,r=o+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<o&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?Wn.of(this.break?[e,null,t]:[e,t]):(this.left=od(this.left,e),this.right=od(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,o=!1,r){let{left:a,right:l}=this,f=t+a.length+this.break,h=null;return r&&r.from<=t+a.length&&r.more?h=a=a.updateHeight(e,t,o,r):a.updateHeight(e,t,o),r&&r.from<=f+l.length&&r.more?h=l=l.updateHeight(e,f,o,r):l.updateHeight(e,f,o),h?this.balanced(a,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Ew(n,e){let t,o;n[e]==null&&(t=n[e-1])instanceof _n&&(o=n[e+1])instanceof _n&&n.splice(e-1,3,new _n(t.length+1+o.length))}const A8=5;class Cm{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let o=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof ho?r.length+=o-this.pos:(o>this.pos||!this.isCovered)&&this.nodes.push(new ho(o-this.pos,-1)),this.writtenTo=o,t>o&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,o){if(e<t||o.heightRelevant){let r=o.widget?o.widget.estimatedHeight:0,a=o.widget?o.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let l=t-e;o.block?this.addBlock(new _w(l,r,o)):(l||a||r>=A8)&&this.addLineDeco(r,a,l)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new ho(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let o=new _n(t-e);return this.oracle.doc.lineAt(e).to==t&&(o.flags|=4),o}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof ho)return e;let t=new ho(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,o){let r=this.ensureLine();r.length+=o,r.collapsed+=o,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+o}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof ho)&&!this.isCovered?this.nodes.push(new ho(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let o=e;for(let r of this.nodes)r instanceof ho&&r.updateHeight(this.oracle,o),o+=r?r.length:1;return this.nodes}static build(e,t,o,r){let a=new Cm(o,e);return vt.spans(t,o,r,a,0),a.finish(o)}}function M8(n,e,t){let o=new R8;return vt.compare(n,e,t,o,0),o.changes}class R8{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,o,r){(e<t||o&&o.heightRelevant||r&&r.heightRelevant)&&am(e,t,this.changes,5)}}function I8(n,e){let t=n.getBoundingClientRect(),o=n.ownerDocument,r=o.defaultView||window,a=Math.max(0,t.left),l=Math.min(r.innerWidth,t.right),f=Math.max(0,t.top),h=Math.min(r.innerHeight,t.bottom);for(let g=n.parentNode;g&&g!=o.body;)if(g.nodeType==1){let O=g,v=window.getComputedStyle(O);if((O.scrollHeight>O.clientHeight||O.scrollWidth>O.clientWidth)&&v.overflow!="visible"){let b=O.getBoundingClientRect();a=Math.max(a,b.left),l=Math.min(l,b.right),f=Math.max(f,b.top),h=Math.min(g==n.parentNode?r.innerHeight:h,b.bottom)}g=v.position=="absolute"||v.position=="fixed"?O.offsetParent:O.parentNode}else if(g.nodeType==11)g=g.host;else break;return{left:a-t.left,right:Math.max(a,l)-t.left,top:f-(t.top+e),bottom:Math.max(f,h)-(t.top+e)}}function Q8(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class km{constructor(e,t,o){this.from=e,this.to=t,this.size=o}static same(e,t){if(e.length!=t.length)return!1;for(let o=0;o<e.length;o++){let r=e[o],a=t[o];if(r.from!=a.from||r.to!=a.to||r.size!=a.size)return!1}return!0}draw(e,t){return Ye.replace({widget:new D8(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class D8 extends di{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Tw{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Nw,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=At.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(gm).some(o=>typeof o!="function"&&o.class=="cm-lineWrapping");this.heightOracle=new E8(t),this.stateDeco=e.facet(Yl).filter(o=>typeof o!="function"),this.heightMap=Wn.empty().applyChanges(this.stateDeco,Ot.empty,this.heightOracle.setDoc(e.doc),[new No(0,0,0,e.doc.length)]);for(let o=0;o<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());o++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ye.set(this.lineGaps.map(o=>o.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let o=0;o<=1;o++){let r=o?t.head:t.anchor;if(!e.some(({from:a,to:l})=>r>=a&&r<=l)){let{from:a,to:l}=this.lineBlockAt(r);e.push(new id(a,l))}}return this.viewports=e.sort((o,r)=>o.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Nw:new Pm(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Kl(e,this.scaler))})}update(e,t=null){this.state=e.state;let o=this.stateDeco;this.stateDeco=this.state.facet(Yl).filter(O=>typeof O!="function");let r=e.changedRanges,a=No.extendWithRanges(r,M8(o,this.stateDeco,e?e.changes:sn.empty(this.state.doc.length))),l=this.heightMap.height,f=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Pw(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),a),(this.heightMap.height!=l||bs)&&(e.flags|=2),f?(this.scrollAnchorPos=e.changes.mapPos(f.from,-1),this.scrollAnchorHeight=f.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let h=a.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<h.from||t.range.head>h.to)||!this.viewportIsAppropriate(h))&&(h=this.getViewport(0,t));let g=h.from!=this.viewport.from||h.to!=this.viewport.to;this.viewport=h,e.flags|=this.updateForViewport(),(g||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Wx)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,o=window.getComputedStyle(t),r=this.heightOracle,a=o.whiteSpace;this.defaultTextDirection=o.direction=="rtl"?At.RTL:At.LTR;let l=this.heightOracle.mustRefreshForWrapping(a),f=t.getBoundingClientRect(),h=l||this.mustMeasureContent||this.contentDOMHeight!=f.height;this.contentDOMHeight=f.height,this.mustMeasureContent=!1;let g=0,O=0;if(f.width&&f.height){let{scaleX:B,scaleY:I}=ux(t,f);(B>.005&&Math.abs(this.scaleX-B)>.005||I>.005&&Math.abs(this.scaleY-I)>.005)&&(this.scaleX=B,this.scaleY=I,g|=8,l=h=!0)}let v=(parseInt(o.paddingTop)||0)*this.scaleY,b=(parseInt(o.paddingBottom)||0)*this.scaleY;(this.paddingTop!=v||this.paddingBottom!=b)&&(this.paddingTop=v,this.paddingBottom=b,g|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(h=!0),this.editorWidth=e.scrollDOM.clientWidth,g|=8);let x=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=x&&(this.scrollAnchorHeight=-1,this.scrollTop=x),this.scrolledToBottom=px(e.scrollDOM);let C=(this.printing?Q8:I8)(t,this.paddingTop),k=C.top-this.pixelViewport.top,L=C.bottom-this.pixelViewport.bottom;this.pixelViewport=C;let A=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(A!=this.inView&&(this.inView=A,A&&(h=!0)),!this.inView&&!this.scrollTarget)return 0;let E=f.width;if((this.contentDOMWidth!=E||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=f.width,this.editorHeight=e.scrollDOM.clientHeight,g|=8),h){let B=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(B)&&(l=!0),l||r.lineWrapping&&Math.abs(E-this.contentDOMWidth)>r.charWidth){let{lineHeight:I,charWidth:K,textHeight:V}=e.docView.measureTextSize();l=I>0&&r.refresh(a,I,K,V,E/K,B),l&&(e.docView.minWidth=0,g|=8)}k>0&&L>0?O=Math.max(k,L):k<0&&L<0&&(O=Math.min(k,L)),Pw();for(let I of this.viewports){let K=I.from==this.viewport.from?B:e.docView.measureVisibleLineHeights(I);this.heightMap=(l?Wn.empty().applyChanges(this.stateDeco,Ot.empty,this.heightOracle,[new No(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,l,new T8(I.from,K))}bs&&(g|=2)}let F=!this.viewportIsAppropriate(this.viewport,O)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return F&&(g&2&&(g|=this.updateScaler()),this.viewport=this.getViewport(O,this.scrollTarget),g|=this.updateForViewport()),(g&2||F)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(l?[]:this.lineGaps,e)),g|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),g}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let o=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,a=this.heightOracle,{visibleTop:l,visibleBottom:f}=this,h=new id(r.lineAt(l-o*1e3,Mt.ByHeight,a,0,0).from,r.lineAt(f+(1-o)*1e3,Mt.ByHeight,a,0,0).to);if(t){let{head:g}=t.range;if(g<h.from||g>h.to){let O=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),v=r.lineAt(g,Mt.ByPos,a,0,0),b;t.y=="center"?b=(v.top+v.bottom)/2-O/2:t.y=="start"||t.y=="nearest"&&g<h.from?b=v.top:b=v.bottom-O,h=new id(r.lineAt(b-1e3/2,Mt.ByHeight,a,0,0).from,r.lineAt(b+O+1e3/2,Mt.ByHeight,a,0,0).to)}}return h}mapViewport(e,t){let o=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new id(this.heightMap.lineAt(o,Mt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Mt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},o=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,Mt.ByPos,this.heightOracle,0,0),{bottom:a}=this.heightMap.lineAt(t,Mt.ByPos,this.heightOracle,0,0),{visibleTop:l,visibleBottom:f}=this;return(e==0||r<=l-Math.max(10,Math.min(-o,250)))&&(t==this.state.doc.length||a>=f+Math.max(10,Math.min(o,250)))&&r>l-2*1e3&&a<f+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let o=[];for(let r of e)t.touchesRange(r.from,r.to)||o.push(new km(t.mapPos(r.from),t.mapPos(r.to),r.size));return o}ensureLineGaps(e,t){let o=this.heightOracle.lineWrapping,r=o?1e4:2e3,a=r>>1,l=r<<1;if(this.defaultTextDirection!=At.LTR&&!o)return[];let f=[],h=(O,v,b,x)=>{if(v-O<a)return;let C=this.state.selection.main,k=[C.from];C.empty||k.push(C.to);for(let A of k)if(A>O&&A<v){h(O,A-10,b,x),h(A+10,v,b,x);return}let L=L8(e,A=>A.from>=b.from&&A.to<=b.to&&Math.abs(A.from-O)<a&&Math.abs(A.to-v)<a&&!k.some(E=>A.from<E&&A.to>E));if(!L){if(v<b.to&&t&&o&&t.visibleRanges.some(A=>A.from<=v&&A.to>=v)){let A=t.moveToLineBoundary(ve.cursor(v),!1,!0).head;A>O&&(v=A)}L=new km(O,v,this.gapSize(b,O,v,x))}f.push(L)},g=O=>{if(O.length<l||O.type!=Zn.Text)return;let v=B8(O.from,O.to,this.stateDeco);if(v.total<l)return;let b=this.scrollTarget?this.scrollTarget.range.head:null,x,C;if(o){let k=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,L,A;if(b!=null){let E=ad(v,b),F=((this.visibleBottom-this.visibleTop)/2+k)/O.height;L=E-F,A=E+F}else L=(this.visibleTop-O.top-k)/O.height,A=(this.visibleBottom-O.top+k)/O.height;x=rd(v,L),C=rd(v,A)}else{let k=v.total*this.heightOracle.charWidth,L=r*this.heightOracle.charWidth,A,E;if(b!=null){let F=ad(v,b),B=((this.pixelViewport.right-this.pixelViewport.left)/2+L)/k;A=F-B,E=F+B}else A=(this.pixelViewport.left-L)/k,E=(this.pixelViewport.right+L)/k;x=rd(v,A),C=rd(v,E)}x>O.from&&h(O.from,x,O,v),C<O.to&&h(C,O.to,O,v)};for(let O of this.viewportLines)Array.isArray(O.type)?O.type.forEach(g):g(O);return f}gapSize(e,t,o,r){let a=ad(r,o)-ad(r,t);return this.heightOracle.lineWrapping?e.height*a:r.total*this.heightOracle.charWidth*a}updateLineGaps(e){km.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Ye.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];vt.spans(e,this.viewport.from,this.viewport.to,{span(r,a){t.push({from:r,to:a})},point(){}},20);let o=t.length!=this.visibleRanges.length||this.visibleRanges.some((r,a)=>r.from!=t[a].from||r.to!=t[a].to);return this.visibleRanges=t,o?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Kl(this.heightMap.lineAt(e,Mt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Kl(this.heightMap.lineAt(this.scaler.fromDOM(e),Mt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Kl(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class id{constructor(e,t){this.from=e,this.to=t}}function B8(n,e,t){let o=[],r=n,a=0;return vt.spans(t,n,e,{span(){},point(l,f){l>r&&(o.push({from:r,to:l}),a+=l-r),r=f}},20),r<e&&(o.push({from:r,to:e}),a+=e-r),{total:a,ranges:o}}function rd({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let o=Math.floor(n*t);for(let r=0;;r++){let{from:a,to:l}=e[r],f=l-a;if(o<=f)return a+o;o-=f}}function ad(n,e){let t=0;for(let{from:o,to:r}of n.ranges){if(e<=r){t+=e-o;break}t+=r-o}return t/n.total}function L8(n,e){for(let t of n)if(e(t))return t}const Nw={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class Pm{constructor(e,t,o){let r=0,a=0,l=0;this.viewports=o.map(({from:f,to:h})=>{let g=t.lineAt(f,Mt.ByPos,e,0,0).top,O=t.lineAt(h,Mt.ByPos,e,0,0).bottom;return r+=O-g,{from:f,to:h,top:g,bottom:O,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let f of this.viewports)f.domTop=l+(f.top-a)*this.scale,l=f.domBottom=f.domTop+(f.bottom-f.top),a=f.bottom}toDOM(e){for(let t=0,o=0,r=0;;t++){let a=t<this.viewports.length?this.viewports[t]:null;if(!a||e<a.top)return r+(e-o)*this.scale;if(e<=a.bottom)return a.domTop+(e-a.top);o=a.bottom,r=a.domBottom}}fromDOM(e){for(let t=0,o=0,r=0;;t++){let a=t<this.viewports.length?this.viewports[t]:null;if(!a||e<a.domTop)return o+(e-r)/this.scale;if(e<=a.domBottom)return a.top+(e-a.domTop);o=a.bottom,r=a.domBottom}}eq(e){return e instanceof Pm?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,o)=>t.from==e.viewports[o].from&&t.to==e.viewports[o].to):!1}}function Kl(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),o=e.toDOM(n.bottom);return new hi(n.from,n.length,t,o-t,Array.isArray(n._content)?n._content.map(r=>Kl(r,e)):n._content)}const sd=Ve.define({combine:n=>n.join(" ")}),_m=Ve.define({combine:n=>n.indexOf(!0)>-1}),Em=nr.newName(),Aw=nr.newName(),Mw=nr.newName(),Rw={"&light":"."+Aw,"&dark":"."+Mw};function Tm(n,e,t){return new nr(e,{finish(o){return/&/.test(o)?o.replace(/&\w*/,r=>{if(r=="&")return n;if(!t||!t[r])throw new RangeError(`Unsupported selector: ${r}`);return t[r]}):n+" "+o}})}const V8=Tm("."+Em,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Rw),j8={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Nm=Ze.ie&&Ze.ie_version<=11;class F8{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new k3,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let o of t)this.queue.push(o);(Ze.ie&&Ze.ie_version<=11||Ze.ios&&e.composing)&&t.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Ze.chrome&&Ze.chrome_version<126)&&(this.editContext=new W8(e),e.state.facet(sr)&&(e.contentDOM.editContext=this.editContext.editContext)),Nm&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,o)=>t!=e[o]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:o}=this,r=this.selectionRange;if(o.state.facet(sr)?o.root.activeElement!=this.dom:!Uu(o.dom,r))return;let a=r.anchorNode&&o.docView.nearest(r.anchorNode);if(a&&a.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Ze.ie&&Ze.ie_version<=11||Ze.android&&Ze.chrome)&&!o.state.selection.main.empty&&r.focusNode&&Fl(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=jl(e.root);if(!t)return!1;let o=Ze.safari&&e.root.nodeType==11&&x3(this.dom.ownerDocument)==this.dom&&Z8(this.view,t)||t;if(!o||this.selectionRange.eq(o))return!1;let r=Uu(this.dom,o);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&_3(this.dom,o)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(o),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let o=this.dom;o;)if(o.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==o?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(o),o=o.assignedSlot||o.parentNode;else if(o.nodeType==11)o=o.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let o of this.scrollTargets)o.removeEventListener("scroll",this.onScroll);for(let o of this.scrollTargets=t)o.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,j8),Nm&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Nm&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var o;if(!this.delayedAndroidKey){let r=()=>{let a=this.delayedAndroidKey;a&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=a.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&a.force&&gs(this.dom,a.key,a.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((o=this.delayedAndroidKey)===null||o===void 0)&&o.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,o=-1,r=!1;for(let a of e){let l=this.readMutation(a);l&&(l.typeOver&&(r=!0),t==-1?{from:t,to:o}=l:(t=Math.min(l.from,t),o=Math.max(l.to,o)))}return{from:t,to:o,typeOver:r}}readChange(){let{from:e,to:t,typeOver:o}=this.processRecords(),r=this.selectionChanged&&Uu(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let a=new a8(this.view,e,t,o);return this.view.docView.domChanged={newSel:a.newSel?a.newSel.main:null},a}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let o=this.view.state,r=sw(this.view,t);return this.view.state==o&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let o=Iw(t,e.previousSibling||e.target.previousSibling,-1),r=Iw(t,e.nextSibling||e.target.nextSibling,1);return{from:o?t.posAfter(o):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(sr)!=e.state.facet(sr)&&(e.view.contentDOM.editContext=e.state.facet(sr)?this.editContext.editContext:null))}destroy(){var e,t,o;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(o=this.resizeScroll)===null||o===void 0||o.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Iw(n,e,t){for(;e;){let o=Pt.get(e);if(o&&o.parent==n)return o;let r=e.parentNode;e=r!=n.dom?r:t>0?e.nextSibling:e.previousSibling}return null}function Qw(n,e){let t=e.startContainer,o=e.startOffset,r=e.endContainer,a=e.endOffset,l=n.docView.domAtPos(n.state.selection.main.anchor);return Fl(l.node,l.offset,r,a)&&([t,o,r,a]=[r,a,t,o]),{anchorNode:t,anchorOffset:o,focusNode:r,focusOffset:a}}function Z8(n,e){if(e.getComposedRanges){let r=e.getComposedRanges(n.root)[0];if(r)return Qw(n,r)}let t=null;function o(r){r.preventDefault(),r.stopImmediatePropagation(),t=r.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",o,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",o,!0),t?Qw(n,t):null}class W8{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=o=>{let{anchor:r}=e.state.selection.main,a={from:this.toEditorPos(o.updateRangeStart),to:this.toEditorPos(o.updateRangeEnd),insert:Ot.of(o.text.split(`
|
|
331
|
-
`))};a.from==this.from&&r<this.from?a.from=r:a.to==this.to&&r>this.to&&(a.to=r),!(a.from==a.to&&!a.insert.length)&&(this.pendingContextChange=a,e.state.readOnly||wm(e,a,ve.single(this.toEditorPos(o.selectionStart),this.toEditorPos(o.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=o=>{let r=[],a=null;for(let l=this.toEditorPos(o.rangeStart),f=this.toEditorPos(o.rangeEnd);l<f;l++){let h=e.coordsForChar(l);a=h&&new DOMRect(h.left,h.top,h.right-h.left,h.bottom-h.top)||a||new DOMRect,r.push(a)}t.updateCharacterBounds(o.rangeStart,r)},this.handlers.textformatupdate=o=>{let r=[];for(let a of o.getTextFormats()){let l=a.underlineStyle,f=a.underlineThickness;if(l!="None"&&f!="None"){let h=`text-decoration: underline ${l=="Dashed"?"dashed ":l=="Squiggle"?"wavy ":""}${f=="Thin"?1:2}px`;r.push(Ye.mark({attributes:{style:h}}).range(this.toEditorPos(a.rangeStart),this.toEditorPos(a.rangeEnd)))}}e.dispatch({effects:Ux.of(Ye.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let o in this.handlers)t.addEventListener(o,this.handlers[o]);this.measureReq={read:o=>{this.editContext.updateControlBounds(o.contentDOM.getBoundingClientRect());let r=jl(o.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,o=!1,r=this.pendingContextChange;return e.changes.iterChanges((a,l,f,h,g)=>{if(o)return;let O=g.length-(l-a);if(r&&l>=r.to)if(r.from==a&&r.to==l&&r.insert.eq(g)){r=this.pendingContextChange=null,t+=O,this.to+=O;return}else r=null,this.revertPending(e.state);if(a+=t,l+=t,l<=this.from)this.from+=O,this.to+=O;else if(a<this.to){if(a<this.from||l>this.to||this.to-this.from+g.length>3e4){o=!0;return}this.editContext.updateText(this.toContextPos(a),this.toContextPos(l),g.toString()),this.to+=O}t+=O}),r&&!o&&this.revertPending(e.state),!o}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,o=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=o||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(o,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Be{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:o}=e;this.dispatchTransactions=e.dispatchTransactions||o&&(r=>r.forEach(a=>o(a,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||P3(e.parent)||document,this.viewState=new Tw(e.state||ft.create(e)),e.scrollTo&&e.scrollTo.is(Ku)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Hl).map(r=>new mm(r));for(let r of this.plugins)r.update(this);this.observer=new F8(this),this.inputState=new d8(this),this.inputState.ensureHandlers(this.plugins),this.docView=new $x(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof en?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,o=!1,r,a=this.state;for(let b of e){if(b.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=b.state}if(this.destroyed){this.viewState.state=a;return}let l=this.hasFocus,f=0,h=null;e.some(b=>b.annotation(xw))?(this.inputState.notifiedFocused=l,f=1):l!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=l,h=ww(a,l),h||(f=1));let g=this.observer.delayedAndroidKey,O=null;if(g?(this.observer.clearDelayedAndroidKey(),O=this.observer.readChange(),(O&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(O=null)):this.observer.clear(),a.facet(ft.phrases)!=this.state.facet(ft.phrases))return this.setState(a);r=Ju.create(this,a,e),r.flags|=f;let v=this.viewState.scrollTarget;try{this.updateState=2;for(let b of e){if(v&&(v=v.map(b.changes)),b.scrollIntoView){let{main:x}=b.state.selection;v=new ys(x.empty?x:ve.cursor(x.head,x.head>x.anchor?-1:1))}for(let x of b.effects)x.is(Ku)&&(v=x.value.clip(this.state))}this.viewState.update(r,v),this.bidiCache=ld.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(Xl)!=this.styleModules&&this.mountStyles(),o=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(b=>b.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(sd)!=r.state.facet(sd)&&(this.viewState.mustMeasureContent=!0),(t||o||v||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!r.empty)for(let b of this.state.facet(fm))try{b(r)}catch(x){$n(this.state,x,"update listener")}(h||O)&&Promise.resolve().then(()=>{h&&this.state==h.startState&&this.dispatch(h),O&&!sw(this,O)&&g.force&&gs(this.contentDOM,g.key,g.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let o of this.plugins)o.destroy(this);this.viewState=new Tw(e),this.plugins=e.facet(Hl).map(o=>new mm(o)),this.pluginMap.clear();for(let o of this.plugins)o.update(this);this.docView.destroy(),this.docView=new $x(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Hl),o=e.state.facet(Hl);if(t!=o){let r=[];for(let a of o){let l=t.indexOf(a);if(l<0)r.push(new mm(a));else{let f=this.plugins[l];f.mustUpdate=e,r.push(f)}}for(let a of this.plugins)a.mustUpdate!=e&&a.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this);t!=o&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(o){$n(this.state,o,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,o=this.scrollDOM,r=o.scrollTop*this.scaleY,{scrollAnchorPos:a,scrollAnchorHeight:l}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(l=-1),this.viewState.scrollAnchorHeight=-1;try{for(let f=0;;f++){if(l<0)if(px(o))a=-1,l=this.viewState.heightMap.height;else{let x=this.viewState.scrollAnchorAt(r);a=x.from,l=x.top}this.updateState=1;let h=this.viewState.measure(this);if(!h&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(f>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let g=[];h&4||([this.measureRequests,g]=[g,this.measureRequests]);let O=g.map(x=>{try{return x.read(this)}catch(C){return $n(this.state,C),Dw}}),v=Ju.create(this,this.state,[]),b=!1;v.flags|=h,t?t.flags|=h:t=v,this.updateState=2,v.empty||(this.updatePlugins(v),this.inputState.update(v),this.updateAttrs(),b=this.docView.update(v),b&&this.docViewUpdate());for(let x=0;x<g.length;x++)if(O[x]!=Dw)try{let C=g[x];C.write&&C.write(O[x],this)}catch(C){$n(this.state,C)}if(b&&this.docView.updateSelection(!0),!v.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,l=-1;continue}else{let C=(a<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(a).top)-l;if(C>1||C<-1){r=r+C,o.scrollTop=r/this.scaleY,l=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let f of this.state.facet(fm))f(t)}get themeClasses(){return Em+" "+(this.state.facet(_m)?Mw:Aw)+" "+this.state.facet(sd)}updateAttrs(){let e=Bw(this,Hx,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(sr)?"true":"false",class:"cm-content",style:`${Ze.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Bw(this,gm,t);let o=this.observer.ignore(()=>{let r=rm(this.contentDOM,this.contentAttrs,t),a=rm(this.dom,this.editorAttrs,e);return r||a});return this.editorAttrs=e,this.contentAttrs=t,o}showAnnouncements(e){let t=!0;for(let o of e)for(let r of o.effects)if(r.is(Be.announce)){t&&(this.announceDOM.textContent=""),t=!1;let a=this.announceDOM.appendChild(document.createElement("div"));a.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Xl);let e=this.state.facet(Be.cspNonce);nr.mount(this.root,this.styleModules.concat(V8).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(o=>o.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,o){return xm(this,e,rw(this,e,t,o))}moveByGroup(e,t){return xm(this,e,rw(this,e,t,o=>n8(this,e.head,o)))}visualLineSide(e,t){let o=this.bidiSpans(e),r=this.textDirectionAt(e.from),a=o[t?o.length-1:0];return ve.cursor(a.side(t,r)+e.from,a.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,o=!0){return t8(this,e,t,o)}moveVertically(e,t,o){return xm(this,e,o8(this,e,t,o))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),ow(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let o=this.docView.coordsAt(e,t);if(!o||o.left==o.right)return o;let r=this.state.doc.lineAt(e),a=this.bidiSpans(r),l=a[ar.find(a,e-r.from,-1,t)];return Zl(o,l.dir==At.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Zx)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>z8)return Ix(e.length);let t=this.textDirectionAt(e.from),o;for(let a of this.bidiCache)if(a.from==e.from&&a.dir==t&&(a.fresh||Rx(a.isolates,o=Gx(this,e))))return a.order;o||(o=Gx(this,e));let r=V3(e.text,t,o);return this.bidiCache.push(new ld(e.from,e.to,t,o,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Ze.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{dx(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Ku.of(new ys(typeof e=="number"?ve.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,o=this.viewState.scrollAnchorAt(e);return Ku.of(new ys(ve.cursor(o.from),"start","start",o.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Xt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Xt.define(()=>({}),{eventObservers:e})}static theme(e,t){let o=nr.newName(),r=[sd.of(o),Xl.of(Tm(`.${o}`,e))];return t&&t.dark&&r.push(_m.of(!0)),r}static baseTheme(e){return er.lowest(Xl.of(Tm("."+Em,e,Rw)))}static findFromDOM(e){var t;let o=e.querySelector(".cm-content"),r=o&&Pt.get(o)||Pt.get(e);return((t=r?.rootView)===null||t===void 0?void 0:t.view)||null}}Be.styleModule=Xl,Be.inputHandler=jx,Be.clipboardInputFilter=hm,Be.clipboardOutputFilter=pm,Be.scrollHandler=zx,Be.focusChangeEffect=Fx,Be.perLineTextDirection=Zx,Be.exceptionSink=Vx,Be.updateListener=fm,Be.editable=sr,Be.mouseSelectionStyle=Lx,Be.dragMovesSelection=Bx,Be.clickAddsSelectionRange=Dx,Be.decorations=Yl,Be.outerDecorations=Yx,Be.atomicRanges=Om,Be.bidiIsolatedRanges=Xx,Be.scrollMargins=Kx,Be.darkTheme=_m,Be.cspNonce=Ve.define({combine:n=>n.length?n[0]:""}),Be.contentAttributes=gm,Be.editorAttributes=Hx,Be.lineWrapping=Be.contentAttributes.of({class:"cm-lineWrapping"}),Be.announce=it.define();const z8=4096,Dw={};class ld{constructor(e,t,o,r,a,l){this.from=e,this.to=t,this.dir=o,this.isolates=r,this.fresh=a,this.order=l}static update(e,t){if(t.empty&&!e.some(a=>a.fresh))return e;let o=[],r=e.length?e[e.length-1].dir:At.LTR;for(let a=Math.max(0,e.length-10);a<e.length;a++){let l=e[a];l.dir==r&&!t.touchesRange(l.from,l.to)&&o.push(new ld(t.mapPos(l.from,1),t.mapPos(l.to,-1),l.dir,l.isolates,!1,l.order))}return o}}function Bw(n,e,t){for(let o=n.state.facet(e),r=o.length-1;r>=0;r--){let a=o[r],l=typeof a=="function"?a(n):a;l&&im(l,t)}return t}const U8=Ze.mac?"mac":Ze.windows?"win":Ze.linux?"linux":"key";function H8(n,e){const t=n.split(/-(?!$)/);let o=t[t.length-1];o=="Space"&&(o=" ");let r,a,l,f;for(let h=0;h<t.length-1;++h){const g=t[h];if(/^(cmd|meta|m)$/i.test(g))f=!0;else if(/^a(lt)?$/i.test(g))r=!0;else if(/^(c|ctrl|control)$/i.test(g))a=!0;else if(/^s(hift)?$/i.test(g))l=!0;else if(/^mod$/i.test(g))e=="mac"?f=!0:a=!0;else throw new Error("Unrecognized modifier name: "+g)}return r&&(o="Alt-"+o),a&&(o="Ctrl-"+o),f&&(o="Meta-"+o),l&&(o="Shift-"+o),o}function cd(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const Y8=er.default(Be.domEventHandlers({keydown(n,e){return jw(Vw(e.state),n,e,"editor")}})),Jl=Ve.define({enables:Y8}),Lw=new WeakMap;function Vw(n){let e=n.facet(Jl),t=Lw.get(e);return t||Lw.set(e,t=K8(e.reduce((o,r)=>o.concat(r),[]))),t}function X8(n,e,t){return jw(Vw(n.state),e,n,t)}let lr=null;const G8=4e3;function K8(n,e=U8){let t=Object.create(null),o=Object.create(null),r=(l,f)=>{let h=o[l];if(h==null)o[l]=f;else if(h!=f)throw new Error("Key binding "+l+" is used both as a regular binding and as a multi-stroke prefix")},a=(l,f,h,g,O)=>{var v,b;let x=t[l]||(t[l]=Object.create(null)),C=f.split(/ (?!$)/).map(A=>H8(A,e));for(let A=1;A<C.length;A++){let E=C.slice(0,A).join(" ");r(E,!0),x[E]||(x[E]={preventDefault:!0,stopPropagation:!1,run:[F=>{let B=lr={view:F,prefix:E,scope:l};return setTimeout(()=>{lr==B&&(lr=null)},G8),!0}]})}let k=C.join(" ");r(k,!1);let L=x[k]||(x[k]={preventDefault:!1,stopPropagation:!1,run:((b=(v=x._any)===null||v===void 0?void 0:v.run)===null||b===void 0?void 0:b.slice())||[]});h&&L.run.push(h),g&&(L.preventDefault=!0),O&&(L.stopPropagation=!0)};for(let l of n){let f=l.scope?l.scope.split(" "):["editor"];if(l.any)for(let g of f){let O=t[g]||(t[g]=Object.create(null));O._any||(O._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:v}=l;for(let b in O)O[b].run.push(x=>v(x,Am))}let h=l[e]||l.key;if(h)for(let g of f)a(g,h,l.run,l.preventDefault,l.stopPropagation),l.shift&&a(g,"Shift-"+h,l.shift,l.preventDefault,l.stopPropagation)}return t}let Am=null;function jw(n,e,t,o){Am=e;let r=b3(e),a=Cn(r,0),l=To(a)==r.length&&r!=" ",f="",h=!1,g=!1,O=!1;lr&&lr.view==t&&lr.scope==o&&(f=lr.prefix+" ",uw.indexOf(e.keyCode)<0&&(g=!0,lr=null));let v=new Set,b=L=>{if(L){for(let A of L.run)if(!v.has(A)&&(v.add(A),A(t)))return L.stopPropagation&&(O=!0),!0;L.preventDefault&&(L.stopPropagation&&(O=!0),g=!0)}return!1},x=n[o],C,k;return x&&(b(x[f+cd(r,e,!l)])?h=!0:l&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Ze.windows&&e.ctrlKey&&e.altKey)&&(C=or[e.keyCode])&&C!=r?(b(x[f+cd(C,e,!0)])||e.shiftKey&&(k=Vl[e.keyCode])!=r&&k!=C&&b(x[f+cd(k,e,!1)]))&&(h=!0):l&&e.shiftKey&&b(x[f+cd(r,e,!0)])&&(h=!0),!h&&b(x._any)&&(h=!0)),g&&(h=!0),h&&O&&e.stopPropagation(),Am=null,h}class $l{constructor(e,t,o,r,a){this.className=e,this.left=t,this.top=o,this.width=r,this.height=a}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,o){if(o.empty){let r=e.coordsAtPos(o.head,o.assoc||1);if(!r)return[];let a=Fw(e);return[new $l(t,r.left-a.left,r.top-a.top,null,r.bottom-r.top)]}else return J8(e,t,o)}}function Fw(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==At.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function Zw(n,e,t,o){let r=n.coordsAtPos(e,t*2);if(!r)return o;let a=n.dom.getBoundingClientRect(),l=(r.top+r.bottom)/2,f=n.posAtCoords({x:a.left+1,y:l}),h=n.posAtCoords({x:a.right-1,y:l});return f==null||h==null?o:{from:Math.max(o.from,Math.min(f,h)),to:Math.min(o.to,Math.max(f,h))}}function J8(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let o=Math.max(t.from,n.viewport.from),r=Math.min(t.to,n.viewport.to),a=n.textDirection==At.LTR,l=n.contentDOM,f=l.getBoundingClientRect(),h=Fw(n),g=l.querySelector(".cm-line"),O=g&&window.getComputedStyle(g),v=f.left+(O?parseInt(O.paddingLeft)+Math.min(0,parseInt(O.textIndent)):0),b=f.right-(O?parseInt(O.paddingRight):0),x=bm(n,o),C=bm(n,r),k=x.type==Zn.Text?x:null,L=C.type==Zn.Text?C:null;if(k&&(n.lineWrapping||x.widgetLineBreaks)&&(k=Zw(n,o,1,k)),L&&(n.lineWrapping||C.widgetLineBreaks)&&(L=Zw(n,r,-1,L)),k&&L&&k.from==L.from&&k.to==L.to)return E(F(t.from,t.to,k));{let I=k?F(t.from,null,k):B(x,!1),K=L?F(null,t.to,L):B(C,!0),V=[];return(k||x).to<(L||C).from-(k&&L?1:0)||x.widgetLineBreaks>1&&I.bottom+n.defaultLineHeight/2<K.top?V.push(A(v,I.bottom,b,K.top)):I.bottom<K.top&&n.elementAtHeight((I.bottom+K.top)/2).type==Zn.Text&&(I.bottom=K.top=(I.bottom+K.top)/2),E(I).concat(V).concat(E(K))}function A(I,K,V,j){return new $l(e,I-h.left,K-h.top-.01,V-I,j-K+.01)}function E({top:I,bottom:K,horizontal:V}){let j=[];for(let R=0;R<V.length;R+=2)j.push(A(V[R],I,V[R+1],K));return j}function F(I,K,V){let j=1e9,R=-1e9,Y=[];function le(we,se,Oe,Le,ge){let $e=n.coordsAtPos(we,we==V.to?-2:2),Te=n.coordsAtPos(Oe,Oe==V.from?2:-2);!$e||!Te||(j=Math.min($e.top,Te.top,j),R=Math.max($e.bottom,Te.bottom,R),ge==At.LTR?Y.push(a&&se?v:$e.left,a&&Le?b:Te.right):Y.push(!a&&Le?v:Te.left,!a&&se?b:$e.right))}let me=I??V.from,ze=K??V.to;for(let we of n.visibleRanges)if(we.to>me&&we.from<ze)for(let se=Math.max(we.from,me),Oe=Math.min(we.to,ze);;){let Le=n.state.doc.lineAt(se);for(let ge of n.bidiSpans(Le)){let $e=ge.from+Le.from,Te=ge.to+Le.from;if($e>=Oe)break;Te>se&&le(Math.max($e,se),I==null&&$e<=me,Math.min(Te,Oe),K==null&&Te>=ze,ge.dir)}if(se=Le.to+1,se>=Oe)break}return Y.length==0&&le(me,I==null,ze,K==null,n.textDirection),{top:j,bottom:R,horizontal:Y}}function B(I,K){let V=f.top+(K?I.top:I.bottom);return{top:V,bottom:V,horizontal:[]}}}function $8(n,e){return n.constructor==e.constructor&&n.eq(e)}class q8{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(ud)!=e.state.facet(ud)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,o=e.facet(ud);for(;t<o.length&&o[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((t,o)=>!$8(t,this.drawn[o]))){let t=this.dom.firstChild,o=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[o].constructor&&r.update(t,this.drawn[o])?(t=t.nextSibling,o++):this.dom.insertBefore(r.draw(),t);for(;t;){let r=t.nextSibling;t.remove(),t=r}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ud=Ve.define();function Ww(n){return[Xt.define(e=>new q8(e,n)),ud.of(n)]}const zw=!Ze.ios,ql=Ve.define({combine(n){return ui(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function eD(n={}){return[ql.of(n),tD,nD,oD,Wx.of(!0)]}function Uw(n){return n.startState.facet(ql)!=n.state.facet(ql)}const tD=Ww({above:!0,markers(n){let{state:e}=n,t=e.facet(ql),o=[];for(let r of e.selection.ranges){let a=r==e.selection.main;if(r.empty?!a||zw:t.drawRangeCursor){let l=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",f=r.empty?r:ve.cursor(r.head,r.head>r.anchor?-1:1);for(let h of $l.forRange(n,l,f))o.push(h)}}return o},update(n,e){n.transactions.some(o=>o.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=Uw(n);return t&&Hw(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){Hw(e.state,n)},class:"cm-cursorLayer"});function Hw(n,e){e.style.animationDuration=n.facet(ql).cursorBlinkRate+"ms"}const nD=Ww({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:$l.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||Uw(n)},class:"cm-selectionLayer"}),Mm={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};zw&&(Mm[".cm-line"].caretColor=Mm[".cm-content"].caretColor="transparent !important");const oD=er.highest(Be.theme(Mm)),Yw=it.define({map(n,e){return n==null?null:e.mapPos(n)}}),ec=pn.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,o)=>o.is(Yw)?o.value:t,n)}}),iD=Xt.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(ec);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(ec)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(ec),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let o=n.scrollDOM.getBoundingClientRect();return{left:t.left-o.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-o.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(ec)!=n&&this.view.dispatch({effects:Yw.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function rD(){return[ec,iD]}function Xw(n,e,t,o,r){e.lastIndex=0;for(let a=n.iterRange(t,o),l=t,f;!a.next().done;l+=a.value.length)if(!a.lineBreak)for(;f=e.exec(a.value);)r(l+f.index,f)}function aD(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let o=[];for(let{from:r,to:a}of t)r=Math.max(n.state.doc.lineAt(r).from,r-e),a=Math.min(n.state.doc.lineAt(a).to,a+e),o.length&&o[o.length-1].to>=r?o[o.length-1].to=a:o.push({from:r,to:a});return o}class sD{constructor(e){const{regexp:t,decoration:o,decorate:r,boundary:a,maxLength:l=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(f,h,g,O)=>r(O,g,g+f[0].length,f,h);else if(typeof o=="function")this.addMatch=(f,h,g,O)=>{let v=o(f,h,g);v&&O(g,g+f[0].length,v)};else if(o)this.addMatch=(f,h,g,O)=>O(g,g+f[0].length,o);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=a,this.maxLength=l}createDeco(e){let t=new tr,o=t.add.bind(t);for(let{from:r,to:a}of aD(e,this.maxLength))Xw(e.state.doc,this.regexp,r,a,(l,f)=>this.addMatch(f,e,l,o));return t.finish()}updateDeco(e,t){let o=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((a,l,f,h)=>{h>e.view.viewport.from&&f<e.view.viewport.to&&(o=Math.min(f,o),r=Math.max(h,r))}),e.viewportChanged||r-o>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),o,r):t}updateRange(e,t,o,r){for(let a of e.visibleRanges){let l=Math.max(a.from,o),f=Math.min(a.to,r);if(f>l){let h=e.state.doc.lineAt(l),g=h.to<f?e.state.doc.lineAt(f):h,O=Math.max(a.from,h.from),v=Math.min(a.to,g.to);if(this.boundary){for(;l>h.from;l--)if(this.boundary.test(h.text[l-1-h.from])){O=l;break}for(;f<g.to;f++)if(this.boundary.test(g.text[f-g.from])){v=f;break}}let b=[],x,C=(k,L,A)=>b.push(A.range(k,L));if(h==g)for(this.regexp.lastIndex=O-h.from;(x=this.regexp.exec(h.text))&&x.index<v-h.from;)this.addMatch(x,e,x.index+h.from,C);else Xw(e.state.doc,this.regexp,O,v,(k,L)=>this.addMatch(L,e,k,C));t=t.update({filterFrom:O,filterTo:v,filter:(k,L)=>k<O||L>v,add:b})}}return t}}const Rm=/x/.unicode!=null?"gu":"g",lD=new RegExp(`[\0-\b
|
|
332
|
-
--\u2028\u2029\uFEFF-]`,Rm),cD={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Im=null;function uD(){var n;if(Im==null&&typeof document<"u"&&document.body){let e=document.body.style;Im=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Im||!1}const dd=Ve.define({combine(n){let e=ui(n,{render:null,specialChars:lD,addSpecialChars:null});return(e.replaceTabs=!uD())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Rm)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Rm)),e}});function dD(n={}){return[dd.of(n),fD()]}let Gw=null;function fD(){return Gw||(Gw=Xt.fromClass(class{constructor(n){this.view=n,this.decorations=Ye.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(dd)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new sD({regexp:n.specialChars,decoration:(e,t,o)=>{let{doc:r}=t.state,a=Cn(e[0],0);if(a==9){let l=r.lineAt(o),f=t.state.tabSize,h=hs(l.text,f,o-l.from);return Ye.replace({widget:new gD((f-h%f)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[a]||(this.decorationCache[a]=Ye.replace({widget:new mD(n,a)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(dd);n.startState.facet(dd)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const hD="•";function pD(n){return n>=32?hD:n==10?"":String.fromCharCode(9216+n)}class mD extends di{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=pD(this.code),o=e.state.phrase("Control character")+" "+(cD[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,o,t);if(r)return r;let a=document.createElement("span");return a.textContent=t,a.title=o,a.setAttribute("aria-label",o),a.className="cm-specialChar",a}ignoreEvent(){return!1}}class gD extends di{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function OD(){return yD}const vD=Ye.line({class:"cm-activeLine"}),yD=Xt.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let o of n.state.selection.ranges){let r=n.lineBlockAt(o.head);r.from>e&&(t.push(vD.range(r.from)),e=r.from)}return Ye.set(t)}},{decorations:n=>n.decorations});class bD extends di{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let t=e.firstChild?ps(e.firstChild):[];if(!t.length)return null;let o=window.getComputedStyle(e.parentNode),r=Zl(t[0],o.direction!="rtl"),a=parseInt(o.lineHeight);return r.bottom-r.top>a*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+a}:r}ignoreEvent(){return!1}}function xD(n){return Xt.fromClass(class{constructor(e){this.view=e,this.placeholder=n?Ye.set([Ye.widget({widget:new bD(n),side:1}).range(0)]):Ye.none}get decorations(){return this.view.state.doc.length?Ye.none:this.placeholder}},{decorations:e=>e.decorations})}const Qm=2e3;function wD(n,e,t){let o=Math.min(e.line,t.line),r=Math.max(e.line,t.line),a=[];if(e.off>Qm||t.off>Qm||e.col<0||t.col<0){let l=Math.min(e.off,t.off),f=Math.max(e.off,t.off);for(let h=o;h<=r;h++){let g=n.doc.line(h);g.length<=f&&a.push(ve.range(g.from+l,g.to+f))}}else{let l=Math.min(e.col,t.col),f=Math.max(e.col,t.col);for(let h=o;h<=r;h++){let g=n.doc.line(h),O=Xp(g.text,l,n.tabSize,!0);if(O<0)a.push(ve.cursor(g.to));else{let v=Xp(g.text,f,n.tabSize);a.push(ve.range(g.from+O,g.from+v))}}}return a}function SD(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function Kw(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),o=n.state.doc.lineAt(t),r=t-o.from,a=r>Qm?-1:r==o.length?SD(n,e.clientX):hs(o.text,n.state.tabSize,t-o.from);return{line:o.number,col:a,off:r}}function CD(n,e){let t=Kw(n,e),o=n.state.selection;return t?{update(r){if(r.docChanged){let a=r.changes.mapPos(r.startState.doc.line(t.line).from),l=r.state.doc.lineAt(a);t={line:l.number,col:t.col,off:Math.min(t.off,l.length)},o=o.map(r.changes)}},get(r,a,l){let f=Kw(n,r);if(!f)return o;let h=wD(n.state,t,f);return h.length?l?ve.create(h.concat(o.ranges)):ve.create(h):o}}:null}function kD(n){let e=t=>t.altKey&&t.button==0;return Be.mouseSelectionStyle.of((t,o)=>e(o)?CD(t,o):null)}const PD={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},_D={style:"cursor: crosshair"};function ED(n={}){let[e,t]=PD[n.key||"Alt"],o=Xt.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||t(r))},keyup(r){(r.keyCode==e||!t(r))&&this.set(!1)},mousemove(r){this.set(t(r))}}});return[o,Be.contentAttributes.of(r=>{var a;return!((a=r.plugin(o))===null||a===void 0)&&a.isDown?_D:null})]}const tc="-10000px";class Jw{constructor(e,t,o,r){this.facet=t,this.createTooltipView=o,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(l=>l);let a=null;this.tooltipViews=this.tooltips.map(l=>a=o(l,a))}update(e,t){var o;let r=e.state.facet(this.facet),a=r.filter(h=>h);if(r===this.input){for(let h of this.tooltipViews)h.update&&h.update(e);return!1}let l=[],f=t?[]:null;for(let h=0;h<a.length;h++){let g=a[h],O=-1;if(g){for(let v=0;v<this.tooltips.length;v++){let b=this.tooltips[v];b&&b.create==g.create&&(O=v)}if(O<0)l[h]=this.createTooltipView(g,h?l[h-1]:null),f&&(f[h]=!!g.above);else{let v=l[h]=this.tooltipViews[O];f&&(f[h]=t[O]),v.update&&v.update(e)}}}for(let h of this.tooltipViews)l.indexOf(h)<0&&(this.removeTooltipView(h),(o=h.destroy)===null||o===void 0||o.call(h));return t&&(f.forEach((h,g)=>t[g]=h),t.length=f.length),this.input=r,this.tooltips=a,this.tooltipViews=l,!0}}function TD(n){let{win:e}=n;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Dm=Ve.define({combine:n=>{var e,t,o;return{position:Ze.ios?"absolute":((e=n.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(r=>r.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((o=n.find(r=>r.tooltipSpace))===null||o===void 0?void 0:o.tooltipSpace)||TD}}}),$w=new WeakMap,Bm=Xt.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Dm);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Jw(n,Lm,(t,o)=>this.createTooltip(t,o),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,o=n.state.facet(Dm);if(o.position!=this.position&&!this.madeAbsolute){this.position=o.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;t=!0}if(o.parent!=this.parent){this.parent&&this.container.remove(),this.parent=o.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),o=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",t.dom.appendChild(r)}return t.dom.style.position=this.position,t.dom.style.top=tc,t.dom.style.left="0px",this.container.insertBefore(t.dom,o),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let o of this.manager.tooltipViews)o.dom.remove(),(n=o.destroy)===null||n===void 0||n.call(o);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect(),e=1,t=1,o=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(Ze.gecko)o=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==tc&&r.style.left=="0px"){let a=r.getBoundingClientRect();o=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(o||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,t=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((r,a)=>{let l=this.manager.tooltipViews[a];return l.getCoords?l.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(Dm).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:o}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let f of this.manager.tooltipViews)f.dom.style.position="absolute"}let{editor:t,space:o,scaleX:r,scaleY:a}=n,l=[];for(let f=0;f<this.manager.tooltips.length;f++){let h=this.manager.tooltips[f],g=this.manager.tooltipViews[f],{dom:O}=g,v=n.pos[f],b=n.size[f];if(!v||v.bottom<=Math.max(t.top,o.top)||v.top>=Math.min(t.bottom,o.bottom)||v.right<Math.max(t.left,o.left)-.1||v.left>Math.min(t.right,o.right)+.1){O.style.top=tc;continue}let x=h.arrow?g.dom.querySelector(".cm-tooltip-arrow"):null,C=x?7:0,k=b.right-b.left,L=(e=$w.get(g))!==null&&e!==void 0?e:b.bottom-b.top,A=g.offset||AD,E=this.view.textDirection==At.LTR,F=b.width>o.right-o.left?E?o.left:o.right-b.width:E?Math.max(o.left,Math.min(v.left-(x?14:0)+A.x,o.right-k)):Math.min(Math.max(o.left,v.left-k+(x?14:0)-A.x),o.right-k),B=this.above[f];!h.strictSide&&(B?v.top-(b.bottom-b.top)-A.y<o.top:v.bottom+(b.bottom-b.top)+A.y>o.bottom)&&B==o.bottom-v.bottom>v.top-o.top&&(B=this.above[f]=!B);let I=(B?v.top-o.top:o.bottom-v.bottom)-C;if(I<L&&g.resize!==!1){if(I<this.view.defaultLineHeight){O.style.top=tc;continue}$w.set(g,L),O.style.height=(L=I)/a+"px"}else O.style.height&&(O.style.height="");let K=B?v.top-L-C-A.y:v.bottom+C+A.y,V=F+k;if(g.overlap!==!0)for(let j of l)j.left<V&&j.right>F&&j.top<K+L&&j.bottom>K&&(K=B?j.top-L-2-C:j.bottom+C+2);if(this.position=="absolute"?(O.style.top=(K-n.parent.top)/a+"px",O.style.left=(F-n.parent.left)/r+"px"):(O.style.top=K/a+"px",O.style.left=F/r+"px"),x){let j=v.left+(E?A.x:-A.x)-(F+14-7);x.style.left=j/r+"px"}g.overlap!==!0&&l.push({left:F,top:K,right:V,bottom:K+L}),O.classList.toggle("cm-tooltip-above",B),O.classList.toggle("cm-tooltip-below",!B),g.positioned&&g.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=tc}},{eventObservers:{scroll(){this.maybeMeasure()}}}),ND=Be.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),AD={x:0,y:0},Lm=Ve.define({enables:[Bm,ND]}),fd=Ve.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class hd{static create(e){return new hd(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Jw(e,fd,(t,o)=>this.createHostedView(t,o),t=>t.dom.remove())}createHostedView(e,t){let o=e.create(this.view);return o.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(o.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&o.mount&&o.mount(this.view),o}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let o of this.manager.tooltipViews){let r=o[e];if(r!==void 0){if(t===void 0)t=r;else if(t!==r)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const MD=Lm.compute([fd],n=>{let e=n.facet(fd);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var o;return(o=t.end)!==null&&o!==void 0?o:t.pos})),create:hd.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class RD{constructor(e,t,o,r,a){this.view=e,this.source=t,this.field=o,this.setHover=r,this.hoverTime=a,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,o=e.docView.nearest(t.target);if(!o)return;let r,a=1;if(o instanceof ir)r=o.posAtStart;else{if(r=e.posAtCoords(t),r==null)return;let f=e.coordsAtPos(r);if(!f||t.y<f.top||t.y>f.bottom||t.x<f.left-e.defaultCharacterWidth||t.x>f.right+e.defaultCharacterWidth)return;let h=e.bidiSpans(e.state.doc.lineAt(r)).find(O=>O.from<=r&&O.to>=r),g=h&&h.dir==At.RTL?-1:1;a=t.x<f.left?-g:g}let l=this.source(e,r,a);if(l?.then){let f=this.pending={pos:r};l.then(h=>{this.pending==f&&(this.pending=null,h&&!(Array.isArray(h)&&!h.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(h)?h:[h])}))},h=>$n(e.state,h,"hover tooltip"))}else l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])})}get tooltip(){let e=this.view.plugin(Bm),t=e?e.manager.tooltips.findIndex(o=>o.create==hd.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,o;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:a}=this;if(r.length&&a&&!ID(a.dom,e)||this.pending){let{pos:l}=r[0]||this.pending,f=(o=(t=r[0])===null||t===void 0?void 0:t.end)!==null&&o!==void 0?o:l;(l==f?this.view.posAtCoords(this.lastMove)!=l:!QD(this.view,l,f,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:o}=this;o&&o.dom.contains(e.relatedTarget)?this.watchTooltipLeave(o.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=o=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(o.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const pd=4;function ID(n,e){let{left:t,right:o,top:r,bottom:a}=n.getBoundingClientRect(),l;if(l=n.querySelector(".cm-tooltip-arrow")){let f=l.getBoundingClientRect();r=Math.min(f.top,r),a=Math.max(f.bottom,a)}return e.clientX>=t-pd&&e.clientX<=o+pd&&e.clientY>=r-pd&&e.clientY<=a+pd}function QD(n,e,t,o,r,a){let l=n.scrollDOM.getBoundingClientRect(),f=n.documentTop+n.documentPadding.top+n.contentHeight;if(l.left>o||l.right<o||l.top>r||Math.min(l.bottom,f)<r)return!1;let h=n.posAtCoords({x:o,y:r},!1);return h>=e&&h<=t}function DD(n,e={}){let t=it.define(),o=pn.define({create(){return[]},update(r,a){if(r.length&&(e.hideOnChange&&(a.docChanged||a.selection)?r=[]:e.hideOn&&(r=r.filter(l=>!e.hideOn(a,l))),a.docChanged)){let l=[];for(let f of r){let h=a.changes.mapPos(f.pos,-1,kn.TrackDel);if(h!=null){let g=Object.assign(Object.create(null),f);g.pos=h,g.end!=null&&(g.end=a.changes.mapPos(g.end)),l.push(g)}}r=l}for(let l of a.effects)l.is(t)&&(r=l.value),l.is(BD)&&(r=[]);return r},provide:r=>fd.from(r)});return{active:o,extension:[o,Xt.define(r=>new RD(r,n,o,t,e.hoverTime||300)),MD]}}function qw(n,e){let t=n.plugin(Bm);if(!t)return null;let o=t.manager.tooltips.indexOf(e);return o<0?null:t.manager.tooltipViews[o]}const BD=it.define(),eS=Ve.define({combine(n){let e,t;for(let o of n)e=e||o.topContainer,t=t||o.bottomContainer;return{topContainer:e,bottomContainer:t}}});function nc(n,e){let t=n.plugin(tS),o=t?t.specs.indexOf(e):-1;return o>-1?t.panels[o]:null}const tS=Xt.fromClass(class{constructor(n){this.input=n.state.facet(oc),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(eS);this.top=new md(n,!0,e.topContainer),this.bottom=new md(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(eS);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new md(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new md(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(oc);if(t!=this.input){let o=t.filter(h=>h),r=[],a=[],l=[],f=[];for(let h of o){let g=this.specs.indexOf(h),O;g<0?(O=h(n.view),f.push(O)):(O=this.panels[g],O.update&&O.update(n)),r.push(O),(O.top?a:l).push(O)}this.specs=o,this.panels=r,this.top.sync(a),this.bottom.sync(l);for(let h of f)h.dom.classList.add("cm-panel"),h.mount&&h.mount()}else for(let o of this.panels)o.update&&o.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Be.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class md{constructor(e,t,o){this.view=e,this.top=t,this.container=o,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=nS(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=nS(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function nS(n){let e=n.nextSibling;return n.remove(),e}const oc=Ve.define({enables:tS});class Di extends ia{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Di.prototype.elementClass="",Di.prototype.toDOM=void 0,Di.prototype.mapMode=kn.TrackBefore,Di.prototype.startSide=Di.prototype.endSide=-1,Di.prototype.point=!0;const gd=Ve.define(),LD=Ve.define(),VD={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>vt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},ic=Ve.define();function jD(n){return[iS(),ic.of(Object.assign(Object.assign({},VD),n))]}const oS=Ve.define({combine:n=>n.some(e=>e)});function iS(n){return[FD]}const FD=Xt.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(ic).map(e=>new aS(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(oS),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,o=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(o<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(oS)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=vt.iter(this.view.state.facet(gd),this.view.viewport.from),o=[],r=this.gutters.map(a=>new ZD(a,this.view.viewport,-this.view.documentPadding.top));for(let a of this.view.viewportLineBlocks)if(o.length&&(o=[]),Array.isArray(a.type)){let l=!0;for(let f of a.type)if(f.type==Zn.Text&&l){Vm(t,o,f.from);for(let h of r)h.line(this.view,f,o);l=!1}else if(f.widget)for(let h of r)h.widget(this.view,f)}else if(a.type==Zn.Text){Vm(t,o,a.from);for(let l of r)l.line(this.view,a,o)}else if(a.widget)for(let l of r)l.widget(this.view,a);for(let a of r)a.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(ic),t=n.state.facet(ic),o=n.docChanged||n.heightChanged||n.viewportChanged||!vt.eq(n.startState.facet(gd),n.state.facet(gd),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let r of this.gutters)r.update(n)&&(o=!0);else{o=!0;let r=[];for(let a of t){let l=e.indexOf(a);l<0?r.push(new aS(this.view,a)):(this.gutters[l].update(n),r.push(this.gutters[l]))}for(let a of this.gutters)a.dom.remove(),r.indexOf(a)<0&&a.destroy();for(let a of r)this.dom.appendChild(a.dom);this.gutters=r}return o}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>Be.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==At.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function rS(n){return Array.isArray(n)?n:[n]}function Vm(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class ZD{constructor(e,t,o){this.gutter=e,this.height=o,this.i=0,this.cursor=vt.iter(e.markers,t.from)}addElement(e,t,o){let{gutter:r}=this,a=(t.top-this.height)/e.scaleY,l=t.height/e.scaleY;if(this.i==r.elements.length){let f=new sS(e,l,a,o);r.elements.push(f),r.dom.appendChild(f.dom)}else r.elements[this.i].update(e,l,a,o);this.height=t.bottom,this.i++}line(e,t,o){let r=[];Vm(this.cursor,r,t.from),o.length&&(r=r.concat(o));let a=this.gutter.config.lineMarker(e,t,r);a&&r.unshift(a);let l=this.gutter;r.length==0&&!l.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let o=this.gutter.config.widgetMarker(e,t.widget,t),r=o?[o]:null;for(let a of e.state.facet(LD)){let l=a(e,t.widget,t);l&&(r||(r=[])).push(l)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class aS{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let o in t.domEventHandlers)this.dom.addEventListener(o,r=>{let a=r.target,l;if(a!=this.dom&&this.dom.contains(a)){for(;a.parentNode!=this.dom;)a=a.parentNode;let h=a.getBoundingClientRect();l=(h.top+h.bottom)/2}else l=r.clientY;let f=e.lineBlockAtHeight(l-e.documentTop);t.domEventHandlers[o](e,f,r)&&r.preventDefault()});this.markers=rS(t.markers(e)),t.initialSpacer&&(this.spacer=new sS(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=rS(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let o=e.view.viewport;return!vt.eq(this.markers,t,o.from,o.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class sS{constructor(e,t,o,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,o,r)}update(e,t,o,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=o&&(this.dom.style.marginTop=(this.above=o)?o+"px":""),WD(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let o="cm-gutterElement",r=this.dom.firstChild;for(let a=0,l=0;;){let f=l,h=a<t.length?t[a++]:null,g=!1;if(h){let O=h.elementClass;O&&(o+=" "+O);for(let v=l;v<this.markers.length;v++)if(this.markers[v].compare(h)){f=v,g=!0;break}}else f=this.markers.length;for(;l<f;){let O=this.markers[l++];if(O.toDOM){O.destroy(r);let v=r.nextSibling;r.remove(),r=v}}if(!h)break;h.toDOM&&(g?r=r.nextSibling:this.dom.insertBefore(h.toDOM(e),r)),g&&l++}this.dom.className=o,this.markers=t}destroy(){this.setMarkers(null,[])}}function WD(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const zD=Ve.define(),UD=Ve.define(),xs=Ve.define({combine(n){return ui(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let o=Object.assign({},e);for(let r in t){let a=o[r],l=t[r];o[r]=a?(f,h,g)=>a(f,h,g)||l(f,h,g):l}return o}})}});class jm extends Di{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Fm(n,e){return n.state.facet(xs).formatNumber(e,n.state)}const HD=ic.compute([xs],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(zD)},lineMarker(e,t,o){return o.some(r=>r.toDOM)?null:new jm(Fm(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,o)=>{for(let r of e.state.facet(UD)){let a=r(e,t,o);if(a)return a}return null},lineMarkerChange:e=>e.startState.facet(xs)!=e.state.facet(xs),initialSpacer(e){return new jm(Fm(e,lS(e.state.doc.lines)))},updateSpacer(e,t){let o=Fm(t.view,lS(t.view.state.doc.lines));return o==e.number?e:new jm(o)},domEventHandlers:n.facet(xs).domEventHandlers}));function YD(n={}){return[xs.of(n),iS(),HD]}function lS(n){let e=9;for(;e<n;)e=e*10+9;return e}const XD=new class extends Di{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},GD=gd.compute(["selection"],n=>{let e=[],t=-1;for(let o of n.selection.ranges){let r=n.doc.lineAt(o.head).from;r>t&&(t=r,e.push(XD.range(r)))}return vt.of(e)});function KD(){return GD}const cS=1024;let JD=0;class Zm{constructor(e,t){this.from=e,this.to=t}}class dt{constructor(e={}){this.id=JD++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=qn.match(e)),t=>{let o=e(t);return o===void 0?null:[this,o]}}}dt.closedBy=new dt({deserialize:n=>n.split(" ")}),dt.openedBy=new dt({deserialize:n=>n.split(" ")}),dt.group=new dt({deserialize:n=>n.split(" ")}),dt.isolate=new dt({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}}),dt.contextHash=new dt({perNode:!0}),dt.lookAhead=new dt({perNode:!0}),dt.mounted=new dt({perNode:!0});class Od{constructor(e,t,o){this.tree=e,this.overlay=t,this.parser=o}static get(e){return e&&e.props&&e.props[dt.mounted.id]}}const $D=Object.create(null);class qn{constructor(e,t,o,r=0){this.name=e,this.props=t,this.id=o,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):$D,o=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new qn(e.name||"",t,e.id,o);if(e.props){for(let a of e.props)if(Array.isArray(a)||(a=a(r)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[a[0].id]=a[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(dt.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let o in e)for(let r of o.split(" "))t[r]=e[o];return o=>{for(let r=o.prop(dt.group),a=-1;a<(r?r.length:0);a++){let l=t[a<0?o.name:r[a]];if(l)return l}}}}qn.none=new qn("",Object.create(null),0,8);class Wm{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let o of this.types){let r=null;for(let a of e){let l=a(o);l&&(r||(r=Object.assign({},o.props)),r[l[0].id]=l[1])}t.push(r?new qn(o.name,r,o.id,o.flags):o)}return new Wm(t)}}const vd=new WeakMap,uS=new WeakMap;var ln;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(ln||(ln={}));class nn{constructor(e,t,o,r,a){if(this.type=e,this.children=t,this.positions=o,this.length=r,this.props=null,a&&a.length){this.props=Object.create(null);for(let[l,f]of a)this.props[typeof l=="number"?l:l.id]=f}}toString(){let e=Od.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let o of this.children){let r=o.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Hm(this.topNode,e)}cursorAt(e,t=0,o=0){let r=vd.get(this)||this.topNode,a=new Hm(r);return a.moveTo(e,t),vd.set(this,a._tree),a}get topNode(){return new eo(this,0,0,null)}resolve(e,t=0){let o=rc(vd.get(this)||this.topNode,e,t,!1);return vd.set(this,o),o}resolveInner(e,t=0){let o=rc(uS.get(this)||this.topNode,e,t,!0);return uS.set(this,o),o}resolveStack(e,t=0){return tB(this,e,t)}iterate(e){let{enter:t,leave:o,from:r=0,to:a=this.length}=e,l=e.mode||0,f=(l&ln.IncludeAnonymous)>0;for(let h=this.cursor(l|ln.IncludeAnonymous);;){let g=!1;if(h.from<=a&&h.to>=r&&(!f&&h.type.isAnonymous||t(h)!==!1)){if(h.firstChild())continue;g=!0}for(;g&&o&&(f||!h.type.isAnonymous)&&o(h),!h.nextSibling();){if(!h.parent())return;g=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Xm(qn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,o,r)=>new nn(this.type,t,o,r,this.propValues),e.makeTree||((t,o,r)=>new nn(qn.none,t,o,r)))}static build(e){return nB(e)}}nn.empty=new nn(qn.none,[],[],0);class zm{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new zm(this.buffer,this.index)}}class cr{constructor(e,t,o){this.buffer=e,this.length=t,this.set=o}get type(){return qn.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],o=this.buffer[e+3],r=this.set.types[t],a=r.name;if(/\W/.test(a)&&!r.isError&&(a=JSON.stringify(a)),e+=4,o==e)return a;let l=[];for(;e<o;)l.push(this.childString(e)),e=this.buffer[e+3];return a+"("+l.join(",")+")"}findChild(e,t,o,r,a){let{buffer:l}=this,f=-1;for(let h=e;h!=t&&!(dS(a,r,l[h+1],l[h+2])&&(f=h,o>0));h=l[h+3]);return f}slice(e,t,o){let r=this.buffer,a=new Uint16Array(t-e),l=0;for(let f=e,h=0;f<t;){a[h++]=r[f++],a[h++]=r[f++]-o;let g=a[h++]=r[f++]-o;a[h++]=r[f++]-e,l=Math.max(l,g)}return new cr(a,l,this.set)}}function dS(n,e,t,o){switch(n){case-2:return t<e;case-1:return o>=e&&t<e;case 0:return t<e&&o>e;case 1:return t<=e&&o>e;case 2:return o>e;case 4:return!0}}function rc(n,e,t,o){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let l=!o&&n instanceof eo&&n.index<0?null:n.parent;if(!l)return n;n=l}let a=o?0:ln.IgnoreOverlays;if(o)for(let l=n,f=l.parent;f;l=f,f=l.parent)l instanceof eo&&l.index<0&&((r=f.enter(e,t,a))===null||r===void 0?void 0:r.from)!=l.from&&(n=f);for(;;){let l=n.enter(e,t,a);if(!l)return n;n=l}}class fS{cursor(e=0){return new Hm(this,e)}getChild(e,t=null,o=null){let r=hS(this,e,t,o);return r.length?r[0]:null}getChildren(e,t=null,o=null){return hS(this,e,t,o)}resolve(e,t=0){return rc(this,e,t,!1)}resolveInner(e,t=0){return rc(this,e,t,!0)}matchContext(e){return Um(this,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),o=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(o=t,t=r.prevSibling):t=r}return o}get node(){return this}get next(){return this.parent}}class eo extends fS{constructor(e,t,o,r){super(),this._tree=e,this.from=t,this.index=o,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,o,r,a=0){for(let l=this;;){for(let{children:f,positions:h}=l._tree,g=t>0?f.length:-1;e!=g;e+=t){let O=f[e],v=h[e]+l.from;if(dS(r,o,v,v+O.length)){if(O instanceof cr){if(a&ln.ExcludeBuffers)continue;let b=O.findChild(0,O.buffer.length,t,o-v,r);if(b>-1)return new pi(new qD(l,O,e,v),null,b)}else if(a&ln.IncludeAnonymous||!O.type.isAnonymous||Ym(O)){let b;if(!(a&ln.IgnoreMounts)&&(b=Od.get(O))&&!b.overlay)return new eo(b.tree,v,e,l);let x=new eo(O,v,e,l);return a&ln.IncludeAnonymous||!x.type.isAnonymous?x:x.nextChild(t<0?O.children.length-1:0,t,o,r)}}}if(a&ln.IncludeAnonymous||!l.type.isAnonymous||(l.index>=0?e=l.index+t:e=t<0?-1:l._parent._tree.children.length,l=l._parent,!l))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,o=0){let r;if(!(o&ln.IgnoreOverlays)&&(r=Od.get(this._tree))&&r.overlay){let a=e-this.from;for(let{from:l,to:f}of r.overlay)if((t>0?l<=a:l<a)&&(t<0?f>=a:f>a))return new eo(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,o)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function hS(n,e,t,o){let r=n.cursor(),a=[];if(!r.firstChild())return a;if(t!=null){for(let l=!1;!l;)if(l=r.type.is(t),!r.nextSibling())return a}for(;;){if(o!=null&&r.type.is(o))return a;if(r.type.is(e)&&a.push(r.node),!r.nextSibling())return o==null?a:[]}}function Um(n,e,t=e.length-1){for(let o=n.parent;t>=0;o=o.parent){if(!o)return!1;if(!o.type.isAnonymous){if(e[t]&&e[t]!=o.name)return!1;t--}}return!0}class qD{constructor(e,t,o,r){this.parent=e,this.buffer=t,this.index=o,this.start=r}}class pi extends fS{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,o){super(),this.context=e,this._parent=t,this.index=o,this.type=e.buffer.set.types[e.buffer.buffer[o]]}child(e,t,o){let{buffer:r}=this.context,a=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,o);return a<0?null:new pi(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,o=0){if(o&ln.ExcludeBuffers)return null;let{buffer:r}=this.context,a=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return a<0?null:new pi(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new pi(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new pi(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:o}=this.context,r=this.index+4,a=o.buffer[this.index+3];if(a>r){let l=o.buffer[this.index+1];e.push(o.slice(r,a,l)),t.push(0)}return new nn(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function pS(n){if(!n.length)return null;let e=0,t=n[0];for(let a=1;a<n.length;a++){let l=n[a];(l.from>t.from||l.to<t.to)&&(t=l,e=a)}let o=t instanceof eo&&t.index<0?null:t.parent,r=n.slice();return o?r[e]=o:r.splice(e,1),new eB(r,t)}class eB{constructor(e,t){this.heads=e,this.node=t}get next(){return pS(this.heads)}}function tB(n,e,t){let o=n.resolveInner(e,t),r=null;for(let a=o instanceof eo?o:o.context.parent;a;a=a.parent)if(a.index<0){let l=a.parent;(r||(r=[o])).push(l.resolve(e,t)),a=l}else{let l=Od.get(a.tree);if(l&&l.overlay&&l.overlay[0].from<=e&&l.overlay[l.overlay.length-1].to>=e){let f=new eo(l.tree,l.overlay[0].from+a.from,-1,a);(r||(r=[o])).push(rc(f,e,t,!1))}}return r?pS(r):o}class Hm{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof eo)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let o=e._parent;o;o=o._parent)this.stack.unshift(o.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:o,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=o+r.buffer[e+1],this.to=o+r.buffer[e+2],!0}yield(e){return e?e instanceof eo?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,o){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,o,this.mode));let{buffer:r}=this.buffer,a=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,o);return a<0?!1:(this.stack.push(this.index),this.yieldBuf(a))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,o=this.mode){return this.buffer?o&ln.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,o))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ln.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ln.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,o=this.stack.length-1;if(e<0){let r=o<0?0:this.stack[o]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(o<0?t.buffer.length:t.buffer[this.stack[o]+3]))return this.yieldBuf(r)}return o<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,o,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let a=0;a<this.index;a++)if(r.buffer.buffer[a+3]<this.index)return!1;({index:t,parent:o}=r)}else({index:t,_parent:o}=this._tree);for(;o;{index:t,_parent:o}=o)if(t>-1)for(let a=t+e,l=e<0?-1:o._tree.children.length;a!=l;a+=e){let f=o._tree.children[a];if(this.mode&ln.IncludeAnonymous||f instanceof cr||!f.type.isAnonymous||Ym(f))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,o=0;if(e&&e.context==this.buffer)e:for(let r=this.index,a=this.stack.length;a>=0;){for(let l=e;l;l=l._parent)if(l.index==r){if(r==this.index)return l;t=l,o=a+1;break e}r=this.stack[--a]}for(let r=o;r<this.stack.length;r++)t=new pi(this.buffer,t,this.stack[r]);return this.bufferNode=new pi(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let o=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){o++;continue}this.type.isAnonymous||(r=!0)}for(;r&&t&&t(this),r=this.type.isAnonymous,!this.nextSibling();){if(!o)return;this.parent(),o--,r=!0}}}matchContext(e){if(!this.buffer)return Um(this.node,e);let{buffer:t}=this.buffer,{types:o}=t.set;for(let r=e.length-1,a=this.stack.length-1;r>=0;a--){if(a<0)return Um(this.node,e,r);let l=o[t.buffer[this.stack[a]]];if(!l.isAnonymous){if(e[r]&&e[r]!=l.name)return!1;r--}}return!0}}function Ym(n){return n.children.some(e=>e instanceof cr||!e.type.isAnonymous||Ym(e))}function nB(n){var e;let{buffer:t,nodeSet:o,maxBufferLength:r=cS,reused:a=[],minRepeatType:l=o.types.length}=n,f=Array.isArray(t)?new zm(t,t.length):t,h=o.types,g=0,O=0;function v(I,K,V,j,R,Y){let{id:le,start:me,end:ze,size:we}=f,se=O;for(;we<0;)if(f.next(),we==-1){let Te=a[le];V.push(Te),j.push(me-I);return}else if(we==-3){g=le;return}else if(we==-4){O=le;return}else throw new RangeError(`Unrecognized record size: ${we}`);let Oe=h[le],Le,ge,$e=me-I;if(ze-me<=r&&(ge=L(f.pos-K,R))){let Te=new Uint16Array(ge.size-ge.skip),ye=f.pos-ge.size,pt=Te.length;for(;f.pos>ye;)pt=A(ge.start,Te,pt);Le=new cr(Te,ze-ge.start,o),$e=ge.start-I}else{let Te=f.pos-we;f.next();let ye=[],pt=[],Se=le>=l?le:-1,We=0,wt=ze;for(;f.pos>Te;)Se>=0&&f.id==Se&&f.size>=0?(f.end<=wt-r&&(C(ye,pt,me,We,f.end,wt,Se,se),We=ye.length,wt=f.end),f.next()):Y>2500?b(me,Te,ye,pt):v(me,Te,ye,pt,Se,Y+1);if(Se>=0&&We>0&&We<ye.length&&C(ye,pt,me,We,me,wt,Se,se),ye.reverse(),pt.reverse(),Se>-1&&We>0){let vo=x(Oe);Le=Xm(Oe,ye,pt,0,ye.length,0,ze-me,vo,vo)}else Le=k(Oe,ye,pt,ze-me,se-ze)}V.push(Le),j.push($e)}function b(I,K,V,j){let R=[],Y=0,le=-1;for(;f.pos>K;){let{id:me,start:ze,end:we,size:se}=f;if(se>4)f.next();else{if(le>-1&&ze<le)break;le<0&&(le=we-r),R.push(me,ze,we),Y++,f.next()}}if(Y){let me=new Uint16Array(Y*4),ze=R[R.length-2];for(let we=R.length-3,se=0;we>=0;we-=3)me[se++]=R[we],me[se++]=R[we+1]-ze,me[se++]=R[we+2]-ze,me[se++]=se;V.push(new cr(me,R[2]-ze,o)),j.push(ze-I)}}function x(I){return(K,V,j)=>{let R=0,Y=K.length-1,le,me;if(Y>=0&&(le=K[Y])instanceof nn){if(!Y&&le.type==I&&le.length==j)return le;(me=le.prop(dt.lookAhead))&&(R=V[Y]+le.length+me)}return k(I,K,V,j,R)}}function C(I,K,V,j,R,Y,le,me){let ze=[],we=[];for(;I.length>j;)ze.push(I.pop()),we.push(K.pop()+V-R);I.push(k(o.types[le],ze,we,Y-R,me-Y)),K.push(R-V)}function k(I,K,V,j,R=0,Y){if(g){let le=[dt.contextHash,g];Y=Y?[le].concat(Y):[le]}if(R>25){let le=[dt.lookAhead,R];Y=Y?[le].concat(Y):[le]}return new nn(I,K,V,j,Y)}function L(I,K){let V=f.fork(),j=0,R=0,Y=0,le=V.end-r,me={size:0,start:0,skip:0};e:for(let ze=V.pos-I;V.pos>ze;){let we=V.size;if(V.id==K&&we>=0){me.size=j,me.start=R,me.skip=Y,Y+=4,j+=4,V.next();continue}let se=V.pos-we;if(we<0||se<ze||V.start<le)break;let Oe=V.id>=l?4:0,Le=V.start;for(V.next();V.pos>se;){if(V.size<0)if(V.size==-3)Oe+=4;else break e;else V.id>=l&&(Oe+=4);V.next()}R=Le,j+=we,Y+=Oe}return(K<0||j==I)&&(me.size=j,me.start=R,me.skip=Y),me.size>4?me:void 0}function A(I,K,V){let{id:j,start:R,end:Y,size:le}=f;if(f.next(),le>=0&&j<l){let me=V;if(le>4){let ze=f.pos-(le-4);for(;f.pos>ze;)V=A(I,K,V)}K[--V]=me,K[--V]=Y-I,K[--V]=R-I,K[--V]=j}else le==-3?g=j:le==-4&&(O=j);return V}let E=[],F=[];for(;f.pos>0;)v(n.start||0,n.bufferStart||0,E,F,-1,0);let B=(e=n.length)!==null&&e!==void 0?e:E.length?F[0]+E[0].length:0;return new nn(h[n.topID],E.reverse(),F.reverse(),B)}const mS=new WeakMap;function yd(n,e){if(!n.isAnonymous||e instanceof cr||e.type!=n)return 1;let t=mS.get(e);if(t==null){t=1;for(let o of e.children){if(o.type!=n||!(o instanceof nn)){t=1;break}t+=yd(n,o)}mS.set(e,t)}return t}function Xm(n,e,t,o,r,a,l,f,h){let g=0;for(let C=o;C<r;C++)g+=yd(n,e[C]);let O=Math.ceil(g*1.5/8),v=[],b=[];function x(C,k,L,A,E){for(let F=L;F<A;){let B=F,I=k[F],K=yd(n,C[F]);for(F++;F<A;F++){let V=yd(n,C[F]);if(K+V>=O)break;K+=V}if(F==B+1){if(K>O){let V=C[B];x(V.children,V.positions,0,V.children.length,k[B]+E);continue}v.push(C[B])}else{let V=k[F-1]+C[F-1].length-I;v.push(Xm(n,C,k,B,F,I,V,null,h))}b.push(I+E-a)}}return x(e,t,o,r,0),(f||h)(v,b,l)}class oB{constructor(){this.map=new WeakMap}setBuffer(e,t,o){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,o)}getBuffer(e,t){let o=this.map.get(e);return o&&o.get(t)}set(e,t){e instanceof pi?this.setBuffer(e.context.buffer,e.index,t):e instanceof eo&&this.map.set(e.tree,t)}get(e){return e instanceof pi?this.getBuffer(e.context.buffer,e.index):e instanceof eo?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class la{constructor(e,t,o,r,a=!1,l=!1){this.from=e,this.to=t,this.tree=o,this.offset=r,this.open=(a?1:0)|(l?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],o=!1){let r=[new la(0,e.length,e,0,!1,o)];for(let a of t)a.to>e.length&&r.push(a);return r}static applyChanges(e,t,o=128){if(!t.length)return e;let r=[],a=1,l=e.length?e[0]:null;for(let f=0,h=0,g=0;;f++){let O=f<t.length?t[f]:null,v=O?O.fromA:1e9;if(v-h>=o)for(;l&&l.from<v;){let b=l;if(h>=b.from||v<=b.to||g){let x=Math.max(b.from,h)-g,C=Math.min(b.to,v)-g;b=x>=C?null:new la(x,C,b.tree,b.offset+g,f>0,!!O)}if(b&&r.push(b),l.to>v)break;l=a<e.length?e[a++]:null}if(!O)break;h=O.toA,g=O.toA-O.toB}return r}}class gS{startParse(e,t,o){return typeof e=="string"&&(e=new iB(e)),o=o?o.length?o.map(r=>new Zm(r.from,r.to)):[new Zm(0,0)]:[new Zm(0,e.length)],this.createParse(e,t||[],o)}parse(e,t,o){let r=this.startParse(e,t,o);for(;;){let a=r.advance();if(a)return a}}}class iB{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new dt({perNode:!0});let rB=0;class Mo{constructor(e,t,o,r){this.name=e,this.set=t,this.base=o,this.modified=r,this.id=rB++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let o=typeof e=="string"?e:"?";if(e instanceof Mo&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let r=new Mo(o,[],null,[]);if(r.set.push(r),t)for(let a of t.set)r.set.push(a);return r}static defineModifier(e){let t=new bd(e);return o=>o.modified.indexOf(t)>-1?o:bd.get(o.base||o,o.modified.concat(t).sort((r,a)=>r.id-a.id))}}let aB=0;class bd{constructor(e){this.name=e,this.instances=[],this.id=aB++}static get(e,t){if(!t.length)return e;let o=t[0].instances.find(f=>f.base==e&&sB(t,f.modified));if(o)return o;let r=[],a=new Mo(e.name,r,e,t);for(let f of t)f.instances.push(a);let l=lB(t);for(let f of e.set)if(!f.modified.length)for(let h of l)r.push(bd.get(f,h));return a}}function sB(n,e){return n.length==e.length&&n.every((t,o)=>t==e[o])}function lB(n){let e=[[]];for(let t=0;t<n.length;t++)for(let o=0,r=e.length;o<r;o++)e.push(e[o].concat(n[t]));return e.sort((t,o)=>o.length-t.length)}function OS(n){let e=Object.create(null);for(let t in n){let o=n[t];Array.isArray(o)||(o=[o]);for(let r of t.split(" "))if(r){let a=[],l=2,f=r;for(let v=0;;){if(f=="..."&&v>0&&v+3==r.length){l=1;break}let b=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(f);if(!b)throw new RangeError("Invalid path: "+r);if(a.push(b[0]=="*"?"":b[0][0]=='"'?JSON.parse(b[0]):b[0]),v+=b[0].length,v==r.length)break;let x=r[v++];if(v==r.length&&x=="!"){l=0;break}if(x!="/")throw new RangeError("Invalid path: "+r);f=r.slice(v)}let h=a.length-1,g=a[h];if(!g)throw new RangeError("Invalid path: "+r);let O=new xd(o,l,h>0?a.slice(0,h):null);e[g]=O.sort(e[g])}}return vS.add(e)}const vS=new dt;class xd{constructor(e,t,o,r){this.tags=e,this.mode=t,this.context=o,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}xd.empty=new xd([],2,null);function yS(n,e){let t=Object.create(null);for(let a of n)if(!Array.isArray(a.tag))t[a.tag.id]=a.class;else for(let l of a.tag)t[l.id]=a.class;let{scope:o,all:r=null}=e||{};return{style:a=>{let l=r;for(let f of a)for(let h of f.set){let g=t[h.id];if(g){l=l?l+" "+g:g;break}}return l},scope:o}}function cB(n,e){let t=null;for(let o of n){let r=o.style(e);r&&(t=t?t+" "+r:r)}return t}function uB(n,e,t,o=0,r=n.length){let a=new dB(o,Array.isArray(e)?e:[e],t);a.highlightRange(n.cursor(),o,r,"",a.highlighters),a.flush(r)}class dB{constructor(e,t,o){this.at=e,this.highlighters=t,this.span=o,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,o,r,a){let{type:l,from:f,to:h}=e;if(f>=o||h<=t)return;l.isTop&&(a=this.highlighters.filter(x=>!x.scope||x.scope(l)));let g=r,O=fB(e)||xd.empty,v=cB(a,O.tags);if(v&&(g&&(g+=" "),g+=v,O.mode==1&&(r+=(r?" ":"")+v)),this.startSpan(Math.max(t,f),g),O.opaque)return;let b=e.tree&&e.tree.prop(dt.mounted);if(b&&b.overlay){let x=e.node.enter(b.overlay[0].from+f,1),C=this.highlighters.filter(L=>!L.scope||L.scope(b.tree.type)),k=e.firstChild();for(let L=0,A=f;;L++){let E=L<b.overlay.length?b.overlay[L]:null,F=E?E.from+f:h,B=Math.max(t,A),I=Math.min(o,F);if(B<I&&k)for(;e.from<I&&(this.highlightRange(e,B,I,r,a),this.startSpan(Math.min(I,e.to),g),!(e.to>=F||!e.nextSibling())););if(!E||F>o)break;A=E.to+f,A>t&&(this.highlightRange(x.cursor(),Math.max(t,E.from+f),Math.min(o,A),"",C),this.startSpan(Math.min(o,A),g))}k&&e.parent()}else if(e.firstChild()){b&&(r="");do if(!(e.to<=t)){if(e.from>=o)break;this.highlightRange(e,t,o,r,a),this.startSpan(Math.min(o,e.to),g)}while(e.nextSibling());e.parent()}}}function fB(n){let e=n.type.prop(vS);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Re=Mo.define,wd=Re(),ur=Re(),bS=Re(ur),xS=Re(ur),dr=Re(),Sd=Re(dr),Gm=Re(dr),mi=Re(),ca=Re(mi),gi=Re(),Oi=Re(),Km=Re(),ac=Re(Km),Cd=Re(),fe={comment:wd,lineComment:Re(wd),blockComment:Re(wd),docComment:Re(wd),name:ur,variableName:Re(ur),typeName:bS,tagName:Re(bS),propertyName:xS,attributeName:Re(xS),className:Re(ur),labelName:Re(ur),namespace:Re(ur),macroName:Re(ur),literal:dr,string:Sd,docString:Re(Sd),character:Re(Sd),attributeValue:Re(Sd),number:Gm,integer:Re(Gm),float:Re(Gm),bool:Re(dr),regexp:Re(dr),escape:Re(dr),color:Re(dr),url:Re(dr),keyword:gi,self:Re(gi),null:Re(gi),atom:Re(gi),unit:Re(gi),modifier:Re(gi),operatorKeyword:Re(gi),controlKeyword:Re(gi),definitionKeyword:Re(gi),moduleKeyword:Re(gi),operator:Oi,derefOperator:Re(Oi),arithmeticOperator:Re(Oi),logicOperator:Re(Oi),bitwiseOperator:Re(Oi),compareOperator:Re(Oi),updateOperator:Re(Oi),definitionOperator:Re(Oi),typeOperator:Re(Oi),controlOperator:Re(Oi),punctuation:Km,separator:Re(Km),bracket:ac,angleBracket:Re(ac),squareBracket:Re(ac),paren:Re(ac),brace:Re(ac),content:mi,heading:ca,heading1:Re(ca),heading2:Re(ca),heading3:Re(ca),heading4:Re(ca),heading5:Re(ca),heading6:Re(ca),contentSeparator:Re(mi),list:Re(mi),quote:Re(mi),emphasis:Re(mi),strong:Re(mi),link:Re(mi),monospace:Re(mi),strikethrough:Re(mi),inserted:Re(),deleted:Re(),changed:Re(),invalid:Re(),meta:Cd,documentMeta:Re(Cd),annotation:Re(Cd),processingInstruction:Re(Cd),definition:Mo.defineModifier("definition"),constant:Mo.defineModifier("constant"),function:Mo.defineModifier("function"),standard:Mo.defineModifier("standard"),local:Mo.defineModifier("local"),special:Mo.defineModifier("special")};for(let n in fe){let e=fe[n];e instanceof Mo&&(e.name=n)}yS([{tag:fe.link,class:"tok-link"},{tag:fe.heading,class:"tok-heading"},{tag:fe.emphasis,class:"tok-emphasis"},{tag:fe.strong,class:"tok-strong"},{tag:fe.keyword,class:"tok-keyword"},{tag:fe.atom,class:"tok-atom"},{tag:fe.bool,class:"tok-bool"},{tag:fe.url,class:"tok-url"},{tag:fe.labelName,class:"tok-labelName"},{tag:fe.inserted,class:"tok-inserted"},{tag:fe.deleted,class:"tok-deleted"},{tag:fe.literal,class:"tok-literal"},{tag:fe.string,class:"tok-string"},{tag:fe.number,class:"tok-number"},{tag:[fe.regexp,fe.escape,fe.special(fe.string)],class:"tok-string2"},{tag:fe.variableName,class:"tok-variableName"},{tag:fe.local(fe.variableName),class:"tok-variableName tok-local"},{tag:fe.definition(fe.variableName),class:"tok-variableName tok-definition"},{tag:fe.special(fe.variableName),class:"tok-variableName2"},{tag:fe.definition(fe.propertyName),class:"tok-propertyName tok-definition"},{tag:fe.typeName,class:"tok-typeName"},{tag:fe.namespace,class:"tok-namespace"},{tag:fe.className,class:"tok-className"},{tag:fe.macroName,class:"tok-macroName"},{tag:fe.propertyName,class:"tok-propertyName"},{tag:fe.operator,class:"tok-operator"},{tag:fe.comment,class:"tok-comment"},{tag:fe.meta,class:"tok-meta"},{tag:fe.invalid,class:"tok-invalid"},{tag:fe.punctuation,class:"tok-punctuation"}]);var Jm;const ws=new dt;function wS(n){return Ve.define({combine:n?e=>e.concat(n):void 0})}const $m=new dt;class zo{constructor(e,t,o=[],r=""){this.data=e,this.name=r,ft.prototype.hasOwnProperty("tree")||Object.defineProperty(ft.prototype,"tree",{get(){return cn(this)}}),this.parser=t,this.extension=[fr.of(this),ft.languageData.of((a,l,f)=>{let h=SS(a,l,f),g=h.type.prop(ws);if(!g)return[];let O=a.facet(g),v=h.type.prop($m);if(v){let b=h.resolve(l-h.from,f);for(let x of v)if(x.test(b,a)){let C=a.facet(x.facet);return x.type=="replace"?C:C.concat(O)}}return O})].concat(o)}isActiveAt(e,t,o=-1){return SS(e,t,o).type.prop(ws)==this.data}findRegions(e){let t=e.facet(fr);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let o=[],r=(a,l)=>{if(a.prop(ws)==this.data){o.push({from:l,to:l+a.length});return}let f=a.prop(dt.mounted);if(f){if(f.tree.prop(ws)==this.data){if(f.overlay)for(let h of f.overlay)o.push({from:h.from+l,to:h.to+l});else o.push({from:l,to:l+a.length});return}else if(f.overlay){let h=o.length;if(r(f.tree,f.overlay[0].from+l),o.length>h)return}}for(let h=0;h<a.children.length;h++){let g=a.children[h];g instanceof nn&&r(g,a.positions[h]+l)}};return r(cn(e),0),o}get allowsNesting(){return!0}}zo.setState=it.define();function SS(n,e,t){let o=n.facet(fr),r=cn(n).topNode;if(!o||o.allowsNesting)for(let a=r;a;a=a.enter(e,t,ln.ExcludeBuffers))a.type.isTop&&(r=a);return r}class kd extends zo{constructor(e,t,o){super(e,t,[],o),this.parser=t}static define(e){let t=wS(e.languageData);return new kd(t,e.parser.configure({props:[ws.add(o=>o.isTop?t:void 0)]}),e.name)}configure(e,t){return new kd(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function cn(n){let e=n.field(zo.state,!1);return e?e.tree:nn.empty}class hB{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let o=this.cursorPos-this.string.length;return e<o||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-o,t-o)}}let sc=null;class Pd{constructor(e,t,o=[],r,a,l,f,h){this.parser=e,this.state=t,this.fragments=o,this.tree=r,this.treeLen=a,this.viewport=l,this.skipped=f,this.scheduleOn=h,this.parse=null,this.tempSkipped=[]}static create(e,t,o){return new Pd(e,t,[],nn.empty,0,o,[],null)}startParse(){return this.parser.startParse(new hB(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=nn.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var o;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped(la.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(o=this.parse.stoppedAt)!==null&&o!==void 0?o:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(la.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=sc;sc=this;try{return e()}finally{sc=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=CS(e,t.from,t.to);return e}changes(e,t){let{fragments:o,tree:r,treeLen:a,viewport:l,skipped:f}=this;if(this.takeTree(),!e.empty){let h=[];if(e.iterChangedRanges((g,O,v,b)=>h.push({fromA:g,toA:O,fromB:v,toB:b})),o=la.applyChanges(o,h),r=nn.empty,a=0,l={from:e.mapPos(l.from,-1),to:e.mapPos(l.to,1)},this.skipped.length){f=[];for(let g of this.skipped){let O=e.mapPos(g.from,1),v=e.mapPos(g.to,-1);O<v&&f.push({from:O,to:v})}}}return new Pd(this.parser,t,o,r,a,l,f,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let o=0;o<this.skipped.length;o++){let{from:r,to:a}=this.skipped[o];r<e.to&&a>e.from&&(this.fragments=CS(this.fragments,r,a),this.skipped.splice(o--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends gS{createParse(t,o,r){let a=r[0].from,l=r[r.length-1].to;return{parsedPos:a,advance(){let h=sc;if(h){for(let g of r)h.tempSkipped.push(g);e&&(h.scheduleOn=h.scheduleOn?Promise.all([h.scheduleOn,e]):e)}return this.parsedPos=l,new nn(qn.none,[],[],l-a)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return sc}}function CS(n,e,t){return la.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Ss{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),o=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,o)||t.takeTree(),new Ss(t)}static init(e){let t=Math.min(3e3,e.doc.length),o=Pd.create(e.facet(fr).parser,e,{from:0,to:t});return o.work(20,t)||o.takeTree(),new Ss(o)}}zo.state=pn.define({create:Ss.init,update(n,e){for(let t of e.effects)if(t.is(zo.setState))return t.value;return e.startState.facet(fr)!=e.state.facet(fr)?Ss.init(e.state):n.apply(e)}});let kS=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(kS=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const qm=typeof navigator<"u"&&(!((Jm=navigator.scheduling)===null||Jm===void 0)&&Jm.isInputPending)?()=>navigator.scheduling.isInputPending():null,pB=Xt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(zo.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(zo.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=kS(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:o,viewport:{to:r}}=this.view,a=o.field(zo.state);if(a.tree==a.context.tree&&a.context.isDone(r+1e5))return;let l=Date.now()+Math.min(this.chunkBudget,100,e&&!qm?Math.max(25,e.timeRemaining()-5):1e9),f=a.context.treeLen<r&&o.doc.length>r+1e3,h=a.context.work(()=>qm&&qm()||Date.now()>l,r+(f?0:1e5));this.chunkBudget-=Date.now()-t,(h||this.chunkBudget<=0)&&(a.context.takeTree(),this.view.dispatch({effects:zo.setState.of(new Ss(a.context))})),this.chunkBudget>0&&!(h&&!f)&&this.scheduleWork(),this.checkAsyncSchedule(a.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>$n(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),fr=Ve.define({combine(n){return n.length?n[0]:null},enables:n=>[zo.state,pB,Be.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class mB{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const gB=Ve.define(),lc=Ve.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function _d(n){let e=n.facet(lc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function cc(n,e){let t="",o=n.tabSize,r=n.facet(lc)[0];if(r==" "){for(;e>=o;)t+=" ",e-=o;r=" "}for(let a=0;a<e;a++)t+=r;return t}function eg(n,e){n instanceof ft&&(n=new Ed(n));for(let o of n.state.facet(gB)){let r=o(n,e);if(r!==void 0)return r}let t=cn(n.state);return t.length>=e?OB(n,t,e):null}class Ed{constructor(e,t={}){this.state=e,this.options=t,this.unit=_d(e)}lineAt(e,t=1){let o=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:a}=this.options;return r!=null&&r>=o.from&&r<=o.to?a&&r==e?{text:"",from:e}:(t<0?r<e:r<=e)?{text:o.text.slice(r-o.from),from:r}:{text:o.text.slice(0,r-o.from),from:o.from}:o}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:o,from:r}=this.lineAt(e,t);return o.slice(e-r,Math.min(o.length,e+100-r))}column(e,t=1){let{text:o,from:r}=this.lineAt(e,t),a=this.countColumn(o,e-r),l=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return l>-1&&(a+=l-this.countColumn(o,o.search(/\S|$/))),a}countColumn(e,t=e.length){return hs(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:o,from:r}=this.lineAt(e,t),a=this.options.overrideIndentation;if(a){let l=a(r);if(l>-1)return l}return this.countColumn(o,o.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const PS=new dt;function OB(n,e,t){let o=e.resolveStack(t),r=o.node.enterUnfinishedNodesBefore(t);if(r!=o.node){let a=[];for(let l=r;l!=o.node;l=l.parent)a.push(l);for(let l=a.length-1;l>=0;l--)o={node:a[l],next:o}}return _S(o,n,t)}function _S(n,e,t){for(let o=n;o;o=o.next){let r=yB(o.node);if(r)return r(tg.create(e,t,o))}return 0}function vB(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function yB(n){let e=n.type.prop(PS);if(e)return e;let t=n.firstChild,o;if(t&&(o=t.type.prop(dt.closedBy))){let r=n.lastChild,a=r&&o.indexOf(r.name)>-1;return l=>ES(l,!0,1,void 0,a&&!vB(l)?r.from:void 0)}return n.parent==null?bB:null}function bB(){return 0}class tg extends Ed{constructor(e,t,o){super(e.state,e.options),this.base=e,this.pos=t,this.context=o}get node(){return this.context.node}static create(e,t,o){return new tg(e,t,o)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let o=e.resolve(t.from);for(;o.parent&&o.parent.from==o.from;)o=o.parent;if(xB(o,e))break;t=this.state.doc.lineAt(o.from)}return this.lineIndent(t.from)}continue(){return _S(this.context.next,this.base,this.pos)}}function xB(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function wB(n){let e=n.node,t=e.childAfter(e.from),o=e.lastChild;if(!t)return null;let r=n.options.simulateBreak,a=n.state.doc.lineAt(t.from),l=r==null||r<=a.from?a.to:Math.min(a.to,r);for(let f=t.to;;){let h=e.childAfter(f);if(!h||h==o)return null;if(!h.type.isSkipped)return h.from<l?t:null;f=h.to}}function SB({closing:n,align:e=!0,units:t=1}){return o=>ES(o,e,t,n)}function ES(n,e,t,o,r){let a=n.textAfter,l=a.match(/^\s*/)[0].length,f=o&&a.slice(l,l+o.length)==o||r==n.pos+l,h=e?wB(n):null;return h?f?n.column(h.from):n.column(h.to):n.baseIndent+(f?0:n.unit*t)}const CB=n=>n.baseIndent;function ng({except:n,units:e=1}={}){return t=>{let o=n&&n.test(t.textAfter);return t.baseIndent+(o?0:e*t.unit)}}const kB=200;function PB(){return ft.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:o}=n.newSelection.main,r=t.lineAt(o);if(o>r.from+kB)return n;let a=t.sliceString(r.from,o);if(!e.some(g=>g.test(a)))return n;let{state:l}=n,f=-1,h=[];for(let{head:g}of l.selection.ranges){let O=l.doc.lineAt(g);if(O.from==f)continue;f=O.from;let v=eg(l,O.from);if(v==null)continue;let b=/^\s*/.exec(O.text)[0],x=cc(l,v);b!=x&&h.push({from:O.from,to:O.from+b.length,insert:x})}return h.length?[n,{changes:h,sequential:!0}]:n})}const _B=Ve.define(),TS=new dt;function EB(n){let e=n.firstChild,t=n.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?n.to:t.from}:null}function TB(n,e,t){let o=cn(n);if(o.length<t)return null;let r=o.resolveStack(t,1),a=null;for(let l=r;l;l=l.next){let f=l.node;if(f.to<=t||f.from>t)continue;if(a&&f.from<e)break;let h=f.type.prop(TS);if(h&&(f.to<o.length-50||o.length==n.doc.length||!NB(f))){let g=h(f,n);g&&g.from<=t&&g.from>=e&&g.to>t&&(a=g)}}return a}function NB(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function Td(n,e,t){for(let o of n.facet(_B)){let r=o(n,e,t);if(r)return r}return TB(n,e,t)}function NS(n,e){let t=e.mapPos(n.from,1),o=e.mapPos(n.to,-1);return t>=o?void 0:{from:t,to:o}}const Nd=it.define({map:NS}),uc=it.define({map:NS});function AS(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(o=>o.from<=t&&o.to>=t)||e.push(n.lineBlockAt(t));return e}const ua=pn.define({create(){return Ye.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(Nd)&&!AB(n,t.value.from,t.value.to)){let{preparePlaceholder:o}=e.state.facet(IS),r=o?Ye.replace({widget:new DB(o(e.state,t.value))}):BS;n=n.update({add:[r.range(t.value.from,t.value.to)]})}else t.is(uc)&&(n=n.update({filter:(o,r)=>t.value.from!=o||t.value.to!=r,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:o}=e.selection.main;n.between(o,o,(r,a)=>{r<o&&a>o&&(t=!0)}),t&&(n=n.update({filterFrom:o,filterTo:o,filter:(r,a)=>a<=o||r>=o}))}return n},provide:n=>Be.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(o,r)=>{t.push(o,r)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<n.length;){let o=n[t++],r=n[t++];if(typeof o!="number"||typeof r!="number")throw new RangeError("Invalid JSON for fold state");e.push(BS.range(o,r))}return Ye.set(e,!0)}});function Ad(n,e,t){var o;let r=null;return(o=n.field(ua,!1))===null||o===void 0||o.between(e,t,(a,l)=>{(!r||r.from>a)&&(r={from:a,to:l})}),r}function AB(n,e,t){let o=!1;return n.between(e,e,(r,a)=>{r==e&&a==t&&(o=!0)}),o}function MS(n,e){return n.field(ua,!1)?e:e.concat(it.appendConfig.of(QS()))}const MB=n=>{for(let e of AS(n)){let t=Td(n.state,e.from,e.to);if(t)return n.dispatch({effects:MS(n.state,[Nd.of(t),RS(n,t)])}),!0}return!1},RB=n=>{if(!n.state.field(ua,!1))return!1;let e=[];for(let t of AS(n)){let o=Ad(n.state,t.from,t.to);o&&e.push(uc.of(o),RS(n,o,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function RS(n,e,t=!0){let o=n.state.doc.lineAt(e.from).number,r=n.state.doc.lineAt(e.to).number;return Be.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${o} ${n.state.phrase("to")} ${r}.`)}const IB=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:MB},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:RB},{key:"Ctrl-Alt-[",run:n=>{let{state:e}=n,t=[];for(let o=0;o<e.doc.length;){let r=n.lineBlockAt(o),a=Td(e,r.from,r.to);a&&t.push(Nd.of(a)),o=(a?n.lineBlockAt(a.to):r).to+1}return t.length&&n.dispatch({effects:MS(n.state,t)}),!!t.length}},{key:"Ctrl-Alt-]",run:n=>{let e=n.state.field(ua,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(o,r)=>{t.push(uc.of({from:o,to:r}))}),n.dispatch({effects:t}),!0}}],QB={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},IS=Ve.define({combine(n){return ui(n,QB)}});function QS(n){return[ua,VB]}function DS(n,e){let{state:t}=n,o=t.facet(IS),r=l=>{let f=n.lineBlockAt(n.posAtDOM(l.target)),h=Ad(n.state,f.from,f.to);h&&n.dispatch({effects:uc.of(h)}),l.preventDefault()};if(o.placeholderDOM)return o.placeholderDOM(n,r,e);let a=document.createElement("span");return a.textContent=o.placeholderText,a.setAttribute("aria-label",t.phrase("folded code")),a.title=t.phrase("unfold"),a.className="cm-foldPlaceholder",a.onclick=r,a}const BS=Ye.replace({widget:new class extends di{toDOM(n){return DS(n,null)}}});class DB extends di{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return DS(e,this.value)}}const BB={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class og extends Di{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function LB(n={}){let e=Object.assign(Object.assign({},BB),n),t=new og(e,!0),o=new og(e,!1),r=Xt.fromClass(class{constructor(l){this.from=l.viewport.from,this.markers=this.buildMarkers(l)}update(l){(l.docChanged||l.viewportChanged||l.startState.facet(fr)!=l.state.facet(fr)||l.startState.field(ua,!1)!=l.state.field(ua,!1)||cn(l.startState)!=cn(l.state)||e.foldingChanged(l))&&(this.markers=this.buildMarkers(l.view))}buildMarkers(l){let f=new tr;for(let h of l.viewportLineBlocks){let g=Ad(l.state,h.from,h.to)?o:Td(l.state,h.from,h.to)?t:null;g&&f.add(h.from,h.from,g)}return f.finish()}}),{domEventHandlers:a}=e;return[r,jD({class:"cm-foldGutter",markers(l){var f;return((f=l.plugin(r))===null||f===void 0?void 0:f.markers)||vt.empty},initialSpacer(){return new og(e,!1)},domEventHandlers:Object.assign(Object.assign({},a),{click:(l,f,h)=>{if(a.click&&a.click(l,f,h))return!0;let g=Ad(l.state,f.from,f.to);if(g)return l.dispatch({effects:uc.of(g)}),!0;let O=Td(l.state,f.from,f.to);return O?(l.dispatch({effects:Nd.of(O)}),!0):!1}})}),QS()]}const VB=Be.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Md{constructor(e,t){this.specs=e;let o;function r(f){let h=nr.newName();return(o||(o=Object.create(null)))["."+h]=f,h}const a=typeof t.all=="string"?t.all:t.all?r(t.all):void 0,l=t.scope;this.scope=l instanceof zo?f=>f.prop(ws)==l.data:l?f=>f==l:void 0,this.style=yS(e.map(f=>({tag:f.tag,class:f.class||r(Object.assign({},f,{tag:null}))})),{all:a}).style,this.module=o?new nr(o):null,this.themeType=t.themeType}static define(e,t){return new Md(e,t||{})}}const ig=Ve.define(),LS=Ve.define({combine(n){return n.length?[n[0]]:null}});function rg(n){let e=n.facet(ig);return e.length?e:n.facet(LS)}function jB(n,e){let t=[ZB],o;return n instanceof Md&&(n.module&&t.push(Be.styleModule.of(n.module)),o=n.themeType),e?.fallback?t.push(LS.of(n)):o?t.push(ig.computeN([Be.darkTheme],r=>r.facet(Be.darkTheme)==(o=="dark")?[n]:[])):t.push(ig.of(n)),t}class FB{constructor(e){this.markCache=Object.create(null),this.tree=cn(e.state),this.decorations=this.buildDeco(e,rg(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=cn(e.state),o=rg(e.state),r=o!=rg(e.startState),{viewport:a}=e.view,l=e.changes.mapPos(this.decoratedTo,1);t.length<a.to&&!r&&t.type==this.tree.type&&l>=a.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=l):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,o),this.decoratedTo=a.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ye.none;let o=new tr;for(let{from:r,to:a}of e.visibleRanges)uB(this.tree,t,(l,f,h)=>{o.add(l,f,this.markCache[h]||(this.markCache[h]=Ye.mark({class:h})))},r,a);return o.finish()}}const ZB=er.high(Xt.fromClass(FB,{decorations:n=>n.decorations})),WB=Md.define([{tag:fe.meta,color:"#404740"},{tag:fe.link,textDecoration:"underline"},{tag:fe.heading,textDecoration:"underline",fontWeight:"bold"},{tag:fe.emphasis,fontStyle:"italic"},{tag:fe.strong,fontWeight:"bold"},{tag:fe.strikethrough,textDecoration:"line-through"},{tag:fe.keyword,color:"#708"},{tag:[fe.atom,fe.bool,fe.url,fe.contentSeparator,fe.labelName],color:"#219"},{tag:[fe.literal,fe.inserted],color:"#164"},{tag:[fe.string,fe.deleted],color:"#a11"},{tag:[fe.regexp,fe.escape,fe.special(fe.string)],color:"#e40"},{tag:fe.definition(fe.variableName),color:"#00f"},{tag:fe.local(fe.variableName),color:"#30a"},{tag:[fe.typeName,fe.namespace],color:"#085"},{tag:fe.className,color:"#167"},{tag:[fe.special(fe.variableName),fe.macroName],color:"#256"},{tag:fe.definition(fe.propertyName),color:"#00c"},{tag:fe.comment,color:"#940"},{tag:fe.invalid,color:"#f00"}]),zB=Be.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),VS=1e4,jS="()[]{}",FS=Ve.define({combine(n){return ui(n,{afterCursor:!0,brackets:jS,maxScanDistance:VS,renderMatch:YB})}}),UB=Ye.mark({class:"cm-matchingBracket"}),HB=Ye.mark({class:"cm-nonmatchingBracket"});function YB(n){let e=[],t=n.matched?UB:HB;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const XB=[pn.define({create(){return Ye.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],o=e.state.facet(FS);for(let r of e.state.selection.ranges){if(!r.empty)continue;let a=vi(e.state,r.head,-1,o)||r.head>0&&vi(e.state,r.head-1,1,o)||o.afterCursor&&(vi(e.state,r.head,1,o)||r.head<e.state.doc.length&&vi(e.state,r.head+1,-1,o));a&&(t=t.concat(o.renderMatch(a,e.state)))}return Ye.set(t,!0)},provide:n=>Be.decorations.from(n)}),zB];function GB(n={}){return[FS.of(n),XB]}const KB=new dt;function ag(n,e,t){let o=n.prop(e<0?dt.openedBy:dt.closedBy);if(o)return o;if(n.name.length==1){let r=t.indexOf(n.name);if(r>-1&&r%2==(e<0?1:0))return[t[r+e]]}return null}function sg(n){let e=n.type.prop(KB);return e?e(n.node):n}function vi(n,e,t,o={}){let r=o.maxScanDistance||VS,a=o.brackets||jS,l=cn(n),f=l.resolveInner(e,t);for(let h=f;h;h=h.parent){let g=ag(h.type,t,a);if(g&&h.from<h.to){let O=sg(h);if(O&&(t>0?e>=O.from&&e<O.to:e>O.from&&e<=O.to))return JB(n,e,t,h,O,g,a)}}return $B(n,e,t,l,f.type,r,a)}function JB(n,e,t,o,r,a,l){let f=o.parent,h={from:r.from,to:r.to},g=0,O=f?.cursor();if(O&&(t<0?O.childBefore(o.from):O.childAfter(o.to)))do if(t<0?O.to<=o.from:O.from>=o.to){if(g==0&&a.indexOf(O.type.name)>-1&&O.from<O.to){let v=sg(O);return{start:h,end:v?{from:v.from,to:v.to}:void 0,matched:!0}}else if(ag(O.type,t,l))g++;else if(ag(O.type,-t,l)){if(g==0){let v=sg(O);return{start:h,end:v&&v.from<v.to?{from:v.from,to:v.to}:void 0,matched:!1}}g--}}while(t<0?O.prevSibling():O.nextSibling());return{start:h,matched:!1}}function $B(n,e,t,o,r,a,l){let f=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),h=l.indexOf(f);if(h<0||h%2==0!=t>0)return null;let g={from:t<0?e-1:e,to:t>0?e+1:e},O=n.doc.iterRange(e,t>0?n.doc.length:0),v=0;for(let b=0;!O.next().done&&b<=a;){let x=O.value;t<0&&(b+=x.length);let C=e+b*t;for(let k=t>0?0:x.length-1,L=t>0?x.length:-1;k!=L;k+=t){let A=l.indexOf(x[k]);if(!(A<0||o.resolveInner(C+k,1).type!=r))if(A%2==0==t>0)v++;else{if(v==1)return{start:g,end:{from:C+k,to:C+k+1},matched:A>>1==h>>1};v--}}t>0&&(b+=x.length)}return O.done?{start:g,matched:!1}:null}const qB=Object.create(null),ZS=[qn.none],WS=[],zS=Object.create(null),eL=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])eL[n]=tL(qB,e);function lg(n,e){WS.indexOf(n)>-1||(WS.push(n),console.warn(e))}function tL(n,e){let t=[];for(let f of e.split(" ")){let h=[];for(let g of f.split(".")){let O=n[g]||fe[g];O?typeof O=="function"?h.length?h=h.map(O):lg(g,`Modifier ${g} used at start of tag`):h.length?lg(g,`Tag ${g} used as modifier`):h=Array.isArray(O)?O:[O]:lg(g,`Unknown highlighting tag ${g}`)}for(let g of h)t.push(g)}if(!t.length)return 0;let o=e.replace(/ /g,"_"),r=o+" "+t.map(f=>f.id),a=zS[r];if(a)return a.id;let l=zS[r]=qn.define({id:ZS.length,name:o,props:[OS({[o]:t})]});return ZS.push(l),l.id}At.RTL,At.LTR;const nL=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),o=ug(n.state,t.from);return o.line?oL(n):o.block?rL(n):!1};function cg(n,e){return({state:t,dispatch:o})=>{if(t.readOnly)return!1;let r=n(e,t);return r?(o(t.update(r)),!0):!1}}const oL=cg(lL,0),iL=cg(US,0),rL=cg((n,e)=>US(n,e,sL(e)),0);function ug(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const dc=50;function aL(n,{open:e,close:t},o,r){let a=n.sliceDoc(o-dc,o),l=n.sliceDoc(r,r+dc),f=/\s*$/.exec(a)[0].length,h=/^\s*/.exec(l)[0].length,g=a.length-f;if(a.slice(g-e.length,g)==e&&l.slice(h,h+t.length)==t)return{open:{pos:o-f,margin:f&&1},close:{pos:r+h,margin:h&&1}};let O,v;r-o<=2*dc?O=v=n.sliceDoc(o,r):(O=n.sliceDoc(o,o+dc),v=n.sliceDoc(r-dc,r));let b=/^\s*/.exec(O)[0].length,x=/\s*$/.exec(v)[0].length,C=v.length-x-t.length;return O.slice(b,b+e.length)==e&&v.slice(C,C+t.length)==t?{open:{pos:o+b+e.length,margin:/\s/.test(O.charAt(b+e.length))?1:0},close:{pos:r-x-t.length,margin:/\s/.test(v.charAt(C-1))?1:0}}:null}function sL(n){let e=[];for(let t of n.selection.ranges){let o=n.doc.lineAt(t.from),r=t.to<=o.to?o:n.doc.lineAt(t.to),a=e.length-1;a>=0&&e[a].to>o.from?e[a].to=r.to:e.push({from:o.from+/^\s*/.exec(o.text)[0].length,to:r.to})}return e}function US(n,e,t=e.selection.ranges){let o=t.map(a=>ug(e,a.from).block);if(!o.every(a=>a))return null;let r=t.map((a,l)=>aL(e,o[l],a.from,a.to));if(n!=2&&!r.every(a=>a))return{changes:e.changes(t.map((a,l)=>r[l]?[]:[{from:a.from,insert:o[l].open+" "},{from:a.to,insert:" "+o[l].close}]))};if(n!=1&&r.some(a=>a)){let a=[];for(let l=0,f;l<r.length;l++)if(f=r[l]){let h=o[l],{open:g,close:O}=f;a.push({from:g.pos-h.open.length,to:g.pos+g.margin},{from:O.pos-O.margin,to:O.pos+h.close.length})}return{changes:a}}return null}function lL(n,e,t=e.selection.ranges){let o=[],r=-1;for(let{from:a,to:l}of t){let f=o.length,h=1e9,g=ug(e,a).line;if(g){for(let O=a;O<=l;){let v=e.doc.lineAt(O);if(v.from>r&&(a==l||l>v.from)){r=v.from;let b=/^\s*/.exec(v.text)[0].length,x=b==v.length,C=v.text.slice(b,b+g.length)==g?b:-1;b<v.text.length&&b<h&&(h=b),o.push({line:v,comment:C,token:g,indent:b,empty:x,single:!1})}O=v.to+1}if(h<1e9)for(let O=f;O<o.length;O++)o[O].indent<o[O].line.text.length&&(o[O].indent=h);o.length==f+1&&(o[f].single=!0)}}if(n!=2&&o.some(a=>a.comment<0&&(!a.empty||a.single))){let a=[];for(let{line:f,token:h,indent:g,empty:O,single:v}of o)(v||!O)&&a.push({from:f.from+g,insert:h+" "});let l=e.changes(a);return{changes:l,selection:e.selection.map(l,1)}}else if(n!=1&&o.some(a=>a.comment>=0)){let a=[];for(let{line:l,comment:f,token:h}of o)if(f>=0){let g=l.from+f,O=g+h.length;l.text[O-l.from]==" "&&O++,a.push({from:g,to:O})}return{changes:a}}return null}const dg=Mi.define(),cL=Mi.define(),uL=Ve.define(),HS=Ve.define({combine(n){return ui(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(o,r)=>e(o,r)||t(o,r)})}}),YS=pn.define({create(){return yi.empty},update(n,e){let t=e.state.facet(HS),o=e.annotation(dg);if(o){let h=to.fromTransaction(e,o.selection),g=o.side,O=g==0?n.undone:n.done;return h?O=Id(O,O.length,t.minDepth,h):O=KS(O,e.startState.selection),new yi(g==0?o.rest:O,g==0?O:o.rest)}let r=e.annotation(cL);if((r=="full"||r=="before")&&(n=n.isolate()),e.annotation(en.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let a=to.fromTransaction(e),l=e.annotation(en.time),f=e.annotation(en.userEvent);return a?n=n.addChanges(a,l,f,t,e):e.selection&&(n=n.addSelection(e.startState.selection,l,f,t.newGroupDelay)),(r=="full"||r=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new yi(n.done.map(to.fromJSON),n.undone.map(to.fromJSON))}});function dL(n={}){return[YS,HS.of(n),Be.domEventHandlers({beforeinput(e,t){let o=e.inputType=="historyUndo"?XS:e.inputType=="historyRedo"?fg:null;return o?(e.preventDefault(),o(t)):!1}})]}function Rd(n,e){return function({state:t,dispatch:o}){if(!e&&t.readOnly)return!1;let r=t.field(YS,!1);if(!r)return!1;let a=r.pop(n,t,e);return a?(o(a),!0):!1}}const XS=Rd(0,!1),fg=Rd(1,!1),fL=Rd(0,!0),hL=Rd(1,!0);class to{constructor(e,t,o,r,a){this.changes=e,this.effects=t,this.mapped=o,this.startSelection=r,this.selectionsAfter=a}setSelAfter(e){return new to(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,o;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(o=this.startSelection)===null||o===void 0?void 0:o.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new to(e.changes&&sn.fromJSON(e.changes),[],e.mapped&&ci.fromJSON(e.mapped),e.startSelection&&ve.fromJSON(e.startSelection),e.selectionsAfter.map(ve.fromJSON))}static fromTransaction(e,t){let o=Ro;for(let r of e.startState.facet(uL)){let a=r(e);a.length&&(o=o.concat(a))}return!o.length&&e.changes.empty?null:new to(e.changes.invert(e.startState.doc),o,void 0,t||e.startState.selection,Ro)}static selection(e){return new to(void 0,Ro,void 0,void 0,e)}}function Id(n,e,t,o){let r=e+1>t+20?e-t-1:0,a=n.slice(r,e);return a.push(o),a}function pL(n,e){let t=[],o=!1;return n.iterChangedRanges((r,a)=>t.push(r,a)),e.iterChangedRanges((r,a,l,f)=>{for(let h=0;h<t.length;){let g=t[h++],O=t[h++];f>=g&&l<=O&&(o=!0)}}),o}function mL(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,o)=>t.empty!=e.ranges[o].empty).length===0}function GS(n,e){return n.length?e.length?n.concat(e):n:e}const Ro=[],gL=200;function KS(n,e){if(n.length){let t=n[n.length-1],o=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-gL));return o.length&&o[o.length-1].eq(e)?n:(o.push(e),Id(n,n.length-1,1e9,t.setSelAfter(o)))}else return[to.selection([e])]}function OL(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function hg(n,e){if(!n.length)return n;let t=n.length,o=Ro;for(;t;){let r=vL(n[t-1],e,o);if(r.changes&&!r.changes.empty||r.effects.length){let a=n.slice(0,t);return a[t-1]=r,a}else e=r.mapped,t--,o=r.selectionsAfter}return o.length?[to.selection(o)]:Ro}function vL(n,e,t){let o=GS(n.selectionsAfter.length?n.selectionsAfter.map(f=>f.map(e)):Ro,t);if(!n.changes)return to.selection(o);let r=n.changes.map(e),a=e.mapDesc(n.changes,!0),l=n.mapped?n.mapped.composeDesc(a):a;return new to(r,it.mapEffects(n.effects,e),l,n.startSelection.map(a),o)}const yL=/^(input\.type|delete)($|\.)/;class yi{constructor(e,t,o=0,r=void 0){this.done=e,this.undone=t,this.prevTime=o,this.prevUserEvent=r}isolate(){return this.prevTime?new yi(this.done,this.undone):this}addChanges(e,t,o,r,a){let l=this.done,f=l[l.length-1];return f&&f.changes&&!f.changes.empty&&e.changes&&(!o||yL.test(o))&&(!f.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(a,pL(f.changes,e.changes))||o=="input.type.compose")?l=Id(l,l.length-1,r.minDepth,new to(e.changes.compose(f.changes),GS(it.mapEffects(e.effects,f.changes),f.effects),f.mapped,f.startSelection,Ro)):l=Id(l,l.length,r.minDepth,e),new yi(l,Ro,t,o)}addSelection(e,t,o,r){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:Ro;return a.length>0&&t-this.prevTime<r&&o==this.prevUserEvent&&o&&/^select($|\.)/.test(o)&&mL(a[a.length-1],e)?this:new yi(KS(this.done,e),this.undone,t,o)}addMapping(e){return new yi(hg(this.done,e),hg(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,o){let r=e==0?this.done:this.undone;if(r.length==0)return null;let a=r[r.length-1],l=a.selectionsAfter[0]||t.selection;if(o&&a.selectionsAfter.length)return t.update({selection:a.selectionsAfter[a.selectionsAfter.length-1],annotations:dg.of({side:e,rest:OL(r),selection:l}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(a.changes){let f=r.length==1?Ro:r.slice(0,r.length-1);return a.mapped&&(f=hg(f,a.mapped)),t.update({changes:a.changes,selection:a.startSelection,effects:a.effects,annotations:dg.of({side:e,rest:f,selection:l}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}yi.empty=new yi(Ro,Ro);const bL=[{key:"Mod-z",run:XS,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:fg,preventDefault:!0},{linux:"Ctrl-Shift-z",run:fg,preventDefault:!0},{key:"Mod-u",run:fL,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:hL,preventDefault:!0}];function Cs(n,e){return ve.create(n.ranges.map(e),n.mainIndex)}function bi(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Uo({state:n,dispatch:e},t){let o=Cs(n.selection,t);return o.eq(n.selection,!0)?!1:(e(bi(n,o)),!0)}function Qd(n,e){return ve.cursor(e?n.to:n.from)}function JS(n,e){return Uo(n,t=>t.empty?n.moveByChar(t,e):Qd(t,e))}function Ln(n){return n.textDirectionAt(n.state.selection.main.head)==At.LTR}const $S=n=>JS(n,!Ln(n)),qS=n=>JS(n,Ln(n));function eC(n,e){return Uo(n,t=>t.empty?n.moveByGroup(t,e):Qd(t,e))}const xL=n=>eC(n,!Ln(n)),wL=n=>eC(n,Ln(n));function SL(n,e,t){if(e.type.prop(t))return!0;let o=e.to-e.from;return o&&(o>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Dd(n,e,t){let o=cn(n).resolveInner(e.head),r=t?dt.closedBy:dt.openedBy;for(let h=e.head;;){let g=t?o.childAfter(h):o.childBefore(h);if(!g)break;SL(n,g,r)?o=g:h=t?g.to:g.from}let a=o.type.prop(r),l,f;return a&&(l=t?vi(n,o.from,1):vi(n,o.to,-1))&&l.matched?f=t?l.end.to:l.end.from:f=t?o.to:o.from,ve.cursor(f,t?-1:1)}const CL=n=>Uo(n,e=>Dd(n.state,e,!Ln(n))),kL=n=>Uo(n,e=>Dd(n.state,e,Ln(n)));function tC(n,e){return Uo(n,t=>{if(!t.empty)return Qd(t,e);let o=n.moveVertically(t,e);return o.head!=t.head?o:n.moveToLineBoundary(t,e)})}const nC=n=>tC(n,!1),oC=n=>tC(n,!0);function iC(n){let e=n.scrollDOM.clientHeight<n.scrollDOM.scrollHeight-2,t=0,o=0,r;if(e){for(let a of n.state.facet(Be.scrollMargins)){let l=a(n);l?.top&&(t=Math.max(l?.top,t)),l?.bottom&&(o=Math.max(l?.bottom,o))}r=n.scrollDOM.clientHeight-t-o}else r=(n.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:o,selfScroll:e,height:Math.max(n.defaultLineHeight,r-5)}}function rC(n,e){let t=iC(n),{state:o}=n,r=Cs(o.selection,l=>l.empty?n.moveVertically(l,e,t.height):Qd(l,e));if(r.eq(o.selection))return!1;let a;if(t.selfScroll){let l=n.coordsAtPos(o.selection.main.head),f=n.scrollDOM.getBoundingClientRect(),h=f.top+t.marginTop,g=f.bottom-t.marginBottom;l&&l.top>h&&l.bottom<g&&(a=Be.scrollIntoView(r.main.head,{y:"start",yMargin:l.top-h}))}return n.dispatch(bi(o,r),{effects:a}),!0}const aC=n=>rC(n,!1),pg=n=>rC(n,!0);function hr(n,e,t){let o=n.lineBlockAt(e.head),r=n.moveToLineBoundary(e,t);if(r.head==e.head&&r.head!=(t?o.to:o.from)&&(r=n.moveToLineBoundary(e,t,!1)),!t&&r.head==o.from&&o.length){let a=/^\s*/.exec(n.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;a&&e.head!=o.from+a&&(r=ve.cursor(o.from+a))}return r}const PL=n=>Uo(n,e=>hr(n,e,!0)),_L=n=>Uo(n,e=>hr(n,e,!1)),EL=n=>Uo(n,e=>hr(n,e,!Ln(n))),TL=n=>Uo(n,e=>hr(n,e,Ln(n))),NL=n=>Uo(n,e=>ve.cursor(n.lineBlockAt(e.head).from,1)),AL=n=>Uo(n,e=>ve.cursor(n.lineBlockAt(e.head).to,-1));function ML(n,e,t){let o=!1,r=Cs(n.selection,a=>{let l=vi(n,a.head,-1)||vi(n,a.head,1)||a.head>0&&vi(n,a.head-1,1)||a.head<n.doc.length&&vi(n,a.head+1,-1);if(!l||!l.end)return a;o=!0;let f=l.start.from==a.head?l.end.to:l.end.from;return ve.cursor(f)});return o?(e(bi(n,r)),!0):!1}const RL=({state:n,dispatch:e})=>ML(n,e);function Io(n,e){let t=Cs(n.state.selection,o=>{let r=e(o);return ve.range(o.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(bi(n.state,t)),!0)}function sC(n,e){return Io(n,t=>n.moveByChar(t,e))}const lC=n=>sC(n,!Ln(n)),cC=n=>sC(n,Ln(n));function uC(n,e){return Io(n,t=>n.moveByGroup(t,e))}const IL=n=>uC(n,!Ln(n)),QL=n=>uC(n,Ln(n)),DL=n=>Io(n,e=>Dd(n.state,e,!Ln(n))),BL=n=>Io(n,e=>Dd(n.state,e,Ln(n)));function dC(n,e){return Io(n,t=>n.moveVertically(t,e))}const fC=n=>dC(n,!1),hC=n=>dC(n,!0);function pC(n,e){return Io(n,t=>n.moveVertically(t,e,iC(n).height))}const mC=n=>pC(n,!1),gC=n=>pC(n,!0),LL=n=>Io(n,e=>hr(n,e,!0)),VL=n=>Io(n,e=>hr(n,e,!1)),jL=n=>Io(n,e=>hr(n,e,!Ln(n))),FL=n=>Io(n,e=>hr(n,e,Ln(n))),ZL=n=>Io(n,e=>ve.cursor(n.lineBlockAt(e.head).from)),WL=n=>Io(n,e=>ve.cursor(n.lineBlockAt(e.head).to)),OC=({state:n,dispatch:e})=>(e(bi(n,{anchor:0})),!0),vC=({state:n,dispatch:e})=>(e(bi(n,{anchor:n.doc.length})),!0),yC=({state:n,dispatch:e})=>(e(bi(n,{anchor:n.selection.main.anchor,head:0})),!0),bC=({state:n,dispatch:e})=>(e(bi(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),zL=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),UL=({state:n,dispatch:e})=>{let t=Ld(n).map(({from:o,to:r})=>ve.range(o,Math.min(r+1,n.doc.length)));return e(n.update({selection:ve.create(t),userEvent:"select"})),!0},HL=({state:n,dispatch:e})=>{let t=Cs(n.selection,o=>{let r=cn(n),a=r.resolveStack(o.from,1);if(o.empty){let l=r.resolveStack(o.from,-1);l.node.from>=a.node.from&&l.node.to<=a.node.to&&(a=l)}for(let l=a;l;l=l.next){let{node:f}=l;if((f.from<o.from&&f.to>=o.to||f.to>o.to&&f.from<=o.from)&&l.next)return ve.range(f.to,f.from)}return o});return t.eq(n.selection)?!1:(e(bi(n,t)),!0)},YL=({state:n,dispatch:e})=>{let t=n.selection,o=null;return t.ranges.length>1?o=ve.create([t.main]):t.main.empty||(o=ve.create([ve.cursor(t.main.head)])),o?(e(bi(n,o)),!0):!1};function fc(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:o}=n,r=o.changeByRange(a=>{let{from:l,to:f}=a;if(l==f){let h=e(a);h<l?(t="delete.backward",h=Bd(n,h,!1)):h>l&&(t="delete.forward",h=Bd(n,h,!0)),l=Math.min(l,h),f=Math.max(f,h)}else l=Bd(n,l,!1),f=Bd(n,f,!0);return l==f?{range:a}:{changes:{from:l,to:f},range:ve.cursor(l,l<a.head?-1:1)}});return r.changes.empty?!1:(n.dispatch(o.update(r,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?Be.announce.of(o.phrase("Selection deleted")):void 0})),!0)}function Bd(n,e,t){if(n instanceof Be)for(let o of n.state.facet(Be.atomicRanges).map(r=>r(n)))o.between(e,e,(r,a)=>{r<e&&a>e&&(e=t?a:r)});return e}const xC=(n,e,t)=>fc(n,o=>{let r=o.from,{state:a}=n,l=a.doc.lineAt(r),f,h;if(t&&!e&&r>l.from&&r<l.from+200&&!/[^ \t]/.test(f=l.text.slice(0,r-l.from))){if(f[f.length-1]==" ")return r-1;let g=hs(f,a.tabSize),O=g%_d(a)||_d(a);for(let v=0;v<O&&f[f.length-1-v]==" ";v++)r--;h=r}else h=Sn(l.text,r-l.from,e,e)+l.from,h==r&&l.number!=(e?a.doc.lines:1)?h+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(l.text.slice(h-l.from,r-l.from))&&(h=Sn(l.text,h-l.from,!1,!1)+l.from);return h}),mg=n=>xC(n,!1,!0),wC=n=>xC(n,!0,!1),SC=(n,e)=>fc(n,t=>{let o=t.head,{state:r}=n,a=r.doc.lineAt(o),l=r.charCategorizer(o);for(let f=null;;){if(o==(e?a.to:a.from)){o==t.head&&a.number!=(e?r.doc.lines:1)&&(o+=e?1:-1);break}let h=Sn(a.text,o-a.from,e)+a.from,g=a.text.slice(Math.min(o,h)-a.from,Math.max(o,h)-a.from),O=l(g);if(f!=null&&O!=f)break;(g!=" "||o!=t.head)&&(f=O),o=h}return o}),CC=n=>SC(n,!1),XL=n=>SC(n,!0),GL=n=>fc(n,e=>{let t=n.lineBlockAt(e.head).to;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),KL=n=>fc(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),JL=n=>fc(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),$L=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(o=>({changes:{from:o.from,to:o.to,insert:Ot.of(["",""])},range:ve.cursor(o.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},qL=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(o=>{if(!o.empty||o.from==0||o.from==n.doc.length)return{range:o};let r=o.from,a=n.doc.lineAt(r),l=r==a.from?r-1:Sn(a.text,r-a.from,!1)+a.from,f=r==a.to?r+1:Sn(a.text,r-a.from,!0)+a.from;return{changes:{from:l,to:f,insert:n.doc.slice(r,f).append(n.doc.slice(l,r))},range:ve.cursor(f)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ld(n){let e=[],t=-1;for(let o of n.selection.ranges){let r=n.doc.lineAt(o.from),a=n.doc.lineAt(o.to);if(!o.empty&&o.to==a.from&&(a=n.doc.lineAt(o.to-1)),t>=r.number){let l=e[e.length-1];l.to=a.to,l.ranges.push(o)}else e.push({from:r.from,to:a.to,ranges:[o]});t=a.number+1}return e}function kC(n,e,t){if(n.readOnly)return!1;let o=[],r=[];for(let a of Ld(n)){if(t?a.to==n.doc.length:a.from==0)continue;let l=n.doc.lineAt(t?a.to+1:a.from-1),f=l.length+1;if(t){o.push({from:a.to,to:l.to},{from:a.from,insert:l.text+n.lineBreak});for(let h of a.ranges)r.push(ve.range(Math.min(n.doc.length,h.anchor+f),Math.min(n.doc.length,h.head+f)))}else{o.push({from:l.from,to:a.from},{from:a.to,insert:n.lineBreak+l.text});for(let h of a.ranges)r.push(ve.range(h.anchor-f,h.head-f))}}return o.length?(e(n.update({changes:o,scrollIntoView:!0,selection:ve.create(r,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const eV=({state:n,dispatch:e})=>kC(n,e,!1),tV=({state:n,dispatch:e})=>kC(n,e,!0);function PC(n,e,t){if(n.readOnly)return!1;let o=[];for(let r of Ld(n))t?o.push({from:r.from,insert:n.doc.slice(r.from,r.to)+n.lineBreak}):o.push({from:r.to,insert:n.lineBreak+n.doc.slice(r.from,r.to)});return e(n.update({changes:o,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const nV=({state:n,dispatch:e})=>PC(n,e,!1),oV=({state:n,dispatch:e})=>PC(n,e,!0),iV=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Ld(e).map(({from:r,to:a})=>(r>0?r--:a<e.doc.length&&a++,{from:r,to:a}))),o=Cs(e.selection,r=>{let a;if(n.lineWrapping){let l=n.lineBlockAt(r.head),f=n.coordsAtPos(r.head,r.assoc||1);f&&(a=l.bottom+n.documentTop-f.bottom+n.defaultLineHeight/2)}return n.moveVertically(r,!0,a)}).map(t);return n.dispatch({changes:t,selection:o,scrollIntoView:!0,userEvent:"delete.line"}),!0};function rV(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=cn(n).resolveInner(e),o=t.childBefore(e),r=t.childAfter(e),a;return o&&r&&o.to<=e&&r.from>=e&&(a=o.type.prop(dt.closedBy))&&a.indexOf(r.name)>-1&&n.doc.lineAt(o.to).from==n.doc.lineAt(r.from).from&&!/\S/.test(n.sliceDoc(o.to,r.from))?{from:o.to,to:r.from}:null}const aV=_C(!1),sV=_C(!0);function _C(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let o=e.changeByRange(r=>{let{from:a,to:l}=r,f=e.doc.lineAt(a),h=!n&&a==l&&rV(e,a);n&&(a=l=(l<=f.to?f:e.doc.lineAt(l)).to);let g=new Ed(e,{simulateBreak:a,simulateDoubleBreak:!!h}),O=eg(g,a);for(O==null&&(O=hs(/^\s*/.exec(e.doc.lineAt(a).text)[0],e.tabSize));l<f.to&&/\s/.test(f.text[l-f.from]);)l++;h?{from:a,to:l}=h:a>f.from&&a<f.from+100&&!/\S/.test(f.text.slice(0,a))&&(a=f.from);let v=["",cc(e,O)];return h&&v.push(cc(e,g.lineIndent(f.from,-1))),{changes:{from:a,to:l,insert:Ot.of(v)},range:ve.cursor(a+1+v[1].length)}});return t(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}}function gg(n,e){let t=-1;return n.changeByRange(o=>{let r=[];for(let l=o.from;l<=o.to;){let f=n.doc.lineAt(l);f.number>t&&(o.empty||o.to>f.from)&&(e(f,r,o),t=f.number),l=f.to+1}let a=n.changes(r);return{changes:r,range:ve.range(a.mapPos(o.anchor,1),a.mapPos(o.head,1))}})}const lV=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),o=new Ed(n,{overrideIndentation:a=>{let l=t[a];return l??-1}}),r=gg(n,(a,l,f)=>{let h=eg(o,a.from);if(h==null)return;/\S/.test(a.text)||(h=0);let g=/^\s*/.exec(a.text)[0],O=cc(n,h);(g!=O||f.from<a.from+g.length)&&(t[a.from]=h,l.push({from:a.from,to:a.from+g.length,insert:O}))});return r.changes.empty||e(n.update(r,{userEvent:"indent"})),!0},EC=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(gg(n,(t,o)=>{o.push({from:t.from,insert:n.facet(lc)})}),{userEvent:"input.indent"})),!0),TC=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(gg(n,(t,o)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let a=hs(r,n.tabSize),l=0,f=cc(n,Math.max(0,a-_d(n)));for(;l<r.length&&l<f.length&&r.charCodeAt(l)==f.charCodeAt(l);)l++;o.push({from:t.from+l,to:t.from+r.length,insert:f.slice(l)})}),{userEvent:"delete.dedent"})),!0),cV=n=>(n.setTabFocusMode(),!0),uV=[{key:"Ctrl-b",run:$S,shift:lC,preventDefault:!0},{key:"Ctrl-f",run:qS,shift:cC},{key:"Ctrl-p",run:nC,shift:fC},{key:"Ctrl-n",run:oC,shift:hC},{key:"Ctrl-a",run:NL,shift:ZL},{key:"Ctrl-e",run:AL,shift:WL},{key:"Ctrl-d",run:wC},{key:"Ctrl-h",run:mg},{key:"Ctrl-k",run:GL},{key:"Ctrl-Alt-h",run:CC},{key:"Ctrl-o",run:$L},{key:"Ctrl-t",run:qL},{key:"Ctrl-v",run:pg}],dV=[{key:"ArrowLeft",run:$S,shift:lC,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:xL,shift:IL,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:EL,shift:jL,preventDefault:!0},{key:"ArrowRight",run:qS,shift:cC,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:wL,shift:QL,preventDefault:!0},{mac:"Cmd-ArrowRight",run:TL,shift:FL,preventDefault:!0},{key:"ArrowUp",run:nC,shift:fC,preventDefault:!0},{mac:"Cmd-ArrowUp",run:OC,shift:yC},{mac:"Ctrl-ArrowUp",run:aC,shift:mC},{key:"ArrowDown",run:oC,shift:hC,preventDefault:!0},{mac:"Cmd-ArrowDown",run:vC,shift:bC},{mac:"Ctrl-ArrowDown",run:pg,shift:gC},{key:"PageUp",run:aC,shift:mC},{key:"PageDown",run:pg,shift:gC},{key:"Home",run:_L,shift:VL,preventDefault:!0},{key:"Mod-Home",run:OC,shift:yC},{key:"End",run:PL,shift:LL,preventDefault:!0},{key:"Mod-End",run:vC,shift:bC},{key:"Enter",run:aV},{key:"Mod-a",run:zL},{key:"Backspace",run:mg,shift:mg},{key:"Delete",run:wC},{key:"Mod-Backspace",mac:"Alt-Backspace",run:CC},{key:"Mod-Delete",mac:"Alt-Delete",run:XL},{mac:"Mod-Backspace",run:KL},{mac:"Mod-Delete",run:JL}].concat(uV.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),fV=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:CL,shift:DL},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:kL,shift:BL},{key:"Alt-ArrowUp",run:eV},{key:"Shift-Alt-ArrowUp",run:nV},{key:"Alt-ArrowDown",run:tV},{key:"Shift-Alt-ArrowDown",run:oV},{key:"Escape",run:YL},{key:"Mod-Enter",run:sV},{key:"Alt-l",mac:"Ctrl-l",run:UL},{key:"Mod-i",run:HL,preventDefault:!0},{key:"Mod-[",run:TC},{key:"Mod-]",run:EC},{key:"Mod-Alt-\\",run:lV},{key:"Shift-Mod-k",run:iV},{key:"Shift-Mod-\\",run:RL},{key:"Mod-/",run:nL},{key:"Alt-A",run:iL},{key:"Ctrl-m",mac:"Shift-Alt-m",run:cV}].concat(dV),hV={key:"Tab",run:EC,shift:TC};function Et(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var r=t[o];typeof r=="string"?n.setAttribute(o,r):r!=null&&(n[o]=r)}e++}for(;e<arguments.length;e++)NC(n,arguments[e]);return n}function NC(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)NC(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}const AC=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class ks{constructor(e,t,o=0,r=e.length,a,l){this.test=l,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(o,r),this.bufferStart=o,this.normalize=a?f=>a(AC(f)):AC,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Cn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Mp(e),o=this.bufferStart+this.bufferPos;this.bufferPos+=To(e);let r=this.normalize(t);for(let a=0,l=o;;a++){let f=r.charCodeAt(a),h=this.match(f,l,this.bufferPos+this.bufferStart);if(a==r.length-1){if(h)return this.value=h,this;break}l==o&&a<t.length&&t.charCodeAt(a)==f&&l++}}}match(e,t,o){let r=null;for(let a=0;a<this.matches.length;a+=2){let l=this.matches[a],f=!1;this.query.charCodeAt(l)==e&&(l==this.query.length-1?r={from:this.matches[a+1],to:o}:(this.matches[a]++,f=!0)),f||(this.matches.splice(a,2),a-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:o}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}typeof Symbol<"u"&&(ks.prototype[Symbol.iterator]=function(){return this});const MC={from:-1,to:-1,match:/.*/.exec("")},Og="gm"+(/x/.unicode==null?"":"u");class RC{constructor(e,t,o,r=0,a=e.length){if(this.text=e,this.to=a,this.curLine="",this.done=!1,this.value=MC,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new IC(e,t,o,r,a);this.re=new RegExp(t,Og+(o?.ignoreCase?"i":"")),this.test=o?.test,this.iter=e.iter();let l=e.lineAt(r);this.curLineStart=l.from,this.matchPos=Vd(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let o=this.curLineStart+t.index,r=o+t[0].length;if(this.matchPos=Vd(this.text,r+(o==r?1:0)),o==this.curLineStart+this.curLine.length&&this.nextLine(),(o<r||o>this.value.to)&&(!this.test||this.test(o,r,t)))return this.value={from:o,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const vg=new WeakMap;class Ps{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,o){let r=vg.get(e);if(!r||r.from>=o||r.to<=t){let f=new Ps(t,e.sliceString(t,o));return vg.set(e,f),f}if(r.from==t&&r.to==o)return r;let{text:a,from:l}=r;return l>t&&(a=e.sliceString(t,l)+a,l=t),r.to<o&&(a+=e.sliceString(r.to,o)),vg.set(e,new Ps(l,a)),new Ps(t,a.slice(t-l,o-l))}}class IC{constructor(e,t,o,r,a){this.text=e,this.to=a,this.done=!1,this.value=MC,this.matchPos=Vd(e,r),this.re=new RegExp(t,Og+(o?.ignoreCase?"i":"")),this.test=o?.test,this.flat=Ps.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let o=this.flat.from+t.index,r=o+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(o,r,t)))return this.value={from:o,to:r,match:t},this.matchPos=Vd(this.text,r+(o==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Ps.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(RC.prototype[Symbol.iterator]=IC.prototype[Symbol.iterator]=function(){return this});function pV(n){try{return new RegExp(n,Og),!0}catch{return!1}}function Vd(n,e){if(e>=n.length)return e;let t=n.lineAt(e),o;for(;e<t.to&&(o=t.text.charCodeAt(e-t.from))>=56320&&o<57344;)e++;return e}function yg(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=Et("input",{class:"cm-textfield",name:"line",value:e}),o=Et("form",{class:"cm-gotoLine",onkeydown:a=>{a.keyCode==27?(a.preventDefault(),n.dispatch({effects:jd.of(!1)}),n.focus()):a.keyCode==13&&(a.preventDefault(),r())},onsubmit:a=>{a.preventDefault(),r()}},Et("label",n.state.phrase("Go to line"),": ",t)," ",Et("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function r(){let a=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!a)return;let{state:l}=n,f=l.doc.lineAt(l.selection.main.head),[,h,g,O,v]=a,b=O?+O.slice(1):0,x=g?+g:f.number;if(g&&v){let L=x/100;h&&(L=L*(h=="-"?-1:1)+f.number/l.doc.lines),x=Math.round(l.doc.lines*L)}else g&&h&&(x=x*(h=="-"?-1:1)+f.number);let C=l.doc.line(Math.max(1,Math.min(l.doc.lines,x))),k=ve.cursor(C.from+Math.max(0,Math.min(b,C.length)));n.dispatch({effects:[jd.of(!1),Be.scrollIntoView(k.from,{y:"center"})],selection:k}),n.focus()}return{dom:o}}const jd=it.define(),QC=pn.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(jd)&&(n=t.value);return n},provide:n=>oc.from(n,e=>e?yg:null)}),mV=n=>{let e=nc(n,yg);if(!e){let t=[jd.of(!0)];n.state.field(QC,!1)==null&&t.push(it.appendConfig.of([QC,gV])),n.dispatch({effects:t}),e=nc(n,yg)}return e&&e.dom.querySelector("input").select(),!0},gV=Be.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),OV={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},vV=Ve.define({combine(n){return ui(n,OV,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function yV(n){return[CV,SV]}const bV=Ye.mark({class:"cm-selectionMatch"}),xV=Ye.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function DC(n,e,t,o){return(t==0||n(e.sliceDoc(t-1,t))!=Qt.Word)&&(o==e.doc.length||n(e.sliceDoc(o,o+1))!=Qt.Word)}function wV(n,e,t,o){return n(e.sliceDoc(t,t+1))==Qt.Word&&n(e.sliceDoc(o-1,o))==Qt.Word}const SV=Xt.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(vV),{state:t}=n,o=t.selection;if(o.ranges.length>1)return Ye.none;let r=o.main,a,l=null;if(r.empty){if(!e.highlightWordAroundCursor)return Ye.none;let h=t.wordAt(r.head);if(!h)return Ye.none;l=t.charCategorizer(r.head),a=t.sliceDoc(h.from,h.to)}else{let h=r.to-r.from;if(h<e.minSelectionLength||h>200)return Ye.none;if(e.wholeWords){if(a=t.sliceDoc(r.from,r.to),l=t.charCategorizer(r.head),!(DC(l,t,r.from,r.to)&&wV(l,t,r.from,r.to)))return Ye.none}else if(a=t.sliceDoc(r.from,r.to),!a)return Ye.none}let f=[];for(let h of n.visibleRanges){let g=new ks(t.doc,a,h.from,h.to);for(;!g.next().done;){let{from:O,to:v}=g.value;if((!l||DC(l,t,O,v))&&(r.empty&&O<=r.from&&v>=r.to?f.push(xV.range(O,v)):(O>=r.to||v<=r.from)&&f.push(bV.range(O,v)),f.length>e.maxMatches))return Ye.none}}return Ye.set(f)}},{decorations:n=>n.decorations}),CV=Be.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),kV=({state:n,dispatch:e})=>{let{selection:t}=n,o=ve.create(t.ranges.map(r=>n.wordAt(r.head)||ve.cursor(r.head)),t.mainIndex);return o.eq(t)?!1:(e(n.update({selection:o})),!0)};function PV(n,e){let{main:t,ranges:o}=n.selection,r=n.wordAt(t.head),a=r&&r.from==t.from&&r.to==t.to;for(let l=!1,f=new ks(n.doc,e,o[o.length-1].to);;)if(f.next(),f.done){if(l)return null;f=new ks(n.doc,e,0,Math.max(0,o[o.length-1].from-1)),l=!0}else{if(l&&o.some(h=>h.from==f.value.from))continue;if(a){let h=n.wordAt(f.value.from);if(!h||h.from!=f.value.from||h.to!=f.value.to)continue}return f.value}}const _V=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(a=>a.from===a.to))return kV({state:n,dispatch:e});let o=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(a=>n.sliceDoc(a.from,a.to)!=o))return!1;let r=PV(n,o);return r?(e(n.update({selection:n.selection.addRange(ve.range(r.from,r.to),!1),effects:Be.scrollIntoView(r.to)})),!0):!1},_s=Ve.define({combine(n){return ui(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new VV(e),scrollToMatch:e=>Be.scrollIntoView(e)})}});class BC{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||pV(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,o)=>o=="n"?`
|
|
333
|
-
`:o=="r"?"\r":o=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new AV(this):new TV(this)}getCursor(e,t=0,o){let r=e.doc?e:ft.create({doc:e});return o==null&&(o=r.doc.length),this.regexp?Ts(this,r,t,o):Es(this,r,t,o)}}class LC{constructor(e){this.spec=e}}function Es(n,e,t,o){return new ks(e.doc,n.unquoted,t,o,n.caseSensitive?void 0:r=>r.toLowerCase(),n.wholeWord?EV(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function EV(n,e){return(t,o,r,a)=>((a>t||a+r.length<o)&&(a=Math.max(0,t-2),r=n.sliceString(a,Math.min(n.length,o+2))),(e(Fd(r,t-a))!=Qt.Word||e(Zd(r,t-a))!=Qt.Word)&&(e(Zd(r,o-a))!=Qt.Word||e(Fd(r,o-a))!=Qt.Word))}class TV extends LC{constructor(e){super(e)}nextMatch(e,t,o){let r=Es(this.spec,e,o,e.doc.length).nextOverlapping();return r.done&&(r=Es(this.spec,e,0,t).nextOverlapping()),r.done?null:r.value}prevMatchInRange(e,t,o){for(let r=o;;){let a=Math.max(t,r-1e4-this.spec.unquoted.length),l=Es(this.spec,e,a,r),f=null;for(;!l.nextOverlapping().done;)f=l.value;if(f)return f;if(a==t)return null;r-=1e4}}prevMatch(e,t,o){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,o,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let o=Es(this.spec,e,0,e.doc.length),r=[];for(;!o.next().done;){if(r.length>=t)return null;r.push(o.value)}return r}highlight(e,t,o,r){let a=Es(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,e.doc.length));for(;!a.next().done;)r(a.value.from,a.value.to)}}function Ts(n,e,t,o){return new RC(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?NV(e.charCategorizer(e.selection.main.head)):void 0},t,o)}function Fd(n,e){return n.slice(Sn(n,e,!1),e)}function Zd(n,e){return n.slice(e,Sn(n,e))}function NV(n){return(e,t,o)=>!o[0].length||(n(Fd(o.input,o.index))!=Qt.Word||n(Zd(o.input,o.index))!=Qt.Word)&&(n(Zd(o.input,o.index+o[0].length))!=Qt.Word||n(Fd(o.input,o.index+o[0].length))!=Qt.Word)}class AV extends LC{nextMatch(e,t,o){let r=Ts(this.spec,e,o,e.doc.length).next();return r.done&&(r=Ts(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,o){for(let r=1;;r++){let a=Math.max(t,o-r*1e4),l=Ts(this.spec,e,a,o),f=null;for(;!l.next().done;)f=l.value;if(f&&(a==t||f.from>a+10))return f;if(a==t)return null}}prevMatch(e,t,o){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,o,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,o)=>o=="$"?"$":o=="&"?e.match[0]:o!="0"&&+o<e.match.length?e.match[o]:t)}matchAll(e,t){let o=Ts(this.spec,e,0,e.doc.length),r=[];for(;!o.next().done;){if(r.length>=t)return null;r.push(o.value)}return r}highlight(e,t,o,r){let a=Ts(this.spec,e,Math.max(0,t-250),Math.min(o+250,e.doc.length));for(;!a.next().done;)r(a.value.from,a.value.to)}}const hc=it.define(),bg=it.define(),pr=pn.define({create(n){return new xg(Sg(n).create(),null)},update(n,e){for(let t of e.effects)t.is(hc)?n=new xg(t.value.create(),n.panel):t.is(bg)&&(n=new xg(n.query,t.value?wg:null));return n},provide:n=>oc.from(n,e=>e.panel)});class xg{constructor(e,t){this.query=e,this.panel=t}}const MV=Ye.mark({class:"cm-searchMatch"}),RV=Ye.mark({class:"cm-searchMatch cm-searchMatch-selected"}),IV=Xt.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(pr))}update(n){let e=n.state.field(pr);(e!=n.startState.field(pr)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ye.none;let{view:t}=this,o=new tr;for(let r=0,a=t.visibleRanges,l=a.length;r<l;r++){let{from:f,to:h}=a[r];for(;r<l-1&&h>a[r+1].from-2*250;)h=a[++r].to;n.highlight(t.state,f,h,(g,O)=>{let v=t.state.selection.ranges.some(b=>b.from==g&&b.to==O);o.add(g,O,v?RV:MV)})}return o.finish()}},{decorations:n=>n.decorations});function pc(n){return e=>{let t=e.state.field(pr,!1);return t&&t.query.spec.valid?n(e,t):ZC(e)}}const Wd=pc((n,{query:e})=>{let{to:t}=n.state.selection.main,o=e.nextMatch(n.state,t,t);if(!o)return!1;let r=ve.single(o.from,o.to),a=n.state.facet(_s);return n.dispatch({selection:r,effects:[Cg(n,o),a.scrollToMatch(r.main,n)],userEvent:"select.search"}),FC(n),!0}),zd=pc((n,{query:e})=>{let{state:t}=n,{from:o}=t.selection.main,r=e.prevMatch(t,o,o);if(!r)return!1;let a=ve.single(r.from,r.to),l=n.state.facet(_s);return n.dispatch({selection:a,effects:[Cg(n,r),l.scrollToMatch(a.main,n)],userEvent:"select.search"}),FC(n),!0}),QV=pc((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:ve.create(t.map(o=>ve.range(o.from,o.to))),userEvent:"select.search.matches"}),!0)}),DV=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:o,to:r}=t.main,a=[],l=0;for(let f=new ks(n.doc,n.sliceDoc(o,r));!f.next().done;){if(a.length>1e3)return!1;f.value.from==o&&(l=a.length),a.push(ve.range(f.value.from,f.value.to))}return e(n.update({selection:ve.create(a,l),userEvent:"select.search.matches"})),!0},VC=pc((n,{query:e})=>{let{state:t}=n,{from:o,to:r}=t.selection.main;if(t.readOnly)return!1;let a=e.nextMatch(t,o,o);if(!a)return!1;let l=[],f,h,g=[];if(a.from==o&&a.to==r&&(h=t.toText(e.getReplacement(a)),l.push({from:a.from,to:a.to,insert:h}),a=e.nextMatch(t,a.from,a.to),g.push(Be.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(o).number)+"."))),a){let O=l.length==0||l[0].from>=a.to?0:a.to-a.from-h.length;f=ve.single(a.from-O,a.to-O),g.push(Cg(n,a)),g.push(t.facet(_s).scrollToMatch(f.main,n))}return n.dispatch({changes:l,selection:f,effects:g,userEvent:"input.replace"}),!0}),BV=pc((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(r=>{let{from:a,to:l}=r;return{from:a,to:l,insert:e.getReplacement(r)}});if(!t.length)return!1;let o=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Be.announce.of(o),userEvent:"input.replace.all"}),!0});function wg(n){return n.state.facet(_s).createPanel(n)}function Sg(n,e){var t,o,r,a,l;let f=n.selection.main,h=f.empty||f.to>f.from+100?"":n.sliceDoc(f.from,f.to);if(e&&!h)return e;let g=n.facet(_s);return new BC({search:((t=e?.literal)!==null&&t!==void 0?t:g.literal)?h:h.replace(/\n/g,"\\n"),caseSensitive:(o=e?.caseSensitive)!==null&&o!==void 0?o:g.caseSensitive,literal:(r=e?.literal)!==null&&r!==void 0?r:g.literal,regexp:(a=e?.regexp)!==null&&a!==void 0?a:g.regexp,wholeWord:(l=e?.wholeWord)!==null&&l!==void 0?l:g.wholeWord})}function jC(n){let e=nc(n,wg);return e&&e.dom.querySelector("[main-field]")}function FC(n){let e=jC(n);e&&e==n.root.activeElement&&e.select()}const ZC=n=>{let e=n.state.field(pr,!1);if(e&&e.panel){let t=jC(n);if(t&&t!=n.root.activeElement){let o=Sg(n.state,e.query.spec);o.valid&&n.dispatch({effects:hc.of(o)}),t.focus(),t.select()}}else n.dispatch({effects:[bg.of(!0),e?hc.of(Sg(n.state,e.query.spec)):it.appendConfig.of(FV)]});return!0},WC=n=>{let e=n.state.field(pr,!1);if(!e||!e.panel)return!1;let t=nc(n,wg);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:bg.of(!1)}),!0},LV=[{key:"Mod-f",run:ZC,scope:"editor search-panel"},{key:"F3",run:Wd,shift:zd,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Wd,shift:zd,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:WC,scope:"editor search-panel"},{key:"Mod-Shift-l",run:DV},{key:"Mod-Alt-g",run:mV},{key:"Mod-d",run:_V,preventDefault:!0}];class VV{constructor(e){this.view=e;let t=this.query=e.state.field(pr).query.spec;this.commit=this.commit.bind(this),this.searchField=Et("input",{value:t.search,placeholder:po(e,"Find"),"aria-label":po(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Et("input",{value:t.replace,placeholder:po(e,"Replace"),"aria-label":po(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Et("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Et("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Et("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function o(r,a,l){return Et("button",{class:"cm-button",name:r,onclick:a,type:"button"},l)}this.dom=Et("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,o("next",()=>Wd(e),[po(e,"next")]),o("prev",()=>zd(e),[po(e,"previous")]),o("select",()=>QV(e),[po(e,"all")]),Et("label",null,[this.caseField,po(e,"match case")]),Et("label",null,[this.reField,po(e,"regexp")]),Et("label",null,[this.wordField,po(e,"by word")]),...e.state.readOnly?[]:[Et("br"),this.replaceField,o("replace",()=>VC(e),[po(e,"replace")]),o("replaceAll",()=>BV(e),[po(e,"replace all")])],Et("button",{name:"close",onclick:()=>WC(e),"aria-label":po(e,"close"),type:"button"},["×"])])}commit(){let e=new BC({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:hc.of(e)}))}keydown(e){X8(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?zd:Wd)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),VC(this.view))}update(e){for(let t of e.transactions)for(let o of t.effects)o.is(hc)&&!o.value.eq(this.query)&&this.setQuery(o.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(_s).top}}function po(n,e){return n.state.phrase(e)}const Ud=30,Hd=/[\s\.,:;?!]/;function Cg(n,{from:e,to:t}){let o=n.state.doc.lineAt(e),r=n.state.doc.lineAt(t).to,a=Math.max(o.from,e-Ud),l=Math.min(r,t+Ud),f=n.state.sliceDoc(a,l);if(a!=o.from){for(let h=0;h<Ud;h++)if(!Hd.test(f[h+1])&&Hd.test(f[h])){f=f.slice(h);break}}if(l!=r){for(let h=f.length-1;h>f.length-Ud;h--)if(!Hd.test(f[h-1])&&Hd.test(f[h])){f=f.slice(0,h);break}}return Be.announce.of(`${n.state.phrase("current match")}. ${f} ${n.state.phrase("on line")} ${o.number}.`)}const jV=Be.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),FV=[pr,er.low(IV),jV];class zC{constructor(e,t,o,r){this.state=e,this.pos=t,this.explicit=o,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=cn(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),o=Math.max(t.from,this.pos-250),r=t.text.slice(o-t.from,this.pos-t.from),a=r.search(XC(e,!1));return a<0?null:{from:o+a,to:this.pos,text:r.slice(a)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,o){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),o&&o.onDocChange&&(this.abortOnDocChange=!0))}}function UC(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function ZV(n){let e=Object.create(null),t=Object.create(null);for(let{label:r}of n){e[r[0]]=!0;for(let a=1;a<r.length;a++)t[r[a]]=!0}let o=UC(e)+UC(t)+"*$";return[new RegExp("^"+o),new RegExp(o)]}function HC(n){let e=n.map(r=>typeof r=="string"?{label:r}:r),[t,o]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:ZV(e);return r=>{let a=r.matchBefore(o);return a||r.explicit?{from:a?a.from:r.pos,options:e,validFor:t}:null}}function WV(n,e){return t=>{for(let o=cn(t.state).resolveInner(t.pos,-1);o;o=o.parent){if(n.indexOf(o.name)>-1)return null;if(o.type.isTop)break}return e(t)}}class YC{constructor(e,t,o,r){this.completion=e,this.source=t,this.match=o,this.score=r}}function mr(n){return n.selection.main.from}function XC(n,e){var t;let{source:o}=n,r=e&&o[0]!="^",a=o[o.length-1]!="$";return!r&&!a?n:new RegExp(`${r?"^":""}(?:${o})${a?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const kg=Mi.define();function zV(n,e,t,o){let{main:r}=n.selection,a=t-r.from,l=o-r.from;return Object.assign(Object.assign({},n.changeByRange(f=>{if(f!=r&&t!=o&&n.sliceDoc(f.from+a,f.from+l)!=n.sliceDoc(t,o))return{range:f};let h=n.toText(e);return{changes:{from:f.from+a,to:o==r.from?f.to:f.from+l,insert:h},range:ve.cursor(f.from+a+h.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const GC=new WeakMap;function UV(n){if(!Array.isArray(n))return n;let e=GC.get(n);return e||GC.set(n,e=HC(n)),e}const Yd=it.define(),mc=it.define();class HV{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let o=Cn(e,t),r=To(o);this.chars.push(o);let a=e.slice(t,t+r),l=a.toUpperCase();this.folded.push(Cn(l==a?a.toLowerCase():l,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:o,any:r,precise:a,byWord:l}=this;if(t.length==1){let E=Cn(e,0),F=To(E),B=F==e.length?0:-100;if(E!=t[0])if(E==o[0])B+=-200;else return null;return this.ret(B,[0,F])}let f=e.indexOf(this.pattern);if(f==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let h=t.length,g=0;if(f<0){for(let E=0,F=Math.min(e.length,200);E<F&&g<h;){let B=Cn(e,E);(B==t[g]||B==o[g])&&(r[g++]=E),E+=To(B)}if(g<h)return null}let O=0,v=0,b=!1,x=0,C=-1,k=-1,L=/[a-z]/.test(e),A=!0;for(let E=0,F=Math.min(e.length,200),B=0;E<F&&v<h;){let I=Cn(e,E);f<0&&(O<h&&I==t[O]&&(a[O++]=E),x<h&&(I==t[x]||I==o[x]?(x==0&&(C=E),k=E+1,x++):x=0));let K,V=I<255?I>=48&&I<=57||I>=97&&I<=122?2:I>=65&&I<=90?1:0:(K=Mp(I))!=K.toLowerCase()?1:K!=K.toUpperCase()?2:0;(!E||V==1&&L||B==0&&V!=0)&&(t[v]==I||o[v]==I&&(b=!0)?l[v++]=E:l.length&&(A=!1)),B=V,E+=To(I)}return v==h&&l[0]==0&&A?this.result(-100+(b?-200:0),l,e):x==h&&C==0?this.ret(-200-e.length+(k==e.length?0:-100),[0,k]):f>-1?this.ret(-700-e.length,[f,f+this.pattern.length]):x==h?this.ret(-900-e.length,[C,k]):v==h?this.result(-100+(b?-200:0)+-700+(A?0:-1100),l,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,o){let r=[],a=0;for(let l of t){let f=l+(this.astral?To(Cn(o,l)):1);a&&r[a-1]==l?r[a-1]=f:(r[a++]=l,r[a++]=f)}return this.ret(e-o.length,r)}}class YV{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),o=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return o==null?null:(this.matched=[0,t.length],this.score=o+(e.length==this.pattern.length?0:-100),this)}}const En=Ve.define({combine(n){return ui(n,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:XV,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>o=>KC(e(o),t(o)),optionClass:(e,t)=>o=>KC(e(o),t(o)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function KC(n,e){return n?e?n+" "+e:n:e}function XV(n,e,t,o,r,a){let l=n.textDirection==At.RTL,f=l,h=!1,g="top",O,v,b=e.left-r.left,x=r.right-e.right,C=o.right-o.left,k=o.bottom-o.top;if(f&&b<Math.min(C,x)?f=!1:!f&&x<Math.min(C,b)&&(f=!0),C<=(f?b:x))O=Math.max(r.top,Math.min(t.top,r.bottom-k))-e.top,v=Math.min(400,f?b:x);else{h=!0,v=Math.min(400,(l?e.right:r.right-e.left)-30);let E=r.bottom-e.bottom;E>=k||E>e.top?O=t.bottom-e.top:(g="bottom",O=e.bottom-t.top)}let L=(e.bottom-e.top)/a.offsetHeight,A=(e.right-e.left)/a.offsetWidth;return{style:`${g}: ${O/L}px; max-width: ${v/A}px`,class:"cm-completionInfo-"+(h?l?"left-narrow":"right-narrow":f?"left":"right")}}function GV(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let o=document.createElement("div");return o.classList.add("cm-completionIcon"),t.type&&o.classList.add(...t.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),o.setAttribute("aria-hidden","true"),o},position:20}),e.push({render(t,o,r,a){let l=document.createElement("span");l.className="cm-completionLabel";let f=t.displayLabel||t.label,h=0;for(let g=0;g<a.length;){let O=a[g++],v=a[g++];O>h&&l.appendChild(document.createTextNode(f.slice(h,O)));let b=l.appendChild(document.createElement("span"));b.appendChild(document.createTextNode(f.slice(O,v))),b.className="cm-completionMatchedText",h=v}return h<f.length&&l.appendChild(document.createTextNode(f.slice(h))),l},position:50},{render(t){if(!t.detail)return null;let o=document.createElement("span");return o.className="cm-completionDetail",o.textContent=t.detail,o},position:80}),e.sort((t,o)=>t.position-o.position).map(t=>t.render)}function Pg(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let r=Math.floor(e/t);return{from:r*t,to:(r+1)*t}}let o=Math.floor((n-e)/t);return{from:n-(o+1)*t,to:n-o*t}}class KV{constructor(e,t,o){this.view=e,this.stateField=t,this.applyCompletion=o,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:h=>this.placeInfo(h),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:a,selected:l}=r.open,f=e.state.facet(En);this.optionContent=GV(f),this.optionClass=f.optionClass,this.tooltipClass=f.tooltipClass,this.range=Pg(a.length,l,f.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",h=>{let{options:g}=e.state.field(t).open;for(let O=h.target,v;O&&O!=this.dom;O=O.parentNode)if(O.nodeName=="LI"&&(v=/-(\d+)$/.exec(O.id))&&+v[1]<g.length){this.applyCompletion(e,g[+v[1]]),h.preventDefault();return}}),this.dom.addEventListener("focusout",h=>{let g=e.state.field(this.stateField,!1);g&&g.tooltip&&e.state.facet(En).closeOnBlur&&h.relatedTarget!=e.contentDOM&&e.dispatch({effects:mc.of(null)})}),this.showOptions(a,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let o=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),o!=r){let{options:a,selected:l,disabled:f}=o.open;(!r.open||r.open.options!=a)&&(this.range=Pg(a.length,l,e.state.facet(En).maxRenderedOptions),this.showOptions(a,o.id)),this.updateSel(),f!=((t=r.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!f)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let o of this.currentClass.split(" "))o&&this.dom.classList.remove(o);for(let o of t.split(" "))o&&this.dom.classList.add(o);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Pg(t.options.length,t.selected,this.view.state.facet(En).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:o}=t.options[t.selected],{info:r}=o;if(!r)return;let a=typeof r=="string"?document.createTextNode(r):r(o);if(!a)return;"then"in a?a.then(l=>{l&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(l,o)}).catch(l=>$n(this.view.state,l,"completion info")):this.addInfoPane(a,o)}}addInfoPane(e,t){this.destroyInfo();let o=this.info=document.createElement("div");if(o.className="cm-tooltip cm-completionInfo",e.nodeType!=null)o.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:a}=e;o.appendChild(r),this.infoDestroy=a||null}this.dom.appendChild(o),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let o=this.list.firstChild,r=this.range.from;o;o=o.nextSibling,r++)o.nodeName!="LI"||!o.id?r--:r==e?o.hasAttribute("aria-selected")||(o.setAttribute("aria-selected","true"),t=o):o.hasAttribute("aria-selected")&&o.removeAttribute("aria-selected");return t&&$V(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),o=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),a=this.space;if(!a){let l=this.dom.ownerDocument.defaultView||window;a={left:0,top:0,right:l.innerWidth,bottom:l.innerHeight}}return r.top>Math.min(a.bottom,t.bottom)-10||r.bottom<Math.max(a.top,t.top)+10?null:this.view.state.facet(En).positionInfo(this.view,t,r,o,a,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,o){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions"));let a=null;for(let l=o.from;l<o.to;l++){let{completion:f,match:h}=e[l],{section:g}=f;if(g){let b=typeof g=="string"?g:g.name;if(b!=a&&(l>o.from||o.from==0))if(a=b,typeof g!="string"&&g.header)r.appendChild(g.header(g));else{let x=r.appendChild(document.createElement("completion-section"));x.textContent=b}}const O=r.appendChild(document.createElement("li"));O.id=t+"-"+l,O.setAttribute("role","option");let v=this.optionClass(f);v&&(O.className=v);for(let b of this.optionContent){let x=b(f,this.view.state,this.view,h);x&&O.appendChild(x)}}return o.from&&r.classList.add("cm-completionListIncompleteTop"),o.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function JV(n,e){return t=>new KV(t,n,e)}function $V(n,e){let t=n.getBoundingClientRect(),o=e.getBoundingClientRect(),r=t.height/n.offsetHeight;o.top<t.top?n.scrollTop-=(t.top-o.top)/r:o.bottom>t.bottom&&(n.scrollTop+=(o.bottom-t.bottom)/r)}function JC(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function qV(n,e){let t=[],o=null,r=g=>{t.push(g);let{section:O}=g.completion;if(O){o||(o=[]);let v=typeof O=="string"?O:O.name;o.some(b=>b.name==v)||o.push(typeof O=="string"?{name:v}:O)}},a=e.facet(En);for(let g of n)if(g.hasResult()){let O=g.result.getMatch;if(g.result.filter===!1)for(let v of g.result.options)r(new YC(v,g.source,O?O(v):[],1e9-t.length));else{let v=e.sliceDoc(g.from,g.to),b,x=a.filterStrict?new YV(v):new HV(v);for(let C of g.result.options)if(b=x.match(C.label)){let k=C.displayLabel?O?O(C,b.matched):[]:b.matched;r(new YC(C,g.source,k,b.score+(C.boost||0)))}}}if(o){let g=Object.create(null),O=0,v=(b,x)=>{var C,k;return((C=b.rank)!==null&&C!==void 0?C:1e9)-((k=x.rank)!==null&&k!==void 0?k:1e9)||(b.name<x.name?-1:1)};for(let b of o.sort(v))O-=1e5,g[b.name]=O;for(let b of t){let{section:x}=b.completion;x&&(b.score+=g[typeof x=="string"?x:x.name])}}let l=[],f=null,h=a.compareCompletions;for(let g of t.sort((O,v)=>v.score-O.score||h(O.completion,v.completion))){let O=g.completion;!f||f.label!=O.label||f.detail!=O.detail||f.type!=null&&O.type!=null&&f.type!=O.type||f.apply!=O.apply||f.boost!=O.boost?l.push(g):JC(g.completion)>JC(f)&&(l[l.length-1]=g),f=g.completion}return l}class Ns{constructor(e,t,o,r,a,l){this.options=e,this.attrs=t,this.tooltip=o,this.timestamp=r,this.selected=a,this.disabled=l}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Ns(this.options,$C(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,o,r,a){let l=qV(e,t);if(!l.length)return r&&e.some(h=>h.state==1)?new Ns(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let f=t.facet(En).selectOnOpen?0:-1;if(r&&r.selected!=f&&r.selected!=-1){let h=r.options[r.selected].completion;for(let g=0;g<l.length;g++)if(l[g].completion==h){f=g;break}}return new Ns(l,$C(o,f),{pos:e.reduce((h,g)=>g.hasResult()?Math.min(h,g.from):h,1e8),create:r7,above:a.aboveCursor},r?r.timestamp:Date.now(),f,!1)}map(e){return new Ns(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Xd{constructor(e,t,o){this.active=e,this.id=t,this.open=o}static start(){return new Xd(o7,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,o=t.facet(En),a=(o.override||t.languageDataAt("autocomplete",mr(t)).map(UV)).map(f=>(this.active.find(g=>g.source==f)||new mo(f,this.active.some(g=>g.state!=0)?1:0)).update(e,o));a.length==this.active.length&&a.every((f,h)=>f==this.active[h])&&(a=this.active);let l=this.open;l&&e.docChanged&&(l=l.map(e.changes)),e.selection||a.some(f=>f.hasResult()&&e.changes.touchesRange(f.from,f.to))||!e7(a,this.active)?l=Ns.build(a,t,this.id,l,o):l&&l.disabled&&!a.some(f=>f.state==1)&&(l=null),!l&&a.every(f=>f.state!=1)&&a.some(f=>f.hasResult())&&(a=a.map(f=>f.hasResult()?new mo(f.source,0):f));for(let f of e.effects)f.is(tk)&&(l=l&&l.setSelected(f.value,this.id));return a==this.active&&l==this.open?this:new Xd(a,this.id,l)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?t7:n7}}function e7(n,e){if(n==e)return!0;for(let t=0,o=0;;){for(;t<n.length&&!n[t].hasResult;)t++;for(;o<e.length&&!e[o].hasResult;)o++;let r=t==n.length,a=o==e.length;if(r||a)return r==a;if(n[t++].result!=e[o++].result)return!1}}const t7={"aria-autocomplete":"list"},n7={};function $C(n,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":n};return e>-1&&(t["aria-activedescendant"]=n+"-"+e),t}const o7=[];function qC(n,e){if(n.isUserEvent("input.complete")){let o=n.annotation(kg);if(o&&e.activateOnCompletion(o))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class mo{constructor(e,t,o=-1){this.source=e,this.state=t,this.explicitPos=o}hasResult(){return!1}update(e,t){let o=qC(e,t),r=this;(o&8||o&16&&this.touches(e))&&(r=new mo(r.source,0)),o&4&&r.state==0&&(r=new mo(this.source,1)),r=r.updateFor(e,o);for(let a of e.effects)if(a.is(Yd))r=new mo(r.source,1,a.value?mr(e.state):-1);else if(a.is(mc))r=new mo(r.source,0);else if(a.is(ek))for(let l of a.value)l.source==r.source&&(r=l);return r}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new mo(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(mr(e.state))}}class As extends mo{constructor(e,t,o,r,a){super(e,2,t),this.result=o,this.from=r,this.to=a}hasResult(){return!0}updateFor(e,t){var o;if(!(t&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let a=e.changes.mapPos(this.from),l=e.changes.mapPos(this.to,1),f=mr(e.state);if((this.explicitPos<0?f<=a:f<this.from)||f>l||!r||t&2&&mr(e.startState)==this.from)return new mo(this.source,t&4?1:0);let h=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return i7(r.validFor,e.state,a,l)?new As(this.source,h,r,a,l):r.update&&(r=r.update(r,a,l,new zC(e.state,f,h>=0)))?new As(this.source,h,r,r.from,(o=r.to)!==null&&o!==void 0?o:mr(e.state)):new mo(this.source,1,h)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new As(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new mo(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function i7(n,e,t,o){if(!n)return!1;let r=e.sliceDoc(t,o);return typeof n=="function"?n(r,t,o,e):XC(n,!0).test(r)}const ek=it.define({map(n,e){return n.map(t=>t.map(e))}}),tk=it.define(),no=pn.define({create(){return Xd.start()},update(n,e){return n.update(e)},provide:n=>[Lm.from(n,e=>e.tooltip),Be.contentAttributes.from(n,e=>e.attrs)]});function _g(n,e){const t=e.completion.apply||e.completion.label;let o=n.state.field(no).active.find(r=>r.source==e.source);return o instanceof As?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},zV(n.state,t,o.from,o.to)),{annotations:kg.of(e.completion)})):t(n,e.completion,o.from,o.to),!0):!1}const r7=JV(no,_g);function Gd(n,e="option"){return t=>{let o=t.state.field(no,!1);if(!o||!o.open||o.open.disabled||Date.now()-o.open.timestamp<t.state.facet(En).interactionDelay)return!1;let r=1,a;e=="page"&&(a=qw(t,o.open.tooltip))&&(r=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector("li").offsetHeight)-1));let{length:l}=o.open.options,f=o.open.selected>-1?o.open.selected+r*(n?1:-1):n?0:l-1;return f<0?f=e=="page"?0:l-1:f>=l&&(f=e=="page"?l-1:0),t.dispatch({effects:tk.of(f)}),!0}}const a7=n=>{let e=n.state.field(no,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<n.state.facet(En).interactionDelay?!1:_g(n,e.open.options[e.open.selected])},nk=n=>n.state.field(no,!1)?(n.dispatch({effects:Yd.of(!0)}),!0):!1,s7=n=>{let e=n.state.field(no,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:mc.of(null)}),!0)};class l7{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const c7=50,u7=1e3,d7=Xt.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(no).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(no),t=n.state.facet(En);if(!n.selectionSet&&!n.docChanged&&n.startState.field(no)==e)return;let o=n.transactions.some(a=>{let l=qC(a,t);return l&8||(a.selection||a.docChanged)&&!(l&3)});for(let a=0;a<this.running.length;a++){let l=this.running[a];if(o||l.context.abortOnDocChange&&n.docChanged||l.updates.length+n.transactions.length>c7&&Date.now()-l.time>u7){for(let f of l.context.abortListeners)try{f()}catch(h){$n(this.view.state,h)}l.context.abortListeners=null,this.running.splice(a--,1)}else l.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(a=>a.effects.some(l=>l.is(Yd)))&&(this.pendingStart=!0);let r=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(a=>a.state==1&&!this.running.some(l=>l.active.source==a.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let a of n.transactions)a.isUserEvent("input.type")?this.composing=2:this.composing==2&&a.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(no);for(let t of e.active)t.state==1&&!this.running.some(o=>o.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=mr(e),o=new zC(e,t,n.explicitPos==t,this.view),r=new l7(n,o);this.running.push(r),Promise.resolve(n.source(o)).then(a=>{r.context.aborted||(r.done=a||null,this.scheduleAccept())},a=>{this.view.dispatch({effects:mc.of(null)}),$n(this.view.state,a)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(En).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(En);for(let o=0;o<this.running.length;o++){let r=this.running[o];if(r.done===void 0)continue;if(this.running.splice(o--,1),r.done){let l=new As(r.active.source,r.active.explicitPos,r.done,r.done.from,(n=r.done.to)!==null&&n!==void 0?n:mr(r.updates.length?r.updates[0].startState:this.view.state));for(let f of r.updates)l=l.update(f,t);if(l.hasResult()){e.push(l);continue}}let a=this.view.state.field(no).active.find(l=>l.source==r.active.source);if(a&&a.state==1)if(r.done==null){let l=new mo(r.active.source,0);for(let f of r.updates)l=l.update(f,t);l.state!=1&&e.push(l)}else this.startQuery(a)}e.length&&this.view.dispatch({effects:ek.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(no,!1);if(e&&e.tooltip&&this.view.state.facet(En).closeOnBlur){let t=e.open&&qw(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:mc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Yd.of(!1)}),20),this.composing=0}}}),f7=typeof navigator=="object"&&/Win/.test(navigator.platform),h7=er.highest(Be.domEventHandlers({keydown(n,e){let t=e.state.field(no,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(f7&&n.altKey)||n.metaKey)return!1;let o=t.open.options[t.open.selected],r=t.active.find(l=>l.source==o.source),a=o.completion.commitCharacters||r.result.commitCharacters;return a&&a.indexOf(n.key)>-1&&_g(e,o),!1}})),ok=Be.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class p7{constructor(e,t,o,r){this.field=e,this.line=t,this.from=o,this.to=r}}class Eg{constructor(e,t,o){this.field=e,this.from=t,this.to=o}map(e){let t=e.mapPos(this.from,-1,kn.TrackDel),o=e.mapPos(this.to,1,kn.TrackDel);return t==null||o==null?null:new Eg(this.field,t,o)}}class Tg{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let o=[],r=[t],a=e.doc.lineAt(t),l=/^\s*/.exec(a.text)[0];for(let h of this.lines){if(o.length){let g=l,O=/^\t*/.exec(h)[0].length;for(let v=0;v<O;v++)g+=e.facet(lc);r.push(t+g.length-O),h=g+h.slice(O)}o.push(h),t+=h.length+1}let f=this.fieldPositions.map(h=>new Eg(h.field,r[h.line]+h.from,r[h.line]+h.to));return{text:o,ranges:f}}static parse(e){let t=[],o=[],r=[],a;for(let l of e.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(l);){let f=a[1]?+a[1]:null,h=a[2]||a[3]||"",g=-1,O=h.replace(/\\[{}]/g,v=>v[1]);for(let v=0;v<t.length;v++)(f!=null?t[v].seq==f:O&&t[v].name==O)&&(g=v);if(g<0){let v=0;for(;v<t.length&&(f==null||t[v].seq!=null&&t[v].seq<f);)v++;t.splice(v,0,{seq:f,name:O}),g=v;for(let b of r)b.field>=g&&b.field++}r.push(new p7(g,o.length,a.index,a.index+O.length)),l=l.slice(0,a.index)+h+l.slice(a.index+a[0].length)}l=l.replace(/\\([{}])/g,(f,h,g)=>{for(let O of r)O.line==o.length&&O.from>g&&(O.from--,O.to--);return h}),o.push(l)}return new Tg(o,r)}}let m7=Ye.widget({widget:new class extends di{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),g7=Ye.mark({class:"cm-snippetField"});class Ms{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ye.set(e.map(o=>(o.from==o.to?m7:g7).range(o.from,o.to)))}map(e){let t=[];for(let o of this.ranges){let r=o.map(e);if(!r)return null;t.push(r)}return new Ms(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(o=>o.field==this.active&&o.from<=t.from&&o.to>=t.to))}}const gc=it.define({map(n,e){return n&&n.map(e)}}),O7=it.define(),Oc=pn.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(gc))return t.value;if(t.is(O7)&&n)return new Ms(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Be.decorations.from(n,e=>e?e.deco:Ye.none)});function Ng(n,e){return ve.create(n.filter(t=>t.field==e).map(t=>ve.range(t.from,t.to)))}function v7(n){let e=Tg.parse(n);return(t,o,r,a)=>{let{text:l,ranges:f}=e.instantiate(t.state,r),h={changes:{from:r,to:a,insert:Ot.of(l)},scrollIntoView:!0,annotations:o?[kg.of(o),en.userEvent.of("input.complete")]:void 0};if(f.length&&(h.selection=Ng(f,0)),f.some(g=>g.field>0)){let g=new Ms(f,0),O=h.effects=[gc.of(g)];t.state.field(Oc,!1)===void 0&&O.push(it.appendConfig.of([Oc,b7,x7,ok]))}t.dispatch(t.state.update(h))}}function ik(n){return({state:e,dispatch:t})=>{let o=e.field(Oc,!1);if(!o||n<0&&o.active==0)return!1;let r=o.active+n,a=n>0&&!o.ranges.some(l=>l.field==r+n);return t(e.update({selection:Ng(o.ranges,r),effects:gc.of(a?null:new Ms(o.ranges,r)),scrollIntoView:!0})),!0}}const y7=[{key:"Tab",run:ik(1),shift:ik(-1)},{key:"Escape",run:({state:n,dispatch:e})=>n.field(Oc,!1)?(e(n.update({effects:gc.of(null)})),!0):!1}],rk=Ve.define({combine(n){return n.length?n[0]:y7}}),b7=er.highest(Jl.compute([rk],n=>n.facet(rk)));function oo(n,e){return Object.assign(Object.assign({},e),{apply:v7(n)})}const x7=Be.domEventHandlers({mousedown(n,e){let t=e.state.field(Oc,!1),o;if(!t||(o=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let r=t.ranges.find(a=>a.from<=o&&a.to>=o);return!r||r.field==t.active?!1:(e.dispatch({selection:Ng(t.ranges,r.field),effects:gc.of(t.ranges.some(a=>a.field>r.field)?new Ms(t.ranges,r.field):null),scrollIntoView:!0}),!0)}}),vc={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},da=it.define({map(n,e){let t=e.mapPos(n,-1,kn.TrackAfter);return t??void 0}}),Ag=new class extends ia{};Ag.startSide=1,Ag.endSide=-1;const ak=pn.define({create(){return vt.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:o=>o>=t.from&&o<=t.to})}for(let t of e.effects)t.is(da)&&(n=n.update({add:[Ag.range(t.value,t.value+1)]}));return n}});function w7(){return[C7,ak]}const Mg="()[]{}<>";function sk(n){for(let e=0;e<Mg.length;e+=2)if(Mg.charCodeAt(e)==n)return Mg.charAt(e+1);return Mp(n<128?n:n+1)}function lk(n,e){return n.languageDataAt("closeBrackets",e)[0]||vc}const S7=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),C7=Be.inputHandler.of((n,e,t,o)=>{if((S7?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let r=n.state.selection.main;if(o.length>2||o.length==2&&To(Cn(o,0))==1||e!=r.from||t!=r.to)return!1;let a=P7(n.state,o);return a?(n.dispatch(a),!0):!1}),k7=[{key:"Backspace",run:({state:n,dispatch:e})=>{if(n.readOnly)return!1;let o=lk(n,n.selection.main.head).brackets||vc.brackets,r=null,a=n.changeByRange(l=>{if(l.empty){let f=_7(n.doc,l.head);for(let h of o)if(h==f&&Kd(n.doc,l.head)==sk(Cn(h,0)))return{changes:{from:l.head-h.length,to:l.head+h.length},range:ve.cursor(l.head-h.length)}}return{range:r=l}});return r||e(n.update(a,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function P7(n,e){let t=lk(n,n.selection.main.head),o=t.brackets||vc.brackets;for(let r of o){let a=sk(Cn(r,0));if(e==r)return a==r?N7(n,r,o.indexOf(r+r+r)>-1,t):E7(n,r,a,t.before||vc.before);if(e==a&&ck(n,n.selection.main.from))return T7(n,r,a)}return null}function ck(n,e){let t=!1;return n.field(ak).between(0,n.doc.length,o=>{o==e&&(t=!0)}),t}function Kd(n,e){let t=n.sliceString(e,e+2);return t.slice(0,To(Cn(t,0)))}function _7(n,e){let t=n.sliceString(e-2,e);return To(Cn(t,0))==t.length?t:t.slice(1)}function E7(n,e,t,o){let r=null,a=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:t,from:l.to}],effects:da.of(l.to+e.length),range:ve.range(l.anchor+e.length,l.head+e.length)};let f=Kd(n.doc,l.head);return!f||/\s/.test(f)||o.indexOf(f)>-1?{changes:{insert:e+t,from:l.head},effects:da.of(l.head+e.length),range:ve.cursor(l.head+e.length)}:{range:r=l}});return r?null:n.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function T7(n,e,t){let o=null,r=n.changeByRange(a=>a.empty&&Kd(n.doc,a.head)==t?{changes:{from:a.head,to:a.head+t.length,insert:t},range:ve.cursor(a.head+t.length)}:o={range:a});return o?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function N7(n,e,t,o){let r=o.stringPrefixes||vc.stringPrefixes,a=null,l=n.changeByRange(f=>{if(!f.empty)return{changes:[{insert:e,from:f.from},{insert:e,from:f.to}],effects:da.of(f.to+e.length),range:ve.range(f.anchor+e.length,f.head+e.length)};let h=f.head,g=Kd(n.doc,h),O;if(g==e){if(uk(n,h))return{changes:{insert:e+e,from:h},effects:da.of(h+e.length),range:ve.cursor(h+e.length)};if(ck(n,h)){let b=t&&n.sliceDoc(h,h+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:h,to:h+b.length,insert:b},range:ve.cursor(h+b.length)}}}else{if(t&&n.sliceDoc(h-2*e.length,h)==e+e&&(O=dk(n,h-2*e.length,r))>-1&&uk(n,O))return{changes:{insert:e+e+e+e,from:h},effects:da.of(h+e.length),range:ve.cursor(h+e.length)};if(n.charCategorizer(h)(g)!=Qt.Word&&dk(n,h,r)>-1&&!A7(n,h,e,r))return{changes:{insert:e+e,from:h},effects:da.of(h+e.length),range:ve.cursor(h+e.length)}}return{range:a=f}});return a?null:n.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function uk(n,e){let t=cn(n).resolveInner(e+1);return t.parent&&t.from==e}function A7(n,e,t,o){let r=cn(n).resolveInner(e,-1),a=o.reduce((l,f)=>Math.max(l,f.length),0);for(let l=0;l<5;l++){let f=n.sliceDoc(r.from,Math.min(r.to,r.from+t.length+a)),h=f.indexOf(t);if(!h||h>-1&&o.indexOf(f.slice(0,h))>-1){let O=r.firstChild;for(;O&&O.from==r.from&&O.to-O.from>t.length+h;){if(n.sliceDoc(O.to-t.length,O.to)==t)return!1;O=O.firstChild}return!0}let g=r.to==e&&r.parent;if(!g)break;r=g}return!1}function dk(n,e,t){let o=n.charCategorizer(e);if(o(n.sliceDoc(e-1,e))!=Qt.Word)return e;for(let r of t){let a=e-r.length;if(n.sliceDoc(a,e)==r&&o(n.sliceDoc(a-1,a))!=Qt.Word)return a}return-1}function M7(n={}){return[h7,no,En.of(n),d7,R7,ok]}const fk=[{key:"Ctrl-Space",run:nk},{mac:"Alt-`",run:nk},{key:"Escape",run:s7},{key:"ArrowDown",run:Gd(!0)},{key:"ArrowUp",run:Gd(!1)},{key:"PageDown",run:Gd(!0,"page")},{key:"PageUp",run:Gd(!1,"page")},{key:"Enter",run:a7}],R7=er.highest(Jl.computeN([En],n=>n.facet(En).defaultKeymap?[fk]:[]));class I7{constructor(e,t,o){this.from=e,this.to=t,this.diagnostic=o}}class fa{constructor(e,t,o){this.diagnostics=e,this.panel=t,this.selected=o}static init(e,t,o){let r=e,a=o.facet(yc).markerFilter;a&&(r=a(r,o));let l=Ye.set(r.map(f=>f.from==f.to||f.from==f.to-1&&o.doc.lineAt(f.from).to==f.from?Ye.widget({widget:new Z7(f),diagnostic:f}).range(f.from):Ye.mark({attributes:{class:"cm-lintRange cm-lintRange-"+f.severity+(f.markClass?" "+f.markClass:"")},diagnostic:f}).range(f.from,f.to)),!0);return new fa(l,t,Rs(l))}}function Rs(n,e=null,t=0){let o=null;return n.between(t,1e9,(r,a,{spec:l})=>{if(!(e&&l.diagnostic!=e))return o=new I7(r,a,l.diagnostic),!1}),o}function Q7(n,e){let t=e.pos,o=e.end||t,r=n.state.facet(yc).hideOn(n,t,o);if(r!=null)return r;let a=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(l=>l.is(hk))||n.changes.touchesRange(a.from,Math.max(a.to,o)))}function D7(n,e){return n.field(go,!1)?e:e.concat(it.appendConfig.of(U7))}const hk=it.define(),Rg=it.define(),pk=it.define(),go=pn.define({create(){return new fa(Ye.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),o=null,r=n.panel;if(n.selected){let a=e.changes.mapPos(n.selected.from,1);o=Rs(t,n.selected.diagnostic,a)||Rs(t,null,a)}!t.size&&r&&e.state.facet(yc).autoPanel&&(r=null),n=new fa(t,r,o)}for(let t of e.effects)if(t.is(hk)){let o=e.state.facet(yc).autoPanel?t.value.length?bc.open:null:n.panel;n=fa.init(t.value,o,e.state)}else t.is(Rg)?n=new fa(n.diagnostics,t.value?bc.open:null,n.selected):t.is(pk)&&(n=new fa(n.diagnostics,n.panel,t.value));return n},provide:n=>[oc.from(n,e=>e.panel),Be.decorations.from(n,e=>e.diagnostics)]}),B7=Ye.mark({class:"cm-lintRange cm-lintRange-active"});function L7(n,e,t){let{diagnostics:o}=n.state.field(go),r=[],a=2e8,l=0;o.between(e-(t<0?1:0),e+(t>0?1:0),(h,g,{spec:O})=>{e>=h&&e<=g&&(h==g||(e>h||t>0)&&(e<g||t<0))&&(r.push(O.diagnostic),a=Math.min(h,a),l=Math.max(g,l))});let f=n.state.facet(yc).tooltipFilter;return f&&(r=f(r,n.state)),r.length?{pos:a,end:l,above:n.state.doc.lineAt(a).to<l,create(){return{dom:V7(n,r)}}}:null}function V7(n,e){return Et("ul",{class:"cm-tooltip-lint"},e.map(t=>Ok(n,t,!1)))}const j7=n=>{let e=n.state.field(go,!1);(!e||!e.panel)&&n.dispatch({effects:D7(n.state,[Rg.of(!0)])});let t=nc(n,bc.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},mk=n=>{let e=n.state.field(go,!1);return!e||!e.panel?!1:(n.dispatch({effects:Rg.of(!1)}),!0)},F7=[{key:"Mod-Shift-m",run:j7,preventDefault:!0},{key:"F8",run:n=>{let e=n.state.field(go,!1);if(!e)return!1;let t=n.state.selection.main,o=e.diagnostics.iter(t.to+1);return!o.value&&(o=e.diagnostics.iter(0),!o.value||o.from==t.from&&o.to==t.to)?!1:(n.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0}),!0)}}],yc=Ve.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},ui(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?o=>e(o)||t(o):e:t}))}});function gk(n){let e=[];if(n)e:for(let{name:t}of n){for(let o=0;o<t.length;o++){let r=t[o];if(/[a-zA-Z]/.test(r)&&!e.some(a=>a.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function Ok(n,e,t){var o;let r=t?gk(e.actions):[];return Et("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Et("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(o=e.actions)===null||o===void 0?void 0:o.map((a,l)=>{let f=!1,h=b=>{if(b.preventDefault(),f)return;f=!0;let x=Rs(n.state.field(go).diagnostics,e);x&&a.apply(n,x.from,x.to)},{name:g}=a,O=r[l]?g.indexOf(r[l]):-1,v=O<0?g:[g.slice(0,O),Et("u",g.slice(O,O+1)),g.slice(O+1)];return Et("button",{type:"button",class:"cm-diagnosticAction",onclick:h,onmousedown:h,"aria-label":` Action: ${g}${O<0?"":` (access key "${r[l]})"`}.`},v)}),e.source&&Et("div",{class:"cm-diagnosticSource"},e.source))}class Z7 extends di{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Et("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class vk{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Ok(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class bc{constructor(e){this.view=e,this.items=[];let t=r=>{if(r.keyCode==27)mk(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:a}=this.items[this.selectedIndex],l=gk(a.actions);for(let f=0;f<l.length;f++)if(l[f].toUpperCase().charCodeAt(0)==r.keyCode){let h=Rs(this.view.state.field(go).diagnostics,a);h&&a.actions[f].apply(e,h.from,h.to)}}else return;r.preventDefault()},o=r=>{for(let a=0;a<this.items.length;a++)this.items[a].dom.contains(r.target)&&this.moveSelection(a)};this.list=Et("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:o}),this.dom=Et("div",{class:"cm-panel-lint"},this.list,Et("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>mk(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(go).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(go),o=0,r=!1,a=null;for(e.between(0,this.view.state.doc.length,(l,f,{spec:h})=>{let g=-1,O;for(let v=o;v<this.items.length;v++)if(this.items[v].diagnostic==h.diagnostic){g=v;break}g<0?(O=new vk(this.view,h.diagnostic),this.items.splice(o,0,O),r=!0):(O=this.items[g],g>o&&(this.items.splice(o,g-o),r=!0)),t&&O.diagnostic==t.diagnostic?O.dom.hasAttribute("aria-selected")||(O.dom.setAttribute("aria-selected","true"),a=O):O.dom.hasAttribute("aria-selected")&&O.dom.removeAttribute("aria-selected"),o++});o<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new vk(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),a?(this.list.setAttribute("aria-activedescendant",a.id),this.view.requestMeasure({key:this,read:()=>({sel:a.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:f})=>{let h=f.height/this.list.offsetHeight;l.top<f.top?this.list.scrollTop-=(f.top-l.top)/h:l.bottom>f.bottom&&(this.list.scrollTop+=(l.bottom-f.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let o=e;e=o.nextSibling,o.remove()}for(let o of this.items)if(o.dom.parentNode==this.list){for(;e!=o.dom;)t();e=o.dom.nextSibling}else this.list.insertBefore(o.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(go),o=Rs(t.diagnostics,this.items[e].diagnostic);o&&this.view.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:pk.of(o)})}static open(e){return new bc(e)}}function W7(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(n)}</svg>')`}function Jd(n){return W7(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${n}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const z7=Be.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Jd("#d11")},".cm-lintRange-warning":{backgroundImage:Jd("orange")},".cm-lintRange-info":{backgroundImage:Jd("#999")},".cm-lintRange-hint":{backgroundImage:Jd("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),U7=[go,Be.decorations.compute([go],n=>{let{selected:e,panel:t}=n.field(go);return!e||!t||e.from==e.to?Ye.none:Ye.set([B7.range(e.from,e.to)])}),DD(L7,{hideOn:Q7}),z7],H7=[YD(),KD(),dD(),dL(),LB(),eD(),rD(),ft.allowMultipleSelections.of(!0),PB(),jB(WB,{fallback:!0}),GB(),w7(),M7(),kD(),ED(),OD(),yV(),Jl.of([...k7,...fV,...LV,...bL,...IB,...fk,...F7])];/*!
|
|
334
|
-
* VueCodemirror v6.1.1
|
|
335
|
-
* Copyright (c) Surmon. All rights reserved.
|
|
336
|
-
* Released under the MIT License.
|
|
337
|
-
* Surmon
|
|
338
|
-
*/var Y7=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[H7]}),X7=Symbol("vue-codemirror-global-config"),zn,G7=function(n){var e=n.onUpdate,t=n.onChange,o=n.onFocus,r=n.onBlur,a=function(l,f){var h={};for(var g in l)Object.prototype.hasOwnProperty.call(l,g)&&f.indexOf(g)<0&&(h[g]=l[g]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function"){var O=0;for(g=Object.getOwnPropertySymbols(l);O<g.length;O++)f.indexOf(g[O])<0&&Object.prototype.propertyIsEnumerable.call(l,g[O])&&(h[g[O]]=l[g[O]])}return h}(n,["onUpdate","onChange","onFocus","onBlur"]);return ft.create({doc:a.doc,selection:a.selection,extensions:(Array.isArray(a.extensions)?a.extensions:[a.extensions]).concat([Be.updateListener.of(function(l){e(l),l.docChanged&&t(l.state.doc.toString(),l),l.focusChanged&&(l.view.hasFocus?o(l):r(l))})])})},Is=function(n){var e=new Ql;return{compartment:e,run:function(t){e.get(n.state)?n.dispatch({effects:e.reconfigure(t)}):n.dispatch({effects:it.appendConfig.of(e.of(t))})}}},yk=function(n,e){var t=Is(n),o=t.compartment,r=t.run;return function(a){var l=o.get(n.state);r(a??l!==e?e:[])}},$d={type:Boolean,default:void 0},K7={autofocus:$d,disabled:$d,indentWithTab:$d,tabSize:Number,placeholder:String,style:Object,autoDestroy:$d,phrases:Object,root:Object,extensions:Array,selection:Object},J7={modelValue:{type:String,default:""}},$7=Object.assign(Object.assign({},K7),J7);(function(n){n.Change="change",n.Update="update",n.Focus="focus",n.Blur="blur",n.Ready="ready",n.ModelUpdate="update:modelValue"})(zn||(zn={}));var ha={};ha[zn.Change]=function(n,e){return!0},ha[zn.Update]=function(n){return!0},ha[zn.Focus]=function(n){return!0},ha[zn.Blur]=function(n){return!0},ha[zn.Ready]=function(n){return!0};var bk={};bk[zn.ModelUpdate]=ha[zn.Change];var q7=Object.assign(Object.assign({},ha),bk),ej=u.defineComponent({name:"VueCodemirror",props:Object.assign({},$7),emits:Object.assign({},q7),setup:function(n,e){var t=u.shallowRef(),o=u.shallowRef(),r=u.shallowRef(),a=Object.assign(Object.assign({},Y7),u.inject(X7,{})),l=u.computed(function(){var f={};return Object.keys(u.toRaw(n)).forEach(function(h){var g;h!=="modelValue"&&(f[h]=(g=n[h])!==null&&g!==void 0?g:a[h])}),f});return u.onMounted(function(){var f;o.value=G7({doc:n.modelValue,selection:l.value.selection,extensions:(f=a.extensions)!==null&&f!==void 0?f:[],onFocus:function(g){return e.emit(zn.Focus,g)},onBlur:function(g){return e.emit(zn.Blur,g)},onUpdate:function(g){return e.emit(zn.Update,g)},onChange:function(g,O){g!==n.modelValue&&(e.emit(zn.Change,g,O),e.emit(zn.ModelUpdate,g,O))}}),r.value=function(g){return new Be(Object.assign({},g))}({state:o.value,parent:t.value,root:l.value.root});var h=function(g){var O=function(){return g.state.doc.toString()},v=Is(g).run,b=yk(g,[Be.editable.of(!1),ft.readOnly.of(!0)]),x=yk(g,Jl.of([hV])),C=Is(g).run,k=Is(g).run,L=Is(g).run,A=Is(g).run;return{focus:function(){return g.focus()},getDoc:O,setDoc:function(E){E!==O()&&g.dispatch({changes:{from:0,to:g.state.doc.length,insert:E}})},reExtensions:v,toggleDisabled:b,toggleIndentWithTab:x,setTabSize:function(E){C([ft.tabSize.of(E),lc.of(" ".repeat(E))])},setPhrases:function(E){k([ft.phrases.of(E)])},setPlaceholder:function(E){L(xD(E))},setStyle:function(E){E===void 0&&(E={}),A(Be.theme({"&":Object.assign({},E)}))}}}(r.value);u.watch(function(){return n.modelValue},function(g){g!==h.getDoc()&&h.setDoc(g)}),u.watch(function(){return n.extensions},function(g){return h.reExtensions(g||[])},{immediate:!0}),u.watch(function(){return l.value.disabled},function(g){return h.toggleDisabled(g)},{immediate:!0}),u.watch(function(){return l.value.indentWithTab},function(g){return h.toggleIndentWithTab(g)},{immediate:!0}),u.watch(function(){return l.value.tabSize},function(g){return h.setTabSize(g)},{immediate:!0}),u.watch(function(){return l.value.phrases},function(g){return h.setPhrases(g||{})},{immediate:!0}),u.watch(function(){return l.value.placeholder},function(g){return h.setPlaceholder(g)},{immediate:!0}),u.watch(function(){return l.value.style},function(g){return h.setStyle(g)},{immediate:!0}),l.value.autofocus&&h.focus(),e.emit(zn.Ready,{state:o.value,view:r.value,container:t.value})}),u.onBeforeUnmount(function(){l.value.autoDestroy&&r.value&&function(f){f.destroy()}(r.value)}),function(){return u.h("div",{class:"v-codemirror",style:{display:"contents"},ref:t})}}}),qd=ej;class ef{constructor(e,t,o,r,a,l,f,h,g,O=0,v){this.p=e,this.stack=t,this.state=o,this.reducePos=r,this.pos=a,this.score=l,this.buffer=f,this.bufferBase=h,this.curContext=g,this.lookAhead=O,this.parent=v}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,o=0){let r=e.parser.context;return new ef(e,[],t,o,o,0,[],0,r?new xk(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let o=e>>19,r=e&65535,{parser:a}=this.p,l=this.reducePos<this.pos-25;l&&this.setLookAhead(this.pos);let f=a.dynamicPrecedence(r);if(f&&(this.score+=f),o==0){this.pushState(a.getGoto(this.state,r,!0),this.reducePos),r<a.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,l?8:4,!0),this.reduceContext(r,this.reducePos);return}let h=this.stack.length-(o-1)*3-(e&262144?6:0),g=h?this.stack[h-2]:this.p.ranges[0].from,O=this.reducePos-g;O>=2e3&&!(!((t=this.p.parser.nodeSet.types[r])===null||t===void 0)&&t.isAnonymous)&&(g==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=O):this.p.lastBigReductionSize<O&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=g,this.p.lastBigReductionSize=O));let v=h?this.stack[h-1]:0,b=this.bufferBase+this.buffer.length-v;if(r<a.minRepeatTerm||e&131072){let x=a.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,g,x,b+4,!0)}if(e&262144)this.state=this.stack[h];else{let x=this.stack[h-3];this.state=a.getGoto(x,r,!0)}for(;this.stack.length>h;)this.stack.pop();this.reduceContext(r,g)}storeNode(e,t,o,r=4,a=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let l=this,f=this.buffer.length;if(f==0&&l.parent&&(f=l.bufferBase-l.parent.bufferBase,l=l.parent),f>0&&l.buffer[f-4]==0&&l.buffer[f-1]>-1){if(t==o)return;if(l.buffer[f-2]>=t){l.buffer[f-2]=o;return}}}if(!a||this.pos==o)this.buffer.push(e,t,o,r);else{let l=this.buffer.length;if(l>0&&this.buffer[l-4]!=0){let f=!1;for(let h=l;h>0&&this.buffer[h-2]>o;h-=4)if(this.buffer[h-1]>=0){f=!0;break}if(f)for(;l>0&&this.buffer[l-2]>o;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4)}this.buffer[l]=e,this.buffer[l+1]=t,this.buffer[l+2]=o,this.buffer[l+3]=r}}shift(e,t,o,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,o),t<=this.p.parser.maxNode&&this.buffer.push(t,o,r,4);else{let a=e,{parser:l}=this.p;(r>this.pos||t<=l.maxNode)&&(this.pos=r,l.stateFlag(a,1)||(this.reducePos=r)),this.pushState(a,o),this.shiftContext(t,o),t<=l.maxNode&&this.buffer.push(t,o,r,4)}}apply(e,t,o,r){e&65536?this.reduce(e):this.shift(e,t,o,r)}useNode(e,t){let o=this.p.reused.length-1;(o<0||this.p.reused[o]!=e)&&(this.p.reused.push(e),o++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(o,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let o=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new ef(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,o,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let o=e<=this.p.parser.maxNode;o&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,o?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new tj(this);;){let o=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(o==0)return!1;if(!(o&65536))return!0;t.reduce(o)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let a=0,l;a<t.length;a+=2)(l=t[a+1])!=this.state&&this.p.parser.hasAction(l,e)&&r.push(t[a],l);if(this.stack.length<120)for(let a=0;r.length<8&&a<t.length;a+=2){let l=t[a+1];r.some((f,h)=>h&1&&f==l)||r.push(t[a],l)}t=r}let o=[];for(let r=0;r<t.length&&o.length<4;r+=2){let a=t[r+1];if(a==this.state)continue;let l=this.split();l.pushState(a,this.pos),l.storeNode(0,l.pos,l.pos,4,!0),l.shiftContext(t[r],this.pos),l.reducePos=this.pos,l.score-=200,o.push(l)}return o}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let o=t>>19,r=t&65535,a=this.stack.length-o*3;if(a<0||e.getGoto(this.stack[a],r,!1)<0){let l=this.findForcedReduction();if(l==null)return!1;t=l}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],o=(r,a)=>{if(!t.includes(r))return t.push(r),e.allActions(r,l=>{if(!(l&393216))if(l&65536){let f=(l>>19)-a;if(f>1){let h=l&65535,g=this.stack.length-f*3;if(g>=0&&e.getGoto(this.stack[g],h,!1)>=0)return f<<19|65536|h}}else{let f=o(l,a+1);if(f!=null)return f}})};return o(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new xk(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class xk{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class tj{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,o=e>>19;o==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(o-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class tf{constructor(e,t,o){this.stack=e,this.pos=t,this.index=o,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new tf(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new tf(this.stack,this.pos,this.index)}}function xc(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let o=0,r=0;o<n.length;){let a=0;for(;;){let l=n.charCodeAt(o++),f=!1;if(l==126){a=65535;break}l>=92&&l--,l>=34&&l--;let h=l-32;if(h>=46&&(h-=46,f=!0),a+=h,f)break;a*=46}t?t[r++]=a:t=new e(a)}return t}class nf{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const wk=new nf;class nj{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=wk,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let o=this.range,r=this.rangeIndex,a=this.pos+e;for(;a<o.from;){if(!r)return null;let l=this.ranges[--r];a-=o.from-l.to,o=l}for(;t<0?a>o.to:a>=o.to;){if(r==this.ranges.length-1)return null;let l=this.ranges[++r];a+=l.from-o.to,o=l}return a}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,o,r;if(t>=0&&t<this.chunk.length)o=this.pos+e,r=this.chunk.charCodeAt(t);else{let a=this.resolveOffset(e,1);if(a==null)return-1;if(o=a,o>=this.chunk2Pos&&o<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(o-this.chunk2Pos);else{let l=this.rangeIndex,f=this.range;for(;f.to<=o;)f=this.ranges[++l];this.chunk2=this.input.chunk(this.chunk2Pos=o),o+this.chunk2.length>f.to&&(this.chunk2=this.chunk2.slice(0,f.to-o)),r=this.chunk2.charCodeAt(0)}}return o>=this.token.lookAhead&&(this.token.lookAhead=o+1),r}acceptToken(e,t=0){let o=t?this.resolveOffset(t,-1):this.pos;if(o==null||o<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=o}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=wk,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let o="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(o+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return o}}class Qs{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:o}=t.p;Sk(this.data,e,t,this.id,o.data,o.tokenPrecTable)}}Qs.prototype.contextual=Qs.prototype.fallback=Qs.prototype.extend=!1;class Ig{constructor(e,t,o){this.precTable=t,this.elseToken=o,this.data=typeof e=="string"?xc(e):e}token(e,t){let o=e.pos,r=0;for(;;){let a=e.next<0,l=e.resolveOffset(1,1);if(Sk(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(a||r++,l==null)break;e.reset(l,e.token)}r&&(e.reset(o,e.token),e.acceptToken(this.elseToken,r))}}Ig.prototype.contextual=Qs.prototype.fallback=Qs.prototype.extend=!1;class of{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Sk(n,e,t,o,r,a){let l=0,f=1<<o,{dialect:h}=t.p.parser;e:for(;f&n[l];){let g=n[l+1];for(let x=l+3;x<g;x+=2)if((n[x+1]&f)>0){let C=n[x];if(h.allows(C)&&(e.token.value==-1||e.token.value==C||oj(C,e.token.value,r,a))){e.acceptToken(C);break}}let O=e.next,v=0,b=n[l+2];if(e.next<0&&b>v&&n[g+b*3-3]==65535){l=n[g+b*3-1];continue e}for(;v<b;){let x=v+b>>1,C=g+x+(x<<1),k=n[C],L=n[C+1]||65536;if(O<k)b=x;else if(O>=L)v=x+1;else{l=n[C+2],e.advance();continue e}}break}}function Ck(n,e,t){for(let o=e,r;(r=n[o])!=65535;o++)if(r==t)return o-e;return-1}function oj(n,e,t,o){let r=Ck(t,o,e);return r<0||Ck(t,o,n)<r}const Oo=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let Qg=null;function kk(n,e,t){let o=n.cursor(ln.IncludeAnonymous);for(o.moveTo(e);;)if(!(t<0?o.childBefore(e):o.childAfter(e)))for(;;){if((t<0?o.to<e:o.from>e)&&!o.type.isError)return t<0?Math.max(0,Math.min(o.to-1,e-25)):Math.min(n.length,Math.max(o.from+1,e+25));if(t<0?o.prevSibling():o.nextSibling())break;if(!o.parent())return t<0?0:n.length}}class ij{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?kk(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?kk(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let o=this.trees[t],r=this.index[t];if(r==o.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let a=o.children[r],l=this.start[t]+o.positions[r];if(l>e)return this.nextStart=l,null;if(a instanceof nn){if(l==e){if(l<this.safeFrom)return null;let f=l+a.length;if(f<=this.safeTo){let h=a.prop(dt.lookAhead);if(!h||f+h<this.fragment.to)return a}}this.index[t]++,l+a.length>=Math.max(this.safeFrom,e)&&(this.trees.push(a),this.start.push(l),this.index.push(0))}else this.index[t]++,this.nextStart=l+a.length}}}class rj{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(o=>new nf)}getActions(e){let t=0,o=null,{parser:r}=e.p,{tokenizers:a}=r,l=r.stateSlot(e.state,3),f=e.curContext?e.curContext.hash:0,h=0;for(let g=0;g<a.length;g++){if(!(1<<g&l))continue;let O=a[g],v=this.tokens[g];if(!(o&&!O.fallback)&&((O.contextual||v.start!=e.pos||v.mask!=l||v.context!=f)&&(this.updateCachedToken(v,O,e),v.mask=l,v.context=f),v.lookAhead>v.end+25&&(h=Math.max(v.lookAhead,h)),v.value!=0)){let b=t;if(v.extended>-1&&(t=this.addActions(e,v.extended,v.end,t)),t=this.addActions(e,v.value,v.end,t),!O.extend&&(o=v,t>b))break}}for(;this.actions.length>t;)this.actions.pop();return h&&e.setLookAhead(h),!o&&e.pos==this.stream.end&&(o=new nf,o.value=e.p.parser.eofTerm,o.start=o.end=e.pos,t=this.addActions(e,o.value,o.end,t)),this.mainToken=o,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new nf,{pos:o,p:r}=e;return t.start=o,t.end=Math.min(o+1,r.stream.end),t.value=o==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,o){let r=this.stream.clipPos(o.pos);if(t.token(this.stream.reset(r,e),o),e.value>-1){let{parser:a}=o.p;for(let l=0;l<a.specialized.length;l++)if(a.specialized[l]==e.value){let f=a.specializers[l](this.stream.read(e.start,e.end),o);if(f>=0&&o.p.parser.dialect.allows(f>>1)){f&1?e.extended=f>>1:e.value=f>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,o,r){for(let a=0;a<r;a+=3)if(this.actions[a]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=o,r}addActions(e,t,o,r){let{state:a}=e,{parser:l}=e.p,{data:f}=l;for(let h=0;h<2;h++)for(let g=l.stateSlot(a,h?2:1);;g+=3){if(f[g]==65535)if(f[g+1]==1)g=Bi(f,g+2);else{r==0&&f[g+1]==2&&(r=this.putAction(Bi(f,g+2),t,o,r));break}f[g]==t&&(r=this.putAction(Bi(f,g+1),t,o,r))}return r}}class aj{constructor(e,t,o,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new nj(t,r),this.tokens=new rj(e,this.stream),this.topTerm=e.top[1];let{from:a}=r[0];this.stacks=[ef.start(this,e.top[0],a)],this.fragments=o.length&&this.stream.end-a>e.bufferLength*4?new ij(o,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,o=this.stacks=[],r,a;if(this.bigReductionCount>300&&e.length==1){let[l]=e;for(;l.forceReduce()&&l.stack.length&&l.stack[l.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let l=0;l<e.length;l++){let f=e[l];for(;;){if(this.tokens.mainToken=null,f.pos>t)o.push(f);else{if(this.advanceStack(f,o,e))continue;{r||(r=[],a=[]),r.push(f);let h=this.tokens.getMainToken(f);a.push(h.value,h.end)}}break}}if(!o.length){let l=r&&cj(r);if(l)return Oo&&console.log("Finish with "+this.stackID(l)),this.stackToTree(l);if(this.parser.strict)throw Oo&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let l=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,a,o);if(l)return Oo&&console.log("Force-finish "+this.stackID(l)),this.stackToTree(l.forceAll())}if(this.recovering){let l=this.recovering==1?1:this.recovering*3;if(o.length>l)for(o.sort((f,h)=>h.score-f.score);o.length>l;)o.pop();o.some(f=>f.reducePos>t)&&this.recovering--}else if(o.length>1){e:for(let l=0;l<o.length-1;l++){let f=o[l];for(let h=l+1;h<o.length;h++){let g=o[h];if(f.sameState(g)||f.buffer.length>500&&g.buffer.length>500)if((f.score-g.score||f.buffer.length-g.buffer.length)>0)o.splice(h--,1);else{o.splice(l--,1);continue e}}}o.length>12&&o.splice(12,o.length-12)}this.minStackPos=o[0].pos;for(let l=1;l<o.length;l++)o[l].pos<this.minStackPos&&(this.minStackPos=o[l].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,o){let r=e.pos,{parser:a}=this,l=Oo?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let g=e.curContext&&e.curContext.tracker.strict,O=g?e.curContext.hash:0;for(let v=this.fragments.nodeAt(r);v;){let b=this.parser.nodeSet.types[v.type.id]==v.type?a.getGoto(e.state,v.type.id):-1;if(b>-1&&v.length&&(!g||(v.prop(dt.contextHash)||0)==O))return e.useNode(v,b),Oo&&console.log(l+this.stackID(e)+` (via reuse of ${a.getName(v.type.id)})`),!0;if(!(v instanceof nn)||v.children.length==0||v.positions[0]>0)break;let x=v.children[0];if(x instanceof nn&&v.positions[0]==0)v=x;else break}}let f=a.stateSlot(e.state,4);if(f>0)return e.reduce(f),Oo&&console.log(l+this.stackID(e)+` (via always-reduce ${a.getName(f&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let h=this.tokens.getActions(e);for(let g=0;g<h.length;){let O=h[g++],v=h[g++],b=h[g++],x=g==h.length||!o,C=x?e:e.split(),k=this.tokens.mainToken;if(C.apply(O,v,k?k.start:C.pos,b),Oo&&console.log(l+this.stackID(C)+` (via ${O&65536?`reduce of ${a.getName(O&65535)}`:"shift"} for ${a.getName(v)} @ ${r}${C==e?"":", split"})`),x)return!0;C.pos>r?t.push(C):o.push(C)}return!1}advanceFully(e,t){let o=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>o)return Pk(e,t),!0}}runRecovery(e,t,o){let r=null,a=!1;for(let l=0;l<e.length;l++){let f=e[l],h=t[l<<1],g=t[(l<<1)+1],O=Oo?this.stackID(f)+" -> ":"";if(f.deadEnd&&(a||(a=!0,f.restart(),Oo&&console.log(O+this.stackID(f)+" (restarted)"),this.advanceFully(f,o))))continue;let v=f.split(),b=O;for(let x=0;v.forceReduce()&&x<10&&(Oo&&console.log(b+this.stackID(v)+" (via force-reduce)"),!this.advanceFully(v,o));x++)Oo&&(b=this.stackID(v)+" -> ");for(let x of f.recoverByInsert(h))Oo&&console.log(O+this.stackID(x)+" (via recover-insert)"),this.advanceFully(x,o);this.stream.end>f.pos?(g==f.pos&&(g++,h=0),f.recoverByDelete(h,g),Oo&&console.log(O+this.stackID(f)+` (via recover-delete ${this.parser.getName(h)})`),Pk(f,o)):(!r||r.score<f.score)&&(r=f)}return r}stackToTree(e){return e.close(),nn.build({buffer:tf.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Qg||(Qg=new WeakMap)).get(e);return t||Qg.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function Pk(n,e){for(let t=0;t<e.length;t++){let o=e[t];if(o.pos==n.pos&&o.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class sj{constructor(e,t,o){this.source=e,this.flags=t,this.disabled=o}allows(e){return!this.disabled||this.disabled[e]==0}}const Dg=n=>n;class lj{constructor(e){this.start=e.start,this.shift=e.shift||Dg,this.reduce=e.reduce||Dg,this.reuse=e.reuse||Dg,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class rf extends gS{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let f=0;f<e.repeatNodeCount;f++)t.push("");let o=Object.keys(e.topRules).map(f=>e.topRules[f][1]),r=[];for(let f=0;f<t.length;f++)r.push([]);function a(f,h,g){r[f].push([h,h.deserialize(String(g))])}if(e.nodeProps)for(let f of e.nodeProps){let h=f[0];typeof h=="string"&&(h=dt[h]);for(let g=1;g<f.length;){let O=f[g++];if(O>=0)a(O,h,f[g++]);else{let v=f[g+-O];for(let b=-O;b>0;b--)a(f[g++],h,v);g++}}}this.nodeSet=new Wm(t.map((f,h)=>qn.define({name:h>=this.minRepeatTerm?void 0:f,id:h,props:r[h],top:o.indexOf(h)>-1,error:h==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(h)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=cS;let l=xc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let f=0;f<this.specializerSpecs.length;f++)this.specialized[f]=this.specializerSpecs[f].term;this.specializers=this.specializerSpecs.map(_k),this.states=xc(e.states,Uint32Array),this.data=xc(e.stateData),this.goto=xc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(f=>typeof f=="number"?new Qs(l,f):f),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,o){let r=new aj(this,e,t,o);for(let a of this.wrappers)r=a(r,e,t,o);return r}getGoto(e,t,o=!1){let r=this.goto;if(t>=r[0])return-1;for(let a=r[t+1];;){let l=r[a++],f=l&1,h=r[a++];if(f&&o)return h;for(let g=a+(l>>1);a<g;a++)if(r[a]==e)return h;if(f)return-1}}hasAction(e,t){let o=this.data;for(let r=0;r<2;r++)for(let a=this.stateSlot(e,r?2:1),l;;a+=3){if((l=o[a])==65535)if(o[a+1]==1)l=o[a=Bi(o,a+2)];else{if(o[a+1]==2)return Bi(o,a+2);break}if(l==t||l==0)return Bi(o,a+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,o=>o==t?!0:null)}allActions(e,t){let o=this.stateSlot(e,4),r=o?t(o):void 0;for(let a=this.stateSlot(e,1);r==null;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=Bi(this.data,a+2);else break;r=t(Bi(this.data,a+1))}return r}nextStates(e){let t=[];for(let o=this.stateSlot(e,1);;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Bi(this.data,o+2);else break;if(!(this.data[o+2]&1)){let r=this.data[o+1];t.some((a,l)=>l&1&&a==r)||t.push(this.data[o],r)}}return t}configure(e){let t=Object.assign(Object.create(rf.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let o=this.topRules[e.top];if(!o)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=o}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(o=>{let r=e.tokenizers.find(a=>a.from==o);return r?r.to:o})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((o,r)=>{let a=e.specializers.find(f=>f.from==o.external);if(!a)return o;let l=Object.assign(Object.assign({},o),{external:a.to});return t.specializers[r]=_k(l),l})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),o=t.map(()=>!1);if(e)for(let a of e.split(" ")){let l=t.indexOf(a);l>=0&&(o[l]=!0)}let r=null;for(let a=0;a<t.length;a++)if(!o[a])for(let l=this.dialects[t[a]],f;(f=this.data[l++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[f]=1;return new sj(e,o,r)}static deserialize(e){return new rf(e)}}function Bi(n,e){return n[e]|n[e+1]<<16}function cj(n){let e=null;for(let t of n){let o=t.p.stoppedAt;(t.pos==t.p.stream.end||o!=null&&t.pos>o)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function _k(n){if(n.external){let e=n.extend?1:0;return(t,o)=>n.external(t,o)<<1|e}return n.get}const uj=312,Ek=1,dj=2,fj=3,hj=4,pj=313,mj=315,gj=316,Oj=5,vj=6,yj=0,Bg=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Tk=125,bj=59,Lg=47,xj=42,wj=43,Sj=45,Cj=60,kj=44,Pj=63,_j=46,Ej=new lj({start:!1,shift(n,e){return e==Oj||e==vj||e==mj?n:e==gj},strict:!1}),Tj=new of((n,e)=>{let{next:t}=n;(t==Tk||t==-1||e.context)&&n.acceptToken(pj)},{contextual:!0,fallback:!0}),Nj=new of((n,e)=>{let{next:t}=n,o;Bg.indexOf(t)>-1||t==Lg&&((o=n.peek(1))==Lg||o==xj)||t!=Tk&&t!=bj&&t!=-1&&!e.context&&n.acceptToken(uj)},{contextual:!0}),Aj=new of((n,e)=>{let{next:t}=n;if(t==wj||t==Sj){if(n.advance(),t==n.next){n.advance();let o=!e.context&&e.canShift(Ek);n.acceptToken(o?Ek:dj)}}else t==Pj&&n.peek(1)==_j&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(fj))},{contextual:!0});function Vg(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const Mj=new of((n,e)=>{if(n.next!=Cj||!e.dialectEnabled(yj)||(n.advance(),n.next==Lg))return;let t=0;for(;Bg.indexOf(n.next)>-1;)n.advance(),t++;if(Vg(n.next,!0)){for(n.advance(),t++;Vg(n.next,!1);)n.advance(),t++;for(;Bg.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==kj)return;for(let o=0;;o++){if(o==7){if(!Vg(n.next,!0))return;break}if(n.next!="extends".charCodeAt(o))break;n.advance(),t++}}n.acceptToken(hj,-t)}),Rj=OS({"get set async static":fe.modifier,"for while do if else switch try catch finally return throw break continue default case":fe.controlKeyword,"in of await yield void typeof delete instanceof":fe.operatorKeyword,"let var const using function class extends":fe.definitionKeyword,"import export from":fe.moduleKeyword,"with debugger as new":fe.keyword,TemplateString:fe.special(fe.string),super:fe.atom,BooleanLiteral:fe.bool,this:fe.self,null:fe.null,Star:fe.modifier,VariableName:fe.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":fe.function(fe.variableName),VariableDefinition:fe.definition(fe.variableName),Label:fe.labelName,PropertyName:fe.propertyName,PrivatePropertyName:fe.special(fe.propertyName),"CallExpression/MemberExpression/PropertyName":fe.function(fe.propertyName),"FunctionDeclaration/VariableDefinition":fe.function(fe.definition(fe.variableName)),"ClassDeclaration/VariableDefinition":fe.definition(fe.className),PropertyDefinition:fe.definition(fe.propertyName),PrivatePropertyDefinition:fe.definition(fe.special(fe.propertyName)),UpdateOp:fe.updateOperator,"LineComment Hashbang":fe.lineComment,BlockComment:fe.blockComment,Number:fe.number,String:fe.string,Escape:fe.escape,ArithOp:fe.arithmeticOperator,LogicOp:fe.logicOperator,BitOp:fe.bitwiseOperator,CompareOp:fe.compareOperator,RegExp:fe.regexp,Equals:fe.definitionOperator,Arrow:fe.function(fe.punctuation),": Spread":fe.punctuation,"( )":fe.paren,"[ ]":fe.squareBracket,"{ }":fe.brace,"InterpolationStart InterpolationEnd":fe.special(fe.brace),".":fe.derefOperator,", ;":fe.separator,"@":fe.meta,TypeName:fe.typeName,TypeDefinition:fe.definition(fe.typeName),"type enum interface implements namespace module declare":fe.definitionKeyword,"abstract global Privacy readonly override":fe.modifier,"is keyof unique infer":fe.operatorKeyword,JSXAttributeValue:fe.attributeValue,JSXText:fe.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":fe.angleBracket,"JSXIdentifier JSXNameSpacedName":fe.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":fe.attributeName,"JSXBuiltin/JSXIdentifier":fe.standard(fe.tagName)}),Ij={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Qj={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Dj={__proto__:null,"<":187},Bj=rf.deserialize({version:14,states:"$BUQ%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOQ`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOO<nQWO'#HRO>VQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UOFkQMnO'#D`OOOO'#I_'#I_OFrO!0LbO,59xOOQ?Mr,59x,59xOGQQ^O'#I`OGeQWO'#JoOIdQrO'#JoO+}Q^O'#JoOIkQWO,5:OOJRQWO'#EmOJ`QWO'#KOOJkQWO'#J}OJkQWO'#J}OJsQWO,5;ZOJxQWO'#J|OOQ?Mv,5:Z,5:ZOKPQ^O,5:ZOL}Q?NdO,5:cOMnQWO,5:kONXQ?MxO'#J{ON`QWO'#JzO9WQWO'#JzONtQWO'#JzON|QWO,5;YO! RQWO'#JzO!#WQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#vQrO,5:pOOQQ'#Ju'#JuOOQO-E<f-E<fO9^QWO,5=[O!$^QWO,5=[O!$cQ^O,5;WO!&fQ7[O'#EhO!(PQWO,5;WO!(UQ^O'#DvO!(`Q`O,5;aO!(hQ`O,5;aO%[Q^O,5;aOOQU'#FS'#FSOOQU'#FU'#FUO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bOOQU'#FY'#FYO!(vQ^O,5;sOOQ?Mr,5;x,5;xOOQ?Mr,5;y,5;yOOQ?Mr,5;{,5;{O%[Q^O'#IlO!*yQ?MxO,5<gO%[Q^O,5;bO!&fQ7[O,5;bO!+hQ7[O,5;bO!-YQ7[O'#EZO%[Q^O,5;vOOQ?Mr,5;z,5;zO!-aQ&jO'#FiO!.^Q&jO'#KSO!-xQ&jO'#KSO!.eQ&jO'#KSOOQO'#KS'#KSO!.yQ&jO,5<ROOOS,5<_,5<_O!/[Q^O'#FuOOOS'#Ik'#IkO7VO,YO,5<PO!/cQ&jO'#FwOOQ?Mr,5<P,5<PO!0SQ!LQO'#CvOOQ?Mr'#Cz'#CzO!0gO!0LbO'#DOO!1TQ7[O,5<dO!1[QWO,5<fO!2wQ$ISO'#GVO!3UQWO'#GWO!3ZQWO'#GWO!4yQ$ISO'#G[O!5uQ`O'#G`OOQO'#Gk'#GkO!+oQ7[O'#GjOOQO'#Gm'#GmO!+oQ7[O'#GlO!6hQ!LQO'#JgOOQ?Mr'#Jg'#JgO!6rQWO'#JfO!7QQWO'#JeO!7YQWO'#CuOOQ?Mr'#Cx'#CxO!7bQWO'#CzOOQ?Mr'#DS'#DSOOQ?Mr'#DU'#DUO1SQWO'#DWO!+oQ7[O'#F}O!+oQ7[O'#GPO!7gQWO'#GRO!7lQWO'#GSO!3ZQWO'#GYO!+oQ7[O'#G_O!7qQWO'#EnO!8`QWO,5<eOOQ?Mp'#Cr'#CrO!8hQWO'#EoO!9bQ`O'#EpOOQ?Mp'#J|'#J|O!9iQ?MxO'#K]O9hQ?MxO,5=`O`Q^O,5>pOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-E<X-E<XO!;hQ?NdO,5:_O!9]Q`O,5:]O!>RQ?NdO,5:gO%[Q^O,5:gO!@iQ?NdO,5:iOOQO,5@v,5@vO!AYQ7[O,5=[O!AhQ?MxO'#JdO9RQWO'#JdO!AyQ?MxO,59ZO!BUQ`O,59ZO!B^Q7[O,59ZO:VQ7[O,59ZO!BiQWO,5;WO!BqQWO'#H^O!CVQWO'#K`O%[Q^O,5;|O!9]Q`O,5<OO!C_QWO,5=wO!CdQWO,5=wO!CiQWO,5=wO9hQ?MxO,5=wO;wQWO,5=gOOQO'#Cv'#CvO!CwQ`O,5=dO!DPQ7[O,5=eO!D[QWO,5=gO!DaQpO,5=jO!DiQWO'#K[O>tQWO'#HTO9^QWO'#HVO!DnQWO'#HVO:VQ7[O'#HXO!DsQWO'#HXOOQU,5=m,5=mO!DxQWO'#HYO!EZQWO'#CoO!E`QWO,59PO!EjQWO,59PO!GoQ^O,59POOQU,59P,59PO!HPQ?MxO,59PO%[Q^O,59PO!J[Q^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JrQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JwQWO,5>TO`Q^O,5>VO!J|QWO,5>YO!KRQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# ]QWO,5>jOOQU,5>l,5>lO# ]QWO,5>lOOQU,5>n,5>nO# yQ`O'#D[O%[Q^O'#JqO#!TQ`O'#JqO#!rQ`O'#DjO##TQ`O'#DjO#%fQ^O'#DjO#%mQWO'#JpO#%uQWO,5:TO#%zQWO'#EqO#&YQWO'#KPO#&bQWO,5;[O#&gQ`O'#DjO#&tQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&{QWO,5:lO>tQWO,5;VO!BUQ`O,5;VO!B^Q7[O,5;VO:VQ7[O,5;VO#'TQWO,5@]O#'YQ(CYO,5:pOOQO-E<b-E<bO#(`Q?NQO,5;OOCrQ`O,5:oO#(jQ`O,5:oOCrQ`O,5;OO!AyQ?MxO,5:oOOQ?Mp'#Eg'#EgOOQO,5;O,5;OO%[Q^O,5;OO#(wQ?MxO,5;OO#)SQ?MxO,5;OO!BUQ`O,5:oOOQO,5;U,5;UO#)bQ?MxO,5;OPOOO'#IY'#IYP#)vO#@ItO,58|POOO,58|,58|OOOO-E<Y-E<YOOQ?Mr1G.p1G.pOOOO-E<Z-E<ZOOOO,59z,59zO#*RQpO,59zOOOO-E<]-E<]OOQ?Mr1G/d1G/dO#*WQrO,5>zO+}Q^O,5>zOOQO,5?Q,5?QO#*bQ^O'#I`OOQO-E<^-E<^O#*oQWO,5@ZO#*wQrO,5@ZO#+OQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+WQWO'#IfOOQO-E<d-E<dO#+OQWO,5@iOOQ?Mp1G0u1G0uOOQ?Mv1G/u1G/uOOQ?Mv1G0V1G0VO%[Q^O,5@gO#+lQ?MxO,5@gO#+}Q?MxO,5@gO#,UQWO,5@fO9WQWO,5@fO#,^QWO,5@fO#,lQWO'#IiO#,UQWO,5@fOOQ?Mp1G0t1G0tO!(`Q`O,5:rO!(kQ`O,5:rOOQQ,5:t,5:tO#-^QYO,5:tO#-fQ7[O1G2vO9^QWO1G2vOOQ?Mr1G0r1G0rO#-tQ?NdO1G0rO#.yQ?NbO,5;SOOQ?Mr'#GU'#GUO#/gQ?NdO'#JgO!$cQ^O1G0rO#1oQrO'#JrO%[Q^O'#JrO#1yQWO,5:bOOQ?Mr'#D['#D[OOQ?Mr1G0{1G0{O%[Q^O1G0{OOQ?Mr1G1e1G1eO#2OQWO1G0{O#4dQ?NdO1G0|O#4kQ?NdO1G0|O#7RQ?NdO1G0|O#7YQ?NdO1G0|O#9pQ?NdO1G0|O#<WQ?NdO1G0|O#<_Q?NdO1G0|O#<fQ?NdO1G0|O#>|Q?NdO1G0|O#?TQ?NdO1G0|O#AbQ07bO'#CiO#C]Q07bO1G1_O#CdQ07bO'#JnO#CwQ?NdO,5?WOOQ?Mp-E<j-E<jO#FUQ?NdO1G0|O#GRQ?NdO1G0|OOQ?Mr1G0|1G0|O#HRQ7[O'#JwO#H]QWO,5:uO#HbQ?NdO1G1bO#IUQ&jO,5<VO#I^Q&jO,5<WO#IfQ&jO'#FnO#I}QWO'#FmOOQO'#KT'#KTOOQO'#Ij'#IjO#JSQ&jO1G1mOOQ?Mr1G1m1G1mOOOS1G1x1G1xO#JeQ07bO'#JmO#JoQWO,5<aO!(vQ^O,5<aOOOS-E<i-E<iOOQ?Mr1G1k1G1kO#JtQ`O'#KSOOQ?Mr,5<c,5<cO#J|Q`O,5<cO#KRQ7[O'#DQOOOO'#I^'#I^O#KYO!0LbO,59jOOQ?Mr,59j,59jO%[Q^O1G2OO!7lQWO'#InO#KeQ7[O,5<xOOQ?Mr,5<u,5<uO!+oQ7[O'#IqO#LTQ7[O,5=UO!+oQ7[O'#IsO#LvQ7[O,5=WO!&fQ7[O,5=YOOQO1G2Q1G2QO#MQQpO'#CrO#MeQ$ISO'#EoO#NdQ`O'#G`O$ QQpO,5<qO$ XQWO'#KWO9WQWO'#KWO$ gQWO,5<sO!+oQ7[O,5<rO$ lQWO'#GXO$ }QWO,5<rO$!SQpO'#GUO$!aQpO'#KXO$!kQWO'#KXO!&fQ7[O'#KXO$!pQWO,5<vO$!uQ`O'#GaO!5pQ`O'#GaO$#WQWO'#GcO$#]QWO'#GeO!3ZQWO'#GhO$#bQ?MxO'#IpO$#mQ`O,5<zOOQ?Mv,5<z,5<zO$#tQ`O'#GaO$$SQ`O'#GbO$$[Q`O'#GbO$$aQ7[O,5=UO$$qQ7[O,5=WOOQ?Mr,5=Z,5=ZO!+oQ7[O,5@QO!+oQ7[O,5@QO$%RQWO'#IuO$%^QWO,5@PO$%fQWO,59aOOQ?Mr,59f,59fO$&YQ!LSO,59rOOQ?Mr'#Jk'#JkO$&{Q7[O,5<iO$'nQ7[O,5<kO@fQWO,5<mOOQ?Mr,5<n,5<nO$'xQWO,5<tO$'}Q7[O,5<yO$(_QWO'#JzO!$cQ^O1G2PO$(dQWO1G2PO9WQWO'#J}O9WQWO'#EqO%[Q^O'#EqO9WQWO'#IwO$(iQ?MxO,5@wOOQU1G2z1G2zOOQU1G4[1G4[OOQ?Mr1G/y1G/yOOQ?Mr1G/w1G/wO$*kQ?NdO1G0ROOQU1G2v1G2vO!&fQ7[O1G2vO%[Q^O1G2vO#-iQWO1G2vO$,oQ7[O'#EhOOQ?Mp,5@O,5@OO$,yQ?MxO,5@OOOQU1G.u1G.uO!AyQ?MxO1G.uO!BUQ`O1G.uO!B^Q7[O1G.uO$-[QWO1G0rO$-aQWO'#CiO$-lQWO'#KaO$-tQWO,5=xO$-yQWO'#KaO$.OQWO'#KaO$.^QWO'#I}O$.lQWO,5@zO$.tQrO1G1hOOQ?Mr1G1j1G1jO9^QWO1G3cO@fQWO1G3cO$.{QWO1G3cO$/QQWO1G3cOOQU1G3c1G3cO!D[QWO1G3RO!&fQ7[O1G3OO$/VQWO1G3OOOQU1G3P1G3PO!&fQ7[O1G3PO$/[QWO1G3PO$/dQ`O'#G}OOQU1G3R1G3RO!5pQ`O'#IyO!DaQpO1G3UOOQU1G3U1G3UOOQU,5=o,5=oO$/lQ7[O,5=qO9^QWO,5=qO$#]QWO,5=sO9RQWO,5=sO!BUQ`O,5=sO!B^Q7[O,5=sO:VQ7[O,5=sO$/zQWO'#K_O$0VQWO,5=tOOQU1G.k1G.kO$0[Q?MxO1G.kO@fQWO1G.kO$0gQWO1G.kO9hQ?MxO1G.kO$2oQrO,5@|O$2|QWO,5@|O9WQWO,5@|O$3XQ^O,5={O$3`QWO,5={OOQU1G3e1G3eO`Q^O1G3eOOQU1G3k1G3kOOQU1G3m1G3mO>oQWO1G3oO$3eQ^O1G3qO$7iQ^O'#HpOOQU1G3t1G3tO$7vQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$8OQ^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$<VQWO,5@]O!(vQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(vQ^O,5:UO!BUQ`O,5:UO$<[Q07bO,5:UOOQO,5;],5;]O$<fQ`O'#IaO$<|QWO,5@[OOQ?Mr1G/o1G/oO$=UQ`O'#IgO$=`QWO,5@kOOQ?Mp1G0v1G0vO##TQ`O,5:UOOQO'#Ic'#IcO$=hQ`O,5:nOOQ?Mv,5:n,5:nO#'OQWO1G0WOOQ?Mr1G0W1G0WO%[Q^O1G0WOOQ?Mr1G0q1G0qO>tQWO1G0qO!BUQ`O1G0qO!B^Q7[O1G0qOOQ?Mp1G5w1G5wO!AyQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$=oQ?MxO1G0jO$=zQ?MxO1G0jO!BUQ`O1G0ZOCrQ`O1G0ZO$>YQ?MxO1G0jOOQO1G0Z1G0ZO$>nQ?NdO1G0jPOOO-E<W-E<WPOOO1G.h1G.hOOOO1G/f1G/fO$>xQpO,5<gO$?QQrO1G4fOOQO1G4l1G4lO%[Q^O,5>zO$?[QWO1G5uO$?dQWO1G6TO$?lQrO1G6UO9WQWO,5?QO$?vQ?NdO1G6RO%[Q^O1G6RO$@WQ?MxO1G6RO$@iQWO1G6QO$@iQWO1G6QO9WQWO1G6QO$@qQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$AVQWO,5?TO$(_QWO,5?TOOQO-E<g-E<gOOQQ1G0^1G0^OOQQ1G0`1G0`O#-aQWO1G0`OOQU7+(b7+(bO!&fQ7[O7+(bO%[Q^O7+(bO$AeQWO7+(bO$ApQ7[O7+(bO$BOQ?NdO,5=UO$DWQ?NdO,5=WO$F`Q?NdO,5=UO$HnQ?NdO,5=WO$J|Q?NdO,59rO$MRQ?NdO,5<iO% ZQ?NdO,5<kO%#cQ?NdO,5<yOOQ?Mr7+&^7+&^O%%qQ?NdO7+&^O%&eQ^O'#IbO%&rQWO,5@^O%&zQrO,5@^OOQ?Mr1G/|1G/|O%'UQWO7+&gOOQ?Mr7+&g7+&gO%'ZQ07bO,5:cO%[Q^O7+&yO%'eQ07bO,5:_O%'rQ07bO,5:gO%'|Q07bO,5:iO%(WQ7[O'#IeO%(bQWO,5@cOOQ?Mr1G0a1G0aOOQO1G1q1G1qOOQO1G1r1G1rO%(jQtO,5<YO!(vQ^O,5<XOOQO-E<h-E<hOOQ?Mr7+'X7+'XOOOS7+'d7+'dOOOS1G1{1G1{O%(uQWO1G1{OOQ?Mr1G1}1G1}OOOO,59l,59lO%(zQpO,59lOOOO-E<[-E<[OOQ?Mr1G/U1G/UO%)RQ?NdO7+'jOOQ?Mr,5?Y,5?YO%)uQpO,5?YOOQ?Mr1G2d1G2dP!&fQ7[O'#InPOQ?Mr-E<l-E<lO%*eQ7[O,5?]OOQ?Mr-E<o-E<oO%+WQ7[O,5?_OOQ?Mr-E<q-E<qO%+bQpO1G2tO%+iQpO'#CrO%,PQ7[O'#J}O%,WQ^O'#EqOOQ?Mr1G2]1G2]O%,bQWO'#ImO%,vQWO,5@rO%,vQWO,5@rO%-OQWO,5@rO%-ZQWO,5@rOOQO1G2_1G2_O%-iQ7[O1G2^O!+oQ7[O1G2^O%-yQ$ISO'#IoO%.WQWO,5@sO!&fQ7[O,5@sO%.`QpO,5@sOOQ?Mr1G2b1G2bOOQ?Mp,5<{,5<{OOQ?Mp,5<|,5<|O$(_QWO,5<|OCcQWO,5<|O!BUQ`O,5<{OOQO'#Gd'#GdO%.jQWO,5<}OOQ?Mp,5=P,5=PO$(_QWO,5=SOOQO,5?[,5?[OOQO-E<n-E<nOOQ?Mv1G2f1G2fO!5pQ`O,5<{O%.rQWO,5<|O$#WQWO,5<}O%.}Q`O,5<|O!+oQ7[O'#IqO%/nQ7[O1G2pO!+oQ7[O'#IsO%0aQ7[O1G2rO%0kQ7[O1G5lO%0uQ7[O1G5lOOQO,5?a,5?aOOQO-E<s-E<sOOQO1G.{1G.{O!9]Q`O,59tO%[Q^O,59tOOQ?Mr,5<h,5<hO%1SQWO1G2XO!+oQ7[O1G2`O%1XQ?NdO7+'kOOQ?Mr7+'k7+'kO!$cQ^O7+'kO%1{QWO,5;]OOQ?Mp,5?c,5?cOOQ?Mp-E<u-E<uO%2QQpO'#KYO#'OQWO7+(bO4UQrO7+(bO$AhQWO7+(bO%2[Q?NbO'#CiO%2oQ?NbO,5=QO%3aQWO,5=QOOQ?Mp1G5j1G5jOOQU7+$a7+$aO!AyQ?MxO7+$aO!BUQ`O7+$aO!$cQ^O7+&^O%3fQWO'#I|O%3}QWO,5@{OOQO1G3d1G3dO9^QWO,5@{O%3}QWO,5@{O%4VQWO,5@{OOQO,5?i,5?iOOQO-E<{-E<{OOQ?Mr7+'S7+'SO%4[QWO7+(}O9hQ?MxO7+(}O9^QWO7+(}O@fQWO7+(}OOQU7+(m7+(mO%4aQ?NbO7+(jO!&fQ7[O7+(jO%4kQpO7+(kOOQU7+(k7+(kO!&fQ7[O7+(kO%4rQWO'#K^O%4}QWO,5=iOOQO,5?e,5?eOOQO-E<w-E<wOOQU7+(p7+(pO%6aQ`O'#HWOOQU1G3]1G3]O!&fQ7[O1G3]O%[Q^O1G3]O%6hQWO1G3]O%6sQ7[O1G3]O9hQ?MxO1G3_O$#]QWO1G3_O9RQWO1G3_O!BUQ`O1G3_O!B^Q7[O1G3_O%7RQWO'#I{O%7gQWO,5@yO%7oQ`O,5@yOOQ?Mp1G3`1G3`OOQU7+$V7+$VO@fQWO7+$VO9hQ?MxO7+$VO%7zQWO7+$VO%[Q^O1G6hO%[Q^O1G6iO%8PQ?MxO1G6hO%8ZQ^O1G3gO%8bQWO1G3gO%8gQ^O1G3gOOQU7+)P7+)PO9hQ?MxO7+)ZO`Q^O7+)]OOQU'#Kd'#KdOOQU'#JO'#JOO%8nQ^O,5>[OOQU,5>[,5>[O%[Q^O'#HqO%8{QWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%9QQ`O1G5wO%9fQ07bO1G0wO%9pQWO1G0wOOQO1G/p1G/pO%9{Q07bO1G/pO>tQWO1G/pO!(vQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-E<e-E<eO!BUQ`O1G/pOOQO-E<a-E<aOOQ?Mv1G0Y1G0YOOQ?Mr7+%r7+%rO#'OQWO7+%rOOQ?Mr7+&]7+&]O>tQWO7+&]O!BUQ`O7+&]OOQO7+%u7+%uO$>nQ?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%:VQ?MxO7+&UO!AyQ?MxO7+%uO!BUQ`O7+%uO%:bQ?MxO7+&UO%:pQ?NdO7++mO%[Q^O7++mO%;QQWO7++lO%;QQWO7++lOOQO1G4o1G4oO9WQWO1G4oO%;YQWO1G4oOOQQ7+%z7+%zO#'OQWO<<K|O4UQrO<<K|O%;hQWO<<K|OOQU<<K|<<K|O!&fQ7[O<<K|O%[Q^O<<K|O%;pQWO<<K|O%;{Q?NdO,5?]O%>TQ?NdO,5?_O%@]Q?NdO1G2^O%BkQ?NdO1G2pO%DsQ?NdO1G2rO%F{QrO,5>|O%[Q^O,5>|OOQO-E<`-E<`O%GVQWO1G5xOOQ?Mr<<JR<<JRO%G_Q07bO1G0rO%IfQ07bO1G0|O%ImQ07bO1G0|O%KnQ07bO1G0|O%KuQ07bO1G0|O%MvQ07bO1G0|O& wQ07bO1G0|O&!OQ07bO1G0|O&!VQ07bO1G0|O&$WQ07bO1G0|O&$_Q07bO1G0|O&$fQ?NdO<<JeO&&^Q07bO1G0|O&'ZQ07bO1G0|O&(ZQ07bO'#JgO&*^Q07bO1G1bO&*kQ07bO1G0RO&*uQ7[O,5?POOQO-E<c-E<cO!(vQ^O'#FpOOQO'#KU'#KUOOQO1G1t1G1tO&+PQWO1G1sO&+UQ07bO,5?WOOOS7+'g7+'gOOOO1G/W1G/WOOQ?Mr1G4t1G4tO!+oQ7[O7+(`O&-fQrO'#CiO&-pQWO,5?XO9WQWO,5?XOOQO-E<k-E<kO&.OQWO1G6^O&.OQWO1G6^O&.WQWO1G6^O&.cQ7[O7+'xO&.sQpO,5?ZO&.}QWO,5?ZO!&fQ7[O,5?ZOOQO-E<m-E<mO&/SQpO1G6_O&/^QWO1G6_OOQ?Mp1G2h1G2hO$(_QWO1G2hOOQ?Mp1G2g1G2gO&/fQWO1G2iO!&fQ7[O1G2iOOQ?Mp1G2n1G2nO!BUQ`O1G2gOCcQWO1G2hO&/kQWO1G2iO&/sQWO1G2hO$#WQWO1G2iO&0gQ7[O,5?]OOQ?Mr-E<p-E<pO&1YQ7[O,5?_OOQ?Mr-E<r-E<rO!+oQ7[O7++WOOQ?Mr1G/`1G/`O&1dQWO1G/`OOQ?Mr7+'s7+'sO&1iQ7[O7+'zO&1yQ?NdO<<KVOOQ?Mr<<KV<<KVO&2mQWO1G0wO!&fQ7[O'#IvO&2rQWO,5@tO&4tQrO<<K|O!&fQ7[O1G2lOOQU<<G{<<G{O!AyQ?MxO<<G{O&4{Q?NdO<<IxOOQ?Mr<<Ix<<IxOOQO,5?h,5?hO&5oQWO,5?hO&5tQWO,5?hOOQO-E<z-E<zO&6SQWO1G6gO&6SQWO1G6gO9^QWO1G6gO@fQWO<<LiOOQU<<Li<<LiO&6[QWO<<LiO9hQ?MxO<<LiOOQU<<LU<<LUO%4aQ?NbO<<LUOOQU<<LV<<LVO%4kQpO<<LVO&6aQ`O'#IxO&6lQWO,5@xO!(vQ^O,5@xOOQU1G3T1G3TO%,WQ^O'#JqOOQO'#Iz'#IzO9hQ?MxO'#IzO&6tQ`O,5=rOOQU,5=r,5=rO&6{Q`O'#EdO&7aQ`O'#GcO&7fQWO7+(wO&7kQWO7+(wOOQU7+(w7+(wO!&fQ7[O7+(wO%[Q^O7+(wO&7sQWO7+(wOOQU7+(y7+(yO9hQ?MxO7+(yO$#]QWO7+(yO9RQWO7+(yO!BUQ`O7+(yO&8OQWO,5?gOOQO-E<y-E<yOOQO'#HZ'#HZO&8ZQWO1G6eO9hQ?MxO<<GqOOQU<<Gq<<GqO@fQWO<<GqO&8cQWO7+,SO&8hQWO7+,TO%[Q^O7+,SO%[Q^O7+,TOOQU7+)R7+)RO&8mQWO7+)RO&8rQ^O7+)RO&8yQWO7+)ROOQU<<Lu<<LuOOQU<<Lw<<LwOOQU-E<|-E<|OOQU1G3v1G3vO&9OQWO,5>]OOQU,5>_,5>_O&9TQWO1G3|O9WQWO7+&cO!(vQ^O7+&cOOQO7+%[7+%[O&9YQ07bO1G6UO>tQWO7+%[OOQ?Mr<<I^<<I^OOQ?Mr<<Iw<<IwO>tQWO<<IwOOQO<<Ip<<IpO$>nQ?NdO<<IpO%[Q^O<<IpOOQO<<Ia<<IaO!AyQ?MxO<<IaO&9dQ?MxO<<IpO&9oQ?NdO<= XO&:PQWO<= WOOQO7+*Z7+*ZO9WQWO7+*ZOOQUANAhANAhO&:XQrOANAhO!&fQ7[OANAhO#'OQWOANAhO4UQrOANAhO&:`QWOANAhO%[Q^OANAhO&:hQ?NdO7+'xO&<vQ?NdO,5?]O&?OQ?NdO,5?_O&AWQ?NdO7+'zO&CfQrO1G4hO&CpQ07bO7+&^O&EqQ07bO,5=UO&GuQ07bO,5=WO&HVQ07bO,5=UO&HgQ07bO,5=WO&HwQ07bO,59rO&JzQ07bO,5<iO&LzQ07bO,5<kO' ]Q07bO,5<yO'#OQ07bO7+'jO'#]Q07bO7+'kO'#jQWO,5<[OOQO7+'_7+'_O'#oQ7[O<<KzOOQO1G4s1G4sO'#vQWO1G4sO'$RQWO1G4sO'$aQWO7++xO'$aQWO7++xO!&fQ7[O1G4uO'$iQpO1G4uO'$sQWO7++yOOQ?Mp7+(S7+(SO'${QWO7+(TO'%WQpO7+(TOOQ?Mp7+(R7+(RO$(_QWO7+(SO'%bQWO7+(TO!&fQ7[O7+(TOCcQWO7+(SO'%gQWO7+(TO'%oQ7[O<<NrOOQ?Mr7+$z7+$zO'%yQpO,5?bOOQO-E<t-E<tO'&TQ?NbO7+(WOOQUAN=gAN=gO9^QWO1G5SOOQO1G5S1G5SO'&eQWO1G5SO'&jQWO7+,RO'&jQWO7+,RO9hQ?MxOANBTO@fQWOANBTOOQUANBTANBTOOQUANApANApOOQUANAqANAqO'&rQWO,5?dOOQO-E<v-E<vO'&}Q07bO1G6dOOQO,5?f,5?fOOQO-E<x-E<xOOQU1G3^1G3^O%,WQ^O,5<}O''XQWO,5<}OOQU<<Lc<<LcO!&fQ7[O<<LcO&7fQWO<<LcO''^QWO<<LcO%[Q^O<<LcOOQU<<Le<<LeO9hQ?MxO<<LeO$#]QWO<<LeO9RQWO<<LeO''fQ`O1G5RO''qQWO7+,POOQUAN=]AN=]O9hQ?MxOAN=]OOQU<= n<= nOOQU<= o<= oO''yQWO<= nO'(OQWO<= oOOQU<<Lm<<LmO'(TQWO<<LmO'(YQ^O<<LmOOQU1G3w1G3wO>tQWO7+)hO'(aQWO<<I}O'(lQ07bO<<I}OOQO<<Hv<<HvOOQ?MrAN?cAN?cOOQOAN?[AN?[O$>nQ?NdOAN?[OOQOAN>{AN>{O%[Q^OAN?[OOQO<<Mu<<MuOOQUG27SG27SO!&fQ7[OG27SO#'OQWOG27SO'(vQrOG27SO4UQrOG27SO'(}QWOG27SO')VQ07bO<<JeO')dQ07bO1G2^O'+VQ07bO,5?]O'-VQ07bO,5?_O'/VQ07bO1G2pO'1VQ07bO1G2rO'3VQ07bO<<KVO'3dQ07bO<<IxOOQO1G1v1G1vO!+oQ7[OANAfOOQO7+*_7+*_O'3qQWO7+*_O'3|QWO<= dO'4UQpO7+*aOOQ?Mp<<Ko<<KoO$(_QWO<<KoOCcQWO<<KoO'4`QWO<<KoO!&fQ7[O<<KoOOQ?Mp<<Kn<<KnO'4kQpO<<KoO$(_QWO<<KnO'4uQWO<<KoO!&fQ7[O<<KoOOQO7+*n7+*nO9^QWO7+*nO'4zQWO<= mOOQUG27oG27oO9hQ?MxOG27oO!(vQ^O1G5OO'5SQWO7+,OO&7fQWOANA}OOQUANA}ANA}O!&fQ7[OANA}O'5[QWOANA}OOQUANBPANBPO9hQ?MxOANBPO$#]QWOANBPOOQO'#H['#H[OOQO7+*m7+*mOOQUG22wG22wOOQUANEYANEYOOQUANEZANEZOOQUANBXANBXO'5dQWOANBXOOQU<<MS<<MSO!(vQ^OAN?iOOQOG24vG24vO$>nQ?NdOG24vO#'OQWOLD,nOOQULD,nLD,nO!&fQ7[OLD,nO'5iQrOLD,nO'5pQ07bO7+'xO'7cQ07bO,5?]O'9cQ07bO,5?_O';cQ07bO7+'zO'=UQ7[OG27QOOQO<<My<<MyOOQ?MpANAZANAZO$(_QWOANAZOCcQWOANAZO'=fQpOANAZO'=mQWOANAZO!&fQ7[OANAZOOQ?MpANAYANAYO'=xQpOANAZOOQO<<NY<<NYOOQULD-ZLD-ZO'>SQ07bO7+*jOOQUG27iG27iO&7fQWOG27iO!&fQ7[OG27iOOQUG27kG27kO9hQ?MxOG27kOOQUG27sG27sO'>^Q07bOG25TOOQOLD*bLD*bOOQU!$(!Y!$(!YO#'OQWO!$(!YO!&fQ7[O!$(!YO'>hQ?NdOG27QOOQ?MpG26uG26uO$(_QWOG26uO'@vQWOG26uOCcQWOG26uO'ARQpOG26uO!&fQ7[OG26uOOQULD-TLD-TO&7fQWOLD-TOOQULD-VLD-VOOQU!)9Et!)9EtO#'OQWO!)9EtOOQ?MpLD,aLD,aO$(_QWOLD,aOCcQWOLD,aO'AYQWOLD,aO'AeQpOLD,aOOQU!$(!o!$(!oOOQU!.K;`!.K;`O'AlQ07bOG27QOOQ?Mp!$( {!$( {O$(_QWO!$( {OCcQWO!$( {O'C_QWO!$( {OOQ?Mp!)9Eg!)9EgO$(_QWO!)9EgOCcQWO!)9EgOOQ?Mp!.K;R!.K;RO$(_QWO!.K;ROOQ?Mp!4/0m!4/0mO!(vQ^O'#DwO1PQWO'#EUO'CjQrO'#JmO'CqQMnO'#DsO'CxQ^O'#D{O'DPQrO'#CiO'FgQrO'#CiO!(vQ^O'#D}O'FwQ^O,5;WO!(vQ^O,5;bO!(vQ^O,5;bO!(vQ^O,5;bO!(vQ^O,5;bO!(vQ^O,5;bO!(vQ^O,5;bO!(vQ^O,5;bO!(vQ^O,5;bO!(vQ^O,5;bO!(vQ^O,5;bO!(vQ^O'#IlO'HzQWO,5<gO!(vQ^O,5;bO'ISQ7[O,5;bO'JmQ7[O,5;bO!(vQ^O,5;vO!&fQ7[O'#GjO'ISQ7[O'#GjO!&fQ7[O'#GlO'ISQ7[O'#GlO1SQWO'#DWO1SQWO'#DWO!&fQ7[O'#F}O'ISQ7[O'#F}O!&fQ7[O'#GPO'ISQ7[O'#GPO!&fQ7[O'#G_O'ISQ7[O'#G_O!(vQ^O,5:gO'JtQ`O'#D[O!(vQ^O,5@jO'FwQ^O1G0rO'KOQ07bO'#CiO!(vQ^O1G2OO!&fQ7[O'#IqO'ISQ7[O'#IqO!&fQ7[O'#IsO'ISQ7[O'#IsO'KYQpO'#CrO!&fQ7[O,5<rO'ISQ7[O,5<rO'FwQ^O1G2PO!(vQ^O7+&yO!&fQ7[O1G2^O'ISQ7[O1G2^O!&fQ7[O'#IqO'ISQ7[O'#IqO!&fQ7[O'#IsO'ISQ7[O'#IsO!&fQ7[O1G2`O'ISQ7[O1G2`O'FwQ^O7+'kO'FwQ^O7+&^O!&fQ7[OANAfO'ISQ7[OANAfO'KmQWO'#ElO'KrQWO'#ElO'KzQWO'#F[O'LPQWO'#EvO'LUQWO'#KOO'LaQWO'#J|O'LlQWO,5;WO'LqQ7[O,5<dO'LxQWO'#GWO'L}QWO'#GWO'MSQWO,5<eO'M[QWO,5;WO'MdQ07bO1G1_O'MkQWO,5<rO'MpQWO,5<rO'MuQWO,5<tO'MzQWO,5<tO'NPQWO1G2PO'NUQWO1G0rO'NZQ7[O<<KzO'NbQ7[O<<KzO7eQ7[O'#FzO9RQWO'#FyOAaQWO'#EkO!(vQ^O,5;sO!3ZQWO'#GWO!3ZQWO'#GWO!3ZQWO'#GYO!3ZQWO'#GYO!+oQ7[O7+(`O!+oQ7[O7+(`O%+bQpO1G2tO%+bQpO1G2tO!&fQ7[O,5=YO!&fQ7[O,5=Y",stateData:"( f~O'wOS'xOSTOS'yRQ~OPYOQYOSfOY!VOaqOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!rwO!uxO!y]O#t!PO$V|O%e}O%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO&S!WO&Y!XO&[!YO&^!ZO&`![O&c!]O&i!^O&o!_O&q!`O&s!aO&u!bO&w!cO(OSO(QTO(TUO([VO(j[O(yiO~OWtO~P`OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa!wOp!nO!P!oO!_!yO!`!vO!a!vO!y;bO#Q!pO#R!pO#S!xO#T!pO#U!pO#X!zO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O'y!{O~OP]XR]X[]Xa]Xo]X}]X!P]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X'u]X([]X(m]X(t]X(u]X~O!d%PX~P(qO_!}O(Q#PO(R!}O(S#PO~O_#QO(S#PO(T#PO(U#QO~Ou#SO!R#TO(]#TO(^#VO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O;fO(QTO(TUO([VO(j[O(yiO~O!X#ZO!Y#WO!V(cP!V(qP~P+}O!Z#cO~P`OPYOQYOSfOd!jOe!iOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(QTO(TUO([VO(j[O(yiO~Om#mO!X#iO!y]O#f#lO#g#iO(O;gO!h(nP~P.iO!i#oO(O#nO~O!u#sO!y]O%e#tO~O#h#uO~O!d#vO#h#uO~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y$_O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~Oa(aX'u(aX's(aX!h(aX!V(aX![(aX%f(aX!d(aX~P1qO#P$dO#]$eO$P$eOP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#s(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX![(bX%f(bX~Oa(bX'u(bX's(bX!V(bX!h(bXs(bX!d(bX~P4UO#]$eO~O$[$hO$^$gO$e$mO~OSfO![$nO$h$oO$j$qO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(O$sO(QTO(TUO([$uO(t$}O(u%POg(XP~O!i%cO~O!P%fO![%gO(O%eO~O!d%kO~Oa%lO'u%lO~O}%pO~P%[O(P!lO~P%[O%k%tO~P%[Oh%VO!i%cO(O%eO(P!lO~Oe%{O!i%cO(O%eO~O#s$RO~O}&QO![%}O!i&PO%g&TO(O%eO(P!lO(QTO(TUO`)SP~O!u#sO~O%p&VO!P)OX![)OX(O)OX~O(O&WO~O!r&]O#t!PO%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO~Od&bOe&aO!u&_O%e&`O%x&^O~P;|Od&eOeyO![&dO!r&]O!uxO!y]O#t!PO%e}O%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO~Ob&hO#]&kO%g&fO(P!lO~P=RO!i&lO!r&pO~O!i#oO~O![XO~Oa%lO't&xO'u%lO~Oa%lO't&{O'u%lO~Oa%lO't&}O'u%lO~O's]X!V]Xs]X!h]X&W]X![]X%f]X!d]X~P(qO!_'[O!`'TO!a'TO(P!lO(QTO(TUO~Op'RO!P'QO!X'UO(`'PO!Z(dP!Z(sP~P@YOk'_O![']O(O%eO~Oe'dO!i%cO(O%eO~O}&QO!i&PO~Op!nO!P!oO!y;bO#Q!pO#R!pO#T!pO#U!pO(P!lO(QTO(TUO(`!mO(j!sO~O!_'jO!`'iO!a'iO#S!pO#X'kO#Y'kO~PAtOa%lOh%VO!d#vO!i%cO'u%lO(m'mO~O!m'qO#]'oO~PCSOp!nO!P!oO(QTO(TUO(`!mO(j!sO~O![XOp(hX!P(hX!_(hX!`(hX!a(hX!y(hX#Q(hX#R(hX#S(hX#T(hX#U(hX#X(hX#Y(hX(P(hX(Q(hX(T(hX(`(hX(j(hX~O!`'iO!a'iO(P!lO~PCrO'z'uO'{'uO'|'wO~O_!}O(Q'yO(R!}O(S'yO~O_#QO(S'yO(T'yO(U#QO~Os'{O~P%[Ou#SO!R#TO(]#TO(^(OO~O!X(QO!V'SX!V'YX!Y'SX!Y'YX~P+}O!Y(SO!V(cX~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y(SO!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~O!V(cX~PGmO!V(XO~O!V(pX!Y(pX!d(pX!h(pX(m(pX~O#](pX#h#aX!Z(pX~PIpO#](YO!V(rX!Y(rX~O!Y(ZO!V(qX~O!V(^O~O#]$eO~PIpO!Z(_O~P`OR#zO}#yO!P#{O!i#xO([VOP!ka[!kao!ka!Y!ka!m!ka#O!ka#k!ka#l!ka#m!ka#n!ka#o!ka#p!ka#q!ka#r!ka#s!ka#u!ka#w!ka#y!ka#z!ka(m!ka(t!ka(u!ka~Oa!ka'u!ka's!ka!V!ka!h!kas!kaYO(QTO(TUO([VO(j[O(y=YO~O!Y$_Oa$oa'u$oa's$oa!h$oa!V$oa![$oa%f$oa!d$oa~O#t)aO~P!&fOh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(O(sO(QTO(TUO([$uO(t$}O(u%PO~Og(kP~P!+oO})fO!d)eO![$]X$Y$]X$[$]X$^$]X$e$]X~O!d)eO![(vX$Y(vX$[(vX$^(vX$e(vX~O})fO~P!-xO})fO![(vX$Y(vX$[(vX$^(vX$e(vX~O![)hO$Y)lO$[)gO$^)gO$e)mO~O!X)pO~P!(vO$[$hO$^$gO$e)tO~Ok$xX}$xX!P$xX#P$xX(t$xX(u$xX~OgjXg$xXkjX!YjX#]jX~P!/nOu)vO(])wO(^)yO~Ok*SO}){O!P)|O(t$}O(u%PO~Og)zO~P!0rOg*TO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{<OO!P*VO![*WO!f=`O!i$xO#g<UO$V%_O$r<QO$t<SO$w%`O(QTO(TUO([$uO(t$}O(u%PO~O!X*ZO(O*UO!h(zP~P!1aO#h*]O~O!i*^O~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{<OO!P${O![$|O!f=`O!i$xO#g<UO$V%_O$r<QO$t<SO$w%`O(O*`O(QTO(TUO([$uO(t$}O(u%PO~O!X*cO!V({P~P!3`Oo*oO!P*gO!_*mO!`*fO!a*fO!i*^O#X*nO%]*iO(P!lO(`!mO~O!Z*lO~P!5TO#P$dOk(ZX}(ZX!P(ZX(t(ZX(u(ZX!Y(ZX#](ZX~Og(ZX#}(ZX~P!5|Ok*tO#]*sOg(YX!Y(YX~O!Y*uOg(XX~O(O&WOg(XP~Op*xO~O!i*}O~O(O(sO~Om+RO!P%fO!X#iO![%gO!y]O#f#lO#g#iO(O%eO!h(nP~O!d#vO#h+SO~O!P%fO!X+UO!Y(ZO![%gO(O%eO!V(qP~Op'XO!P+WO!X+VO(QTO(TUO(`(yO~O!Z(sP~P!8|O!Y+XOa)PX'u)PX~OP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~Oa!ga!Y!ga'u!ga's!ga!V!ga!h!gas!ga![!ga%f!ga!d!ga~P!9tOR#zO}#yO!P#{O!i#xO([VOP!oa[!oao!oa!Y!oa!m!oa#O!oa#k!oa#l!oa#m!oa#n!oa#o!oa#p!oa#q!oa#r!oa#s!oa#u!oa#w!oa#y!oa#z!oa(m!oa(t!oa(u!oa~Oa!oa'u!oa's!oa!V!oa!h!oas!oa![!oa%f!oa!d!oa~P!<[OR#zO}#yO!P#{O!i#xO([VOP!qa[!qao!qa!Y!qa!m!qa#O!qa#k!qa#l!qa#m!qa#n!qa#o!qa#p!qa#q!qa#r!qa#s!qa#u!qa#w!qa#y!qa#z!qa(m!qa(t!qa(u!qa~Oa!qa'u!qa's!qa!V!qa!h!qas!qa![!qa%f!qa!d!qa~P!>rOh%VOk+bO![']O%f+aO~O!d+dOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%VO!i%cO~Oh%VO!i%cO(O%eO~O!d#vO#h(uO~Ob+oO%g+pO(O+lO(QTO(TUO!Z)TP~O!Y+qO`)SX~O[+uO~O`+vO~O![%}O(O%eO(P!lO`)SP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!ErO`,cOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!H[O!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# bO!d-OO#],}Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP;aOQ;aOSfOd=[Oe!iOmkOo;aOpkOqkOwkOy;aO{;aO!PWO!TkO!UkO![!eO!f;dO!iZO!l;aO!m;aO!n;aO!p;eO!r;hO!u!hO$V!kO(QTO(TUO([VO(j[O(y=YO~O(O<[O~P##fO!Y-UO!Z(dX~O!Z-WO~O!d-OO#],}O!Y#eX!Z#eX~O!Y-XO!Z(sX~O!Z-ZO~O!`-[O!a-[O(P!lO~P##TO!Z-_O~P'_Ok-bO![']O~O!V-gO~Op!xa!_!xa!`!xa!a!xa#Q!xa#R!xa#S!xa#T!xa#U!xa#X!xa#Y!xa(P!xa(Q!xa(T!xa(`!xa(j!xa~P!#bO!m-lO#]-jO~PCSO!`-nO!a-nO(P!lO~PCrOa%lO#]-jO'u%lO~Oa%lO!d#vO#]-jO'u%lO~Oa%lO!d#vO!m-lO#]-jO'u%lO(m'mO~O'z'uO'{'uO'|-sO~Os-tO~O!V'Sa!Y'Sa~P!9tO!X-xO!V'SX!Y'SX~P%[O!Y(SO!V(ca~O!V(ca~PGmO!Y(ZO!V(qa~O!P%fO!X-|O![%gO(O%eO!V'YX!Y'YX~O#].OO!Y(oa!h(oaa(oa'u(oa~O!d#vO~P#+lO!Y(gO!h(na~O!P%fO![%gO#g.SO(O%eO~Om.XO!P%fO!X.UO![%gO!y]O#f.WO#g.UO(O%eO!Y']X!h']X~OR.]O!i#xO~Oh%VOk.`O![']O%f._O~Oa#`i!Y#`i'u#`i's#`i!V#`i!h#`is#`i![#`i%f#`i!d#`i~P!9tOk=fO}){O!P)|O(t$}O(u%PO~O#h#[aa#[a#]#[a'u#[a!Y#[a!h#[a![#[a!V#[a~P#.hO#h(ZXP(ZXR(ZX[(ZXa(ZXo(ZX!i(ZX!m(ZX#O(ZX#k(ZX#l(ZX#m(ZX#n(ZX#o(ZX#p(ZX#q(ZX#r(ZX#s(ZX#u(ZX#w(ZX#y(ZX#z(ZX'u(ZX([(ZX(m(ZX!h(ZX!V(ZX's(ZXs(ZX![(ZX%f(ZX!d(ZX~P!5|O!Y.mO!h(fX~P!9tO!h.pO~O!V.rO~OP$[OR#zO}#yO!P#{O!i#xO!m$[O([VO[#jia#jio#ji!Y#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#k#ji~P#2TO#k$OO~P#2TOP$[OR#zOo$aO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO([VO[#jia#ji!Y#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#o#ji~P#4rO#o$QO~P#4rOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO([VOa#ji!Y#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#u#ji~P#7aOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO([VO(u#}Oa#ji!Y#ji#y#ji#z#ji'u#ji(m#ji(t#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#w$UO~P#9wO#w#ji~P#9wO#u$SO~P#7aOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO([VO(t#|O(u#}Oa#ji!Y#ji#z#ji'u#ji(m#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#y#ji~P#<mO#y$WO~P#<mOP]XR]X[]Xo]X}]X!P]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X!Y]X!Z]X~O#}]X~P#?[OP$[OR#zO[;xOo;vO}#yO!P#{O!i#xO!m$[O#O;mO#k;jO#l;kO#m;kO#n;kO#o;lO#p;mO#q;mO#r;wO#s;mO#u;nO#w;pO#y;rO#z;sO([VO(m$YO(t#|O(u#}O~O#}.tO~P#AiO#P$dO#];yO$P;yO#}(bX!Z(bX~P! aOa'`a!Y'`a'u'`a's'`a!h'`a!V'`as'`a!['`a%f'`a!d'`a~P!9tO[#jia#jio#ji!Y#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO([VO(t#ji(u#ji~P#DkOk=fO}){O!P)|O(t$}O(u%POP#jiR#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji([#ji~P#DkO!Y.xOg(kX~P!0rOg.zO~Oa$Oi!Y$Oi'u$Oi's$Oi!V$Oi!h$Ois$Oi![$Oi%f$Oi!d$Oi~P!9tO$[.{O$^.{O~O$[.|O$^.|O~O!d)eO#].}O![$bX$Y$bX$[$bX$^$bX$e$bX~O!X/OO~O![)hO$Y/QO$[)gO$^)gO$e/RO~O!Y;tO!Z(aX~P#AiO!Z/SO~O!d)eO$e(vX~O$e/UO~Os/VO~P!&fOu)vO(])wO(^/YO~O!V/^O~P!&fO(t$}Ok%^a}%^a!P%^a(u%^a!Y%^a#]%^a~Og%^a#}%^a~P#KlO(u%POk%`a}%`a!P%`a(t%`a!Y%`a#]%`a~Og%`a#}%`a~P#L_O!YfX!dfX!hfX!h$xX(mfX~P!/nO!X/gO!Y(ZO(O/fO!V(qP!V({P~P!1aOo*oO!_*mO!`*fO!a*fO!i*^O#X*nO%]*iO(P!lO~Op'XO!P/hO!X+VO!Z*lO(QTO(TUO(`<XO!Z(sP~P#MxO!h/iO~P#.hO!Y/jO!d#vO(m'mO!h(zX~O!h/oO~O!P%fO!X*ZO![%gO(O%eO!h(zP~O#h/qO~O!V$xX!Y$xX!d%PX~P!/nO!Y/rO!V({X~P#.hO!d/tO~O!V/vO~Oh%VOo/zO!d#vO!i%cO(m'mO~O(O/|O~O!d+dO~Oa%lO!Y0QO'u%lO~O!Z0SO~P!5TO!`0TO!a0TO(P!lO(`!mO~O!P0VO(`!mO~O#X0WO~Og%^a!Y%^a#]%^a#}%^a~P!0rOg%`a!Y%`a#]%`a#}%`a~P!0rO(O&WOg'iX!Y'iX~O!Y*uOg(Xa~Og0aO~OR0bO}0bO!P0cO#P$dOkza(tza(uza!Yza#]za~Ogza#}za~P$%kO}){O!P)|Ok$qa(t$qa(u$qa!Y$qa#]$qa~Og$qa#}$qa~P$&dO}){O!P)|Ok$sa(t$sa(u$sa!Y$sa#]$sa~Og$sa#}$sa~P$'VO#h0fO~Og%Ra!Y%Ra#]%Ra#}%Ra~P!0rO!d#vO~O#h0iO~O!Y+XOa)Pa'u)Pa~OR#zO}#yO!P#{O!i#xO([VOP!oi[!oio!oi!Y!oi!m!oi#O!oi#k!oi#l!oi#m!oi#n!oi#o!oi#p!oi#q!oi#r!oi#s!oi#u!oi#w!oi#y!oi#z!oi(m!oi(t!oi(u!oi~Oa!oi'u!oi's!oi!V!oi!h!ois!oi![!oi%f!oi!d!oi~P$(tOh%VOo%XOp$tOq$tOw%YOy%ZO{<OO!P${O![$|O!f=`O!i$xO#g<UO$V%_O$r<QO$t<SO$w%`O(QTO(TUO([$uO(t$}O(u%PO~Om0rO(O0qO~P$+[O!d+dOa(Wa![(Wa'u(Wa!Y(Wa~O#h0xO~O[]X!YfX!ZfX~O!Y0yO!Z)TX~O!Z0{O~O[0|O~Ob1OO(O+lO(QTO(TUO~O![%}O(O%eO`'qX!Y'qX~O!Y+qO`)Sa~O!h1RO~P!9tO[1UO~O`1VO~O#]1YO~Ok1]O![$|O~O(`(yO!Z)QP~Oh%VOk1fO![1cO%f1eO~O[1pO!Y1nO!Z)RX~O!Z1qO~O`1sOa%lO'u%lO~O(O#nO(QTO(TUO~O#P$dO#]$eO$P$eOP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX~O#s1vO&W1wOa(bX~P$0rO#]$eO#s1vO&W1wO~Oa1yO~P%[Oa1{O~O&a2OOP&_iQ&_iS&_iY&_ia&_id&_ie&_im&_io&_ip&_iq&_iw&_iy&_i{&_i!P&_i!T&_i!U&_i![&_i!f&_i!i&_i!l&_i!m&_i!n&_i!p&_i!r&_i!u&_i!y&_i#t&_i$V&_i%e&_i%g&_i%i&_i%j&_i%k&_i%n&_i%p&_i%s&_i%t&_i%v&_i&S&_i&Y&_i&[&_i&^&_i&`&_i&c&_i&i&_i&o&_i&q&_i&s&_i&u&_i&w&_i's&_i(O&_i(Q&_i(T&_i([&_i(j&_i(y&_i!Z&_ib&_i&f&_i~Ob2UO!Z2SO&f2TO~P`O![XO!i2WO~O&m,tOP&hiQ&hiS&hiY&hia&hid&hie&him&hio&hip&hiq&hiw&hiy&hi{&hi!P&hi!T&hi!U&hi![&hi!f&hi!i&hi!l&hi!m&hi!n&hi!p&hi!r&hi!u&hi!y&hi#t&hi$V&hi%e&hi%g&hi%i&hi%j&hi%k&hi%n&hi%p&hi%s&hi%t&hi%v&hi&S&hi&Y&hi&[&hi&^&hi&`&hi&c&hi&i&hi&o&hi&q&hi&s&hi&u&hi&w&hi's&hi(O&hi(Q&hi(T&hi([&hi(j&hi(y&hi!Z&hi&a&hib&hi&f&hi~O!V2^O~O!Y!^a!Z!^a~P#AiOp!nO!P!oO!X2dO(`!mO!Y'TX!Z'TX~P@YO!Y-UO!Z(da~O!Y'ZX!Z'ZX~P!8|O!Y-XO!Z(sa~O!Z2kO~P'_Oa%lO#]2tO'u%lO~Oa%lO!d#vO#]2tO'u%lO~Oa%lO!d#vO!m2xO#]2tO'u%lO(m'mO~Oa%lO'u%lO~P!9tO!Y$_Os$oa~O!V'Si!Y'Si~P!9tO!Y(SO!V(ci~O!Y(ZO!V(qi~O!V(ri!Y(ri~P!9tO!Y(oi!h(oia(oi'u(oi~P!9tO#]2zO!Y(oi!h(oia(oi'u(oi~O!Y(gO!h(ni~O!P%fO![%gO!y]O#f3PO#g3OO(O%eO~O!P%fO![%gO#g3OO(O%eO~Ok3WO![']O%f3VO~Oh%VOk3WO![']O%f3VO~O#h%^aP%^aR%^a[%^aa%^ao%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'u%^a([%^a(m%^a!h%^a!V%^a's%^as%^a![%^a%f%^a!d%^a~P#KlO#h%`aP%`aR%`a[%`aa%`ao%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'u%`a([%`a(m%`a!h%`a!V%`a's%`as%`a![%`a%f%`a!d%`a~P#L_O#h%^aP%^aR%^a[%^aa%^ao%^a!Y%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'u%^a([%^a(m%^a!h%^a!V%^a's%^a#]%^as%^a![%^a%f%^a!d%^a~P#.hO#h%`aP%`aR%`a[%`aa%`ao%`a!Y%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'u%`a([%`a(m%`a!h%`a!V%`a's%`a#]%`as%`a![%`a%f%`a!d%`a~P#.hO#hzaPza[zaazaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza'uza([za(mza!hza!Vza'szasza![za%fza!dza~P$%kO#h$qaP$qaR$qa[$qaa$qao$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa'u$qa([$qa(m$qa!h$qa!V$qa's$qas$qa![$qa%f$qa!d$qa~P$&dO#h$saP$saR$sa[$saa$sao$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa'u$sa([$sa(m$sa!h$sa!V$sa's$sas$sa![$sa%f$sa!d$sa~P$'VO#h%RaP%RaR%Ra[%Raa%Rao%Ra!Y%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra'u%Ra([%Ra(m%Ra!h%Ra!V%Ra's%Ra#]%Ras%Ra![%Ra%f%Ra!d%Ra~P#.hOa#`q!Y#`q'u#`q's#`q!V#`q!h#`qs#`q![#`q%f#`q!d#`q~P!9tO!X3`O!Y'UX!h'UX~P%[O!Y.mO!h(fa~O!Y.mO!h(fa~P!9tO!V3cO~O#}!ka!Z!ka~PKWO#}!ga!Y!ga!Z!ga~P#AiO#}!oa!Z!oa~P!<[O#}!qa!Z!qa~P!>rOg'XX!Y'XX~P!+oO!Y.xOg(ka~OSfO![3wO$c3xO~O!Z3|O~Os3}O~P#.hOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9tO!V4OO~P#.hO}){O!P)|O(u%POk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%)|O}){O!P)|Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%*oO(m$YO~P#.hO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(O<bO~P!1aOmkO(O4QO~P.iO!P%fO!X4SO![%gO(O%eO!Y'aX!h'aX~O!Y/jO!h(za~O!Y/jO!d#vO!h(za~O!Y/jO!d#vO(m'mO!h(za~Og$zi!Y$zi#]$zi#}$zi~P!0rO!X4[O!V'cX!Y'cX~P!3`O!Y/rO!V({a~O!Y/rO!V({a~P#.hO!d#vO#s4dO~Oo4gO!d#vO(m'mO~O!P4jO(`!mO~O(t$}Ok%^i}%^i!P%^i(u%^i!Y%^i#]%^i~Og%^i#}%^i~P%/VO(u%POk%`i}%`i!P%`i(t%`i!Y%`i#]%`i~Og%`i#}%`i~P%/xOg(Yi!Y(Yi~P!0rO#]4oOg(Yi!Y(Yi~P!0rO!h4rO~Oa$mq!Y$mq'u$mq's$mq!V$mq!h$mqs$mq![$mq%f$mq!d$mq~P!9tO!V4vO~O!Y4wO![(|X~P#.hOa$xX![$xX%Z]X'u$xX!Y$xX~P!/nO%Z4zOalXklX}lX!PlX![lX'ulX(tlX(ulX!YlX~O%Z4zO~Ob5QO%g5RO(O+lO(QTO(TUO!Y'pX!Z'pX~O!Y0yO!Z)Ta~O[5VO~O`5WO~Oa%lO'u%lO~P#.hO![$|O~P#.hO!Y5`O#]5bO!Z)QX~O!Z5cO~Oo5jOp!nO!P5dO!_!yO!`!vO!a!vO!y;bO#Q!pO#R!pO#S!pO#T!pO#U!pO#X5iO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O!Z5hO~P%5SOk5oO![1cO%f5nO~Oh%VOk5oO![1cO%f5nO~Ob5vO(O#nO(QTO(TUO!Y'oX!Z'oX~O!Y1nO!Z)Ra~O(QTO(TUO(`5xO~O`5|O~O#s6PO&W6QO~PMsO!h6RO~P%[Oa6TO~Oa6TO~P%[Ob2UO!Z6YO&f2TO~P`O!d6[O~O!d6^Oh(ei!Y(ei!Z(ei!d(ei!i(ei~O!Y#ei!Z#ei~P#AiO#]6_O!Y#ei!Z#ei~O!Y!^i!Z!^i~P#AiOa%lO#]6hO'u%lO~Oa%lO!d#vO#]6hO'u%lO~O!Y(oq!h(oqa(oq'u(oq~P!9tO!Y(gO!h(nq~O!P%fO![%gO#g6oO(O%eO~O![']O%f6rO~Ok6vO![']O%f6rO~O#h'eaP'eaR'ea['eaa'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea'u'ea(['ea(m'ea!h'ea!V'ea's'eas'ea!['ea%f'ea!d'ea~P%)|O#h'gaP'gaR'ga['gaa'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga'u'ga(['ga(m'ga!h'ga!V'ga's'gas'ga!['ga%f'ga!d'ga~P%*oO#h$ziP$ziR$zi[$zia$zio$zi!Y$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi'u$zi([$zi(m$zi!h$zi!V$zi's$zi#]$zis$zi![$zi%f$zi!d$zi~P#.hO#h%^iP%^iR%^i[%^ia%^io%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i'u%^i([%^i(m%^i!h%^i!V%^i's%^is%^i![%^i%f%^i!d%^i~P%/VO#h%`iP%`iR%`i[%`ia%`io%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i'u%`i([%`i(m%`i!h%`i!V%`i's%`is%`i![%`i%f%`i!d%`i~P%/xO!Y'Ua!h'Ua~P!9tO!Y.mO!h(fi~O#}#`i!Y#`i!Z#`i~P#AiOP$[OR#zO}#yO!P#{O!i#xO!m$[O([VO[#jio#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#k#ji~P%GlO#k;jO~P%GlOP$[OR#zOo;vO}#yO!P#{O!i#xO!m$[O#k;jO#l;kO#m;kO#n;kO([VO[#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#o#ji~P%ItO#o;lO~P%ItOP$[OR#zO[;xOo;vO}#yO!P#{O!i#xO!m$[O#O;mO#k;jO#l;kO#m;kO#n;kO#o;lO#p;mO#q;mO#r;wO#s;mO([VO#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#u#ji~P%K|OP$[OR#zO[;xOo;vO}#yO!P#{O!i#xO!m$[O#O;mO#k;jO#l;kO#m;kO#n;kO#o;lO#p;mO#q;mO#r;wO#s;mO#u;nO([VO(u#}O#y#ji#z#ji#}#ji(m#ji(t#ji!Y#ji!Z#ji~O#w;pO~P%M}O#w#ji~P%M}O#u;nO~P%K|OP$[OR#zO[;xOo;vO}#yO!P#{O!i#xO!m$[O#O;mO#k;jO#l;kO#m;kO#n;kO#o;lO#p;mO#q;mO#r;wO#s;mO#u;nO#w;pO([VO(t#|O(u#}O#z#ji#}#ji(m#ji!Y#ji!Z#ji~O#y#ji~P&!^O#y;rO~P&!^Oa#{y!Y#{y'u#{y's#{y!V#{y!h#{ys#{y![#{y%f#{y!d#{y~P!9tO[#jio#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji!Y#ji!Z#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k;jO#l;kO#m;kO#n;kO([VO(t#ji(u#ji~P&%YOk=gO}){O!P)|O(t$}O(u%POP#jiR#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji([#ji~P&%YO#P$dOP(ZXR(ZX[(ZXk(ZXo(ZX}(ZX!P(ZX!i(ZX!m(ZX#O(ZX#k(ZX#l(ZX#m(ZX#n(ZX#o(ZX#p(ZX#q(ZX#r(ZX#s(ZX#u(ZX#w(ZX#y(ZX#z(ZX#}(ZX([(ZX(m(ZX(t(ZX(u(ZX!Y(ZX!Z(ZX~O#}$Oi!Y$Oi!Z$Oi~P#AiO#}!oi!Z!oi~P$(tOg'Xa!Y'Xa~P!0rO!Z7YO~O!Y'`a!Z'`a~P#AiOP]XR]X[]Xo]X}]X!P]X!V]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X~O!d%WX#s%WX~P&+`O!d#vO(m'mO!Y'aa!h'aa~O!Y/jO!h(zi~O!Y/jO!d#vO!h(zi~Og$zq!Y$zq#]$zq#}$zq~P!0rO!V'ca!Y'ca~P#.hO!d7aO~O!Y/rO!V({i~P#.hO!Y/rO!V({i~O!V7eO~O!d#vO#s7jO~Oo7kO!d#vO(m'mO~O}){O!P)|O(u%POk'fa(t'fa!Y'fa#]'fa~Og'fa#}'fa~P&0OO}){O!P)|Ok'ha(t'ha(u'ha!Y'ha#]'ha~Og'ha#}'ha~P&0qO!V7nO~Og$|q!Y$|q#]$|q#}$|q~P!0rOa$my!Y$my'u$my's$my!V$my!h$mys$my![$my%f$my!d$my~P!9tO!d6^O~O!Y4wO![(|a~O![']OP$SaR$Sa[$Sao$Sa}$Sa!P$Sa!Y$Sa!i$Sa!m$Sa#O$Sa#k$Sa#l$Sa#m$Sa#n$Sa#o$Sa#p$Sa#q$Sa#r$Sa#s$Sa#u$Sa#w$Sa#y$Sa#z$Sa([$Sa(m$Sa(t$Sa(u$Sa~O%f6rO~P&2zOa#`y!Y#`y'u#`y's#`y!V#`y!h#`ys#`y![#`y%f#`y!d#`y~P!9tO[7sO~Ob7uO(O+lO(QTO(TUO~O!Y0yO!Z)Ti~O`7yO~O(`(yO!Y'lX!Z'lX~O!Y5`O!Z)Qa~O!Z8SO~P%5SOp!nO!P8TO(QTO(TUO(`!mO(j!sO~O#X8UO~O![1cO~O![1cO%f8WO~Ok8ZO![1cO%f8WO~O[8`O!Y'oa!Z'oa~O!Y1nO!Z)Ri~O!h8dO~O!h8eO~O!h8hO~O!h8hO~P%[Oa8jO~O!d8kO~O!h8lO~O!Y(ri!Z(ri~P#AiOa%lO#]8tO'u%lO~O!Y(oy!h(oya(oy'u(oy~P!9tO!Y(gO!h(ny~O%f8wO~P&2zO![']O%f8wO~O#h$zqP$zqR$zq[$zqa$zqo$zq!Y$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq'u$zq([$zq(m$zq!h$zq!V$zq's$zq#]$zqs$zq![$zq%f$zq!d$zq~P#.hO#h'faP'faR'fa['faa'fao'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa'u'fa(['fa(m'fa!h'fa!V'fa's'fas'fa!['fa%f'fa!d'fa~P&0OO#h'haP'haR'ha['haa'hao'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha'u'ha(['ha(m'ha!h'ha!V'ha's'has'ha!['ha%f'ha!d'ha~P&0qO#h$|qP$|qR$|q[$|qa$|qo$|q!Y$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q'u$|q([$|q(m$|q!h$|q!V$|q's$|q#]$|qs$|q![$|q%f$|q!d$|q~P#.hO!Y'Ui!h'Ui~P!9tO#}#`q!Y#`q!Z#`q~P#AiO(t$}OP%^aR%^a[%^ao%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a#}%^a([%^a(m%^a!Y%^a!Z%^a~Ok%^a}%^a!P%^a(u%^a~P&C}O(u%POP%`aR%`a[%`ao%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a#}%`a([%`a(m%`a!Y%`a!Z%`a~Ok%`a}%`a!P%`a(t%`a~P&FROk=gO}){O!P)|O(u%PO~P&C}Ok=gO}){O!P)|O(t$}O~P&FROR0bO}0bO!P0cO#P$dOPza[zakzaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza#}za([za(mza(tza(uza!Yza!Zza~O}){O!P)|OP$qaR$qa[$qak$qao$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa#}$qa([$qa(m$qa(t$qa(u$qa!Y$qa!Z$qa~O}){O!P)|OP$saR$sa[$sak$sao$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa#}$sa([$sa(m$sa(t$sa(u$sa!Y$sa!Z$sa~Ok=gO}){O!P)|O(t$}O(u%PO~OP%RaR%Ra[%Rao%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra#}%Ra([%Ra(m%Ra!Y%Ra!Z%Ra~P&NzO#}$lq!Y$lq!Z$lq~P#AiO#}$mq!Y$mq!Z$mq~P#AiO!Z9UO~O#}9VO~P!0rO!d#vO!Y'ai!h'ai~O!d#vO(m'mO!Y'ai!h'ai~O!Y/jO!h(zq~O!V'ci!Y'ci~P#.hO!Y/rO!V({q~Oo9^O!d#vO(m'mO~O[9`O!V9_O~P#.hO!V9_O~O!d#vO#s9eO~Og(Yy!Y(Yy~P!0rO!Y'ja!['ja~P#.hOa%Yq![%Yq'u%Yq!Y%Yq~P#.hO[9gO~O!Y0yO!Z)Tq~O#]9kO!Y'la!Z'la~O!Y5`O!Z)Qi~P#AiO!P4jO~O![1cO%f9oO~O(QTO(TUO(`9tO~O!Y1nO!Z)Rq~O!h9wO~O!h9xO~O!h9yO~O!h9yO~P%[O#]9|O!Y#ey!Z#ey~O!Y#ey!Z#ey~P#AiO%f:RO~P&2zO![']O%f:RO~O#}#{y!Y#{y!Z#{y~P#AiOP$ziR$zi[$zio$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi#}$zi([$zi(m$zi!Y$zi!Z$zi~P&NzO}){O!P)|O(u%POP'eaR'ea['eak'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea#}'ea(['ea(m'ea(t'ea!Y'ea!Z'ea~O}){O!P)|OP'gaR'ga['gak'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga#}'ga(['ga(m'ga(t'ga(u'ga!Y'ga!Z'ga~O(t$}OP%^iR%^i[%^ik%^io%^i}%^i!P%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i#}%^i([%^i(m%^i(u%^i!Y%^i!Z%^i~O(u%POP%`iR%`i[%`ik%`io%`i}%`i!P%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i#}%`i([%`i(m%`i(t%`i!Y%`i!Z%`i~O#}$my!Y$my!Z$my~P#AiO#}#`y!Y#`y!Z#`y~P#AiO!d#vO!Y'aq!h'aq~O!Y/jO!h(zy~O!V'cq!Y'cq~P#.hOo:]O!d#vO(m'mO~O[:`O!V:_O~P#.hO!V:_O~O!Y0yO!Z)Ty~O!Y5`O!Z)Qq~O![1cO%f:hO~O!h:kO~O%f:pO~P&2zOP$zqR$zq[$zqo$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq#}$zq([$zq(m$zq!Y$zq!Z$zq~P&NzO}){O!P)|O(u%POP'faR'fa['fak'fao'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa#}'fa(['fa(m'fa(t'fa!Y'fa!Z'fa~O}){O!P)|OP'haR'ha['hak'hao'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha#}'ha(['ha(m'ha(t'ha(u'ha!Y'ha!Z'ha~OP$|qR$|q[$|qo$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q#}$|q([$|q(m$|q!Y$|q!Z$|q~P&NzOg%b!Z!Y%b!Z#]%b!Z#}%b!Z~P!0rO!V:tO~P#.hOo:uO!d#vO(m'mO~O[:wO!V:tO~P#.hO!Y'lq!Z'lq~P#AiO!Y#e!Z!Z#e!Z~P#AiO#h%b!ZP%b!ZR%b!Z[%b!Za%b!Zo%b!Z!Y%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z'u%b!Z([%b!Z(m%b!Z!h%b!Z!V%b!Z's%b!Z#]%b!Zs%b!Z![%b!Z%f%b!Z!d%b!Z~P#.hOo;PO!d#vO(m'mO~O!V;QO~P#.hOo;XO!d#vO(m'mO~O!V;YO~P#.hOP%b!ZR%b!Z[%b!Zo%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z#}%b!Z([%b!Z(m%b!Z!Y%b!Z!Z%b!Z~P&NzOo;]O!d#vO(m'mO~Os(aX~P1qO}%pO~P!(vO(P!lO~P!(vO!VfX!YfX#]fX~P&+`OP]XR]X[]Xo]X}]X!P]X!Y]X!YfX!i]X!m]X#O]X#P]X#]]X#]fX#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X~O!dfX!h]X!hfX(mfX~P'D^OP;aOQ;aOSfOd=[Oe!iOmkOo;aOpkOqkOwkOy;aO{;aO!PWO!TkO!UkO![XO!f;dO!iZO!l;aO!m;aO!n;aO!p;eO!r;hO!u!hO$V!kO(O)YO(QTO(TUO([VO(j[O(y=YO~O!Y;tO!Z$oa~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{<PO!P${O![$|O!f=aO!i$xO#g<VO$V%_O$r<RO$t<TO$w%`O(O(sO(QTO(TUO([$uO(t$}O(u%PO~O#t)aO~P'ISOo!bX(m!bX~P# bO!Z]X!ZfX~P'D^O!VfX!V$xX!YfX!Y$xX#]fX~P!/nO#h;iO~O!d#vO#h;iO~O#];yO~O#s;mO~O#]<YO!Y(rX!Z(rX~O#];yO!Y(pX!Z(pX~O#h<ZO~Og<]O~P!0rO#h<cO~O#h<dO~O!d#vO#h<eO~O!d#vO#h<ZO~O#}<fO~P#AiO#h<gO~O#h<hO~O#h<mO~O#h<nO~O#h<oO~O#h<pO~O#}<qO~P!0rO#}<rO~P!0rO#P#Q#R#T#U#X#f#g#r(y$r$t$w%Z%e%f%g%n%p%s%t%v%x~'yT#l!U'w(P#mp#k#no}'x$['x(O$^(`~",goto:"$5g)XPPPPPP)YPP)]P)nP+O/PPPPP5{PP6cPP<Y?sP@WP@WPPP@WPB[P@WP@WP@WPB`PBePCSPG{PPPHPPPPPHPKRPPPKXLTPHPPHPPPNcHPPPPHPPHPP!!jHPP!&P!'U!'_P!(R!(V!(R!+cPPPPPPP!,S!'UPP!,d!-xP!1THPHP!1Y!4e!8{!8{!<yPPP!=RHPPPPPPPPPPPP!@aP!AnPPHP!CPPHPPHPHPHPHPHPPHP!DcP!GlP!JqP!Ju!KP!KT!KTP!GiP!KX!KXP!N^P!NbHPHP!Nh##lB`@WP@WP@W@WP#$x@W@W#'W@W#)z@W#,S@W@W#,r#/S#/S#/X#/b#/S#/nP#/SP@W#0W@W#4P@W@W5{PPP#8OPPP#8i#8iP#8iP#9P#8iPP#9VP#8|P#8|#9j#8|#:U#:[5x)]#:_)]P#:f#:f#:fP)]P)]P)]P)]PP)]P#:l#:oP#:o)]P#:sP#:vP)]P)]P)]P)]P)]P)])]PP#:|#;S#;_#;e#;k#;q#;w#<V#<]#<g#<m#<w#<}#=_#=e#>V#>i#>o#>u#?T#?j#A]#Ak#Ar#C[#Cj#EY#Eh#En#Et#Ez#FU#F[#Fb#Fl#GO#GUPPPPPPPPPP#G[PPPPPPP#HP#KW#Lg#Ln#LvPPP$$YP$$c$'Z$-s$-v$-y$.f$.i$.p$.xP$/O$/RP$/o$/s$0k$1y$2O$2fPP$2k$2q$2uP$2x$2|$3Q$3v$4_$4v$4z$4}$5Q$5W$5Z$5_$5cR!|RoqOXst!Z#d%k&o&q&r&t,l,q2O2RY!vQ']-^1c5gQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*f$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0T*mQ1m,^R<W;e%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z+S+W,i,l,q-b-j-x.O.m.t/h0c0i0x1f1v1w1y1{2O2R2T2t2z3`5d5o6P6Q6T6h8T8Z8j8tS#q];b!r)[$Z$n'U)p,}-Q/O2d3w5b6_9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]U*z%[<O<PQ+o%}Q,_&dQ,f&lQ0o+bQ0s+dQ1O+pQ1u,dQ3S.`Q5Q0yQ5v1nQ6t3WQ7u5RR8z6v'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/h0c0i0x1f1v1w1y1{2O2R2T2d2t2z3W3`3w5b5d5o6P6Q6T6_6h6v8T8Z8j8t9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]t!nQ!r!v!y!z'T'[']'i'j'k-U-[-^-n1c5g5i%S$ti#v$b$c$d$x${%O%Q%]%^%b)v)|*O*Q*S*V*]*c*s*t+a+d+{,O._.x/_/g/q/r/t0X0Z0f1Y1]1e3V4P4[4d4o4w4z5n6r7a7j8W8w9V9`9e9o:R:`:h:p:w;w;x;z;{;|;}<Q<R<S<T<U<V<^<_<`<a<c<d<g<h<i<j<k<l<m<n<q<r=Y=b=c=f=gQ&U|Q'R!eU'X%g*W-XQ+o%}Q,_&dQ0e*}Q1O+pQ1T+vQ1t,cQ1u,dQ5Q0yQ5Z1VQ5v1nQ5y1pQ5z1sQ7u5RQ7x5WQ8c5|Q9j7yR9u8`rnOXst!V!Z#d%k&f&o&q&r&t,l,q2O2RR,a&h&x^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(S(Y(a(u(w({)p)z+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/h0c0i0x1f1v1w1y1{2O2R2T2d2t2z3W3`3w5b5d5o6P6Q6T6_6h6v8T8Z8j8t9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=[=][#]WZ#W#Z'U(Q!b%hm#h#i#l$x%c%f(Z(e(f(g*V*Z*^+U+V+X,h-O-|.S.T.U.W/g/j2W3O3P4S6^6oQ%uxQ%yyS&O|&TQ&[!TQ'`!hQ'b!iQ(n#sS+i%z%{Q+m%}Q,W&_Q,[&aS-e'c'dQ.b(oQ0w+jQ0}+pQ1P+qQ1S+uQ1h,XS1l,],^Q2p-fQ5P0yQ5T0|Q5Y1UQ5u1mQ7t5RQ7w5VQ9f7sR:c9g!O$zi$d%O%Q%]%^%b*O*Q*]*s*t.x/q0X0Z0f4P4o9V=Y=b=c!S%wy!i!u%y%z%{'S'b'c'd'h'r*e+i+j-R-e-f-m/{0w2i2p2w4fQ+c%uQ+|&XQ,P&YQ,Z&aQ.a(nQ1g,WU1k,[,],^Q3X.bQ5p1hS5t1l1mQ8_5u#d=^#v$b$c$x${)v)|*S*V*c+a+d+{,O._/_/g/r/t1Y1]1e3V4[4d4w4z5n6r7a7j8W8w9`9e9o:R:`:h:p:w;z;|<Q<S<U<^<`<c<g<i<k<m<q=f=go=_;w;x;{;}<R<T<V<_<a<d<h<j<l<n<rW%Ti%V*u=YS&X!Q&fQ&Y!RQ&Z!SR+z&V%T%Si#v$b$c$d$x${%O%Q%]%^%b)v)|*O*Q*S*V*]*c*s*t+a+d+{,O._.x/_/g/q/r/t0X0Z0f1Y1]1e3V4P4[4d4o4w4z5n6r7a7j8W8w9V9`9e9o:R:`:h:p:w;w;x;z;{;|;}<Q<R<S<T<U<V<^<_<`<a<c<d<g<h<i<j<k<l<m<n<q<r=Y=b=c=f=gT)w$u)xV*z%[<O<PW'X!e%g*W-XS(z#y#zQ+^%pQ+t&QS.Z(j(kQ1^,QQ4p0bR7}5`'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/h0c0i0x1f1v1w1y1{2O2R2T2d2t2z3W3`3w5b5d5o6P6Q6T6_6h6v8T8Z8j8t9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]$i$^c#Y#e%o%q%s(P(V(q(v)O)P)Q)R)S)T)U)V)W)X)Z)])_)d)n+_+s-S-q-v-{-}.l.o.s.u.v.w/Z0g2_2b2r2y3_3d3e3f3g3h3i3j3k3l3m3n3o3p3s3t3{4t4}6a6g6l6{6|7V7W8P8n8r8|9S9T:O:e:l;c=PT#TV#U'PkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/h0c0i0x1f1v1w1y1{2O2R2T2d2t2z3W3`3w5b5d5o6P6Q6T6_6h6v8T8Z8j8t9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]Q'V!eR2e-Uv!nQ!e!r!v!y!z'T'[']'i'j'k-U-[-^-n1c5g5iU*e$|*W*kS/{*f*mQ0U*nQ1`,SQ4f0TR4i0WnqOXst!Z#d%k&o&q&r&t,l,q2O2RQ&v!^Q's!xS(p#u;iQ+g%xQ,U&[Q,V&^Q-c'aQ-p'lS.k(u<ZS0h+S<eQ0u+hQ1b,TQ2V,sQ2X,tQ2a-PQ2n-dQ2q-hS4u0i<oQ4{0vS5O0x<pQ6`2cQ6d2oQ6i2vQ7r4|Q8o6bQ8p6eQ8s6jR9{8l$d$]c#Y#e%q%s(P(V(q(v)O)P)Q)R)S)T)U)V)W)X)Z)])_)d)n+_+s-S-q-v-{-}.l.o.s.v.w/Z0g2_2b2r2y3_3d3e3f3g3h3i3j3k3l3m3n3o3p3s3t3{4t4}6a6g6l6{6|7V7W8P8n8r8|9S9T:O:e:l;c=PS(l#p'fQ(|#zS+]%o.uS.[(k(mR3Q.]'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/h0c0i0x1f1v1w1y1{2O2R2T2d2t2z3W3`3w5b5d5o6P6Q6T6_6h6v8T8Z8j8t9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]S#q];bQ&q!XQ&r!YQ&t![Q&u!]R1},oQ'^!hQ+`%uQ-a'`S.^(n+cQ2l-`W3U.a.b0n0pQ6c2mW6p3R3T3X4yU8v6q6s6uU:Q8x8y8{S:n:P:SQ:{:oR;T:|U!wQ']-^T5e1c5g!Q_OXZ`st!V!Z#d#h%c%k&f&h&o&q&r&t(g,l,q.T2O2R]!pQ!r']-^1c5gT#q];b%[{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z+S+W+b,i,l,q-b-j-x.O.`.m.t/h0c0i0x1f1v1w1y1{2O2R2T2t2z3W3`5d5o6P6Q6T6h6v8T8Z8j8tS(z#y#zS.Z(j(k!s<v$Z$n'U)p,}-Q/O2d3w5b6_9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]U$fd)[,fS(m#p'fU*r%R(t3rU0d*y.g7RQ4y0oQ6q3SQ8y6tR:S8zm!tQ!r!v!y!z']'i'j'k-^-n1c5g5iQ'q!uS(c#g1xS-l'h'tQ/m*YQ/y*eQ2x-oQ4W/nS4a/z0UQ7]4RS7h4g4iQ9X7^Q9]7eQ9c7kS:[9^9_S:s:]:_S;O:t:uS;W;P;QS;[;X;YR;_;]Q#wbQ'p!uS(b#g1xS(d#m+RQ+T%dQ+e%vQ+k%|U-k'h'q'tQ.P(cQ/l*YQ/x*eQ0O*hQ0t+fQ1i,YS2u-l-oQ2}.XS4V/m/nS4`/y0UQ4c/}Q4e0PQ5r1jQ6k2xQ7[4RQ7`4WS7d4a4iQ7i4hQ8]5sS9W7]7^Q9[7eQ9a7hQ9d7lQ9r8^Q:Y9XS:Z9]9_Q:a9cQ:j9sS:r:[:_S:}:s:tS;V;O;QS;Z;W;YQ;^;[Q;`;_Q<y<tQ=U<}R=V=OV!wQ']-^%[aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z+S+W+b,i,l,q-b-j-x.O.`.m.t/h0c0i0x1f1v1w1y1{2O2R2T2t2z3W3`5d5o6P6Q6T6h6v8T8Z8j8tS#wz!j!r<s$Z$n'U)p,}-Q/O2d3w5b6_9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]R<y=[%[bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z+S+W+b,i,l,q-b-j-x.O.`.m.t/h0c0i0x1f1v1w1y1{2O2R2T2t2z3W3`5d5o6P6Q6T6h6v8T8Z8j8tQ%dj!S%vy!i!u%y%z%{'S'b'c'd'h'r*e+i+j-R-e-f-m/{0w2i2p2w4fS%|z!jQ+f%wQ,Y&aW1j,Z,[,],^U5s1k1l1mS8^5t5uQ9s8_!r<t$Z$n'U)p,}-Q/O2d3w5b6_9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]Q<}=ZR=O=[%OeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(S(Y(a(u(w({)z+S+W+b,i,l,q-b-j-x.O.`.m.t/h0c0i0x1f1v1w1y1{2O2R2T2t2z3W3`5d5o6P6Q6T6h6v8T8Z8j8tY#bWZ#W#Z(Q!b%hm#h#i#l$x%c%f(Z(e(f(g*V*Z*^+U+V+X,h-O-|.S.T.U.W/g/j2W3O3P4S6^6oQ,g&l!p<u$Z$n)p,}-Q/O2d3w5b6_9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]R<x'UU'Y!e%g*WR2g-X%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z+S+W,i,l,q-b-j-x.O.m.t/h0c0i0x1f1v1w1y1{2O2R2T2t2z3`5d5o6P6Q6T6h8T8Z8j8t!r)[$Z$n'U)p,}-Q/O2d3w5b6_9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]Q,f&lQ0o+bQ3S.`Q6t3WR8z6v!b$Tc#Y%o(P(V(q(v)W)X)])d+s-q-v-{-}.l.o/Z0g2r2y3_3o4t4}6g6l6{8r:O;c!P;o)Z)n-S.u2_2b3d3m3n3s3{6a6|7V7W8P8n8|9S9T:e:l=P!f$Vc#Y%o(P(V(q(v)T)U)W)X)])d+s-q-v-{-}.l.o/Z0g2r2y3_3o4t4}6g6l6{8r:O;c!T;q)Z)n-S.u2_2b3d3j3k3m3n3s3{6a6|7V7W8P8n8|9S9T:e:l=P!^$Zc#Y%o(P(V(q(v)])d+s-q-v-{-}.l.o/Z0g2r2y3_3o4t4}6g6l6{8r:O;cQ4P/ez=])Z)n-S.u2_2b3d3s3{6a6|7V7W8P8n8|9S9T:e:l=PQ=b=dR=c=e'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t/O/h0c0i0x1f1v1w1y1{2O2R2T2d2t2z3W3`3w5b5d5o6P6Q6T6_6h6v8T8Z8j8t9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]S$oh$pR3x.}'VgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t.}/O/h0c0i0x1f1v1w1y1{2O2R2T2d2t2z3W3`3w5b5d5o6P6Q6T6_6h6v8T8Z8j8t9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]T$kf$qQ$ifS)g$l)kR)s$qT$jf$qT)i$l)k'VhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(Q(S(Y(a(u(w({)p)z+S+W+b,i,l,q,}-Q-b-j-x.O.`.m.t.}/O/h0c0i0x1f1v1w1y1{2O2R2T2d2t2z3W3`3w5b5d5o6P6Q6T6_6h6v8T8Z8j8t9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]T$oh$pQ$rhR)r$p%[jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(Q(S(Y(a(u(w({)z+S+W+b,i,l,q-b-j-x.O.`.m.t/h0c0i0x1f1v1w1y1{2O2R2T2t2z3W3`5d5o6P6Q6T6h6v8T8Z8j8t!s=Z$Z$n'U)p,}-Q/O2d3w5b6_9k9|;a;d;e;h;i;j;k;l;m;n;o;p;q;r;s;t;v;y<W<Y<Z<]<e<f<o<p=]#elOPXZst!Z!`!o#S#d#o#{$n%k&h&k&l&o&q&r&t&x'Q'_({)p+W+b,i,l,q-b.`/O/h0c1f1v1w1y1{2O2R2T3W3w5d5o6P6Q6T6v8T8Z8j!O%Ri$d%O%Q%]%^%b*O*Q*]*s*t.x/q0X0Z0f4P4o9V=Y=b=c#d(t#v$b$c$x${)v)|*S*V*c+a+d+{,O._/_/g/r/t1Y1]1e3V4[4d4w4z5n6r7a7j8W8w9`9e9o:R:`:h:p:w;z;|<Q<S<U<^<`<c<g<i<k<m<q=f=gQ+O%`Q/[){o3r;w;x;{;}<R<T<V<_<a<d<h<j<l<n<r!O$yi$d%O%Q%]%^%b*O*Q*]*s*t.x/q0X0Z0f4P4o9V=Y=b=cQ*_$zU*h$|*W*kQ+P%aQ0P*i#d<{#v$b$c$x${)v)|*S*V*c+a+d+{,O._/_/g/r/t1Y1]1e3V4[4d4w4z5n6r7a7j8W8w9`9e9o:R:`:h:p:w;z;|<Q<S<U<^<`<c<g<i<k<m<q=f=gn<|;w;x;{;}<R<T<V<_<a<d<h<j<l<n<rQ=Q=^Q=R=_Q=S=`R=T=a!O%Ri$d%O%Q%]%^%b*O*Q*]*s*t.x/q0X0Z0f4P4o9V=Y=b=c#d(t#v$b$c$x${)v)|*S*V*c+a+d+{,O._/_/g/r/t1Y1]1e3V4[4d4w4z5n6r7a7j8W8w9`9e9o:R:`:h:p:w;z;|<Q<S<U<^<`<c<g<i<k<m<q=f=go3r;w;x;{;}<R<T<V<_<a<d<h<j<l<n<rnoOXst!Z#d%k&o&q&r&t,l,q2O2RS*b${*VQ,z&{Q,{&}R4Z/r%S%Si#v$b$c$d$x${%O%Q%]%^%b)v)|*O*Q*S*V*]*c*s*t+a+d+{,O._.x/_/g/q/r/t0X0Z0f1Y1]1e3V4P4[4d4o4w4z5n6r7a7j8W8w9V9`9e9o:R:`:h:p:w;w;x;z;{;|;}<Q<R<S<T<U<V<^<_<`<a<c<d<g<h<i<j<k<l<m<n<q<r=Y=b=c=f=gQ+}&YQ1[,PQ5^1ZR7|5_V*j$|*W*kU*j$|*W*kT5f1c5gU/}*g/h5dS4h0V8TR7l4jQ+e%vQ0O*hQ0t+fQ1i,YQ5r1jQ8]5sQ9r8^R:j9s!O%Oi$d%O%Q%]%^%b*O*Q*]*s*t.x/q0X0Z0f4P4o9V=Y=b=cr*O$v)b*P*q+Q/p0]0^3u4X4s7Z7m:X<z=W=XS0X*p0Y#d;z#v$b$c$x${)v)|*S*V*c+a+d+{,O._/_/g/r/t1Y1]1e3V4[4d4w4z5n6r7a7j8W8w9`9e9o:R:`:h:p:w;z;|<Q<S<U<^<`<c<g<i<k<m<q=f=gn;{;w;x;{;}<R<T<V<_<a<d<h<j<l<n<r!f<^(r)`*X*a.c.f.j/W/]/e/u0m1X1Z3[4Y4^5]5_6w6z7b7f7o7q9Z9b:^:b:q:v;R=d=e`<_3q6}7Q7U8}:T:W;US<i.e3]T<j7P9Q!O%Qi$d%O%Q%]%^%b*O*Q*]*s*t.x/q0X0Z0f4P4o9V=Y=b=cv*Q$v)b*R*p+Q/a/p0]0^3u4X4k4s7Z7m:X<z=W=XS0Z*q0[#d;|#v$b$c$x${)v)|*S*V*c+a+d+{,O._/_/g/r/t1Y1]1e3V4[4d4w4z5n6r7a7j8W8w9`9e9o:R:`:h:p:w;z;|<Q<S<U<^<`<c<g<i<k<m<q=f=gn;};w;x;{;}<R<T<V<_<a<d<h<j<l<n<r!j<`(r)`*X*a.d.e.j/W/]/e/u0m1X1Z3Y3[4Y4^5]5_6w6x6z7b7f7o7q9Z9b:^:b:q:v;R=d=ed<a3q7O7P7U8}9O:T:U:W;US<k.f3^T<l7Q9RrnOXst!V!Z#d%k&f&o&q&r&t,l,q2O2RQ&c!UR,i&lrnOXst!V!Z#d%k&f&o&q&r&t,l,q2O2RR&c!UQ,R&ZR1W+zsnOXst!V!Z#d%k&f&o&q&r&t,l,q2O2RQ1d,WS5m1g1hU8V5k5l5pS9n8X8YS:f9m9pQ:x:gR;S:yQ&j!VR,b&fR5y1pS&O|&TR1P+qQ&o!WR,l&pR,r&uT2P,q2RR,v&vQ,u&vR2Y,vQ'v!{R-r'vSsOtQ#dXT%ns#dQ#OTR'x#OQ#RUR'z#RQ)x$uR/X)xQ#UVR'}#UQ#XWU(T#X(U-yQ(U#YR-y(VQ-V'VR2f-VQ.n(vS3a.n3bR3b.oQ-^']R2j-^Y!rQ']-^1c5gR'g!rQ.y)bR3v.yU#_W%f*VU([#_(]-zQ(]#`R-z(WQ-Y'YR2h-Yt`OXst!V!Z#d%k&f&h&o&q&r&t,l,q2O2RS#hZ%cU#r`#h.TR.T(gQ(h#jQ.Q(dW.Y(h.Q2{6mQ2{.RR6m2|Q)k$lR/P)kQ$phR)q$pQ$`cU)^$`-u;uQ-u;cR;u)nQ/k*YW4T/k4U7_9YU4U/l/m/nS7_4V4WR9Y7`$a)}$v(r)`)b*X*a*p*q*{*|+Q.e.f.h.i.j/W/]/a/c/e/p/u0]0^0m1X1Z3Y3Z3[3q3u4X4Y4^4k4m4s5]5_6w6x6y6z7P7Q7S7T7U7Z7b7f7m7o7q8}9O9P9Z9b:T:U:V:W:X:^:b:q:v;R;U<z=W=X=d=eQ/s*aU4]/s4_7cQ4_/uR7c4^S*k$|*WR0R*kr*P$v)b*p*q+Q/p0]0^3u4X4s7Z7m:X<z=W=X!f.c(r)`*X*a.e.f.j/W/]/e/u0m1X1Z3[4Y4^5]5_6w6z7b7f7o7q9Z9b:^:b:q:v;R=d=eU/b*P.c6}a6}3q7P7Q7U8}:T:W;UQ0Y*pQ3].eU4l0Y3]9QR9Q7Pv*R$v)b*p*q+Q/a/p0]0^3u4X4k4s7Z7m:X<z=W=X!j.d(r)`*X*a.e.f.j/W/]/e/u0m1X1Z3Y3[4Y4^5]5_6w6x6z7b7f7o7q9Z9b:^:b:q:v;R=d=eU/d*R.d7Oe7O3q7P7Q7U8}9O:T:U:W;UQ0[*qQ3^.fU4n0[3^9RR9R7QQ*v%UR0`*vQ4x0mR7p4xQ+Y%iR0l+YQ5a1^S8O5a9lR9l8PQ,T&[R1a,TQ5g1cR8R5gQ1o,_S5w1o8aR8a5yQ0z+mW5S0z5U7v9hQ5U0}Q7v5TR9h7wQ+r&OR1Q+rQ2R,qR6X2RYrOXst#dQ&s!ZQ+[%kQ,k&oQ,m&qQ,n&rQ,p&tQ1|,lS2P,q2RR6W2OQ%mpQ&w!_Q&z!aQ&|!bQ'O!cQ'n!uQ+Z%jQ+g%xQ+y&UQ,a&jQ,x&yW-i'h'p'q'tQ-p'lQ0Q*jQ0u+hS1r,b,eQ2Z,wQ2[,zQ2],{Q2q-hW2s-k-l-o-qQ4{0vQ5X1TQ5[1XQ5q1iQ5{1tQ6V1}U6f2r2u2xQ6i2vQ7r4|Q7z5ZQ7{5]Q8Q5fQ8[5rQ8b5zS8q6g6kQ8s6jQ9i7xQ9q8]Q9v8cQ9}8rQ:d9jQ:i9rQ:m:OR:z:jQ%xyQ'a!iQ'l!uU+h%y%z%{Q-P'SU-d'b'c'dS-h'h'rQ/w*eS0v+i+jQ2c-RS2o-e-fQ2v-mQ4b/{Q4|0wQ6b2iQ6e2pQ6j2wR7g4fS$wi=YR*w%VU%Ui%V=YR0_*uQ$viS(r#v+dS)`$b$cQ)b$dQ*X$xS*a${*VQ*p%OQ*q%QQ*{%]Q*|%^Q+Q%bQ.e;zQ.f;|Q.h<QQ.i<SQ.j<UQ/W)vS/])|/_Q/a*OQ/c*QQ/e*SQ/p*]S/u*c/gQ0]*sQ0^*th0m+a._1e3V5n6r8W8w9o:R:h:pQ1X+{Q1Z,OQ3Y<^Q3Z<`Q3[<cS3q;w;xQ3u.xQ4X/qQ4Y/rQ4^/tQ4k0XQ4m0ZQ4s0fQ5]1YQ5_1]Q6w<gQ6x<iQ6y<kQ6z<mQ7P;{Q7Q;}Q7S<RQ7T<TQ7U<VQ7Z4PQ7b4[Q7f4dQ7m4oQ7o4wQ7q4zQ8}<dQ9O<_Q9P<aQ9Z7aQ9b7jQ:T<hQ:U<jQ:V<lQ:W<nQ:X9VQ:^9`Q:b9eQ:q<qQ:v:`Q;R:wQ;U<rQ<z=YQ=W=bQ=X=cQ=d=fR=e=gQ*y%[Q.g<OR7R<PnpOXst!Z#d%k&o&q&r&t,l,q2O2RQ!fPS#fZ#oQ&y!`U'e!o5d8TQ'|#SQ(}#{Q)o$nS,e&h&kQ,j&lQ,w&xQ,|'QQ-`'_Q.q({Q/T)pS0j+W/hQ0p+bQ1z,iQ2m-bQ3T.`Q3z/OQ4q0cQ5l1fQ5}1vQ6O1wQ6S1yQ6U1{Q6Z2TQ6u3WQ7X3wQ8Y5oQ8f6PQ8g6QQ8i6TQ8{6vQ9p8ZR9z8j#YcOPXZst!Z!`!o#d#o#{%k&h&k&l&o&q&r&t&x'Q'_({+W+b,i,l,q-b.`/h0c1f1v1w1y1{2O2R2T3W5d5o6P6Q6T6v8T8Z8jQ#YWQ#eYQ%ouQ%qvS%sw!gS(P#W(SQ(V#ZQ(q#uQ(v#xQ)O$OQ)P$PQ)Q$QQ)R$RQ)S$SQ)T$TQ)U$UQ)V$VQ)W$WQ)X$XQ)Z$ZQ)]$_Q)_$aQ)d$eW)n$n)p/O3wQ+_%rQ+s&PS-S'U2dQ-q'oS-v(Q-xQ-{(YQ-}(aQ.l(uQ.o(wQ.s;aQ.u;dQ.v;eQ.w;hQ/Z)zQ0g+SQ2_,}Q2b-QQ2r-jQ2y.OQ3_.mQ3d;iQ3e;jQ3f;kQ3g;lQ3h;mQ3i;nQ3j;oQ3k;pQ3l;qQ3m;rQ3n;sQ3o.tQ3p;vQ3s;yQ3t<WQ3{;tQ4t0iQ4}0xQ6a<YQ6g2tQ6l2zQ6{3`Q6|<ZQ7V<]Q7W<eQ8P5bQ8n6_Q8r6hQ8|<fQ9S<oQ9T<pQ:O8tQ:e9kQ:l9|Q;c#SR=P=]R#[WR'W!el!tQ!r!v!y!z']'i'j'k-^-n1c5g5iS'S!e-US-R'T'[R2i-[R(x#xQ!fQT-]']-^]!qQ!r']-^1c5gQ#p]R'f;bR)c$dY!uQ']-^1c5gQ'h!rS'r!v!yS't!z5iS-m'i'jQ-o'kR2w-nT#kZ%cS#jZ%cS%im,hU(d#h#i#lS.R(e(fQ.V(gQ0k+XQ2|.SU2}.T.U.WS6n3O3PR8u6od#^W#W#Z%f(Q(Z*V+U-|/gr#gZm#h#i#l%c(e(f(g+X.S.T.U.W3O3P6oS*Y$x*^Q/n*ZQ1x,hQ2`-OQ4R/jQ6]2WQ7^4SQ8m6^T<w'U+VV#aW%f*VU#`W%f*VS(R#W(ZU(W#Z+U/gS-T'U+VT-w(Q-|V'Z!e%g*WQ$lfR)u$qT)j$l)kR3y.}T*[$x*^T*d${*VQ0n+aQ3R._Q5k1eQ6s3VQ8X5nQ8x6rQ9m8WQ:P8wQ:g9oQ:o:RQ:y:hR:|:pnqOXst!Z#d%k&o&q&r&t,l,q2O2RQ&i!VR,a&ftmOXst!U!V!Z#d%k&f&o&q&r&t,l,q2O2RR,h&lT%jm,hR1_,QR,`&dQ&S|R+x&TR+n%}T&m!W&pT&n!W&pT2Q,q2R",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:376,context:Ej,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[Rj],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$h&j(Rp(U!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$h&j(U!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$h&j(j%1l(Rp(U!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$h&j(Rp(U!b$[#t(O,2j(`$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$h&j(Rp(U!b$[#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$h&j(Rp(U!b#m(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$h&j$P(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(u+JY$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$h&j#y(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(T';W$h&j(RpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$h&j(RpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$h&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$c`$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(RpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$c`(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!i/.^$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!h!Lf$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$h&j(Rp(U!b(P%&f#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$h&j(Rp(U!b#k(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$h&j(Rp(U!bo+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!Y+Jf$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$h&j(Rp(U!b}.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_!X!L^$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$h&j(Rp(U!b#l(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$h&j(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$h&j(U!b!U7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$h&j!U7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$h&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$h&j(Rp!U7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$h&j(Rp!U7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Rp!U7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Rp!U7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(RpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$h&j(RpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$h&j(Rp(U!b!U7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Rp(U!b!U7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Rp(U!b!U7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Rp(U!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$h&j(Rp(U!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$h&j(Rp(U!b'y0/l!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$h&j(Rp(U!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$h&j(U!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$h&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(U!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$h&j(RpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(RpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Rp(U!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$h&j$P(Ch(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Y#t$h&j(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-<U(Rp(U!b(y7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$j&j(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#o(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$P(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#p(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#]*!Y$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#h(Cl$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#p(Ch$e#|$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#p(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#o(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#o(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(m(Ct$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$h&j#z(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!y$Ip$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!P0,v$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$h&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$h&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$h&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$h&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$h&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!V#)l$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#w(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$h&j(Rp(U!b([+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$h&j(Rp(U!b(O,2j$^#t(`$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$h&j(Rp(U!b$^#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X![#Hb(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(t+JY$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z)>v$?V_!Z(CdsBr$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Rp(U!b'w0/l$[#t(O,2j(`$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Rp(U!b'x0/l$[#t(O,2j(`$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Nj,Aj,Mj,2,3,4,5,6,7,8,9,10,11,12,13,14,Tj,new Ig("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(^~~",141,335),new Ig("j~RQYZXz{^~^O'{~~aP!P!Qd~iO'|~~",25,318)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14791},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:322,get:n=>Ij[n]||-1},{term:338,get:n=>Qj[n]||-1},{term:92,get:n=>Dj[n]||-1}],tokenPrec:14815}),Nk=[oo("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),oo("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),oo("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),oo("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),oo("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),oo(`try {
|
|
339
|
-
\${}
|
|
340
|
-
} catch (\${error}) {
|
|
341
|
-
\${}
|
|
342
|
-
}`,{label:"try",detail:"/ catch block",type:"keyword"}),oo("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),oo(`if (\${}) {
|
|
343
|
-
\${}
|
|
344
|
-
} else {
|
|
345
|
-
\${}
|
|
346
|
-
}`,{label:"if",detail:"/ else block",type:"keyword"}),oo(`class \${name} {
|
|
347
|
-
constructor(\${params}) {
|
|
348
|
-
\${}
|
|
349
|
-
}
|
|
350
|
-
}`,{label:"class",detail:"definition",type:"keyword"}),oo('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),oo('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Lj=Nk.concat([oo("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),oo("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),oo("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Ak=new oB,Mk=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function wc(n){return(e,t)=>{let o=e.node.getChild("VariableDefinition");return o&&t(o,n),!0}}const Vj=["FunctionDeclaration"],jj={FunctionDeclaration:wc("function"),ClassDeclaration:wc("class"),ClassExpression:()=>!0,EnumDeclaration:wc("constant"),TypeAliasDeclaration:wc("type"),NamespaceDeclaration:wc("namespace"),VariableDefinition(n,e){n.matchContext(Vj)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function Rk(n,e){let t=Ak.get(e);if(t)return t;let o=[],r=!0;function a(l,f){let h=n.sliceString(l.from,l.to);o.push({label:h,type:f})}return e.cursor(ln.IncludeAnonymous).iterate(l=>{if(r)r=!1;else if(l.name){let f=jj[l.name];if(f&&f(l,a)||Mk.has(l.name))return!1}else if(l.to-l.from>8192){for(let f of Rk(n,l.node))o.push(f);return!1}}),Ak.set(e,o),o}const Ik=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Qk=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Fj(n){let e=cn(n.state).resolveInner(n.pos,-1);if(Qk.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&Ik.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let o=[];for(let r=e;r;r=r.parent)Mk.has(r.name)&&(o=o.concat(Rk(n.state.doc,r)));return{options:o,from:t?e.from:n.pos,validFor:Ik}}const pa=kd.define({name:"javascript",parser:Bj.configure({props:[PS.add({IfStatement:ng({except:/^\s*({|else\b)/}),TryStatement:ng({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:CB,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),o=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:o?1:2)*n.unit},Block:SB({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":ng({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),TS.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":EB,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Dk={test:n=>/^JSX/.test(n.name),facet:wS({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Zj=pa.configure({dialect:"ts"},"typescript"),Wj=pa.configure({dialect:"jsx",props:[$m.add(n=>n.isTop?[Dk]:void 0)]}),zj=pa.configure({dialect:"jsx ts",props:[$m.add(n=>n.isTop?[Dk]:void 0)]},"typescript");let Bk=n=>({label:n,type:"keyword"});const Lk="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Bk),Uj=Lk.concat(["declare","implements","private","protected","public"].map(Bk));function Hj(n={}){let e=n.jsx?n.typescript?zj:Wj:n.typescript?Zj:pa,t=n.typescript?Lj.concat(Uj):Nk.concat(Lk);return new mB(e,[pa.data.of({autocomplete:WV(Qk,HC(t))}),pa.data.of({autocomplete:Fj}),n.jsx?Gj:[]])}function Yj(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function Vk(n,e,t=n.length){for(let o=e?.firstChild;o;o=o.nextSibling)if(o.name=="JSXIdentifier"||o.name=="JSXBuiltin"||o.name=="JSXNamespacedName"||o.name=="JSXMemberExpression")return n.sliceString(o.from,Math.min(o.to,t));return""}const Xj=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Gj=Be.inputHandler.of((n,e,t,o,r)=>{if((Xj?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||o!=">"&&o!="/"||!pa.isActiveAt(n.state,e,-1))return!1;let a=r(),{state:l}=a,f=l.changeByRange(h=>{var g;let{head:O}=h,v=cn(l).resolveInner(O-1,-1),b;if(v.name=="JSXStartTag"&&(v=v.parent),!(l.doc.sliceString(O-1,O)!=o||v.name=="JSXAttributeValue"&&v.to>O)){if(o==">"&&v.name=="JSXFragmentTag")return{range:h,changes:{from:O,insert:"</>"}};if(o=="/"&&v.name=="JSXStartCloseTag"){let x=v.parent,C=x.parent;if(C&&x.from==O-2&&((b=Vk(l.doc,C.firstChild,O))||((g=C.firstChild)===null||g===void 0?void 0:g.name)=="JSXFragmentTag")){let k=`${b}>`;return{range:ve.cursor(O+k.length,-1),changes:{from:O,insert:k}}}}else if(o==">"){let x=Yj(v);if(x&&x.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(l.doc.sliceString(O,O+2))&&(b=Vk(l.doc,x,O)))return{range:h,changes:{from:O,insert:`</${b}>`}}}}return{range:h}});return f.changes.empty?!1:(n.dispatch([a,l.update(f,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Kj={key:0},Jj=["onClick"],af=hn(u.defineComponent({__name:"btnSetting",props:{preset:{type:Array,default(){return[]}}},setup(n,{expose:e}){const t=n,o=u.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:B})=>B+1},{title:"参数名称",dataIndex:"name",key:"name",width:"60px",align:"center"},{title:"参数标题",dataIndex:"title",key:"title",width:"80px",align:"center"},{title:"参数value",dataIndex:"value",key:"value",width:"100px",align:"center"}]),r=u.ref({selectedRowKeys:[],columnWidth:"25px",onChange:B=>{r.value.selectedRowKeys=B}}),a={mounted:B=>B.focus()},l=u.ref({});function f(){const B=Object.keys(l.value);if(B.length)for(let I in B){const K=k.value.form.action.params[I];K&&l.value[I]&&Object.keys(l.value[I]).forEach(V=>{K[V]=l.value[I][V]})}l.value={}}function h(B,I,K){f();const V={};V[K]=I[K]||"",K=="showIndex"&&(V[K]=I.show?.query?.index),l.value[B]=V}function g(B,I,K){if(!I||!K){l.value={};return}const V=l.value[B][K];I[K]=V,l.value={}}function O(){k.value.form.action.params.push({title:"新建",name:"",value:""})}function v(){}const b=u.ref(""),x=u.ref({title:[{required:!0,message:"按钮标题不能为空"}],name:[{required:!0,message:"按钮名称不能为空"},{validator:(B,I)=>b.value!=I&&t.preset.includes(I)?Promise.reject("预设按钮名称,请使用其他名称,["+t.preset.join(",")+"]"):Promise.resolve(),trigger:"change"}]}),C=u.ref(Hj()),k=u.ref({title:"按钮设置",visible:!1,form:{},helps:{}}),L=u.ref();function A(B,I,K={}){B=JSON.parse(JSON.stringify(B)),B.event||(B.event={}),B.props||(B.props={}),B.action||(B.action={}),Object.keys(B.action).includes("maskClosable")||(B.action.maskClosable=!0),B.action.params||(B.action.params=[]),b.value=B.name,k.value.form=B,k.value.helps=K,k.value.visible=!0,L.value=I}const E=u.ref(null);function F(){E.value&&E.value.validate().then(()=>{k.value.visible=!1,L.value(k.value.form)})}return e({open:A,close}),(B,I)=>{const K=u.resolveComponent("a-input"),V=u.resolveComponent("a-form-item"),j=u.resolveComponent("a-select"),R=u.resolveComponent("a-input-number"),Y=u.resolveComponent("a-checkbox"),le=u.resolveComponent("a-tab-pane"),me=u.resolveComponent("a-switch"),ze=u.resolveComponent("a-button"),we=u.resolveComponent("a-divider"),se=u.resolveComponent("ToolOutlined"),Oe=u.resolveComponent("a-tooltip"),Le=u.resolveComponent("a-table"),ge=u.resolveComponent("a-tabs"),$e=u.resolveComponent("a-form"),Te=u.resolveComponent("a-modal");return u.openBlock(),u.createBlock(Te,{visible:k.value.visible,"onUpdate:visible":I[23]||(I[23]=ye=>k.value.visible=ye),title:k.value.title,centered:"",width:"50%",onOk:F},{default:u.withCtx(()=>[u.createVNode($e,{name:"basic",ref_key:"form",ref:E,rules:x.value,model:k.value.form,"label-col":{span:5},"wrapper-col":{span:19},autocomplete:"off",class:"form-mix btn-setting-form"},{default:u.withCtx(()=>[u.createVNode(ge,null,{default:u.withCtx(()=>[u.createVNode(le,{key:"base",tab:"基本设置"},{default:u.withCtx(()=>[u.createVNode(V,{label:"操作标题",required:"",name:"title"},{default:u.withCtx(()=>[u.createVNode(K,{value:k.value.form.title,"onUpdate:value":I[0]||(I[0]=ye=>k.value.form.title=ye)},null,8,["value"])]),_:1}),u.createVNode(V,{label:"操作名称",name:"name",required:""},{default:u.withCtx(()=>[u.createVNode(K,{value:k.value.form.name,"onUpdate:value":I[1]||(I[1]=ye=>k.value.form.name=ye)},null,8,["value"])]),_:1}),u.createVNode(V,{label:"操作图标"},{default:u.withCtx(()=>[u.createVNode(K,{value:k.value.form.icon,"onUpdate:value":I[2]||(I[2]=ye=>k.value.form.icon=ye)},null,8,["value"])]),_:1}),u.createVNode(V,{label:"按钮类型"},{default:u.withCtx(()=>[u.createVNode(j,{value:k.value.form.type,"onUpdate:value":I[3]||(I[3]=ye=>k.value.form.type=ye),allowClear:"",options:[{value:"primary",label:"主要按钮"},{value:"ghost",label:"幽灵按钮"},{value:"dashed",label:"虚线按钮"},{value:"link",label:"连接按钮"},{value:"text",label:"文本按钮"},{value:"default",label:"默认按钮"}]},null,8,["value"])]),_:1}),u.createVNode(V,{label:"显示顺序"},{default:u.withCtx(()=>[u.createVNode(R,{value:k.value.form.index,"onUpdate:value":I[4]||(I[4]=ye=>k.value.form.index=ye)},null,8,["value"])]),_:1}),u.createVNode(V,{label:"按钮大小"},{default:u.withCtx(()=>[u.createVNode(j,{value:k.value.form.size,"onUpdate:value":I[5]||(I[5]=ye=>k.value.form.size=ye),options:[{value:"small",label:"小"},{value:"middle",label:"中"},{value:"large",label:"大"}]},null,8,["value"])]),_:1}),u.createVNode(V,{label:"按钮特性"},{default:u.withCtx(()=>[u.createVNode(Y,{checked:k.value.form.props.block,"onUpdate:checked":I[6]||(I[6]=ye=>k.value.form.props.block=ye)},{default:u.withCtx(()=>I[24]||(I[24]=[u.createTextVNode("自适应 ")])),_:1},8,["checked"]),u.createVNode(Y,{checked:k.value.form.props.danger,"onUpdate:checked":I[7]||(I[7]=ye=>k.value.form.props.danger=ye)},{default:u.withCtx(()=>I[25]||(I[25]=[u.createTextVNode("危险 ")])),_:1},8,["checked"]),u.createVNode(Y,{checked:k.value.form.props.ghost,"onUpdate:checked":I[8]||(I[8]=ye=>k.value.form.props.ghost=ye)},{default:u.withCtx(()=>I[26]||(I[26]=[u.createTextVNode("幽灵 ")])),_:1},8,["checked"])]),_:1})]),_:1}),u.createVNode(le,{key:"action",tab:"响应设置"},{default:u.withCtx(()=>[u.createVNode(V,{label:"响应方式",required:""},{default:u.withCtx(()=>[u.createVNode(j,{value:k.value.form.action.type,"onUpdate:value":I[9]||(I[9]=ye=>k.value.form.action.type=ye),options:[{value:"link",label:"连接"},{value:"route",label:"路由"},{value:"drawer",label:"抽屉"},{value:"dialog",label:"对话框"}]},null,8,["value"])]),_:1}),["drawer","dialog"].includes(k.value.form.action.type)?(u.openBlock(),u.createBlock(V,{key:0,label:"页面编码",help:"根据该页面编码渲染页面内容"},{default:u.withCtx(()=>[u.createVNode(K,{value:k.value.form.action.psn,"onUpdate:value":I[10]||(I[10]=ye=>k.value.form.action.psn=ye)},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["drawer","dialog"].includes(k.value.form.action.type)?(u.openBlock(),u.createBlock(V,{key:1,label:"组件名称",help:"组件方式渲染,Vue全局注册的组件名称,且监听params参数,psn参数"},{default:u.withCtx(()=>[u.createVNode(K,{value:k.value.form.action.component,"onUpdate:value":I[11]||(I[11]=ye=>k.value.form.action.component=ye)},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),u.createVNode(V,{label:"连接地址"},{default:u.withCtx(()=>[u.createVNode(K,{value:k.value.form.action.href,"onUpdate:value":I[12]||(I[12]=ye=>k.value.form.action.href=ye)},null,8,["value"])]),_:1}),["link","route"].includes(k.value.form.action.type)?(u.openBlock(),u.createBlock(V,{key:2,label:"连接方式"},{default:u.withCtx(()=>[u.createVNode(j,{value:k.value.form.action.target,"onUpdate:value":I[13]||(I[13]=ye=>k.value.form.action.target=ye),options:[{value:"_blank",label:"新卡片页"},{value:"_self",label:"当前页面"}]},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["drawer"].includes(k.value.form.action.type)?(u.openBlock(),u.createBlock(V,{key:3,label:"抽屉位置"},{default:u.withCtx(()=>[u.createVNode(j,{value:k.value.form.action.position,"onUpdate:value":I[14]||(I[14]=ye=>k.value.form.action.position=ye),options:[{value:"left",label:"左侧"},{value:"right",label:"右侧"}]},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["drawer","dialog"].includes(k.value.form.action.type)?(u.openBlock(),u.createBlock(V,{key:4,label:"显示标题",required:""},{default:u.withCtx(()=>[u.createVNode(K,{value:k.value.form.action.title,"onUpdate:value":I[15]||(I[15]=ye=>k.value.form.action.title=ye)},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["drawer","dialog"].includes(k.value.form.action.type)?(u.openBlock(),u.createBlock(V,{key:5,label:"蒙层关闭"},{default:u.withCtx(()=>[u.createVNode(me,{checked:k.value.form.action.maskClosable,"onUpdate:checked":I[16]||(I[16]=ye=>k.value.form.action.maskClosable=ye),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1})):u.createCommentVNode("",!0),["drawer","dialog"].includes(k.value.form.action.type)?(u.openBlock(),u.createBlock(V,{key:6,label:"显示宽度"},{default:u.withCtx(()=>[u.createVNode(R,{value:k.value.form.action.width,"onUpdate:value":I[17]||(I[17]=ye=>k.value.form.action.width=ye)},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["dialog"].includes(k.value.form.action.type)?(u.openBlock(),u.createBlock(V,{key:7,label:"显示高度"},{default:u.withCtx(()=>[u.createVNode(R,{value:k.value.form.action.height,"onUpdate:value":I[18]||(I[18]=ye=>k.value.form.action.height=ye)},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),u.createVNode(we,{orientation:"left"},{default:u.withCtx(()=>[I[29]||(I[29]=u.createTextVNode("参数列表 ")),u.createVNode(ze,{size:"small",class:"param-btn",onClick:O},{default:u.withCtx(()=>I[27]||(I[27]=[u.createTextVNode("添加")])),_:1}),u.createVNode(ze,{size:"small",class:"param-btn",danger:"",onClick:v},{default:u.withCtx(()=>I[28]||(I[28]=[u.createTextVNode("删除")])),_:1})]),_:1}),u.createVNode(Le,{columns:o.value,"data-source":k.value.form.action.params,bordered:"",pagination:!1,"row-selection":r.value,"row-key":"name",size:"small"},{headerCell:u.withCtx(({column:ye})=>[["name","title"].includes(ye.key)?(u.openBlock(),u.createElementBlock("span",Kj,[u.createVNode(se),u.createTextVNode(" "+u.toDisplayString(ye.title),1)])):u.createCommentVNode("",!0),["value"].includes(ye.key)?(u.openBlock(),u.createBlock(Oe,{key:1,title:"支持常量和变量,变量使用{row.属性}方式获取"},{default:u.withCtx(()=>[u.createElementVNode("span",null,[u.createVNode(se),u.createTextVNode(" "+u.toDisplayString(ye.title),1)])]),_:2},1024)):u.createCommentVNode("",!0)]),bodyCell:u.withCtx(({column:ye,text:pt,record:Se,index:We})=>[["name","title","value"].includes(ye.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(["edit-field",(!l.value[We]||!Object.keys(l.value[We]).includes(ye.dataIndex))&&!pt&&"empty"]),onClick:wt=>h(We,Se,ye.dataIndex)},[l.value[We]&&Object.keys(l.value[We]).includes(ye.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(K,{key:0,value:l.value[We][ye.dataIndex],"onUpdate:value":wt=>l.value[We][ye.dataIndex]=wt,onBlur:wt=>g(We,Se,ye.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[a]]):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(pt),1)],64))],10,Jj)):u.createCommentVNode("",!0)]),_:1},8,["columns","data-source","row-selection"])]),_:1}),u.createVNode(le,{key:"event",tab:"事件设置"},{default:u.withCtx(()=>[u.createVNode(V,{label:"点击事件",help:k.value.helps.clickScript||"点击事件处理脚本,上下文参数:ctx,当前按钮对象:btn,当前事件对象:event,返回false则不触发默认逻辑"},{default:u.withCtx(()=>[u.createVNode(u.unref(qd),{modelValue:k.value.form.event.clickScript,"onUpdate:modelValue":I[19]||(I[19]=ye=>k.value.form.event.clickScript=ye),placeholder:"请输入点击事件处理脚本",style:{height:"250px"},autofocus:!0,"indent-with-tab":!0,tabSize:8,extensions:C.value,scrollbarStyle:null},null,8,["modelValue","extensions"])]),_:1},8,["help"]),u.createVNode(V,{label:"禁用逻辑",help:k.value.helps.disableScript||"按钮禁用逻辑控制脚本,上下文参数:ctx,当前按钮对象:btn,返回true禁用,否则可用"},{default:u.withCtx(()=>[u.createVNode(u.unref(qd),{modelValue:k.value.form.event.disableScript,"onUpdate:modelValue":I[20]||(I[20]=ye=>k.value.form.event.disableScript=ye),placeholder:"请输入按钮禁用逻辑",style:{height:"250px"},autofocus:!0,"indent-with-tab":!0,tabSize:8,extensions:C.value,scrollbarStyle:null},null,8,["modelValue","extensions"])]),_:1},8,["help"]),u.createVNode(V,{label:"显示逻辑",help:k.value.helps.visibleScript||"按钮显示逻辑控制脚本,上下文参数:ctx,当前按钮对象:btn,返回false隐藏,否则可见"},{default:u.withCtx(()=>[u.createVNode(u.unref(qd),{modelValue:k.value.form.event.visibleScript,"onUpdate:modelValue":I[21]||(I[21]=ye=>k.value.form.event.visibleScript=ye),placeholder:"请输入按钮显示逻辑",style:{height:"250px"},autofocus:!0,"indent-with-tab":!0,tabSize:8,extensions:C.value,scrollbarStyle:null},null,8,["modelValue","extensions"])]),_:1},8,["help"]),u.createVNode(V,{label:"动态标题",help:k.value.helps.titleScript||"按钮显示标题控制脚本,上下文参数:ctx,当前按钮对象:btn"},{default:u.withCtx(()=>[u.createVNode(u.unref(qd),{modelValue:k.value.form.event.titleScript,"onUpdate:modelValue":I[22]||(I[22]=ye=>k.value.form.event.titleScript=ye),placeholder:"请输入按钮动态标题逻辑",style:{height:"250px"},autofocus:!0,"indent-with-tab":!0,tabSize:8,extensions:C.value,scrollbarStyle:null},null,8,["modelValue","extensions"])]),_:1},8,["help"])]),_:1})]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["visible","title"])}}}),[["__scopeId","data-v-937393aa"]]);function $j(n,e){if(!n)return null;const t=e.split(".");let o=n;for(let r=0;r<t.length;r++)o&&(o=o[t[r]]);return o}const jk={getObjValue:$j};/*!
|
|
351
|
-
* vue-router v4.4.5
|
|
352
|
-
* (c) 2024 Eduardo San Martin Morote
|
|
353
|
-
* @license MIT
|
|
354
|
-
*/var Fk;(function(n){n.pop="pop",n.push="push"})(Fk||(Fk={}));var Zk;(function(n){n.back="back",n.forward="forward",n.unknown=""})(Zk||(Zk={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var Wk;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(Wk||(Wk={})),Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Symbol(process.env.NODE_ENV!=="production"?"router view depth":"");const qj=Symbol(process.env.NODE_ENV!=="production"?"router":""),e9=Symbol(process.env.NODE_ENV!=="production"?"route location":"");Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function jg(){return u.inject(qj)}function zk(n){return u.inject(e9)}const t9=["src"],n9=["src"],o9=hn(u.defineComponent({__name:"btn",props:{editor:{type:Object,required:!1},type:{type:String},btn:{type:Object,required:!0},ctx:{type:Object,default(){return{}}}},emits:["click"],setup(n,{emit:e}){const t=n,o=ou.useSession();u.onMounted(()=>{t.btn.event&&(t.btn.event.clickScript&&(t.btn.event.click=new Function("ctx","btn","event",t.btn.event.clickScript)),t.btn.event.disableScript&&(t.btn.event.disable=new Function("ctx","btn",t.btn.event.disableScript)),t.btn.event.visibleScript&&(t.btn.event.visible=new Function("ctx","btn",t.btn.event.visibleScript)),t.btn.event.titleScript&&(t.btn.event.title=new Function("ctx","btn",t.btn.event.titleScript)))});const r=u.computed(()=>t.btn.event?.title?t.btn.event?.title.call(this,t.ctx,t.btn):t.btn.title),a=u.computed(()=>t.btn.event?.visible?t.btn.event.visible.call(this,t.ctx,t.btn)!=!1:!0),l=u.computed(()=>t.btn.event?.disable?t.btn.event.disable.call(this,t.ctx,t.btn):!1),f=u.ref(null);function h(){f.value?.open(t.btn,x=>{Object.keys(x).forEach(C=>{t.btn[C]=x[C]})})}u.computed(()=>{const x={},C={...t.ctx,user:o.getPrincipal(),token:o.getToken()};return t.btn.action?.params?.filter(k=>k.name&&k.value).forEach(k=>{const L=k.value.matchAll("{[a-zA-Z.]*}"),A=[];let E=null;for(;E=L.next();){if(E&&E.value&&E.value[0]){let F=E.value[0].substring(1,E.value[0].length-1);A.includes(F)||A.push(F)}if(E.done)break}A.length>0?x[k.name]=jk.getObjValue(C,A[0]):x[k.name]=k.value}),x});const g=u.ref({open:!1}),O=u.computed(()=>{if(t.btn.action?.href){let x=t.btn.action.href;const C=x.matchAll("{[a-zA-Z.]*}"),k=[];let L=null;for(;L=C.next();){if(L&&L.value&&L.value[0]){let A=L.value[0].substring(1,L.value[0].length-1);k.includes(A)||k.push(A)}if(L.done)break}if(k.length>0){const A={...t.ctx,user:o.getPrincipal(),token:o.getToken()};for(let E=0;E<k.length;E++){let F=k[E],B=jk.getObjValue(A,F);B?B instanceof Object?x=x.replaceAll("{"+F+"}",JSON.stringify(B)):Array.isArray(B)?x=x.replaceAll("{"+F+"}",B.join(",")):x=x.replaceAll("{"+F+"}",B):x=x.replaceAll("{"+F+"}","")}}return x}return""}),v=e;jg();function b(x){t.btn.event?.click&&t.btn.event.click(t.ctx,t.btn)==!1||((t.btn.action?.type=="drawer"||t.btn.action?.type=="dialog")&&(g.value.open=!0),v("click",{btn:t.btn,event:x}))}return(x,C)=>{const k=u.resolveComponent("a-button"),L=u.resolveComponent("a-drawer"),A=u.resolveComponent("a-modal");return a.value?(u.openBlock(),u.createBlock(cs,{key:0,class:u.normalizeClass(["unione-btn",n.btn.props?.block&&"unione-btn-block"]),model:n.editor?.model.value,onSetting:h,custome:!0,"setting-title":"按钮设置"},{default:u.withCtx(()=>[u.createVNode(k,u.mergeProps({disabled:l.value,size:n.btn.size||"small",type:n.type||n.btn.type,shape:n.btn.shape,class:"unione-btn-"+n.btn.name,loading:n.btn.loading,target:n.btn.action?.target,onClick:b},n.btn.props),u.createSlots({default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(r.value)+" ",1)]),_:2},[n.btn.icon?{name:"icon",fn:u.withCtx(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(n.btn.icon)))]),key:"0"}:void 0]),1040,["disabled","size","type","shape","class","loading","target"]),n.btn.action?.type=="drawer"?(u.openBlock(),u.createBlock(L,{key:0,open:g.value.open,"onUpdate:open":C[0]||(C[0]=E=>g.value.open=E),title:n.btn.action?.title,placement:n.btn.action?.position,maskClosable:n.btn.action?.maskClosable,width:n.btn.action?.width,bodyStyle:{padding:0,overflow:!n.btn.action.component||n.btn.action.component=="iframe"?"hidden":"auto"}},{default:u.withCtx(()=>[!n.btn.action.component||n.btn.action.component=="iframe"?(u.openBlock(),u.createElementBlock("iframe",{key:0,class:"unione-iframe unione-btn-iframe",src:O.value},null,8,t9)):u.createCommentVNode("",!0)]),_:1},8,["open","title","placement","maskClosable","width","bodyStyle"])):u.createCommentVNode("",!0),n.btn.action?.type=="dialog"?(u.openBlock(),u.createBlock(A,{key:1,open:g.value.open,"onUpdate:open":C[1]||(C[1]=E=>g.value.open=E),title:n.btn.action?.title,width:n.btn.action?.width,maskClosable:n.btn.action?.maskClosable,centered:"",footer:null},{default:u.withCtx(()=>[!n.btn.action.component||n.btn.action.component=="iframe"?(u.openBlock(),u.createElementBlock("iframe",{key:0,class:"unione-iframe unione-btn-iframe",src:O.value,style:u.normalizeStyle({height:n.btn.action?.height?n.btn.action?.height+"px":""})},null,12,n9)):u.createCommentVNode("",!0)]),_:1},8,["open","title","width","maskClosable"])):u.createCommentVNode("",!0),u.createVNode(af,{ref_key:"btnSetting",ref:f},null,512)]),_:1},8,["class","model"])):u.createCommentVNode("",!0)}}}),[["__scopeId","data-v-d3ece18c"]]),i9={key:0,class:"unione-widget-empty-tip"},r9=hn(u.defineComponent({__name:"tabs",props:{wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1}},setup(n){const e=n,t=u.ref(),o=u.computed(()=>e.editor?.widget(e.wid)||e.widget);return(r,a)=>{const l=u.resolveComponent("a-tab-pane"),f=u.resolveComponent("a-tabs");return u.openBlock(),u.createBlock(cs,{class:u.normalizeClass(["unione-widget","unione-layout-tabs"]),model:e.editor?.model},{default:u.withCtx(()=>[o.value?(u.openBlock(),u.createBlock(f,{key:0,activeKey:t.value,"onUpdate:activeKey":a[0]||(a[0]=h=>t.value=h)},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(o.value.chidlren,(h,g)=>(u.openBlock(),u.createBlock(l,{key:g,class:"unione-layout-tab-pane"},{tab:u.withCtx(()=>[u.createElementVNode("span",null,[h.icon?(u.openBlock(),u.createBlock(u.resolveDynamicComponent(h.icon),{key:0})):u.createCommentVNode("",!0),u.createTextVNode(" "+u.toDisplayString(h.title),1)])]),default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(h.chidlren,(O,v)=>(u.openBlock(),u.createBlock(u.resolveDynamicComponent(O.widget),{key:v,wid:O.wid,editor:e.editor,widget:O},null,8,["wid","editor","widget"]))),128)),!h.chidlren||!h.chidlren.length?(u.openBlock(),u.createElementBlock("div",i9,u.toDisplayString(h.emptyTips),1)):u.createCommentVNode("",!0)]),_:2},1024))),128))]),_:1},8,["activeKey"])):u.createCommentVNode("",!0)]),_:1},8,["model"])}}}),[["__scopeId","data-v-1549a6a2"]]),a9=hn(u.defineComponent({__name:"render",props:{wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1},formData:{type:Object,required:!0}},setup(n){const e=n,t=u.inject("formSetting"),o=u.computed(()=>e.editor?.widget(e.wid)||e.widget||{}),r=u.computed(()=>{const l=o.value.configs||{};return t.platform=="app"&&(l.class||(l.class="all-line"),typeof l.class=="string"&&l.class.indexOf("all-line")<0&&(l.class=l.class+" all-line"),Array.isArray(l.class)&&!l.class.includes("all-line")&&l.class.push("all-line")),l.value!=null&&typeof l.value<"u"&&(e.formData[l.name]==null||typeof e.formData[l.name]>"u")&&(e.formData[l.name]=l.value),l}),a=u.computed(()=>{const l=t.showColumn||3;let f=t.labelWidget||9;if(r.value.labelCol&&(f=r.value.labelCol.span||6),r.value.class&&l>1){if(typeof r.value.class=="string"&&r.value.class.indexOf("all-line")>=0)return{span:Math.round(f/l)};if(Array.isArray(r.value.class)&&r.value.class.includes("all-line"))return{span:Math.round(f/l)}}return{span:f}});return(l,f)=>{const h=u.resolveComponent("a-form-item");return u.openBlock(),u.createBlock(cs,{class:u.normalizeClass(["unione-form-render",r.value.class])},{default:u.withCtx(()=>[o.value?.widget?(u.openBlock(),u.createBlock(h,{key:0,label:r.value.label,name:r.value.name,labelCol:a.value,required:r.value.required,rules:r.value.rules},{default:u.withCtx(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(o.value.widget),u.mergeProps({wid:o.value.wid,widget:n.widget,editor:e.editor,value:n.formData[r.value.name],"onUpdate:value":f[0]||(f[0]=g=>n.formData[r.value.name]=g)},r.value.attrs,{style:r.value.style}),null,16,["wid","widget","editor","value","style"]))]),_:1},8,["label","name","labelCol","required","rules"])):u.createCommentVNode("",!0)]),_:1},8,["class"])}}}),[["__scopeId","data-v-afd62b6d"]]),s9={class:"unione-props-setting unione-form-setting"},l9={class:"unione-form-btns"},c9={key:0},u9=["onClick"],d9={class:"field-txt"},f9=["onClick"],h9={key:1,class:"field-txt"},p9=["onClick"],m9={key:0,class:"field-txt"},g9={key:3,class:"edit-field"},O9={key:0},v9=["onClick"],y9=hn(u.defineComponent({__name:"formSetting",props:{wid:{type:String,required:!0},editor:{type:Object,required:!0}},setup(n){const e=n,t=u.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:j})=>j+1},{title:"字段名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"字段标题",dataIndex:"title",key:"title",width:"90px",align:"center"},{title:"控件类型",dataIndex:"widget",key:"widget",width:"60px",align:"center"},{title:"验证规则",dataIndex:"rules",key:"rules",width:"60px",align:"center"},{title:"表单",dataIndex:"isForm",key:"isForm",width:"40px",align:"center"},{title:"详情",dataIndex:"isView",key:"isView",width:"40px",align:"center"},{title:"转换器",dataIndex:"convertName",key:"convertName",width:"50px",align:"center"}]),o=u.computed(()=>{const j=e.editor.widget(e.wid)||{};return j.configs||(j.configs={}),j.configs.settings||(j.configs.settings={}),j.configs.settings.btns||(j.configs.settings.btns=[]),j}),r=u.computed(()=>(e.editor.dataModels()||[]).map(R=>({value:R.sn,label:R.title+"("+R.name+")"}))),a=u.computed(()=>{const j=o.value.configs.settings.btns,R=j.map(Y=>Y.name);if(!R.includes("save")){const Y={title:"保存",type:"primary",index:0,visible:!0,name:"save"};j.splice(Y.index,0,Y)}if(!R.includes("submit")){const Y={title:"提交",type:"primary",index:1,visible:!0,name:"submit"};let le=Y.index||1;j.splice(le,0,Y)}if(!R.includes("reset")){const Y={title:"重置",type:"default",index:2,visible:!0,props:{danger:!0},name:"reset"};j.splice(Y.index,0,Y)}if(!R.includes("back")){const Y={title:"返回",type:"default",index:3,visible:!0,name:"back"};j.splice(Y.index,0,Y)}return j}),l=u.ref(null);function f(j){l.value&&l.value.open(j,R=>{R.visible=!0,Object.keys(R).forEach(Y=>{j[Y]=R[Y]}),o.value.configs.settings.btns.sort((Y,le)=>{const me=Y.index||1,ze=le.index||1;return me-ze}),o.value.configs.settings.btns=[...o.value.configs.btns]})}function h(){const j=o.value.configs.settings.btns.length+1;let R={title:"新增",name:"new_"+j,index:j,size:"small",visible:!0,type:"default",props:{block:!1,ghost:!1,danger:!1},event:{}};R.name="new_"+o.value.configs.settings.btns.length;const Y=o.value.configs.settings.btns.filter(le=>le.name==R.name).length;Y>0&&(R.name=R.name+Y),o.value.configs.settings.btns.push(R),e.editor.widget(e.wid,o.value),l.value.open(R,le=>{Object.keys(le).forEach(me=>{R[me]=le[me]}),o.value.configs.btns=[...o.value.configs.btns]})}function g(j){const R=()=>{if(["save","submit","reset","back"].includes(j.name))j.visible=!1,o.value.configs.settings.btns=[...o.value.configs.settings.btns];else{const Y=[];o.value.configs.settings.btns.forEach(le=>{le.name!=j.name&&Y.push(le)}),o.value.configs.settings.btns=Y}};Vt.confirm({title:"确认信息",content:"请确定删除该工具?",onOk:()=>{R()}})}const O=u.ref({visible:!1,field:{},props:{},widgets:[{value:"a-input",label:"文本框"},{value:"a-textarea",label:"文本域"},{value:"a-input",label:"文本框"},{value:"a-checkbox",label:"多选框"},{value:"a-radio",label:"单选框"},{value:"a-input-number",label:"数值框"},{value:"a-select",label:"下拉框"},{value:"a-tree-select",label:"下拉树"},{value:"a-date-picker",label:"日期框"},{value:"a-input-password",label:"密码框"},{value:"a-input-search",label:"搜索框"},{value:"a-upload",label:"文件框"},{value:"unione-avatar",label:"头像框",disabled:!0},{value:"unione-picture-card",label:"照片墙"},{value:"a-switch",label:"开关"},{value:"a-slider",label:"滑块"}],widgetName:j=>{const R=O.value.widgets.filter(Y=>Y.value==j);return R[0]?R[0].label:j},toSetting:()=>{}}),v=u.ref({visible:!1,field:{},props:{},showInfo:j=>{let R="";return j.rules&&(R=j.rules.filter(Y=>Y.enable).length||""),R&&(R="("+R+")"),R},toSetting:()=>{const j=v.value.props,R={name:"range",trigger:j.trigger,whitespace:j.whitespace,message:j.rangeMessage};j.rangeMin!=null&&j.rangeMin!=null&&(R.min=j.rangeMin,R.enable=!0),j.rangeMax!=null&&j.rangeMax!=null&&(R.max=j.rangeMax,R.enable=!0);const Y={name:"reg",trigger:j.trigger,whitespace:j.whitespace,message:j.regMessage};j.regExpress&&(Y.pattern=j.regExpress,Y.enable=!0),v.value.field.rules=[R,Y],v.value.visible=!1,v.value.props={},console.log("rule",v.value.field.rules)}});function b(j){v.value.visible=!0,v.value.field=j;const R=j.rules||[],Y={trigger:"change",whitespace:!0};R.forEach(le=>{le.name=="reg"&&(Y.trigger=le.trigger,Y.whitespace=le.whitespace,Y.regExpress=le.pattern,Y.regMessage=le.message),le.name=="range"&&(Y.rangeMin=le.min,Y.rangeMax=le.max,Y.rangeMessage=le.message)}),v.value.props=Y}const x=u.ref({title:"列头设置",prop:"isList",visible:!1,field:{},show:{},toSetting:()=>{x.value.visible=!1}});function C(j,R){const Y=E.value.filter(me=>me.name==j.name);Y.forEach(me=>{R!="isSort"?me[R]=!0:me[R]=!me[R]});const le=Y[0];if(!(!le||R=="isSort")){switch(x.value.prop=R,x.value.field=j,le.show||(le.show={}),R){case"isQuery":le.show.query||(le.show.query={}),x.value.show=le.show.query,x.value.title=`查询设置/${j.title}(${j.name})`;break;case"isForm":le.show.form||(le.show.form={}),x.value.show=le.show.form,x.value.title=`表单设置/${j.title}(${j.name})`;break;case"isView":le.show.view||(le.show.view={}),x.value.show=le.show.view,x.value.title=`详情设置/${j.title}(${j.name})`;break;case"isList":le.show.list||(le.show.list={}),x.value.show=le.show.list,x.value.title=`列头设置/${j.title}(${j.name})`;break}x.value.visible=!0}}const k=u.ref({visible:!1,field:{},convert:{},optionColumn:[{title:"选项标题",dataIndex:"label"},{title:"选项值",dataIndex:"value"},{title:"操作",dataIndex:"action",width:"20%"}],toAddOption:()=>{k.value.convert.options||(k.value.convert.options=[]),k.value.convert.options.push({label:"",value:""})},toDelOption:(j,R)=>{k.value.convert.options.splice(j,1)},toSetting:()=>{k.value.visible=!1}});function L(j){k.value.visible=!0,k.value.field=j,k.value.convert=j.convert||{}}const A=u.computed(()=>e.editor?.dataModel(o.value.dataModel||"none")||{}),E=u.computed(()=>A.value.fields?.length?A.value.fields:[]),F={mounted:j=>j.focus()},B=u.ref({});function I(j,R){const Y={};R=="convertName"?Y[R]=j.convert?.type:Y[R]=j[R]||"",B.value={},B.value[j.name]=Y}function K(j,R){{B.value={};return}}function V(j,R){E.value.filter(le=>le.name==j.name).forEach(le=>{le[R]=!le[R]})}return(j,R)=>{const Y=u.resolveComponent("a-divider"),le=u.resolveComponent("CloseOutlined"),me=u.resolveComponent("a-button"),ze=u.resolveComponent("PlusOutlined"),we=u.resolveComponent("a-select"),se=u.resolveComponent("ToolOutlined"),Oe=u.resolveComponent("a-checkbox"),Le=u.resolveComponent("a-table"),ge=u.resolveComponent("a-select-option"),$e=u.resolveComponent("a-form-item"),Te=u.resolveComponent("a-form"),ye=u.resolveComponent("a-modal"),pt=u.resolveComponent("a-checkbox-group"),Se=u.resolveComponent("a-input-number"),We=u.resolveComponent("a-input"),wt=u.resolveComponent("a-col"),vo=u.resolveComponent("a-row");return u.openBlock(),u.createElementBlock("div",s9,[u.createVNode(Y,{orientation:"left"},{default:u.withCtx(()=>R[23]||(R[23]=[u.createTextVNode("按钮设置")])),_:1}),u.createElementVNode("div",l9,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.value,Ne=>(u.openBlock(),u.createBlock(me,u.mergeProps({key:Ne.name,class:["btn",Ne.name,!Ne.visible&&"deleted"],type:Ne.visible?Ne.type:"default",size:Ne.size,ref_for:!0},Ne.props||{},{onClick:mn=>f(Ne)}),u.createSlots({default:u.withCtx(()=>[u.createTextVNode(" "+u.toDisplayString(Ne.title)+" ",1),Ne.visible?(u.openBlock(),u.createBlock(le,{key:0,class:"btn-del",onClick:u.withModifiers(mn=>g(Ne),["stop"])},null,8,["onClick"])):u.createCommentVNode("",!0)]),_:2},[Ne.icon?{name:"icon",fn:u.withCtx(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(Ne.icon)))]),key:"0"}:void 0]),1040,["class","type","size","onClick"]))),128)),u.createVNode(me,{class:u.normalizeClass(["btn","btn-add"]),size:"small",onClick:R[0]||(R[0]=Ne=>h())},{default:u.withCtx(()=>[u.createVNode(ze)]),_:1})]),u.createVNode(Y,{orientation:"left"},{default:u.withCtx(()=>R[24]||(R[24]=[u.createTextVNode("表单设置")])),_:1}),R[36]||(R[36]=u.createTextVNode(" 数据模型:")),u.createVNode(we,{class:"data-model-list",options:r.value,value:o.value.dataModel,"onUpdate:value":R[1]||(R[1]=Ne=>o.value.dataModel=Ne)},null,8,["options","value"]),u.createVNode(Le,{columns:t.value,"data-source":E.value,bordered:"",scroll:{x:800},pagination:!1,"row-key":"name",size:"small"},{headerCell:u.withCtx(({column:Ne})=>[["widget","rules","convertName"].includes(Ne.key)?(u.openBlock(),u.createElementBlock("span",c9,[u.createVNode(se),u.createTextVNode(" "+u.toDisplayString(Ne.title),1)])):u.createCommentVNode("",!0)]),bodyCell:u.withCtx(({column:Ne,text:mn,record:ht})=>[["rules"].includes(Ne.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(["edit-field",!v.value.showInfo(ht)&&"empty"]),onClick:gn=>b(ht)},[u.createElementVNode("span",d9,u.toDisplayString(v.value.showInfo(ht)),1),v.value.showInfo(ht)?(u.openBlock(),u.createBlock(me,{key:0,type:"link"},{default:u.withCtx(()=>R[25]||(R[25]=[u.createTextVNode("设置")])),_:1})):u.createCommentVNode("",!0)],10,u9)):["widget"].includes(Ne.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(["edit-field",(!B.value[ht.name]||!Object.keys(B.value[ht.name]).includes(Ne.dataIndex))&&!mn&&"empty"]),onClick:gn=>I(ht,Ne.dataIndex)},[B.value[ht.name]&&Object.keys(B.value[ht.name]).includes(Ne.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(we,{key:0,value:ht[Ne.dataIndex],"onUpdate:value":gn=>ht[Ne.dataIndex]=gn,options:O.value.widgets,onBlur:R[2]||(R[2]=gn=>K())},null,8,["value","onUpdate:value","options"])),[[F]]):(u.openBlock(),u.createElementBlock("span",h9,u.toDisplayString(O.value.widgetName(mn)),1))],10,f9)):["convertName"].includes(Ne.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:2,class:u.normalizeClass(["edit-field",(!B.value[ht.name]||!Object.keys(B.value[ht.name]).includes(Ne.dataIndex))&&!ht.convert?.type&&"empty"]),onClick:gn=>I(ht,Ne.dataIndex)},[B.value[ht.name]&&Object.keys(B.value[ht.name]).includes(Ne.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(we,{key:0,value:ht[Ne.dataIndex],"onUpdate:value":gn=>ht[Ne.dataIndex]=gn,options:[{value:"dict",label:"字典"},{value:"option",label:"静态"}],onBlur:R[3]||(R[3]=gn=>K())},null,8,["value","onUpdate:value"])),[[F]]):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[ht.convert?.type?(u.openBlock(),u.createElementBlock("span",m9,u.toDisplayString(ht.convert.type=="dict"?"字典":"静态"),1)):u.createCommentVNode("",!0),ht.convert?.type?(u.openBlock(),u.createBlock(me,{key:1,type:"link",onClick:u.withModifiers(gn=>L(ht),["stop"])},{default:u.withCtx(()=>R[26]||(R[26]=[u.createTextVNode("设置")])),_:2},1032,["onClick"])):u.createCommentVNode("",!0)],64))],10,p9)):["isForm","isView"].includes(Ne.dataIndex)?(u.openBlock(),u.createElementBlock("div",g9,[u.createVNode(Oe,{checked:ht[Ne.dataIndex],onClick:gn=>V(ht,Ne.dataIndex)},null,8,["checked","onClick"]),u.createVNode(me,{type:"link",onClick:gn=>C(ht,Ne.dataIndex)},{default:u.withCtx(()=>R[27]||(R[27]=[u.createTextVNode("设置")])),_:2},1032,["onClick"])])):u.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),u.createVNode(ye,{visible:O.value.visible,"onUpdate:visible":R[5]||(R[5]=Ne=>O.value.visible=Ne),title:"控件设置",onOk:O.value.toSetting},{default:u.withCtx(()=>[u.createVNode(Te,{model:O.value.props,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off"},{default:u.withCtx(()=>[O.value.field.widget=="a-select"?(u.openBlock(),u.createBlock($e,{key:0,label:"下拉框类型"},{default:u.withCtx(()=>[u.createVNode(we,{value:O.value.props.mode,"onUpdate:value":R[4]||(R[4]=Ne=>O.value.props.mode=Ne),allowClear:!0},{default:u.withCtx(()=>[u.createVNode(ge,{value:"multiple"},{default:u.withCtx(()=>R[28]||(R[28]=[u.createTextVNode("多选")])),_:1}),u.createVNode(ge,{value:"tags"},{default:u.withCtx(()=>R[29]||(R[29]=[u.createTextVNode("标签")])),_:1})]),_:1},8,["value"])]),_:1})):u.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["visible","onOk"]),u.createVNode(ye,{visible:v.value.visible,"onUpdate:visible":R[13]||(R[13]=Ne=>v.value.visible=Ne),title:"规则设置",onOk:v.value.toSetting},{default:u.withCtx(()=>[u.createVNode(Te,{model:v.value.props,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off",class:"form-mix"},{default:u.withCtx(()=>[u.createVNode(Y,{orientation:"left"},{default:u.withCtx(()=>R[30]||(R[30]=[u.createTextVNode("基本设置")])),_:1}),u.createVNode($e,{label:"触发时机"},{default:u.withCtx(()=>[u.createVNode(pt,{value:v.value.props.trigger,"onUpdate:value":R[6]||(R[6]=Ne=>v.value.props.trigger=Ne),options:["change","blur"]},null,8,["value"])]),_:1}),v.value.field.isNull?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock($e,{key:0,label:"忽略空格",class:"checkbox-tips"},{default:u.withCtx(()=>[u.createVNode(Oe,{value:v.value.props.whitespace,"onUpdate:value":R[7]||(R[7]=Ne=>v.value.props.whitespace=Ne),checked:v.value.props.whitespace},{default:u.withCtx(()=>R[31]||(R[31]=[u.createTextVNode(" 必填验证开启时,是否忽略空格 ")])),_:1},8,["value","checked"])]),_:1})),u.createVNode(Y,{orientation:"left"},{default:u.withCtx(()=>R[32]||(R[32]=[u.createTextVNode("数值区间")])),_:1}),u.createVNode($e,{label:"有效区间"},{default:u.withCtx(()=>[u.createVNode(Se,{value:v.value.props.rangeMin,"onUpdate:value":R[8]||(R[8]=Ne=>v.value.props.rangeMin=Ne)},null,8,["value"]),R[33]||(R[33]=u.createElementVNode("span",{style:{margin:"auto 5px"}},null,-1)),u.createVNode(Se,{value:v.value.props.rangeMax,"onUpdate:value":R[9]||(R[9]=Ne=>v.value.props.rangeMax=Ne)},null,8,["value"])]),_:1}),u.createVNode($e,{label:"错误提示"},{default:u.withCtx(()=>[u.createVNode(We,{value:v.value.props.rangeMessage,"onUpdate:value":R[10]||(R[10]=Ne=>v.value.props.rangeMessage=Ne)},null,8,["value"])]),_:1}),u.createVNode(Y,{orientation:"left"},{default:u.withCtx(()=>R[34]||(R[34]=[u.createTextVNode("正则验证")])),_:1}),u.createVNode($e,{label:"表达式"},{default:u.withCtx(()=>[u.createVNode(We,{value:v.value.props.regExpress,"onUpdate:value":R[11]||(R[11]=Ne=>v.value.props.regExpress=Ne)},null,8,["value"])]),_:1}),u.createVNode($e,{label:"错误提示"},{default:u.withCtx(()=>[u.createVNode(We,{value:v.value.props.regMessage,"onUpdate:value":R[12]||(R[12]=Ne=>v.value.props.regMessage=Ne)},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["visible","onOk"]),u.createVNode(ye,{visible:x.value.visible,"onUpdate:visible":R[20]||(R[20]=Ne=>x.value.visible=Ne),title:x.value.title,onOk:x.value.toSetting},{default:u.withCtx(()=>[u.createVNode(Te,{model:x.value.show,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off"},{default:u.withCtx(()=>[u.createVNode($e,{label:"显示顺序"},{default:u.withCtx(()=>[u.createVNode(Se,{value:x.value.show.index,"onUpdate:value":R[14]||(R[14]=Ne=>x.value.show.index=Ne)},null,8,["value"])]),_:1}),["isQuery"].includes(x.value.prop)?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock($e,{key:0,label:"显示宽度"},{default:u.withCtx(()=>[u.createVNode(We,{value:x.value.show.width,"onUpdate:value":R[15]||(R[15]=Ne=>x.value.show.width=Ne)},null,8,["value"])]),_:1})),["isForm","isView"].includes(x.value.prop)?(u.openBlock(),u.createBlock($e,{key:1,label:"标题宽度"},{default:u.withCtx(()=>[u.createVNode(We,{value:x.value.show.labelWidth,"onUpdate:value":R[16]||(R[16]=Ne=>x.value.show.labelWidth=Ne)},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["isForm","isView"].includes(x.value.prop)?(u.openBlock(),u.createBlock($e,{key:2,label:"控件宽度"},{default:u.withCtx(()=>[u.createVNode(We,{value:x.value.show.valueWidth,"onUpdate:value":R[17]||(R[17]=Ne=>x.value.show.valueWidth=Ne)},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["isList"].includes(x.value.prop)?(u.openBlock(),u.createBlock($e,{key:3,label:"固定位置"},{default:u.withCtx(()=>[u.createVNode(we,{value:x.value.show.fixed,"onUpdate:value":R[18]||(R[18]=Ne=>x.value.show.fixed=Ne),options:[{value:"",label:"无"},{value:"left",label:"靠左"},{value:"right",label:"靠右"}]},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["isList"].includes(x.value.prop)?(u.openBlock(),u.createBlock($e,{key:4,label:"对齐方式"},{default:u.withCtx(()=>[u.createVNode(we,{value:x.value.show.align,"onUpdate:value":R[19]||(R[19]=Ne=>x.value.show.align=Ne),options:[{value:"left",label:"左对齐"},{value:"center",label:"居中"},{value:"right",label:"右对齐"}]},null,8,["value"])]),_:1})):u.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["visible","title","onOk"]),u.createVNode(ye,{visible:k.value.visible,"onUpdate:visible":R[22]||(R[22]=Ne=>k.value.visible=Ne),title:k.value.convert.type=="dict"?"字典设置":"选项设置",onOk:k.value.toSetting},{default:u.withCtx(()=>[k.value.convert.type!="dict"?(u.openBlock(),u.createElementBlock("div",O9,[u.createVNode(me,{class:"editable-add-btn",style:{"margin-bottom":"8px"},onClick:k.value.toAddOption},{default:u.withCtx(()=>R[35]||(R[35]=[u.createTextVNode("新增")])),_:1},8,["onClick"]),u.createVNode(Le,{columns:k.value.optionColumn,"data-source":k.value.convert.options,size:"small"},{bodyCell:u.withCtx(({column:Ne,record:mn,index:ht})=>[Ne.dataIndex==="label"?(u.openBlock(),u.createBlock(We,{key:0,value:mn.label,"onUpdate:value":gn=>mn.label=gn,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):u.createCommentVNode("",!0),Ne.dataIndex==="value"?(u.openBlock(),u.createBlock(We,{key:1,value:mn.value,"onUpdate:value":gn=>mn.value=gn,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):u.createCommentVNode("",!0),Ne.dataIndex==="action"?(u.openBlock(),u.createElementBlock("a",{key:2,onClick:gn=>k.value.toDelOption(ht,mn)},"删除",8,v9)):u.createCommentVNode("",!0)]),_:1},8,["columns","data-source"])])):u.createCommentVNode("",!0),k.value.convert.type=="dict"?(u.openBlock(),u.createBlock(Te,{key:1,model:k.value.convert,name:"basic","label-col":{span:8},"wrapper-col":{span:16},autocomplete:"off"},{default:u.withCtx(()=>[u.createVNode(vo,{type:"flex",style:{width:"100%"}},{default:u.withCtx(()=>[u.createVNode(wt,{span:24,order:1},{default:u.withCtx(()=>[u.createVNode($e,{label:"字典名称:"},{default:u.withCtx(()=>[u.createVNode(We,{value:k.value.convert.dict,"onUpdate:value":R[21]||(R[21]=Ne=>k.value.convert.dict=Ne)},null,8,["value"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])):u.createCommentVNode("",!0)]),_:1},8,["visible","title","onOk"]),u.createVNode(af,{ref_key:"btnSetting",ref:l},null,512)])}}}),[["__scopeId","data-v-c0f75bb9"]]),b9={class:"form-btns"},x9=hn(u.defineComponent({__name:"form",props:{wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1}},emits:["btnClick"],setup(n,{emit:e}){const t=n,o=u.ref({}),r=u.ref(null),a=u.computed(()=>{const L=t.editor?.widget(t.wid)||t.widget||{};return L.configs||(L.configs={}),L}),l=u.computed(()=>a.value.configs?.widgets||[]),f=u.computed(()=>a.value.configs?.settings||{});u.provide("formSetting",f.value);const h=zk(),g=jg();u.onMounted(()=>{console.log("router params",h.params),console.log("router query",h.query)});const O=u.computed(()=>{const L=f.value.btns||[],A=L.map(E=>E.name);if(!A.includes("save")){const E={title:"保存",type:"primary",index:0,visible:!0,name:"save"};L.splice(E.index,0,E)}if(!A.includes("submit")){const E={title:"提交",type:"primary",index:1,visible:!0,name:"submit"};let F=E.index||1;L.splice(F,0,E)}if(!A.includes("reset")){const E={title:"重置",type:"default",index:2,visible:!0,props:{danger:!0},name:"reset"};L.splice(E.index,0,E)}if(!A.includes("back")){const E={title:"返回",type:"default",index:3,visible:!0,name:"back"};L.splice(E.index,0,E)}return L}),v=e;function b({btn:L,event:A}){L.name=="save"&&x(),L.name=="reset"&&C(),L.name=="validate",L.name=="back"&&k(),v("btnClick",{btn:L,event:A})}function x(){alert(o)}function C(){r.value&&r.value.resetFields()}function k(){g.back()}return(L,A)=>{const E=u.resolveComponent("a-form"),F=u.resolveComponent("unione-btn");return u.openBlock(),u.createBlock(cs,{class:"unione-form-widget","setting-title":"表单设置",model:n.editor?.model.value},u.createSlots({default:u.withCtx(()=>[u.createVNode(E,{ref_key:"formObj",ref:r,model:o.value,class:u.normalizeClass(["unione-form",n.editor?.model.value,"form-layout-col-"+(f.value.showColumn||3)])},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(l.value,B=>(u.openBlock(),u.createBlock(u.resolveDynamicComponent(B.render||B.widget),{key:B.wid,wid:B.wid,widget:B,editor:n.editor,formData:o.value},null,8,["wid","widget","editor","formData"]))),128))]),_:1},8,["model","class"]),u.createElementVNode("div",b9,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(O.value,B=>(u.openBlock(),u.createBlock(F,{key:B.name,btn:B,editor:n.editor,ctx:o.value,onClick:b},null,8,["btn","editor","ctx"]))),128))])]),_:2},[n.editor&&n.wid?{name:"widget-setting",fn:u.withCtx(()=>[u.createVNode(y9,{wid:n.wid,editor:n.editor},null,8,["wid","editor"])]),key:"0"}:void 0]),1032,["model"])}}}),[["__scopeId","data-v-ab85bf08"]]),w9={class:"unione-props-setting unione-query-setting"},S9={class:"unione-query-opts"},C9={key:0},k9=["onClick"],P9={key:1},_9={key:1,class:"edit-field"},E9=["onClick"],T9=hn(u.defineComponent({__name:"querySetting",props:{wid:{type:String,required:!0},editor:{type:Object,required:!0}},setup(n){const e=n,t=u.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:F})=>F+1},{title:"字段名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"字段标题",dataIndex:"title",key:"title",width:"90px",align:"center"},{title:"查询",dataIndex:"isQuery",key:"isQuery",width:"30px",align:"center"},{title:"查询类型",dataIndex:"queryType",key:"queryType",width:"55px",align:"center"},{title:"显示顺序",dataIndex:"showIndex",key:"showIndex",width:"55px",align:"center"}]),o=u.computed(()=>{const F=e.editor.widget(e.wid)||{};return F.configs||(F.configs={}),F.configs.btns||(F.configs.btns=[]),F}),r=u.computed(()=>(e.editor.dataModels()||[]).map(B=>({value:B.sn,label:B.title+"("+B.name+")"}))),a=u.computed(()=>{const F=[],B=[];return o.value.configs.btns||(o.value.configs.btns=[]),o.value.configs.btns.forEach(I=>{F.push(I),B.push(I.name)}),B.includes("query")||F.splice(0,0,{visible:!0,name:"query",title:"搜索",type:"primary"}),B.includes("reset")||F.splice(1,0,{visible:!0,name:"reset",title:"重置",type:"default"}),B.includes("reset")||F.splice(1,0,{visible:!0,name:"advanced",title:"高级搜索",type:"default"}),F.sort((I,K)=>{const V=I.index||1,j=K.index||1;return V-j}),F}),l=u.ref(null);function f(F){l.value&&l.value.open(F,B=>{B.visible=!0,Object.keys(B).forEach(I=>{F[I]=B[I]}),o.value.configs.btns.sort((I,K)=>{const V=I.index||1,j=K.index||1;return V-j}),o.value.configs.btns=[...o.value.configs.btns]})}function h(){const F=o.value.configs.btns.length+1;let B={title:"新增",name:"new_"+F,size:"default",index:F,visible:!0,type:"default",props:{block:!1,ghost:!1,danger:!1},event:{clickScript:"",titleScript:"",disableScript:"",visibleScript:""}};o.value.configs.btns.push(B),e.editor.widget(e.wid,o.value),l.value.open(B,I=>{Object.keys(I).forEach(K=>{B[K]=I[K]}),o.value.configs.btns=[...o.value.configs.btns]})}function g(F){const B=()=>{if(["query","reset","advanced"].includes(F.name))F.visible=!1,o.value.configs.btns=[...o.value.configs.btns];else{const I=[];o.value.configs.btns.forEach(K=>{K.name!=F.name&&I.push(K)}),o.value.configs.btns=I}};Vt.confirm({title:"确认信息",content:"请确定删除该操作?",onOk:()=>{B()}})}const O=u.computed(()=>e.editor?.dataModel(o.value.dataModel||"none")||{}),v=u.computed(()=>O.value.fields?.length?O.value.fields:[]),b={mounted:F=>F.focus()},x=u.ref({});function C(){const F=Object.keys(x.value);if(F.length)for(let B in F){const I=v.value.filter(K=>K.name==B);if(I&&I[0]){let K=x.value[B];Object.keys(K).forEach(V=>{if(V=="showIndex"){const j=I[0].show?.query||{};I[0].show||(I[0].show={}),I[0].show.query={...j,index:K[V]}}else I[0][V]=K[V]})}}x.value={}}function k(F,B){C();const I={};I[B]=F[B]||"",B=="showIndex"&&(I[B]=F.show?.query?.index),x.value[F.name]=I}function L(F,B){if(!F||!B){x.value={};return}const I=x.value[F.name][B];if(B=="showIndex"){const K=F.show?.query||{};F.show||(F.show={}),F.show.query={...K,index:I}}else F[B]=I;x.value={}}function A(F,B){v.value.filter(K=>K.name==F.name).forEach(K=>{K[B]=!K[B]})}const E=u.ref({options:[{value:"keywords",label:"关键字"},{value:"equle",label:"精确"},{value:"like",label:"模糊"},{value:"like-right",label:"右模糊"},{value:"like-left",label:"左模糊"},{value:"range",label:"范围"}],showLabel:F=>{const B=E.value.options.filter(I=>I.value==F);return B[0]?B[0].label:F}});return(F,B)=>{const I=u.resolveComponent("a-divider"),K=u.resolveComponent("CloseOutlined"),V=u.resolveComponent("a-button"),j=u.resolveComponent("PlusOutlined"),R=u.resolveComponent("a-select"),Y=u.resolveComponent("ToolOutlined"),le=u.resolveComponent("a-checkbox"),me=u.resolveComponent("a-input-number"),ze=u.resolveComponent("a-table");return u.openBlock(),u.createElementBlock("div",w9,[u.createVNode(I,{orientation:"left"},{default:u.withCtx(()=>B[3]||(B[3]=[u.createTextVNode("查询按钮")])),_:1}),u.createElementVNode("div",S9,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.value,we=>(u.openBlock(),u.createBlock(V,u.mergeProps({key:we.name,class:["btn",we.name,!we.visible&&"deleted"],type:we.visible?we.type:"default",size:we.size||"default",ref_for:!0},we.props||{},{onClick:se=>f(we)}),u.createSlots({default:u.withCtx(()=>[u.createTextVNode(" "+u.toDisplayString(we.title)+" ",1),we.visible?(u.openBlock(),u.createBlock(K,{key:0,class:"btn-del",onClick:u.withModifiers(se=>g(we),["stop"])},null,8,["onClick"])):u.createCommentVNode("",!0)]),_:2},[we.icon?{name:"icon",fn:u.withCtx(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(we.icon)))]),key:"0"}:void 0]),1040,["class","type","size","onClick"]))),128)),u.createVNode(V,{class:u.normalizeClass(["btn","btn-add"]),onClick:B[0]||(B[0]=we=>h()),size:"small"},{default:u.withCtx(()=>[u.createVNode(j)]),_:1})]),u.createVNode(I,{orientation:"left"},{default:u.withCtx(()=>B[4]||(B[4]=[u.createTextVNode("查询字段")])),_:1}),B[5]||(B[5]=u.createTextVNode(" 数据模型:")),u.createVNode(R,{class:"data-model-list",options:r.value,value:o.value.dataModel,"onUpdate:value":B[1]||(B[1]=we=>o.value.dataModel=we)},null,8,["options","value"]),u.createVNode(ze,{columns:t.value,"data-source":v.value,bordered:"",scroll:{x:800},pagination:!1,"row-key":"name",size:"small"},{headerCell:u.withCtx(({column:we})=>[["showIndex","queryType"].includes(we.key)?(u.openBlock(),u.createElementBlock("span",C9,[u.createVNode(Y),u.createTextVNode(" "+u.toDisplayString(we.title),1)])):u.createCommentVNode("",!0)]),bodyCell:u.withCtx(({column:we,text:se,record:Oe})=>[["queryType"].includes(we.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(["edit-field",(!x.value[Oe.name]||!Object.keys(x.value[Oe.name]).includes(we.dataIndex))&&!se&&"empty"]),onClick:Le=>k(Oe,we.dataIndex)},[x.value[Oe.name]&&Object.keys(x.value[Oe.name]).includes(we.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(R,{key:0,value:Oe[we.dataIndex],"onUpdate:value":Le=>Oe[we.dataIndex]=Le,allowClear:!0,options:E.value.options,onBlur:B[2]||(B[2]=Le=>L())},null,8,["value","onUpdate:value","options"])),[[b]]):(u.openBlock(),u.createElementBlock("span",P9,u.toDisplayString(E.value.showLabel(se)),1))],10,k9)):["isQuery"].includes(we.dataIndex)?(u.openBlock(),u.createElementBlock("div",_9,[u.createVNode(le,{checked:Oe[we.dataIndex],onClick:Le=>A(Oe,we.dataIndex)},null,8,["checked","onClick"])])):we.dataIndex=="showIndex"?(u.openBlock(),u.createElementBlock("div",{key:2,class:u.normalizeClass(["edit-field",(!x.value[Oe.name]||!Object.keys(x.value[Oe.name]).includes(we.dataIndex))&&!se&&"empty"]),onClick:Le=>k(Oe,we.dataIndex)},[x.value[Oe.name]&&Object.keys(x.value[Oe.name]).includes(we.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(me,{key:0,value:x.value[Oe.name][we.dataIndex],"onUpdate:value":Le=>x.value[Oe.name][we.dataIndex]=Le,onBlur:Le=>L(Oe,we.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[b]]):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(Oe.show?.query?.index||" "),1)],64))],10,E9)):u.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),u.createVNode(af,{ref_key:"btnSetting",ref:l},null,512)])}}}),[["__scopeId","data-v-ce575063"]]),N9={class:"query-btn"},A9={class:"btn-advanced-overlay"},M9=hn(u.defineComponent({__name:"queryForm",props:{wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1}},emits:["query","reset","btnClick"],setup(n,{emit:e}){const t=n,o=u.computed(()=>{const b=t.editor?.widget(t.wid)||t.widget||{};return b.configs||(b.configs={}),b.configs.btns||(b.configs.btns=[]),b}),r=u.computed(()=>t.editor?.dataModel(o.value.dataModel||"none")||{});function a(){}const l=u.computed(()=>({visible:!0,name:"keywords",title:"关键字",placeholder:"请输入搜索内容",...o.value.configs?.keywords||{}})),f=u.computed(()=>{let b=[];return o.value.configs?.fields?.length?b=o.value.configs?.fields:r.value.fields?.length&&(b=r.value.fields.filter(x=>x.isQuery)),b.sort((x,C)=>{const k=x.show?.query?.index||1,L=C.show?.query?.index||1;return k-L}),b}),h=u.computed(()=>o.value.configs?.labelWidth||6),g=u.computed(()=>{const b=o.value.configs.btns.filter(x=>x.name=="advanced")[0]||{};return b.event?.clickScript&&(b.event.click=new Function("ctx","btn","event",b.event.clickScript)),b.event?.disableScript&&(b.event.disable=new Function("ctx","btn",b.event.disableScript)),b.event?.visibleScript&&(b.event.visible=new Function("ctx","btn",b.event.visibleScript)),{visible:!0,name:"advanced",title:"高级搜索",...b}}),O=u.computed(()=>{const b=o.value.configs.btns.filter(C=>C.name!="advanced"),x=[];return b.forEach(C=>{x.push(C.name)}),x.includes("query")||b.splice(0,0,{visible:!0,name:"query",title:"搜索",type:"primary"}),x.includes("reset")||b.splice(1,0,{visible:!0,name:"reset",title:"重置",type:"default"}),b.sort((C,k)=>{const L=C.index||1,A=k.index||1;return L-A}),b}),v=u.ref({});return(b,x)=>{const C=u.resolveComponent("a-input"),k=u.resolveComponent("a-form-item"),L=u.resolveComponent("unione-btn"),A=u.resolveComponent("a-checkbox"),E=u.resolveComponent("DownOutlined"),F=u.resolveComponent("a-button"),B=u.resolveComponent("a-dropdown"),I=u.resolveComponent("a-form");return u.openBlock(),u.createBlock(cs,{class:"unione-query-form",model:t.editor?.model.value,onSaving:a,"setting-title":"查询设置"},u.createSlots({default:u.withCtx(()=>[u.createVNode(I,{model:v.value,layout:"horizontal","label-col":{span:h.value}},{default:u.withCtx(()=>[l.value.visible?(u.openBlock(),u.createBlock(k,{key:0,label:l.value.title,class:"query-field keywords",name:l.value.name,style:u.normalizeStyle({width:h.value})},{default:u.withCtx(()=>[u.createVNode(C,{placeholder:l.value.placeholder,value:v.value[l.value.name],"onUpdate:value":x[0]||(x[0]=K=>v.value[l.value.name]=K)},null,8,["placeholder","value"])]),_:1},8,["label","name","style"])):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(f.value,K=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:K.name},[K.visible?(u.openBlock(),u.createBlock(k,{key:0,label:K.title,class:u.normalizeClass(["query-field",K.name]),style:u.normalizeStyle({width:h.value}),name:K.name},{default:u.withCtx(()=>[u.createVNode(C,{placeholder:K.placeholder,value:v.value[K.name],"onUpdate:value":V=>v.value[K.name]=V},null,8,["placeholder","value","onUpdate:value"])]),_:2},1032,["label","class","style","name"])):u.createCommentVNode("",!0)],64))),128)),u.createElementVNode("div",N9,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(O.value,K=>(u.openBlock(),u.createBlock(L,{key:K.name,btn:K,editor:n.editor},null,8,["btn","editor"]))),128)),g.value.visible&&f.value.length?(u.openBlock(),u.createBlock(B,{key:0,class:"btn btn-advanced",trigger:[g.value.trigger||"hover"]},{overlay:u.withCtx(()=>[u.createElementVNode("div",A9,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(f.value,K=>(u.openBlock(),u.createBlock(A,{key:K.name,class:"item",checked:K.visible,onClick:V=>K.visible=!K.visible},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(K.title),1)]),_:2},1032,["checked","onClick"]))),128))])]),default:u.withCtx(()=>[u.createVNode(F,null,{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(g.value.title)+" ",1),u.createVNode(E)]),_:1})]),_:1},8,["trigger"])):u.createCommentVNode("",!0)])]),_:1},8,["model","label-col"])]),_:2},[t.editor&&t.wid?{name:"widget-setting",fn:u.withCtx(()=>[u.createVNode(T9,{editor:t.editor,wid:t.wid},null,8,["editor","wid"])]),key:"0"}:void 0]),1032,["model"])}}}),[["__scopeId","data-v-4c6e1c2a"]]),R9={class:"unione-props-setting unione-table-setting"},I9={class:"unione-table-tools"},Q9={key:1,class:"unione-table-opts"},D9={key:0},B9=["onClick"],L9={key:1,class:"edit-field"},V9=["onClick"],j9={key:1},F9=hn(u.defineComponent({__name:"tableSetting",props:{wid:{type:String,required:!0},editor:{type:Object,required:!0}},setup(n){const e=n,t=u.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:j})=>j+1},{title:"字段名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"字段标题",dataIndex:"title",key:"title",width:"90px",align:"center"},{title:"显示",dataIndex:"isList",key:"isList",width:"30px",align:"center"},{title:"排序",dataIndex:"isSort",key:"isSort",width:"30px",align:"center"},{title:"显示顺序",dataIndex:"showIndex",key:"showIndex",width:"55px",align:"center"},{title:"对齐方式",dataIndex:"align",key:"align",width:"55px",align:"center",options:[{value:"left",label:"居左"},{value:"center",label:"居中"},{value:"right",label:"居右"}],showLabel(j,R){let Y=j.filter(le=>le.value==R);return Y&&Y[0]&&Y[0].label||R}},{title:"固定位置",dataIndex:"fixed",key:"fixed",width:"55px",align:"center",options:[{value:"left",label:"靠左"},{value:"right",label:"靠右"}],showLabel(j,R){let Y=j.filter(le=>le.value==R);return Y&&Y[0]&&Y[0].label||R}},{title:"列宽",dataIndex:"showWidth",key:"showWidth",width:"50px",align:"center"}]),o=u.computed(()=>{const j=e.editor.widget(e.wid)||{};return j.configs||(j.configs={}),j.configs.leftBtns||(j.configs.leftBtns=[]),j.configs.rightBtns||(j.configs.rightBtns=[]),j.configs.operation||(j.configs.operation={}),j.configs.operation.btns||(j.configs.operation.btns=[]),j.configs.operation.more||(j.configs.operation.more={}),j}),r=u.computed(()=>(e.editor.dataModels()||[]).map(R=>({value:R.sn,label:R.title+"("+R.name+")"}))),a=u.computed(()=>{if(!o.value)return[];const j=[],R=o.value.configs.leftBtns;if(R.forEach(Y=>{j.push(Y.name)}),!j.includes("add")){const Y={visible:!0,title:"新增",icon:"PlusOutlined",size:"small",index:0,type:"primary",props:{danger:!1,block:!1,ghost:!1},name:"add"};R.splice(0,0,Y)}if(!j.includes("delBatch")){const Y={visible:!0,title:"批量删除",icon:"DeleteOutlined",size:"small",index:1,type:"primary",props:{danger:!0,block:!1,ghost:!1},name:"delBatch"};R.splice(1,0,Y)}return R}),l=u.computed(()=>{if(!o.value)return[];const j=[],R=o.value.configs.rightBtns;if(R.forEach(Y=>{j.push(Y.name)}),!j.includes("downData")){const Y={visible:!0,icon:"CloudDownloadOutlined",size:"small",title:"导出",index:0,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"downData"};R.splice(0,0,Y)}if(!j.includes("impData")){const Y={visible:!0,title:"导入",icon:"CloudUploadOutlined",size:"small",index:1,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"impData"};R.splice(1,0,Y)}if(!j.includes("expData")){const Y={visible:!0,title:"导出",icon:"CloudUploadOutlined",size:"small",index:2,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"expData"};R.splice(2,0,Y)}if(!j.includes("downTmpl")){const Y={visible:!0,icon:"CloudDownloadOutlined",size:"small",title:"模版",index:3,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"downTmpl"};R.splice(3,0,Y)}return R});function f(j,R){j=="left"?O.value.open(R,Y=>{Y.visible=!0,Object.keys(Y).forEach(le=>{R[le]=Y[le]}),o.value.configs.leftBtns.sort((le,me)=>{const ze=le.index||1,we=me.index||1;return ze-we}),o.value.configs.leftBtns=[...o.value.configs.leftBtns]}):O.value.open(R,Y=>{Y.visible=!0,Object.keys(Y).forEach(le=>{R[le]=Y[le]}),o.value.configs.rightBtns.sort((le,me)=>{const ze=le.index||1,we=me.index||1;return ze-we}),o.value.configs.rightBtns=[...o.value.configs.rightBtns]})}function h(j){const R=j=="left"?o.value.configs.leftBtns.length:o.value.configs.rightBtns.length;let Y={title:"新增"+R,name:"new_"+R,index:R,size:"small",visible:!0,type:"default",props:{block:!1,ghost:!1,danger:!1},event:{}};j=="left"?o.value.configs.leftBtns.push(Y):o.value.configs.rightBtns.push(Y),e.editor.widget(e.wid,o.value),f(j,Y)}function g(j,R){const Y=()=>{if(["add","delBatch","expData","impData","downTmpl"].includes(R.name))R.visible=!1,j=="left"?o.value.configs.leftBtns=[...o.value.configs.leftBtns]:o.value.configs.rightBtns=[...o.value.configs.rightBtns];else if(j=="left"){const le=[];o.value.configs.leftBtns.forEach(me=>{me.name!=R.name&&le.push(me)}),o.value.configs.leftBtns=le}else{const le=[];o.value.configs.rightBtns.forEach(me=>{me.name!=R.name&&le.push(me)}),o.value.configs.rightBtns=le}};Vt.confirm({title:"确认信息",content:"请确定删除该工具?",onOk:()=>{Y()}})}const O=u.ref(null);function v(j){O.value.open(j,R=>{R.visible=!0,Object.keys(R).forEach(Y=>{j[Y]=R[Y]}),o.value.configs.operation.btns.sort((Y,le)=>{const me=Y.index||1,ze=le.index||1;return me-ze}),o.value.configs.operation.btns=[...o.value.configs.operation.btns]})}function b(){const j=o.value.configs.operation.btns.length+1;let R={title:"新增"+j,name:"new_"+j,index:j,size:"small",visible:!0,type:"default",props:{block:!1,ghost:!1,danger:!1},event:{clickScript:"",titleScript:"",disableScript:"",visibleScript:""}};o.value.configs.operation.btns.push(R),e.editor.widget(e.wid,o.value),O.value.open(R,Y=>{Object.keys(Y).forEach(le=>{R[le]=Y[le]}),o.value.configs.operation.btns=[...o.value.configs.operation.btns]})}function x(j){const R=()=>{if(["delete","view","edit"].includes(j.name))j.visible=!1,o.value.configs.operation.btns=[...o.value.configs.operation.btns];else{const Y=[];o.value.configs.operation.btns.forEach(le=>{le.name!=j.name&&Y.push(le)}),o.value.configs.operation.btns=Y}};Vt.confirm({title:"确认信息",content:"请确定删除该操作?",onOk:()=>{R()}})}const C=u.computed(()=>e.editor?.dataModel(o.value.dataModel||"none")||{}),k=u.computed(()=>C.value.fields?.length?(C.value.fields.forEach(j=>{j.show||(j.show={}),j.show.list||(j.show.list={})}),C.value.fields):[]),L={mounted:j=>j.focus()},A=u.ref({});function E(){const j=Object.keys(A.value);if(j.length)for(let R in j){const Y=k.value.filter(le=>le.name==R);if(Y&&Y[0]){let le=A.value[R];Object.keys(le).forEach(me=>{Y[0].show||(Y[0].show={}),Y[0].show.list||(Y[0].show.list={}),me=="showIndex"?Y[0].show.list.index=le[me]:me=="showWidth"?Y[0].show.list.width=le[me]:me=="fixed"?Y[0].show.list.fixed=le[me]:me=="align"?Y[0].show.list.align=le[me]:Y[0][me]=le[me]})}}A.value={}}function F(j,R){E();const Y={};R=="showIndex"?Y[R]=j.show?.list?.index:R=="showWidth"?Y[R]=j.show?.list?.width:R=="fixed"?Y[R]=j.show?.list?.fixed:R=="align"?Y[R]=j.show?.list?.align:Y[R]=j[R]||"",A.value[j.name]=Y}function B(j,R){if(!j||!R){A.value={};return}const Y=A.value[j.name][R];j.show||(j.show={}),j.show.list||(j.show.list={}),R=="showIndex"?j.show.list.index=Y:R=="showWidth"?j.show.list.width=Y:R=="fixed"?j.show.list.fixed=Y:R=="align"?j.show.list.align=Y:j[R]=Y,A.value={}}function I(j,R){return R=="showIndex"?j.show?.list?.index:R=="showWidth"?j.show?.list?.width:R=="fixed"?j.show?.list?.fixed:R=="align"?j.show?.list?.align:j[R]}function K(j,R){k.value.filter(le=>le.name==j.name).forEach(le=>{le[R]=!le[R]})}const V=u.ref({options:[{value:"equle",label:"精确"},{value:"like",label:"模糊"},{value:"like-right",label:"右模糊"},{value:"like-left",label:"左模糊"},{value:"range",label:"范围"}],showLabel:j=>{const R=V.value.options.filter(Y=>Y.value==j);return R[0]?R[0].label:j}});return(j,R)=>{const Y=u.resolveComponent("a-divider"),le=u.resolveComponent("CloseOutlined"),me=u.resolveComponent("a-button"),ze=u.resolveComponent("PlusOutlined"),we=u.resolveComponent("a-input"),se=u.resolveComponent("a-form-item"),Oe=u.resolveComponent("a-col"),Le=u.resolveComponent("a-input-number"),ge=u.resolveComponent("a-checkbox"),$e=u.resolveComponent("a-row"),Te=u.resolveComponent("a-select"),ye=u.resolveComponent("ToolOutlined"),pt=u.resolveComponent("a-table");return u.openBlock(),u.createElementBlock("div",R9,[u.createVNode(Y,{orientation:"left"},{default:u.withCtx(()=>R[8]||(R[8]=[u.createTextVNode("工具设置")])),_:1}),u.createElementVNode("div",I9,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.value,Se=>(u.openBlock(),u.createBlock(me,u.mergeProps({key:Se.name,class:["btn",Se.name,!Se.visible&&"deleted"],type:Se.visible?Se.type:"default",size:Se.size,ref_for:!0},Se.props||{},{onClick:We=>f("left",Se)}),u.createSlots({default:u.withCtx(()=>[u.createTextVNode(" "+u.toDisplayString(Se.title)+" ",1),Se.visible?(u.openBlock(),u.createBlock(le,{key:0,class:"bool-del",onClick:u.withModifiers(We=>g("left",Se),["stop"])},null,8,["onClick"])):u.createCommentVNode("",!0)]),_:2},[Se.icon?{name:"icon",fn:u.withCtx(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(Se.icon)))]),key:"0"}:void 0]),1040,["class","type","size","onClick"]))),128)),u.createVNode(me,{class:u.normalizeClass(["btn","tool-add"]),size:"small",onClick:R[0]||(R[0]=Se=>h("left"))},{default:u.withCtx(()=>[u.createVNode(ze)]),_:1}),u.createVNode(me,{class:u.normalizeClass(["btn","tool-add","right"]),onClick:R[1]||(R[1]=Se=>h("right")),size:"small"},{default:u.withCtx(()=>[u.createVNode(ze)]),_:1}),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(l.value,Se=>(u.openBlock(),u.createBlock(me,u.mergeProps({key:Se.name,class:["btn","right",Se.name,!Se.visible&&"deleted"],type:Se.visible?Se.type:"default",size:Se.size,ref_for:!0},Se.props||{},{onClick:We=>f("right",Se)}),u.createSlots({default:u.withCtx(()=>[u.createTextVNode(" "+u.toDisplayString(Se.title)+" ",1),Se.visible?(u.openBlock(),u.createBlock(le,{key:0,class:"bool-del",onClick:u.withModifiers(We=>g("right",Se),["stop"])},null,8,["onClick"])):u.createCommentVNode("",!0)]),_:2},[Se.icon?{name:"icon",fn:u.withCtx(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(Se.icon)))]),key:"0"}:void 0]),1040,["class","type","size","onClick"]))),128))]),u.createVNode(Y,{orientation:"left"},{default:u.withCtx(()=>R[9]||(R[9]=[u.createTextVNode("操作设置")])),_:1}),o.value?.configs?.operation?(u.openBlock(),u.createBlock($e,{key:0},{default:u.withCtx(()=>[u.createVNode(Oe,{span:7},{default:u.withCtx(()=>[u.createVNode(se,{label:"操作标题"},{default:u.withCtx(()=>[u.createVNode(we,{value:o.value.configs.operation.title},null,8,["value"])]),_:1})]),_:1}),u.createVNode(Oe,{span:5},{default:u.withCtx(()=>[u.createVNode(se,{label:"显示宽度",labelCol:{span:9}},{default:u.withCtx(()=>[u.createVNode(Le,{value:o.value.configs.operation.width,"onUpdate:value":R[2]||(R[2]=Se=>o.value.configs.operation.width=Se)},null,8,["value"])]),_:1})]),_:1}),u.createVNode(Oe,{span:6},{default:u.withCtx(()=>[u.createVNode(se,{label:"显示按钮数量",labelCol:{span:9}},{default:u.withCtx(()=>[u.createVNode(Le,{value:o.value.configs.operation.count,"onUpdate:value":R[3]||(R[3]=Se=>o.value.configs.operation.count=Se)},null,8,["value"])]),_:1})]),_:1}),u.createVNode(Oe,{span:5},{default:u.withCtx(()=>[u.createVNode(se,{label:"是否显示"},{default:u.withCtx(()=>[u.createVNode(ge,{checked:o.value.configs.operation.visible,"onUpdate:checked":R[4]||(R[4]=Se=>o.value.configs.operation.visible=Se)},null,8,["checked"])]),_:1})]),_:1})]),_:1})):u.createCommentVNode("",!0),u.createVNode(Y,{orientation:"left"},{default:u.withCtx(()=>R[10]||(R[10]=[u.createTextVNode("操作按钮")])),_:1}),o.value?.configs?.operation?(u.openBlock(),u.createElementBlock("div",Q9,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(o.value.configs.operation.btns,Se=>(u.openBlock(),u.createBlock(me,u.mergeProps({key:Se.name,class:["btn",Se.name,!Se.visible&&"deleted"],type:Se.visible?Se.type:"default",size:Se.size||"small",ref_for:!0},Se.props||{},{onClick:We=>v(Se)}),u.createSlots({default:u.withCtx(()=>[u.createTextVNode(" "+u.toDisplayString(Se.title)+" ",1),Se.visible?(u.openBlock(),u.createBlock(le,{key:0,class:"btn-del",onClick:u.withModifiers(We=>x(Se),["stop"])},null,8,["onClick"])):u.createCommentVNode("",!0)]),_:2},[Se.icon?{name:"icon",fn:u.withCtx(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(Se.icon)))]),key:"0"}:void 0]),1040,["class","type","size","onClick"]))),128)),u.createVNode(me,{class:u.normalizeClass(["btn","btn-add"]),onClick:R[5]||(R[5]=Se=>b()),size:"small"},{default:u.withCtx(()=>[u.createVNode(ze)]),_:1})])):u.createCommentVNode("",!0),u.createVNode(Y,{orientation:"left"},{default:u.withCtx(()=>R[11]||(R[11]=[u.createTextVNode("表头设置")])),_:1}),R[12]||(R[12]=u.createTextVNode(" 数据模型:")),u.createVNode(Te,{class:"data-model-list",options:r.value,value:o.value.dataModel,"onUpdate:value":R[6]||(R[6]=Se=>o.value.dataModel=Se)},null,8,["options","value"]),u.createVNode(pt,{columns:t.value,"data-source":k.value,bordered:"",scroll:{x:800},pagination:!1,"row-key":"name",size:"small"},{headerCell:u.withCtx(({column:Se})=>[["showIndex","showWidth","align","fixed"].includes(Se.key)?(u.openBlock(),u.createElementBlock("span",D9,[u.createVNode(ye),u.createTextVNode(" "+u.toDisplayString(Se.title),1)])):u.createCommentVNode("",!0)]),bodyCell:u.withCtx(({column:Se,record:We})=>[["showIndex","showWidth"].includes(Se.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(["edit-field",(!A.value[We.name]||!Object.keys(A.value[We.name]).includes(Se.dataIndex))&&!I(We,Se.dataIndex)&&"empty"]),onClick:wt=>F(We,Se.dataIndex)},[A.value[We.name]&&Object.keys(A.value[We.name]).includes(Se.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(Le,{key:0,value:A.value[We.name][Se.dataIndex],"onUpdate:value":wt=>A.value[We.name][Se.dataIndex]=wt,onBlur:wt=>B(We,Se.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[L]]):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(I(We,Se.dataIndex)),1)],64))],10,B9)):["isList","isQuery","isSort"].includes(Se.dataIndex)?(u.openBlock(),u.createElementBlock("div",L9,[u.createVNode(ge,{checked:We[Se.dataIndex],onClick:wt=>K(We,Se.dataIndex)},null,8,["checked","onClick"])])):["align","fixed"].includes(Se.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:2,class:u.normalizeClass(["edit-field",(!A.value[We.name]||!Object.keys(A.value[We.name]).includes(Se.dataIndex))&&!I(We,Se.dataIndex)&&"empty"]),onClick:wt=>F(We,Se.dataIndex)},[A.value[We.name]&&Object.keys(A.value[We.name]).includes(Se.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(Te,{key:0,value:We.show.list[Se.dataIndex],"onUpdate:value":wt=>We.show.list[Se.dataIndex]=wt,allowClear:!0,options:Se.options,onBlur:R[7]||(R[7]=wt=>B())},null,8,["value","onUpdate:value","options"])),[[L]]):(u.openBlock(),u.createElementBlock("span",j9,u.toDisplayString(Se.showLabel(Se.options,I(We,Se.dataIndex))),1))],10,V9)):u.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),u.createVNode(af,{ref_key:"btnSetting",ref:O,preset:["edit","view","add","delBatch","expData","impData","downTmpl"]},null,512)])}}}),[["__scopeId","data-v-c966c24c"]]),Z9={class:"unione-table-tools"},W9={class:"unione-table-data"},z9={key:0,class:"unione-table-opts"},U9=hn(u.defineComponent({__name:"tableList",props:{wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1},dataList:{type:Array,default(){return[]}}},emits:["edit","view","add","delBatch","expData","impData","downTmpl","toolClick","optClick","change"],setup(n,{emit:e}){const t=n,o=u.computed(()=>{const E=t.editor?.widget(t.wid)||t.widget||{};return E.configs||(E.configs={}),E}),r=u.computed(()=>t.editor?.dataModel(o.value.dataModel||"none")||{});function a(){}const l=u.computed(()=>{const E=t.dataList||[];for(let F=0;F<1e3;F++)E.push({sid:F,username:`Edrward ${F}`,sex:1,age:F+1,addr:`London Park no. ${F}`});return E}),f=u.computed(()=>{const E={title:"操作",visible:!0,width:200,count:2,btns:[],more:{title:"更多",visible:!0,trigger:"hover",size:"small",layout:"horizontal",items:[]},...o.value.configs.operation||{}},F=[];let B=o.value.configs.operation.btns||[];return B.forEach(I=>{F.push(I.name)}),F.includes("edit")||E.btns.splice(0,0,{title:"编辑",name:"edit",type:"default",visible:!0}),F.includes("view")||E.btns.splice(1,0,{title:"查看",name:"view",type:"default",visible:!0}),B=B.filter(I=>I.visible).sort((I,K)=>{const V=I.index||1,j=K.index||1;return V-j}),E.count?B.length>E.count&&(E.btns=B.slice(0,E.count),E.more.items=B.slice(E.count,B.length),E.more.visible=!0):E.more.visible=!1,E}),h=u.computed(()=>{let E=[];o.value.configs.columns?.length&&(E=o.value.configs.columns),!E.length&&r.value.fields?.length&&(E=r.value.fields.filter(B=>B.isList)),E.forEach(B=>{B.dataIndex=B.name,B.show?.list&&(B.width=B.show.list.width,B.fixed=B.show.list.fixed,B.align=B.show.list.align)});const F=o.value.configs.rownum;return F&&F.visible!=!1&&(F.customRender=B=>b.value?(b.value.current-1)*b.value.pageSize+B.index+1:B.index,E=[F,...E]),f.value&&f.value.visible!=!1&&E.push({fixed:"right",align:"center",...f.value,name:"operation"}),E}),g=u.computed(()=>{const E=[],F=[];if((o.value.configs.leftBtns||[]).forEach(I=>{I.visible&&E.push(I),F.push(I.name)}),!F.includes("add")){const I={visible:!0,title:"新增",icon:"PlusOutlined",size:"small",index:0,type:"primary",props:{danger:!1,block:!1,ghost:!1},name:"add"};E.splice(0,0,I)}if(!F.includes("delBatch")){const I={visible:!0,title:"批量删除",icon:"DeleteOutlined",size:"small",index:1,type:"primary",props:{danger:!0,block:!1,ghost:!1},name:"delBatch"};E.splice(1,0,I)}return E}),O=u.computed(()=>{const E=[],F=[];if((o.value.configs.rightBtns||[]).forEach(I=>{I.visible&&E.push(I),F.push(I.name)}),!F.includes("downData")){const I={visible:!0,icon:"CloudDownloadOutlined",size:"small",title:"导出",index:0,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"downData"};E.splice(0,0,I)}if(!F.includes("impData")){const I={visible:!0,title:"导入",icon:"CloudUploadOutlined",size:"small",index:1,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"impData"};E.splice(1,0,I)}if(!F.includes("expData")){const I={visible:!0,title:"导出",icon:"CloudUploadOutlined",size:"small",index:2,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"expData"};E.splice(2,0,I)}if(!F.includes("downTmpl")){const I={visible:!0,icon:"CloudDownloadOutlined",size:"small",title:"模版",index:3,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"downTmpl"};E.splice(3,0,I)}return E}),v=u.computed(()=>({bordered:!0,size:"small",...o.value.configs.attrs||{}})),b=u.computed(()=>{const E=o.value.configs.pagination||{};return{showTotal:F=>"共"+F+"记录",pageSize:10,current:1,total:0,position:["bottomCenter"],...E}}),x=u.computed(()=>typeof o.value.configs.selection<"u"?o.value.configs.selection:!0),C=u.ref({selectedRowKeys:[],selectedRowList:[],onChange:(E,F)=>{const B={};F.forEach(I=>{B[I.key.toString()]=I}),E.forEach(I=>{const K=B[I.toString()];C.value.selectedRowKeys.includes(I.toString())||(C.value.selectedRowKeys.push(I.toString()),C.value.selectedRowList.push(K));const V=[];l.value.forEach(j=>{!E.includes(j.key.toString())&&C.value.selectedRowKeys.includes(j.key.toString())&&V.push(j.key.toString())}),V.length&&(C.value.selectedRowKeys=C.value.selectedRowKeys.filter(j=>!V.includes(j.toString())),C.value.selectedRowList=C.value.selectedRowList.filter(j=>C.value.selectedRowKeys.includes(j.key.toString())))})}});jg();const k=e;function L(E,F,B,I){k("change",{pagination:E,filters:F,sorter:B,event:I})}function A(){Vt.confirm({title:"确认信息",content:`确定要清除当前选中的(${C.value.selectedRowKeys.length})条数据?`,centered:!0,onOk:()=>{C.value.selectedRowKeys=[],C.value.selectedRowList=[]}})}return(E,F)=>{const B=u.resolveComponent("unione-btn"),I=u.resolveComponent("DownOutlined"),K=u.resolveComponent("a-button"),V=u.resolveComponent("a-dropdown"),j=u.resolveComponent("a-table");return u.openBlock(),u.createBlock(cs,{class:"unione-table-list",model:t.editor?.model.value,onSaving:a,"setting-title":"列表设置"},u.createSlots({default:u.withCtx(()=>[u.createElementVNode("div",Z9,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(g.value,R=>(u.openBlock(),u.createBlock(B,{key:R.name,class:"btn",btn:R,editor:n.editor,ctx:{sltKeys:C.value.selectedRowKeys,sltRows:C.value.selectedRowList}},null,8,["btn","editor","ctx"]))),128)),C.value.selectedRowKeys.length?(u.openBlock(),u.createElementBlock("span",{key:0,class:"selected-info",onClick:A},"当前选中记录("+u.toDisplayString(C.value.selectedRowKeys.length)+")",1)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(O.value,R=>(u.openBlock(),u.createBlock(B,{key:R.name,class:"btn right",btn:R,editor:n.editor,ctx:{sltKeys:C.value.selectedRowKeys,sltRows:C.value.selectedRowList}},null,8,["btn","editor","ctx"]))),128))]),u.createElementVNode("div",W9,[h.value&&h.value.length?(u.openBlock(),u.createBlock(j,u.mergeProps({key:0,columns:h.value,"data-source":l.value,"row-selection":x.value?C.value:null,scroll:{x:1500},pagination:b.value,onChange:L},v.value),{bodyCell:u.withCtx(({column:R,record:Y})=>[R.name==="operation"?(u.openBlock(),u.createElementBlock("div",z9,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(f.value.btns,le=>(u.openBlock(),u.createBlock(B,{key:le.name,class:"opt",btn:le,editor:n.editor,ctx:{row:Y}},null,8,["btn","editor","ctx"]))),128)),f.value.more?.visible!=!1&&f.value.more.items?.length?(u.openBlock(),u.createBlock(V,{key:0,trigger:[f.value.more.trigger||"hover"],class:u.normalizeClass(["opt-more",f.value.more.size||"small"])},{overlay:u.withCtx(()=>[u.createElementVNode("div",{class:u.normalizeClass(["opt-more-overlay",f.value.more.layout])},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(f.value.more.items,le=>(u.openBlock(),u.createBlock(B,{key:le.name,class:"item",btn:le,editor:n.editor,type:"text",ctx:{row:Y}},null,8,["btn","editor","ctx"]))),128))],2)]),default:u.withCtx(()=>[u.createVNode(K,null,{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(f.value.more.title)+" ",1),u.createVNode(I)]),_:1})]),_:2},1032,["trigger","class"])):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)]),_:1},16,["columns","data-source","row-selection","pagination"])):u.createCommentVNode("",!0)])]),_:2},[t.editor&&t.wid?{name:"widget-setting",fn:u.withCtx(()=>[u.createVNode(F9,{editor:t.editor,wid:t.wid},null,8,["editor","wid"])]),key:"0"}:void 0]),1032,["model"])}}}),[["__scopeId","data-v-df2a5ad7"]]),H9={class:"page-setting-dialog"},Uk=hn(u.defineComponent({__name:"page",props:{settingTitle:{type:String,default:"页面设置"},editor:{type:Object,required:!1}},emits:["setting","saving"],setup(n,{emit:e}){const t=n,o=u.computed(()=>t.editor?.model?.value),r=ou.useSession(),a=u.computed(()=>r.getPrincipal()),l=u.ref(!1);u.provide("closeSetting",()=>{t.editor?.save().then(b=>{l.value=!1})});function f(){l.value=!0}function h(){t.editor?.save().then(b=>{console.log("res",b)})}function g(){t.editor?.save().then(b=>{console.log("res",b)})}const O=u.ref("");function v(b){O.value||(O.value=o.value),b?t.editor?.setModel("edit"):t.editor?.setModel(O.value)}return(b,x)=>{const C=u.resolveComponent("SettingOutlined"),k=u.resolveComponent("a-tooltip"),L=u.resolveComponent("SaveOutlined"),A=u.resolveComponent("FormOutlined"),E=u.resolveComponent("StopOutlined"),F=u.resolveComponent("a-modal");return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["unione-page",o.value])},[o.value=="edit"&&b.$slots["page-setting"]&&a.value?.userRoles?.includes("FORM-ADMIN")?(u.openBlock(),u.createBlock(k,{key:0,title:n.settingTitle},{default:u.withCtx(()=>[u.createVNode(C,{class:"page-setting",onClick:f})]),_:1},8,["title"])):u.createCommentVNode("",!0),o.value=="edit"&&b.$slots["page-setting"]&&a.value?.userRoles?.includes("FORM-ADMIN")?(u.openBlock(),u.createBlock(k,{key:1,title:"保存页面"},{default:u.withCtx(()=>[u.createVNode(L,{class:"btn-save",onClick:h})]),_:1})):u.createCommentVNode("",!0),o.value!="edit"&&a.value?.userRoles?.includes("FORM-ADMIN")?(u.openBlock(),u.createBlock(k,{key:2,title:"编辑页面"},{default:u.withCtx(()=>[u.createVNode(A,{class:"btn-edit",onClick:x[0]||(x[0]=B=>v(!0))})]),_:1})):u.createCommentVNode("",!0),o.value=="edit"&&b.$slots["page-setting"]&&a.value?.userRoles?.includes("FORM-ADMIN")?(u.openBlock(),u.createBlock(k,{key:3,title:"退出编辑"},{default:u.withCtx(()=>[u.createVNode(E,{class:"btn-edit",onClick:x[1]||(x[1]=B=>v(!1))})]),_:1})):u.createCommentVNode("",!0),u.renderSlot(b.$slots,"default",{},void 0,!0),o.value=="edit"?(u.openBlock(),u.createBlock(F,{key:4,title:t.settingTitle,open:l.value,"onUpdate:open":x[2]||(x[2]=B=>l.value=B),centered:"",width:"85%",onOk:g},{default:u.withCtx(()=>[u.createElementVNode("div",H9,[u.renderSlot(b.$slots,"page-setting",{},void 0,!0)])]),_:3},8,["title","open"])):u.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-49c94288"]]),Y9={class:"unione-props-setting data-field-manage"},X9={key:0},G9={key:1},K9={key:2},J9={key:3},$9={key:4},q9={key:5},eF={key:6},tF=["onClick"],nF=["onClick"],oF=["onClick"],iF=hn(u.defineComponent({__name:"dataFieldMange",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(n){const e=u.ref([{title:"序号",dataIndex:"index",key:"index",width:"35px",fixed:"left",align:"center",customRender:({index:b})=>b+1},{title:"名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"标题",dataIndex:"title",key:"title",width:"100px",align:"center"},{title:"数据类型",dataIndex:"dataType",key:"dataType",width:"80px",align:"center"},{title:"长度",dataIndex:"dataLen",key:"dataLen",width:"60px",align:"center"},{title:"小数点",dataIndex:"dataPrec",key:"dataPrec",width:"60px",align:"center"},{title:"默认值",dataIndex:"defaultValue",key:"defaultValue",width:"60px",align:"center"},{title:"主键",dataIndex:"isPk",key:"isPk",width:"40px",align:"center"},{title:"外键",dataIndex:"isFk",key:"isFk",width:"30px",align:"center"},{title:"非空",dataIndex:"isNull",key:"isNull",width:"30px",align:"center"},{title:"同步",dataIndex:"syncDbEnable",key:"syncDbEnable",width:"30px",align:"center"},{title:"备注",dataIndex:"descs",key:"descs",width:"140px",align:"center"}]),t=u.useModel(n,"modelValue"),o=u.ref({selectedRowKeys:[],columnWidth:"25px",onChange:b=>{b.forEach(x=>{o.value.selectedRowKeys.includes(x)||o.value.selectedRowKeys.push(x);const C=[];t.value.forEach(k=>{!b.includes(k.name)&&o.value.selectedRowKeys.includes(k.name)&&C.push(k.name)}),C.length&&(o.value.selectedRowKeys=o.value.selectedRowKeys.filter(k=>!C.includes(k)))})}}),r={mounted:b=>b.focus()},a=u.ref({});function l(){const b=Object.keys(a.value);if(b.length)for(let x in b){const C=t.value.filter(k=>k.name==x);if(C&&C[0]){let k=a.value[x];Object.keys(k).forEach(L=>{C[0][L]=k[L]})}}a.value={}}function f(b,x){l();const C={};C[x]=b[x]||"",a.value[b.name]=C}function h(b,x){if(!b||!x){a.value={};return}const C=a.value[b.name][x];if(x=="name"&&t.value.filter(L=>L[x]==C&&L.name!=b.name).length>0){Vt.warn({title:"提示信息",content:"字段名称["+C+"]已存在"});return}b[x]=C,a.value={}}function g(b,x){t.value.filter(k=>k.name==b.name).forEach(k=>{k[x]=!k[x]})}function O(){if(l(),t.value.filter(C=>C.name=="new_").length>0){a.value.new_={name:"new_"};return}const x={title:"",name:"new_",isPk:!1};t.value.push(x),a.value[x.name]={name:"new_"}}function v(){if(!o.value.selectedRowKeys.length){Vt.info({title:"提示信息",content:"请选择要删除的字段!"});return}Vt.confirm({title:"确认信息",content:"确定要删除选中的["+o.value.selectedRowKeys.length+"]字段么?",onOk:()=>{t.value=t.value.filter(b=>!o.value.selectedRowKeys.includes(b.name)),o.value.selectedRowKeys=[]}})}return(b,x)=>{const C=u.resolveComponent("a-button"),k=u.resolveComponent("a-tooltip"),L=u.resolveComponent("a-input"),A=u.resolveComponent("a-input-number"),E=u.resolveComponent("a-select-option"),F=u.resolveComponent("a-select"),B=u.resolveComponent("snap"),I=u.resolveComponent("a-checkbox"),K=u.resolveComponent("a-table");return u.openBlock(),u.createElementBlock("div",Y9,[u.createVNode(C,{class:"btn btn-add",type:"primary",onClick:O,size:"small"},{default:u.withCtx(()=>x[1]||(x[1]=[u.createTextVNode("新增")])),_:1}),u.createVNode(C,{class:"btn btn-delete",type:"primary",danger:"",onClick:v,size:"small"},{default:u.withCtx(()=>x[2]||(x[2]=[u.createTextVNode(" 删除 ")])),_:1}),u.createVNode(K,{columns:e.value,"data-source":t.value,pagination:!1,bordered:"","row-selection":o.value,scroll:{x:1150},"row-key":"name",size:"small",sticky:""},{headerCell:u.withCtx(({column:V})=>[V.key==="name"?(u.openBlock(),u.createElementBlock("span",X9,[x[3]||(x[3]=u.createElementVNode("span",{style:{color:"red","margin-right":"3px","font-size":"16px"}},"*",-1)),u.createVNode(u.unref(Ai)),u.createTextVNode(" "+u.toDisplayString(V.title),1)])):u.createCommentVNode("",!0),V.key==="title"?(u.openBlock(),u.createElementBlock("span",G9,[x[4]||(x[4]=u.createElementVNode("span",{style:{color:"red","margin-right":"3px","font-size":"16px"}},"*",-1)),u.createVNode(u.unref(Ai)),u.createTextVNode(" "+u.toDisplayString(V.title),1)])):u.createCommentVNode("",!0),V.key==="descs"?(u.openBlock(),u.createElementBlock("span",K9,[u.createVNode(u.unref(Ai)),u.createTextVNode(" "+u.toDisplayString(V.title),1)])):u.createCommentVNode("",!0),V.key==="dataLen"?(u.openBlock(),u.createElementBlock("span",J9,[u.createVNode(u.unref(Ai)),u.createTextVNode(" "+u.toDisplayString(V.title),1)])):u.createCommentVNode("",!0),V.key==="dataPrec"?(u.openBlock(),u.createElementBlock("span",$9,[u.createVNode(u.unref(Ai)),u.createTextVNode(" "+u.toDisplayString(V.title),1)])):u.createCommentVNode("",!0),V.key==="defaultValue"?(u.openBlock(),u.createElementBlock("span",q9,[u.createVNode(u.unref(Ai)),u.createTextVNode(" "+u.toDisplayString(V.title),1)])):u.createCommentVNode("",!0),V.key==="dataType"?(u.openBlock(),u.createElementBlock("span",eF,[u.createVNode(u.unref(Ai)),u.createTextVNode(" "+u.toDisplayString(V.title),1)])):u.createCommentVNode("",!0),V.key==="isPk"?(u.openBlock(),u.createBlock(k,{key:7,title:"至少配置一个主键字段"},{default:u.withCtx(()=>[x[5]||(x[5]=u.createElementVNode("span",{style:{color:"red","margin-right":"3px","font-size":"16px"}},"*",-1)),u.createTextVNode(u.toDisplayString(V.title),1)]),_:2},1024)):u.createCommentVNode("",!0),V.key==="isFk"?(u.openBlock(),u.createBlock(k,{key:8,title:"是否是外键字段"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(V.title),1)]),_:2},1024)):u.createCommentVNode("",!0),V.key==="isNull"?(u.openBlock(),u.createBlock(k,{key:9,title:"是否允许为空"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(V.title),1)]),_:2},1024)):u.createCommentVNode("",!0),V.key==="syncDbEnable"?(u.openBlock(),u.createBlock(k,{key:10,title:"是否同步到数据库"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(V.title),1)]),_:2},1024)):u.createCommentVNode("",!0)]),bodyCell:u.withCtx(({column:V,text:j,record:R})=>[["name","title","descs","defaultValue"].includes(V.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(["edit-field",(!a.value[R.name]||!Object.keys(a.value[R.name]).includes(V.dataIndex))&&!j&&"empty"]),onClick:Y=>f(R,V.dataIndex)},[a.value[R.name]&&Object.keys(a.value[R.name]).includes(V.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(L,{key:0,value:a.value[R.name][V.dataIndex],"onUpdate:value":Y=>a.value[R.name][V.dataIndex]=Y,onBlur:Y=>h(R,V.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[r]]):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(j||" "),1)],64))],10,tF)):u.createCommentVNode("",!0),["dataLen","dataPrec"].includes(V.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(["edit-field",(!a.value[R.name]||!Object.keys(a.value[R.name]).includes(V.dataIndex))&&!j&&"empty"]),onClick:Y=>f(R,V.dataIndex)},[a.value[R.name]&&Object.keys(a.value[R.name]).includes(V.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(A,{key:0,value:a.value[R.name][V.dataIndex],"onUpdate:value":Y=>a.value[R.name][V.dataIndex]=Y,onBlur:Y=>h(R,V.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[r]]):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createTextVNode(u.toDisplayString(j||" "),1)],64))],10,nF)):["dataType"].includes(V.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:2,class:u.normalizeClass(["edit-field",(!a.value[R.name]||!Object.keys(a.value[R.name]).includes(V.dataIndex))&&!j&&"empty"]),onClick:Y=>f(R,V.dataIndex)},[a.value[R.name]&&Object.keys(a.value[R.name]).includes(V.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(F,{key:0,value:R[V.dataIndex],"onUpdate:value":Y=>R[V.dataIndex]=Y,onBlur:x[0]||(x[0]=Y=>h())},{default:u.withCtx(()=>[u.createVNode(E,{key:"String",value:"String"}),u.createVNode(E,{key:"Long",value:"Long"}),u.createVNode(E,{key:"Short",value:"Short"}),u.createVNode(E,{key:"Integer",value:"Integer"}),u.createVNode(E,{key:"Float",value:"Float"}),u.createVNode(E,{key:"Double",value:"Double"}),u.createVNode(E,{key:"Date",value:"Date"}),u.createVNode(E,{key:"Timestamp",value:"Timestamp"})]),_:2},1032,["value","onUpdate:value"])),[[r]]):(u.openBlock(),u.createBlock(B,{key:1},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(j),1)]),_:2},1024))],10,oF)):["syncDbEnable","isFk","isPk"].includes(V.dataIndex)?(u.openBlock(),u.createBlock(I,{key:3,checked:R[V.dataIndex],onClick:Y=>g(R,V.dataIndex)},null,8,["checked","onClick"])):["isNull"].includes(V.dataIndex)?(u.openBlock(),u.createBlock(I,{key:4,checked:!R[V.dataIndex],onClick:Y=>g(R,V.dataIndex)},null,8,["checked","onClick"])):u.createCommentVNode("",!0)]),_:1},8,["columns","data-source","row-selection"])])}}}),[["__scopeId","data-v-ec6d21c7"]]),rF={class:"unione-props-setting data-field-setting"},aF={key:0},sF=["onClick"],lF={class:"field-txt"},cF=["onClick"],uF={key:1,class:"field-txt"},dF=["onClick"],fF={key:1},hF=["onClick"],pF={key:0,class:"field-txt"},mF={key:4,class:"edit-field"},gF={key:0},OF=["onClick"],vF=hn(u.defineComponent({__name:"dataFieldSetting",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(n){const e=u.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:A})=>A+1},{title:"字段名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"字段标题",dataIndex:"title",key:"title",width:"90px",align:"center"},{title:"控件类型",dataIndex:"widget",key:"widget",width:"60px",align:"center"},{title:"验证规则",dataIndex:"rules",key:"rules",width:"60px",align:"center"},{title:"表单",dataIndex:"isForm",key:"isForm",width:"40px",align:"center"},{title:"详情",dataIndex:"isView",key:"isView",width:"40px",align:"center"},{title:"列表",dataIndex:"isList",key:"isList",width:"40px",align:"center"},{title:"排序",dataIndex:"isSort",key:"isSort",width:"40px",align:"center"},{title:"查询",dataIndex:"isQuery",key:"isQuery",width:"40px",align:"center"},{title:"查询类型",dataIndex:"queryType",key:"queryType",width:"60px",align:"center"},{title:"转换器",dataIndex:"convertName",key:"convertName",width:"50px",align:"center"}]),t=u.useModel(n,"modelValue"),o={mounted:A=>A.focus()},r=u.ref({});function a(){const A=Object.keys(r.value);if(A.length)for(let E in A){const F=t.value.filter(B=>B.name==E);if(F&&F[0]){let B=r.value[E];Object.keys(B).forEach(I=>{I=="convertName"?(F[0].convert||(F[0].convert={}),F[0].convert.type=B[I]):F[0][I]=B[I]})}}r.value={}}function l(A,E){a();const F={};E=="convertName"?(A.convert||(A.convert={}),F[E]=A.convert?.type):F[E]=A[E]||"",r.value[A.name]=F}function f(A,E){{r.value={};return}}function h(A,E){t.value.filter(B=>B.name==A.name).forEach(B=>{B[E]=!B[E]})}const g=u.ref({title:"列头设置",prop:"isList",visible:!1,field:{},show:{},toSetting:()=>{g.value.visible=!1}});function O(A,E){const F=t.value.filter(I=>I.name==A.name);F.forEach(I=>{E!="isSort"?I[E]=!0:I[E]=!I[E]});const B=F[0];if(!(!B||E=="isSort")){switch(g.value.prop=E,g.value.field=A,B.show||(B.show={}),E){case"isQuery":B.show.query||(B.show.query={}),g.value.show=B.show.query,g.value.title=`查询设置/${A.title}(${A.name})`;break;case"isForm":B.show.form||(B.show.form={}),g.value.show=B.show.form,g.value.title=`表单设置/${A.title}(${A.name})`;break;case"isView":B.show.view||(B.show.view={}),g.value.show=B.show.view,g.value.title=`详情设置/${A.title}(${A.name})`;break;case"isList":B.show.list||(B.show.list={}),g.value.show=B.show.list,g.value.title=`列头设置/${A.title}(${A.name})`;break}g.value.visible=!0}}const v=u.ref({options:[{value:"keywords",label:"关键字"},{value:"equle",label:"精确"},{value:"like",label:"模糊"},{value:"like-right",label:"右模糊"},{value:"like-left",label:"左模糊"},{value:"range",label:"范围"}],showLabel:A=>{const E=v.value.options.filter(F=>F.value==A);return E[0]?E[0].label:A}}),b=u.ref({visible:!1,field:{},props:{},showInfo:A=>{let E="";return A.rules&&(E=A.rules.filter(F=>F.enable).length||""),E&&(E="("+E+")"),E},toSetting:()=>{const A=b.value.props,E={name:"range",trigger:A.trigger,whitespace:A.whitespace,message:A.rangeMessage};A.rangeMin!=null&&A.rangeMin!=null&&(E.min=A.rangeMin,E.enable=!0),A.rangeMax!=null&&A.rangeMax!=null&&(E.max=A.rangeMax,E.enable=!0);const F={name:"reg",trigger:A.trigger,whitespace:A.whitespace,message:A.regMessage};A.regExpress&&(F.pattern=A.regExpress,F.enable=!0),b.value.field.rules=[E,F],b.value.visible=!1,b.value.props={},console.log("rule",b.value.field.rules)}});function x(A){b.value.visible=!0,b.value.field=A;const E=A.rules||[],F={trigger:"change",whitespace:!0};E.forEach(B=>{B.name=="reg"&&(F.trigger=B.trigger,F.whitespace=B.whitespace,F.regExpress=B.pattern,F.regMessage=B.message),B.name=="range"&&(F.rangeMin=B.min,F.rangeMax=B.max,F.rangeMessage=B.message)}),b.value.props=F}const C=u.ref({visible:!1,field:{},props:{},widgets:[{value:"a-input",label:"文本框"},{value:"a-textarea",label:"文本域"},{value:"a-input",label:"文本框"},{value:"a-checkbox",label:"多选框"},{value:"a-radio",label:"单选框"},{value:"a-input-number",label:"数值框"},{value:"a-select",label:"下拉框"},{value:"a-tree-select",label:"下拉树"},{value:"a-date-picker",label:"日期框"},{value:"a-input-password",label:"密码框"},{value:"a-input-search",label:"搜索框"},{value:"a-upload",label:"文件框"},{value:"unione-avatar",label:"头像框",disabled:!0},{value:"unione-picture-card",label:"照片墙"},{value:"a-switch",label:"开关"},{value:"a-slider",label:"滑块"}],widgetName:A=>{const E=C.value.widgets.filter(F=>F.value==A);return E[0]?E[0].label:A},toSetting:()=>{}}),k=u.ref({visible:!1,field:{},convert:{},optionColumn:[{title:"选项标题",dataIndex:"label"},{title:"选项值",dataIndex:"value"},{title:"操作",dataIndex:"action",width:"20%"}],toAddOption:()=>{k.value.convert.options||(k.value.convert.options=[]),k.value.convert.options.push({label:"",value:""})},toDelOption:(A,E)=>{k.value.convert.options.splice(A,1)},toSetting:()=>{k.value.visible=!1}});function L(A){k.value.visible=!0,k.value.field=A,k.value.convert=A.convert||{}}return(A,E)=>{const F=u.resolveComponent("ToolOutlined"),B=u.resolveComponent("a-button"),I=u.resolveComponent("a-select"),K=u.resolveComponent("a-checkbox"),V=u.resolveComponent("a-table"),j=u.resolveComponent("a-input-number"),R=u.resolveComponent("a-form-item"),Y=u.resolveComponent("a-input"),le=u.resolveComponent("a-form"),me=u.resolveComponent("a-modal"),ze=u.resolveComponent("a-col"),we=u.resolveComponent("a-row"),se=u.resolveComponent("a-select-option"),Oe=u.resolveComponent("a-divider"),Le=u.resolveComponent("a-checkbox-group");return u.openBlock(),u.createElementBlock("div",rF,[u.createVNode(V,{columns:e.value,"data-source":t.value,bordered:"",scroll:{x:1e3},pagination:!1,"row-key":"name",size:"small"},{headerCell:u.withCtx(({column:ge})=>[["widget","queryType","rules","convertName"].includes(ge.key)?(u.openBlock(),u.createElementBlock("span",aF,[u.createVNode(F),u.createTextVNode(" "+u.toDisplayString(ge.title),1)])):u.createCommentVNode("",!0)]),bodyCell:u.withCtx(({column:ge,text:$e,record:Te})=>[["rules"].includes(ge.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(["edit-field",!b.value.showInfo(Te)&&"empty"]),onClick:ye=>x(Te)},[u.createElementVNode("span",lF,u.toDisplayString(b.value.showInfo(Te)),1),b.value.showInfo(Te)?(u.openBlock(),u.createBlock(B,{key:0,type:"link"},{default:u.withCtx(()=>E[22]||(E[22]=[u.createTextVNode("设置")])),_:1})):u.createCommentVNode("",!0)],10,sF)):["widget"].includes(ge.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:1,class:u.normalizeClass(["edit-field",(!r.value[Te.name]||!Object.keys(r.value[Te.name]).includes(ge.dataIndex))&&!$e&&"empty"]),onClick:ye=>l(Te,ge.dataIndex)},[r.value[Te.name]&&Object.keys(r.value[Te.name]).includes(ge.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(I,{key:0,value:Te[ge.dataIndex],"onUpdate:value":ye=>Te[ge.dataIndex]=ye,allowClear:!0,options:C.value.widgets,onBlur:E[0]||(E[0]=ye=>f())},null,8,["value","onUpdate:value","options"])),[[o]]):(u.openBlock(),u.createElementBlock("span",uF,u.toDisplayString(C.value.widgetName($e)),1))],10,cF)):["queryType"].includes(ge.dataIndex)?(u.openBlock(),u.createElementBlock(u.Fragment,{key:2},[Te.isQuery?(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(["edit-field",(!r.value[Te.name]||!Object.keys(r.value[Te.name]).includes(ge.dataIndex))&&!$e&&"empty"]),onClick:ye=>l(Te,ge.dataIndex)},[r.value[Te.name]&&Object.keys(r.value[Te.name]).includes(ge.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(I,{key:0,value:Te[ge.dataIndex],"onUpdate:value":ye=>Te[ge.dataIndex]=ye,allowClear:!0,options:v.value.options,onBlur:E[1]||(E[1]=ye=>f())},null,8,["value","onUpdate:value","options"])),[[o]]):(u.openBlock(),u.createElementBlock("span",fF,u.toDisplayString(v.value.showLabel($e)),1))],10,dF)):u.createCommentVNode("",!0)],64)):["convertName"].includes(ge.dataIndex)?(u.openBlock(),u.createElementBlock("div",{key:3,class:u.normalizeClass(["edit-field",(!r.value[Te.name]||!Object.keys(r.value[Te.name]).includes(ge.dataIndex))&&!Te.convert?.type&&"empty"]),onClick:ye=>l(Te,ge.dataIndex)},[r.value[Te.name]&&Object.keys(r.value[Te.name]).includes(ge.dataIndex)?u.withDirectives((u.openBlock(),u.createBlock(I,{key:0,value:Te.convert.type,"onUpdate:value":ye=>Te.convert.type=ye,options:[{value:"dict",label:"字典"},{value:"option",label:"静态"}],allowClear:!0,onBlur:E[2]||(E[2]=ye=>f())},null,8,["value","onUpdate:value"])),[[o]]):(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[Te.convert?.type?(u.openBlock(),u.createElementBlock("span",pF,u.toDisplayString(Te.convert.type=="dict"?"字典":"静态"),1)):u.createCommentVNode("",!0),Te.convert?.type?(u.openBlock(),u.createBlock(B,{key:1,type:"link",onClick:u.withModifiers(ye=>L(Te),["stop"])},{default:u.withCtx(()=>E[23]||(E[23]=[u.createTextVNode("设置")])),_:2},1032,["onClick"])):u.createCommentVNode("",!0)],64))],10,hF)):["isQuery","isForm","isView","isList","isSort"].includes(ge.dataIndex)?(u.openBlock(),u.createElementBlock("div",mF,[u.createVNode(K,{checked:Te[ge.dataIndex],onClick:ye=>h(Te,ge.dataIndex)},null,8,["checked","onClick"]),u.createVNode(B,{type:"link",onClick:ye=>O(Te,ge.dataIndex)},{default:u.withCtx(()=>E[24]||(E[24]=[u.createTextVNode("设置")])),_:2},1032,["onClick"])])):u.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),u.createVNode(me,{visible:g.value.visible,"onUpdate:visible":E[9]||(E[9]=ge=>g.value.visible=ge),title:g.value.title,onOk:g.value.toSetting},{default:u.withCtx(()=>[u.createVNode(le,{model:g.value.show,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off"},{default:u.withCtx(()=>[u.createVNode(R,{label:"显示顺序"},{default:u.withCtx(()=>[u.createVNode(j,{value:g.value.show.index,"onUpdate:value":E[3]||(E[3]=ge=>g.value.show.index=ge)},null,8,["value"])]),_:1}),["isQuery"].includes(g.value.prop)?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(R,{key:0,label:"显示宽度"},{default:u.withCtx(()=>[u.createVNode(Y,{value:g.value.show.width,"onUpdate:value":E[4]||(E[4]=ge=>g.value.show.width=ge)},null,8,["value"])]),_:1})),["isForm","isView"].includes(g.value.prop)?(u.openBlock(),u.createBlock(R,{key:1,label:"标题宽度"},{default:u.withCtx(()=>[u.createVNode(Y,{value:g.value.show.labelWidth,"onUpdate:value":E[5]||(E[5]=ge=>g.value.show.labelWidth=ge)},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["isForm","isView"].includes(g.value.prop)?(u.openBlock(),u.createBlock(R,{key:2,label:"控件宽度"},{default:u.withCtx(()=>[u.createVNode(Y,{value:g.value.show.valueWidth,"onUpdate:value":E[6]||(E[6]=ge=>g.value.show.valueWidth=ge)},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["isList"].includes(g.value.prop)?(u.openBlock(),u.createBlock(R,{key:3,label:"固定位置"},{default:u.withCtx(()=>[u.createVNode(I,{value:g.value.show.fixed,"onUpdate:value":E[7]||(E[7]=ge=>g.value.show.fixed=ge),options:[{value:"",label:"无"},{value:"left",label:"靠左"},{value:"right",label:"靠右"}]},null,8,["value"])]),_:1})):u.createCommentVNode("",!0),["isList"].includes(g.value.prop)?(u.openBlock(),u.createBlock(R,{key:4,label:"对齐方式"},{default:u.withCtx(()=>[u.createVNode(I,{value:g.value.show.align,"onUpdate:value":E[8]||(E[8]=ge=>g.value.show.align=ge),options:[{value:"left",label:"左对齐"},{value:"center",label:"居中"},{value:"right",label:"右对齐"}]},null,8,["value"])]),_:1})):u.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["visible","title","onOk"]),u.createVNode(me,{visible:k.value.visible,"onUpdate:visible":E[11]||(E[11]=ge=>k.value.visible=ge),title:k.value.convert.type=="dict"?"字典设置":"选项设置",onOk:k.value.toSetting},{default:u.withCtx(()=>[k.value.convert.type!="dict"?(u.openBlock(),u.createElementBlock("div",gF,[u.createVNode(B,{class:"editable-add-btn",style:{"margin-bottom":"8px"},onClick:k.value.toAddOption},{default:u.withCtx(()=>E[25]||(E[25]=[u.createTextVNode("新增")])),_:1},8,["onClick"]),u.createVNode(V,{columns:k.value.optionColumn,"data-source":k.value.convert.options,size:"small"},{bodyCell:u.withCtx(({column:ge,text:$e,record:Te,index:ye})=>[ge.dataIndex==="label"?(u.openBlock(),u.createBlock(Y,{key:0,value:Te.label,"onUpdate:value":pt=>Te.label=pt,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):u.createCommentVNode("",!0),ge.dataIndex==="value"?(u.openBlock(),u.createBlock(Y,{key:1,value:Te.value,"onUpdate:value":pt=>Te.value=pt,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):u.createCommentVNode("",!0),ge.dataIndex==="action"?(u.openBlock(),u.createElementBlock("a",{key:2,onClick:pt=>k.value.toDelOption(ye,Te)},"删除",8,OF)):u.createCommentVNode("",!0)]),_:1},8,["columns","data-source"])])):u.createCommentVNode("",!0),k.value.convert.type=="dict"?(u.openBlock(),u.createBlock(le,{key:1,model:k.value.convert,name:"basic","label-col":{span:8},"wrapper-col":{span:16},autocomplete:"off"},{default:u.withCtx(()=>[u.createVNode(we,{type:"flex",style:{width:"100%"}},{default:u.withCtx(()=>[u.createVNode(ze,{span:24,order:1},{default:u.withCtx(()=>[u.createVNode(R,{label:"字典名称:"},{default:u.withCtx(()=>[u.createVNode(Y,{value:k.value.convert.dict,"onUpdate:value":E[10]||(E[10]=ge=>k.value.convert.dict=ge)},null,8,["value"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])):u.createCommentVNode("",!0)]),_:1},8,["visible","title","onOk"]),u.createVNode(me,{visible:C.value.visible,"onUpdate:visible":E[13]||(E[13]=ge=>C.value.visible=ge),title:"控件设置",onOk:C.value.toSetting},{default:u.withCtx(()=>[u.createVNode(le,{model:C.value.props,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off"},{default:u.withCtx(()=>[C.value.field.widget=="a-select"?(u.openBlock(),u.createBlock(R,{key:0,label:"下拉框类型"},{default:u.withCtx(()=>[u.createVNode(I,{value:C.value.props.mode,"onUpdate:value":E[12]||(E[12]=ge=>C.value.props.mode=ge),allowClear:!0},{default:u.withCtx(()=>[u.createVNode(se,{value:"multiple"},{default:u.withCtx(()=>E[26]||(E[26]=[u.createTextVNode("多选")])),_:1}),u.createVNode(se,{value:"tags"},{default:u.withCtx(()=>E[27]||(E[27]=[u.createTextVNode("标签")])),_:1})]),_:1},8,["value"])]),_:1})):u.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["visible","onOk"]),u.createVNode(me,{visible:b.value.visible,"onUpdate:visible":E[21]||(E[21]=ge=>b.value.visible=ge),title:"规则设置",onOk:b.value.toSetting},{default:u.withCtx(()=>[u.createVNode(le,{model:b.value.props,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off",class:"form-mix"},{default:u.withCtx(()=>[u.createVNode(Oe,{orientation:"left"},{default:u.withCtx(()=>E[28]||(E[28]=[u.createTextVNode("基本设置")])),_:1}),u.createVNode(R,{label:"触发时机"},{default:u.withCtx(()=>[u.createVNode(Le,{value:b.value.props.trigger,"onUpdate:value":E[14]||(E[14]=ge=>b.value.props.trigger=ge),options:["change","blur"]},null,8,["value"])]),_:1}),b.value.field.isNull?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(R,{key:0,label:"忽略空格",class:"checkbox-tips"},{default:u.withCtx(()=>[u.createVNode(K,{value:b.value.props.whitespace,"onUpdate:value":E[15]||(E[15]=ge=>b.value.props.whitespace=ge),checked:b.value.props.whitespace},{default:u.withCtx(()=>E[29]||(E[29]=[u.createTextVNode(" 必填验证开启时,是否忽略空格 ")])),_:1},8,["value","checked"])]),_:1})),u.createVNode(Oe,{orientation:"left"},{default:u.withCtx(()=>E[30]||(E[30]=[u.createTextVNode("数值区间")])),_:1}),u.createVNode(R,{label:"有效区间"},{default:u.withCtx(()=>[u.createVNode(j,{value:b.value.props.rangeMin,"onUpdate:value":E[16]||(E[16]=ge=>b.value.props.rangeMin=ge)},null,8,["value"]),E[31]||(E[31]=u.createElementVNode("span",{style:{margin:"auto 5px"}},null,-1)),u.createVNode(j,{value:b.value.props.rangeMax,"onUpdate:value":E[17]||(E[17]=ge=>b.value.props.rangeMax=ge)},null,8,["value"])]),_:1}),u.createVNode(R,{label:"错误提示"},{default:u.withCtx(()=>[u.createVNode(Y,{value:b.value.props.rangeMessage,"onUpdate:value":E[18]||(E[18]=ge=>b.value.props.rangeMessage=ge)},null,8,["value"])]),_:1}),u.createVNode(Oe,{orientation:"left"},{default:u.withCtx(()=>E[32]||(E[32]=[u.createTextVNode("正则验证")])),_:1}),u.createVNode(R,{label:"表达式"},{default:u.withCtx(()=>[u.createVNode(Y,{value:b.value.props.regExpress,"onUpdate:value":E[19]||(E[19]=ge=>b.value.props.regExpress=ge)},null,8,["value"])]),_:1}),u.createVNode(R,{label:"错误提示"},{default:u.withCtx(()=>[u.createVNode(Y,{value:b.value.props.regMessage,"onUpdate:value":E[20]||(E[20]=ge=>b.value.props.regMessage=ge)},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["visible","onOk"])])}}}),[["__scopeId","data-v-ef9b9849"]]),yF={class:"unione-props-setting data-field"},bF=hn(u.defineComponent({__name:"dataField",props:u.mergeModels({filter:{type:Array,default(){return[]}}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=u.useModel(n,"modelValue");return(t,o)=>{const r=u.resolveComponent("OrderedListOutlined"),a=u.resolveComponent("a-tab-pane"),l=u.resolveComponent("ToolOutlined"),f=u.resolveComponent("a-tabs");return u.openBlock(),u.createElementBlock("div",yF,[u.createVNode(f,null,{default:u.withCtx(()=>[u.createVNode(a,{key:"field-mange"},{tab:u.withCtx(()=>[u.createVNode(r),o[2]||(o[2]=u.createTextVNode("字段管理 "))]),default:u.withCtx(()=>[u.createVNode(iF,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=h=>e.value=h)},null,8,["modelValue"])]),_:1}),u.createVNode(a,{key:"field-setting"},{tab:u.withCtx(()=>[u.createVNode(l),o[3]||(o[3]=u.createTextVNode("字段设置 "))]),default:u.withCtx(()=>[u.createVNode(vF,{modelValue:e.value,"onUpdate:modelValue":o[1]||(o[1]=h=>e.value=h)},null,8,["modelValue"])]),_:1})]),_:1})])}}}),[["__scopeId","data-v-008d1148"]]);for(var Tn=[],Fg=0;Fg<256;++Fg)Tn.push((Fg+256).toString(16).slice(1));function xF(n,e=0){return(Tn[n[e+0]]+Tn[n[e+1]]+Tn[n[e+2]]+Tn[n[e+3]]+"-"+Tn[n[e+4]]+Tn[n[e+5]]+"-"+Tn[n[e+6]]+Tn[n[e+7]]+"-"+Tn[n[e+8]]+Tn[n[e+9]]+"-"+Tn[n[e+10]]+Tn[n[e+11]]+Tn[n[e+12]]+Tn[n[e+13]]+Tn[n[e+14]]+Tn[n[e+15]]).toLowerCase()}var sf,wF=new Uint8Array(16);function SF(){if(!sf&&(sf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!sf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return sf(wF)}var CF=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Hk={randomUUID:CF};function kF(n,e,t){if(Hk.randomUUID&&!e&&!n)return Hk.randomUUID();n=n||{};var o=n.random||(n.rng||SF)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,xF(o)}const PF={key:0,class:"data-model-list"},_F=["onClick"],EF=hn(u.defineComponent({__name:"dataDefine",props:{limit:{type:Number,default:100},editor:{type:Object,required:!0}},setup(n,{expose:e}){const t=u.computed(()=>r.editor.dataModels()),o=u.ref({sn:"new_",title:"新建数据",fields:[]});u.onMounted(()=>{t.value&&t.value[0]&&(o.value=t.value[0])});const r=n;function a(v){o.value=v}function l(){if(t.value.length>=r.limit){Vt.warn({title:"提示信息",content:"数据模型数量超出限制!"});return}const v=kF(),b={sn:v,title:"新建数据",name:"new_",fields:[]};o.value=b,console.log("data model added",b),r.editor.dataModel(v,b)}const f={title:[{required:!0,message:"数据标题不能为空",trigger:"change"}],name:[{required:!0,message:"数据名称不能为空",trigger:"change"}],url:[{required:!0,message:"数据URl不能为空",trigger:"change"}]},h=u.ref(),g=u.inject("closeSetting");function O(){h.value.validate().then(v=>{g&&g()})}return e({toSaving:O}),(v,b)=>{const x=u.resolveComponent("a-input"),C=u.resolveComponent("a-form-item"),k=u.resolveComponent("a-textarea"),L=u.resolveComponent("a-form");return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["unione-props-setting","data-define",r.limit<=1&&"center"])},[r.limit>1?(u.openBlock(),u.createElementBlock("div",PF,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.value,A=>(u.openBlock(),u.createElementBlock("div",{key:A.sn,class:u.normalizeClass(["title",o.value&&o.value.sn==A.sn&&"slt"]),onClick:E=>a(A)},u.toDisplayString(A.title),11,_F))),128)),u.createElementVNode("div",{class:"title btn-add",onClick:l},"+")])):u.createCommentVNode("",!0),u.createElementVNode("div",{class:u.normalizeClass(["data-model-form",r.limit<=1&&"center"])},[u.createVNode(L,{ref_key:"formObj",ref:h,rules:f,model:o.value,"label-col":{span:4},"wrapper-col":{span:20}},{default:u.withCtx(()=>[u.createVNode(C,{label:"数据标题",name:"title",required:""},{default:u.withCtx(()=>[u.createVNode(x,{value:o.value.title,"onUpdate:value":b[0]||(b[0]=A=>o.value.title=A)},null,8,["value"])]),_:1}),u.createVNode(C,{label:"数据名称",name:"name",required:""},{default:u.withCtx(()=>[u.createVNode(x,{value:o.value.name,"onUpdate:value":b[1]||(b[1]=A=>o.value.name=A)},null,8,["value"])]),_:1}),u.createVNode(C,{label:"数据URL",name:"url",required:"",tooltip:"数据请求url,统一使用post请求,保存接口:url/save,修改接口:url/update,查询接口:url/find,删除接口:url/delete,详情接口:url/detail"},{default:u.withCtx(()=>[u.createVNode(x,{value:o.value.url,"onUpdate:value":b[2]||(b[2]=A=>o.value.url=A)},null,8,["value"])]),_:1}),u.createVNode(C,{label:"数据说明",name:"descs"},{default:u.withCtx(()=>[u.createVNode(k,{value:o.value.descs,"onUpdate:value":b[3]||(b[3]=A=>o.value.descs=A)},null,8,["value"])]),_:1})]),_:1},8,["model"]),u.createVNode(bF,{modelValue:o.value.fields,"onUpdate:modelValue":b[4]||(b[4]=A=>o.value.fields=A)},null,8,["modelValue"])],2)],2)}}}),[["__scopeId","data-v-6be2cc50"]]),TF={class:"unione-props-setting unione-page-setting"},Yk=hn(u.defineComponent({__name:"pageSetting",props:{editor:{type:Object,required:!0}},setup(n){const e=n,t=u.ref({});return u.onMounted(()=>{t.value=e.editor.define.value}),(o,r)=>{const a=u.resolveComponent("a-form-item"),l=u.resolveComponent("a-input"),f=u.resolveComponent("a-switch"),h=u.resolveComponent("a-textarea"),g=u.resolveComponent("a-form"),O=u.resolveComponent("a-tab-pane"),v=u.resolveComponent("a-tabs");return u.openBlock(),u.createElementBlock("div",TF,[u.createVNode(v,{type:"card"},{default:u.withCtx(()=>[u.createVNode(O,{key:"pageDefine",tab:"页面设置"},{default:u.withCtx(()=>[u.createVNode(g,{model:t.value,name:"basic","label-col":{span:5},"wrapper-col":{span:16},autocomplete:"off",class:"form-mix"},{default:u.withCtx(()=>[t.value.sn&&t.value.sn!="new_"?(u.openBlock(),u.createBlock(a,{key:0,label:"页面编码"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(t.value.sn)+"/V"+u.toDisplayString(t.value.vers),1)]),_:1})):u.createCommentVNode("",!0),u.createVNode(a,{label:"页面标题",required:""},{default:u.withCtx(()=>[u.createVNode(l,{value:t.value.title,"onUpdate:value":r[0]||(r[0]=b=>t.value.title=b)},null,8,["value"])]),_:1}),u.createVNode(a,{label:"页面组件",required:""},{default:u.withCtx(()=>[u.createVNode(l,{value:t.value.component,"onUpdate:value":r[1]||(r[1]=b=>t.value.component=b)},null,8,["value"])]),_:1}),u.createVNode(a,{label:"icon图标"},{default:u.withCtx(()=>[u.createVNode(l,{value:t.value.icon,"onUpdate:value":r[2]||(r[2]=b=>t.value.icon=b)},null,8,["value"])]),_:1}),u.createVNode(a,{label:"是否全局"},{default:u.withCtx(()=>[u.createVNode(f,{checked:t.value.isGlobal,"onUpdate:checked":r[3]||(r[3]=b=>t.value.isGlobal=b),checkedValue:1,checkedChildren:"是",unCheckedChildren:"否",unCheckedValue:0},null,8,["checked"])]),_:1}),u.createVNode(a,{label:"是否模版"},{default:u.withCtx(()=>[u.createVNode(f,{checked:t.value.isTmpl,"onUpdate:checked":r[4]||(r[4]=b=>t.value.isTmpl=b),checkedValue:1,checkedChildren:"是",unCheckedChildren:"否",unCheckedValue:0},null,8,["checked"])]),_:1}),u.createVNode(a,{label:"页面备注"},{default:u.withCtx(()=>[u.createVNode(h,{value:t.value.descs,"onUpdate:value":r[5]||(r[5]=b=>t.value.descs=b),placeholder:"请输入页面备注...",rows:4},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1}),u.createVNode(O,{key:"dataDefine",tab:"数据设置"},{default:u.withCtx(()=>[u.createVNode(EF,{editor:n.editor},null,8,["editor"])]),_:1})]),_:1})])}}}),[["__scopeId","data-v-2420ce7a"]]),Xk=hn(u.defineComponent({__name:"view",props:{psn:{type:String},params:{type:Object,default(){return{}}},pageDefine:{type:Object,required:!1}},setup(n){console.log("unione page view setup .....");const e=n,t={sn:"new_",title:"新建页面",types:"setting",vers:1,configs:{widgetList:[],dataModels:[]},component:"unione-form-page"},o=new Ap,r=u.computed(()=>o.$widgetList.value||[]);u.watch(()=>e.pageDefine,f=>{f&&o.load(a.value,f)});const a=u.ref("new_"),l=zk();return u.onMounted(()=>{a.value=e.psn||l?.query?.psn||l?.meta?.psn||"new_",console.log("unione page view,psn:"+a.value),o.setModel("run"),o.load(a.value,e.pageDefine||t)}),(f,h)=>(u.openBlock(),u.createBlock(Uk,{class:"unione-page-view","setting-title":"页面设置",editor:u.unref(o)},u.createSlots({default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.value,g=>(u.openBlock(),u.createBlock(u.resolveDynamicComponent(g.render||g.widget),{key:g.wid,wid:g.wid,widget:g,editor:u.unref(o)},null,8,["wid","widget","editor"]))),128))]),_:2},[u.unref(o)?{name:"page-setting",fn:u.withCtx(()=>[u.createVNode(Yk,{editor:u.unref(o)},null,8,["editor"])]),key:"0"}:void 0]),1032,["editor"]))}}),[["__scopeId","data-v-acc25072"]]),NF={UnioneEditor:Ap,locales:gh,install(n,e){n.component("UnioneBtn",o9),n.component("UnioneTabs",r9),n.component("UnioneQueryForm",M9),n.component("UnioneTableList",U9),n.component("UnioneFormRender",a9),n.component("UnioneForm",x9),n.component("UnionePageView",Xk)}};Jt.UnioneEditor=Ap,Jt.UnionePage=Uk,Jt.UnionePageSetting=Yk,Jt.UnionePageView=Xk,Jt.default=NF,Jt.locales=gh,Object.defineProperties(Jt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(ie,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("unione-base-vue"),require("ant-design-vue"),require("lodash-es"),require("vue-codemirror"),require("@codemirror/lang-javascript"),require("@ant-design/icons-vue"),require("uuid")):typeof define=="function"&&define.amd?define(["exports","vue","unione-base-vue","ant-design-vue","lodash-es","vue-codemirror","@codemirror/lang-javascript","@ant-design/icons-vue","uuid"],n):(ie=typeof globalThis<"u"?globalThis:ie||self,n(ie.index={},ie.Vue,ie.UnioneBaseVue,ie.antDesignVue,ie.lodashEs,ie.vueCodemirror,ie.langJavascript,ie.iconsVue,ie.uuid))})(this,function(ie,n,W,G,ea,Ft,ta,We,ia){"use strict";const na={isDebug:!0,axios:{form:"/portal"},listPageUrl:"/unione/page/list",addPageUrl:"/unione/page/add",editPageUrl:"/unione/page/edit",viewPageUrl:"/unione/page/view",formRules:[]},Ji=n.ref(na);function Me(o){return o&&(Ji.value=W.utils.obj.ext(Ji.value,o)),Ji.value}const sa={...{...{submit:"提交","submit.ok":"已提交","submit.error":"提交失败","confirm.ok":"确定","confirm.cancel":"取消","global.setting.title":"设置"},...{"pages.home":"首页"},...{"pages.layouts.userLayout.title":"user layout"}}},la={...{submit:"Submit","submit.ok":"Submitted","submit.error":"Submit Failed","confirm.ok":"Yes","confirm.cancel":"No","global.setting.title":"Settings"},...{"pages.home":"Home"},...{"pages.layouts.userLayout.title":"user layout"}},oa=n.ref([sa,la]);function aa(o,e){return W.locales.loadLanguage(o,()=>new Promise((t,i)=>{const s=oa.value.filter(l=>l.localeName==o);if(e)if(typeof e=="function")e().then(l=>{if(s.length==0){const a={...l,localeName:o};t(a)}else{const a={...s[0],...l};t(a)}});else if(s.length==0){const l={...e,localeName:o};t(l)}else{const l={...s[0],...e};t(l)}else s.length>0?t(s[0]):i("local language not defined ,lang:"+o)}))}const Zi={...W.locales};Zi.loadLanguage=aa;class ra{$psn;$pid;$store;$forms;$model;$params;$refObj;$refData;constructor(e,t){this.$psn=n.ref(e),this.$pid=n.ref(""),this.$store=n.ref({}),this.$forms=n.ref({}),this.$params=n.ref({}),this.$refObj=n.ref({}),this.$refData=n.ref({}),this.$model=t}params(e){return e&&(this.$params.value=e,e.id&&(this.$pid.value=e.id,this.$psn.value&&this.use(this.$psn.value,"form").detail(this.$pid.value))),this.$params.value}psn(e){return e&&(this.$psn.value=e),this.$psn.value}regRef(e,t){}setRefData(e,t,i){}use(e,t,i){let s=this.$store.value[e];return s||(s=new da(e,t,this.$model),this.$store.value[e]=s),i&&(this.$forms.value[e]=i),s}useForm(e,t,i){const s=this.use(e,"form",t);return this.$psn.value==e&&this.$pid.value&&s.detail(this.$pid.value).then(l=>{i&&i(l)}),s}data(e){return this.$store.value[e]}form(e){return e?this.$forms.value[e]:this.$forms.value}primary(){return this.data(this.$psn.value)}dsnList(){return Object.keys(this.$store.value)}}class da{$dsn;$type;$data;$dialog;$model;constructor(e,t,i){this.$dsn=e,this.$type=t,this.$data=n.ref(t=="form"?{}:[]),this.$dialog=W.useDialog(),this.$model=i}data(){return this.$type=="form"?this.$data.value||{}:this.$data.value||[]}find(e){const t="/api/data/storage/v1/find";return e.dsn=this.$dsn+(this.$model!="run"?"@dev":""),new Promise((i,s)=>{const l=G.message.loading("数据加载中...");W.axios.form({url:t,method:"post",data:e}).then(a=>{a.success?(this.$data.value=a.body,i(a)):(a.silence||this.$dialog.error({content:a.message||"未知错误,请联系管理员"}),s({info:"数据加载失败,model sn:"+this.$dsn,url:t,params:e,result:a}))}).catch(a=>{this.$dialog.error({content:"未知错误,请联系管理员"}),s({info:"数据加载失败,model sn:"+this.$dsn,url:t,params:e,err:a})}).finally(()=>{l()})})}save(e){const t="/api/data/storage/v1/save";return e.dsn=this.$dsn+(this.$model!="run"?"@dev":""),new Promise((i,s)=>{const l=G.message.loading("数据提交中...");W.axios.form({url:t,method:"post",data:e}).then(a=>{a.success?(this.$type=="form"&&(this.$data.value=a.body||{}),i(a)):(a.silence||this.$dialog.error({content:a.message||"未知错误,请联系管理员"}),s({info:"数据保存失败,model sn:"+this.$dsn,url:t,data:e,result:a}))}).catch(a=>{this.$dialog.error({content:"未知错误,请联系管理员"}),s({info:"数据保存失败,model sn:"+this.$dsn,url:t,data:e,err:a})}).finally(()=>{l()})})}loadByIds(e){return new Promise((t,i)=>{const s=G.message.loading("数据加载中...");W.axios.form({url:"/api/data/storage/v1/loadByIds",method:"post",data:{ids:e,dsn:this.$dsn+(this.$model!="run"?"@dev":"")}}).then(a=>{a.success?t(a):(a.silence||this.$dialog.error({content:a.message||"未知错误,请联系管理员"}),i({info:"数据加载失败,model sn:"+this.$dsn,ids:e,result:a}))}).catch(a=>{this.$dialog.error({content:"未知错误,请联系管理员"}),i({info:"数据加载失败,model sn:"+this.$dsn,ids:e,err:a})}).finally(()=>{s()})})}detail(e){return new Promise((t,i)=>{const s=G.message.loading("数据加载中..."),l="/api/data/storage/v1/detail";W.axios.form({url:l,method:"post",data:{id:e,dsn:this.$dsn+(this.$model!="run"?"@dev":"")}}).then(a=>{a.success?(this.$type=="form"&&(this.$data.value=a.body),t(a)):(a.silence||this.$dialog.error({content:a.message||"未知错误,请联系管理员"}),i({info:"加载数据详情失败,model sn:"+this.$dsn,url:l,id:e,result:a}))}).catch(a=>{this.$dialog.error({content:"未知错误,请联系管理员"}),i({info:"加载数据详情失败,model sn:"+this.$dsn,url:l,id:e,err:a})}).finally(()=>{s()})})}deleteByIds(e){return new Promise((t,i)=>{this.$dialog.confirm({content:"确定要删除选中记录么?共"+e.length+"条。",onOk:()=>{const s=G.message.loading("数据处理中..."),l="/api/data/storage/v1/delete";W.axios.form({url:l,method:"post",data:{ids:e,dsn:this.$dsn+(this.$model!="run"?"@dev":"")}}).then(a=>{a.success?t(a):(a.silence||this.$dialog.error({content:a.message||"未知错误,请联系管理员"}),i({info:"数据删除失败,model sn:"+this.$dsn,url:l,ids:e,result:a}))}).catch(a=>{this.$dialog.error({content:"未知错误,请联系管理员"}),i({info:"数据删除失败,model sn:"+this.$dsn,url:l,ids:e,err:a})}).finally(()=>{s()})}})})}}class ca{$event;$onces;$delayEmit;constructor(){this.$event=n.ref({}),this.$onces=n.ref({}),this.$delayEmit=n.ref({})}$on(e,t){if(this.$event.value[e]=t,this.$delayEmit.value[e]){const i=this.$delayEmit.value[e];t(i)}}$emit(e,t){if(this.$onces.value[e]){const i=this.$onces.value[e];delete this.$onces.value[e],i(t)}this.$event.value[e]?this.$event.value[e](t):(this.$delayEmit.value[e]=t,setTimeout(()=>{delete this.$delayEmit.value[e]},1e3*10))}$once(e,t){this.$onces.value[e]=t}$off(e){delete this.$event.value[e]}}class Rt{define;ebus;model;$widgetList;$widgetMap;$dataManager;$axiosProccess;$dialog;constructor(e={sn:"new_",title:"新建页面",types:"setting",vers:1,configs:{widgets:[],dsnList:[]}}){const t=e.configs||{};this.model=n.ref("run"),this.define=n.ref(e),this.ebus=new ca,this.$widgetList=n.ref([]),this.$widgetMap=n.ref({}),this.$dataManager=new ra(t.dsnList?t.dsnList[0]:"",this.model),this.$axiosProccess=n.ref({}),this.$dialog=W.useDialog(),this.loadConfig(t)}sn(){return this.define.value.sn}load(e,t){if(!e)return;if(this.define.value.sn=e,e=="new_"){console.log("新建/本地页面sn:"+e+",define:",t),t&&t.configs&&(this.define.value=t,this.loadConfig(t.configs));return}const i=sessionStorage.getItem("PAGE_DEFINE:"+e);if(i&&this.model.value=="run"){this.define.value=JSON.parse(i),this.loadConfig(this.define.value.configs),console.log("从会话缓存中加载页面sn:"+e+",define:",this.define.value);return}W.axios.form({url:"/api/page/define/load/"+e,method:"post"}).then(s=>{s.success?(this.define.value=s.body,s.body.configs?this.define.value.configs=s.body.configs:this.define.value.configs={widgets:[],dsnList:[]},this.loadConfig(this.define.value.configs),sessionStorage.setItem("PAGE_DEFINE:"+e,JSON.stringify(this.define.value)),console.log("从远程服务加载页面sn:"+e+",define:",this.define.value)):t&&t.configs&&(this.define.value=t,this.loadConfig(t.configs))})}save(){return new Promise((e,t)=>{if(this.$axiosProccess.value.save){console.warn("unione form editor save process runing,sn:"+this.define.value.sn),t();return}this.$axiosProccess.value.save=!0;const i={...this.define.value.configs||{},widgets:this.$widgetList.value,dsnList:this.$dataManager.dsnList()},s={...this.define.value};s.configs=JSON.stringify(i),W.axios.form({url:"/api/page/define/save",method:"post",data:s}).then(l=>{this.$axiosProccess.value.save=!1,l.success?(G.message.success(l.message),this.define.value=l.body,sessionStorage.setItem("PAGE_DEFINE:"+this.define.value.sn,JSON.stringify(this.define.value)),this.load(this.define.value.sn,this.define.value),e(l.body)):(this.$dialog.error({content:l.message}),t())}).catch(l=>{console.error("页面配置保存失败",l),this.$dialog.error({content:"页面配置保存失败"})}).finally(()=>{this.$axiosProccess.value.save=!1})})}loadConfig(e){e.dsnList?.length&&this.$dataManager.psn(e.dsnList[0]),this.$widgetList.value=e.widgets||[],this.$widgetMap.value={},this.$processWidget(this.$widgetList.value)}setModel(e){this.model.value=e}widget(e,t){if(t){const i={...t,wid:e};this.$widgetMap.value[e]||(this.$widgetList.value.push(i),i.configs?.widgets&&this.$processWidget(i.configs.widgets)),this.$widgetMap.value[e]=i}else return this.$widgetMap.value[e]}widgets(e){if(e)this.$widgetList.value=e,this.$widgetMap.value={},this.$processWidget(e);else return this.$widgetList.value}$processWidget(e){e.forEach(t=>{t.wid||(t.wid="w:"+ea.uniqueId()),this.$widgetMap.value[t.wid]=t,t.configs?.widgets&&this.$processWidget(t.configs.widgets)})}dataManager(){return this.$dataManager}}const ha={class:"widget-setting-dialog"},fa=n.defineComponent({__name:"widget",props:{model:{type:String,required:!1},settingTitle:{type:String,default:"组件设置"},custome:{type:Boolean,default:!1}},emits:["setting","saving"],setup(o,{emit:e}){const t=e,i=n.ref(),s=n.ref(!1);function l(){i.value&&(s.value=!0),t("setting")}function a(){t("saving"),s.value=!1}return(r,d)=>{const c=n.resolveComponent("SettingOutlined"),h=n.resolveComponent("a-tooltip"),f=n.resolveComponent("a-modal");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["unione-widget",o.model])},[n.createVNode(h,{title:o.settingTitle},{default:n.withCtx(()=>[o.model=="edit"&&(r.$slots["widget-setting"]||o.custome)?(n.openBlock(),n.createBlock(c,{key:0,class:"widget-setting",onClick:l})):n.createCommentVNode("",!0)]),_:1},8,["title"]),n.renderSlot(r.$slots,"default",{},void 0,!0),o.model=="edit"&&r.$slots["widget-setting"]?(n.openBlock(),n.createBlock(f,{key:0,title:o.settingTitle,ref_key:"settingModal",ref:i,open:s.value,"onUpdate:open":d[0]||(d[0]=u=>s.value=u),centered:"",width:"80%",onOk:a},{default:n.withCtx(()=>[n.createElementVNode("div",ha,[n.renderSlot(r.$slots,"widget-setting",{},void 0,!0)])]),_:3},8,["title","open"])):n.createCommentVNode("",!0)],2)}}}),Z=(o,e)=>{const t=o.__vccOpts||o;for(const[i,s]of e)t[i]=s;return t},rt=Z(fa,[["__scopeId","data-v-3a88c0c0"]]),ua={key:0},pa=["onClick"],ai=Z(n.defineComponent({__name:"btnSetting",props:{preset:{type:Array,default(){return[]}}},setup(o,{expose:e}){const t=o,i=n.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:g})=>g+1},{title:"参数名称",dataIndex:"name",key:"name",width:"60px",align:"center"},{title:"参数标题",dataIndex:"title",key:"title",width:"80px",align:"center"},{title:"参数value",dataIndex:"value",key:"value",width:"100px",align:"center"}]),s=n.ref({selectedRowKeys:[],columnWidth:"25px",onChange:g=>{s.value.selectedRowKeys=g}}),l={mounted:g=>g.focus()},a=n.ref({});function r(){const g=Object.keys(a.value);if(g.length)for(let m in g){const S=k.value.form.action.params[m];S&&a.value[m]&&Object.keys(a.value[m]).forEach(_=>{S[_]=a.value[m][_]})}a.value={}}function d(g,m,S){r();const _={};_[S]=m[S]||"",S=="showIndex"&&(_[S]=m.show?.query?.index),a.value[g]=_}function c(g,m,S){if(!m||!S){a.value={};return}const _=a.value[g][S];m[S]=_,a.value={}}function h(){k.value.form.action.params.push({title:"新建",name:"",value:""})}function f(){}const u=n.ref(""),p=n.ref({title:[{required:!0,message:"按钮标题不能为空"}],name:[{required:!0,message:"按钮名称不能为空"},{validator:(g,m)=>u.value!=m&&t.preset.includes(m)?Promise.reject("预设按钮名称,请使用其他名称,["+t.preset.join(",")+"]"):Promise.resolve(),trigger:"change"}]}),b=n.ref([ta.javascript()]),k=n.ref({title:"按钮设置",visible:!1,form:{},helps:{}}),v=n.ref();function C(g,m,S={}){g=JSON.parse(JSON.stringify(g)),g.event||(g.event={}),g.props||(g.props={}),g.action||(g.action={}),Object.keys(g.action).includes("maskClosable")||(g.action.maskClosable=!0),g.action.params||(g.action.params=[]),u.value=g.name,k.value.form=g,k.value.helps=S,k.value.visible=!0,v.value=m}const x=n.ref(null);function V(){x.value&&x.value.validate().then(()=>{k.value.visible=!1,v.value(k.value.form)})}return e({open:C,close}),(g,m)=>{const S=n.resolveComponent("a-input"),_=n.resolveComponent("a-form-item"),y=n.resolveComponent("a-select"),w=n.resolveComponent("a-input-number"),N=n.resolveComponent("a-checkbox"),A=n.resolveComponent("a-tab-pane"),O=n.resolveComponent("a-switch"),D=n.resolveComponent("a-button"),M=n.resolveComponent("a-divider"),E=n.resolveComponent("ToolOutlined"),z=n.resolveComponent("a-tooltip"),$=n.resolveComponent("a-table"),I=n.resolveComponent("a-tabs"),K=n.resolveComponent("a-form"),L=n.resolveComponent("a-modal");return n.openBlock(),n.createBlock(L,{visible:k.value.visible,"onUpdate:visible":m[23]||(m[23]=B=>k.value.visible=B),title:k.value.title,centered:"",width:"50%",onOk:V},{default:n.withCtx(()=>[n.createVNode(K,{name:"basic",ref_key:"form",ref:x,rules:p.value,model:k.value.form,"label-col":{span:5},"wrapper-col":{span:19},autocomplete:"off",class:"form-mix btn-setting-form"},{default:n.withCtx(()=>[n.createVNode(I,null,{default:n.withCtx(()=>[n.createVNode(A,{key:"base",tab:"基本设置"},{default:n.withCtx(()=>[n.createVNode(_,{label:"操作标题",required:"",name:"title"},{default:n.withCtx(()=>[n.createVNode(S,{value:k.value.form.title,"onUpdate:value":m[0]||(m[0]=B=>k.value.form.title=B)},null,8,["value"])]),_:1}),n.createVNode(_,{label:"操作名称",name:"name",required:""},{default:n.withCtx(()=>[n.createVNode(S,{value:k.value.form.name,"onUpdate:value":m[1]||(m[1]=B=>k.value.form.name=B),disabled:t.preset.includes(k.value.form.name)},null,8,["value","disabled"])]),_:1}),n.createVNode(_,{label:"操作图标"},{default:n.withCtx(()=>[n.createVNode(S,{value:k.value.form.icon,"onUpdate:value":m[2]||(m[2]=B=>k.value.form.icon=B)},null,8,["value"])]),_:1}),n.createVNode(_,{label:"按钮类型"},{default:n.withCtx(()=>[n.createVNode(y,{value:k.value.form.type,"onUpdate:value":m[3]||(m[3]=B=>k.value.form.type=B),allowClear:"",options:[{value:"primary",label:"主要按钮"},{value:"ghost",label:"幽灵按钮"},{value:"dashed",label:"虚线按钮"},{value:"link",label:"连接按钮"},{value:"text",label:"文本按钮"},{value:"default",label:"默认按钮"}]},null,8,["value"])]),_:1}),n.createVNode(_,{label:"显示顺序"},{default:n.withCtx(()=>[n.createVNode(w,{value:k.value.form.index,"onUpdate:value":m[4]||(m[4]=B=>k.value.form.index=B)},null,8,["value"])]),_:1}),n.createVNode(_,{label:"按钮大小"},{default:n.withCtx(()=>[n.createVNode(y,{value:k.value.form.size,"onUpdate:value":m[5]||(m[5]=B=>k.value.form.size=B),options:[{value:"small",label:"小"},{value:"middle",label:"中"},{value:"large",label:"大"}]},null,8,["value"])]),_:1}),n.createVNode(_,{label:"按钮特性"},{default:n.withCtx(()=>[n.createVNode(N,{checked:k.value.form.props.block,"onUpdate:checked":m[6]||(m[6]=B=>k.value.form.props.block=B)},{default:n.withCtx(()=>m[24]||(m[24]=[n.createTextVNode("自适应 ")])),_:1},8,["checked"]),n.createVNode(N,{checked:k.value.form.props.danger,"onUpdate:checked":m[7]||(m[7]=B=>k.value.form.props.danger=B)},{default:n.withCtx(()=>m[25]||(m[25]=[n.createTextVNode("危险 ")])),_:1},8,["checked"]),n.createVNode(N,{checked:k.value.form.props.ghost,"onUpdate:checked":m[8]||(m[8]=B=>k.value.form.props.ghost=B)},{default:n.withCtx(()=>m[26]||(m[26]=[n.createTextVNode("幽灵 ")])),_:1},8,["checked"])]),_:1})]),_:1}),n.createVNode(A,{key:"action",tab:"响应设置"},{default:n.withCtx(()=>[n.createVNode(_,{label:"响应方式",required:""},{default:n.withCtx(()=>[n.createVNode(y,{value:k.value.form.action.type,"onUpdate:value":m[9]||(m[9]=B=>k.value.form.action.type=B),options:[{value:"link",label:"连接"},{value:"route",label:"路由"},{value:"drawer",label:"抽屉"},{value:"dialog",label:"对话框"}]},null,8,["value"])]),_:1}),["drawer","dialog"].includes(k.value.form.action.type)?(n.openBlock(),n.createBlock(_,{key:0,label:"页面编码",help:"根据该页面编码渲染页面内容"},{default:n.withCtx(()=>[n.createVNode(S,{value:k.value.form.action.psn,"onUpdate:value":m[10]||(m[10]=B=>k.value.form.action.psn=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["drawer","dialog"].includes(k.value.form.action.type)?(n.openBlock(),n.createBlock(_,{key:1,label:"组件名称",help:"组件方式渲染,Vue全局注册的组件名称,且监听params参数,psn参数"},{default:n.withCtx(()=>[n.createVNode(S,{value:k.value.form.action.component,"onUpdate:value":m[11]||(m[11]=B=>k.value.form.action.component=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),n.createVNode(_,{label:"连接地址"},{default:n.withCtx(()=>[n.createVNode(S,{value:k.value.form.action.href,"onUpdate:value":m[12]||(m[12]=B=>k.value.form.action.href=B)},null,8,["value"])]),_:1}),["link","route"].includes(k.value.form.action.type)?(n.openBlock(),n.createBlock(_,{key:2,label:"连接方式"},{default:n.withCtx(()=>[n.createVNode(y,{value:k.value.form.action.target,"onUpdate:value":m[13]||(m[13]=B=>k.value.form.action.target=B),options:[{value:"_blank",label:"新卡片页"},{value:"_self",label:"当前页面"}]},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["drawer"].includes(k.value.form.action.type)?(n.openBlock(),n.createBlock(_,{key:3,label:"抽屉位置"},{default:n.withCtx(()=>[n.createVNode(y,{value:k.value.form.action.position,"onUpdate:value":m[14]||(m[14]=B=>k.value.form.action.position=B),options:[{value:"left",label:"左侧"},{value:"right",label:"右侧"}]},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["drawer","dialog"].includes(k.value.form.action.type)?(n.openBlock(),n.createBlock(_,{key:4,label:"显示标题",required:""},{default:n.withCtx(()=>[n.createVNode(S,{value:k.value.form.action.title,"onUpdate:value":m[15]||(m[15]=B=>k.value.form.action.title=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["drawer","dialog"].includes(k.value.form.action.type)?(n.openBlock(),n.createBlock(_,{key:5,label:"蒙层关闭"},{default:n.withCtx(()=>[n.createVNode(O,{checked:k.value.form.action.maskClosable,"onUpdate:checked":m[16]||(m[16]=B=>k.value.form.action.maskClosable=B),"checked-children":"开","un-checked-children":"关"},null,8,["checked"])]),_:1})):n.createCommentVNode("",!0),["drawer","dialog"].includes(k.value.form.action.type)?(n.openBlock(),n.createBlock(_,{key:6,label:"显示宽度"},{default:n.withCtx(()=>[n.createVNode(w,{value:k.value.form.action.width,"onUpdate:value":m[17]||(m[17]=B=>k.value.form.action.width=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["dialog"].includes(k.value.form.action.type)?(n.openBlock(),n.createBlock(_,{key:7,label:"显示高度"},{default:n.withCtx(()=>[n.createVNode(w,{value:k.value.form.action.height,"onUpdate:value":m[18]||(m[18]=B=>k.value.form.action.height=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),n.createVNode(M,{orientation:"left"},{default:n.withCtx(()=>[m[29]||(m[29]=n.createTextVNode("参数列表 ")),n.createVNode(D,{size:"small",class:"param-btn",onClick:h},{default:n.withCtx(()=>m[27]||(m[27]=[n.createTextVNode("添加")])),_:1}),n.createVNode(D,{size:"small",class:"param-btn",danger:"",onClick:f},{default:n.withCtx(()=>m[28]||(m[28]=[n.createTextVNode("删除")])),_:1})]),_:1}),n.createVNode($,{columns:i.value,"data-source":k.value.form.action.params,bordered:"",pagination:!1,"row-selection":s.value,"row-key":"name",size:"small"},{headerCell:n.withCtx(({column:B})=>[["name","title"].includes(B.key)?(n.openBlock(),n.createElementBlock("span",ua,[n.createVNode(E),n.createTextVNode(" "+n.toDisplayString(B.title),1)])):n.createCommentVNode("",!0),["value"].includes(B.key)?(n.openBlock(),n.createBlock(z,{key:1,title:"支持常量和变量,变量使用{row.属性}方式获取"},{default:n.withCtx(()=>[n.createElementVNode("span",null,[n.createVNode(E),n.createTextVNode(" "+n.toDisplayString(B.title),1)])]),_:2},1024)):n.createCommentVNode("",!0)]),bodyCell:n.withCtx(({column:B,text:Q,record:T,index:j})=>[["name","title","value"].includes(B.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",(!a.value[j]||!Object.keys(a.value[j]).includes(B.dataIndex))&&!Q&&"empty"]),onClick:he=>d(j,T,B.dataIndex)},[a.value[j]&&Object.keys(a.value[j]).includes(B.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(S,{key:0,value:a.value[j][B.dataIndex],"onUpdate:value":he=>a.value[j][B.dataIndex]=he,onBlur:he=>c(j,T,B.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[l]]):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(Q),1)],64))],10,pa)):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source","row-selection"])]),_:1}),n.createVNode(A,{key:"event",tab:"事件设置"},{default:n.withCtx(()=>[n.createVNode(_,{label:"点击事件",help:k.value.helps.clickScript||"点击事件处理脚本,上下文参数:ctx,当前按钮对象:btn,当前事件对象:event,返回false则不触发默认逻辑"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ft.Codemirror),{modelValue:k.value.form.event.clickScript,"onUpdate:modelValue":m[19]||(m[19]=B=>k.value.form.event.clickScript=B),placeholder:"请输入点击事件处理脚本",style:{height:"250px"},autofocus:!0,"indent-with-tab":!0,tabSize:8,extensions:b.value,scrollbarStyle:null},null,8,["modelValue","extensions"])]),_:1},8,["help"]),n.createVNode(_,{label:"禁用逻辑",help:k.value.helps.disableScript||"按钮禁用逻辑控制脚本,上下文参数:ctx,当前按钮对象:btn,返回true禁用,否则可用"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ft.Codemirror),{modelValue:k.value.form.event.disableScript,"onUpdate:modelValue":m[20]||(m[20]=B=>k.value.form.event.disableScript=B),placeholder:"请输入按钮禁用逻辑",style:{height:"250px"},autofocus:!0,"indent-with-tab":!0,tabSize:8,extensions:b.value,scrollbarStyle:null},null,8,["modelValue","extensions"])]),_:1},8,["help"]),n.createVNode(_,{label:"显示逻辑",help:k.value.helps.visibleScript||"按钮显示逻辑控制脚本,上下文参数:ctx,当前按钮对象:btn,返回false隐藏,否则可见"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ft.Codemirror),{modelValue:k.value.form.event.visibleScript,"onUpdate:modelValue":m[21]||(m[21]=B=>k.value.form.event.visibleScript=B),placeholder:"请输入按钮显示逻辑",style:{height:"250px"},autofocus:!0,"indent-with-tab":!0,tabSize:8,extensions:b.value,scrollbarStyle:null},null,8,["modelValue","extensions"])]),_:1},8,["help"]),n.createVNode(_,{label:"动态标题",help:k.value.helps.titleScript||"按钮显示标题控制脚本,上下文参数:ctx,当前按钮对象:btn"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ft.Codemirror),{modelValue:k.value.form.event.titleScript,"onUpdate:modelValue":m[22]||(m[22]=B=>k.value.form.event.titleScript=B),placeholder:"请输入按钮动态标题逻辑",style:{height:"250px"},autofocus:!0,"indent-with-tab":!0,tabSize:8,extensions:b.value,scrollbarStyle:null},null,8,["modelValue","extensions"])]),_:1},8,["help"])]),_:1})]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["visible","title"])}}}),[["__scopeId","data-v-75055a2b"]]),ma=["src"],ga=["src"],ka=Z(n.defineComponent({__name:"btn",props:{editor:{type:Object,required:!1},type:{type:String},widget:{type:Object,required:!0,default(){return{}}},preset:{type:Array,default(){return[]}},ctx:{type:Object,default(){return{}}}},emits:["click"],setup(o,{emit:e}){const t=Me(),i=o,s=W.useSession();n.watch(()=>i.widget?.event,()=>{a()}),n.onMounted(()=>{a()});const l=n.ref({});function a(){i.widget?.event&&(i.widget.event.clickScript&&(l.value.click=new Function("ctx","btn","event",i.widget.event.clickScript)),i.widget.event.disableScript&&(l.value.disable=new Function("ctx","btn",i.widget.event.disableScript)),i.widget.event.visibleScript&&(l.value.visible=new Function("ctx","btn",i.widget.event.visibleScript)),i.widget.event.titleScript&&(l.value.title=new Function("ctx","btn",i.widget.event.titleScript)))}const r=n.computed(()=>l.value.title?l.value.title(u.value,i.widget):i.widget.title),d=n.computed(()=>l.value.visible?l.value.visible(u.value,i.widget)!=!1:!0),c=n.computed(()=>l.value.disable?l.value.disable(u.value,i.widget):!1),h=n.ref(null);function f(){h.value?.open(i.widget,V=>{console.log("btn props",V),Object.keys(V).forEach(g=>{i.widget[g]=V[g]}),console.log("props btn",i.widget)})}const u=n.computed(()=>({...i.ctx,user:s.getPrincipal(),token:s.getToken()})),p=n.ref({open:!1}),b=n.computed(()=>{if(i.widget.action?.href){let V=i.widget.action.href;const g=V.matchAll("{[a-zA-Z.]*}"),m=[];let S=null;for(;S=g.next();){if(S&&S.value&&S.value[0]){let _=S.value[0].substring(1,S.value[0].length-1);m.includes(_)||m.push(_)}if(S.done)break}if(m.length>0)for(let _=0;_<m.length;_++){let y=m[_],w=W.utils.obj.getValue(u.value,y);w?w instanceof Object?V=V.replaceAll("{"+y+"}",JSON.stringify(w)):Array.isArray(w)?V=V.replaceAll("{"+y+"}",w.join(",")):V=V.replaceAll("{"+y+"}",w):V=V.replaceAll("{"+y+"}","")}return V}return""}),k=n.computed(()=>{const V={};if(i.widget.action?.href){let g=i.widget.action.href;const m=g.matchAll("{[a-zA-Z0-9.]*}"),S=[];let _=null;for(;_=m.next();){if(_&&_.value&&_.value[0]){let w=_.value[0].substring(1,_.value[0].length-1);S.includes(w)||S.push(w)}if(_.done)break}if(S.length>0)for(let w=0;w<S.length;w++){let N=S[w],A=W.utils.obj.getValue(u.value,N);A?A instanceof Object?g=g.replaceAll("{"+N+"}",JSON.stringify(A)):Array.isArray(A)?g=g.replaceAll("{"+N+"}",A.join(",")):g=g.replaceAll("{"+N+"}",A):g=g.replaceAll("{"+N+"}","")}const y=g.split("?")[1];y&&y.split("&").forEach(w=>{const N=w.split("=");N[0]&&N[1]&&(V[N[0]]=N[1])})}return i.widget.action?.params&&i.widget.action.params.filter(g=>g.value+"").forEach(g=>{if(new RegExp("{[a-zA-Z0-9.]*}").test(g.value)){let S=W.utils.obj.getValue(u.value,g.value);V[g.name]=S}else V[g.name]=g.value}),V}),v=e,C=n.inject("router");function x(V){t.isDebug&&console.log("unione btn click",i.widget,V),!(l.value.click&&l.value.click(u.value,i.widget,V)==!1)&&(i.widget.action?.type=="drawer"||i.widget.action?.type=="dialog"?p.value.open=!0:i.widget.action?.type=="route"&&i.widget.action?.href&&C.push({path:i.widget.action.href,query:k.value}),v("click",{btn:i.widget,event:V}))}return(V,g)=>{const m=n.resolveComponent("a-button"),S=n.resolveComponent("a-drawer"),_=n.resolveComponent("a-modal");return d.value?(n.openBlock(),n.createBlock(rt,{key:0,class:n.normalizeClass(["unione-btn",o.widget.props?.block&&"unione-btn-block"]),model:o.editor?.model.value,onSetting:f,custome:!0,"setting-title":"按钮设置"},{default:n.withCtx(()=>[n.createVNode(m,n.mergeProps({disabled:c.value,size:o.widget.size||"small",type:o.type||o.widget.type,shape:o.widget.shape,class:"unione-btn-"+o.widget.name,loading:o.widget.loading,target:o.widget.action?.target,onClick:x},o.widget.props),n.createSlots({default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.value)+" ",1)]),_:2},[o.widget.icon?{name:"icon",fn:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(o.widget.icon)))]),key:"0"}:void 0]),1040,["disabled","size","type","shape","class","loading","target"]),o.widget.action?.type=="drawer"?(n.openBlock(),n.createBlock(S,{key:0,open:p.value.open,"onUpdate:open":g[0]||(g[0]=y=>p.value.open=y),title:o.widget.action?.title,placement:o.widget.action?.position,maskClosable:o.widget.action?.maskClosable,width:o.widget.action?.width,bodyStyle:{padding:0,overflow:!o.widget.action.component||o.widget.action.component=="iframe"?"hidden":"auto"}},{default:n.withCtx(()=>[!o.widget.action.component||o.widget.action.component=="iframe"?(n.openBlock(),n.createElementBlock("iframe",{key:0,class:"unione-iframe unione-btn-iframe",src:b.value},null,8,ma)):n.createCommentVNode("",!0)]),_:1},8,["open","title","placement","maskClosable","width","bodyStyle"])):n.createCommentVNode("",!0),o.widget.action?.type=="dialog"?(n.openBlock(),n.createBlock(_,{key:1,open:p.value.open,"onUpdate:open":g[1]||(g[1]=y=>p.value.open=y),title:o.widget.action?.title,width:o.widget.action?.width,maskClosable:o.widget.action?.maskClosable,centered:"",footer:null},{default:n.withCtx(()=>[!o.widget.action.component||o.widget.action.component=="iframe"?(n.openBlock(),n.createElementBlock("iframe",{key:0,class:"unione-iframe unione-btn-iframe",src:b.value,style:n.normalizeStyle({height:o.widget.action?.height?o.widget.action?.height+"px":""})},null,12,ga)):n.createCommentVNode("",!0)]),_:1},8,["open","title","width","maskClosable"])):n.createCommentVNode("",!0),n.createVNode(ai,{ref_key:"btnSetting",ref:h,preset:i.preset},null,8,["preset"])]),_:1},8,["class","model"])):n.createCommentVNode("",!0)}}}),[["__scopeId","data-v-672f13d5"]]),ba={key:0,class:"unione-widget-empty-tip"},wa=Z(n.defineComponent({__name:"tabs",props:{wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1}},setup(o){const e=o,t=n.ref(),i=n.computed(()=>e.editor?.widget(e.wid)||e.widget);return(s,l)=>{const a=n.resolveComponent("a-tab-pane"),r=n.resolveComponent("a-tabs");return n.openBlock(),n.createBlock(rt,{class:n.normalizeClass(["unione-layout-tabs"]),model:e.editor?.model},{default:n.withCtx(()=>[i.value?(n.openBlock(),n.createBlock(r,{key:0,activeKey:t.value,"onUpdate:activeKey":l[0]||(l[0]=d=>t.value=d)},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.value.chidlren,(d,c)=>(n.openBlock(),n.createBlock(a,{key:c,class:"unione-layout-tab-pane"},{tab:n.withCtx(()=>[n.createElementVNode("span",null,[d.icon?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(d.icon),{key:0})):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(d.title),1)])]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.chidlren,(h,f)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(h.widget),{key:f,wid:h.wid,editor:e.editor,widget:h},null,8,["wid","editor","widget"]))),128)),!d.chidlren||!d.chidlren.length?(n.openBlock(),n.createElementBlock("div",ba,n.toDisplayString(d.emptyTips),1)):n.createCommentVNode("",!0)]),_:2},1024))),128))]),_:1},8,["activeKey"])):n.createCommentVNode("",!0)]),_:1},8,["model"])}}}),[["__scopeId","data-v-7b565c89"]]),ya={class:"title"},xa={class:"text"},va={key:0,class:"reactive"},Ca={key:1,class:"opts"},Sa={class:"warp"},Na=Z(n.defineComponent({__name:"section",props:n.mergeModels({title:{type:String,required:!1},icon:{type:String,required:!1},type:{type:String,required:!1},location:{type:String,default:"left"},reactive:{type:Boolean,default:!1},wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const e=o,t=n.computed(()=>e.editor?.widget(e.wid)||e.widget),i=n.computed(()=>t.value?.title||e.title),s=n.computed(()=>t.value?.icon||e.icon),l=n.computed(()=>t.value?.type||e.type),a=n.useModel(o,"modelValue");function r(){e.reactive&&(a.value=!a.value)}return(d,c)=>(n.openBlock(),n.createBlock(rt,{class:n.normalizeClass(["unione-layout-section",a.value?"open":"close"]),model:e.editor?.model},{default:n.withCtx(()=>[n.createElementVNode("div",{class:n.normalizeClass(["head",o.location,o.reactive&&"reactive"]),onClick:r},[n.createElementVNode("div",ya,[l.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["type",l.value])},null,2)):n.createCommentVNode("",!0),s.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.value),{key:1,class:"icon"})):n.createCommentVNode("",!0),n.createElementVNode("span",xa,n.toDisplayString(i.value),1)]),o.reactive?(n.openBlock(),n.createElementBlock("div",va,[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(a.value?"UpOutlined":"DownOutlined")))])):n.createCommentVNode("",!0),o.location=="left"?(n.openBlock(),n.createElementBlock("div",Ca,[n.renderSlot(d.$slots,"opts",{},void 0,!0)])):n.createCommentVNode("",!0)],2),n.withDirectives(n.createElementVNode("div",Sa,[n.renderSlot(d.$slots,"default",{},void 0,!0)],512),[[n.vShow,a.value]])]),_:3},8,["class","model"]))}}),[["__scopeId","data-v-e75e9a84"]]),Ba={class:"unione-props-setting unione-form-setting"},Oa={class:"unione-form-btns"},Va={key:0},_a=["onClick"],Aa={class:"field-txt"},Ta=["onClick"],Ma={key:1,class:"field-txt"},Ea=["onClick"],Ia={key:0,class:"field-txt"},Da={key:3,class:"edit-field"},Pa={key:0},$a=["onClick"],Fa=Z(n.defineComponent({__name:"formSetting",props:{wid:{type:String,required:!0},editor:{type:Object,required:!0}},setup(o){const e=o,t=n.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:y})=>y+1},{title:"字段名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"字段标题",dataIndex:"title",key:"title",width:"90px",align:"center"},{title:"控件类型",dataIndex:"widget",key:"widget",width:"60px",align:"center"},{title:"验证规则",dataIndex:"rules",key:"rules",width:"60px",align:"center"},{title:"表单",dataIndex:"isForm",key:"isForm",width:"40px",align:"center"},{title:"详情",dataIndex:"isView",key:"isView",width:"40px",align:"center"},{title:"转换器",dataIndex:"convertName",key:"convertName",width:"50px",align:"center"}]),i=n.computed(()=>{const y=e.editor.widget(e.wid)||{};return y.configs||(y.configs={}),y.configs.settings||(y.configs.settings={}),y.configs.settings.btns||(y.configs.settings.btns=[]),y}),s=n.computed(()=>(e.editor.dataModels()||[]).map(w=>({value:w.sn,label:w.title+"("+w.name+")"}))),l=n.computed(()=>{const y=i.value.configs.settings.btns,w=y.map(N=>N.name);if(!w.includes("save")){const N={title:"保存",type:"primary",index:0,visible:!0,name:"save"};y.splice(N.index,0,N)}if(!w.includes("submit")){const N={title:"提交",type:"primary",index:1,visible:!0,name:"submit"};let A=N.index||1;y.splice(A,0,N)}if(!w.includes("reset")){const N={title:"重置",type:"default",index:2,visible:!0,props:{danger:!0},name:"reset"};y.splice(N.index,0,N)}if(!w.includes("back")){const N={title:"返回",type:"default",index:3,visible:!0,name:"back"};y.splice(N.index,0,N)}return y}),a=n.ref(null);function r(y){a.value&&a.value.open(y,w=>{w.visible=!0,Object.keys(w).forEach(N=>{y[N]=w[N]}),i.value.configs.settings.btns.sort((N,A)=>{const O=N.index||1,D=A.index||1;return O-D}),i.value.configs.settings.btns=[...i.value.configs.btns]})}function d(){const y=i.value.configs.settings.btns.length+1;let w={title:"新增",name:"new_"+y,index:y,size:"small",visible:!0,type:"default",props:{block:!1,ghost:!1,danger:!1},event:{}};w.name="new_"+i.value.configs.settings.btns.length;const N=i.value.configs.settings.btns.filter(A=>A.name==w.name).length;N>0&&(w.name=w.name+N),i.value.configs.settings.btns.push(w),e.editor.widget(e.wid,i.value),a.value.open(w,A=>{Object.keys(A).forEach(O=>{w[O]=A[O]}),i.value.configs.btns=[...i.value.configs.btns]})}function c(y){const w=()=>{if(["save","submit","reset","back"].includes(y.name))y.visible=!1,i.value.configs.settings.btns=[...i.value.configs.settings.btns];else{const N=[];i.value.configs.settings.btns.forEach(A=>{A.name!=y.name&&N.push(A)}),i.value.configs.settings.btns=N}};G.Modal.confirm({title:"确认信息",content:"请确定删除该工具?",onOk:()=>{w()}})}const h=n.ref({visible:!1,field:{},props:{},widgets:[{value:"a-input",label:"文本框"},{value:"a-textarea",label:"文本域"},{value:"a-input",label:"文本框"},{value:"a-checkbox",label:"多选框"},{value:"a-radio",label:"单选框"},{value:"a-input-number",label:"数值框"},{value:"a-select",label:"下拉框"},{value:"a-tree-select",label:"下拉树"},{value:"a-date-picker",label:"日期框"},{value:"a-input-password",label:"密码框"},{value:"a-input-search",label:"搜索框"},{value:"a-upload",label:"文件框"},{value:"unione-avatar",label:"头像框",disabled:!0},{value:"unione-picture-card",label:"照片墙"},{value:"a-switch",label:"开关"},{value:"a-slider",label:"滑块"}],widgetName:y=>{const w=h.value.widgets.filter(N=>N.value==y);return w[0]?w[0].label:y},toSetting:()=>{}}),f=n.ref({visible:!1,field:{},props:{},showInfo:y=>{let w="";return y.rules&&(w=y.rules.filter(N=>N.enable).length||""),w&&(w="("+w+")"),w},toSetting:()=>{const y=f.value.props,w={name:"range",trigger:y.trigger,whitespace:y.whitespace,message:y.rangeMessage};y.rangeMin!=null&&y.rangeMin!=null&&(w.min=y.rangeMin,w.enable=!0),y.rangeMax!=null&&y.rangeMax!=null&&(w.max=y.rangeMax,w.enable=!0);const N={name:"reg",trigger:y.trigger,whitespace:y.whitespace,message:y.regMessage};y.regExpress&&(N.pattern=y.regExpress,N.enable=!0),f.value.field.rules=[w,N],f.value.visible=!1,f.value.props={},console.log("rule",f.value.field.rules)}});function u(y){f.value.visible=!0,f.value.field=y;const w=y.rules||[],N={trigger:"change",whitespace:!0};w.forEach(A=>{A.name=="reg"&&(N.trigger=A.trigger,N.whitespace=A.whitespace,N.regExpress=A.pattern,N.regMessage=A.message),A.name=="range"&&(N.rangeMin=A.min,N.rangeMax=A.max,N.rangeMessage=A.message)}),f.value.props=N}const p=n.ref({title:"列头设置",prop:"isList",visible:!1,field:{},show:{},toSetting:()=>{p.value.visible=!1}});function b(y,w){const N=x.value.filter(O=>O.name==y.name);N.forEach(O=>{w!="isSort"?O[w]=!0:O[w]=!O[w]});const A=N[0];if(!(!A||w=="isSort")){switch(p.value.prop=w,p.value.field=y,A.show||(A.show={}),w){case"isQuery":A.show.query||(A.show.query={}),p.value.show=A.show.query,p.value.title=`查询设置/${y.title}(${y.name})`;break;case"isForm":A.show.form||(A.show.form={}),p.value.show=A.show.form,p.value.title=`表单设置/${y.title}(${y.name})`;break;case"isView":A.show.view||(A.show.view={}),p.value.show=A.show.view,p.value.title=`详情设置/${y.title}(${y.name})`;break;case"isList":A.show.list||(A.show.list={}),p.value.show=A.show.list,p.value.title=`列头设置/${y.title}(${y.name})`;break}p.value.visible=!0}}const k=n.ref({visible:!1,field:{},convert:{},optionColumn:[{title:"选项标题",dataIndex:"label"},{title:"选项值",dataIndex:"value"},{title:"操作",dataIndex:"action",width:"20%"}],toAddOption:()=>{k.value.convert.options||(k.value.convert.options=[]),k.value.convert.options.push({label:"",value:""})},toDelOption:(y,w)=>{k.value.convert.options.splice(y,1)},toSetting:()=>{k.value.visible=!1}});function v(y){k.value.visible=!0,k.value.field=y,k.value.convert=y.convert||{}}const C=n.computed(()=>e.editor?.dataModel(i.value.dataModel||"none")||{}),x=n.computed(()=>C.value.fields?.length?C.value.fields:[]),V={mounted:y=>y.focus()},g=n.ref({});function m(y,w){const N={};w=="convertName"?N[w]=y.convert?.type:N[w]=y[w]||"",g.value={},g.value[y.name]=N}function S(y,w){{g.value={};return}}function _(y,w){x.value.filter(A=>A.name==y.name).forEach(A=>{A[w]=!A[w]})}return(y,w)=>{const N=n.resolveComponent("a-divider"),A=n.resolveComponent("CloseOutlined"),O=n.resolveComponent("a-button"),D=n.resolveComponent("PlusOutlined"),M=n.resolveComponent("a-select"),E=n.resolveComponent("ToolOutlined"),z=n.resolveComponent("a-checkbox"),$=n.resolveComponent("a-table"),I=n.resolveComponent("a-select-option"),K=n.resolveComponent("a-form-item"),L=n.resolveComponent("a-form"),B=n.resolveComponent("a-modal"),Q=n.resolveComponent("a-checkbox-group"),T=n.resolveComponent("a-input-number"),j=n.resolveComponent("a-input"),he=n.resolveComponent("a-col"),Xi=n.resolveComponent("a-row");return n.openBlock(),n.createElementBlock("div",Ba,[n.createVNode(N,{orientation:"left"},{default:n.withCtx(()=>w[23]||(w[23]=[n.createTextVNode("按钮设置")])),_:1}),n.createElementVNode("div",Oa,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,F=>(n.openBlock(),n.createBlock(O,n.mergeProps({key:F.name,class:["btn",F.name,!F.visible&&"deleted"],type:F.visible?F.type:"default",size:F.size,ref_for:!0},F.props||{},{onClick:Ue=>r(F)}),n.createSlots({default:n.withCtx(()=>[n.createTextVNode(" "+n.toDisplayString(F.title)+" ",1),F.visible?(n.openBlock(),n.createBlock(A,{key:0,class:"btn-del",onClick:n.withModifiers(Ue=>c(F),["stop"])},null,8,["onClick"])):n.createCommentVNode("",!0)]),_:2},[F.icon?{name:"icon",fn:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(F.icon)))]),key:"0"}:void 0]),1040,["class","type","size","onClick"]))),128)),n.createVNode(O,{class:n.normalizeClass(["btn","btn-add"]),size:"small",onClick:w[0]||(w[0]=F=>d())},{default:n.withCtx(()=>[n.createVNode(D)]),_:1})]),n.createVNode(N,{orientation:"left"},{default:n.withCtx(()=>w[24]||(w[24]=[n.createTextVNode("表单设置")])),_:1}),w[36]||(w[36]=n.createTextVNode(" 数据模型:")),n.createVNode(M,{class:"data-model-list",options:s.value,value:i.value.dataModel,"onUpdate:value":w[1]||(w[1]=F=>i.value.dataModel=F)},null,8,["options","value"]),n.createVNode($,{columns:t.value,"data-source":x.value,bordered:"",scroll:{x:800},pagination:!1,"row-key":"name",size:"small"},{headerCell:n.withCtx(({column:F})=>[["widget","rules","convertName"].includes(F.key)?(n.openBlock(),n.createElementBlock("span",Va,[n.createVNode(E),n.createTextVNode(" "+n.toDisplayString(F.title),1)])):n.createCommentVNode("",!0)]),bodyCell:n.withCtx(({column:F,text:Ue,record:te})=>[["rules"].includes(F.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",!f.value.showInfo(te)&&"empty"]),onClick:xe=>u(te)},[n.createElementVNode("span",Aa,n.toDisplayString(f.value.showInfo(te)),1),f.value.showInfo(te)?(n.openBlock(),n.createBlock(O,{key:0,type:"link"},{default:n.withCtx(()=>w[25]||(w[25]=[n.createTextVNode("设置")])),_:1})):n.createCommentVNode("",!0)],10,_a)):["widget"].includes(F.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["edit-field",(!g.value[te.name]||!Object.keys(g.value[te.name]).includes(F.dataIndex))&&!Ue&&"empty"]),onClick:xe=>m(te,F.dataIndex)},[g.value[te.name]&&Object.keys(g.value[te.name]).includes(F.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(M,{key:0,value:te[F.dataIndex],"onUpdate:value":xe=>te[F.dataIndex]=xe,options:h.value.widgets,onBlur:w[2]||(w[2]=xe=>S())},null,8,["value","onUpdate:value","options"])),[[V]]):(n.openBlock(),n.createElementBlock("span",Ma,n.toDisplayString(h.value.widgetName(Ue)),1))],10,Ta)):["convertName"].includes(F.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["edit-field",(!g.value[te.name]||!Object.keys(g.value[te.name]).includes(F.dataIndex))&&!te.convert?.type&&"empty"]),onClick:xe=>m(te,F.dataIndex)},[g.value[te.name]&&Object.keys(g.value[te.name]).includes(F.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(M,{key:0,value:te[F.dataIndex],"onUpdate:value":xe=>te[F.dataIndex]=xe,options:[{value:"dict",label:"字典"},{value:"option",label:"静态"}],onBlur:w[3]||(w[3]=xe=>S())},null,8,["value","onUpdate:value"])),[[V]]):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[te.convert?.type?(n.openBlock(),n.createElementBlock("span",Ia,n.toDisplayString(te.convert.type=="dict"?"字典":"静态"),1)):n.createCommentVNode("",!0),te.convert?.type?(n.openBlock(),n.createBlock(O,{key:1,type:"link",onClick:n.withModifiers(xe=>v(te),["stop"])},{default:n.withCtx(()=>w[26]||(w[26]=[n.createTextVNode("设置")])),_:2},1032,["onClick"])):n.createCommentVNode("",!0)],64))],10,Ea)):["isForm","isView"].includes(F.dataIndex)?(n.openBlock(),n.createElementBlock("div",Da,[n.createVNode(z,{checked:te[F.dataIndex],onClick:xe=>_(te,F.dataIndex)},null,8,["checked","onClick"]),n.createVNode(O,{type:"link",onClick:xe=>b(te,F.dataIndex)},{default:n.withCtx(()=>w[27]||(w[27]=[n.createTextVNode("设置")])),_:2},1032,["onClick"])])):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),n.createVNode(B,{visible:h.value.visible,"onUpdate:visible":w[5]||(w[5]=F=>h.value.visible=F),title:"控件设置",onOk:h.value.toSetting},{default:n.withCtx(()=>[n.createVNode(L,{model:h.value.props,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off"},{default:n.withCtx(()=>[h.value.field.widget=="a-select"?(n.openBlock(),n.createBlock(K,{key:0,label:"下拉框类型"},{default:n.withCtx(()=>[n.createVNode(M,{value:h.value.props.mode,"onUpdate:value":w[4]||(w[4]=F=>h.value.props.mode=F),allowClear:!0},{default:n.withCtx(()=>[n.createVNode(I,{value:"multiple"},{default:n.withCtx(()=>w[28]||(w[28]=[n.createTextVNode("多选")])),_:1}),n.createVNode(I,{value:"tags"},{default:n.withCtx(()=>w[29]||(w[29]=[n.createTextVNode("标签")])),_:1})]),_:1},8,["value"])]),_:1})):n.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["visible","onOk"]),n.createVNode(B,{visible:f.value.visible,"onUpdate:visible":w[13]||(w[13]=F=>f.value.visible=F),title:"规则设置",onOk:f.value.toSetting},{default:n.withCtx(()=>[n.createVNode(L,{model:f.value.props,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off",class:"form-mix"},{default:n.withCtx(()=>[n.createVNode(N,{orientation:"left"},{default:n.withCtx(()=>w[30]||(w[30]=[n.createTextVNode("基本设置")])),_:1}),n.createVNode(K,{label:"触发时机"},{default:n.withCtx(()=>[n.createVNode(Q,{value:f.value.props.trigger,"onUpdate:value":w[6]||(w[6]=F=>f.value.props.trigger=F),options:["change","blur"]},null,8,["value"])]),_:1}),f.value.field.isNull?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(K,{key:0,label:"忽略空格",class:"checkbox-tips"},{default:n.withCtx(()=>[n.createVNode(z,{value:f.value.props.whitespace,"onUpdate:value":w[7]||(w[7]=F=>f.value.props.whitespace=F),checked:f.value.props.whitespace},{default:n.withCtx(()=>w[31]||(w[31]=[n.createTextVNode(" 必填验证开启时,是否忽略空格 ")])),_:1},8,["value","checked"])]),_:1})),n.createVNode(N,{orientation:"left"},{default:n.withCtx(()=>w[32]||(w[32]=[n.createTextVNode("数值区间")])),_:1}),n.createVNode(K,{label:"有效区间"},{default:n.withCtx(()=>[n.createVNode(T,{value:f.value.props.rangeMin,"onUpdate:value":w[8]||(w[8]=F=>f.value.props.rangeMin=F)},null,8,["value"]),w[33]||(w[33]=n.createElementVNode("span",{style:{margin:"auto 5px"}},null,-1)),n.createVNode(T,{value:f.value.props.rangeMax,"onUpdate:value":w[9]||(w[9]=F=>f.value.props.rangeMax=F)},null,8,["value"])]),_:1}),n.createVNode(K,{label:"错误提示"},{default:n.withCtx(()=>[n.createVNode(j,{value:f.value.props.rangeMessage,"onUpdate:value":w[10]||(w[10]=F=>f.value.props.rangeMessage=F)},null,8,["value"])]),_:1}),n.createVNode(N,{orientation:"left"},{default:n.withCtx(()=>w[34]||(w[34]=[n.createTextVNode("正则验证")])),_:1}),n.createVNode(K,{label:"表达式"},{default:n.withCtx(()=>[n.createVNode(j,{value:f.value.props.regExpress,"onUpdate:value":w[11]||(w[11]=F=>f.value.props.regExpress=F)},null,8,["value"])]),_:1}),n.createVNode(K,{label:"错误提示"},{default:n.withCtx(()=>[n.createVNode(j,{value:f.value.props.regMessage,"onUpdate:value":w[12]||(w[12]=F=>f.value.props.regMessage=F)},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["visible","onOk"]),n.createVNode(B,{visible:p.value.visible,"onUpdate:visible":w[20]||(w[20]=F=>p.value.visible=F),title:p.value.title,onOk:p.value.toSetting},{default:n.withCtx(()=>[n.createVNode(L,{model:p.value.show,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off"},{default:n.withCtx(()=>[n.createVNode(K,{label:"显示顺序"},{default:n.withCtx(()=>[n.createVNode(T,{value:p.value.show.index,"onUpdate:value":w[14]||(w[14]=F=>p.value.show.index=F)},null,8,["value"])]),_:1}),["isQuery"].includes(p.value.prop)?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(K,{key:0,label:"显示宽度"},{default:n.withCtx(()=>[n.createVNode(j,{value:p.value.show.width,"onUpdate:value":w[15]||(w[15]=F=>p.value.show.width=F)},null,8,["value"])]),_:1})),["isForm","isView"].includes(p.value.prop)?(n.openBlock(),n.createBlock(K,{key:1,label:"标题宽度"},{default:n.withCtx(()=>[n.createVNode(j,{value:p.value.show.labelWidth,"onUpdate:value":w[16]||(w[16]=F=>p.value.show.labelWidth=F)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["isForm","isView"].includes(p.value.prop)?(n.openBlock(),n.createBlock(K,{key:2,label:"控件宽度"},{default:n.withCtx(()=>[n.createVNode(j,{value:p.value.show.valueWidth,"onUpdate:value":w[17]||(w[17]=F=>p.value.show.valueWidth=F)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["isList"].includes(p.value.prop)?(n.openBlock(),n.createBlock(K,{key:3,label:"固定位置"},{default:n.withCtx(()=>[n.createVNode(M,{value:p.value.show.fixed,"onUpdate:value":w[18]||(w[18]=F=>p.value.show.fixed=F),options:[{value:"",label:"无"},{value:"left",label:"靠左"},{value:"right",label:"靠右"}]},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["isList"].includes(p.value.prop)?(n.openBlock(),n.createBlock(K,{key:4,label:"对齐方式"},{default:n.withCtx(()=>[n.createVNode(M,{value:p.value.show.align,"onUpdate:value":w[19]||(w[19]=F=>p.value.show.align=F),options:[{value:"left",label:"左对齐"},{value:"center",label:"居中"},{value:"right",label:"右对齐"}]},null,8,["value"])]),_:1})):n.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["visible","title","onOk"]),n.createVNode(B,{visible:k.value.visible,"onUpdate:visible":w[22]||(w[22]=F=>k.value.visible=F),title:k.value.convert.type=="dict"?"字典设置":"选项设置",onOk:k.value.toSetting},{default:n.withCtx(()=>[k.value.convert.type!="dict"?(n.openBlock(),n.createElementBlock("div",Pa,[n.createVNode(O,{class:"editable-add-btn",style:{"margin-bottom":"8px"},onClick:k.value.toAddOption},{default:n.withCtx(()=>w[35]||(w[35]=[n.createTextVNode("新增")])),_:1},8,["onClick"]),n.createVNode($,{columns:k.value.optionColumn,"data-source":k.value.convert.options,size:"small"},{bodyCell:n.withCtx(({column:F,record:Ue,index:te})=>[F.dataIndex==="label"?(n.openBlock(),n.createBlock(j,{key:0,value:Ue.label,"onUpdate:value":xe=>Ue.label=xe,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):n.createCommentVNode("",!0),F.dataIndex==="value"?(n.openBlock(),n.createBlock(j,{key:1,value:Ue.value,"onUpdate:value":xe=>Ue.value=xe,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):n.createCommentVNode("",!0),F.dataIndex==="action"?(n.openBlock(),n.createElementBlock("a",{key:2,onClick:xe=>k.value.toDelOption(te,Ue)},"删除",8,$a)):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source"])])):n.createCommentVNode("",!0),k.value.convert.type=="dict"?(n.openBlock(),n.createBlock(L,{key:1,model:k.value.convert,name:"basic","label-col":{span:8},"wrapper-col":{span:16},autocomplete:"off"},{default:n.withCtx(()=>[n.createVNode(Xi,{type:"flex",style:{width:"100%"}},{default:n.withCtx(()=>[n.createVNode(he,{span:24,order:1},{default:n.withCtx(()=>[n.createVNode(K,{label:"字典名称:"},{default:n.withCtx(()=>[n.createVNode(j,{value:k.value.convert.dict,"onUpdate:value":w[21]||(w[21]=F=>k.value.convert.dict=F)},null,8,["value"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])):n.createCommentVNode("",!0)]),_:1},8,["visible","title","onOk"]),n.createVNode(ai,{ref_key:"btnSetting",ref:a},null,512)])}}}),[["__scopeId","data-v-c0f75bb9"]]),Ra=Z(n.defineComponent({__name:"form",props:{editor:{type:Object,required:!1},widget:{type:Object,required:!1},form:{type:Object,required:!1}},setup(o,{expose:e}){const t=o,i=n.ref(),s=n.ref({}),l=n.ref(null);n.onMounted(()=>{if(t.editor&&a.value.dsn){const u=t.editor.dataManager();a.value.primary&&u.psn(a.value.dsn),i.value=u.useForm(a.value.dsn,l.value,p=>{s.value=p.body||{}})}});const a=n.computed(()=>t.widget||t.form||{}),r=n.computed(()=>{let u=a.value.widgets||[];return!u.length&&t.form?.fields&&(u=t.form.fields,u.forEach(p=>{p.widget||(p.widget="unione-form-item"),p.control||(p.control="a-input")})),u}),d=n.computed(()=>a.value.setting||{});n.provide("formSetting",d.value);function c(){return s.value}function h(u){s.value={...s.value,...u}}function f(){return l.value.validate()}return e({validate:f,getValue:c,setValue:h}),(u,p)=>{const b=n.resolveComponent("a-form");return n.openBlock(),n.createBlock(rt,{class:"unione-form-widget","setting-title":"表单设置",model:o.editor?.model.value},n.createSlots({default:n.withCtx(()=>[n.createVNode(b,{ref_key:"formObj",ref:l,model:s.value,class:n.normalizeClass(["unione-form",o.editor?.model.value,"form-layout-col-"+(d.value.showColumn||3)])},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,k=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(k.widget),{key:k.wid,wid:k.wid,widget:k,editor:o.editor,value:s.value[k.name],"onUpdate:value":v=>s.value[k.name]=v,formValue:s.value},null,40,["wid","widget","editor","value","onUpdate:value","formValue"]))),128))]),_:1},8,["model","class"])]),_:2},[o.editor&&a.value.wid?{name:"widget-setting",fn:n.withCtx(()=>[n.createVNode(Fa,{wid:a.value.wid,editor:o.editor},null,8,["wid","editor"])]),key:"0"}:void 0]),1032,["model"])}}}),[["__scopeId","data-v-afd7fb6a"]]);function ks(o,e=!1){const t=Me();if(t.isDebug&&console.log("进入:加载字典数据方法,dict name:"+o+",force:"+e),!o)return Promise.reject("字典名称不能为空");const i=localStorage.getItem("UNIONE-DICT-"+o);return i&&e==!1?Promise.resolve(JSON.parse(i)):new Promise((s,l)=>{W.axios.admin({url:"/api/system/dict/load/"+o}).then(a=>{if(a.success){const r=a.body.filter(d=>d.dictName!=d.dictKey);r.forEach(d=>{d.value=d.dictKey,d.label=d.dictValue}),r.length?(localStorage.setItem("UNIONE-DICT-"+o,JSON.stringify(r)),s(r)):l("字典加载失败,dict:"+o+",字典项列表为空")}else t.isDebug&&console.error("字典加载失败,dict:"+o,a),l("字典加载失败,dict:"+o+",error:"+a.message)})})}async function bs(o,e){const t=Me();if(t.isDebug&&console.log("进入:根据获取字典选项方法,dict name:"+o+",key:"+e),e==null||e==null||e=="undefined"||!(e+"").length)return Promise.reject("字典key为空");const i=await ks(o),s=i.filter(l=>l.dictKey==e);return s.length>0?Promise.resolve(s[0]):(t.isDebug&&console.log("字典项匹配失败,name:"+o+",key:"+e+"options:",i),Promise.reject("字典项匹配失败,name:"+o+",key:"+e))}async function La(o,e){const t=await bs(o,e);return Promise.resolve(t.dictValue)}const ws={load:ks,getLabel:La,getOption:bs};class dt{convertObj;config;options;constructor(e){(!e||!e.types)&&console.error("转换器定义不能为空,type不能为空",e),e.valueField||(e.valueField="id"),e.labelField||(e.labelField="title"),this.convertObj=e,this.options=e.options||[],this.config=Me()}load(e,t=!1){return this.config.isDebug&&console.log("进入:加载转换选项方法,id:"+this.convertObj.id+",type:"+this.convertObj.types+",value:"+e+",force:"+t),!(e==null||e==null||e=="undefined"||!(e+"").length)&&this.options?.length&&this.options.filter(i=>i.value==e).length?Promise.resolve(this.options):this.convertObj.types=="dict"?new Promise((i,s)=>{if(!this.convertObj.dictName){s("字典名称不能为空,id:"+this.convertObj.id);return}ws.load(this.convertObj.dictName,t).then(l=>{this.options=l,typeof e=="number"&&this.options.forEach(a=>{a.value=parseInt(a.value)}),i(this.options)})}):this.convertObj.types=="option"?(this.options=this.convertObj.options||[],this.convertObj.options?.length?Promise.resolve(this.convertObj.options):(this.config.isDebug&&console.error("静态转换器选项为空,id:"+this.convertObj.id,this.convertObj),Promise.reject("静态转换器选项为空,id:"+this.convertObj.id))):!this.convertObj.id&&this.convertObj.types!="local"?Promise.reject("转换器id不能为空,type:"+this.convertObj.types):new Promise((i,s)=>{const l=this.convertObj.params||{body:{}};this.convertObj.pidField&&(l.pid=-1);const a=this.convertObj.types=="local"?this.convertObj.url:"/api/data/convertor/"+this.convertObj.id;W.axios.admin({url:a,data:l,method:"POST"}).then(r=>{r.success?(this.options=r.body,this.$processOptions(this.options),typeof e=="number"&&this.options.forEach(d=>{d.value=parseInt(d.value)}),e==null||e==null||e=="undefined"||!(e+"").length?this.options.length?i(this.options):(this.config.isDebug&&console.error("数据选项为空,type:"+this.convertObj.types+",id:"+this.convertObj.id,r),s("数据选项为空,type:"+this.convertObj.types+",id:"+this.convertObj.id)):this.options.filter(c=>c.value==e).length?i(this.options):(l.body||(l.body={}),l.body[this.convertObj.valueField]=e,W.axios.admin({url:a,data:l,method:"POST"}).then(c=>{if(c.success){const h={};this.options.forEach(f=>{h[e]=!0}),c.body.forEach(f=>{h[f.value]||this.options.push(f)}),i(this.options)}else s("数据选项为空,type:"+this.convertObj.types+",id:"+this.convertObj.id)}))):(this.config.isDebug&&console.error("数据选项加载失败,type:"+this.convertObj.types+",id:"+this.convertObj.id,r),s("数据选项加载失败,type:"+this.convertObj.types+",id:"+this.convertObj.id+",error:"+r.message))})})}convert(e){if(this.config.isDebug&&console.log("进入:数据转换:value->label方法,id:"+this.convertObj.id+",type:"+this.convertObj.types+",value:"+e),e==null||e==null||e=="undefined"||!(e+"").length)return Promise.reject("value为空");if(this.convertObj.types=="dict")return this.convertObj.dictName?ws.getLabel(this.convertObj.dictName,e):Promise.reject("字典名称不能为空");if(this.convertObj.types=="option"){if(this.convertObj.options?.length){const t=this.convertObj.options.filter(i=>i.value==e);return t.length?Promise.resolve(t[0].label):(this.config.isDebug&&console.error("静态转换器选项匹配失败,id:"+this.convertObj.id+",value:"+e,this.convertObj),Promise.reject("静态转换器选项匹配失败,id:"+this.convertObj.id+",value:"+e))}return Promise.reject("静态转换器选项为空,id:"+this.convertObj.id)}if(this.options?.length){const t=this.options.filter(i=>i.value==e);if(t.length)return Promise.resolve(t[0].label)}return new Promise((t,i)=>{this.load(e).then(s=>{const l=s.filter(a=>a.value==e);if(l.length)return t(l[0].label);i()})})}children(e=-1){return this.config.isDebug&&console.log("进入:加载下级数据项方法,id:"+this.convertObj.id+",type:"+this.convertObj.types+",pid:"+e),this.convertObj.pidField?this.convertObj.types=="dict"||this.convertObj.types=="option"?Promise.reject("字典/静态转换器不支持该方法,type:"+this.convertObj.types+",id:"+this.convertObj.id):new Promise((i,s)=>{const l=this.convertObj.types=="local"?this.convertObj.url:"/api/data/convertor/"+this.convertObj.id;W.axios.admin({url:l,data:e,method:"POST"}).then(a=>{a.success?(this.$processOptions(a.body),this.options=[...this.options,...a.body],i(a.body)):(this.config.isDebug&&console.error("加载下级数据项失败,type:"+this.convertObj.types+",id:"+this.convertObj.id+",pid:"+e,a),s("加载下级数据项失败,type:"+this.convertObj.types+",id:"+this.convertObj.id+",pid:"+e+",error:"+a.message))})}):Promise.reject("转换器未设置parentField,id:"+this.convertObj.id)}search(e){return this.config.isDebug&&console.log("进入:搜索数据选项方法,id:"+this.convertObj.id+",type:"+this.convertObj.types+",keywords:"+e),this.convertObj.types=="dict"||this.convertObj.types=="option"?Promise.resolve(this.options.filter(t=>t.label.indexOf(e)>=0)):new Promise(t=>{const i=this.convertObj.types=="local"?this.convertObj.url:"/api/data/convertor/"+this.convertObj.id;W.axios.admin({url:i,data:{body:{keywords:e}},method:"POST"}).then(s=>{s.success?(this.$processOptions(s.body),t(s.body)):t([])})})}$processOptions(e){return this.convertObj.types=="local"&&e.forEach(t=>{this.convertObj.idField&&(t.id=t[this.convertObj.idField]),this.convertObj.pidField&&(t.pid=t[this.convertObj.pidField]),t.value=t[this.convertObj.valueField],t.label=t[this.convertObj.labelField]}),e}}const ja={key:1,class:"text-view"},za=Z(n.defineComponent({__name:"formItem",props:n.mergeModels({wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1},formValue:{type:Object,required:!0}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(o){const e=o,t=n.useModel(o,"value"),i=n.inject("formSetting");n.onMounted(()=>{l.value.value!=null&&typeof l.value.value<"u"&&(e.formValue[l.value.name]==null||e.formValue[l.value.name]==null||typeof e.formValue[l.value.name]>"u")&&(t.value=l.value.value,l.value.widget=="unione-check-box"&&(Array.isArray(l.value.value)||(typeof l.value.value=="string"?t.value=l.value.value.split(","):t.value=[l.value.value])))});const s=n.ref({}),l=n.computed(()=>{const b=e.editor?.widget(e.wid)||e.widget||{};return b.event&&Object.keys(b.event).forEach(k=>{const v=b.event[k];s.value[k]=null,v.enable&&v.scriptText&&(s.value[k]=new Function("value","ctx",v.scriptText))}),b}),a=n.computed(()=>!(s.value.visible&&s.value.visible(e.formValue[l.value.name],e.formValue)==!1)),r=n.computed(()=>s.value.title&&s.value.title(e.formValue[l.value.name],e.formValue)||l.value.title),d=n.ref({}),c=n.computed(()=>{const b=[],k=l.value.rule||{};if(l.value.props?.required&&b.push({required:!0,whitespace:k?.whitespace||!1,trigger:k?.trigger||i.ruleTrigger||"change",validator:(v,C)=>(k?.whitespace&&C&&typeof C=="string"&&(C=C.trim()),C&&(C+"").length>0?Promise.resolve():Promise.reject(l.value.title+"不能为空!"))}),k.advance&&d.value[k.advance]){const v=d.value[k.advance];b.push({pattern:v.pattern,message:v.message||"表单验证不通过!",trigger:k.trigger||i.ruleTrigger||"change"})}return k.regExpress&&b.push({pattern:k.regExpress,message:k.regMessage||"表单验证不通过!",trigger:k.trigger||i.ruleTrigger||"change"}),l.value.dataLen&&b.push({validator:(v,C)=>C&&(C+"").length>l.value.dataLen?Promise.reject("最大长度["+l.value.dataLen+"],当前:["+(C+"").length+"]"):Promise.resolve(),trigger:k?.trigger||i.ruleTrigger||"change"}),b}),h=n.computed(()=>{const b=l.value.props||{};if(l.value.control=="a-input-number"){const k=l.value.rule||{};k.rangeMin!=null&&k.rangeMin!=null&&(b.min=k.rangeMin),k.rangeMax!=null&&k.rangeMax!=null&&(b.max=k.rangeMax)}return l.value.control=="a-date-picker"&&l.value.view?.dataFormat&&(b.format=l.value.view.dataFormat,b.valueFormat=l.value.view.dataFormat),b}),f=n.computed(()=>{const b=l.value.css||{},k=[];return b.cssName&&k.push(b.cssName),i.platform=="app"?b.cssName?typeof b.cssName=="string"&&b.cssName.indexOf("all-line")<0&&k.push("all-line"):k.push("all-line"):l.value.view?.width&&(l.value.view.width>=3?(!b.cssName||typeof b.cssName=="string"&&b.cssName.indexOf("all-line")<0)&&k.push("all-line"):l.value.view.width==2&&k.push("2in-line")),k}),u=n.computed(()=>{const b=i.showColumn||3;let k=l.value.view?.labelWidth||i.labelWidth||9;return l.value.css?.cssName&&b>1&&typeof l.value.css.cssName=="string"&&l.value.css.cssName.indexOf("all-line")>=0?{span:Math.round(k/b)}:l.value.view?.width>=3&&b>1?{span:Math.round(k/b)}:{span:k}}),p=n.ref();return n.watch(t,()=>{t.value&&e.editor?.model.value=="view"&&l.value.convert&&new dt(l.value.convert).convert(t.value.toString()).then(b=>{p.value=b})}),(b,k)=>{const v=n.resolveComponent("a-form-item");return n.openBlock(),n.createBlock(rt,{class:n.normalizeClass(["unione-form-item",f.value]),style:n.normalizeStyle(l.value.css?.cssText)},{default:n.withCtx(()=>[a.value?(n.openBlock(),n.createBlock(v,{key:0,label:r.value,name:l.value.name,labelCol:u.value,required:l.value.props?.required,rules:c.value,help:(!e.editor||e.editor.model.value!="view")&&l.value.props?.help,tooltip:l.value.props?.tooltip},{default:n.withCtx(()=>[!o.editor||o.editor.model.value!="view"?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(l.value.control||"a-input"),n.mergeProps({key:0,wid:l.value.wid,widget:l.value,editor:e.editor,value:t.value,"onUpdate:value":k[0]||(k[0]=C=>t.value=C)},h.value,{style:l.value.css?.props}),null,16,["wid","widget","editor","value","style"])):t.value?(n.openBlock(),n.createElementBlock("div",ja,n.toDisplayString(p.value?p.value:t.value),1)):n.createCommentVNode("",!0)]),_:1},8,["label","name","labelCol","required","rules","help","tooltip"])):n.createCommentVNode("",!0)]),_:1},8,["class","style"])}}}),[["__scopeId","data-v-1a91c715"]]);function qa(o,e=350){let t=null;return i=>{clearTimeout(t),t=setTimeout(()=>{o(i)},e)}}const Ua=Z(n.defineComponent({__name:"selectBox",props:n.mergeModels({wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1},convert:{type:Object,required:!1},options:{type:Array,required:!1}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(o){Me();const e=o,t=n.useModel(o,"value"),i=n.ref([]),s=n.computed(()=>i.value?.length?i.value:e.options?.length?e.options:[]),l=n.computed(()=>(d.value.convert||e.convert||{}).search||!1),a=qa(h=>{c.value.search(h).then(f=>{i.value=f})},500);n.onMounted(()=>{c.value.load(t.value).then(h=>{i.value=h})});const r=n.ref({}),d=n.computed(()=>{const h=e.editor?.widget(e.wid)||e.widget||{};return h.event&&Object.keys(h.event).forEach(f=>{const u=h.event[f];r.value[f]=null,u.enable&&u.scriptText&&(r.value[f]=new Function("value","ctx",u.scriptText))}),h}),c=n.computed(()=>{const h=d.value.convert||e.convert||{};return new dt(h)});return n.watch(t,()=>{t.value&&c.value.load(t.value).then(h=>{i.value=h})}),n.watch(()=>d.value.convert||e.convert||{},()=>{c.value.load().then(h=>{i.value=h})}),(h,f)=>{const u=n.resolveComponent("a-select");return n.openBlock(),n.createBlock(u,{class:"unione-form-select",options:s.value,showSearch:l.value,value:t.value,"onUpdate:value":f[0]||(f[0]=p=>t.value=p),onSearch:n.unref(a)},null,8,["options","showSearch","value","onSearch"])}}}),[["__scopeId","data-v-d885ca4f"]]),Wa=Z(n.defineComponent({__name:"switchBox",props:n.mergeModels({wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1},convert:{type:Object,required:!1}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(o){const e=o,t=n.useModel(o,"value"),i=n.ref({});n.onMounted(()=>{a.value.load(t.value).then(r=>{r.forEach(d=>{d.value&&d.value!="0"&&d.value!="false"&&d.value!="FALSE"?(i.value.checkedChildren=d.label,i.value.checkedValue=d.value):(i.value.unCheckedChildren=d.label,i.value.unCheckedValue=d.value)})})});const s=n.ref({}),l=n.computed(()=>{const r=e.editor?.widget(e.wid)||e.widget||{};return r.event&&Object.keys(r.event).forEach(d=>{const c=r.event[d];s.value[d]=null,c.enable&&c.scriptText&&(s.value[d]=new Function("value","ctx",c.scriptText))}),r}),a=n.computed(()=>{const r=l.value.convert||e.convert||{};return new dt(r)});return(r,d)=>{const c=n.resolveComponent("a-switch");return n.openBlock(),n.createBlock(c,n.mergeProps({class:"unione-form-switch"},i.value,{checked:t.value,"onUpdate:checked":d[0]||(d[0]=h=>t.value=h)}),null,16,["checked"])}}}),[["__scopeId","data-v-c9a968d8"]]),Ha=Z(n.defineComponent({__name:"radioBox",props:n.mergeModels({wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1},convert:{type:Object,required:!1},options:{type:Array,required:!1}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(o){const e=o,t=n.useModel(o,"value"),i=n.ref([]),s=n.computed(()=>i.value?.length?i.value:e.options?.length?e.options:[]);n.onMounted(()=>{r.value.load(t.value||a.value.value).then(d=>{i.value=d})});const l=n.ref({}),a=n.computed(()=>{const d=e.editor?.widget(e.wid)||e.widget||{};return d.event&&Object.keys(d.event).forEach(c=>{const h=d.event[c];l.value[c]=null,h.enable&&h.scriptText&&(l.value[c]=new Function("value","ctx",h.scriptText))}),d}),r=n.computed(()=>{const d=a.value.convert||e.convert||{};return new dt(d)});return(d,c)=>{const h=n.resolveComponent("a-radio-group");return n.openBlock(),n.createBlock(h,{class:"unione-form-radio",options:s.value,value:t.value,"onUpdate:value":c[0]||(c[0]=f=>t.value=f)},null,8,["options","value"])}}}),[["__scopeId","data-v-761054e0"]]),Ka=Z(n.defineComponent({__name:"checkBox",props:n.mergeModels({wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1},convert:{type:Object,required:!1},options:{type:Array,required:!1}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(o){const e=o,t=n.useModel(o,"value"),i=n.ref([]),s=n.computed(()=>i.value?.length?i.value:e.options?.length?e.options:[]);n.onMounted(()=>{r.value.load(t.value||a.value.value).then(d=>{i.value=d})});const l=n.ref({}),a=n.computed(()=>{const d=e.editor?.widget(e.wid)||e.widget||{};return d.event&&Object.keys(d.event).forEach(c=>{const h=d.event[c];l.value[c]=null,h.enable&&h.scriptText&&(l.value[c]=new Function("value","ctx",h.scriptText))}),d}),r=n.computed(()=>{const d=a.value.convert||e.convert||{};return new dt(d)});return(d,c)=>{const h=n.resolveComponent("a-checkbox-group");return n.openBlock(),n.createBlock(h,{class:"unione-form-checkbox",options:s.value,value:t.value,"onUpdate:value":c[0]||(c[0]=f=>t.value=f)},null,8,["options","value"])}}}),[["__scopeId","data-v-e2f0f7fc"]]),Qa={class:"unione-props-setting unione-query-setting"},Ga={class:"unione-query-opts"},Ya={key:0},Xa=["onClick"],Ja={key:1},Za={key:1,class:"edit-field"},er=["onClick"],tr=Z(n.defineComponent({__name:"querySetting",props:{wid:{type:String,required:!0},editor:{type:Object,required:!0}},setup(o){const e=o,t=n.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:V})=>V+1},{title:"字段名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"字段标题",dataIndex:"title",key:"title",width:"90px",align:"center"},{title:"查询",dataIndex:"isQuery",key:"isQuery",width:"30px",align:"center"},{title:"查询类型",dataIndex:"queryType",key:"queryType",width:"55px",align:"center"},{title:"显示顺序",dataIndex:"showIndex",key:"showIndex",width:"55px",align:"center"}]),i=n.computed(()=>{const V=e.editor.widget(e.wid)||{};return V.configs||(V.configs={}),V.configs.btns||(V.configs.btns=[]),V}),s=n.computed(()=>(e.editor.dataModels()||[]).map(g=>({value:g.sn,label:g.title+"("+g.name+")"}))),l=n.computed(()=>{const V=[],g=[];return i.value.configs.btns||(i.value.configs.btns=[]),i.value.configs.btns.forEach(m=>{V.push(m),g.push(m.name)}),g.includes("query")||V.splice(0,0,{visible:!0,name:"query",title:"搜索",type:"primary"}),g.includes("reset")||V.splice(1,0,{visible:!0,name:"reset",title:"重置",type:"default"}),g.includes("reset")||V.splice(1,0,{visible:!0,name:"advanced",title:"高级搜索",type:"default"}),V.sort((m,S)=>{const _=m.index||1,y=S.index||1;return _-y}),V}),a=n.ref(null);function r(V){a.value&&a.value.open(V,g=>{g.visible=!0,Object.keys(g).forEach(m=>{V[m]=g[m]}),i.value.configs.btns.sort((m,S)=>{const _=m.index||1,y=S.index||1;return _-y}),i.value.configs.btns=[...i.value.configs.btns]})}function d(){const V=i.value.configs.btns.length+1;let g={title:"新增",name:"new_"+V,size:"default",index:V,visible:!0,type:"default",props:{block:!1,ghost:!1,danger:!1},event:{clickScript:"",titleScript:"",disableScript:"",visibleScript:""}};i.value.configs.btns.push(g),e.editor.widget(e.wid,i.value),a.value.open(g,m=>{Object.keys(m).forEach(S=>{g[S]=m[S]}),i.value.configs.btns=[...i.value.configs.btns]})}function c(V){const g=()=>{if(["query","reset","advanced"].includes(V.name))V.visible=!1,i.value.configs.btns=[...i.value.configs.btns];else{const m=[];i.value.configs.btns.forEach(S=>{S.name!=V.name&&m.push(S)}),i.value.configs.btns=m}};G.Modal.confirm({title:"确认信息",content:"请确定删除该操作?",onOk:()=>{g()}})}const h=n.computed(()=>e.editor?.dataModel(i.value.dataModel||"none")||{}),f=n.computed(()=>h.value.fields?.length?h.value.fields:[]),u={mounted:V=>V.focus()},p=n.ref({});function b(){const V=Object.keys(p.value);if(V.length)for(let g in V){const m=f.value.filter(S=>S.name==g);if(m&&m[0]){let S=p.value[g];Object.keys(S).forEach(_=>{if(_=="showIndex"){const y=m[0].show?.query||{};m[0].show||(m[0].show={}),m[0].show.query={...y,index:S[_]}}else m[0][_]=S[_]})}}p.value={}}function k(V,g){b();const m={};m[g]=V[g]||"",g=="showIndex"&&(m[g]=V.show?.query?.index),p.value[V.name]=m}function v(V,g){if(!V||!g){p.value={};return}const m=p.value[V.name][g];if(g=="showIndex"){const S=V.show?.query||{};V.show||(V.show={}),V.show.query={...S,index:m}}else V[g]=m;p.value={}}function C(V,g){f.value.filter(S=>S.name==V.name).forEach(S=>{S[g]=!S[g]})}const x=n.ref({options:[{value:"keywords",label:"关键字"},{value:"equle",label:"精确"},{value:"like",label:"模糊"},{value:"like-right",label:"右模糊"},{value:"like-left",label:"左模糊"},{value:"range",label:"范围"}],showLabel:V=>{const g=x.value.options.filter(m=>m.value==V);return g[0]?g[0].label:V}});return(V,g)=>{const m=n.resolveComponent("a-divider"),S=n.resolveComponent("CloseOutlined"),_=n.resolveComponent("a-button"),y=n.resolveComponent("PlusOutlined"),w=n.resolveComponent("a-select"),N=n.resolveComponent("ToolOutlined"),A=n.resolveComponent("a-checkbox"),O=n.resolveComponent("a-input-number"),D=n.resolveComponent("a-table");return n.openBlock(),n.createElementBlock("div",Qa,[n.createVNode(m,{orientation:"left"},{default:n.withCtx(()=>g[3]||(g[3]=[n.createTextVNode("查询按钮")])),_:1}),n.createElementVNode("div",Ga,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,M=>(n.openBlock(),n.createBlock(_,n.mergeProps({key:M.name,class:["btn",M.name,!M.visible&&"deleted"],type:M.visible?M.type:"default",size:M.size||"default",ref_for:!0},M.props||{},{onClick:E=>r(M)}),n.createSlots({default:n.withCtx(()=>[n.createTextVNode(" "+n.toDisplayString(M.title)+" ",1),M.visible?(n.openBlock(),n.createBlock(S,{key:0,class:"btn-del",onClick:n.withModifiers(E=>c(M),["stop"])},null,8,["onClick"])):n.createCommentVNode("",!0)]),_:2},[M.icon?{name:"icon",fn:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(M.icon)))]),key:"0"}:void 0]),1040,["class","type","size","onClick"]))),128)),n.createVNode(_,{class:n.normalizeClass(["btn","btn-add"]),onClick:g[0]||(g[0]=M=>d()),size:"small"},{default:n.withCtx(()=>[n.createVNode(y)]),_:1})]),n.createVNode(m,{orientation:"left"},{default:n.withCtx(()=>g[4]||(g[4]=[n.createTextVNode("查询字段")])),_:1}),g[5]||(g[5]=n.createTextVNode(" 数据模型:")),n.createVNode(w,{class:"data-model-list",options:s.value,value:i.value.dataModel,"onUpdate:value":g[1]||(g[1]=M=>i.value.dataModel=M)},null,8,["options","value"]),n.createVNode(D,{columns:t.value,"data-source":f.value,bordered:"",scroll:{x:800},pagination:!1,"row-key":"name",size:"small"},{headerCell:n.withCtx(({column:M})=>[["showIndex","queryType"].includes(M.key)?(n.openBlock(),n.createElementBlock("span",Ya,[n.createVNode(N),n.createTextVNode(" "+n.toDisplayString(M.title),1)])):n.createCommentVNode("",!0)]),bodyCell:n.withCtx(({column:M,text:E,record:z})=>[["queryType"].includes(M.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",(!p.value[z.name]||!Object.keys(p.value[z.name]).includes(M.dataIndex))&&!E&&"empty"]),onClick:$=>k(z,M.dataIndex)},[p.value[z.name]&&Object.keys(p.value[z.name]).includes(M.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(w,{key:0,value:z[M.dataIndex],"onUpdate:value":$=>z[M.dataIndex]=$,allowClear:!0,options:x.value.options,onBlur:g[2]||(g[2]=$=>v())},null,8,["value","onUpdate:value","options"])),[[u]]):(n.openBlock(),n.createElementBlock("span",Ja,n.toDisplayString(x.value.showLabel(E)),1))],10,Xa)):["isQuery"].includes(M.dataIndex)?(n.openBlock(),n.createElementBlock("div",Za,[n.createVNode(A,{checked:z[M.dataIndex],onClick:$=>C(z,M.dataIndex)},null,8,["checked","onClick"])])):M.dataIndex=="showIndex"?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["edit-field",(!p.value[z.name]||!Object.keys(p.value[z.name]).includes(M.dataIndex))&&!E&&"empty"]),onClick:$=>k(z,M.dataIndex)},[p.value[z.name]&&Object.keys(p.value[z.name]).includes(M.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(O,{key:0,value:p.value[z.name][M.dataIndex],"onUpdate:value":$=>p.value[z.name][M.dataIndex]=$,onBlur:$=>v(z,M.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[u]]):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(z.show?.query?.index||" "),1)],64))],10,er)):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),n.createVNode(ai,{ref_key:"btnSetting",ref:a},null,512)])}}}),[["__scopeId","data-v-ce575063"]]),ir={class:"query-btn"},nr={class:"btn-advanced-overlay"},ys=Z(n.defineComponent({__name:"queryForm",props:{wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1}},emits:["query","reset","btnClick"],setup(o,{emit:e}){const t=o,i=n.computed(()=>{const k=t.editor?.widget(t.wid)||t.widget||{};return k.btns||(k.btns=[]),k}),s=n.computed(()=>({visible:!0,name:"keywords",title:"关键字",placeholder:"请输入搜索内容",...i.value.keywords||{}})),l=n.computed(()=>{let k=[];return i.value.fields?.length&&(k=i.value.fields),k.sort((v,C)=>{const x=v.show?.query?.index||1,V=C.show?.query?.index||1;return x-V}),k.forEach(v=>{v.widget=v.widget||"a-input",v.value!=null&&v.value!="undefined"&&typeof v.value<"u"&&(h.value[v.name]=v.value)}),k}),a=n.computed(()=>i.value.labelWidth||7),r=n.computed(()=>{const k=i.value.btns.filter(v=>v.name=="advanced")[0]||{};return k.event?.clickScript&&(k.event.click=new Function("ctx","btn","event",k.event.clickScript)),k.event?.disableScript&&(k.event.disable=new Function("ctx","btn",k.event.disableScript)),k.event?.visibleScript&&(k.event.visible=new Function("ctx","btn",k.event.visibleScript)),{visible:!0,name:"advanced",title:"高级搜索",...k}}),d=["query","reset","advanced"],c=n.computed(()=>{const k=i.value.btns.filter(C=>C.name!="advanced"),v=[];return k.forEach(C=>{C.size||(C.size="default"),v.push(C.name)}),v.includes("query")||k.splice(0,0,{visible:!0,name:"query",title:"查询",size:"default",type:"primary"}),v.includes("reset")||k.splice(1,0,{visible:!0,name:"reset",title:"重置",size:"default",type:"default"}),k.sort((C,x)=>{const V=C.index||1,g=x.index||1;return V-g}),k}),h=n.ref({});n.onMounted(()=>{t.editor?.ebus.$emit("table-list-search",h.value)});const f=e;function u({btn:k,event:v}){console.log("unione query form btn click",k,v),k.name=="query"&&p(),k.name=="reset"&&b(),f("btnClick",{btn:k,event:v})}function p(){const k=[];s.value.visible&&k.push(s.value.name),l.value.forEach(C=>{C.visible&&k.push(C.name)});const v={};Object.keys(h.value).forEach(C=>{k.includes(C)&&(v[C]=h.value[C])}),f("query",v),t.editor?.ebus.$emit("table-list-search",v)}function b(){h.value={},l.value.forEach(k=>{k.visible=!1}),f("reset"),t.editor?.ebus.$emit("table-list-reset")}return(k,v)=>{const C=n.resolveComponent("a-input"),x=n.resolveComponent("a-form-item"),V=n.resolveComponent("unione-btn"),g=n.resolveComponent("a-checkbox"),m=n.resolveComponent("DownOutlined"),S=n.resolveComponent("a-button"),_=n.resolveComponent("a-dropdown"),y=n.resolveComponent("a-form");return n.openBlock(),n.createBlock(rt,{class:"unione-query-form",model:t.editor?.model.value,"setting-title":"查询设置"},n.createSlots({default:n.withCtx(()=>[n.createVNode(y,{model:h.value,layout:"horizontal","label-col":{span:a.value}},{default:n.withCtx(()=>[s.value.visible?(n.openBlock(),n.createBlock(x,{key:0,label:s.value.title,class:"query-field keywords",name:s.value.name,style:n.normalizeStyle({width:a.value})},{default:n.withCtx(()=>[n.createVNode(C,{placeholder:s.value.placeholder,value:h.value[s.value.name],"onUpdate:value":v[0]||(v[0]=w=>h.value[s.value.name]=w)},null,8,["placeholder","value"])]),_:1},8,["label","name","style"])):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,w=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:w.name},[w.visible?(n.openBlock(),n.createBlock(x,{key:0,label:w.title,class:n.normalizeClass(["query-field",w.name]),style:n.normalizeStyle({width:a.value}),name:w.name},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(w.widget),n.mergeProps({placeholder:w.placeholder,value:h.value[w.name],"onUpdate:value":N=>h.value[w.name]=N,ref_for:!0},w.props||{},{widget:w}),null,16,["placeholder","value","onUpdate:value","widget"]))]),_:2},1032,["label","class","style","name"])):n.createCommentVNode("",!0)],64))),128)),n.createElementVNode("div",ir,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(c.value,w=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:w.name},[w.visible!=!1?(n.openBlock(),n.createBlock(V,{key:0,widget:w,editor:o.editor,onClick:u,preset:d},null,8,["widget","editor"])):n.createCommentVNode("",!0)],64))),128)),r.value.visible&&l.value.length?(n.openBlock(),n.createBlock(_,{key:0,class:"btn btn-advanced",trigger:[r.value.trigger||"hover"]},{overlay:n.withCtx(()=>[n.createElementVNode("div",nr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,w=>(n.openBlock(),n.createBlock(g,{key:w.name,class:"item",checked:w.visible,onClick:N=>w.visible=!w.visible},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(w.title),1)]),_:2},1032,["checked","onClick"]))),128))])]),default:n.withCtx(()=>[n.createVNode(S,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.value.title)+" ",1),n.createVNode(m)]),_:1})]),_:1},8,["trigger"])):n.createCommentVNode("",!0)])]),_:1},8,["model","label-col"])]),_:2},[t.editor&&t.wid?{name:"widget-setting",fn:n.withCtx(()=>[n.createVNode(tr,{editor:t.editor,wid:t.wid},null,8,["editor","wid"])]),key:"0"}:void 0]),1032,["model"])}}}),[["__scopeId","data-v-bf93af8d"]]),sr={class:"unione-props-setting unione-table-setting"},lr={class:"unione-table-tools"},or={key:1,class:"unione-table-opts"},ar={key:0},rr=["onClick"],dr={key:1,class:"edit-field"},cr=["onClick"],hr={key:1},fr=Z(n.defineComponent({__name:"tableSetting",props:{wid:{type:String,required:!0},editor:{type:Object,required:!0}},setup(o){const e=o,t=n.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:y})=>y+1},{title:"字段名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"字段标题",dataIndex:"title",key:"title",width:"90px",align:"center"},{title:"显示",dataIndex:"isList",key:"isList",width:"30px",align:"center"},{title:"排序",dataIndex:"isSort",key:"isSort",width:"30px",align:"center"},{title:"显示顺序",dataIndex:"showIndex",key:"showIndex",width:"55px",align:"center"},{title:"对齐方式",dataIndex:"align",key:"align",width:"55px",align:"center",options:[{value:"left",label:"居左"},{value:"center",label:"居中"},{value:"right",label:"居右"}],showLabel(y,w){let N=y.filter(A=>A.value==w);return N&&N[0]&&N[0].label||w}},{title:"固定位置",dataIndex:"fixed",key:"fixed",width:"55px",align:"center",options:[{value:"left",label:"靠左"},{value:"right",label:"靠右"}],showLabel(y,w){let N=y.filter(A=>A.value==w);return N&&N[0]&&N[0].label||w}},{title:"列宽",dataIndex:"showWidth",key:"showWidth",width:"50px",align:"center"}]),i=n.computed(()=>{const y=e.editor.widget(e.wid)||{};return y.configs||(y.configs={}),y.configs.leftBtns||(y.configs.leftBtns=[]),y.configs.rightBtns||(y.configs.rightBtns=[]),y.configs.operation||(y.configs.operation={}),y.configs.operation.btns||(y.configs.operation.btns=[]),y.configs.operation.more||(y.configs.operation.more={}),y}),s=n.computed(()=>(e.editor.dataModels()||[]).map(w=>({value:w.sn,label:w.title+"("+w.name+")"}))),l=n.computed(()=>{if(!i.value)return[];const y=[],w=i.value.configs.leftBtns;if(w.forEach(N=>{y.push(N.name)}),!y.includes("add")){const N={visible:!0,title:"新增",icon:"PlusOutlined",size:"small",index:0,type:"primary",props:{danger:!1,block:!1,ghost:!1},name:"add"};w.splice(0,0,N)}if(!y.includes("delBatch")){const N={visible:!0,title:"批量删除",icon:"DeleteOutlined",size:"small",index:1,type:"primary",props:{danger:!0,block:!1,ghost:!1},name:"delBatch"};w.splice(1,0,N)}return w}),a=n.computed(()=>{if(!i.value)return[];const y=[],w=i.value.configs.rightBtns;if(w.forEach(N=>{y.push(N.name)}),!y.includes("downData")){const N={visible:!0,icon:"CloudDownloadOutlined",size:"small",title:"导出",index:0,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"downData"};w.splice(0,0,N)}if(!y.includes("impData")){const N={visible:!0,title:"导入",icon:"CloudUploadOutlined",size:"small",index:1,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"impData"};w.splice(1,0,N)}if(!y.includes("expData")){const N={visible:!0,title:"导出",icon:"CloudUploadOutlined",size:"small",index:2,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"expData"};w.splice(2,0,N)}if(!y.includes("downTmpl")){const N={visible:!0,icon:"CloudDownloadOutlined",size:"small",title:"模版",index:3,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"downTmpl"};w.splice(3,0,N)}return w});function r(y,w){y=="left"?h.value.open(w,N=>{N.visible=!0,Object.keys(N).forEach(A=>{w[A]=N[A]}),i.value.configs.leftBtns.sort((A,O)=>{const D=A.index||1,M=O.index||1;return D-M}),i.value.configs.leftBtns=[...i.value.configs.leftBtns]}):h.value.open(w,N=>{N.visible=!0,Object.keys(N).forEach(A=>{w[A]=N[A]}),i.value.configs.rightBtns.sort((A,O)=>{const D=A.index||1,M=O.index||1;return D-M}),i.value.configs.rightBtns=[...i.value.configs.rightBtns]})}function d(y){const w=y=="left"?i.value.configs.leftBtns.length:i.value.configs.rightBtns.length;let N={title:"新增"+w,name:"new_"+w,index:w,size:"small",visible:!0,type:"default",props:{block:!1,ghost:!1,danger:!1},event:{}};y=="left"?i.value.configs.leftBtns.push(N):i.value.configs.rightBtns.push(N),e.editor.widget(e.wid,i.value),r(y,N)}function c(y,w){const N=()=>{if(["add","delBatch","expData","impData","downTmpl"].includes(w.name))w.visible=!1,y=="left"?i.value.configs.leftBtns=[...i.value.configs.leftBtns]:i.value.configs.rightBtns=[...i.value.configs.rightBtns];else if(y=="left"){const A=[];i.value.configs.leftBtns.forEach(O=>{O.name!=w.name&&A.push(O)}),i.value.configs.leftBtns=A}else{const A=[];i.value.configs.rightBtns.forEach(O=>{O.name!=w.name&&A.push(O)}),i.value.configs.rightBtns=A}};G.Modal.confirm({title:"确认信息",content:"请确定删除该工具?",onOk:()=>{N()}})}const h=n.ref(null);function f(y){h.value.open(y,w=>{w.visible=!0,Object.keys(w).forEach(N=>{y[N]=w[N]}),i.value.configs.operation.btns.sort((N,A)=>{const O=N.index||1,D=A.index||1;return O-D}),i.value.configs.operation.btns=[...i.value.configs.operation.btns]})}function u(){const y=i.value.configs.operation.btns.length+1;let w={title:"新增"+y,name:"new_"+y,index:y,size:"small",visible:!0,type:"default",props:{block:!1,ghost:!1,danger:!1},event:{clickScript:"",titleScript:"",disableScript:"",visibleScript:""}};i.value.configs.operation.btns.push(w),e.editor.widget(e.wid,i.value),h.value.open(w,N=>{Object.keys(N).forEach(A=>{w[A]=N[A]}),i.value.configs.operation.btns=[...i.value.configs.operation.btns]})}function p(y){const w=()=>{if(["delete","view","edit"].includes(y.name))y.visible=!1,i.value.configs.operation.btns=[...i.value.configs.operation.btns];else{const N=[];i.value.configs.operation.btns.forEach(A=>{A.name!=y.name&&N.push(A)}),i.value.configs.operation.btns=N}};G.Modal.confirm({title:"确认信息",content:"请确定删除该操作?",onOk:()=>{w()}})}const b=n.computed(()=>e.editor?.dataModel(i.value.dataModel||"none")||{}),k=n.computed(()=>b.value.fields?.length?(b.value.fields.forEach(y=>{y.show||(y.show={}),y.show.list||(y.show.list={})}),b.value.fields):[]),v={mounted:y=>y.focus()},C=n.ref({});function x(){const y=Object.keys(C.value);if(y.length)for(let w in y){const N=k.value.filter(A=>A.name==w);if(N&&N[0]){let A=C.value[w];Object.keys(A).forEach(O=>{N[0].show||(N[0].show={}),N[0].show.list||(N[0].show.list={}),O=="showIndex"?N[0].show.list.index=A[O]:O=="showWidth"?N[0].show.list.width=A[O]:O=="fixed"?N[0].show.list.fixed=A[O]:O=="align"?N[0].show.list.align=A[O]:N[0][O]=A[O]})}}C.value={}}function V(y,w){x();const N={};w=="showIndex"?N[w]=y.show?.list?.index:w=="showWidth"?N[w]=y.show?.list?.width:w=="fixed"?N[w]=y.show?.list?.fixed:w=="align"?N[w]=y.show?.list?.align:N[w]=y[w]||"",C.value[y.name]=N}function g(y,w){if(!y||!w){C.value={};return}const N=C.value[y.name][w];y.show||(y.show={}),y.show.list||(y.show.list={}),w=="showIndex"?y.show.list.index=N:w=="showWidth"?y.show.list.width=N:w=="fixed"?y.show.list.fixed=N:w=="align"?y.show.list.align=N:y[w]=N,C.value={}}function m(y,w){return w=="showIndex"?y.show?.list?.index:w=="showWidth"?y.show?.list?.width:w=="fixed"?y.show?.list?.fixed:w=="align"?y.show?.list?.align:y[w]}function S(y,w){k.value.filter(A=>A.name==y.name).forEach(A=>{A[w]=!A[w]})}const _=n.ref({options:[{value:"equle",label:"精确"},{value:"like",label:"模糊"},{value:"like-right",label:"右模糊"},{value:"like-left",label:"左模糊"},{value:"range",label:"范围"}],showLabel:y=>{const w=_.value.options.filter(N=>N.value==y);return w[0]?w[0].label:y}});return(y,w)=>{const N=n.resolveComponent("a-divider"),A=n.resolveComponent("CloseOutlined"),O=n.resolveComponent("a-button"),D=n.resolveComponent("PlusOutlined"),M=n.resolveComponent("a-input"),E=n.resolveComponent("a-form-item"),z=n.resolveComponent("a-col"),$=n.resolveComponent("a-input-number"),I=n.resolveComponent("a-checkbox"),K=n.resolveComponent("a-row"),L=n.resolveComponent("a-select"),B=n.resolveComponent("ToolOutlined"),Q=n.resolveComponent("a-table");return n.openBlock(),n.createElementBlock("div",sr,[n.createVNode(N,{orientation:"left"},{default:n.withCtx(()=>w[8]||(w[8]=[n.createTextVNode("工具设置")])),_:1}),n.createElementVNode("div",lr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,T=>(n.openBlock(),n.createBlock(O,n.mergeProps({key:T.name,class:["btn",T.name,!T.visible&&"deleted"],type:T.visible?T.type:"default",size:T.size,ref_for:!0},T.props||{},{onClick:j=>r("left",T)}),n.createSlots({default:n.withCtx(()=>[n.createTextVNode(" "+n.toDisplayString(T.title)+" ",1),T.visible?(n.openBlock(),n.createBlock(A,{key:0,class:"bool-del",onClick:n.withModifiers(j=>c("left",T),["stop"])},null,8,["onClick"])):n.createCommentVNode("",!0)]),_:2},[T.icon?{name:"icon",fn:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(T.icon)))]),key:"0"}:void 0]),1040,["class","type","size","onClick"]))),128)),n.createVNode(O,{class:n.normalizeClass(["btn","tool-add"]),size:"small",onClick:w[0]||(w[0]=T=>d("left"))},{default:n.withCtx(()=>[n.createVNode(D)]),_:1}),n.createVNode(O,{class:n.normalizeClass(["btn","tool-add","right"]),onClick:w[1]||(w[1]=T=>d("right")),size:"small"},{default:n.withCtx(()=>[n.createVNode(D)]),_:1}),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,T=>(n.openBlock(),n.createBlock(O,n.mergeProps({key:T.name,class:["btn","right",T.name,!T.visible&&"deleted"],type:T.visible?T.type:"default",size:T.size,ref_for:!0},T.props||{},{onClick:j=>r("right",T)}),n.createSlots({default:n.withCtx(()=>[n.createTextVNode(" "+n.toDisplayString(T.title)+" ",1),T.visible?(n.openBlock(),n.createBlock(A,{key:0,class:"bool-del",onClick:n.withModifiers(j=>c("right",T),["stop"])},null,8,["onClick"])):n.createCommentVNode("",!0)]),_:2},[T.icon?{name:"icon",fn:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(T.icon)))]),key:"0"}:void 0]),1040,["class","type","size","onClick"]))),128))]),n.createVNode(N,{orientation:"left"},{default:n.withCtx(()=>w[9]||(w[9]=[n.createTextVNode("操作设置")])),_:1}),i.value?.configs?.operation?(n.openBlock(),n.createBlock(K,{key:0},{default:n.withCtx(()=>[n.createVNode(z,{span:7},{default:n.withCtx(()=>[n.createVNode(E,{label:"操作标题"},{default:n.withCtx(()=>[n.createVNode(M,{value:i.value.configs.operation.title},null,8,["value"])]),_:1})]),_:1}),n.createVNode(z,{span:5},{default:n.withCtx(()=>[n.createVNode(E,{label:"显示宽度",labelCol:{span:9}},{default:n.withCtx(()=>[n.createVNode($,{value:i.value.configs.operation.width,"onUpdate:value":w[2]||(w[2]=T=>i.value.configs.operation.width=T)},null,8,["value"])]),_:1})]),_:1}),n.createVNode(z,{span:6},{default:n.withCtx(()=>[n.createVNode(E,{label:"显示按钮数量",labelCol:{span:9}},{default:n.withCtx(()=>[n.createVNode($,{value:i.value.configs.operation.count,"onUpdate:value":w[3]||(w[3]=T=>i.value.configs.operation.count=T)},null,8,["value"])]),_:1})]),_:1}),n.createVNode(z,{span:5},{default:n.withCtx(()=>[n.createVNode(E,{label:"是否显示"},{default:n.withCtx(()=>[n.createVNode(I,{checked:i.value.configs.operation.visible,"onUpdate:checked":w[4]||(w[4]=T=>i.value.configs.operation.visible=T)},null,8,["checked"])]),_:1})]),_:1})]),_:1})):n.createCommentVNode("",!0),n.createVNode(N,{orientation:"left"},{default:n.withCtx(()=>w[10]||(w[10]=[n.createTextVNode("操作按钮")])),_:1}),i.value?.configs?.operation?(n.openBlock(),n.createElementBlock("div",or,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.value.configs.operation.btns,T=>(n.openBlock(),n.createBlock(O,n.mergeProps({key:T.name,class:["btn",T.name,!T.visible&&"deleted"],type:T.visible?T.type:"default",size:T.size||"small",ref_for:!0},T.props||{},{onClick:j=>f(T)}),n.createSlots({default:n.withCtx(()=>[n.createTextVNode(" "+n.toDisplayString(T.title)+" ",1),T.visible?(n.openBlock(),n.createBlock(A,{key:0,class:"btn-del",onClick:n.withModifiers(j=>p(T),["stop"])},null,8,["onClick"])):n.createCommentVNode("",!0)]),_:2},[T.icon?{name:"icon",fn:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(T.icon)))]),key:"0"}:void 0]),1040,["class","type","size","onClick"]))),128)),n.createVNode(O,{class:n.normalizeClass(["btn","btn-add"]),onClick:w[5]||(w[5]=T=>u()),size:"small"},{default:n.withCtx(()=>[n.createVNode(D)]),_:1})])):n.createCommentVNode("",!0),n.createVNode(N,{orientation:"left"},{default:n.withCtx(()=>w[11]||(w[11]=[n.createTextVNode("表头设置")])),_:1}),w[12]||(w[12]=n.createTextVNode(" 数据模型:")),n.createVNode(L,{class:"data-model-list",options:s.value,value:i.value.dataModel,"onUpdate:value":w[6]||(w[6]=T=>i.value.dataModel=T)},null,8,["options","value"]),n.createVNode(Q,{columns:t.value,"data-source":k.value,bordered:"",scroll:{x:800},pagination:!1,"row-key":"name",size:"small"},{headerCell:n.withCtx(({column:T})=>[["showIndex","showWidth","align","fixed"].includes(T.key)?(n.openBlock(),n.createElementBlock("span",ar,[n.createVNode(B),n.createTextVNode(" "+n.toDisplayString(T.title),1)])):n.createCommentVNode("",!0)]),bodyCell:n.withCtx(({column:T,record:j})=>[["showIndex","showWidth"].includes(T.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",(!C.value[j.name]||!Object.keys(C.value[j.name]).includes(T.dataIndex))&&!m(j,T.dataIndex)&&"empty"]),onClick:he=>V(j,T.dataIndex)},[C.value[j.name]&&Object.keys(C.value[j.name]).includes(T.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock($,{key:0,value:C.value[j.name][T.dataIndex],"onUpdate:value":he=>C.value[j.name][T.dataIndex]=he,onBlur:he=>g(j,T.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[v]]):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(m(j,T.dataIndex)),1)],64))],10,rr)):["isList","isQuery","isSort"].includes(T.dataIndex)?(n.openBlock(),n.createElementBlock("div",dr,[n.createVNode(I,{checked:j[T.dataIndex],onClick:he=>S(j,T.dataIndex)},null,8,["checked","onClick"])])):["align","fixed"].includes(T.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["edit-field",(!C.value[j.name]||!Object.keys(C.value[j.name]).includes(T.dataIndex))&&!m(j,T.dataIndex)&&"empty"]),onClick:he=>V(j,T.dataIndex)},[C.value[j.name]&&Object.keys(C.value[j.name]).includes(T.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(L,{key:0,value:j.show.list[T.dataIndex],"onUpdate:value":he=>j.show.list[T.dataIndex]=he,allowClear:!0,options:T.options,onBlur:w[7]||(w[7]=he=>g())},null,8,["value","onUpdate:value","options"])),[[v]]):(n.openBlock(),n.createElementBlock("span",hr,n.toDisplayString(T.showLabel(T.options,m(j,T.dataIndex))),1))],10,cr)):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),n.createVNode(ai,{ref_key:"btnSetting",ref:h,preset:["edit","view","add","delBatch","expData","impData","downTmpl"]},null,512)])}}}),[["__scopeId","data-v-c966c24c"]]);function en(o){const e=o.toLowerCase().split("_"),t=[];t.push(e[0]);for(let i=1;i<e.length;i++){const s=e[i];s&&(t.push(s.charAt(0).toUpperCase()),s.length>1&&t.push(s.substring(1)))}return t.join("")}const ur={toHump:en},pr={class:"unione-table-tools"},mr={class:"unione-table-data"},gr={key:0,class:"unione-table-opts"},xs=Z(n.defineComponent({__name:"tableList",props:{wid:{type:String,required:!1},editor:{type:Object,required:!1},widget:{type:Object,required:!1},loading:{type:Boolean,default:!1},pagination:{type:Object,required:!1},dataList:{type:Array,default(){return[]}},rowKey:{type:String,default:"id"}},emits:["edit","view","add","delete","delBatch","expData","impData","downTmpl","leftBtnClick","rightBtnClick","optBtnClick","btnClick","change"],setup(o,{expose:e,emit:t}){const i=Me(),s=o,l=n.computed(()=>s.editor?.widget(s.wid)||s.widget||{}),a=n.computed(()=>l.value.props||{}),r=n.computed(()=>l.value.rowKey||s.rowKey||"id"),d=n.computed(()=>l.value.dsn?s.editor?.dataManager().use(l.value.dsn,"list"):null),c=n.computed(()=>{const O=s.dataList||[];return!O.length&&d.value?d.value.data()||[]:O}),h=n.computed(()=>{if(l.value.operation==!1)return{visible:!1};const O=W.utils.obj.ext(l.value.operation||{},{title:"操作",visible:!0,width:200,count:2,btns:[],more:{title:"更多",visible:!0,trigger:"hover",size:"small",layout:"horizontal",items:[]}}),D=[];let M=l.value.operation?.btns||[];if(M.forEach(E=>{D.push(E.name)}),D.includes("edit")||M.splice(0,0,{title:"编辑",name:"edit",type:"default",visible:!0}),D.includes("view")||M.splice(1,0,{title:"查看",name:"view",type:"default",visible:!0}),D.includes("delete")||M.push({title:"删除",name:"delete",type:"default",props:{danger:!0},visible:!0}),s.editor){const E=M.filter($=>$.name=="edit")[0];if(E.visible&&(E.action||(E.action={}),E.action.type||(E.action.type="route"),!E.action.href)){const $=(s.editor.sn().endsWith(":list")?s.editor.sn().substring(0,s.editor.sn().length-5):s.editor.sn())+":form",I=s.editor.model.value;E.action.href=i.editPageUrl+"?psn="+$+"&model="+I+"&id={row."+s.rowKey+"}"}const z=M.filter($=>$.name=="view")[0];if(z.visible&&(z.action||(z.action={}),z.action.type||(z.action.type="route"),!z.action.href)){const $=(s.editor.sn().endsWith(":list")?s.editor.sn().substring(0,s.editor.sn().length-5):s.editor.sn())+":form";z.action.href=i.viewPageUrl+"?psn="+$+"&model=view&id={row."+s.rowKey+"}"}}return M=M.filter(E=>E.visible!=!1).sort((E,z)=>{const $=E.index||1,I=z.index||1;return $-I}),O.count&&(M.length>O.count+1?(O.btns=M.slice(0,O.count),O.more.items=M.slice(O.count,M.length),O.more.visible=!0):(O.btns=M,O.more.visible=!1)),O}),f=n.computed(()=>{let O=[];l.value.columns?.length&&(O=[...l.value.columns]);const D=[];O.forEach((E,z)=>{E.dataIndex=E.name,E.convert&&(E.convertObj=new dt(E.convert)),E.sort?.enable&&(E.sorter=!0,E.sort.defoult&&(E.defaultSortOrder=E.sort.asc?"ascend":"descend")),E.customRender=({text:$})=>E.convertObj?E.convertObj.convert($)||$:$||"--",E.fkey?.enable&&(E.fkey.labelName&&(E.dataIndex=en(E.fkey.labelName)),E.fkey.labelTitle&&(E.title=E.fkey.labelTitle),E.customRender=({record:$,column:I})=>$&&$[I.name+"FEntry"]&&$[I.name+"FEntry"][I.dataIndex]||"--",E.fkey.fields?.forEach(($,I)=>{if(!$.name)return;const K=en($.name),L={fkName:E.name,title:$.title,name:K,dataIndex:$.name,width:$.width,index:$.index||z+I+1,customRender:({record:B,column:Q})=>{if(B&&B[Q.fkName+"FEntry"]){const T=B[Q.fkName+"FEntry"][Q.name];if(T)return $.convertObj&&$.convertObj.convert(T)||T}return"--"}};$.convert&&($.convertObj=new dt($.convert)),D.push(L)}))}),D.forEach(E=>{O.splice(E.index,0,E)});const M=W.utils.obj.ext(l.value.rownum,{title:"序号",fixed:"left",align:"center",width:60,visible:!0});return M&&M.visible!=!1&&(M.customRender=E=>x.value?(x.value.current-1)*x.value.pageSize+E.index+1:E.index,O=[M,...O]),h.value&&h.value.visible!=!1&&O.push({fixed:"right",align:"center",...h.value,name:"operation"}),O}),u=n.computed(()=>{if(l.value.leftBtns==!1)return[];const O=[],D=[];if((l.value.leftBtns||[]).forEach(E=>{E.visible!=!1&&O.push(E),D.push(E.name),E.name=="delBatch"&&!V.value&&(E.visible=!1)}),!D.includes("add")){const E={visible:!0,title:"新增",icon:"PlusOutlined",size:"small",index:0,type:"primary",props:{danger:!1,block:!1,ghost:!1},name:"add"};O.splice(0,0,E)}if(!D.includes("delBatch")&&V.value){const E={visible:!0,title:"批量删除",icon:"DeleteOutlined",size:"small",index:1,type:"primary",props:{danger:!0,block:!1,ghost:!1},name:"delBatch"};O.splice(1,0,E)}if(s.editor){const E=O.filter(z=>z.name=="add")[0];if(E.visible&&(E.action||(E.action={}),E.action.type||(E.action.type="route"),!E.action.href)){const z=(s.editor.sn().endsWith(":list")?s.editor.sn().substring(0,s.editor.sn().length-5):s.editor.sn())+":form",$=s.editor.model.value;E.action.href=i.addPageUrl+"?psn="+z+"&model="+$}}return O});function p({btn:O,event:D}){if(i.isDebug&&console.log("unione table left btn click",O,D),O.name=="delBatch"){if(!g.value.selectedRowKeys.length){G.Modal.info({title:"提示信息",content:"请选择要删除的记录!"});return}if(d.value){d.value.loadByIds(g.value.selectedRowKeys);return}G.Modal.confirm({title:"确认信息",content:"请确认是否要删除选中的("+g.value.selectedRowKeys.length+")数据",onOk:()=>{S("delBatch",{btn:O,event:D,keys:g.value.selectedRowKeys}),S("leftBtnClick",{btn:O,event:D,keys:g.value.selectedRowKeys}),S("btnClick",{btn:O,event:D,keys:g.value.selectedRowKeys})}});return}S(O.name,{btn:O,event:D}),S("leftBtnClick",{btn:O,event:D}),S("btnClick",{btn:O,event:D})}const b=n.computed(()=>{if(l.value.rightBtns==!1)return[];const O=[],D=[];if((l.value.rightBtns||[]).forEach(E=>{E.visible!=!1&&O.push(E),D.push(E.name)}),!D.includes("impData")){const E={visible:!0,title:"导入",icon:"CloudUploadOutlined",size:"small",index:1,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"impData"};O.splice(1,0,E)}if(!D.includes("expData")){const E={visible:!0,title:"导出",icon:"CloudUploadOutlined",size:"small",index:2,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"expData"};O.splice(2,0,E)}if(!D.includes("downTmpl")){const E={visible:!0,icon:"CloudDownloadOutlined",size:"small",title:"模版",index:3,type:"default",props:{danger:!1,block:!1,ghost:!1},name:"downTmpl"};O.splice(3,0,E)}return O});function k({btn:O,event:D}){i.isDebug&&console.log("unione table right btn click",O,D),S(O.name,{btn:O,event:D}),S("rightBtnClick",{btn:O,event:D}),S("btnClick",{btn:O,event:D})}const v=n.computed(()=>({bordered:!0,size:"small",...l.value.attrs||{}})),C=n.ref({}),x=n.computed(()=>W.utils.obj.ext(s.pagination||l.value.pagination,{showTotal:O=>"共"+O+"记录",pageSize:10,current:1,total:0,position:["bottomCenter"]})),V=n.computed(()=>typeof l.value.selection<"u"?l.value.selection:!0),g=n.ref({selectedRowKeys:[],selectedRowList:[],onChange:(O,D)=>{g.value.selectedRowKeys=O,g.value.selectedRowList=D},getCheckboxProps:O=>({disabled:O.checkable})}),m=["edit","view","add","delete","delBatch","impData","expData","downTmpl"],S=t;function _({btn:O,event:D},M){if(i.isDebug&&console.log("unione table opt btn click",O,D),O.name=="delete"){if(d.value){d.value.deleteByIds([M[r.value]]);return}G.Modal.confirm({title:"确认信息",content:"请确认是否要删除该记录?",onOk:()=>{S(O.name,{btn:O,event:D,row:M}),S("optBtnClick",{btn:O,event:D,row:M}),S("btnClick",{btn:O,event:D,row:M})}});return}S(O.name,{btn:O,event:D,row:M}),S("optBtnClick",{btn:O,event:D,row:M}),S("btnClick",{btn:O,event:D,row:M})}function y(O,D,M,E){N(),S("change",{pagination:O,filters:D,sorter:M,event:E})}function w(){G.Modal.confirm({title:"确认信息",content:`确定要清除当前选中的(${g.value.selectedRowKeys.length})条数据?`,centered:!0,onOk:()=>{g.value.selectedRowKeys=[],g.value.selectedRowList=[]}})}function N(){console.log("dataStorage.value",d.value),d.value?.find({body:C.value,page:x.value.current,pageSize:x.value.pageSize})}n.onMounted(()=>{s.editor?.ebus.$on("table-list-search",O=>{console.log("table-list-search",O),C.value=O||{},N()})});function A(){return{keys:g.value.selectedRowKeys,rows:g.value.selectedRowList}}return e({getSelected:A,clearSelected:w}),(O,D)=>{const M=n.resolveComponent("unione-btn"),E=n.resolveComponent("DownOutlined"),z=n.resolveComponent("a-button"),$=n.resolveComponent("a-dropdown"),I=n.resolveComponent("a-table");return n.openBlock(),n.createBlock(rt,{class:"unione-table-list",model:s.editor?.model.value,"setting-title":"列表设置"},n.createSlots({default:n.withCtx(()=>[n.createElementVNode("div",pr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.value,K=>(n.openBlock(),n.createBlock(M,{key:K.name,class:"btn",widget:K,editor:o.editor,onClick:p,preset:m,ctx:{sltKeys:g.value.selectedRowKeys,sltRows:g.value.selectedRowList}},null,8,["widget","editor","ctx"]))),128)),g.value.selectedRowKeys.length?(n.openBlock(),n.createElementBlock("span",{key:0,class:"selected-info",onClick:w},"当前选中记录("+n.toDisplayString(g.value.selectedRowKeys.length)+")",1)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(b.value,K=>(n.openBlock(),n.createBlock(M,{key:K.name,class:"btn right",widget:K,editor:o.editor,onClick:k,preset:m,ctx:{sltKeys:g.value.selectedRowKeys,sltRows:g.value.selectedRowList}},null,8,["widget","editor","ctx"]))),128))]),n.createElementVNode("div",mr,[f.value&&f.value.length?(n.openBlock(),n.createBlock(I,n.mergeProps({key:0,columns:f.value,rowKey:r.value,"data-source":c.value,"row-selection":V.value?g.value:null,scroll:{x:a.value.scrollX||"max-content",y:a.value.scrollY},pagination:x.value,onChange:y},v.value),{bodyCell:n.withCtx(({column:K,record:L})=>[K.name==="operation"?(n.openBlock(),n.createElementBlock("div",gr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(h.value.btns,B=>(n.openBlock(),n.createBlock(M,{key:B.name,class:"opt",widget:B,editor:o.editor,onClick:Q=>_(Q,L),preset:m,ctx:{row:L}},null,8,["widget","editor","onClick","ctx"]))),128)),h.value.more?.visible!=!1&&h.value.more.items?.length?(n.openBlock(),n.createBlock($,{key:0,trigger:[h.value.more.trigger||"hover"],class:n.normalizeClass(["opt-more",h.value.more.size||"small"])},{overlay:n.withCtx(()=>[n.createElementVNode("div",{class:n.normalizeClass(["opt-more-overlay",h.value.more.layout])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(h.value.more.items,B=>(n.openBlock(),n.createBlock(M,{key:B.name,class:"item",widget:B,editor:o.editor,onClick:Q=>_(Q,L),type:"text",preset:m,ctx:{row:L}},null,8,["widget","editor","onClick","ctx"]))),128))],2)]),default:n.withCtx(()=>[n.createVNode(z,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(h.value.more.title)+" ",1),n.createVNode(E)]),_:1})]),_:2},1032,["trigger","class"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]),_:1},16,["columns","rowKey","data-source","row-selection","scroll","pagination"])):n.createCommentVNode("",!0)])]),_:2},[s.editor&&s.wid?{name:"widget-setting",fn:n.withCtx(()=>[n.createVNode(fr,{editor:s.editor,wid:s.wid},null,8,["editor","wid"])]),key:"0"}:void 0]),1032,["model"])}}}),[["__scopeId","data-v-b75267b4"]]),kr={class:"page-setting-dialog"},ri=n.defineComponent({__name:"page",props:{settingTitle:{type:String,default:"页面设置"},editor:{type:Object,required:!1}},emits:["setting","saving"],setup(o,{emit:e}){const t=o,i=n.computed(()=>t.editor?.model?.value),s=W.useSession(),l=n.computed(()=>s.getPrincipal()),a=n.ref(!1);n.provide("closeSetting",()=>{t.editor?.save().then(u=>{a.value=!1})});function r(){a.value=!0}function d(){t.editor?.save().then(u=>{console.log("res",u)})}function c(){t.editor?.save().then(u=>{console.log("res",u)})}const h=n.ref("");function f(u){h.value||(h.value=i.value),u?t.editor?.setModel("edit"):t.editor?.setModel(h.value)}return(u,p)=>{const b=n.resolveComponent("SettingOutlined"),k=n.resolveComponent("a-tooltip"),v=n.resolveComponent("SaveOutlined"),C=n.resolveComponent("FormOutlined"),x=n.resolveComponent("StopOutlined"),V=n.resolveComponent("a-modal");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["unione-page",i.value])},[i.value=="edit"&&u.$slots["page-setting"]&&l.value?.userRoles?.includes("FORM-ADMIN")?(n.openBlock(),n.createBlock(k,{key:0,title:o.settingTitle},{default:n.withCtx(()=>[n.createVNode(b,{class:"page-setting",onClick:r})]),_:1},8,["title"])):n.createCommentVNode("",!0),i.value=="edit"&&u.$slots["page-setting"]&&l.value?.userRoles?.includes("FORM-ADMIN")?(n.openBlock(),n.createBlock(k,{key:1,title:"保存页面"},{default:n.withCtx(()=>[n.createVNode(v,{class:"btn-save",onClick:d})]),_:1})):n.createCommentVNode("",!0),i.value!="edit"&&l.value?.userRoles?.includes("FORM-ADMIN")?(n.openBlock(),n.createBlock(k,{key:2,title:"编辑页面"},{default:n.withCtx(()=>[n.createVNode(C,{class:"btn-edit",onClick:p[0]||(p[0]=g=>f(!0))})]),_:1})):n.createCommentVNode("",!0),i.value=="edit"&&u.$slots["page-setting"]&&l.value?.userRoles?.includes("FORM-ADMIN")?(n.openBlock(),n.createBlock(k,{key:3,title:"退出编辑"},{default:n.withCtx(()=>[n.createVNode(x,{class:"btn-edit",onClick:p[1]||(p[1]=g=>f(!1))})]),_:1})):n.createCommentVNode("",!0),n.renderSlot(u.$slots,"default"),i.value=="edit"?(n.openBlock(),n.createBlock(V,{key:4,title:t.settingTitle,open:a.value,"onUpdate:open":p[2]||(p[2]=g=>a.value=g),centered:"",width:"85%",onOk:c},{default:n.withCtx(()=>[n.createElementVNode("div",kr,[n.renderSlot(u.$slots,"page-setting")])]),_:3},8,["title","open"])):n.createCommentVNode("",!0)],2)}}}),br={class:"unione-props-setting data-field-manage"},wr={key:0},yr={key:1},xr={key:2},vr={key:3},Cr={key:4},Sr={key:5},Nr={key:6},Br=["onClick"],Or=["onClick"],Vr=["onClick"],_r={key:1},Ar=Z(n.defineComponent({__name:"dataFieldMange",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=n.ref([{title:"序号",dataIndex:"index",key:"index",width:"35px",fixed:"left",align:"center",customRender:({index:u})=>u+1},{title:"名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"标题",dataIndex:"title",key:"title",width:"100px",align:"center"},{title:"数据类型",dataIndex:"dataType",key:"dataType",width:"80px",align:"center"},{title:"长度",dataIndex:"dataLen",key:"dataLen",width:"60px",align:"center"},{title:"小数点",dataIndex:"dataPrec",key:"dataPrec",width:"60px",align:"center"},{title:"默认值",dataIndex:"defaultValue",key:"defaultValue",width:"60px",align:"center"},{title:"主键",dataIndex:"isPk",key:"isPk",width:"40px",align:"center"},{title:"外键",dataIndex:"isFk",key:"isFk",width:"30px",align:"center"},{title:"非空",dataIndex:"isNull",key:"isNull",width:"30px",align:"center"},{title:"同步",dataIndex:"syncDbEnable",key:"syncDbEnable",width:"30px",align:"center"},{title:"备注",dataIndex:"descs",key:"descs",width:"140px",align:"center"}]),t=n.useModel(o,"modelValue"),i=n.ref({selectedRowKeys:[],columnWidth:"25px",onChange:u=>{u.forEach(p=>{i.value.selectedRowKeys.includes(p)||i.value.selectedRowKeys.push(p);const b=[];t.value.forEach(k=>{!u.includes(k.name)&&i.value.selectedRowKeys.includes(k.name)&&b.push(k.name)}),b.length&&(i.value.selectedRowKeys=i.value.selectedRowKeys.filter(k=>!b.includes(k)))})}}),s={mounted:u=>u.focus()},l=n.ref({});function a(){const u=Object.keys(l.value);if(u.length)for(let p in u){const b=t.value.filter(k=>k.name==p);if(b&&b[0]){let k=l.value[p];Object.keys(k).forEach(v=>{b[0][v]=k[v]})}}l.value={}}function r(u,p){a();const b={};b[p]=u[p]||"",l.value[u.name]=b}function d(u,p){if(!u||!p){l.value={};return}const b=l.value[u.name][p];if(p=="name"&&t.value.filter(v=>v[p]==b&&v.name!=u.name).length>0){G.Modal.warn({title:"提示信息",content:"字段名称["+b+"]已存在"});return}u[p]=b,l.value={}}function c(u,p){t.value.filter(k=>k.name==u.name).forEach(k=>{k[p]=!k[p]})}function h(){if(a(),t.value.filter(b=>b.name=="new_").length>0){l.value.new_={name:"new_"};return}const p={title:"",name:"new_",isPk:!1};t.value.push(p),l.value[p.name]={name:"new_"}}function f(){if(!i.value.selectedRowKeys.length){G.Modal.info({title:"提示信息",content:"请选择要删除的字段!"});return}G.Modal.confirm({title:"确认信息",content:"确定要删除选中的["+i.value.selectedRowKeys.length+"]字段么?",onOk:()=>{t.value=t.value.filter(u=>!i.value.selectedRowKeys.includes(u.name)),i.value.selectedRowKeys=[]}})}return(u,p)=>{const b=n.resolveComponent("a-button"),k=n.resolveComponent("a-tooltip"),v=n.resolveComponent("a-input"),C=n.resolveComponent("a-input-number"),x=n.resolveComponent("a-select-option"),V=n.resolveComponent("a-select"),g=n.resolveComponent("a-checkbox"),m=n.resolveComponent("a-table");return n.openBlock(),n.createElementBlock("div",br,[n.createVNode(b,{class:"btn btn-add",type:"primary",onClick:h,size:"small"},{default:n.withCtx(()=>p[1]||(p[1]=[n.createTextVNode("新增")])),_:1}),n.createVNode(b,{class:"btn btn-delete",type:"primary",danger:"",onClick:f,size:"small"},{default:n.withCtx(()=>p[2]||(p[2]=[n.createTextVNode(" 删除 ")])),_:1}),n.createVNode(m,{columns:e.value,"data-source":t.value,pagination:!1,bordered:"","row-selection":i.value,scroll:{x:1150},"row-key":"name",size:"small",sticky:""},{headerCell:n.withCtx(({column:S})=>[S.key==="name"?(n.openBlock(),n.createElementBlock("span",wr,[p[3]||(p[3]=n.createElementVNode("span",{style:{color:"red","margin-right":"3px","font-size":"16px"}},"*",-1)),n.createVNode(n.unref(We.FormOutlined)),n.createTextVNode(" "+n.toDisplayString(S.title),1)])):n.createCommentVNode("",!0),S.key==="title"?(n.openBlock(),n.createElementBlock("span",yr,[p[4]||(p[4]=n.createElementVNode("span",{style:{color:"red","margin-right":"3px","font-size":"16px"}},"*",-1)),n.createVNode(n.unref(We.FormOutlined)),n.createTextVNode(" "+n.toDisplayString(S.title),1)])):n.createCommentVNode("",!0),S.key==="descs"?(n.openBlock(),n.createElementBlock("span",xr,[n.createVNode(n.unref(We.FormOutlined)),n.createTextVNode(" "+n.toDisplayString(S.title),1)])):n.createCommentVNode("",!0),S.key==="dataLen"?(n.openBlock(),n.createElementBlock("span",vr,[n.createVNode(n.unref(We.FormOutlined)),n.createTextVNode(" "+n.toDisplayString(S.title),1)])):n.createCommentVNode("",!0),S.key==="dataPrec"?(n.openBlock(),n.createElementBlock("span",Cr,[n.createVNode(n.unref(We.FormOutlined)),n.createTextVNode(" "+n.toDisplayString(S.title),1)])):n.createCommentVNode("",!0),S.key==="defaultValue"?(n.openBlock(),n.createElementBlock("span",Sr,[n.createVNode(n.unref(We.FormOutlined)),n.createTextVNode(" "+n.toDisplayString(S.title),1)])):n.createCommentVNode("",!0),S.key==="dataType"?(n.openBlock(),n.createElementBlock("span",Nr,[n.createVNode(n.unref(We.FormOutlined)),n.createTextVNode(" "+n.toDisplayString(S.title),1)])):n.createCommentVNode("",!0),S.key==="isPk"?(n.openBlock(),n.createBlock(k,{key:7,title:"至少配置一个主键字段"},{default:n.withCtx(()=>[p[5]||(p[5]=n.createElementVNode("span",{style:{color:"red","margin-right":"3px","font-size":"16px"}},"*",-1)),n.createTextVNode(n.toDisplayString(S.title),1)]),_:2},1024)):n.createCommentVNode("",!0),S.key==="isFk"?(n.openBlock(),n.createBlock(k,{key:8,title:"是否是外键字段"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(S.title),1)]),_:2},1024)):n.createCommentVNode("",!0),S.key==="isNull"?(n.openBlock(),n.createBlock(k,{key:9,title:"是否允许为空"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(S.title),1)]),_:2},1024)):n.createCommentVNode("",!0),S.key==="syncDbEnable"?(n.openBlock(),n.createBlock(k,{key:10,title:"是否同步到数据库"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(S.title),1)]),_:2},1024)):n.createCommentVNode("",!0)]),bodyCell:n.withCtx(({column:S,text:_,record:y})=>[["name","title","descs","defaultValue"].includes(S.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",(!l.value[y.name]||!Object.keys(l.value[y.name]).includes(S.dataIndex))&&!_&&"empty"]),onClick:w=>r(y,S.dataIndex)},[l.value[y.name]&&Object.keys(l.value[y.name]).includes(S.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(v,{key:0,value:l.value[y.name][S.dataIndex],"onUpdate:value":w=>l.value[y.name][S.dataIndex]=w,onBlur:w=>d(y,S.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[s]]):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(_||" "),1)],64))],10,Br)):n.createCommentVNode("",!0),["dataLen","dataPrec"].includes(S.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["edit-field",(!l.value[y.name]||!Object.keys(l.value[y.name]).includes(S.dataIndex))&&!_&&"empty"]),onClick:w=>r(y,S.dataIndex)},[l.value[y.name]&&Object.keys(l.value[y.name]).includes(S.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(C,{key:0,value:l.value[y.name][S.dataIndex],"onUpdate:value":w=>l.value[y.name][S.dataIndex]=w,onBlur:w=>d(y,S.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[s]]):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(_||" "),1)],64))],10,Or)):["dataType"].includes(S.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["edit-field",(!l.value[y.name]||!Object.keys(l.value[y.name]).includes(S.dataIndex))&&!_&&"empty"]),onClick:w=>r(y,S.dataIndex)},[l.value[y.name]&&Object.keys(l.value[y.name]).includes(S.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(V,{key:0,value:y[S.dataIndex],"onUpdate:value":w=>y[S.dataIndex]=w,onBlur:p[0]||(p[0]=w=>d())},{default:n.withCtx(()=>[n.createVNode(x,{key:"String",value:"String"}),n.createVNode(x,{key:"Long",value:"Long"}),n.createVNode(x,{key:"Short",value:"Short"}),n.createVNode(x,{key:"Integer",value:"Integer"}),n.createVNode(x,{key:"Float",value:"Float"}),n.createVNode(x,{key:"Double",value:"Double"}),n.createVNode(x,{key:"Date",value:"Date"}),n.createVNode(x,{key:"Timestamp",value:"Timestamp"})]),_:2},1032,["value","onUpdate:value"])),[[s]]):(n.openBlock(),n.createElementBlock("span",_r,n.toDisplayString(_),1))],10,Vr)):["syncDbEnable","isFk","isPk"].includes(S.dataIndex)?(n.openBlock(),n.createBlock(g,{key:3,checked:y[S.dataIndex],onClick:w=>c(y,S.dataIndex)},null,8,["checked","onClick"])):["isNull"].includes(S.dataIndex)?(n.openBlock(),n.createBlock(g,{key:4,checked:!y[S.dataIndex],onClick:w=>c(y,S.dataIndex)},null,8,["checked","onClick"])):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source","row-selection"])])}}}),[["__scopeId","data-v-f6307a23"]]),Tr={class:"unione-props-setting data-field-setting"},Mr={key:0},Er=["onClick"],Ir={class:"field-txt"},Dr=["onClick"],Pr={key:1,class:"field-txt"},$r=["onClick"],Fr={key:1},Rr=["onClick"],Lr={key:0,class:"field-txt"},jr={key:4,class:"edit-field"},zr={key:0},qr=["onClick"],Ur=Z(n.defineComponent({__name:"dataFieldSetting",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=n.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:C})=>C+1},{title:"字段名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"字段标题",dataIndex:"title",key:"title",width:"90px",align:"center"},{title:"控件类型",dataIndex:"widget",key:"widget",width:"60px",align:"center"},{title:"验证规则",dataIndex:"rules",key:"rules",width:"60px",align:"center"},{title:"表单",dataIndex:"isForm",key:"isForm",width:"40px",align:"center"},{title:"详情",dataIndex:"isView",key:"isView",width:"40px",align:"center"},{title:"列表",dataIndex:"isList",key:"isList",width:"40px",align:"center"},{title:"排序",dataIndex:"isSort",key:"isSort",width:"40px",align:"center"},{title:"查询",dataIndex:"isQuery",key:"isQuery",width:"40px",align:"center"},{title:"查询类型",dataIndex:"queryType",key:"queryType",width:"60px",align:"center"},{title:"转换器",dataIndex:"convertName",key:"convertName",width:"50px",align:"center"}]),t=n.useModel(o,"modelValue"),i={mounted:C=>C.focus()},s=n.ref({});function l(){const C=Object.keys(s.value);if(C.length)for(let x in C){const V=t.value.filter(g=>g.name==x);if(V&&V[0]){let g=s.value[x];Object.keys(g).forEach(m=>{m=="convertName"?(V[0].convert||(V[0].convert={}),V[0].convert.type=g[m]):V[0][m]=g[m]})}}s.value={}}function a(C,x){l();const V={};x=="convertName"?(C.convert||(C.convert={}),V[x]=C.convert?.type):V[x]=C[x]||"",s.value[C.name]=V}function r(C,x){{s.value={};return}}function d(C,x){t.value.filter(g=>g.name==C.name).forEach(g=>{g[x]=!g[x]})}const c=n.ref({title:"列头设置",prop:"isList",visible:!1,field:{},show:{},toSetting:()=>{c.value.visible=!1}});function h(C,x){const V=t.value.filter(m=>m.name==C.name);V.forEach(m=>{x!="isSort"?m[x]=!0:m[x]=!m[x]});const g=V[0];if(!(!g||x=="isSort")){switch(c.value.prop=x,c.value.field=C,g.show||(g.show={}),x){case"isQuery":g.show.query||(g.show.query={}),c.value.show=g.show.query,c.value.title=`查询设置/${C.title}(${C.name})`;break;case"isForm":g.show.form||(g.show.form={}),c.value.show=g.show.form,c.value.title=`表单设置/${C.title}(${C.name})`;break;case"isView":g.show.view||(g.show.view={}),c.value.show=g.show.view,c.value.title=`详情设置/${C.title}(${C.name})`;break;case"isList":g.show.list||(g.show.list={}),c.value.show=g.show.list,c.value.title=`列头设置/${C.title}(${C.name})`;break}c.value.visible=!0}}const f=n.ref({options:[{value:"keywords",label:"关键字"},{value:"equle",label:"精确"},{value:"like",label:"模糊"},{value:"like-right",label:"右模糊"},{value:"like-left",label:"左模糊"},{value:"range",label:"范围"}],showLabel:C=>{const x=f.value.options.filter(V=>V.value==C);return x[0]?x[0].label:C}}),u=n.ref({visible:!1,field:{},props:{},showInfo:C=>{let x="";return C.rules&&(x=C.rules.filter(V=>V.enable).length||""),x&&(x="("+x+")"),x},toSetting:()=>{const C=u.value.props,x={name:"range",trigger:C.trigger,whitespace:C.whitespace,message:C.rangeMessage};C.rangeMin!=null&&C.rangeMin!=null&&(x.min=C.rangeMin,x.enable=!0),C.rangeMax!=null&&C.rangeMax!=null&&(x.max=C.rangeMax,x.enable=!0);const V={name:"reg",trigger:C.trigger,whitespace:C.whitespace,message:C.regMessage};C.regExpress&&(V.pattern=C.regExpress,V.enable=!0),u.value.field.rules=[x,V],u.value.visible=!1,u.value.props={},console.log("rule",u.value.field.rules)}});function p(C){u.value.visible=!0,u.value.field=C;const x=C.rules||[],V={trigger:"change",whitespace:!0};x.forEach(g=>{g.name=="reg"&&(V.trigger=g.trigger,V.whitespace=g.whitespace,V.regExpress=g.pattern,V.regMessage=g.message),g.name=="range"&&(V.rangeMin=g.min,V.rangeMax=g.max,V.rangeMessage=g.message)}),u.value.props=V}const b=n.ref({visible:!1,field:{},props:{},widgets:[{value:"a-input",label:"文本框"},{value:"a-textarea",label:"文本域"},{value:"a-input",label:"文本框"},{value:"a-checkbox",label:"多选框"},{value:"a-radio",label:"单选框"},{value:"a-input-number",label:"数值框"},{value:"a-select",label:"下拉框"},{value:"a-tree-select",label:"下拉树"},{value:"a-date-picker",label:"日期框"},{value:"a-input-password",label:"密码框"},{value:"a-input-search",label:"搜索框"},{value:"a-upload",label:"文件框"},{value:"unione-avatar",label:"头像框",disabled:!0},{value:"unione-picture-card",label:"照片墙"},{value:"a-switch",label:"开关"},{value:"a-slider",label:"滑块"}],widgetName:C=>{const x=b.value.widgets.filter(V=>V.value==C);return x[0]?x[0].label:C},toSetting:()=>{}}),k=n.ref({visible:!1,field:{},convert:{},optionColumn:[{title:"选项标题",dataIndex:"label"},{title:"选项值",dataIndex:"value"},{title:"操作",dataIndex:"action",width:"20%"}],toAddOption:()=>{k.value.convert.options||(k.value.convert.options=[]),k.value.convert.options.push({label:"",value:""})},toDelOption:(C,x)=>{k.value.convert.options.splice(C,1)},toSetting:()=>{k.value.visible=!1}});function v(C){k.value.visible=!0,k.value.field=C,k.value.convert=C.convert||{}}return(C,x)=>{const V=n.resolveComponent("ToolOutlined"),g=n.resolveComponent("a-button"),m=n.resolveComponent("a-select"),S=n.resolveComponent("a-checkbox"),_=n.resolveComponent("a-table"),y=n.resolveComponent("a-input-number"),w=n.resolveComponent("a-form-item"),N=n.resolveComponent("a-input"),A=n.resolveComponent("a-form"),O=n.resolveComponent("a-modal"),D=n.resolveComponent("a-col"),M=n.resolveComponent("a-row"),E=n.resolveComponent("a-select-option"),z=n.resolveComponent("a-divider"),$=n.resolveComponent("a-checkbox-group");return n.openBlock(),n.createElementBlock("div",Tr,[n.createVNode(_,{columns:e.value,"data-source":t.value,bordered:"",scroll:{x:1e3},pagination:!1,"row-key":"name",size:"small"},{headerCell:n.withCtx(({column:I})=>[["widget","queryType","rules","convertName"].includes(I.key)?(n.openBlock(),n.createElementBlock("span",Mr,[n.createVNode(V),n.createTextVNode(" "+n.toDisplayString(I.title),1)])):n.createCommentVNode("",!0)]),bodyCell:n.withCtx(({column:I,text:K,record:L})=>[["rules"].includes(I.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",!u.value.showInfo(L)&&"empty"]),onClick:B=>p(L)},[n.createElementVNode("span",Ir,n.toDisplayString(u.value.showInfo(L)),1),u.value.showInfo(L)?(n.openBlock(),n.createBlock(g,{key:0,type:"link"},{default:n.withCtx(()=>x[22]||(x[22]=[n.createTextVNode("设置")])),_:1})):n.createCommentVNode("",!0)],10,Er)):["widget"].includes(I.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["edit-field",(!s.value[L.name]||!Object.keys(s.value[L.name]).includes(I.dataIndex))&&!K&&"empty"]),onClick:B=>a(L,I.dataIndex)},[s.value[L.name]&&Object.keys(s.value[L.name]).includes(I.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(m,{key:0,value:L[I.dataIndex],"onUpdate:value":B=>L[I.dataIndex]=B,allowClear:!0,options:b.value.widgets,onBlur:x[0]||(x[0]=B=>r())},null,8,["value","onUpdate:value","options"])),[[i]]):(n.openBlock(),n.createElementBlock("span",Pr,n.toDisplayString(b.value.widgetName(K)),1))],10,Dr)):["queryType"].includes(I.dataIndex)?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[L.isQuery?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",(!s.value[L.name]||!Object.keys(s.value[L.name]).includes(I.dataIndex))&&!K&&"empty"]),onClick:B=>a(L,I.dataIndex)},[s.value[L.name]&&Object.keys(s.value[L.name]).includes(I.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(m,{key:0,value:L[I.dataIndex],"onUpdate:value":B=>L[I.dataIndex]=B,allowClear:!0,options:f.value.options,onBlur:x[1]||(x[1]=B=>r())},null,8,["value","onUpdate:value","options"])),[[i]]):(n.openBlock(),n.createElementBlock("span",Fr,n.toDisplayString(f.value.showLabel(K)),1))],10,$r)):n.createCommentVNode("",!0)],64)):["convertName"].includes(I.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(["edit-field",(!s.value[L.name]||!Object.keys(s.value[L.name]).includes(I.dataIndex))&&!L.convert?.type&&"empty"]),onClick:B=>a(L,I.dataIndex)},[s.value[L.name]&&Object.keys(s.value[L.name]).includes(I.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(m,{key:0,value:L.convert.type,"onUpdate:value":B=>L.convert.type=B,options:[{value:"dict",label:"字典"},{value:"option",label:"静态"}],allowClear:!0,onBlur:x[2]||(x[2]=B=>r())},null,8,["value","onUpdate:value"])),[[i]]):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[L.convert?.type?(n.openBlock(),n.createElementBlock("span",Lr,n.toDisplayString(L.convert.type=="dict"?"字典":"静态"),1)):n.createCommentVNode("",!0),L.convert?.type?(n.openBlock(),n.createBlock(g,{key:1,type:"link",onClick:n.withModifiers(B=>v(L),["stop"])},{default:n.withCtx(()=>x[23]||(x[23]=[n.createTextVNode("设置")])),_:2},1032,["onClick"])):n.createCommentVNode("",!0)],64))],10,Rr)):["isQuery","isForm","isView","isList","isSort"].includes(I.dataIndex)?(n.openBlock(),n.createElementBlock("div",jr,[n.createVNode(S,{checked:L[I.dataIndex],onClick:B=>d(L,I.dataIndex)},null,8,["checked","onClick"]),n.createVNode(g,{type:"link",onClick:B=>h(L,I.dataIndex)},{default:n.withCtx(()=>x[24]||(x[24]=[n.createTextVNode("设置")])),_:2},1032,["onClick"])])):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),n.createVNode(O,{visible:c.value.visible,"onUpdate:visible":x[9]||(x[9]=I=>c.value.visible=I),title:c.value.title,onOk:c.value.toSetting},{default:n.withCtx(()=>[n.createVNode(A,{model:c.value.show,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off"},{default:n.withCtx(()=>[n.createVNode(w,{label:"显示顺序"},{default:n.withCtx(()=>[n.createVNode(y,{value:c.value.show.index,"onUpdate:value":x[3]||(x[3]=I=>c.value.show.index=I)},null,8,["value"])]),_:1}),["isQuery"].includes(c.value.prop)?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(w,{key:0,label:"显示宽度"},{default:n.withCtx(()=>[n.createVNode(N,{value:c.value.show.width,"onUpdate:value":x[4]||(x[4]=I=>c.value.show.width=I)},null,8,["value"])]),_:1})),["isForm","isView"].includes(c.value.prop)?(n.openBlock(),n.createBlock(w,{key:1,label:"标题宽度"},{default:n.withCtx(()=>[n.createVNode(N,{value:c.value.show.labelWidth,"onUpdate:value":x[5]||(x[5]=I=>c.value.show.labelWidth=I)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["isForm","isView"].includes(c.value.prop)?(n.openBlock(),n.createBlock(w,{key:2,label:"控件宽度"},{default:n.withCtx(()=>[n.createVNode(N,{value:c.value.show.valueWidth,"onUpdate:value":x[6]||(x[6]=I=>c.value.show.valueWidth=I)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["isList"].includes(c.value.prop)?(n.openBlock(),n.createBlock(w,{key:3,label:"固定位置"},{default:n.withCtx(()=>[n.createVNode(m,{value:c.value.show.fixed,"onUpdate:value":x[7]||(x[7]=I=>c.value.show.fixed=I),options:[{value:"",label:"无"},{value:"left",label:"靠左"},{value:"right",label:"靠右"}]},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["isList"].includes(c.value.prop)?(n.openBlock(),n.createBlock(w,{key:4,label:"对齐方式"},{default:n.withCtx(()=>[n.createVNode(m,{value:c.value.show.align,"onUpdate:value":x[8]||(x[8]=I=>c.value.show.align=I),options:[{value:"left",label:"左对齐"},{value:"center",label:"居中"},{value:"right",label:"右对齐"}]},null,8,["value"])]),_:1})):n.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["visible","title","onOk"]),n.createVNode(O,{visible:k.value.visible,"onUpdate:visible":x[11]||(x[11]=I=>k.value.visible=I),title:k.value.convert.type=="dict"?"字典设置":"选项设置",onOk:k.value.toSetting},{default:n.withCtx(()=>[k.value.convert.type!="dict"?(n.openBlock(),n.createElementBlock("div",zr,[n.createVNode(g,{class:"editable-add-btn",style:{"margin-bottom":"8px"},onClick:k.value.toAddOption},{default:n.withCtx(()=>x[25]||(x[25]=[n.createTextVNode("新增")])),_:1},8,["onClick"]),n.createVNode(_,{columns:k.value.optionColumn,"data-source":k.value.convert.options,size:"small"},{bodyCell:n.withCtx(({column:I,text:K,record:L,index:B})=>[I.dataIndex==="label"?(n.openBlock(),n.createBlock(N,{key:0,value:L.label,"onUpdate:value":Q=>L.label=Q,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):n.createCommentVNode("",!0),I.dataIndex==="value"?(n.openBlock(),n.createBlock(N,{key:1,value:L.value,"onUpdate:value":Q=>L.value=Q,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):n.createCommentVNode("",!0),I.dataIndex==="action"?(n.openBlock(),n.createElementBlock("a",{key:2,onClick:Q=>k.value.toDelOption(B,L)},"删除",8,qr)):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source"])])):n.createCommentVNode("",!0),k.value.convert.type=="dict"?(n.openBlock(),n.createBlock(A,{key:1,model:k.value.convert,name:"basic","label-col":{span:8},"wrapper-col":{span:16},autocomplete:"off"},{default:n.withCtx(()=>[n.createVNode(M,{type:"flex",style:{width:"100%"}},{default:n.withCtx(()=>[n.createVNode(D,{span:24,order:1},{default:n.withCtx(()=>[n.createVNode(w,{label:"字典名称:"},{default:n.withCtx(()=>[n.createVNode(N,{value:k.value.convert.dict,"onUpdate:value":x[10]||(x[10]=I=>k.value.convert.dict=I)},null,8,["value"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])):n.createCommentVNode("",!0)]),_:1},8,["visible","title","onOk"]),n.createVNode(O,{visible:b.value.visible,"onUpdate:visible":x[13]||(x[13]=I=>b.value.visible=I),title:"控件设置",onOk:b.value.toSetting},{default:n.withCtx(()=>[n.createVNode(A,{model:b.value.props,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off"},{default:n.withCtx(()=>[b.value.field.widget=="a-select"?(n.openBlock(),n.createBlock(w,{key:0,label:"下拉框类型"},{default:n.withCtx(()=>[n.createVNode(m,{value:b.value.props.mode,"onUpdate:value":x[12]||(x[12]=I=>b.value.props.mode=I),allowClear:!0},{default:n.withCtx(()=>[n.createVNode(E,{value:"multiple"},{default:n.withCtx(()=>x[26]||(x[26]=[n.createTextVNode("多选")])),_:1}),n.createVNode(E,{value:"tags"},{default:n.withCtx(()=>x[27]||(x[27]=[n.createTextVNode("标签")])),_:1})]),_:1},8,["value"])]),_:1})):n.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["visible","onOk"]),n.createVNode(O,{visible:u.value.visible,"onUpdate:visible":x[21]||(x[21]=I=>u.value.visible=I),title:"规则设置",onOk:u.value.toSetting},{default:n.withCtx(()=>[n.createVNode(A,{model:u.value.props,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off",class:"form-mix"},{default:n.withCtx(()=>[n.createVNode(z,{orientation:"left"},{default:n.withCtx(()=>x[28]||(x[28]=[n.createTextVNode("基本设置")])),_:1}),n.createVNode(w,{label:"触发时机"},{default:n.withCtx(()=>[n.createVNode($,{value:u.value.props.trigger,"onUpdate:value":x[14]||(x[14]=I=>u.value.props.trigger=I),options:["change","blur"]},null,8,["value"])]),_:1}),u.value.field.isNull?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(w,{key:0,label:"忽略空格",class:"checkbox-tips"},{default:n.withCtx(()=>[n.createVNode(S,{value:u.value.props.whitespace,"onUpdate:value":x[15]||(x[15]=I=>u.value.props.whitespace=I),checked:u.value.props.whitespace},{default:n.withCtx(()=>x[29]||(x[29]=[n.createTextVNode(" 必填验证开启时,是否忽略空格 ")])),_:1},8,["value","checked"])]),_:1})),n.createVNode(z,{orientation:"left"},{default:n.withCtx(()=>x[30]||(x[30]=[n.createTextVNode("数值区间")])),_:1}),n.createVNode(w,{label:"有效区间"},{default:n.withCtx(()=>[n.createVNode(y,{value:u.value.props.rangeMin,"onUpdate:value":x[16]||(x[16]=I=>u.value.props.rangeMin=I)},null,8,["value"]),x[31]||(x[31]=n.createElementVNode("span",{style:{margin:"auto 5px"}},null,-1)),n.createVNode(y,{value:u.value.props.rangeMax,"onUpdate:value":x[17]||(x[17]=I=>u.value.props.rangeMax=I)},null,8,["value"])]),_:1}),n.createVNode(w,{label:"错误提示"},{default:n.withCtx(()=>[n.createVNode(N,{value:u.value.props.rangeMessage,"onUpdate:value":x[18]||(x[18]=I=>u.value.props.rangeMessage=I)},null,8,["value"])]),_:1}),n.createVNode(z,{orientation:"left"},{default:n.withCtx(()=>x[32]||(x[32]=[n.createTextVNode("正则验证")])),_:1}),n.createVNode(w,{label:"表达式"},{default:n.withCtx(()=>[n.createVNode(N,{value:u.value.props.regExpress,"onUpdate:value":x[19]||(x[19]=I=>u.value.props.regExpress=I)},null,8,["value"])]),_:1}),n.createVNode(w,{label:"错误提示"},{default:n.withCtx(()=>[n.createVNode(N,{value:u.value.props.regMessage,"onUpdate:value":x[20]||(x[20]=I=>u.value.props.regMessage=I)},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["visible","onOk"])])}}}),[["__scopeId","data-v-ef9b9849"]]),Wr={class:"unione-props-setting data-field"},Hr=Z(n.defineComponent({__name:"dataField",props:n.mergeModels({filter:{type:Array,default(){return[]}}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const e=n.useModel(o,"modelValue");return(t,i)=>{const s=n.resolveComponent("OrderedListOutlined"),l=n.resolveComponent("a-tab-pane"),a=n.resolveComponent("ToolOutlined"),r=n.resolveComponent("a-tabs");return n.openBlock(),n.createElementBlock("div",Wr,[n.createVNode(r,null,{default:n.withCtx(()=>[n.createVNode(l,{key:"field-mange"},{tab:n.withCtx(()=>[n.createVNode(s),i[2]||(i[2]=n.createTextVNode("字段管理 "))]),default:n.withCtx(()=>[n.createVNode(Ar,{modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=d=>e.value=d)},null,8,["modelValue"])]),_:1}),n.createVNode(l,{key:"field-setting"},{tab:n.withCtx(()=>[n.createVNode(a),i[3]||(i[3]=n.createTextVNode("字段设置 "))]),default:n.withCtx(()=>[n.createVNode(Ur,{modelValue:e.value,"onUpdate:modelValue":i[1]||(i[1]=d=>e.value=d)},null,8,["modelValue"])]),_:1})]),_:1})])}}}),[["__scopeId","data-v-008d1148"]]),Kr={key:0,class:"data-model-list"},Qr=["onClick"],Gr=Z(n.defineComponent({__name:"dataDefine",props:{limit:{type:Number,default:100},editor:{type:Object,required:!0}},setup(o,{expose:e}){const t=n.computed(()=>s.editor.dataModels()),i=n.ref({sn:"new_",title:"新建数据",fields:[]});n.onMounted(()=>{t.value&&t.value[0]&&(i.value=t.value[0])});const s=o;function l(f){i.value=f}function a(){if(t.value.length>=s.limit){G.Modal.warn({title:"提示信息",content:"数据模型数量超出限制!"});return}const f=ia.v4(),u={sn:f,title:"新建数据",name:"new_",fields:[]};i.value=u,console.log("data model added",u),s.editor.dataModel(f,u)}const r={title:[{required:!0,message:"数据标题不能为空",trigger:"change"}],name:[{required:!0,message:"数据名称不能为空",trigger:"change"}],url:[{required:!0,message:"数据URl不能为空",trigger:"change"}]},d=n.ref(),c=n.inject("closeSetting");function h(){d.value.validate().then(f=>{c&&c()})}return e({toSaving:h}),(f,u)=>{const p=n.resolveComponent("a-input"),b=n.resolveComponent("a-form-item"),k=n.resolveComponent("a-textarea"),v=n.resolveComponent("a-form");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["unione-props-setting","data-define",s.limit<=1&&"center"])},[s.limit>1?(n.openBlock(),n.createElementBlock("div",Kr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.value,C=>(n.openBlock(),n.createElementBlock("div",{key:C.sn,class:n.normalizeClass(["title",i.value&&i.value.sn==C.sn&&"slt"]),onClick:x=>l(C)},n.toDisplayString(C.title),11,Qr))),128)),n.createElementVNode("div",{class:"title btn-add",onClick:a},"+")])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["data-model-form",s.limit<=1&&"center"])},[n.createVNode(v,{ref_key:"formObj",ref:d,rules:r,model:i.value,"label-col":{span:4},"wrapper-col":{span:20}},{default:n.withCtx(()=>[n.createVNode(b,{label:"数据标题",name:"title",required:""},{default:n.withCtx(()=>[n.createVNode(p,{value:i.value.title,"onUpdate:value":u[0]||(u[0]=C=>i.value.title=C)},null,8,["value"])]),_:1}),n.createVNode(b,{label:"数据名称",name:"name",required:""},{default:n.withCtx(()=>[n.createVNode(p,{value:i.value.name,"onUpdate:value":u[1]||(u[1]=C=>i.value.name=C)},null,8,["value"])]),_:1}),n.createVNode(b,{label:"数据URL",name:"url",required:"",tooltip:"数据请求url,统一使用post请求,保存接口:url/save,修改接口:url/update,查询接口:url/find,删除接口:url/delete,详情接口:url/detail"},{default:n.withCtx(()=>[n.createVNode(p,{value:i.value.url,"onUpdate:value":u[2]||(u[2]=C=>i.value.url=C)},null,8,["value"])]),_:1}),n.createVNode(b,{label:"数据说明",name:"descs"},{default:n.withCtx(()=>[n.createVNode(k,{value:i.value.descs,"onUpdate:value":u[3]||(u[3]=C=>i.value.descs=C)},null,8,["value"])]),_:1})]),_:1},8,["model"]),n.createVNode(Hr,{modelValue:i.value.fields,"onUpdate:modelValue":u[4]||(u[4]=C=>i.value.fields=C)},null,8,["modelValue"])],2)],2)}}}),[["__scopeId","data-v-6be2cc50"]]),Yr={class:"unione-props-setting unione-page-setting"},di=Z(n.defineComponent({__name:"pageSetting",props:{editor:{type:Object,required:!0}},setup(o){const e=o,t=n.ref({});return n.onMounted(()=>{t.value=e.editor.define.value}),(i,s)=>{const l=n.resolveComponent("a-form-item"),a=n.resolveComponent("a-input"),r=n.resolveComponent("a-switch"),d=n.resolveComponent("a-textarea"),c=n.resolveComponent("a-form"),h=n.resolveComponent("a-tab-pane"),f=n.resolveComponent("a-tabs");return n.openBlock(),n.createElementBlock("div",Yr,[n.createVNode(f,{type:"card"},{default:n.withCtx(()=>[n.createVNode(h,{key:"pageDefine",tab:"页面设置"},{default:n.withCtx(()=>[n.createVNode(c,{model:t.value,name:"basic","label-col":{span:5},"wrapper-col":{span:16},autocomplete:"off",class:"form-mix"},{default:n.withCtx(()=>[t.value.sn&&t.value.sn!="new_"?(n.openBlock(),n.createBlock(l,{key:0,label:"页面编码"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(t.value.sn)+"/V"+n.toDisplayString(t.value.vers),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(l,{label:"页面标题",required:""},{default:n.withCtx(()=>[n.createVNode(a,{value:t.value.title,"onUpdate:value":s[0]||(s[0]=u=>t.value.title=u)},null,8,["value"])]),_:1}),n.createVNode(l,{label:"页面组件",required:""},{default:n.withCtx(()=>[n.createVNode(a,{value:t.value.component,"onUpdate:value":s[1]||(s[1]=u=>t.value.component=u)},null,8,["value"])]),_:1}),n.createVNode(l,{label:"icon图标"},{default:n.withCtx(()=>[n.createVNode(a,{value:t.value.icon,"onUpdate:value":s[2]||(s[2]=u=>t.value.icon=u)},null,8,["value"])]),_:1}),n.createVNode(l,{label:"是否全局"},{default:n.withCtx(()=>[n.createVNode(r,{checked:t.value.isGlobal,"onUpdate:checked":s[3]||(s[3]=u=>t.value.isGlobal=u),checkedValue:1,checkedChildren:"是",unCheckedChildren:"否",unCheckedValue:0},null,8,["checked"])]),_:1}),n.createVNode(l,{label:"是否模版"},{default:n.withCtx(()=>[n.createVNode(r,{checked:t.value.isTmpl,"onUpdate:checked":s[4]||(s[4]=u=>t.value.isTmpl=u),checkedValue:1,checkedChildren:"是",unCheckedChildren:"否",unCheckedValue:0},null,8,["checked"])]),_:1}),n.createVNode(l,{label:"页面备注"},{default:n.withCtx(()=>[n.createVNode(d,{value:t.value.descs,"onUpdate:value":s[5]||(s[5]=u=>t.value.descs=u),placeholder:"请输入页面备注...",rows:4},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1}),n.createVNode(h,{key:"dataDefine",tab:"数据设置"},{default:n.withCtx(()=>[n.createVNode(Gr,{editor:o.editor},null,8,["editor"])]),_:1})]),_:1})])}}}),[["__scopeId","data-v-2420ce7a"]]),vs=Z(n.defineComponent({__name:"editor",props:{psn:{type:String,required:!1},params:{type:Object,default(){return{}}},pageDefine:{type:Object,required:!1}},setup(o){console.log("unione page view setup .....");const e=o,t={sn:"new_",title:"新建页面",types:"setting",vers:1,configs:{widgetList:[],dataModels:[]},component:"unione-page-view"},i=new Rt,s=n.computed(()=>i.$widgetList.value||[]);n.watch(()=>e.pageDefine,a=>{a&&i.load(l.value,a)});const l=n.ref("new_");return n.onMounted(()=>{const a=n.inject("route");console.log("unione page view route",a),l.value=e.psn||a?.query?.psn||a?.meta?.psn||"new_",console.log("unione page view,psn:"+l.value),i.setModel("run"),i.load(l.value,e.pageDefine||t)}),(a,r)=>(n.openBlock(),n.createBlock(ri,{class:"unione-page-view","setting-title":"页面设置",editor:n.unref(i)},n.createSlots({default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,d=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(d.render||d.widget),{key:d.wid,wid:d.wid,widget:d,editor:n.unref(i)},null,8,["wid","widget","editor"]))),128))]),_:2},[n.unref(i)?{name:"page-setting",fn:n.withCtx(()=>[n.createVNode(di,{editor:n.unref(i)},null,8,["editor"])]),key:"0"}:void 0]),1032,["editor"]))}}),[["__scopeId","data-v-f792d0b4"]]),Xr={class:"form-btns"},Cs=n.defineComponent({__name:"form",props:{psn:{type:String,required:!1},params:{type:Object,default(){return{}}},pageDefine:{type:Object,required:!1}},setup(o){const e=n.inject("router"),t=o,i={sn:"new_",title:"新建页面",types:"setting",vers:1,configs:{widgets:[],dsnList:[]},component:"unione-page-view"},s=new Rt,l=n.computed(()=>s.$widgetList.value||[]),a=n.computed(()=>{const f=s.define.value?.configs?.btns||[],u=f.map(p=>p.name);if(!u.includes("save")){const p={title:"保存",type:"primary",index:0,visible:!0,size:"default",name:"save"};f.splice(p.index,0,p)}if(!u.includes("submit")){const p={title:"提交",type:"primary",index:1,visible:!0,size:"default",name:"submit"};let b=p.index||1;f.splice(b,0,p)}if(!u.includes("reset")){const p={title:"重置",type:"default",index:2,visible:!0,size:"default",props:{danger:!0},name:"reset"};f.splice(p.index,0,p)}if(!u.includes("back")){const p={title:"返回",type:"default",index:3,visible:!0,size:"default",name:"back"};f.splice(p.index,0,p)}return s.model.value=="view"&&f.filter(p=>["save","submit","reset"].includes(p.name)).forEach(p=>{p.visible=!1}),f});function r({btn:f,event:u}){f.name=="save"&&d(),f.name=="reset",f.name=="back"&&c()}async function d(){const f=s.dataManager().form();let u={};for(let p in f){const b=await f[p].validate();if(s.dataManager().psn()==p){for(let k in u)b[k]=u[k];u=b}else u[p]=b}console.log("=======form data=====",u),s.dataManager().primary().save({data:u,params:s.dataManager().params}).then(p=>{console.log("save result:",p)})}function c(){e.back()}n.watch(()=>t.pageDefine,f=>{f&&s.load(h.value,f)});const h=n.ref("new_");return n.onMounted(()=>{const f=n.inject("route");console.log("unione page view route",f),h.value=t.psn||f?.query?.psn||f?.meta?.psn||"new_",console.log("unione page view,psn:"+h.value),s.setModel(f?.query?.model||f?.meta?.model||"run"),f?.query&&s.dataManager().params(f.query),s.load(h.value,t.pageDefine||i)}),(f,u)=>{const p=n.resolveComponent("unione-btn");return n.openBlock(),n.createBlock(ri,{class:"unione-page-view","setting-title":"页面设置",editor:n.unref(s)},n.createSlots({default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,b=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(b.widget),{key:b.wid,wid:b.wid,widget:b,editor:n.unref(s)},null,8,["wid","widget","editor"]))),128)),n.createElementVNode("div",Xr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,b=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:b.name},[b.visible!=!1?(n.openBlock(),n.createBlock(p,{key:0,widget:b,editor:n.unref(s),ctx:{},onClick:r},null,8,["widget","editor"])):n.createCommentVNode("",!0)],64))),128))])]),_:2},[n.unref(s)?{name:"page-setting",fn:n.withCtx(()=>[n.createVNode(di,{editor:n.unref(s)},null,8,["editor"])]),key:"0"}:void 0]),1032,["editor"])}}}),Ss=n.defineComponent({__name:"list",props:{psn:{type:String,required:!1},params:{type:Object,default(){return{}}},pageDefine:{type:Object,required:!1}},setup(o){console.log("unione page view setup .....");const e=o,t={sn:"new_",title:"新建页面",types:"setting",vers:1,configs:{widgets:[{wid:"query-form",widget:"unione-query-form",dataModel:"",configs:{keywords:{},fields:[],labelWidth:8}},{wid:"table-list",widget:"unione-table-list",dataModel:"",configs:{leftBtns:[],rightBtns:[],columns:[],operation:{title:"操作",visible:!0,width:150,btns:[],more:{layout:"horizontal"},count:2}}}],dsnList:[]},component:"unione-page-list"},i=new Rt,s=n.computed(()=>i.$widgetList.value||[]);n.watch(()=>e.pageDefine,a=>{a&&i.load(l.value,a)});const l=n.ref("new_");return n.onMounted(()=>{const a=n.inject("route");console.log("unione page view route",a),l.value=e.psn||a?.query?.psn||a?.meta?.psn||"new_",console.log("unione page view,psn:"+l.value),i.setModel(a?.query?.model||a?.meta?.model||"run"),i.load(l.value,e.pageDefine||t)}),(a,r)=>(n.openBlock(),n.createBlock(ri,{class:"unione-page-list","setting-title":"页面设置",editor:n.unref(i)},n.createSlots({default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,d=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(d.render||d.widget),{key:d.wid,wid:d.wid,widget:d,editor:n.unref(i)},null,8,["wid","widget","editor"]))),128))]),_:2},[n.unref(i)?{name:"page-setting",fn:n.withCtx(()=>[n.createVNode(di,{editor:n.unref(i)},null,8,["editor"])]),key:"0"}:void 0]),1032,["editor"]))}}),ct={release(o){return W.axios.admin({url:"/api/data/define/release",method:"post",data:o})},find(o){return W.axios.admin({url:"/api/data/define/find",method:"post",data:o})},save(o){return W.axios.admin({url:"/api/data/define/save",method:"post",data:o})},delete(o){return W.axios.admin({url:"/api/data/define/delete",method:"post",data:o})},detail(o){return W.axios.admin({url:"/api/data/define/detail",method:"post",headers:{"Content-Type":"application/json"},data:o})},loadFromDb(o){return W.axios.admin({url:"/api/data/define/load/from/db",method:"post",headers:{"Content-Type":"multipart/form-data"},data:o})},impFromDb(o){return W.axios.admin({url:"/api/data/define/imp/from/db",method:"post",headers:{"Content-Type":"multipart/form-data"},data:o})}},Jr={class:"unione-page list-page"},Zr=Z(n.defineComponent({__name:"list",setup(o){const e=Me(),t=W.useDialog(),i=n.inject("router"),s=n.ref({fields:[{title:"标题",name:"title"},{title:"名称",name:"name"},{title:"状态",name:"status"},{title:"类别",name:"category"}]}),l=n.ref({leftBtns:[{visible:!1,name:"delBatch"},{title:"从数据库导入",icon:"FunnelPlotOutlined",name:"impFromDb",props:{danger:!0,ghost:!0}},{title:"代码生成",icon:"CodeOutlined",name:"genCode"}],rightBtns:[{visible:!1,name:"downTmpl"}],columns:[{title:"类别",name:"category"},{title:"标题",name:"title"},{title:"名称",name:"name"},{title:"编码",name:"sn"},{title:"版本",name:"vers"},{title:"发布时间",name:"publishDate"},{title:"创建时间",name:"created"},{title:"状态",name:"status"}],operation:{title:"操作",width:190,btns:[{title:"预览",name:"view"},{title:"版本发布",name:"release",props:{danger:!0}},{title:"版本管理",name:"vers"},{title:"配置管理",name:"configs"},{title:"权限管理",name:"permis"},{title:"权限分配",name:"auth"},{title:"复制",name:"copy"}],count:2,more:{layout:"vertical"}}});n.onMounted(()=>{r()});const a=n.ref({pagination:{total:0,current:1,pageSize:20},loading:!1,params:{},data:[]});function r(){a.value.loading=!0,ct.find({page:a.value.pagination.current,pageSize:a.value.pagination.pageSize,body:a.value.params}).then(g=>{a.value.data=g.body,a.value.pagination.total=g.total*1}).finally(()=>{a.value.loading=!1})}function d(g){a.value.pagination.current=g.pagination.current,a.value.pagination.pageSize=g.pagination.pageSize,r()}function c(g){a.value.pagination.current=1,a.value.params=g||{},r()}function h({btn:g,event:m,row:S}){console.log("table btn click",g,m,S),(g.name=="add"||g.name=="edit")&&i.push({path:"/system/data/define/edit",query:S?{id:S.id}:{}}),g.name=="impFromDb"&&(u.value=!0),g.name=="release"&&f(S),g.name=="view"&&i.push({path:e.listPageUrl,query:{psn:S.sn+":list",model:"preview"}})}function f(g){t.confirm({content:"确定要发布当前数据么?",onOk:()=>{ct.release([g.id]).then(m=>{m.success?(t.success({title:"发布成功",content:m.body}),r()):t.error({title:"发布失败",content:m.body})})}})}const u=n.ref(!1),p=n.ref({keywords:{visible:!1},fields:[{title:"数据源",name:"dsId",value:1,visible:!0,widget:"unione-select-box",convert:{types:"local",url:"/api/data/source/find",search:!0}},{title:"名称",name:"tableName",visible:!0}],btns:[{visible:!1,name:"reset"},{name:"advanced",visible:!1},{name:"imp",title:"提交",props:{danger:!0}}]}),b=n.ref({leftBtns:!1,rightBtns:!1,columns:[{title:"名称",name:"name"},{title:"标题",name:"title"}],operation:!1}),k=n.ref({pagination:{total:0,current:1,pageSize:10},loading:!1,params:{},data:[]});function v(g){!g||!Object.keys(g).length||!g.dsId||(G.message.loading("数据加载中..."),k.value.params=g,k.value.loading=!0,ct.loadFromDb(g).then(m=>{k.value.loading=!1,G.message.destroy(),m.success?(m.body.forEach(S=>{S.checkable=!!S.id}),k.value.data=m.body,k.value.pagination.total=m.body.length):G.message.error(m.message)}))}function C(g){k.value.pagination.current=g.pagination.current,k.value.pagination.pageSize=g.pagination.pageSize}const x=n.ref();function V({btn:g}){if(g.name!="imp")return;const m=x.value.getSelected();m?.keys?.length?t.confirm({content:"确定导入选中的"+m.keys.length+"条记录么?",onOk:()=>{G.message.loading("数据导入中..."),ct.impFromDb({dsId:k.value.params.dsId,tables:m.keys.join()}).then(S=>{G.message.destroy(),S.success?(t.success({content:S.message}),c()):t.error({context:S.message})})}}):t.error({content:"请选择目标记录!"})}return(g,m)=>{const S=n.resolveComponent("UnioneQuery"),_=n.resolveComponent("UnioneTable"),y=n.resolveComponent("a-drawer");return n.openBlock(),n.createElementBlock("div",Jr,[n.createVNode(S,{widget:s.value,onQuery:c,onReset:c},null,8,["widget"]),n.createVNode(_,{widget:l.value,dataList:a.value.data,loading:a.value.loading,pagination:a.value.pagination,onChange:d,onBtnClick:h},null,8,["widget","dataList","loading","pagination"]),n.createVNode(y,{title:"从数据库中导入",width:550,visible:u.value,"onUpdate:visible":m[0]||(m[0]=w=>u.value=w),placement:"left"},{default:n.withCtx(()=>[n.createVNode(S,{widget:p.value,onQuery:v,onReset:v,onBtnClick:V,class:"load-table-form"},null,8,["widget"]),n.createVNode(_,{widget:b.value,dataList:k.value.data,loading:k.value.loading,pagination:k.value.pagination,onChange:C,rowKey:"name",ref_key:"loadTableObj",ref:x},null,8,["widget","dataList","loading","pagination"])]),_:1},8,["visible"])])}}}),[["__scopeId","data-v-d7658b67"]]),ed={class:"unione-props-setting data-field-manage"},td={key:0},id={key:1},nd=["onClick"],sd=["onClick"],ld=["onClick"],od={key:1},ad=Z(n.defineComponent({__name:"dataFieldMange",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=n.ref([{title:"序号",dataIndex:"index",key:"index",width:"35px",fixed:"left",align:"center",customRender:({index:p})=>p+1},{title:"名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"标题",dataIndex:"title",key:"title",width:"100px",align:"center"},{title:"数据类型",dataIndex:"dataType",key:"dataType",width:"80px",align:"center"},{title:"长度",dataIndex:"dataLen",key:"dataLen",width:"60px",align:"center"},{title:"小数点",dataIndex:"dataPrec",key:"dataPrec",width:"60px",align:"center"},{title:"默认值",dataIndex:"dataValue",key:"dataValue",width:"60px",align:"center"},{title:"主键",dataIndex:"isPk",key:"isPk",width:"40px",align:"center"},{title:"外键",dataIndex:"isFk",key:"isFk",width:"30px",align:"center"},{title:"非空",dataIndex:"isNull",key:"isNull",width:"30px",align:"center"},{title:"同步",dataIndex:"syncEnable",key:"syncEnable",width:"30px",align:"center"},{title:"备注",dataIndex:"descs",key:"descs",width:"140px",align:"center"}]),t=n.useModel(o,"modelValue"),i=n.ref({selectedRowKeys:[],columnWidth:"25px",onChange:p=>{p.forEach(b=>{i.value.selectedRowKeys.includes(b)||i.value.selectedRowKeys.push(b);const k=[];t.value.forEach(v=>{!p.includes(v.name)&&i.value.selectedRowKeys.includes(v.name)&&k.push(v.name)}),k.length&&(i.value.selectedRowKeys=i.value.selectedRowKeys.filter(v=>!k.includes(v)))})}}),s={mounted:p=>p.focus()},l=n.ref({});function a(){const p=Object.keys(l.value);if(p.length)for(let b in p){const k=t.value.filter(v=>v.name==b);if(k&&k[0]){let v=l.value[b];Object.keys(v).forEach(C=>{k[0][C]=v[C]})}}l.value={}}function r(p,b){a();const k={};k[b]=p[b]||"",l.value[p.name]=k}function d(p,b){if(!p||!b){l.value={};return}const k=l.value[p.name][b];if(b=="name"&&t.value.filter(C=>C[b]==k&&C.name!=p.name).length>0){G.Modal.warn({title:"提示信息",content:"字段名称["+k+"]已存在"});return}p[b]=k,l.value={}}function c(p,b){const k=t.value.filter(v=>v.name==p.name)[0];return b=="isFk"?k.configs?.fkey?.enable:k[b]==1}function h(p,b){const k=t.value.filter(v=>v.name==p.name)[0];b=="isFk"?(k.configs||(k.configs={}),k.configs.fkey||(k.configs.fkey={}),k.configs.fkey.enable=!k.configs.fkey.enable):k[b]!=1?k[b]=1:k[b]=0}function f(){if(a(),t.value.filter(k=>k.name=="new_").length>0){l.value.new_={name:"new_"};return}const b={title:"",name:"new_",dataType:"String",isPk:0};t.value.push(b),l.value[b.name]={name:"new_"}}function u(){if(!i.value.selectedRowKeys.length){G.Modal.info({title:"提示信息",content:"请选择要删除的字段!"});return}G.Modal.confirm({title:"确认信息",content:"确定要删除选中的["+i.value.selectedRowKeys.length+"]字段么?",onOk:()=>{t.value=t.value.filter(p=>!i.value.selectedRowKeys.includes(p.name)),i.value.selectedRowKeys=[]}})}return(p,b)=>{const k=n.resolveComponent("a-button"),v=n.resolveComponent("a-tooltip"),C=n.resolveComponent("a-input"),x=n.resolveComponent("a-input-number"),V=n.resolveComponent("a-select-option"),g=n.resolveComponent("a-select"),m=n.resolveComponent("a-checkbox"),S=n.resolveComponent("a-table");return n.openBlock(),n.createElementBlock("div",ed,[n.createVNode(k,{class:"btn btn-add",type:"primary",onClick:f,size:"small"},{default:n.withCtx(()=>b[1]||(b[1]=[n.createTextVNode("新增")])),_:1}),n.createVNode(k,{class:"btn btn-delete",type:"primary",danger:"",onClick:u,size:"small"},{default:n.withCtx(()=>b[2]||(b[2]=[n.createTextVNode(" 删除 ")])),_:1}),n.createVNode(S,{columns:e.value,"data-source":t.value,pagination:!0,bordered:"","row-selection":i.value,scroll:{x:1150},"row-key":"name",size:"small"},{headerCell:n.withCtx(({column:_})=>[["name","title"].includes(_.key)?(n.openBlock(),n.createElementBlock("span",td,[b[3]||(b[3]=n.createElementVNode("span",{style:{color:"red","margin-right":"3px","font-size":"16px"}},"*",-1)),n.createVNode(n.unref(We.FormOutlined)),n.createTextVNode(" "+n.toDisplayString(_.title),1)])):n.createCommentVNode("",!0),["descs","dataLen","dataPrec","dataValue","dataType"].includes(_.key)?(n.openBlock(),n.createElementBlock("span",id,[n.createVNode(n.unref(We.FormOutlined)),n.createTextVNode(" "+n.toDisplayString(_.title),1)])):n.createCommentVNode("",!0),_.key==="isPk"?(n.openBlock(),n.createBlock(v,{key:2,title:"至少配置一个主键字段"},{default:n.withCtx(()=>[b[4]||(b[4]=n.createElementVNode("span",{style:{color:"red","margin-right":"3px","font-size":"16px"}},"*",-1)),n.createTextVNode(n.toDisplayString(_.title),1)]),_:2},1024)):n.createCommentVNode("",!0),_.key==="isFk"?(n.openBlock(),n.createBlock(v,{key:3,title:"是否是外键字段"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(_.title),1)]),_:2},1024)):n.createCommentVNode("",!0),_.key==="isNull"?(n.openBlock(),n.createBlock(v,{key:4,title:"是否允许为空"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(_.title),1)]),_:2},1024)):n.createCommentVNode("",!0),_.key==="syncEnable"?(n.openBlock(),n.createBlock(v,{key:5,title:"是否同步到数据库"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(_.title),1)]),_:2},1024)):n.createCommentVNode("",!0)]),bodyCell:n.withCtx(({column:_,text:y,record:w})=>[["name","title","descs","dataValue"].includes(_.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",(!l.value[w.name]||!Object.keys(l.value[w.name]).includes(_.dataIndex))&&!y&&"empty"]),onClick:N=>r(w,_.dataIndex)},[l.value[w.name]&&Object.keys(l.value[w.name]).includes(_.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(C,{key:0,value:l.value[w.name][_.dataIndex],"onUpdate:value":N=>l.value[w.name][_.dataIndex]=N,onBlur:N=>d(w,_.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[s]]):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(y||" "),1)],64))],10,nd)):n.createCommentVNode("",!0),["dataLen","dataPrec"].includes(_.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["edit-field",(!l.value[w.name]||!Object.keys(l.value[w.name]).includes(_.dataIndex))&&!y&&"empty"]),onClick:N=>r(w,_.dataIndex)},[l.value[w.name]&&Object.keys(l.value[w.name]).includes(_.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(x,{key:0,value:l.value[w.name][_.dataIndex],"onUpdate:value":N=>l.value[w.name][_.dataIndex]=N,onBlur:N=>d(w,_.dataIndex),style:{margin:"-5px 0"}},null,8,["value","onUpdate:value","onBlur"])),[[s]]):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(y||" "),1)],64))],10,sd)):["dataType"].includes(_.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["edit-field",(!l.value[w.name]||!Object.keys(l.value[w.name]).includes(_.dataIndex))&&!y&&"empty"]),onClick:N=>r(w,_.dataIndex)},[l.value[w.name]&&Object.keys(l.value[w.name]).includes(_.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(g,{key:0,value:w[_.dataIndex],"onUpdate:value":N=>w[_.dataIndex]=N,onBlur:b[0]||(b[0]=N=>d())},{default:n.withCtx(()=>[n.createVNode(V,{key:"String",value:"String"}),n.createVNode(V,{key:"Long",value:"Long"}),n.createVNode(V,{key:"Short",value:"Short"}),n.createVNode(V,{key:"Integer",value:"Integer"}),n.createVNode(V,{key:"Float",value:"Float"}),n.createVNode(V,{key:"Double",value:"Double"}),n.createVNode(V,{key:"Date",value:"Date"}),n.createVNode(V,{key:"Timestamp",value:"Timestamp"})]),_:2},1032,["value","onUpdate:value"])),[[s]]):(n.openBlock(),n.createElementBlock("span",od,n.toDisplayString(y),1))],10,ld)):["syncEnable","isFk","isPk"].includes(_.dataIndex)?(n.openBlock(),n.createBlock(m,{key:3,checked:c(w,_.dataIndex),onClick:N=>h(w,_.dataIndex)},null,8,["checked","onClick"])):["isNull"].includes(_.dataIndex)?(n.openBlock(),n.createBlock(m,{key:4,checked:!c(w,_.dataIndex),onClick:N=>h(w,_.dataIndex)},null,8,["checked","onClick"])):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source","row-selection"])])}}}),[["__scopeId","data-v-4020e3f0"]]),Ns=1024;let rd=0,tn=class{constructor(e,t){this.from=e,this.to=t}};class Y{constructor(e={}){this.id=rd++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ce.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}Y.closedBy=new Y({deserialize:o=>o.split(" ")}),Y.openedBy=new Y({deserialize:o=>o.split(" ")}),Y.group=new Y({deserialize:o=>o.split(" ")}),Y.isolate=new Y({deserialize:o=>{if(o&&o!="rtl"&&o!="ltr"&&o!="auto")throw new RangeError("Invalid value for isolate: "+o);return o||"auto"}}),Y.contextHash=new Y({perNode:!0}),Y.lookAhead=new Y({perNode:!0}),Y.mounted=new Y({perNode:!0});class ci{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[Y.mounted.id]}}const dd=Object.create(null);class Ce{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):dd,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Ce(e.name||"",t,e.id,i);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(s)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[l[0].id]=l[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(Y.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(Y.group),l=-1;l<(s?s.length:0);l++){let a=t[l<0?i.name:s[l]];if(a)return a}}}}Ce.none=new Ce("",Object.create(null),0,8);class nn{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let s=null;for(let l of e){let a=l(i);a&&(s||(s=Object.assign({},i.props)),s[a[0].id]=a[1])}t.push(s?new Ce(i.name,s,i.id,i.flags):i)}return new nn(t)}}const hi=new WeakMap,Bs=new WeakMap;var fe;(function(o){o[o.ExcludeBuffers=1]="ExcludeBuffers",o[o.IncludeAnonymous=2]="IncludeAnonymous",o[o.IgnoreMounts=4]="IgnoreMounts",o[o.IgnoreOverlays=8]="IgnoreOverlays"})(fe||(fe={}));class re{constructor(e,t,i,s,l){if(this.type=e,this.children=t,this.positions=i,this.length=s,this.props=null,l&&l.length){this.props=Object.create(null);for(let[a,r]of l)this.props[typeof a=="number"?a:a.id]=r}}toString(){let e=ci.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let s=i.toString();s&&(t&&(t+=","),t+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new on(this.topNode,e)}cursorAt(e,t=0,i=0){let s=hi.get(this)||this.topNode,l=new on(s);return l.moveTo(e,t),hi.set(this,l._tree),l}get topNode(){return new Ve(this,0,0,null)}resolve(e,t=0){let i=Lt(hi.get(this)||this.topNode,e,t,!1);return hi.set(this,i),i}resolveInner(e,t=0){let i=Lt(Bs.get(this)||this.topNode,e,t,!0);return Bs.set(this,i),i}resolveStack(e,t=0){return fd(this,e,t)}iterate(e){let{enter:t,leave:i,from:s=0,to:l=this.length}=e,a=e.mode||0,r=(a&fe.IncludeAnonymous)>0;for(let d=this.cursor(a|fe.IncludeAnonymous);;){let c=!1;if(d.from<=l&&d.to>=s&&(!r&&d.type.isAnonymous||t(d)!==!1)){if(d.firstChild())continue;c=!0}for(;c&&i&&(r||!d.type.isAnonymous)&&i(d),!d.nextSibling();){if(!d.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:rn(Ce.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new re(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new re(Ce.none,t,i,s)))}static build(e){return ud(e)}}re.empty=new re(Ce.none,[],[],0);class sn{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new sn(this.buffer,this.index)}}class Ze{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Ce.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],s=this.set.types[t],l=s.name;if(/\W/.test(l)&&!s.isError&&(l=JSON.stringify(l)),e+=4,i==e)return l;let a=[];for(;e<i;)a.push(this.childString(e)),e=this.buffer[e+3];return l+"("+a.join(",")+")"}findChild(e,t,i,s,l){let{buffer:a}=this,r=-1;for(let d=e;d!=t&&!(Os(l,s,a[d+1],a[d+2])&&(r=d,i>0));d=a[d+3]);return r}slice(e,t,i){let s=this.buffer,l=new Uint16Array(t-e),a=0;for(let r=e,d=0;r<t;){l[d++]=s[r++],l[d++]=s[r++]-i;let c=l[d++]=s[r++]-i;l[d++]=s[r++]-e,a=Math.max(a,c)}return new Ze(l,a,this.set)}}function Os(o,e,t,i){switch(o){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Lt(o,e,t,i){for(var s;o.from==o.to||(t<1?o.from>=e:o.from>e)||(t>-1?o.to<=e:o.to<e);){let a=!i&&o instanceof Ve&&o.index<0?null:o.parent;if(!a)return o;o=a}let l=i?0:fe.IgnoreOverlays;if(i)for(let a=o,r=a.parent;r;a=r,r=a.parent)a instanceof Ve&&a.index<0&&((s=r.enter(e,t,l))===null||s===void 0?void 0:s.from)!=a.from&&(o=r);for(;;){let a=o.enter(e,t,l);if(!a)return o;o=a}}class Vs{cursor(e=0){return new on(this,e)}getChild(e,t=null,i=null){let s=_s(this,e,t,i);return s.length?s[0]:null}getChildren(e,t=null,i=null){return _s(this,e,t,i)}resolve(e,t=0){return Lt(this,e,t,!1)}resolveInner(e,t=0){return Lt(this,e,t,!0)}matchContext(e){return ln(this,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let s=t.lastChild;if(!s||s.to!=t.to)break;s.type.isError&&s.from==s.to?(i=t,t=s.prevSibling):t=s}return i}get node(){return this}get next(){return this.parent}}class Ve extends Vs{constructor(e,t,i,s){super(),this._tree=e,this.from=t,this.index=i,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,s,l=0){for(let a=this;;){for(let{children:r,positions:d}=a._tree,c=t>0?r.length:-1;e!=c;e+=t){let h=r[e],f=d[e]+a.from;if(Os(s,i,f,f+h.length)){if(h instanceof Ze){if(l&fe.ExcludeBuffers)continue;let u=h.findChild(0,h.buffer.length,t,i-f,s);if(u>-1)return new et(new cd(a,h,e,f),null,u)}else if(l&fe.IncludeAnonymous||!h.type.isAnonymous||an(h)){let u;if(!(l&fe.IgnoreMounts)&&(u=ci.get(h))&&!u.overlay)return new Ve(u.tree,f,e,a);let p=new Ve(h,f,e,a);return l&fe.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?h.children.length-1:0,t,i,s)}}}if(l&fe.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+t:e=t<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let s;if(!(i&fe.IgnoreOverlays)&&(s=ci.get(this._tree))&&s.overlay){let l=e-this.from;for(let{from:a,to:r}of s.overlay)if((t>0?a<=l:a<l)&&(t<0?r>=l:r>l))return new Ve(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function _s(o,e,t,i){let s=o.cursor(),l=[];if(!s.firstChild())return l;if(t!=null){for(let a=!1;!a;)if(a=s.type.is(t),!s.nextSibling())return l}for(;;){if(i!=null&&s.type.is(i))return l;if(s.type.is(e)&&l.push(s.node),!s.nextSibling())return i==null?l:[]}}function ln(o,e,t=e.length-1){for(let i=o.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class cd{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class et extends Vs{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,l=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return l<0?null:new et(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&fe.ExcludeBuffers)return null;let{buffer:s}=this.context,l=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return l<0?null:new et(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new et(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new et(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,l=i.buffer[this.index+3];if(l>s){let a=i.buffer[this.index+1];e.push(i.slice(s,l,a)),t.push(0)}return new re(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function As(o){if(!o.length)return null;let e=0,t=o[0];for(let l=1;l<o.length;l++){let a=o[l];(a.from>t.from||a.to<t.to)&&(t=a,e=l)}let i=t instanceof Ve&&t.index<0?null:t.parent,s=o.slice();return i?s[e]=i:s.splice(e,1),new hd(s,t)}class hd{constructor(e,t){this.heads=e,this.node=t}get next(){return As(this.heads)}}function fd(o,e,t){let i=o.resolveInner(e,t),s=null;for(let l=i instanceof Ve?i:i.context.parent;l;l=l.parent)if(l.index<0){let a=l.parent;(s||(s=[i])).push(a.resolve(e,t)),l=a}else{let a=ci.get(l.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let r=new Ve(a.tree,a.overlay[0].from+l.from,-1,l);(s||(s=[i])).push(Lt(r,e,t,!1))}}return s?As(s):i}class on{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Ve)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof Ve?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,l=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&fe.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&fe.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&fe.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index<s.buffer.buffer.length)return!1}else for(let l=0;l<this.index;l++)if(s.buffer.buffer[l+3]<this.index)return!1;({index:t,parent:i}=s)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let l=t+e,a=e<0?-1:i._tree.children.length;l!=a;l+=e){let r=i._tree.children[l];if(this.mode&fe.IncludeAnonymous||r instanceof Ze||!r.type.isAnonymous||an(r))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)e:for(let s=this.index,l=this.stack.length;l>=0;){for(let a=e;a;a=a._parent)if(a.index==s){if(s==this.index)return a;t=a,i=l+1;break e}s=this.stack[--l]}for(let s=i;s<this.stack.length;s++)t=new et(this.buffer,t,this.stack[s]);return this.bufferNode=new et(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let s=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(s=!0)}for(;s&&t&&t(this),s=this.type.isAnonymous,!this.nextSibling();){if(!i)return;this.parent(),i--,s=!0}}}matchContext(e){if(!this.buffer)return ln(this.node,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let s=e.length-1,l=this.stack.length-1;s>=0;l--){if(l<0)return ln(this.node,e,s);let a=i[t.buffer[this.stack[l]]];if(!a.isAnonymous){if(e[s]&&e[s]!=a.name)return!1;s--}}return!0}}function an(o){return o.children.some(e=>e instanceof Ze||!e.type.isAnonymous||an(e))}function ud(o){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=Ns,reused:l=[],minRepeatType:a=i.types.length}=o,r=Array.isArray(t)?new sn(t,t.length):t,d=i.types,c=0,h=0;function f(m,S,_,y,w,N){let{id:A,start:O,end:D,size:M}=r,E=h;for(;M<0;)if(r.next(),M==-1){let L=l[A];_.push(L),y.push(O-m);return}else if(M==-3){c=A;return}else if(M==-4){h=A;return}else throw new RangeError(`Unrecognized record size: ${M}`);let z=d[A],$,I,K=O-m;if(D-O<=s&&(I=v(r.pos-S,w))){let L=new Uint16Array(I.size-I.skip),B=r.pos-I.size,Q=L.length;for(;r.pos>B;)Q=C(I.start,L,Q);$=new Ze(L,D-I.start,i),K=I.start-m}else{let L=r.pos-M;r.next();let B=[],Q=[],T=A>=a?A:-1,j=0,he=D;for(;r.pos>L;)T>=0&&r.id==T&&r.size>=0?(r.end<=he-s&&(b(B,Q,O,j,r.end,he,T,E),j=B.length,he=r.end),r.next()):N>2500?u(O,L,B,Q):f(O,L,B,Q,T,N+1);if(T>=0&&j>0&&j<B.length&&b(B,Q,O,j,O,he,T,E),B.reverse(),Q.reverse(),T>-1&&j>0){let Xi=p(z);$=rn(z,B,Q,0,B.length,0,D-O,Xi,Xi)}else $=k(z,B,Q,D-O,E-D)}_.push($),y.push(K)}function u(m,S,_,y){let w=[],N=0,A=-1;for(;r.pos>S;){let{id:O,start:D,end:M,size:E}=r;if(E>4)r.next();else{if(A>-1&&D<A)break;A<0&&(A=M-s),w.push(O,D,M),N++,r.next()}}if(N){let O=new Uint16Array(N*4),D=w[w.length-2];for(let M=w.length-3,E=0;M>=0;M-=3)O[E++]=w[M],O[E++]=w[M+1]-D,O[E++]=w[M+2]-D,O[E++]=E;_.push(new Ze(O,w[2]-D,i)),y.push(D-m)}}function p(m){return(S,_,y)=>{let w=0,N=S.length-1,A,O;if(N>=0&&(A=S[N])instanceof re){if(!N&&A.type==m&&A.length==y)return A;(O=A.prop(Y.lookAhead))&&(w=_[N]+A.length+O)}return k(m,S,_,y,w)}}function b(m,S,_,y,w,N,A,O){let D=[],M=[];for(;m.length>y;)D.push(m.pop()),M.push(S.pop()+_-w);m.push(k(i.types[A],D,M,N-w,O-N)),S.push(w-_)}function k(m,S,_,y,w=0,N){if(c){let A=[Y.contextHash,c];N=N?[A].concat(N):[A]}if(w>25){let A=[Y.lookAhead,w];N=N?[A].concat(N):[A]}return new re(m,S,_,y,N)}function v(m,S){let _=r.fork(),y=0,w=0,N=0,A=_.end-s,O={size:0,start:0,skip:0};e:for(let D=_.pos-m;_.pos>D;){let M=_.size;if(_.id==S&&M>=0){O.size=y,O.start=w,O.skip=N,N+=4,y+=4,_.next();continue}let E=_.pos-M;if(M<0||E<D||_.start<A)break;let z=_.id>=a?4:0,$=_.start;for(_.next();_.pos>E;){if(_.size<0)if(_.size==-3)z+=4;else break e;else _.id>=a&&(z+=4);_.next()}w=$,y+=M,N+=z}return(S<0||y==m)&&(O.size=y,O.start=w,O.skip=N),O.size>4?O:void 0}function C(m,S,_){let{id:y,start:w,end:N,size:A}=r;if(r.next(),A>=0&&y<a){let O=_;if(A>4){let D=r.pos-(A-4);for(;r.pos>D;)_=C(m,S,_)}S[--_]=O,S[--_]=N-m,S[--_]=w-m,S[--_]=y}else A==-3?c=y:A==-4&&(h=y);return _}let x=[],V=[];for(;r.pos>0;)f(o.start||0,o.bufferStart||0,x,V,-1,0);let g=(e=o.length)!==null&&e!==void 0?e:x.length?V[0]+x[0].length:0;return new re(d[o.topID],x.reverse(),V.reverse(),g)}const Ts=new WeakMap;function fi(o,e){if(!o.isAnonymous||e instanceof Ze||e.type!=o)return 1;let t=Ts.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=o||!(i instanceof re)){t=1;break}t+=fi(o,i)}Ts.set(e,t)}return t}function rn(o,e,t,i,s,l,a,r,d){let c=0;for(let b=i;b<s;b++)c+=fi(o,e[b]);let h=Math.ceil(c*1.5/8),f=[],u=[];function p(b,k,v,C,x){for(let V=v;V<C;){let g=V,m=k[V],S=fi(o,b[V]);for(V++;V<C;V++){let _=fi(o,b[V]);if(S+_>=h)break;S+=_}if(V==g+1){if(S>h){let _=b[g];p(_.children,_.positions,0,_.children.length,k[g]+x);continue}f.push(b[g])}else{let _=k[V-1]+b[V-1].length-m;f.push(rn(o,b,k,g,V,m,_,null,d))}u.push(m+x-l)}}return p(e,t,i,s,0),(r||d)(f,u,a)}class ht{constructor(e,t,i,s,l=!1,a=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(l?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new ht(0,e.length,e,0,!1,i)];for(let l of t)l.to>e.length&&s.push(l);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],l=1,a=e.length?e[0]:null;for(let r=0,d=0,c=0;;r++){let h=r<t.length?t[r]:null,f=h?h.fromA:1e9;if(f-d>=i)for(;a&&a.from<f;){let u=a;if(d>=u.from||f<=u.to||c){let p=Math.max(u.from,d)-c,b=Math.min(u.to,f)-c;u=p>=b?null:new ht(p,b,u.tree,u.offset+c,r>0,!!h)}if(u&&s.push(u),a.to>f)break;a=l<e.length?e[l++]:null}if(!h)break;d=h.toA,c=h.toA-h.toB}return s}}class Ms{startParse(e,t,i){return typeof e=="string"&&(e=new pd(e)),i=i?i.length?i.map(s=>new tn(s.from,s.to)):[new tn(0,0)]:[new tn(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let l=s.advance();if(l)return l}}}class pd{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new Y({perNode:!0});class ui{constructor(e,t,i,s,l,a,r,d,c,h=0,f){this.p=e,this.stack=t,this.state=i,this.reducePos=s,this.pos=l,this.score=a,this.buffer=r,this.bufferBase=d,this.curContext=c,this.lookAhead=h,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let s=e.parser.context;return new ui(e,[],t,i,i,0,[],0,s?new Es(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,s=e&65535,{parser:l}=this.p,a=this.reducePos<this.pos-25;a&&this.setLookAhead(this.pos);let r=l.dynamicPrecedence(s);if(r&&(this.score+=r),i==0){this.pushState(l.getGoto(this.state,s,!0),this.reducePos),s<l.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(s,this.reducePos);return}let d=this.stack.length-(i-1)*3-(e&262144?6:0),c=d?this.stack[d-2]:this.p.ranges[0].from,h=this.reducePos-c;h>=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSize<h&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=h));let f=d?this.stack[d-1]:0,u=this.bufferBase+this.buffer.length-f;if(s<l.minRepeatTerm||e&131072){let p=l.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,c,p,u+4,!0)}if(e&262144)this.state=this.stack[d];else{let p=this.stack[d-3];this.state=l.getGoto(p,s,!0)}for(;this.stack.length>d;)this.stack.pop();this.reduceContext(s,c)}storeNode(e,t,i,s=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,r=this.buffer.length;if(r==0&&a.parent&&(r=a.bufferBase-a.parent.bufferBase,a=a.parent),r>0&&a.buffer[r-4]==0&&a.buffer[r-1]>-1){if(t==i)return;if(a.buffer[r-2]>=t){a.buffer[r-2]=i;return}}}if(!l||this.pos==i)this.buffer.push(e,t,i,s);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let r=!1;for(let d=a;d>0&&this.buffer[d-2]>i;d-=4)if(this.buffer[d-1]>=0){r=!0;break}if(r)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,s>4&&(s-=4)}this.buffer[a]=e,this.buffer[a+1]=t,this.buffer[a+2]=i,this.buffer[a+3]=s}}shift(e,t,i,s){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=s,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,s,4);else{let l=e,{parser:a}=this.p;(s>this.pos||t<=a.maxNode)&&(this.pos=s,a.stateFlag(l,1)||(this.reducePos=s)),this.pushState(l,i),this.shiftContext(t,i),t<=a.maxNode&&this.buffer.push(t,i,s,4)}}apply(e,t,i,s){e&65536?this.reduce(e):this.shift(e,t,i,s)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(i,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new ui(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new md(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if(!(i&65536))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let s=[];for(let l=0,a;l<t.length;l+=2)(a=t[l+1])!=this.state&&this.p.parser.hasAction(a,e)&&s.push(t[l],a);if(this.stack.length<120)for(let l=0;s.length<8&&l<t.length;l+=2){let a=t[l+1];s.some((r,d)=>d&1&&r==a)||s.push(t[l],a)}t=s}let i=[];for(let s=0;s<t.length&&i.length<4;s+=2){let l=t[s+1];if(l==this.state)continue;let a=this.split();a.pushState(l,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(t[s],this.pos),a.reducePos=this.pos,a.score-=200,i.push(a)}return i}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let i=t>>19,s=t&65535,l=this.stack.length-i*3;if(l<0||e.getGoto(this.stack[l],s,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;t=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(s,l)=>{if(!t.includes(s))return t.push(s),e.allActions(s,a=>{if(!(a&393216))if(a&65536){let r=(a>>19)-l;if(r>1){let d=a&65535,c=this.stack.length-r*3;if(c>=0&&e.getGoto(this.stack[c],d,!1)>=0)return r<<19|65536|d}}else{let r=i(a,l+1);if(r!=null)return r}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new Es(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Es{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class md{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class pi{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new pi(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new pi(this.stack,this.pos,this.index)}}function mi(o,e=Uint16Array){if(typeof o!="string")return o;let t=null;for(let i=0,s=0;i<o.length;){let l=0;for(;;){let a=o.charCodeAt(i++),r=!1;if(a==126){l=65535;break}a>=92&&a--,a>=34&&a--;let d=a-32;if(d>=46&&(d-=46,r=!0),l+=d,r)break;l*=46}t?t[s++]=l:t=new e(l)}return t}class gi{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Is=new gi;class gd{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Is,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,s=this.rangeIndex,l=this.pos+e;for(;l<i.from;){if(!s)return null;let a=this.ranges[--s];l-=i.from-a.to,i=a}for(;t<0?l>i.to:l>=i.to;){if(s==this.ranges.length-1)return null;let a=this.ranges[++s];l+=a.from-i.to,i=a}return l}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,s;if(t>=0&&t<this.chunk.length)i=this.pos+e,s=this.chunk.charCodeAt(t);else{let l=this.resolveOffset(e,1);if(l==null)return-1;if(i=l,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let a=this.rangeIndex,r=this.range;for(;r.to<=i;)r=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>r.to&&(this.chunk2=this.chunk2.slice(0,r.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Is,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(i+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return i}}class yt{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;kd(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}yt.prototype.contextual=yt.prototype.fallback=yt.prototype.extend=!1,yt.prototype.fallback=yt.prototype.extend=!1;function kd(o,e,t,i,s,l){let a=0,r=1<<i,{dialect:d}=t.p.parser;e:for(;r&o[a];){let c=o[a+1];for(let p=a+3;p<c;p+=2)if((o[p+1]&r)>0){let b=o[p];if(d.allows(b)&&(e.token.value==-1||e.token.value==b||bd(b,e.token.value,s,l))){e.acceptToken(b);break}}let h=e.next,f=0,u=o[a+2];if(e.next<0&&u>f&&o[c+u*3-3]==65535){a=o[c+u*3-1];continue e}for(;f<u;){let p=f+u>>1,b=c+p+(p<<1),k=o[b],v=o[b+1]||65536;if(h<k)u=p;else if(h>=v)f=p+1;else{a=o[b+2],e.advance();continue e}}break}}function Ds(o,e,t){for(let i=e,s;(s=o[i])!=65535;i++)if(s==t)return i-e;return-1}function bd(o,e,t,i){let s=Ds(t,i,e);return s<0||Ds(t,i,o)<s}const Ne=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let dn=null;function Ps(o,e,t){let i=o.cursor(fe.IncludeAnonymous);for(i.moveTo(e);;)if(!(t<0?i.childBefore(e):i.childAfter(e)))for(;;){if((t<0?i.to<e:i.from>e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(o.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:o.length}}class wd{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ps(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ps(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let i=this.trees[t],s=this.index[t];if(s==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let l=i.children[s],a=this.start[t]+i.positions[s];if(a>e)return this.nextStart=a,null;if(l instanceof re){if(a==e){if(a<this.safeFrom)return null;let r=a+l.length;if(r<=this.safeTo){let d=l.prop(Y.lookAhead);if(!d||r+d<this.fragment.to)return l}}this.index[t]++,a+l.length>=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+l.length}}}class yd{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new gi)}getActions(e){let t=0,i=null,{parser:s}=e.p,{tokenizers:l}=s,a=s.stateSlot(e.state,3),r=e.curContext?e.curContext.hash:0,d=0;for(let c=0;c<l.length;c++){if(!(1<<c&a))continue;let h=l[c],f=this.tokens[c];if(!(i&&!h.fallback)&&((h.contextual||f.start!=e.pos||f.mask!=a||f.context!=r)&&(this.updateCachedToken(f,h,e),f.mask=a,f.context=r),f.lookAhead>f.end+25&&(d=Math.max(f.lookAhead,d)),f.value!=0)){let u=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!h.extend&&(i=f,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return d&&e.setLookAhead(d),!i&&e.pos==this.stream.end&&(i=new gi,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new gi,{pos:i,p:s}=e;return t.start=i,t.end=Math.min(i+1,s.stream.end),t.value=i==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,i){let s=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(s,e),i),e.value>-1){let{parser:l}=i.p;for(let a=0;a<l.specialized.length;a++)if(l.specialized[a]==e.value){let r=l.specializers[a](this.stream.read(e.start,e.end),i);if(r>=0&&i.p.parser.dialect.allows(r>>1)){r&1?e.extended=r>>1:e.value=r>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,i,s){for(let l=0;l<s;l+=3)if(this.actions[l]==e)return s;return this.actions[s++]=e,this.actions[s++]=t,this.actions[s++]=i,s}addActions(e,t,i,s){let{state:l}=e,{parser:a}=e.p,{data:r}=a;for(let d=0;d<2;d++)for(let c=a.stateSlot(l,d?2:1);;c+=3){if(r[c]==65535)if(r[c+1]==1)c=He(r,c+2);else{s==0&&r[c+1]==2&&(s=this.putAction(He(r,c+2),t,i,s));break}r[c]==t&&(s=this.putAction(He(r,c+1),t,i,s))}return s}}class xd{constructor(e,t,i,s){this.parser=e,this.input=t,this.ranges=s,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new gd(t,s),this.tokens=new yd(e,this.stream),this.topTerm=e.top[1];let{from:l}=s[0];this.stacks=[ui.start(this,e.top[0],l)],this.fragments=i.length&&this.stream.end-l>e.bufferLength*4?new wd(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],s,l;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let r=e[a];for(;;){if(this.tokens.mainToken=null,r.pos>t)i.push(r);else{if(this.advanceStack(r,i,e))continue;{s||(s=[],l=[]),s.push(r);let d=this.tokens.getMainToken(r);l.push(d.value,d.end)}}break}}if(!i.length){let a=s&&Cd(s);if(a)return Ne&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Ne&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let a=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,l,i);if(a)return Ne&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((r,d)=>d.score-r.score);i.length>a;)i.pop();i.some(r=>r.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let a=0;a<i.length-1;a++){let r=i[a];for(let d=a+1;d<i.length;d++){let c=i[d];if(r.sameState(c)||r.buffer.length>500&&c.buffer.length>500)if((r.score-c.score||r.buffer.length-c.buffer.length)>0)i.splice(d--,1);else{i.splice(a--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let a=1;a<i.length;a++)i[a].pos<this.minStackPos&&(this.minStackPos=i[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,i){let s=e.pos,{parser:l}=this,a=Ne?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,h=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let u=this.parser.nodeSet.types[f.type.id]==f.type?l.getGoto(e.state,f.type.id):-1;if(u>-1&&f.length&&(!c||(f.prop(Y.contextHash)||0)==h))return e.useNode(f,u),Ne&&console.log(a+this.stackID(e)+` (via reuse of ${l.getName(f.type.id)})`),!0;if(!(f instanceof re)||f.children.length==0||f.positions[0]>0)break;let p=f.children[0];if(p instanceof re&&f.positions[0]==0)f=p;else break}}let r=l.stateSlot(e.state,4);if(r>0)return e.reduce(r),Ne&&console.log(a+this.stackID(e)+` (via always-reduce ${l.getName(r&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let d=this.tokens.getActions(e);for(let c=0;c<d.length;){let h=d[c++],f=d[c++],u=d[c++],p=c==d.length||!i,b=p?e:e.split(),k=this.tokens.mainToken;if(b.apply(h,f,k?k.start:b.pos,u),Ne&&console.log(a+this.stackID(b)+` (via ${h&65536?`reduce of ${l.getName(h&65535)}`:"shift"} for ${l.getName(f)} @ ${s}${b==e?"":", split"})`),p)return!0;b.pos>s?t.push(b):i.push(b)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return $s(e,t),!0}}runRecovery(e,t,i){let s=null,l=!1;for(let a=0;a<e.length;a++){let r=e[a],d=t[a<<1],c=t[(a<<1)+1],h=Ne?this.stackID(r)+" -> ":"";if(r.deadEnd&&(l||(l=!0,r.restart(),Ne&&console.log(h+this.stackID(r)+" (restarted)"),this.advanceFully(r,i))))continue;let f=r.split(),u=h;for(let p=0;f.forceReduce()&&p<10&&(Ne&&console.log(u+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));p++)Ne&&(u=this.stackID(f)+" -> ");for(let p of r.recoverByInsert(d))Ne&&console.log(h+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>r.pos?(c==r.pos&&(c++,d=0),r.recoverByDelete(d,c),Ne&&console.log(h+this.stackID(r)+` (via recover-delete ${this.parser.getName(d)})`),$s(r,i)):(!s||s.score<r.score)&&(s=r)}return s}stackToTree(e){return e.close(),re.build({buffer:pi.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(dn||(dn=new WeakMap)).get(e);return t||dn.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function $s(o,e){for(let t=0;t<e.length;t++){let i=e[t];if(i.pos==o.pos&&i.sameState(o)){e[t].score<o.score&&(e[t]=o);return}}e.push(o)}class vd{constructor(e,t,i){this.source=e,this.flags=t,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}class ki extends Ms{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let r=0;r<e.repeatNodeCount;r++)t.push("");let i=Object.keys(e.topRules).map(r=>e.topRules[r][1]),s=[];for(let r=0;r<t.length;r++)s.push([]);function l(r,d,c){s[r].push([d,d.deserialize(String(c))])}if(e.nodeProps)for(let r of e.nodeProps){let d=r[0];typeof d=="string"&&(d=Y[d]);for(let c=1;c<r.length;){let h=r[c++];if(h>=0)l(h,d,r[c++]);else{let f=r[c+-h];for(let u=-h;u>0;u--)l(r[c++],d,f);c++}}}this.nodeSet=new nn(t.map((r,d)=>Ce.define({name:d>=this.minRepeatTerm?void 0:r,id:d,props:s[d],top:i.indexOf(d)>-1,error:d==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(d)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Ns;let a=mi(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let r=0;r<this.specializerSpecs.length;r++)this.specialized[r]=this.specializerSpecs[r].term;this.specializers=this.specializerSpecs.map(Fs),this.states=mi(e.states,Uint32Array),this.data=mi(e.stateData),this.goto=mi(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(r=>typeof r=="number"?new yt(a,r):r),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let s=new xd(this,e,t,i);for(let l of this.wrappers)s=l(s,e,t,i);return s}getGoto(e,t,i=!1){let s=this.goto;if(t>=s[0])return-1;for(let l=s[t+1];;){let a=s[l++],r=a&1,d=s[l++];if(r&&i)return d;for(let c=l+(a>>1);l<c;l++)if(s[l]==e)return d;if(r)return-1}}hasAction(e,t){let i=this.data;for(let s=0;s<2;s++)for(let l=this.stateSlot(e,s?2:1),a;;l+=3){if((a=i[l])==65535)if(i[l+1]==1)a=i[l=He(i,l+2)];else{if(i[l+1]==2)return He(i,l+2);break}if(a==t||a==0)return He(i,l+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),s=i?t(i):void 0;for(let l=this.stateSlot(e,1);s==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=He(this.data,l+2);else break;s=t(He(this.data,l+1))}return s}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=He(this.data,i+2);else break;if(!(this.data[i+2]&1)){let s=this.data[i+1];t.some((l,a)=>a&1&&l==s)||t.push(this.data[i],s)}}return t}configure(e){let t=Object.assign(Object.create(ki.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let s=e.tokenizers.find(l=>l.from==i);return s?s.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,s)=>{let l=e.specializers.find(r=>r.from==i.external);if(!l)return i;let a=Object.assign(Object.assign({},i),{external:l.to});return t.specializers[s]=Fs(a),a})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let l of e.split(" ")){let a=t.indexOf(l);a>=0&&(i[a]=!0)}let s=null;for(let l=0;l<t.length;l++)if(!i[l])for(let a=this.dialects[t[l]],r;(r=this.data[a++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[r]=1;return new vd(e,i,s)}static deserialize(e){return new ki(e)}}function He(o,e){return o[e]|o[e+1]<<16}function Cd(o){let e=null;for(let t of o){let i=t.p.stoppedAt;(t.pos==t.p.stream.end||i!=null&&t.pos>i)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function Fs(o){if(o.external){let e=o.extend?1:0;return(t,i)=>o.external(t,i)<<1|e}return o.get}let Sd=0;class _e{constructor(e,t,i,s){this.name=e,this.set=t,this.base=i,this.modified=s,this.id=Sd++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof _e&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let s=new _e(i,[],null,[]);if(s.set.push(s),t)for(let l of t.set)s.set.push(l);return s}static defineModifier(e){let t=new bi(e);return i=>i.modified.indexOf(t)>-1?i:bi.get(i.base||i,i.modified.concat(t).sort((s,l)=>s.id-l.id))}}let Nd=0;class bi{constructor(e){this.name=e,this.instances=[],this.id=Nd++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(r=>r.base==e&&Bd(t,r.modified));if(i)return i;let s=[],l=new _e(e.name,s,e,t);for(let r of t)r.instances.push(l);let a=Od(t);for(let r of e.set)if(!r.modified.length)for(let d of a)s.push(bi.get(r,d));return l}}function Bd(o,e){return o.length==e.length&&o.every((t,i)=>t==e[i])}function Od(o){let e=[[]];for(let t=0;t<o.length;t++)for(let i=0,s=e.length;i<s;i++)e.push(e[i].concat(o[t]));return e.sort((t,i)=>i.length-t.length)}function Rs(o){let e=Object.create(null);for(let t in o){let i=o[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let l=[],a=2,r=s;for(let f=0;;){if(r=="..."&&f>0&&f+3==s.length){a=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!u)throw new RangeError("Invalid path: "+s);if(l.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let p=s[f++];if(f==s.length&&p=="!"){a=0;break}if(p!="/")throw new RangeError("Invalid path: "+s);r=s.slice(f)}let d=l.length-1,c=l[d];if(!c)throw new RangeError("Invalid path: "+s);let h=new cn(i,a,d>0?l.slice(0,d):null);e[c]=h.sort(e[c])}}return Vd.add(e)}const Vd=new Y;class cn{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}cn.empty=new cn([],2,null);function Ls(o,e){let t=Object.create(null);for(let l of o)if(!Array.isArray(l.tag))t[l.tag.id]=l.class;else for(let a of l.tag)t[a.id]=l.class;let{scope:i,all:s=null}=e||{};return{style:l=>{let a=s;for(let r of l)for(let d of r.set){let c=t[d.id];if(c){a=a?a+" "+c:c;break}}return a},scope:i}}const R=_e.define,wi=R(),tt=R(),js=R(tt),zs=R(tt),it=R(),yi=R(it),hn=R(it),Pe=R(),ft=R(Pe),$e=R(),Fe=R(),fn=R(),jt=R(fn),xi=R(),P={comment:wi,lineComment:R(wi),blockComment:R(wi),docComment:R(wi),name:tt,variableName:R(tt),typeName:js,tagName:R(js),propertyName:zs,attributeName:R(zs),className:R(tt),labelName:R(tt),namespace:R(tt),macroName:R(tt),literal:it,string:yi,docString:R(yi),character:R(yi),attributeValue:R(yi),number:hn,integer:R(hn),float:R(hn),bool:R(it),regexp:R(it),escape:R(it),color:R(it),url:R(it),keyword:$e,self:R($e),null:R($e),atom:R($e),unit:R($e),modifier:R($e),operatorKeyword:R($e),controlKeyword:R($e),definitionKeyword:R($e),moduleKeyword:R($e),operator:Fe,derefOperator:R(Fe),arithmeticOperator:R(Fe),logicOperator:R(Fe),bitwiseOperator:R(Fe),compareOperator:R(Fe),updateOperator:R(Fe),definitionOperator:R(Fe),typeOperator:R(Fe),controlOperator:R(Fe),punctuation:fn,separator:R(fn),bracket:jt,angleBracket:R(jt),squareBracket:R(jt),paren:R(jt),brace:R(jt),content:Pe,heading:ft,heading1:R(ft),heading2:R(ft),heading3:R(ft),heading4:R(ft),heading5:R(ft),heading6:R(ft),contentSeparator:R(Pe),list:R(Pe),quote:R(Pe),emphasis:R(Pe),strong:R(Pe),link:R(Pe),monospace:R(Pe),strikethrough:R(Pe),inserted:R(),deleted:R(),changed:R(),invalid:R(),meta:xi,documentMeta:R(xi),annotation:R(xi),processingInstruction:R(xi),definition:_e.defineModifier("definition"),constant:_e.defineModifier("constant"),function:_e.defineModifier("function"),standard:_e.defineModifier("standard"),local:_e.defineModifier("local"),special:_e.defineModifier("special")};for(let o in P){let e=P[o];e instanceof _e&&(e.name=o)}Ls([{tag:P.link,class:"tok-link"},{tag:P.heading,class:"tok-heading"},{tag:P.emphasis,class:"tok-emphasis"},{tag:P.strong,class:"tok-strong"},{tag:P.keyword,class:"tok-keyword"},{tag:P.atom,class:"tok-atom"},{tag:P.bool,class:"tok-bool"},{tag:P.url,class:"tok-url"},{tag:P.labelName,class:"tok-labelName"},{tag:P.inserted,class:"tok-inserted"},{tag:P.deleted,class:"tok-deleted"},{tag:P.literal,class:"tok-literal"},{tag:P.string,class:"tok-string"},{tag:P.number,class:"tok-number"},{tag:[P.regexp,P.escape,P.special(P.string)],class:"tok-string2"},{tag:P.variableName,class:"tok-variableName"},{tag:P.local(P.variableName),class:"tok-variableName tok-local"},{tag:P.definition(P.variableName),class:"tok-variableName tok-definition"},{tag:P.special(P.variableName),class:"tok-variableName2"},{tag:P.definition(P.propertyName),class:"tok-propertyName tok-definition"},{tag:P.typeName,class:"tok-typeName"},{tag:P.namespace,class:"tok-namespace"},{tag:P.className,class:"tok-className"},{tag:P.macroName,class:"tok-macroName"},{tag:P.propertyName,class:"tok-propertyName"},{tag:P.operator,class:"tok-operator"},{tag:P.comment,class:"tok-comment"},{tag:P.meta,class:"tok-meta"},{tag:P.invalid,class:"tok-invalid"},{tag:P.punctuation,class:"tok-punctuation"}]);const _d=Rs({String:P.string,Number:P.number,"True False":P.bool,PropertyName:P.propertyName,Null:P.null,",":P.separator,"[ ]":P.squareBracket,"{ }":P.brace}),Ad=ki.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[_d],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});class X{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=xt(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Re.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=xt(this,e,t);let i=[];return this.decompose(e,t,i,0),Re.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new zt(this),l=new zt(e);for(let a=t,r=t;;){if(s.next(a),l.next(a),a=0,s.lineBreak!=l.lineBreak||s.done!=l.done||s.value!=l.value)return!1;if(r+=s.value.length,s.done||r>=i)return!0}}iter(e=1){return new zt(this,e)}iterRange(e,t=this.length){return new Us(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Ws(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?X.empty:e.length<=32?new ae(e):Re.from(ae.split(e,[]))}}class ae extends X{constructor(e,t=Td(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let l=0;;l++){let a=this.text[l],r=s+a.length;if((t?i:r)>=e)return new Md(s,r,i,a);s=r+1,i++}}decompose(e,t,i,s){let l=e<=0&&t>=this.length?this:new ae(qs(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let a=i.pop(),r=vi(l.text,a.text.slice(),0,l.length);if(r.length<=32)i.push(new ae(r,a.length+l.length));else{let d=r.length>>1;i.push(new ae(r.slice(0,d)),new ae(r.slice(d)))}}else i.push(l)}replace(e,t,i){if(!(i instanceof ae))return super.replace(e,t,i);[e,t]=xt(this,e,t);let s=vi(this.text,vi(i.text,qs(this.text,0,e)),t),l=this.length+i.length-(t-e);return s.length<=32?new ae(s,l):Re.from(ae.split(s,[]),l)}sliceString(e,t=this.length,i=`
|
|
2
|
+
`){[e,t]=xt(this,e,t);let s="";for(let l=0,a=0;l<=t&&a<this.text.length;a++){let r=this.text[a],d=l+r.length;l>e&&a&&(s+=i),e<d&&t>l&&(s+=r.slice(Math.max(0,e-l),t-l)),l=d+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let l of e)i.push(l),s+=l.length+1,i.length==32&&(t.push(new ae(i,s)),i=[],s=-1);return s>-1&&t.push(new ae(i,s)),t}}class Re extends X{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let l=0;;l++){let a=this.children[l],r=s+a.length,d=i+a.lines-1;if((t?d:r)>=e)return a.lineInner(e,t,i,s);s=r+1,i=d+1}}decompose(e,t,i,s){for(let l=0,a=0;a<=t&&l<this.children.length;l++){let r=this.children[l],d=a+r.length;if(e<=d&&t>=a){let c=s&((a<=e?1:0)|(d>=t?2:0));a>=e&&d<=t&&!c?i.push(r):r.decompose(e-a,t-a,i,c)}a=d+1}}replace(e,t,i){if([e,t]=xt(this,e,t),i.lines<this.lines)for(let s=0,l=0;s<this.children.length;s++){let a=this.children[s],r=l+a.length;if(e>=l&&t<=r){let d=a.replace(e-l,t-l,i),c=this.lines-a.lines+d.lines;if(d.lines<c>>4&&d.lines>c>>6){let h=this.children.slice();return h[s]=d,new Re(h,this.length-(t-e)+i.length)}return super.replace(l,r,d)}l=r+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
|
3
|
+
`){[e,t]=xt(this,e,t);let s="";for(let l=0,a=0;l<this.children.length&&a<=t;l++){let r=this.children[l],d=a+r.length;a>e&&l&&(s+=i),e<d&&t>a&&(s+=r.sliceString(e-a,t-a,i)),a=d+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Re))return 0;let i=0,[s,l,a,r]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,l+=t){if(s==a||l==r)return i;let d=this.children[s],c=e.children[l];if(d!=c)return i+d.scanIdentical(c,t);i+=d.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let b of e)b.flatten(p);return new ae(p,t)}let s=Math.max(32,i>>5),l=s<<1,a=s>>1,r=[],d=0,c=-1,h=[];function f(p){let b;if(p.lines>l&&p instanceof Re)for(let k of p.children)f(k);else p.lines>a&&(d>a||!d)?(u(),r.push(p)):p instanceof ae&&d&&(b=h[h.length-1])instanceof ae&&p.lines+b.lines<=32?(d+=p.lines,c+=p.length+1,h[h.length-1]=new ae(b.text.concat(p.text),b.length+1+p.length)):(d+p.lines>s&&u(),d+=p.lines,c+=p.length+1,h.push(p))}function u(){d!=0&&(r.push(h.length==1?h[0]:Re.from(h,c)),c=-1,d=h.length=0)}for(let p of e)f(p);return u(),r.length==1?r[0]:new Re(r,t)}}X.empty=new ae([""],0);function Td(o){let e=-1;for(let t of o)e+=t.length+1;return e}function vi(o,e,t=0,i=1e9){for(let s=0,l=0,a=!0;l<o.length&&s<=i;l++){let r=o[l],d=s+r.length;d>=t&&(d>i&&(r=r.slice(0,i-s)),s<t&&(r=r.slice(t-s)),a?(e[e.length-1]+=r,a=!1):e.push(r)),s=d+1}return e}function qs(o,e,t){return vi(o,[""],e,t)}class zt{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof ae?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],l=this.offsets[i],a=l>>1,r=s instanceof ae?s.text.length:s.children.length;if(a==(t>0?r:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
4
|
+
`,this;e--}else if(s instanceof ae){let d=s.text[a+(t<0?-1:0)];if(this.offsets[i]+=t,d.length>Math.max(0,e))return this.value=e==0?d:t>0?d.slice(e):d.slice(0,d.length-e),this;e-=d.length}else{let d=s.children[a+(t<0?-1:0)];e>d.length?(e-=d.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(d),this.offsets.push(t>0?1:(d instanceof ae?d.text.length:d.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Us{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new zt(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Ws{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(X.prototype[Symbol.iterator]=function(){return this.iter()},zt.prototype[Symbol.iterator]=Us.prototype[Symbol.iterator]=Ws.prototype[Symbol.iterator]=function(){return this});class Md{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function xt(o,e,t){return e=Math.max(0,Math.min(o.length,e)),[e,Math.max(e,Math.min(o.length,t))]}let vt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(o=>o?parseInt(o,36):1);for(let o=1;o<vt.length;o++)vt[o]+=vt[o-1];function Ed(o){for(let e=1;e<vt.length;e+=2)if(vt[e]>o)return vt[e-1]<=o;return!1}function Hs(o){return o>=127462&&o<=127487}const Ks=8205;function Ke(o,e,t=!0,i=!0){return(t?Qs:Id)(o,e,i)}function Qs(o,e,t){if(e==o.length)return e;e&&Gs(o.charCodeAt(e))&&Ys(o.charCodeAt(e-1))&&e--;let i=un(o,e);for(e+=Xs(i);e<o.length;){let s=un(o,e);if(i==Ks||s==Ks||t&&Ed(s))e+=Xs(s),i=s;else if(Hs(s)){let l=0,a=e-2;for(;a>=0&&Hs(un(o,a));)l++,a-=2;if(l%2==0)break;e+=2}else break}return e}function Id(o,e,t){for(;e>0;){let i=Qs(o,e-2,t);if(i<e)return i;e--}return 0}function Gs(o){return o>=56320&&o<57344}function Ys(o){return o>=55296&&o<56320}function un(o,e){let t=o.charCodeAt(e);if(!Ys(t)||e+1==o.length)return t;let i=o.charCodeAt(e+1);return Gs(i)?(t-55296<<10)+(i-56320)+65536:t}function Xs(o){return o<65536?1:2}const pn=/\r\n?|\n/;var Be=function(o){return o[o.Simple=0]="Simple",o[o.TrackDel=1]="TrackDel",o[o.TrackBefore=2]="TrackBefore",o[o.TrackAfter=3]="TrackAfter",o}(Be||(Be={}));class Qe{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let l=this.sections[t++],a=this.sections[t++];a<0?(e(i,s,l),s+=l):s+=a,i+=l}}iterChangedRanges(e,t=!1){mn(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s,i)}return new Qe(e)}composeDesc(e){return this.empty?e:e.empty?this:Js(this,e)}mapDesc(e,t=!1){return e.empty?this:gn(this,e,t)}mapPos(e,t=-1,i=Be.Simple){let s=0,l=0;for(let a=0;a<this.sections.length;){let r=this.sections[a++],d=this.sections[a++],c=s+r;if(d<0){if(c>e)return l+(e-s);l+=r}else{if(i!=Be.Simple&&c>=e&&(i==Be.TrackDel&&s<e&&c>e||i==Be.TrackBefore&&s<e||i==Be.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!r)return e==s||t<0?l:l+d;l+=d}s=c}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return l}touchesRange(e,t=e){for(let i=0,s=0;i<this.sections.length&&s<=t;){let l=this.sections[i++],a=this.sections[i++],r=s+l;if(a>=0&&s<=t&&r>=e)return s<e&&r>t?"cover":!0;s=r}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+i+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Qe(e)}static create(e){return new Qe(e)}}class ue extends Qe{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return mn(this,(t,i,s,l,a)=>e=e.replace(s,s+(i-t),a),!1),e}mapDesc(e,t=!1){return gn(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,l=0;s<t.length;s+=2){let a=t[s],r=t[s+1];if(r>=0){t[s]=r,t[s+1]=a;let d=s>>1;for(;i.length<d;)i.push(X.empty);i.push(a?e.slice(l,l+a):X.empty)}l+=a}return new ue(t,i)}compose(e){return this.empty?e:e.empty?this:Js(this,e,!0)}map(e,t=!1){return e.empty?this:gn(this,e,t,!0)}iterChanges(e,t=!1){mn(this,e,t)}get desc(){return Qe.create(this.sections)}filter(e){let t=[],i=[],s=[],l=new qt(this);e:for(let a=0,r=0;;){let d=a==e.length?1e9:e[a++];for(;r<d||r==d&&l.len==0;){if(l.done)break e;let h=Math.min(l.len,d-r);ke(s,h,-1);let f=l.ins==-1?-1:l.off==0?l.ins:0;ke(t,h,f),f>0&&nt(i,t,l.text),l.forward(h),r+=h}let c=e[a++];for(;r<c;){if(l.done)break e;let h=Math.min(l.len,c-r);ke(t,h,-1),ke(s,h,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(h),r+=h}}return{changes:new ue(t,i),filtered:Qe.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],s=this.sections[t+1];s<0?e.push(i):s==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let s=[],l=[],a=0,r=null;function d(h=!1){if(!h&&!s.length)return;a<t&&ke(s,t-a,-1);let f=new ue(s,l);r=r?r.compose(f.map(r)):f,s=[],l=[],a=0}function c(h){if(Array.isArray(h))for(let f of h)c(f);else if(h instanceof ue){if(h.length!=t)throw new RangeError(`Mismatched change set length (got ${h.length}, expected ${t})`);d(),r=r?r.compose(h.map(r)):h}else{let{from:f,to:u=f,insert:p}=h;if(f>u||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let b=p?typeof p=="string"?X.of(p.split(i||pn)):p:X.empty,k=b.length;if(f==u&&k==0)return;f<a&&d(),f>a&&ke(s,f-a,-1),ke(s,u-f,k),nt(l,s,b),a=u}}return c(e),d(!r),r}static empty(e){return new ue(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;s<e.length;s++){let l=e[s];if(typeof l=="number")t.push(l,-1);else{if(!Array.isArray(l)||typeof l[0]!="number"||l.some((a,r)=>r&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)t.push(l[0],0);else{for(;i.length<s;)i.push(X.empty);i[s]=X.of(l.slice(1)),t.push(l[0],i[s].length)}}}return new ue(t,i)}static createSet(e,t){return new ue(e,t)}}function ke(o,e,t,i=!1){if(e==0&&t<=0)return;let s=o.length-2;s>=0&&t<=0&&t==o[s+1]?o[s]+=e:e==0&&o[s]==0?o[s+1]+=t:i?(o[s]+=e,o[s+1]+=t):o.push(e,t)}function nt(o,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<o.length)o[o.length-1]=o[o.length-1].append(t);else{for(;o.length<i;)o.push(X.empty);o.push(t)}}function mn(o,e,t){let i=o.inserted;for(let s=0,l=0,a=0;a<o.sections.length;){let r=o.sections[a++],d=o.sections[a++];if(d<0)s+=r,l+=r;else{let c=s,h=l,f=X.empty;for(;c+=r,h+=d,d&&i&&(f=f.append(i[a-2>>1])),!(t||a==o.sections.length||o.sections[a+1]<0);)r=o.sections[a++],d=o.sections[a++];e(s,c,l,h,f),s=c,l=h}}}function gn(o,e,t,i=!1){let s=[],l=i?[]:null,a=new qt(o),r=new qt(e);for(let d=-1;;)if(a.ins==-1&&r.ins==-1){let c=Math.min(a.len,r.len);ke(s,c,-1),a.forward(c),r.forward(c)}else if(r.ins>=0&&(a.ins<0||d==a.i||a.off==0&&(r.len<a.len||r.len==a.len&&!t))){let c=r.len;for(ke(s,r.ins,-1);c;){let h=Math.min(a.len,c);a.ins>=0&&d<a.i&&a.len<=h&&(ke(s,0,a.ins),l&&nt(l,s,a.text),d=a.i),a.forward(h),c-=h}r.next()}else if(a.ins>=0){let c=0,h=a.len;for(;h;)if(r.ins==-1){let f=Math.min(h,r.len);c+=f,h-=f,r.forward(f)}else if(r.ins==0&&r.len<h)h-=r.len,r.next();else break;ke(s,c,d<a.i?a.ins:0),l&&d<a.i&&nt(l,s,a.text),d=a.i,a.forward(a.len-h)}else{if(a.done&&r.done)return l?ue.createSet(s,l):Qe.create(s);throw new Error("Mismatched change set lengths")}}function Js(o,e,t=!1){let i=[],s=t?[]:null,l=new qt(o),a=new qt(e);for(let r=!1;;){if(l.done&&a.done)return s?ue.createSet(i,s):Qe.create(i);if(l.ins==0)ke(i,l.len,0,r),l.next();else if(a.len==0&&!a.done)ke(i,0,a.ins,r),s&&nt(s,i,a.text),a.next();else{if(l.done||a.done)throw new Error("Mismatched change set lengths");{let d=Math.min(l.len2,a.len),c=i.length;if(l.ins==-1){let h=a.ins==-1?-1:a.off?0:a.ins;ke(i,d,h,r),s&&h&&nt(s,i,a.text)}else a.ins==-1?(ke(i,l.off?0:l.len,d,r),s&&nt(s,i,l.textBit(d))):(ke(i,l.off?0:l.len,a.off?0:a.ins,r),s&&!a.off&&nt(s,i,a.text));r=(l.ins>d||a.ins>=0&&a.len>d)&&(r||i.length>c),l.forward2(d),a.forward(d)}}}}class qt{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?X.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?X.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ut{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new ut(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return U.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return U.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return U.range(e.anchor,e.head)}static create(e,t,i){return new ut(e,t,i)}}class U{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:U.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new U([this.main],0)}addRange(e,t=!0){return U.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,U.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new U(e.ranges.map(t=>ut.fromJSON(t)),e.main)}static single(e,t=e){return new U([U.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;s<e.length;s++){let l=e[s];if(l.empty?l.from<=i:l.from<i)return U.normalized(e.slice(),t);i=l.to}return new U(e,t)}static cursor(e,t=0,i,s){return ut.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(s??16777215)<<6)}static range(e,t,i,s){let l=(i??16777215)<<6|(s==null?7:Math.min(6,s));return t<e?ut.create(t,e,48|l):ut.create(e,t,(t>e?8:0)|l)}static normalized(e,t=0){let i=e[t];e.sort((s,l)=>s.from-l.from),t=e.indexOf(i);for(let s=1;s<e.length;s++){let l=e[s],a=e[s-1];if(l.empty?l.from<=a.to:l.from<a.to){let r=a.from,d=Math.max(l.to,a.to);s<=t&&t--,e.splice(--s,2,l.anchor>l.head?U.range(d,r):U.range(r,d))}}return new U(e,t)}}function Zs(o,e){for(let t of o.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let kn=0;class H{constructor(e,t,i,s,l){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=kn++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new H(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:bn),!!e.static,e.enables)}of(e){return new Ci([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ci(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ci(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function bn(o,e){return o==e||o.length==e.length&&o.every((t,i)=>t===e[i])}class Ci{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=kn++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,l=this.id,a=e[l]>>1,r=this.type==2,d=!1,c=!1,h=[];for(let f of this.dependencies)f=="doc"?d=!0:f=="selection"?c=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||h.push(e[f.id]);return{create(f){return f.values[a]=i(f),1},update(f,u){if(d&&u.docChanged||c&&(u.docChanged||u.selection)||wn(f,h)){let p=i(f);if(r?!el(p,f.values[a],s):!s(p,f.values[a]))return f.values[a]=p,1}return 0},reconfigure:(f,u)=>{let p,b=u.config.address[l];if(b!=null){let k=Bi(u,b);if(this.dependencies.every(v=>v instanceof H?u.facet(v)===f.facet(v):v instanceof pt?u.field(v,!1)==f.field(v,!1):!0)||(r?el(p=i(f),k,s):s(p=i(f),k)))return f.values[a]=k,0}else p=i(f);return f.values[a]=p,1}}}}function el(o,e,t){if(o.length!=e.length)return!1;for(let i=0;i<o.length;i++)if(!t(o[i],e[i]))return!1;return!0}function wn(o,e){let t=!1;for(let i of e)Wt(o,i)&1&&(t=!0);return t}function Dd(o,e,t){let i=t.map(d=>o[d.id]),s=t.map(d=>d.type),l=i.filter(d=>!(d&1)),a=o[e.id]>>1;function r(d){let c=[];for(let h=0;h<i.length;h++){let f=Bi(d,i[h]);if(s[h]==2)for(let u of f)c.push(u);else c.push(f)}return e.combine(c)}return{create(d){for(let c of i)Wt(d,c);return d.values[a]=r(d),1},update(d,c){if(!wn(d,l))return 0;let h=r(d);return e.compare(h,d.values[a])?0:(d.values[a]=h,1)},reconfigure(d,c){let h=wn(d,i),f=c.config.facets[e.id],u=c.facet(e);if(f&&!h&&bn(t,f))return d.values[a]=u,0;let p=r(d);return e.compare(p,u)?(d.values[a]=u,0):(d.values[a]=p,1)}}}const tl=H.define({static:!0});class pt{constructor(e,t,i,s,l){this.id=e,this.createF=t,this.updateF=i,this.compareF=s,this.spec=l,this.provides=void 0}static define(e){let t=new pt(kn++,e.create,e.update,e.compare||((i,s)=>i===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(tl).find(i=>i.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let l=i.values[t],a=this.updateF(l,s);return this.compareF(l,a)?0:(i.values[t]=a,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,tl.of({field:this,create:e})]}get extension(){return this}}const mt={lowest:4,low:3,default:2,high:1,highest:0};function Ut(o){return e=>new il(e,o)}const Pd={highest:Ut(mt.highest),high:Ut(mt.high),default:Ut(mt.default),low:Ut(mt.low),lowest:Ut(mt.lowest)};class il{constructor(e,t){this.inner=e,this.prec=t}}class Si{of(e){return new yn(this,e)}reconfigure(e){return Si.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class yn{constructor(e,t){this.compartment=e,this.inner=t}}class Ni{constructor(e,t,i,s,l,a){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=l,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let s=[],l=Object.create(null),a=new Map;for(let u of $d(e,t,a))u instanceof pt?s.push(u):(l[u.facet.id]||(l[u.facet.id]=[])).push(u);let r=Object.create(null),d=[],c=[];for(let u of s)r[u.id]=c.length<<1,c.push(p=>u.slot(p));let h=i?.config.facets;for(let u in l){let p=l[u],b=p[0].facet,k=h&&h[u]||[];if(p.every(v=>v.type==0))if(r[b.id]=d.length<<1|1,bn(k,p))d.push(i.facet(b));else{let v=b.combine(p.map(C=>C.value));d.push(i&&b.compare(v,i.facet(b))?i.facet(b):v)}else{for(let v of p)v.type==0?(r[v.id]=d.length<<1|1,d.push(v.value)):(r[v.id]=c.length<<1,c.push(C=>v.dynamicSlot(C)));r[b.id]=c.length<<1,c.push(v=>Dd(v,b,p))}}let f=c.map(u=>u(r));return new Ni(e,a,f,r,d,l)}}function $d(o,e,t){let i=[[],[],[],[],[]],s=new Map;function l(a,r){let d=s.get(a);if(d!=null){if(d<=r)return;let c=i[d].indexOf(a);c>-1&&i[d].splice(c,1),a instanceof yn&&t.delete(a.compartment)}if(s.set(a,r),Array.isArray(a))for(let c of a)l(c,r);else if(a instanceof yn){if(t.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(a.compartment)||a.inner;t.set(a.compartment,c),l(c,r)}else if(a instanceof il)l(a.inner,a.prec);else if(a instanceof pt)i[r].push(a),a.provides&&l(a.provides,r);else if(a instanceof Ci)i[r].push(a),a.facet.extensions&&l(a.facet.extensions,mt.default);else{let c=a.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(c,r)}}return l(o,mt.default),i.reduce((a,r)=>a.concat(r))}function Wt(o,e){if(e&1)return 2;let t=e>>1,i=o.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;o.status[t]=4;let s=o.computeSlot(o,o.config.dynamicSlots[t]);return o.status[t]=2|s}function Bi(o,e){return e&1?o.config.staticValues[e>>1]:o.values[e>>1]}const nl=H.define(),xn=H.define({combine:o=>o.some(e=>e),static:!0}),sl=H.define({combine:o=>o.length?o[0]:void 0,static:!0}),ll=H.define(),ol=H.define(),al=H.define(),rl=H.define({combine:o=>o.length?o[0]:!1});class Ct{constructor(e,t){this.type=e,this.value=t}static define(){return new Fd}}class Fd{of(e){return new Ct(this,e)}}class Rd{constructor(e){this.map=e}of(e){return new ce(this,e)}}class ce{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new ce(this.type,t)}is(e){return this.type==e}static define(e={}){return new Rd(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let l=s.map(t);l&&i.push(l)}return i}}ce.reconfigure=ce.define(),ce.appendConfig=ce.define();class be{constructor(e,t,i,s,l,a){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=l,this.scrollIntoView=a,this._doc=null,this._state=null,i&&Zs(i,t.newLength),l.some(r=>r.type==be.time)||(this.annotations=l.concat(be.time.of(Date.now())))}static create(e,t,i,s,l,a){return new be(e,t,i,s,l,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(be.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}be.time=Ct.define(),be.userEvent=Ct.define(),be.addToHistory=Ct.define(),be.remote=Ct.define();function Ld(o,e){let t=[];for(let i=0,s=0;;){let l,a;if(i<o.length&&(s==e.length||e[s]>=o[i]))l=o[i++],a=o[i++];else if(s<e.length)l=e[s++],a=e[s++];else return t;!t.length||t[t.length-1]<l?t.push(l,a):t[t.length-1]<a&&(t[t.length-1]=a)}}function dl(o,e,t){var i;let s,l,a;return t?(s=e.changes,l=ue.empty(e.changes.length),a=o.changes.compose(e.changes)):(s=e.changes.map(o.changes),l=o.changes.mapDesc(e.changes,!0),a=o.changes.compose(s)),{changes:a,selection:e.selection?e.selection.map(l):(i=o.selection)===null||i===void 0?void 0:i.map(s),effects:ce.mapEffects(o.effects,s).concat(ce.mapEffects(e.effects,l)),annotations:o.annotations.length?o.annotations.concat(e.annotations):e.annotations,scrollIntoView:o.scrollIntoView||e.scrollIntoView}}function vn(o,e,t){let i=e.selection,s=St(e.annotations);return e.userEvent&&(s=s.concat(be.userEvent.of(e.userEvent))),{changes:e.changes instanceof ue?e.changes:ue.of(e.changes||[],t,o.facet(sl)),selection:i&&(i instanceof U?i:U.single(i.anchor,i.head)),effects:St(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function cl(o,e,t){let i=vn(o,e.length?e[0]:{},o.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let l=1;l<e.length;l++){e[l].filter===!1&&(t=!1);let a=!!e[l].sequential;i=dl(i,vn(o,e[l],a?i.changes.newLength:o.doc.length),a)}let s=be.create(o,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return zd(t?jd(s):s)}function jd(o){let e=o.startState,t=!0;for(let s of e.facet(ll)){let l=s(o);if(l===!1){t=!1;break}Array.isArray(l)&&(t=t===!0?l:Ld(t,l))}if(t!==!0){let s,l;if(t===!1)l=o.changes.invertedDesc,s=ue.empty(e.doc.length);else{let a=o.changes.filter(t);s=a.changes,l=a.filtered.mapDesc(a.changes).invertedDesc}o=be.create(e,s,o.selection&&o.selection.map(l),ce.mapEffects(o.effects,l),o.annotations,o.scrollIntoView)}let i=e.facet(ol);for(let s=i.length-1;s>=0;s--){let l=i[s](o);l instanceof be?o=l:Array.isArray(l)&&l.length==1&&l[0]instanceof be?o=l[0]:o=cl(e,St(l),!1)}return o}function zd(o){let e=o.startState,t=e.facet(al),i=o;for(let s=t.length-1;s>=0;s--){let l=t[s](o);l&&Object.keys(l).length&&(i=dl(i,vn(e,l,o.changes.newLength),!0))}return i==o?o:be.create(e,o.changes,o.selection,i.effects,i.annotations,i.scrollIntoView)}const qd=[];function St(o){return o==null?qd:Array.isArray(o)?o:[o]}var Ge=function(o){return o[o.Word=0]="Word",o[o.Space=1]="Space",o[o.Other=2]="Other",o}(Ge||(Ge={}));const Ud=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Cn;try{Cn=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Wd(o){if(Cn)return Cn.test(o);for(let e=0;e<o.length;e++){let t=o[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||Ud.test(t)))return!0}return!1}function Hd(o){return e=>{if(!/\S/.test(e))return Ge.Space;if(Wd(e))return Ge.Word;for(let t=0;t<o.length;t++)if(e.indexOf(o[t])>-1)return Ge.Word;return Ge.Other}}class ee{constructor(e,t,i,s,l,a){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=l,a&&(a._state=this);for(let r=0;r<this.config.dynamicSlots.length;r++)Wt(this,r<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return Wt(this,i),Bi(this,i)}update(...e){return cl(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:s}=t;for(let r of e.effects)r.is(Si.reconfigure)?(t&&(s=new Map,t.compartments.forEach((d,c)=>s.set(c,d)),t=null),s.set(r.value.compartment,r.value.extension)):r.is(ce.reconfigure)?(t=null,i=r.value):r.is(ce.appendConfig)&&(t=null,i=St(i).concat(r.value));let l;t?l=e.startState.values.slice():(t=Ni.resolve(i,s,this),l=new ee(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(d,c)=>c.reconfigure(d,this),null).values);let a=e.startState.facet(xn)?e.newSelection:e.newSelection.asSingle();new ee(t,e.newDoc,a,l,(r,d)=>d.update(r,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:U.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),l=[i.range],a=St(i.effects);for(let r=1;r<t.ranges.length;r++){let d=e(t.ranges[r]),c=this.changes(d.changes),h=c.map(s);for(let u=0;u<r;u++)l[u]=l[u].map(h);let f=s.mapDesc(c,!0);l.push(d.range.map(f)),s=s.compose(h),a=ce.mapEffects(a,h).concat(ce.mapEffects(St(d.effects),f))}return{changes:s,selection:U.create(l,t.mainIndex),effects:a}}changes(e=[]){return e instanceof ue?e:ue.of(e,this.doc.length,this.facet(ee.lineSeparator))}toText(e){return X.of(e.split(this.facet(ee.lineSeparator)||pn))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Wt(this,t),Bi(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let s=e[i];s instanceof pt&&this.config.address[s.id]!=null&&(t[i]=s.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(i){for(let l in i)if(Object.prototype.hasOwnProperty.call(e,l)){let a=i[l],r=e[l];s.push(a.init(d=>a.spec.fromJSON(r,d)))}}return ee.create({doc:e.doc,selection:U.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Ni.resolve(e.extensions||[],new Map),i=e.doc instanceof X?e.doc:X.of((e.doc||"").split(t.staticFacet(ee.lineSeparator)||pn)),s=e.selection?e.selection instanceof U?e.selection:U.single(e.selection.anchor,e.selection.head):U.single(0);return Zs(s,i.length),t.staticFacet(xn)||(s=s.asSingle()),new ee(t,i,s,t.dynamicSlots.map(()=>null),(l,a)=>a.create(l),null)}get tabSize(){return this.facet(ee.tabSize)}get lineBreak(){return this.facet(ee.lineSeparator)||`
|
|
5
|
+
`}get readOnly(){return this.facet(rl)}phrase(e,...t){for(let i of this.facet(ee.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let l=+(s||1);return!l||l>t.length?i:t[l-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let l of this.facet(nl))for(let a of l(this,t,i))Object.prototype.hasOwnProperty.call(a,e)&&s.push(a[e]);return s}charCategorizer(e){return Hd(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),l=this.charCategorizer(e),a=e-i,r=e-i;for(;a>0;){let d=Ke(t,a,!1);if(l(t.slice(d,a))!=Ge.Word)break;a=d}for(;r<s;){let d=Ke(t,r);if(l(t.slice(r,d))!=Ge.Word)break;r=d}return a==r?null:U.range(a+i,r+i)}}ee.allowMultipleSelections=xn,ee.tabSize=H.define({combine:o=>o.length?o[0]:4}),ee.lineSeparator=sl,ee.readOnly=rl,ee.phrases=H.define({compare(o,e){let t=Object.keys(o),i=Object.keys(e);return t.length==i.length&&t.every(s=>o[s]==e[s])}}),ee.languageData=nl,ee.changeFilter=ll,ee.transactionFilter=ol,ee.transactionExtender=al,Si.reconfigure=ce.define();class Nt{eq(e){return this==e}range(e,t=e){return Ht.create(e,t,this)}}Nt.prototype.startSide=Nt.prototype.endSide=0,Nt.prototype.point=!1,Nt.prototype.mapMode=Be.TrackDel;class Ht{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new Ht(e,t,i)}}function Sn(o,e){return o.from-e.from||o.value.startSide-e.value.startSide}class Nn{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let l=i?this.to:this.from;for(let a=s,r=l.length;;){if(a==r)return a;let d=a+r>>1,c=l[d]-e||(i?this.value[d].endSide:this.value[d].startSide)-t;if(d==a)return c>=0?a:r;c>=0?r=d:a=d+1}}between(e,t,i,s){for(let l=this.findIndex(t,-1e9,!0),a=this.findIndex(i,1e9,!1,l);l<a;l++)if(s(this.from[l]+e,this.to[l]+e,this.value[l])===!1)return!1}map(e,t){let i=[],s=[],l=[],a=-1,r=-1;for(let d=0;d<this.value.length;d++){let c=this.value[d],h=this.from[d]+e,f=this.to[d]+e,u,p;if(h==f){let b=t.mapPos(h,c.startSide,c.mapMode);if(b==null||(u=p=b,c.startSide!=c.endSide&&(p=t.mapPos(h,c.endSide),p<u)))continue}else if(u=t.mapPos(h,c.startSide),p=t.mapPos(f,c.endSide),u>p||u==p&&c.startSide>0&&c.endSide<=0)continue;(p-u||c.endSide-c.startSide)<0||(a<0&&(a=u),c.point&&(r=Math.max(r,p-u)),i.push(c),s.push(u-a),l.push(p-a))}return{mapped:i.length?new Nn(s,l,i,r):null,pos:a}}}class le{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new le(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:l=this.length}=e,a=e.filter;if(t.length==0&&!a)return this;if(i&&(t=t.slice().sort(Sn)),this.isEmpty)return t.length?le.of(t):this;let r=new fl(this,null,-1).goto(0),d=0,c=[],h=new Oi;for(;r.value||d<t.length;)if(d<t.length&&(r.from-t[d].from||r.startSide-t[d].value.startSide)>=0){let f=t[d++];h.addInner(f.from,f.to,f.value)||c.push(f)}else r.rangeIndex==1&&r.chunkIndex<this.chunk.length&&(d==t.length||this.chunkEnd(r.chunkIndex)<t[d].from)&&(!a||s>this.chunkEnd(r.chunkIndex)||l<this.chunkPos[r.chunkIndex])&&h.addChunk(this.chunkPos[r.chunkIndex],this.chunk[r.chunkIndex])?r.nextChunk():((!a||s>r.to||l<r.from||a(r.from,r.to,r.value))&&(h.addInner(r.from,r.to,r.value)||c.push(Ht.create(r.from,r.to,r.value))),r.next());return h.finishInner(this.nextLayer.isEmpty&&!c.length?le.empty:this.nextLayer.update({add:c,filter:a,filterFrom:s,filterTo:l}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],s=-1;for(let a=0;a<this.chunk.length;a++){let r=this.chunkPos[a],d=this.chunk[a],c=e.touchesRange(r,r+d.length);if(c===!1)s=Math.max(s,d.maxPoint),t.push(d),i.push(e.mapPos(r));else if(c===!0){let{mapped:h,pos:f}=d.map(r,e);h&&(s=Math.max(s,h.maxPoint),t.push(h),i.push(f))}}let l=this.nextLayer.map(e);return t.length==0?l:new le(i,t,l||le.empty,s)}between(e,t,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let l=this.chunkPos[s],a=this.chunk[s];if(t>=l&&e<=l+a.length&&a.between(l,e-l,t-l,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return Kt.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Kt.from(e).goto(t)}static compare(e,t,i,s,l=-1){let a=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=l),r=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=l),d=hl(a,r,i),c=new Qt(a,d,l),h=new Qt(r,d,l);i.iterGaps((f,u,p)=>ul(c,f,h,u,p,s)),i.empty&&i.length==0&&ul(c,0,h,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=999999999);let l=e.filter(h=>!h.isEmpty&&t.indexOf(h)<0),a=t.filter(h=>!h.isEmpty&&e.indexOf(h)<0);if(l.length!=a.length)return!1;if(!l.length)return!0;let r=hl(l,a),d=new Qt(l,r,0).goto(i),c=new Qt(a,r,0).goto(i);for(;;){if(d.to!=c.to||!On(d.active,c.active)||d.point&&(!c.point||!d.point.eq(c.point)))return!1;if(d.to>s)return!0;d.next(),c.next()}}static spans(e,t,i,s,l=-1){let a=new Qt(e,null,l).goto(t),r=t,d=a.openStart;for(;;){let c=Math.min(a.to,i);if(a.point){let h=a.activeForPoint(a.to),f=a.pointFrom<t?h.length+1:a.point.startSide<0?h.length:Math.min(h.length,d);s.point(r,c,a.point,h,f,a.pointRank),d=Math.min(a.openEnd(c),h.length)}else c>r&&(s.span(r,c,a.active,d),d=a.openEnd(c));if(a.to>i)return d+(a.point&&a.to>i?1:0);r=a.to,a.next()}}static of(e,t=!1){let i=new Oi;for(let s of e instanceof Ht?[e]:t?Kd(e):e)i.add(s.from,s.to,s.value);return i.finish()}static join(e){if(!e.length)return le.empty;let t=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let s=e[i];s!=le.empty;s=s.nextLayer)t=new le(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}le.empty=new le([],[],null,-1);function Kd(o){if(o.length>1)for(let e=o[0],t=1;t<o.length;t++){let i=o[t];if(Sn(e,i)>0)return o.slice().sort(Sn);e=i}return o}le.empty.nextLayer=le.empty;class Oi{finishChunk(e){this.chunks.push(new Nn(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new Oi)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(le.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=le.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function hl(o,e,t){let i=new Map;for(let l of o)for(let a=0;a<l.chunk.length;a++)l.chunk[a].maxPoint<=0&&i.set(l.chunk[a],l.chunkPos[a]);let s=new Set;for(let l of e)for(let a=0;a<l.chunk.length;a++){let r=i.get(l.chunk[a]);r!=null&&(t?t.mapPos(r):r)==l.chunkPos[a]&&!t?.touchesRange(r,r+l.chunk[a].length)&&s.add(l.chunk[a])}return s}class fl{constructor(e,t,i,s=0){this.layer=e,this.skip=t,this.minPoint=i,this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,i){for(;this.chunkIndex<this.layer.chunk.length;){let s=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(s)||this.layer.chunkEnd(this.chunkIndex)<e||s.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!i||this.rangeIndex<s)&&this.setRangeIndex(s)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],i=e+t.from[this.rangeIndex];if(this.from=i,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Kt{constructor(e){this.heap=e}static from(e,t=null,i=-1){let s=[];for(let l=0;l<e.length;l++)for(let a=e[l];!a.isEmpty;a=a.nextLayer)a.maxPoint>=i&&s.push(new fl(a,t,i,l));return s.length==1?s[0]:new Kt(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)Bn(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)Bn(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Bn(this.heap,0)}}}function Bn(o,e){for(let t=o[e];;){let i=(e<<1)+1;if(i>=o.length)break;let s=o[i];if(i+1<o.length&&s.compare(o[i+1])>=0&&(s=o[i+1],i++),t.compare(s)<0)break;o[i]=t,o[e]=s,e=i}}class Qt{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Kt.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Vi(this.active,e),Vi(this.activeTo,e),Vi(this.activeRank,e),this.minActive=pl(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:l}=this.cursor;for(;t<this.activeRank.length&&(l-this.activeRank[t]||s-this.activeTo[t])>0;)t++;_i(this.active,t,i),_i(this.activeTo,t,s),_i(this.activeRank,t,l),e&&_i(e,t,this.cursor.from),this.minActive=pl(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&Vi(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=l,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=l.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let s=i.length-1;s>=0&&i[s]<e;s--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function ul(o,e,t,i,s,l){o.goto(e),t.goto(i);let a=i+s,r=i,d=i-e;for(;;){let c=o.to+d-t.to||o.endSide-t.endSide,h=c<0?o.to+d:t.to,f=Math.min(h,a);if(o.point||t.point?o.point&&t.point&&(o.point==t.point||o.point.eq(t.point))&&On(o.activeForPoint(o.to),t.activeForPoint(t.to))||l.comparePoint(r,f,o.point,t.point):f>r&&!On(o.active,t.active)&&l.compareRange(r,f,o.active,t.active),h>a)break;r=h,c<=0&&o.next(),c>=0&&t.next()}}function On(o,e){if(o.length!=e.length)return!1;for(let t=0;t<o.length;t++)if(o[t]!=e[t]&&!o[t].eq(e[t]))return!1;return!0}function Vi(o,e){for(let t=e,i=o.length-1;t<i;t++)o[t]=o[t+1];o.pop()}function _i(o,e,t){for(let i=o.length-1;i>=e;i--)o[i+1]=o[i];o[e]=t}function pl(o,e){let t=-1,i=1e9;for(let s=0;s<e.length;s++)(e[s]-i||o[s].endSide-o[t].endSide)<0&&(t=s,i=e[s]);return t}function Qd(o,e,t,i){for(let s=0,l=0;;){if(l>=e)return s;if(s==o.length)break;l+=o.charCodeAt(s)==9?t-l%t:1,s=Ke(o,s)}return i===!0?-1:o.length}const Vn="ͼ",ml=typeof Symbol>"u"?"__"+Vn:Symbol.for(Vn),_n=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),gl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class st{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function l(a,r,d,c){let h=[],f=/^@(\w+)\b/.exec(a[0]),u=f&&f[1]=="keyframes";if(f&&r==null)return d.push(a[0]+";");for(let p in r){let b=r[p];if(/&/.test(p))l(p.split(/,\s*/).map(k=>a.map(v=>k.replace(/&/,v))).reduce((k,v)=>k.concat(v)),b,d);else if(b&&typeof b=="object"){if(!f)throw new RangeError("The value of a property ("+p+") should be a primitive value.");l(s(p),b,h,u)}else b!=null&&h.push(p.replace(/_.*/,"").replace(/[A-Z]/g,k=>"-"+k.toLowerCase())+": "+b+";")}(h.length||u)&&d.push((i&&!f&&!c?a.map(i):a).join(", ")+" {"+h.join(" ")+"}")}for(let a in e)l(s(a),e[a],this.rules)}getRules(){return this.rules.join(`
|
|
6
|
+
`)}static newName(){let e=gl[ml]||1;return gl[ml]=e+1,Vn+e.toString(36)}static mount(e,t,i){let s=e[_n],l=i&&i.nonce;s?l&&s.setNonce(l):s=new Gd(e,l),s.mount(Array.isArray(t)?t:[t],e)}}let kl=new Map;class Gd{constructor(e,t){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let l=kl.get(i);if(l)return e[_n]=l;this.sheet=new s.CSSStyleSheet,kl.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[_n]=this}mount(e,t){let i=this.sheet,s=0,l=0;for(let a=0;a<e.length;a++){let r=e[a],d=this.modules.indexOf(r);if(d<l&&d>-1&&(this.modules.splice(d,1),l--,d=-1),d==-1){if(this.modules.splice(l++,0,r),i)for(let c=0;c<r.rules.length;c++)i.insertRule(r.rules[c],s++)}else{for(;l<d;)s+=this.modules[l++].rules.length;s+=r.rules.length,l++}}if(i)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let a="";for(let d=0;d<this.modules.length;d++)a+=this.modules[d].getRules()+`
|
|
7
|
+
`;this.styleTag.textContent=a;let r=t.head||t;this.styleTag.parentNode!=r&&r.insertBefore(this.styleTag,r.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var Bt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},An={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},pe=0;pe<10;pe++)Bt[48+pe]=Bt[96+pe]=String(pe);for(var pe=1;pe<=24;pe++)Bt[pe+111]="F"+pe;for(var pe=65;pe<=90;pe++)Bt[pe]=String.fromCharCode(pe+32),An[pe]=String.fromCharCode(pe);for(var Tn in Bt)An.hasOwnProperty(Tn)||(An[Tn]=Bt[Tn]);function Gt(o){let e;return o.nodeType==11?e=o.getSelection?o:o.ownerDocument:e=o,e.getSelection()}function Mn(o,e){return e?o==e||o.contains(e.nodeType!=1?e.parentNode:e):!1}function Yd(o){let e=o.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Ai(o,e){if(!e.anchorNode)return!1;try{return Mn(o,e.anchorNode)}catch{return!1}}function Yt(o){return o.nodeType==3?kt(o,0,o.nodeValue.length).getClientRects():o.nodeType==1?o.getClientRects():[]}function Xt(o,e,t,i){return t?bl(o,e,t,i,-1)||bl(o,e,t,i,1):!1}function gt(o){for(var e=0;;e++)if(o=o.previousSibling,!o)return e}function Ti(o){return o.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(o.nodeName)}function bl(o,e,t,i,s){for(;;){if(o==t&&e==i)return!0;if(e==(s<0?0:Ye(o))){if(o.nodeName=="DIV")return!1;let l=o.parentNode;if(!l||l.nodeType!=1)return!1;e=gt(o)+(s<0?0:1),o=l}else if(o.nodeType==1){if(o=o.childNodes[e+(s<0?-1:0)],o.nodeType==1&&o.contentEditable=="false")return!1;e=s<0?Ye(o):0}else return!1}}function Ye(o){return o.nodeType==3?o.nodeValue.length:o.childNodes.length}function Mi(o,e){let t=e?o.left:o.right;return{left:t,right:t,top:o.top,bottom:o.bottom}}function Xd(o){let e=o.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:o.innerWidth,top:0,bottom:o.innerHeight}}function wl(o,e){let t=e.width/o.offsetWidth,i=e.height/o.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-o.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-o.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}function Jd(o,e,t,i,s,l,a,r){let d=o.ownerDocument,c=d.defaultView||window;for(let h=o,f=!1;h&&!f;)if(h.nodeType==1){let u,p=h==d.body,b=1,k=1;if(p)u=Xd(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(h).position)&&(f=!0),h.scrollHeight<=h.clientHeight&&h.scrollWidth<=h.clientWidth){h=h.assignedSlot||h.parentNode;continue}let x=h.getBoundingClientRect();({scaleX:b,scaleY:k}=wl(h,x)),u={left:x.left,right:x.left+h.clientWidth*b,top:x.top,bottom:x.top+h.clientHeight*k}}let v=0,C=0;if(s=="nearest")e.top<u.top?(C=-(u.top-e.top+a),t>0&&e.bottom>u.bottom+C&&(C=e.bottom-u.bottom+C+a)):e.bottom>u.bottom&&(C=e.bottom-u.bottom+a,t<0&&e.top-C<u.top&&(C=-(u.top+C-e.top+a)));else{let x=e.bottom-e.top,V=u.bottom-u.top;C=(s=="center"&&x<=V?e.top+x/2-V/2:s=="start"||s=="center"&&t<0?e.top-a:e.bottom-V+a)-u.top}if(i=="nearest"?e.left<u.left?(v=-(u.left-e.left+l),t>0&&e.right>u.right+v&&(v=e.right-u.right+v+l)):e.right>u.right&&(v=e.right-u.right+l,t<0&&e.left<u.left+v&&(v=-(u.left+v-e.left+l))):v=(i=="center"?e.left+(e.right-e.left)/2-(u.right-u.left)/2:i=="start"==r?e.left-l:e.right-(u.right-u.left)+l)-u.left,v||C)if(p)c.scrollBy(v,C);else{let x=0,V=0;if(C){let g=h.scrollTop;h.scrollTop+=C/k,V=(h.scrollTop-g)*k}if(v){let g=h.scrollLeft;h.scrollLeft+=v/b,x=(h.scrollLeft-g)*b}e={left:e.left-x,top:e.top-V,right:e.right-x,bottom:e.bottom-V},x&&Math.abs(x-v)<1&&(i="nearest"),V&&Math.abs(V-C)<1&&(s="nearest")}if(p)break;h=h.assignedSlot||h.parentNode}else if(h.nodeType==11)h=h.host;else break}function Zd(o){let e=o.ownerDocument,t,i;for(let s=o.parentNode;s&&!(s==e.body||t&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),!t&&s.scrollWidth>s.clientWidth&&(t=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:t,y:i}}class ec{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?Ye(t):0),i,Math.min(e.focusOffset,i?Ye(i):0))}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let Ot=null;function yl(o){if(o.setActive)return o.setActive();if(Ot)return o.focus(Ot);let e=[];for(let t=o;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(o.focus(Ot==null?{get preventScroll(){return Ot={preventScroll:!0},!0}}:void 0),!Ot){Ot=!1;for(let t=0;t<e.length;){let i=e[t++],s=e[t++],l=e[t++];i.scrollTop!=s&&(i.scrollTop=s),i.scrollLeft!=l&&(i.scrollLeft=l)}}}let xl;function kt(o,e,t=e){let i=xl||(xl=document.createRange());return i.setEnd(o,t),i.setStart(o,e),i}function Vt(o,e,t,i){let s={key:e,code:e,keyCode:t,which:t,cancelable:!0};i&&({altKey:s.altKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,metaKey:s.metaKey}=i);let l=new KeyboardEvent("keydown",s);l.synthetic=!0,o.dispatchEvent(l);let a=new KeyboardEvent("keyup",s);return a.synthetic=!0,o.dispatchEvent(a),l.defaultPrevented||a.defaultPrevented}function tc(o){for(;o;){if(o&&(o.nodeType==9||o.nodeType==11&&o.host))return o;o=o.assignedSlot||o.parentNode}return null}function vl(o){for(;o.attributes.length;)o.removeAttributeNode(o.attributes[0])}function ic(o,e){let t=e.focusNode,i=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=i)return!1;for(i=Math.min(i,Ye(t));;)if(i){if(t.nodeType!=1)return!1;let s=t.childNodes[i-1];s.contentEditable=="false"?i--:(t=s,i=Ye(t))}else{if(t==o)return!0;i=gt(t),t=t.parentNode}}function Cl(o){return o.scrollTop>Math.max(1,o.scrollHeight-o.clientHeight-4)}function Sl(o,e){for(let t=o,i=e;;){if(t.nodeType==3&&i>0)return{node:t,offset:i};if(t.nodeType==1&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=Ye(t)}else if(t.parentNode&&!Ti(t))i=gt(t),t=t.parentNode;else return null}}function Nl(o,e){for(let t=o,i=e;;){if(t.nodeType==3&&i<t.nodeValue.length)return{node:t,offset:i};if(t.nodeType==1&&i<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[i],i=0}else if(t.parentNode&&!Ti(t))i=gt(t)+1,t=t.parentNode;else return null}}class we{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new we(e.parentNode,gt(e),t)}static after(e,t){return new we(e.parentNode,gt(e)+1,t)}}const En=[];class ne{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let i of this.children){if(i==e)return t;t+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let i=this.dom,s=null,l;for(let a of this.children){if(a.flags&7){if(!a.dom&&(l=s?s.nextSibling:i.firstChild)){let r=ne.get(l);(!r||!r.parent&&r.canReuseDOM(a))&&a.reuseDOM(l)}a.sync(e,t),a.flags&=-8}if(l=s?s.nextSibling:i.firstChild,t&&!t.written&&t.node==i&&l!=a.dom&&(t.written=!0),a.dom.parentNode==i)for(;l&&l!=a.dom;)l=Bl(l);else i.insertBefore(a.dom,l);s=a.dom}for(l=s?s.nextSibling:i.firstChild,l&&t&&t.node==i&&(t.written=!0);l;)l=Bl(l)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,t),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let i;if(e==this.dom)i=this.dom.childNodes[t];else{let s=Ye(e)==0?0:t==0?-1:1;for(;;){let l=e.parentNode;if(l==this.dom)break;s==0&&l.firstChild!=l.lastChild&&(e==l.firstChild?s=-1:s=1),e=l}s<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!ne.get(i);)i=i.nextSibling;if(!i)return this.length;for(let s=0,l=0;;s++){let a=this.children[s];if(a.dom==i)return l;l+=a.length+a.breakAfter}}domBoundsAround(e,t,i=0){let s=-1,l=-1,a=-1,r=-1;for(let d=0,c=i,h=i;d<this.children.length;d++){let f=this.children[d],u=c+f.length;if(c<e&&u>t)return f.domBoundsAround(e,t,c);if(u>=e&&s==-1&&(s=d,l=c),c>t&&f.dom.parentNode==this.dom){a=d,r=h;break}h=u,c=u+f.breakAfter}return{from:l,to:r<0?i+this.length:r,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=En){this.markDirty();for(let s=e;s<t;s++){let l=this.children[s];l.parent==this&&i.indexOf(l)<0&&l.destroy()}this.children.splice(e,t-e,...i);for(let s=0;s<i.length;s++)i[s].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new Ol(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,i,s,l,a){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}ne.prototype.breakAfter=0;function Bl(o){let e=o.nextSibling;return o.parentNode.removeChild(o),e}class Ol{constructor(e,t,i){this.children=e,this.pos=t,this.i=i,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Vl(o,e,t,i,s,l,a,r,d){let{children:c}=o,h=c.length?c[e]:null,f=l.length?l[l.length-1]:null,u=f?f.breakAfter:a;if(!(e==i&&h&&!a&&!u&&l.length<2&&h.merge(t,s,l.length?f:null,t==0,r,d))){if(i<c.length){let p=c[i];p&&(s<p.length||p.breakAfter&&f?.breakAfter)?(e==i&&(p=p.split(s),s=0),!u&&f&&p.merge(0,s,f,!0,0,d)?l[l.length-1]=p:((s||p.children.length&&!p.children[0].length)&&p.merge(0,s,null,!1,0,d),l.push(p))):p?.breakAfter&&(f?f.breakAfter=1:a=1),i++}for(h&&(h.breakAfter=a,t>0&&(!a&&l.length&&h.merge(t,h.length,l[0],!1,r,0)?h.breakAfter=l.shift().breakAfter:(t<h.length||h.children.length&&h.children[h.children.length-1].length==0)&&h.merge(t,h.length,null,!1,r,0),e++));e<i&&l.length;)if(c[i-1].become(l[l.length-1]))i--,l.pop(),d=l.length?0:r;else if(c[e].become(l[0]))e++,l.shift(),r=l.length?0:d;else break;!l.length&&e&&i<c.length&&!c[e-1].breakAfter&&c[i].merge(0,0,c[e-1],!1,r,d)&&e--,(e<i||l.length)&&o.replaceChildren(e,i,l)}}function _l(o,e,t,i,s,l){let a=o.childCursor(),{i:r,off:d}=a.findPos(t,1),{i:c,off:h}=a.findPos(e,-1),f=e-t;for(let u of i)f+=u.length;o.length+=f,Vl(o,c,h,r,d,i,0,s,l)}let Se=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},In=typeof document<"u"?document:{documentElement:{style:{}}};const Dn=/Edge\/(\d+)/.exec(Se.userAgent),Al=/MSIE \d/.test(Se.userAgent),Pn=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Se.userAgent),Ei=!!(Al||Pn||Dn),Tl=!Ei&&/gecko\/(\d+)/i.test(Se.userAgent),$n=!Ei&&/Chrome\/(\d+)/.exec(Se.userAgent),Ml="webkitFontSmoothing"in In.documentElement.style,El=!Ei&&/Apple Computer/.test(Se.vendor),Il=El&&(/Mobile\/\w+/.test(Se.userAgent)||Se.maxTouchPoints>2);var q={mac:Il||/Mac/.test(Se.platform),windows:/Win/.test(Se.platform),linux:/Linux|X11/.test(Se.platform),ie:Ei,ie_version:Al?In.documentMode||6:Pn?+Pn[1]:Dn?+Dn[1]:0,gecko:Tl,gecko_version:Tl?+(/Firefox\/(\d+)/.exec(Se.userAgent)||[0,0])[1]:0,chrome:!!$n,chrome_version:$n?+$n[1]:0,ios:Il,android:/Android\b/.test(Se.userAgent),webkit:Ml,safari:El,webkit_version:Ml?+(/\bAppleWebKit\/(\d+)/.exec(Se.userAgent)||[0,0])[1]:0,tabSize:In.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const nc=256;class Ee extends ne{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof Ee)||this.length-(t-e)+i.length>nc||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Ee(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new we(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return sc(this.dom,e,t)}}class Xe extends ne{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(vl(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,s,l,a){return i&&(!(i instanceof Xe&&i.mark.eq(this.mark))||e&&l<=0||t<this.length&&a<=0)?!1:(_l(this,e,t,i?i.children.slice():[],l-1,a-1),this.markDirty(),!0)}split(e){let t=[],i=0,s=-1,l=0;for(let r of this.children){let d=i+r.length;d>e&&t.push(i<e?r.split(e-i):r),s<0&&i>=e&&(s=l),i=d,l++}let a=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Xe(this.mark,t,a)}domAtPos(e){return Dl(this,e)}coordsAt(e,t){return $l(this,e,t)}}function sc(o,e,t){let i=o.nodeValue.length;e>i&&(e=i);let s=e,l=e,a=0;e==0&&t<0||e==i&&t>=0?q.chrome||q.gecko||(e?(s--,a=1):l<i&&(l++,a=-1)):t<0?s--:l<i&&l++;let r=kt(o,s,l).getClientRects();if(!r.length)return null;let d=r[(a?a<0:t>=0)?0:r.length-1];return q.safari&&!a&&d.width==0&&(d=Array.prototype.find.call(r,c=>c.width)||d),a?Mi(d,a<0):d||null}class bt extends ne{static create(e,t,i){return new bt(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=bt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,i,s,l,a){return i&&(!(i instanceof bt)||!this.widget.compare(i.widget)||e>0&&l<=0||t<this.length&&a<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-t),!0)}become(e){return e instanceof bt&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return X.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,i=t&&t.state.doc,s=this.posAtStart;return i?i.slice(s,s+this.length):X.empty}domAtPos(e){return(this.length?e==0:this.side>0)?we.before(this.dom):we.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let s=this.dom.getClientRects(),l=null;if(!s.length)return null;let a=this.side?this.side<0:e>0;for(let r=a?s.length-1:0;l=s[r],!(e>0?r==0:r==s.length-1||l.top<l.bottom);r+=a?-1:1);return Mi(l,!a)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class _t extends ne{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof _t&&e.side==this.side}split(){return new _t(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?we.before(this.dom):we.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return X.empty}get isHidden(){return!0}}Ee.prototype.children=bt.prototype.children=_t.prototype.children=En;function Dl(o,e){let t=o.dom,{children:i}=o,s=0;for(let l=0;s<i.length;s++){let a=i[s],r=l+a.length;if(!(r==l&&a.getSide()<=0)){if(e>l&&e<r&&a.dom.parentNode==t)return a.domAtPos(e-l);if(e<=l)break;l=r}}for(let l=s;l>0;l--){let a=i[l-1];if(a.dom.parentNode==t)return a.domAtPos(a.length)}for(let l=s;l<i.length;l++){let a=i[l];if(a.dom.parentNode==t)return a.domAtPos(0)}return new we(t,0)}function Pl(o,e,t){let i,{children:s}=o;t>0&&e instanceof Xe&&s.length&&(i=s[s.length-1])instanceof Xe&&i.mark.eq(e.mark)?Pl(i,e.children[0],t-1):(s.push(e),e.setParent(o)),o.length+=e.length}function $l(o,e,t){let i=null,s=-1,l=null,a=-1;function r(c,h){for(let f=0,u=0;f<c.children.length&&u<=h;f++){let p=c.children[f],b=u+p.length;b>=h&&(p.children.length?r(p,h-u):(!l||l.isHidden&&t>0)&&(b>h||u==b&&p.getSide()>0)?(l=p,a=h-u):(u<h||u==b&&p.getSide()<0&&!p.isHidden)&&(i=p,s=h-u)),u=b}}r(o,e);let d=(t<0?i:l)||i||l;return d?d.coordsAt(Math.max(0,d==i?s:a),t):lc(o)}function lc(o){let e=o.dom.lastChild;if(!e)return o.dom.getBoundingClientRect();let t=Yt(e);return t[t.length-1]||null}function Fn(o,e){for(let t in o)t=="class"&&e.class?e.class+=" "+o.class:t=="style"&&e.style?e.style+=";"+o.style:e[t]=o[t];return e}const Fl=Object.create(null);function Ii(o,e,t){if(o==e)return!0;o||(o=Fl),e||(e=Fl);let i=Object.keys(o),s=Object.keys(e);if(i.length-(t&&i.indexOf(t)>-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let l of i)if(l!=t&&(s.indexOf(l)==-1||o[l]!==e[l]))return!1;return!0}function Rn(o,e,t){let i=!1;if(e)for(let s in e)t&&s in t||(i=!0,s=="style"?o.style.cssText="":o.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(i=!0,s=="style"?o.style.cssText=t[s]:o.setAttribute(s,t[s]));return i}function oc(o){let e=Object.create(null);for(let t=0;t<o.attributes.length;t++){let i=o.attributes[t];e[i.name]=i.value}return e}class Ln{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Le=function(o){return o[o.Text=0]="Text",o[o.WidgetBefore=1]="WidgetBefore",o[o.WidgetAfter=2]="WidgetAfter",o[o.WidgetRange=3]="WidgetRange",o}(Le||(Le={}));class ye extends Nt{constructor(e,t,i,s){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=s}get heightRelevant(){return!1}static mark(e){return new Jt(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return t+=i&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new lt(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:l,end:a}=Rl(e,t);i=(l?t?-3e8:-1:5e8)-1,s=(a?t?2e8:1:-6e8)+1}return new lt(e,i,s,t,e.widget||null,!0)}static line(e){return new Zt(e)}static set(e,t=!1){return le.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}ye.none=le.empty;class Jt extends ye{constructor(e){let{start:t,end:i}=Rl(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof Jt&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&Ii(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Jt.prototype.point=!1;class Zt extends ye{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Zt&&this.spec.class==e.spec.class&&Ii(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Zt.prototype.mapMode=Be.TrackBefore,Zt.prototype.point=!0;class lt extends ye{constructor(e,t,i,s,l,a){super(t,i,l,e),this.block=s,this.isReplace=a,this.mapMode=s?t<=0?Be.TrackBefore:Be.TrackAfter:Be.TrackDel}get type(){return this.startSide!=this.endSide?Le.WidgetRange:this.startSide<=0?Le.WidgetBefore:Le.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof lt&&ac(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}lt.prototype.point=!0;function Rl(o,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=o;return t==null&&(t=o.inclusive),i==null&&(i=o.inclusive),{start:t??e,end:i??e}}function ac(o,e){return o==e||!!(o&&e&&o.compare(e))}function jn(o,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=o?t[s]=Math.max(t[s],e):t.push(o,e)}class de extends ne{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,s,l,a){if(i){if(!(i instanceof de))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),_l(this,e,t,i?i.children.slice():[],l,a),!0}split(e){let t=new de;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:s}=this.childPos(e);s&&(t.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let l=i;l<this.children.length;l++)t.append(this.children[l],0);for(;i>0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Ii(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Pl(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=Fn(t,this.attrs||{})),i&&(this.attrs=Fn({class:i},this.attrs||{}))}domAtPos(e){return Dl(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(vl(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Rn(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&ne.get(s)instanceof Xe;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=ne.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!q.ios||!this.children.some(l=>l instanceof Ee))){let l=document.createElement("BR");l.cmIgnore=!0,this.dom.appendChild(l)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof Ee)||/[^ -~]/.test(i.text))return null;let s=Yt(i.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=$l(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,l=i.bottom-i.top;if(Math.abs(l-s.lineHeight)<2&&s.textHeight<l){let a=(l-s.textHeight)/2;return{top:i.top+a,bottom:i.bottom-a,left:i.left,right:i.left}}}return i}become(e){return e instanceof de&&this.children.length==0&&e.children.length==0&&Ii(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let i=0,s=0;i<e.children.length;i++){let l=e.children[i],a=s+l.length;if(a>=t){if(l instanceof de)return l;if(a>t)break}s=a+l.breakAfter}return null}}class Je extends ne{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,l,a){return i&&(!(i instanceof Je)||!this.widget.compare(i.widget)||e>0&&l<=0||t<this.length&&a<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?we.before(this.dom):we.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let i=new Je(this.widget,t,this.deco);return i.breakAfter=this.breakAfter,i}get children(){return En}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):X.empty}domBoundsAround(){return null}become(e){return e instanceof Je&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);return i||(this.widget instanceof zn?null:Mi(this.dom.getBoundingClientRect(),this.length?e==0:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:i}=this.deco;return t==i?!1:e<0?t<0:i>0}}class zn extends Ln{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class ei{constructor(e,t,i,s){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Je&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new de),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Di(new _t(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Je)&&this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:l,lineBreak:a,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=l,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Di(new Ee(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,l,a){if(this.disallowBlockEffectsFor[a]&&i instanceof lt){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let r=t-e;if(i instanceof lt)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Je(i.widget||At.block,r,i));else{let d=bt.create(i.widget||At.inline,r,r?0:i.startSide),c=this.atCursorPos&&!d.isEditable&&l<=s.length&&(e<t||i.startSide>0),h=!d.isEditable&&(e<t||l>s.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!c&&!d.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),c&&(f.append(Di(new _t(1),s),l),l=s.length+Math.max(0,l-s.length)),f.append(Di(d,s),l),this.atCursorPos=h,this.pendingBuffer=h?e<t||l>s.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);r&&(this.textOff+r<=this.text.length?this.textOff+=r:(this.skip+=r-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=l)}static build(e,t,i,s,l){let a=new ei(e,t,i,l);return a.openEnd=le.spans(s,t,i,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function Di(o,e){for(let t of e)o=new Xe(t,[o],o.length);return o}class At extends Ln{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}At.inline=new At("span"),At.block=new At("div");var me=function(o){return o[o.LTR=0]="LTR",o[o.RTL=1]="RTL",o}(me||(me={}));const wt=me.LTR,qn=me.RTL;function Ll(o){let e=[];for(let t=0;t<o.length;t++)e.push(1<<+o[t]);return e}const rc=Ll("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),dc=Ll("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Un=Object.create(null),je=[];for(let o of["()","[]","{}"]){let e=o.charCodeAt(0),t=o.charCodeAt(1);Un[e]=t,Un[t]=-e}function jl(o){return o<=247?rc[o]:1424<=o&&o<=1524?2:1536<=o&&o<=1785?dc[o-1536]:1774<=o&&o<=2220?4:8192<=o&&o<=8204?256:64336<=o&&o<=65023?4:1}const cc=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class ot{get dir(){return this.level%2?qn:wt}constructor(e,t,i){this.from=e,this.to=t,this.level=i}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,i,s){let l=-1;for(let a=0;a<e.length;a++){let r=e[a];if(r.from<=t&&r.to>=t){if(r.level==i)return a;(l<0||(s!=0?s<0?r.from<t:r.to>t:e[l].level>r.level))&&(l=a)}}if(l<0)throw new RangeError("Index out of range");return l}}function zl(o,e){if(o.length!=e.length)return!1;for(let t=0;t<o.length;t++){let i=o[t],s=e[t];if(i.from!=s.from||i.to!=s.to||i.direction!=s.direction||!zl(i.inner,s.inner))return!1}return!0}const se=[];function hc(o,e,t,i,s){for(let l=0;l<=i.length;l++){let a=l?i[l-1].to:e,r=l<i.length?i[l].from:t,d=l?256:s;for(let c=a,h=d,f=d;c<r;c++){let u=jl(o.charCodeAt(c));u==512?u=h:u==8&&f==4&&(u=16),se[c]=u==4?2:u,u&7&&(f=u),h=u}for(let c=a,h=d,f=d;c<r;c++){let u=se[c];if(u==128)c<r-1&&h==se[c+1]&&h&24?u=se[c]=h:se[c]=256;else if(u==64){let p=c+1;for(;p<r&&se[p]==64;)p++;let b=c&&h==8||p<t&&se[p]==8?f==1?1:8:256;for(let k=c;k<p;k++)se[k]=b;c=p-1}else u==8&&f==1&&(se[c]=1);h=u,u&7&&(f=u)}}}function fc(o,e,t,i,s){let l=s==1?2:1;for(let a=0,r=0,d=0;a<=i.length;a++){let c=a?i[a-1].to:e,h=a<i.length?i[a].from:t;for(let f=c,u,p,b;f<h;f++)if(p=Un[u=o.charCodeAt(f)])if(p<0){for(let k=r-3;k>=0;k-=3)if(je[k+1]==-p){let v=je[k+2],C=v&2?s:v&4?v&1?l:s:0;C&&(se[f]=se[je[k]]=C),r=k;break}}else{if(je.length==189)break;je[r++]=f,je[r++]=u,je[r++]=d}else if((b=se[f])==2||b==1){let k=b==s;d=k?0:1;for(let v=r-3;v>=0;v-=3){let C=je[v+2];if(C&2)break;if(k)je[v+2]|=2;else{if(C&4)break;je[v+2]|=4}}}}}function uc(o,e,t,i){for(let s=0,l=i;s<=t.length;s++){let a=s?t[s-1].to:o,r=s<t.length?t[s].from:e;for(let d=a;d<r;){let c=se[d];if(c==256){let h=d+1;for(;;)if(h==r){if(s==t.length)break;h=t[s++].to,r=s<t.length?t[s].from:e}else if(se[h]==256)h++;else break;let f=l==1,u=(h<e?se[h]:i)==1,p=f==u?f?1:2:i;for(let b=h,k=s,v=k?t[k-1].to:o;b>d;)b==v&&(b=t[--k].from,v=k?t[k-1].to:o),se[--b]=p;d=h}else l=c,d++}}}function Wn(o,e,t,i,s,l,a){let r=i%2?2:1;if(i%2==s%2)for(let d=e,c=0;d<t;){let h=!0,f=!1;if(c==l.length||d<l[c].from){let k=se[d];k!=r&&(h=!1,f=k==16)}let u=!h&&r==1?[]:null,p=h?i:i+1,b=d;e:for(;;)if(c<l.length&&b==l[c].from){if(f)break e;let k=l[c];if(!h)for(let v=k.to,C=c+1;;){if(v==t)break e;if(C<l.length&&l[C].from==v)v=l[C++].to;else{if(se[v]==r)break e;break}}if(c++,u)u.push(k);else{k.from>d&&a.push(new ot(d,k.from,p));let v=k.direction==wt!=!(p%2);Hn(o,v?i+1:i,s,k.inner,k.from,k.to,a),d=k.to}b=k.to}else{if(b==t||(h?se[b]!=r:se[b]==r))break;b++}u?Wn(o,d,b,i+1,s,u,a):d<b&&a.push(new ot(d,b,p)),d=b}else for(let d=t,c=l.length;d>e;){let h=!0,f=!1;if(!c||d>l[c-1].to){let k=se[d-1];k!=r&&(h=!1,f=k==16)}let u=!h&&r==1?[]:null,p=h?i:i+1,b=d;e:for(;;)if(c&&b==l[c-1].to){if(f)break e;let k=l[--c];if(!h)for(let v=k.from,C=c;;){if(v==e)break e;if(C&&l[C-1].to==v)v=l[--C].from;else{if(se[v-1]==r)break e;break}}if(u)u.push(k);else{k.to<d&&a.push(new ot(k.to,d,p));let v=k.direction==wt!=!(p%2);Hn(o,v?i+1:i,s,k.inner,k.from,k.to,a),d=k.from}b=k.from}else{if(b==e||(h?se[b-1]!=r:se[b-1]==r))break;b--}u?Wn(o,b,d,i+1,s,u,a):b<d&&a.push(new ot(b,d,p)),d=b}}function Hn(o,e,t,i,s,l,a){let r=e%2?2:1;hc(o,s,l,i,r),fc(o,s,l,i,r),uc(s,l,i,r),Wn(o,s,l,e,t,i,a)}function pc(o,e,t){if(!o)return[new ot(0,0,e==qn?1:0)];if(e==wt&&!t.length&&!cc.test(o))return ql(o.length);if(t.length)for(;o.length>se.length;)se[se.length]=256;let i=[],s=e==wt?0:1;return Hn(o,s,s,t,0,o.length,i),i}function ql(o){return[new ot(0,o,0)]}let Ul="";function mc(o,e,t,i,s){var l;let a=i.head-o.from,r=ot.find(e,a,(l=i.bidiLevel)!==null&&l!==void 0?l:-1,i.assoc),d=e[r],c=d.side(s,t);if(a==c){let u=r+=s?1:-1;if(u<0||u>=e.length)return null;d=e[r=u],a=d.side(!s,t),c=d.side(s,t)}let h=Ke(o.text,a,d.forward(s,t));(h<d.from||h>d.to)&&(h=c),Ul=o.text.slice(Math.min(a,h),Math.max(a,h));let f=r==(s?e.length-1:0)?null:e[r+(s?1:-1)];return f&&h==c&&f.level+(s?0:1)<d.level?U.cursor(f.side(!s,t)+o.from,f.forward(s,t)?1:-1,f.level):U.cursor(h+o.from,d.forward(s,t)?-1:1,d.level)}function gc(o,e,t){for(let i=e;i<t;i++){let s=jl(o.charCodeAt(i));if(s==1)return wt;if(s==2||s==4)return qn}return wt}const Wl=H.define(),Hl=H.define(),Kl=H.define(),Ql=H.define(),Kn=H.define(),Gl=H.define(),Yl=H.define(),Qn=H.define(),Gn=H.define(),Xl=H.define({combine:o=>o.some(e=>e)}),kc=H.define({combine:o=>o.some(e=>e)}),Jl=H.define();class Tt{constructor(e,t="nearest",i="nearest",s=5,l=5,a=!1){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=l,this.isSnapshot=a}map(e){return e.empty?this:new Tt(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Tt(U.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Pi=ce.define({map:(o,e)=>o.map(e)}),Zl=ce.define();function ze(o,e,t){let i=o.facet(Ql);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const at=H.define({combine:o=>o.length?o[0]:!0});let bc=0;const ti=H.define();class Mt{constructor(e,t,i,s,l){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=s,this.extension=l(this)}static define(e,t){const{eventHandlers:i,eventObservers:s,provide:l,decorations:a}=t||{};return new Mt(bc++,e,i,s,r=>{let d=[ti.of(r)];return a&&d.push(ii.of(c=>{let h=c.plugin(r);return h?a(h):ye.none})),l&&d.push(l(r)),d})}static fromClass(e,t){return Mt.define(i=>new e(i),t)}}class Yn{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(ze(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){ze(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){ze(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const eo=H.define(),Xn=H.define(),ii=H.define(),to=H.define(),Jn=H.define(),io=H.define();function no(o,e){let t=o.state.facet(io);if(!t.length)return t;let i=t.map(l=>l instanceof Function?l(o):l),s=[];return le.spans(i,e.from,e.to,{point(){},span(l,a,r,d){let c=l-e.from,h=a-e.from,f=s;for(let u=r.length-1;u>=0;u--,d--){let p=r[u].spec.bidiIsolate,b;if(p==null&&(p=gc(e.text,c,h)),d>0&&f.length&&(b=f[f.length-1]).to==c&&b.direction==p)b.to=h,f=b.inner;else{let k={from:c,to:h,direction:p,inner:[]};f.push(k),f=k.inner}}}}),s}const so=H.define();function lo(o){let e=0,t=0,i=0,s=0;for(let l of o.state.facet(so)){let a=l(o);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(t=Math.max(t,a.right)),a.top!=null&&(i=Math.max(i,a.top)),a.bottom!=null&&(s=Math.max(s,a.bottom)))}return{left:e,right:t,top:i,bottom:s}}const ni=H.define();class Ae{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new Ae(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toA<i.fromA)break;i=i.join(s),e.splice(t-1,1)}}return e.splice(t,0,i),e}static extendWithRanges(e,t){if(t.length==0)return e;let i=[];for(let s=0,l=0,a=0,r=0;;s++){let d=s==e.length?null:e[s],c=a-r,h=d?d.fromB:1e9;for(;l<t.length&&t[l]<h;){let f=t[l],u=t[l+1],p=Math.max(r,f),b=Math.min(h,u);if(p<=b&&new Ae(p+c,b+c,p,b).addToSet(i),u>h)break;l+=2}if(!d)return i;new Ae(d.fromA,d.toA,d.fromB,d.toB).addToSet(i),a=d.toA,r=d.toB}}}class $i{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=ue.empty(this.startState.doc.length);for(let l of i)this.changes=this.changes.compose(l.changes);let s=[];this.changes.iterChangedRanges((l,a,r,d)=>s.push(new Ae(l,a,r,d))),this.changedRanges=s}static create(e,t,i){return new $i(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class oo extends ne{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=ye.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new de],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ae(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:h})=>h<this.minWidthFrom||c>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!Nc(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let l=s>-1?yc(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:h}=this.hasComposition;i=new Ae(c,h,e.changes.mapPos(c,-1),e.changes.mapPos(h,1)).addToSet(i.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(q.ie||q.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,r=this.updateDeco(),d=Cc(a,r,e.changes);return i=Ae.extendWithRanges(i,d),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=q.chrome||q.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||s.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let l=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let a of this.children)a instanceof Je&&a.widget instanceof zn&&l.push(a.dom);s.updateGaps(l)}updateChildren(e,t,i){let s=i?i.range.addToSet(e.slice()):e,l=this.childCursor(t);for(let a=s.length-1;;a--){let r=a>=0?s[a]:null;if(!r)break;let{fromA:d,toA:c,fromB:h,toB:f}=r,u,p,b,k;if(i&&i.range.fromB<f&&i.range.toB>h){let g=ei.build(this.view.state.doc,h,i.range.fromB,this.decorations,this.dynamicDecorationMap),m=ei.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);p=g.breakAtStart,b=g.openStart,k=m.openEnd;let S=this.compositionView(i);m.breakAtStart?S.breakAfter=1:m.content.length&&S.merge(S.length,S.length,m.content[0],!1,m.openStart,0)&&(S.breakAfter=m.content[0].breakAfter,m.content.shift()),g.content.length&&S.merge(0,0,g.content[g.content.length-1],!0,0,g.openEnd)&&g.content.pop(),u=g.content.concat(S).concat(m.content)}else({content:u,breakAtStart:p,openStart:b,openEnd:k}=ei.build(this.view.state.doc,h,f,this.decorations,this.dynamicDecorationMap));let{i:v,off:C}=l.findPos(c,1),{i:x,off:V}=l.findPos(d,-1);Vl(this,x,V,v,C,u,p,b,k)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let i of t.effects)i.is(Zl)&&(this.editContextFormatting=i.value)}compositionView(e){let t=new Ee(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new Xe(s,[t],t.length);let i=new de;return i.append(t,0),i}fixCompositionDOM(e){let t=(l,a)=>{a.flags|=8|(a.children.some(d=>d.flags&7)?1:0),this.markedForComposition.add(a);let r=ne.get(l);r&&r!=a&&(r.dom=null),a.setDOM(l)},i=this.childPos(e.range.fromB,1),s=this.children[i.i];t(e.line,s);for(let l=e.marks.length-1;l>=-1;l--)i=s.childPos(i.off,1),s=s.children[i.i],t(l>=0?e.marks[l].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,l=!s&&Ai(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||t||l))return;let a=this.forceSelection;this.forceSelection=!1;let r=this.view.state.selection.main,d=this.moveToLine(this.domAtPos(r.anchor)),c=r.empty?d:this.moveToLine(this.domAtPos(r.head));if(q.gecko&&r.empty&&!this.hasComposition&&wc(d)){let f=document.createTextNode("");this.view.observer.ignore(()=>d.node.insertBefore(f,d.node.childNodes[d.offset]||null)),d=c=new we(f,0),a=!0}let h=this.view.observer.selectionRange;(a||!h.focusNode||(!Xt(d.node,d.offset,h.anchorNode,h.anchorOffset)||!Xt(c.node,c.offset,h.focusNode,h.focusOffset))&&!this.suppressWidgetCursorChange(h,r))&&(this.view.observer.ignore(()=>{q.android&&q.chrome&&this.dom.contains(h.focusNode)&&Sc(h.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Gt(this.view.root);if(f)if(r.empty){if(q.gecko){let u=xc(d.node,d.offset);if(u&&u!=3){let p=(u==1?Sl:Nl)(d.node,d.offset);p&&(d=new we(p.node,p.offset))}}f.collapse(d.node,d.offset),r.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=r.bidiLevel)}else if(f.extend){f.collapse(d.node,d.offset);try{f.extend(c.node,c.offset)}catch{}}else{let u=document.createRange();r.anchor>r.head&&([d,c]=[c,d]),u.setEnd(c.node,c.offset),u.setStart(d.node,d.offset),f.removeAllRanges(),f.addRange(u)}l&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(d,c)),this.impreciseAnchor=d.precise?null:new we(h.anchorNode,h.anchorOffset),this.impreciseHead=c.precise?null:new we(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Xt(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=Gt(e.root),{anchorNode:s,anchorOffset:l}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let a=de.find(this,t.head);if(!a)return;let r=a.posAtStart;if(t.head==r||t.head==r+a.length)return;let d=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!d||!c||d.bottom>c.top)return;let h=this.domAtPos(t.head+t.assoc);i.collapse(h.node,h.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,l)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let s=e.offset;!i&&s<t.childNodes.length;s++){let l=ne.get(t.childNodes[s]);l instanceof de&&(i=l.domAtPos(0))}for(let s=e.offset-1;!i&&s>=0;s--){let l=ne.get(t.childNodes[s]);l instanceof de&&(i=l.domAtPos(l.length))}return i?new we(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=ne.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let s=this.children[t];if(i<s.length||s instanceof de)break;t++,i=0}return this.children[t].domAtPos(i)}coordsAt(e,t){let i=null,s=0;for(let l=this.length,a=this.children.length-1;a>=0;a--){let r=this.children[a],d=l-r.breakAfter,c=d-r.length;if(d<e)break;if(c<=e&&(c<e||r.covers(-1))&&(d>e||r.covers(1))&&(!i||r instanceof de&&!(i instanceof de&&t>=0)))i=r,s=c;else if(i&&c==e&&d==e&&r instanceof Je&&Math.abs(t)<2){if(r.deco.startSide<0)break;a&&(i=null)}l=c}return i?i.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),s=this.children[t];if(!(s instanceof de))return null;for(;s.children.length;){let{i:r,off:d}=s.childPos(i,1);for(;;r++){if(r==s.children.length)return null;if((s=s.children[r]).length)break}i=d}if(!(s instanceof Ee))return null;let l=Ke(s.text,i);if(l==i)return null;let a=kt(s.dom,i,l).getClientRects();for(let r=0;r<a.length;r++){let d=a[r];if(r==a.length-1||d.top<d.bottom&&d.left<d.right)return d}return null}measureVisibleLineHeights(e){let t=[],{from:i,to:s}=e,l=this.view.contentDOM.clientWidth,a=l>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,r=-1,d=this.view.textDirection==me.LTR;for(let c=0,h=0;h<this.children.length;h++){let f=this.children[h],u=c+f.length;if(u>s)break;if(c>=i){let p=f.dom.getBoundingClientRect();if(t.push(p.height),a){let b=f.dom.lastChild,k=b?Yt(b):[];if(k.length){let v=k[k.length-1],C=d?v.right-p.left:p.right-v.left;C>r&&(r=C,this.minWidth=l,this.minWidthFrom=c,this.minWidthTo=u)}}}c=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?me.RTL:me.LTR}measureTextSize(){for(let l of this.children)if(l instanceof de){let a=l.measureTextSize();if(a)return a}let e=document.createElement("div"),t,i,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let l=Yt(e.firstChild)[0];t=e.getBoundingClientRect().height,i=l?l.width/27:7,s=l?l.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Ol(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let l=s==t.viewports.length?null:t.viewports[s],a=l?l.from-1:this.length;if(a>i){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(ye.replace({widget:new zn(r),block:!0,inclusive:!0,isBlockGap:!0}).range(i,a))}if(!l)break;i=l.to+1}return ye.set(e)}updateDeco(){let e=1,t=this.view.state.facet(ii).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),i=!1,s=this.view.state.facet(to).map((l,a)=>{let r=typeof l=="function";return r&&(i=!0),r?l(this.view):l});for(s.length&&(this.dynamicDecorationMap[e++]=i,t.push(le.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(Jl))try{if(c(this.view,e.range,e))return!0}catch(h){ze(this.view.state,h,"scroll handler")}let{range:t}=e,i=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let l=lo(this.view),a={left:i.left-l.left,top:i.top-l.top,right:i.right+l.right,bottom:i.bottom+l.bottom},{offsetWidth:r,offsetHeight:d}=this.view.scrollDOM;Jd(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,r),-r),Math.max(Math.min(e.yMargin,d),-d),this.view.textDirection==me.LTR)}}function wc(o){return o.node.nodeType==1&&o.node.firstChild&&(o.offset==0||o.node.childNodes[o.offset-1].contentEditable=="false")&&(o.offset==o.node.childNodes.length||o.node.childNodes[o.offset].contentEditable=="false")}function ao(o,e){let t=o.observer.selectionRange;if(!t.focusNode)return null;let i=Sl(t.focusNode,t.focusOffset),s=Nl(t.focusNode,t.focusOffset),l=i||s;if(s&&i&&s.node!=i.node){let r=ne.get(s.node);if(!r||r instanceof Ee&&r.text!=s.node.nodeValue)l=s;else if(o.docView.lastCompositionAfterCursor){let d=ne.get(i.node);!d||d instanceof Ee&&d.text!=i.node.nodeValue||(l=s)}}if(o.docView.lastCompositionAfterCursor=l!=i,!l)return null;let a=e-l.offset;return{from:a,to:a+l.node.nodeValue.length,node:l.node}}function yc(o,e,t){let i=ao(o,t);if(!i)return null;let{node:s,from:l,to:a}=i,r=s.nodeValue;if(/[\n\r]/.test(r)||o.state.doc.sliceString(i.from,i.to)!=r)return null;let d=e.invertedDesc,c=new Ae(d.mapPos(l),d.mapPos(a),l,a),h=[];for(let f=s.parentNode;;f=f.parentNode){let u=ne.get(f);if(u instanceof Xe)h.push({node:f,deco:u.mark});else{if(u instanceof de||f.nodeName=="DIV"&&f.parentNode==o.contentDOM)return{range:c,text:s,marks:h,line:f};if(f!=o.contentDOM)h.push({node:f,deco:new Jt({inclusive:!0,attributes:oc(f),tagName:f.tagName.toLowerCase()})});else return null}}}function xc(o,e){return o.nodeType!=1?0:(e&&o.childNodes[e-1].contentEditable=="false"?1:0)|(e<o.childNodes.length&&o.childNodes[e].contentEditable=="false"?2:0)}let vc=class{constructor(){this.changes=[]}compareRange(e,t){jn(e,t,this.changes)}comparePoint(e,t){jn(e,t,this.changes)}};function Cc(o,e,t){let i=new vc;return le.compare(o,e,t,i),i.changes}function Sc(o,e){for(let t=o;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function Nc(o,e){let t=!1;return e&&o.iterChangedRanges((i,s)=>{i<e.to&&s>e.from&&(t=!0)}),t}function Bc(o,e,t=1){let i=o.charCategorizer(e),s=o.doc.lineAt(e),l=e-s.from;if(s.length==0)return U.cursor(e);l==0?t=1:l==s.length&&(t=-1);let a=l,r=l;t<0?a=Ke(s.text,l,!1):r=Ke(s.text,l);let d=i(s.text.slice(a,r));for(;a>0;){let c=Ke(s.text,a,!1);if(i(s.text.slice(c,a))!=d)break;a=c}for(;r<s.length;){let c=Ke(s.text,r);if(i(s.text.slice(r,c))!=d)break;r=c}return U.range(a+s.from,r+s.from)}function Oc(o,e){return e.left>o?e.left-o:Math.max(0,o-e.right)}function Vc(o,e){return e.top>o?e.top-o:Math.max(0,o-e.bottom)}function Zn(o,e){return o.top<e.bottom-1&&o.bottom>e.top+1}function ro(o,e){return e<o.top?{top:e,left:o.left,right:o.right,bottom:o.bottom}:o}function co(o,e){return e>o.bottom?{top:o.top,left:o.left,right:o.right,bottom:e}:o}function es(o,e,t){let i,s,l,a,r=!1,d,c,h,f;for(let b=o.firstChild;b;b=b.nextSibling){let k=Yt(b);for(let v=0;v<k.length;v++){let C=k[v];s&&Zn(s,C)&&(C=ro(co(C,s.bottom),s.top));let x=Oc(e,C),V=Vc(t,C);if(x==0&&V==0)return b.nodeType==3?ho(b,e,t):es(b,e,t);if(!i||a>V||a==V&&l>x){i=b,s=C,l=x,a=V;let g=V?t<C.top?-1:1:x?e<C.left?-1:1:0;r=!g||(g>0?v<k.length-1:v>0)}x==0?t>C.bottom&&(!h||h.bottom<C.bottom)?(d=b,h=C):t<C.top&&(!f||f.top>C.top)&&(c=b,f=C):h&&Zn(h,C)?h=co(h,C.bottom):f&&Zn(f,C)&&(f=ro(f,C.top))}}if(h&&h.bottom>=t?(i=d,s=h):f&&f.top<=t&&(i=c,s=f),!i)return{node:o,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return ho(i,u,t);if(r&&i.contentEditable!="false")return es(i,u,t);let p=Array.prototype.indexOf.call(o.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:o,offset:p}}function ho(o,e,t){let i=o.nodeValue.length,s=-1,l=1e9,a=0;for(let r=0;r<i;r++){let d=kt(o,r,r+1).getClientRects();for(let c=0;c<d.length;c++){let h=d[c];if(h.top==h.bottom)continue;a||(a=e-h.left);let f=(h.top>t?h.top-t:t-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&f<l){let u=e>=(h.left+h.right)/2,p=u;if((q.chrome||q.gecko)&&kt(o,r).getBoundingClientRect().left==h.right&&(p=!u),f<=0)return{node:o,offset:r+(p?1:0)};s=r+(p?1:0),l=f}}}return{node:o,offset:s>-1?s:a>0?o.nodeValue.length:0}}function fo(o,e,t,i=-1){var s,l;let a=o.contentDOM.getBoundingClientRect(),r=a.top+o.viewState.paddingTop,d,{docHeight:c}=o.viewState,{x:h,y:f}=e,u=f-r;if(u<0)return 0;if(u>c)return o.state.doc.length;for(let g=o.viewState.heightOracle.textHeight/2,m=!1;d=o.elementAtHeight(u),d.type!=Le.Text;)for(;u=i>0?d.bottom+g:d.top-g,!(u>=0&&u<=c);){if(m)return t?null:0;m=!0,i=-i}f=r+u;let p=d.from;if(p<o.viewport.from)return o.viewport.from==0?0:t?null:uo(o,a,d,h,f);if(p>o.viewport.to)return o.viewport.to==o.state.doc.length?o.state.doc.length:t?null:uo(o,a,d,h,f);let b=o.dom.ownerDocument,k=o.root.elementFromPoint?o.root:b,v=k.elementFromPoint(h,f);v&&!o.contentDOM.contains(v)&&(v=null),v||(h=Math.max(a.left+1,Math.min(a.right-1,h)),v=k.elementFromPoint(h,f),v&&!o.contentDOM.contains(v)&&(v=null));let C,x=-1;if(v&&((s=o.docView.nearest(v))===null||s===void 0?void 0:s.isEditable)!=!1){if(b.caretPositionFromPoint){let g=b.caretPositionFromPoint(h,f);g&&({offsetNode:C,offset:x}=g)}else if(b.caretRangeFromPoint){let g=b.caretRangeFromPoint(h,f);g&&({startContainer:C,startOffset:x}=g,(!o.contentDOM.contains(C)||q.safari&&_c(C,x,h)||q.chrome&&Ac(C,x,h))&&(C=void 0))}}if(!C||!o.docView.dom.contains(C)){let g=de.find(o.docView,p);if(!g)return u>d.top+d.height/2?d.to:d.from;({node:C,offset:x}=es(g.dom,h,f))}let V=o.docView.nearest(C);if(!V)return null;if(V.isWidget&&((l=V.dom)===null||l===void 0?void 0:l.nodeType)==1){let g=V.dom.getBoundingClientRect();return e.y<g.top||e.y<=g.bottom&&e.x<=(g.left+g.right)/2?V.posAtStart:V.posAtEnd}else return V.localPosFromDOM(C,x)+V.posAtStart}function uo(o,e,t,i,s){let l=Math.round((i-e.left)*o.defaultCharacterWidth);if(o.lineWrapping&&t.height>o.defaultLineHeight*1.5){let r=o.viewState.heightOracle.textHeight,d=Math.floor((s-t.top-(o.defaultLineHeight-r)*.5)/r);l+=d*o.viewState.heightOracle.lineLength}let a=o.state.sliceDoc(t.from,t.to);return t.from+Qd(a,l,o.state.tabSize)}function _c(o,e,t){let i;if(o.nodeType!=3||e!=(i=o.nodeValue.length))return!1;for(let s=o.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return kt(o,i-1,i).getBoundingClientRect().left>t}function Ac(o,e,t){if(e!=0)return!1;for(let s=o;;){let l=s.parentNode;if(!l||l.nodeType!=1||l.firstChild!=s)return!1;if(l.classList.contains("cm-line"))break;s=l}let i=o.nodeType==1?o.getBoundingClientRect():kt(o,0,Math.max(o.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function Tc(o,e){let t=o.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==Le.Text))return i}return t}function Mc(o,e,t,i){let s=Tc(o,e.head),l=!i||s.type!=Le.Text||!(o.lineWrapping||s.widgetLineBreaks)?null:o.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(l){let a=o.dom.getBoundingClientRect(),r=o.textDirectionAt(s.from),d=o.posAtCoords({x:t==(r==me.LTR)?a.right-1:a.left+1,y:(l.top+l.bottom)/2});if(d!=null)return U.cursor(d,t?-1:1)}return U.cursor(t?s.to:s.from,t?-1:1)}function po(o,e,t,i){let s=o.state.doc.lineAt(e.head),l=o.bidiSpans(s),a=o.textDirectionAt(s.from);for(let r=e,d=null;;){let c=mc(s,l,a,r,t),h=Ul;if(!c){if(s.number==(t?o.state.doc.lines:1))return r;h=`
|
|
8
|
+
`,s=o.state.doc.line(s.number+(t?1:-1)),l=o.bidiSpans(s),c=o.visualLineSide(s,!t)}if(d){if(!d(h))return r}else{if(!i)return c;d=i(h)}r=c}}function Ec(o,e,t){let i=o.state.charCategorizer(e),s=i(t);return l=>{let a=i(l);return s==Ge.Space&&(s=a),s==a}}function Ic(o,e,t,i){let s=e.head,l=t?1:-1;if(s==(t?o.state.doc.length:0))return U.cursor(s,e.assoc);let a=e.goalColumn,r,d=o.contentDOM.getBoundingClientRect(),c=o.coordsAtPos(s,e.assoc||-1),h=o.documentTop;if(c)a==null&&(a=c.left-d.left),r=l<0?c.top:c.bottom;else{let p=o.viewState.lineBlockAt(s);a==null&&(a=Math.min(d.right-d.left,o.defaultCharacterWidth*(s-p.from))),r=(l<0?p.top:p.bottom)+h}let f=d.left+a,u=i??o.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let b=r+(u+p)*l,k=fo(o,{x:f,y:b},!1,l);if(b<d.top||b>d.bottom||(l<0?k<s:k>s)){let v=o.docView.coordsForChar(k),C=!v||b<v.top?-1:1;return U.cursor(k,C,void 0,a)}}}function Fi(o,e,t){for(;;){let i=0;for(let s of o)s.between(e-1,e+1,(l,a,r)=>{if(e>l&&e<a){let d=i||t||(e-l<a-e?-1:1);e=d<0?l:a,i=d}});if(!i)return e}}function ts(o,e,t){let i=Fi(o.state.facet(Jn).map(s=>s(o)),t.from,e.head>t.from?-1:1);return i==t.from?t:U.cursor(i,i<t.from?1:-1)}const si="";class Dc{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ee.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=si}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let s=e;;){this.findPointBefore(i,s);let l=this.text.length;this.readNode(s);let a=s.nextSibling;if(a==t)break;let r=ne.get(s),d=ne.get(a);(r&&d?r.breakAfter:(r?r.breakAfter:Ti(s))||Ti(a)&&(s.nodeName!="BR"||s.cmIgnore)&&this.text.length>l)&&this.lineBreak(),s=a}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,a=1,r;if(this.lineSeparator?(l=t.indexOf(this.lineSeparator,i),a=this.lineSeparator.length):(r=s.exec(t))&&(l=r.index,a=r[0].length),this.append(t.slice(i,l<0?t.length:l)),l<0)break;if(this.lineBreak(),a>1)for(let d of this.points)d.node==e&&d.pos>this.text.length&&(d.pos-=a-1);i=l+a}}readNode(e){if(e.cmIgnore)return;let t=ne.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(Pc(e,i.node,i.offset)?t:0))}}function Pc(o,e,t){for(;;){if(!e||t<Ye(e))return!1;if(e==o)return!0;t=gt(e)+1,e=e.parentNode}}class mo{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class $c{constructor(e,t,i,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:l,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let r=l||a?[]:Lc(e),d=new Dc(r,e.state);d.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=d.text,this.newSel=jc(r,this.bounds.from)}else{let r=e.observer.selectionRange,d=l&&l.node==r.focusNode&&l.offset==r.focusOffset||!Mn(e.contentDOM,r.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(r.focusNode,r.focusOffset),c=a&&a.node==r.anchorNode&&a.offset==r.anchorOffset||!Mn(e.contentDOM,r.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(r.anchorNode,r.anchorOffset),h=e.viewport;if((q.ios||q.chrome)&&e.state.selection.main.empty&&d!=c&&(h.from>0||h.to<e.state.doc.length)){let f=Math.min(d,c),u=Math.max(d,c),p=h.from-f,b=h.to-u;(p==0||p==1||f==0)&&(b==0||b==-1||u==e.state.doc.length)&&(d=0,c=e.state.doc.length)}this.newSel=U.single(c,d)}}}function go(o,e){let t,{newSel:i}=e,s=o.state.selection.main,l=o.inputState.lastKeyTime>Date.now()-100?o.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:r}=e.bounds,d=s.from,c=null;(l===8||q.android&&e.text.length<r-a)&&(d=s.to,c="end");let h=Rc(o.state.doc.sliceString(a,r,si),e.text,d-a,c);h&&(q.chrome&&l==13&&h.toB==h.from+2&&e.text.slice(h.from,h.toB)==si+si&&h.toB--,t={from:a+h.from,to:a+h.toA,insert:X.of(e.text.slice(h.from,h.toB).split(si))})}else i&&(!o.hasFocus&&o.state.facet(at)||i.main.eq(s))&&(i=null);if(!t&&!i)return!1;if(!t&&e.typeOver&&!s.empty&&i&&i.main.empty?t={from:s.from,to:s.to,insert:o.state.doc.slice(s.from,s.to)}:t&&t.from>=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:o.state.doc.slice(s.from,t.from).append(t.insert).append(o.state.doc.slice(t.to,s.to))}:(q.mac||q.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&o.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=U.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:X.of([" "])}):q.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
|
|
9
|
+
`&&o.lineWrapping&&(i&&(i=U.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:X.of([" "])}),t)return is(o,t,i,l);if(i&&!i.main.eq(s)){let a=!1,r="select";return o.inputState.lastSelectionTime>Date.now()-50&&(o.inputState.lastSelectionOrigin=="select"&&(a=!0),r=o.inputState.lastSelectionOrigin),o.dispatch({selection:i,scrollIntoView:a,userEvent:r}),!0}else return!1}function is(o,e,t,i=-1){if(q.ios&&o.inputState.flushIOSKey(e))return!0;let s=o.state.selection.main;if(q.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&o.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Vt(o.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&Vt(o.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&Vt(o.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();o.inputState.composing>=0&&o.inputState.composing++;let a,r=()=>a||(a=Fc(o,e,t));return o.state.facet(Gl).some(d=>d(o,e.from,e.to,l,r))||o.dispatch(r()),!0}function Fc(o,e,t){let i,s=o.state,l=s.selection.main;if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&o.inputState.composing<0){let r=l.from<e.from?s.sliceDoc(l.from,e.from):"",d=l.to>e.to?s.sliceDoc(e.to,l.to):"";i=s.replaceSelection(o.state.toText(r+e.insert.sliceString(0,void 0,o.state.lineBreak)+d))}else{let r=s.changes(e),d=t&&t.main.to<=r.newLength?t.main:void 0;if(s.selection.ranges.length>1&&o.inputState.composing>=0&&e.to<=l.to&&e.to>=l.to-10){let c=o.state.sliceDoc(e.from,e.to),h,f=t&&ao(o,t.main.head);if(f){let b=e.insert.length-(e.to-e.from);h={from:f.from,to:f.to-b}}else h=o.state.doc.lineAt(l.head);let u=l.to-e.to,p=l.to-l.from;i=s.changeByRange(b=>{if(b.from==l.from&&b.to==l.to)return{changes:r,range:d||b.map(r)};let k=b.to-u,v=k-c.length;if(b.to-b.from!=p||o.state.sliceDoc(v,k)!=c||b.to>=h.from&&b.from<=h.to)return{range:b};let C=s.changes({from:v,to:k,insert:e.insert}),x=b.to-l.to;return{changes:C,range:d?U.range(Math.max(0,d.anchor+x),Math.max(0,d.head+x)):b.map(C)}})}else i={changes:r,selection:d&&s.selection.replaceRange(d)}}let a="input.type";return(o.composing||o.inputState.compositionPendingChange&&o.inputState.compositionEndedAt>Date.now()-50)&&(o.inputState.compositionPendingChange=!1,a+=".compose",o.inputState.compositionFirstChange&&(a+=".start",o.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:a,scrollIntoView:!0})}function Rc(o,e,t,i){let s=Math.min(o.length,e.length),l=0;for(;l<s&&o.charCodeAt(l)==e.charCodeAt(l);)l++;if(l==s&&o.length==e.length)return null;let a=o.length,r=e.length;for(;a>0&&r>0&&o.charCodeAt(a-1)==e.charCodeAt(r-1);)a--,r--;if(i=="end"){let d=Math.max(0,l-Math.min(a,r));t-=a+d-l}if(a<l&&o.length<e.length){let d=t<=l&&t>=a?l-t:0;l-=d,r=l+(r-a),a=l}else if(r<l){let d=t<=l&&t>=r?l-t:0;l-=d,a=l+(a-r),r=l}return{from:l,toA:a,toB:r}}function Lc(o){let e=[];if(o.root.activeElement!=o.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:l}=o.observer.selectionRange;return t&&(e.push(new mo(t,i)),(s!=t||l!=i)&&e.push(new mo(s,l))),e}function jc(o,e){if(o.length==0)return null;let t=o[0].pos,i=o.length==2?o[1].pos:t;return t>-1&&i>-1?U.single(t+e,i+e):null}class zc{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,q.safari&&e.contentDOM.addEventListener("input",()=>null),q.gecko&&lh(e.contentDOM.ownerDocument)}handleEvent(e){!Xc(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,t);for(let s of i.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=qc(e),i=this.handlers,s=this.view.contentDOM;for(let l in t)if(l!="scroll"){let a=!t[l].handlers.length,r=i[l];r&&a!=!r.handlers.length&&(s.removeEventListener(l,this.handleEvent),r=null),r||s.addEventListener(l,this.handleEvent,{passive:a})}for(let l in i)l!="scroll"&&!t[l]&&s.removeEventListener(l,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Wc.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),q.android&&q.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return q.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=bo.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||Uc.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Vt(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:q.safari&&!q.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function ko(o,e){return(t,i)=>{try{return e.call(o,i,t)}catch(s){ze(t.state,s)}}}function qc(o){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of o){let s=i.spec;if(s&&s.domEventHandlers)for(let l in s.domEventHandlers){let a=s.domEventHandlers[l];a&&t(l).handlers.push(ko(i.value,a))}if(s&&s.domEventObservers)for(let l in s.domEventObservers){let a=s.domEventObservers[l];a&&t(l).observers.push(ko(i.value,a))}}for(let i in Ie)t(i).handlers.push(Ie[i]);for(let i in Te)t(i).observers.push(Te[i]);return e}const bo=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Uc="dthko",Wc=[16,17,18,20,91,92,224,225],Ri=6;function Li(o){return Math.max(0,o)*.7+8}function Hc(o,e){return Math.max(Math.abs(o.clientX-e.clientX),Math.abs(o.clientY-e.clientY))}class Kc{constructor(e,t,i,s){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=Zd(e.contentDOM),this.atoms=e.state.facet(Jn).map(a=>a(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ee.allowMultipleSelections)&&Qc(e,t),this.dragging=Yc(e,t)&&Oo(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Hc(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,i=0,s=0,l=0,a=this.view.win.innerWidth,r=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:r}=this.scrollParents.y.getBoundingClientRect());let d=lo(this.view);e.clientX-d.left<=s+Ri?t=-Li(s-e.clientX):e.clientX+d.right>=a-Ri&&(t=Li(e.clientX-a)),e.clientY-d.top<=l+Ri?i=-Li(l-e.clientY):e.clientY+d.bottom>=r-Ri&&(i=Li(e.clientY-r)),this.setScrollSpeed(t,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;i<e.ranges.length;i++){let s=e.ranges[i],l=null;if(s.empty){let a=Fi(this.atoms,s.from,0);a!=s.from&&(l=U.cursor(a,-1))}else{let a=Fi(this.atoms,s.from,-1),r=Fi(this.atoms,s.to,1);(a!=s.from||r!=s.to)&&(l=U.range(s.from==s.anchor?a:r,s.from==s.head?a:r))}l&&(t||(t=e.ranges.slice()),t[i]=l)}return t?U.create(t,e.mainIndex):e}select(e){let{view:t}=this,i=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Qc(o,e){let t=o.state.facet(Wl);return t.length?t[0](e):q.mac?e.metaKey:e.ctrlKey}function Gc(o,e){let t=o.state.facet(Hl);return t.length?t[0](e):q.mac?!e.altKey:!e.ctrlKey}function Yc(o,e){let{main:t}=o.state.selection;if(t.empty)return!1;let i=Gt(o.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let l=0;l<s.length;l++){let a=s[l];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function Xc(o,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=o.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=ne.get(t))&&i.ignoreEvent(e))return!1;return!0}const Ie=Object.create(null),Te=Object.create(null),wo=q.ie&&q.ie_version<15||q.ios&&q.webkit_version<604;function Jc(o){let e=o.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{o.focus(),t.remove(),yo(o,t.value)},50)}function ji(o,e,t){for(let i of o.facet(e))t=i(t,o);return t}function yo(o,e){e=ji(o.state,Qn,e);let{state:t}=o,i,s=1,l=t.toText(e),a=l.lines==t.selection.ranges.length;if(ns!=null&&t.selection.ranges.every(d=>d.empty)&&ns==l.toString()){let d=-1;i=t.changeByRange(c=>{let h=t.doc.lineAt(c.from);if(h.from==d)return{range:c};d=h.from;let f=t.toText((a?l.line(s++).text:e)+t.lineBreak);return{changes:{from:h.from,insert:f},range:U.cursor(c.from+f.length)}})}else a?i=t.changeByRange(d=>{let c=l.line(s++);return{changes:{from:d.from,to:d.to,insert:c.text},range:U.cursor(d.from+c.length)}}):i=t.replaceSelection(l);o.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Te.scroll=o=>{o.inputState.lastScrollTop=o.scrollDOM.scrollTop,o.inputState.lastScrollLeft=o.scrollDOM.scrollLeft},Ie.keydown=(o,e)=>(o.inputState.setSelectionOrigin("select"),e.keyCode==27&&o.inputState.tabFocusMode!=0&&(o.inputState.tabFocusMode=Date.now()+2e3),!1),Te.touchstart=(o,e)=>{o.inputState.lastTouchTime=Date.now(),o.inputState.setSelectionOrigin("select.pointer")},Te.touchmove=o=>{o.inputState.setSelectionOrigin("select.pointer")},Ie.mousedown=(o,e)=>{if(o.observer.flush(),o.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of o.state.facet(Kl))if(t=i(o,e),t)break;if(!t&&e.button==0&&(t=th(o,e)),t){let i=!o.hasFocus;o.inputState.startMouseSelection(new Kc(o,e,t,i)),i&&o.observer.ignore(()=>{yl(o.contentDOM);let l=o.root.activeElement;l&&!l.contains(o.contentDOM)&&l.blur()});let s=o.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function xo(o,e,t,i){if(i==1)return U.cursor(e,t);if(i==2)return Bc(o.state,e,t);{let s=de.find(o.docView,e),l=o.state.doc.lineAt(s?s.posAtEnd:e),a=s?s.posAtStart:l.from,r=s?s.posAtEnd:l.to;return r<o.state.doc.length&&r==l.to&&r++,U.range(a,r)}}let vo=(o,e,t)=>e>=t.top&&e<=t.bottom&&o>=t.left&&o<=t.right;function Zc(o,e,t,i){let s=de.find(o.docView,e);if(!s)return 1;let l=e-s.posAtStart;if(l==0)return 1;if(l==s.length)return-1;let a=s.coordsAt(l,-1);if(a&&vo(t,i,a))return-1;let r=s.coordsAt(l,1);return r&&vo(t,i,r)?1:a&&a.bottom>=i?-1:1}function Co(o,e){let t=o.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:Zc(o,t,e.clientX,e.clientY)}}const eh=q.ie&&q.ie_version<=11;let So=null,No=0,Bo=0;function Oo(o){if(!eh)return o.detail;let e=So,t=Bo;return So=o,Bo=Date.now(),No=!e||t>Date.now()-400&&Math.abs(e.clientX-o.clientX)<2&&Math.abs(e.clientY-o.clientY)<2?(No+1)%3:1}function th(o,e){let t=Co(o,e),i=Oo(e),s=o.state.selection;return{update(l){l.docChanged&&(t.pos=l.changes.mapPos(t.pos),s=s.map(l.changes))},get(l,a,r){let d=Co(o,l),c,h=xo(o,d.pos,d.bias,i);if(t.pos!=d.pos&&!a){let f=xo(o,t.pos,t.bias,i),u=Math.min(f.from,h.from),p=Math.max(f.to,h.to);h=u<h.from?U.range(u,p):U.range(p,u)}return a?s.replaceRange(s.main.extend(h.from,h.to)):r&&i==1&&s.ranges.length>1&&(c=ih(s,d.pos))?c:r?s.addRange(h):U.create([h])}}}function ih(o,e){for(let t=0;t<o.ranges.length;t++){let{from:i,to:s}=o.ranges[t];if(i<=e&&s>=e)return U.create(o.ranges.slice(0,t).concat(o.ranges.slice(t+1)),o.mainIndex==t?0:o.mainIndex-(o.mainIndex>t?1:0))}return null}Ie.dragstart=(o,e)=>{let{selection:{main:t}}=o.state;if(e.target.draggable){let s=o.docView.nearest(e.target);if(s&&s.isWidget){let l=s.posAtStart,a=l+s.length;(l>=t.to||a<=t.from)&&(t=U.range(l,a))}}let{inputState:i}=o;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",ji(o.state,Gn,o.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Ie.dragend=o=>(o.inputState.draggedContent=null,!1);function Vo(o,e,t,i){if(t=ji(o.state,Qn,t),!t)return;let s=o.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=o.inputState,a=i&&l&&Gc(o,e)?{from:l.from,to:l.to}:null,r={from:s,insert:t},d=o.state.changes(a?[a,r]:r);o.focus(),o.dispatch({changes:d,selection:{anchor:d.mapPos(s,-1),head:d.mapPos(s,1)},userEvent:a?"move.drop":"input.drop"}),o.inputState.draggedContent=null}Ie.drop=(o,e)=>{if(!e.dataTransfer)return!1;if(o.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),s=0,l=()=>{++s==t.length&&Vo(o,e,i.filter(a=>a!=null).join(o.state.lineBreak),!1)};for(let a=0;a<t.length;a++){let r=new FileReader;r.onerror=l,r.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(r.result)||(i[a]=r.result),l()},r.readAsText(t[a])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Vo(o,e,i,!0),!0}return!1},Ie.paste=(o,e)=>{if(o.state.readOnly)return!0;o.observer.flush();let t=wo?null:e.clipboardData;return t?(yo(o,t.getData("text/plain")||t.getData("text/uri-list")),!0):(Jc(o),!1)};function nh(o,e){let t=o.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),o.focus()},50)}function sh(o){let e=[],t=[],i=!1;for(let s of o.selection.ranges)s.empty||(e.push(o.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:l}of o.selection.ranges){let a=o.doc.lineAt(l);a.number>s&&(e.push(a.text),t.push({from:a.from,to:Math.min(o.doc.length,a.to+1)})),s=a.number}i=!0}return{text:ji(o,Gn,e.join(o.lineBreak)),ranges:t,linewise:i}}let ns=null;Ie.copy=Ie.cut=(o,e)=>{let{text:t,ranges:i,linewise:s}=sh(o.state);if(!t&&!s)return!1;ns=s?t:null,e.type=="cut"&&!o.state.readOnly&&o.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let l=wo?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",t),!0):(nh(o,t),!1)};const _o=Ct.define();function Ao(o,e){let t=[];for(let i of o.facet(Yl)){let s=i(o,e);s&&t.push(s)}return t?o.update({effects:t,annotations:_o.of(!0)}):null}function To(o){setTimeout(()=>{let e=o.hasFocus;if(e!=o.inputState.notifiedFocused){let t=Ao(o.state,e);t?o.dispatch(t):o.update([])}},10)}Te.focus=o=>{o.inputState.lastFocusTime=Date.now(),!o.scrollDOM.scrollTop&&(o.inputState.lastScrollTop||o.inputState.lastScrollLeft)&&(o.scrollDOM.scrollTop=o.inputState.lastScrollTop,o.scrollDOM.scrollLeft=o.inputState.lastScrollLeft),To(o)},Te.blur=o=>{o.observer.clearSelectionRange(),To(o)},Te.compositionstart=Te.compositionupdate=o=>{o.observer.editContext||(o.inputState.compositionFirstChange==null&&(o.inputState.compositionFirstChange=!0),o.inputState.composing<0&&(o.inputState.composing=0))},Te.compositionend=o=>{o.observer.editContext||(o.inputState.composing=-1,o.inputState.compositionEndedAt=Date.now(),o.inputState.compositionPendingKey=!0,o.inputState.compositionPendingChange=o.observer.pendingRecords().length>0,o.inputState.compositionFirstChange=null,q.chrome&&q.android?o.observer.flushSoon():o.inputState.compositionPendingChange?Promise.resolve().then(()=>o.observer.flush()):setTimeout(()=>{o.inputState.composing<0&&o.docView.hasComposition&&o.update([])},50))},Te.contextmenu=o=>{o.inputState.lastContextMenu=Date.now()},Ie.beforeinput=(o,e)=>{var t,i;if(e.inputType=="insertReplacementText"&&o.observer.editContext){let l=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),a=e.getTargetRanges();if(l&&a.length){let r=a[0],d=o.posAtDOM(r.startContainer,r.startOffset),c=o.posAtDOM(r.endContainer,r.endOffset);return is(o,{from:d,to:c,insert:o.state.toText(l)},null),!0}}let s;if(q.chrome&&q.android&&(s=bo.find(l=>l.inputType==e.inputType))&&(o.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let l=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>l+10&&o.hasFocus&&(o.contentDOM.blur(),o.focus())},100)}return q.ios&&e.inputType=="deleteContentForward"&&o.observer.flushSoon(),q.safari&&e.inputType=="insertText"&&o.inputState.composing>=0&&setTimeout(()=>Te.compositionend(o,e),20),!1};const Mo=new Set;function lh(o){Mo.has(o)||(Mo.add(o),o.addEventListener("copy",()=>{}),o.addEventListener("cut",()=>{}))}const Eo=["pre-wrap","normal","pre-line","break-spaces"];let Et=!1;function Io(){Et=!1}class oh{constructor(e){this.lineWrapping=e,this.doc=X.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Eo.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i<e.length;i++){let s=e[i];s<0?i++:this.heightSamples[Math.floor(s*10)]||(t=!0,this.heightSamples[Math.floor(s*10)]=!0)}return t}refresh(e,t,i,s,l,a){let r=Eo.indexOf(e)>-1,d=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=r;if(this.lineWrapping=r,this.lineHeight=t,this.charWidth=i,this.textHeight=s,this.lineLength=l,d){this.heightSamples={};for(let c=0;c<a.length;c++){let h=a[c];h<0?c++:this.heightSamples[Math.floor(h*10)]=!0}}return d}}class ah{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class qe{constructor(e,t,i,s,l){this.from=e,this.length=t,this.top=i,this.height=s,this._content=l}get type(){return typeof this._content=="number"?Le.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof lt?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new qe(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var oe=function(o){return o[o.ByPos=0]="ByPos",o[o.ByHeight=1]="ByHeight",o[o.ByPosNoHeight=2]="ByPosNoHeight",o}(oe||(oe={}));const zi=.001;class ve{constructor(e,t,i=2){this.length=e,this.height=t,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>zi&&(Et=!0),this.height=e)}replace(e,t,i){return ve.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let l=this,a=i.doc;for(let r=s.length-1;r>=0;r--){let{fromA:d,toA:c,fromB:h,toB:f}=s[r],u=l.lineAt(d,oe.ByPosNoHeight,i.setDoc(t),0,0),p=u.to>=c?u:l.lineAt(c,oe.ByPosNoHeight,i,0,0);for(f+=p.to-c,c=p.to;r>0&&u.from<=s[r-1].toA;)d=s[r-1].fromA,h=s[r-1].fromB,r--,d<u.from&&(u=l.lineAt(d,oe.ByPosNoHeight,i,0,0));h+=u.from-d,d=u.from;let b=ss.build(i.setDoc(a),e,h,f);l=qi(l,l.replace(d,c,b))}return l.updateHeight(i,0)}static empty(){return new Oe(0,0)}static of(e){if(e.length==1)return e[0];let t=0,i=e.length,s=0,l=0;for(;;)if(t==i)if(s>l*2){let r=e[t-1];r.break?e.splice(--t,1,r.left,null,r.right):e.splice(--t,1,r.left,r.right),i+=1+r.break,s-=r.size}else if(l>s*2){let r=e[i];r.break?e.splice(i,1,r.left,null,r.right):e.splice(i,1,r.left,r.right),i+=2+r.break,l-=r.size}else break;else if(s<l){let r=e[t++];r&&(s+=r.size)}else{let r=e[--i];r&&(l+=r.size)}let a=0;return e[t-1]==null?(a=1,t--):e[t]==null&&(a=1,i++),new rh(ve.of(e.slice(0,t)),a,ve.of(e.slice(i)))}}function qi(o,e){return o==e?o:(o.constructor!=e.constructor&&(Et=!0),e)}ve.prototype.size=1;class Do extends ve{constructor(e,t,i){super(e,t),this.deco=i}blockAt(e,t,i,s){return new qe(s,this.length,i,this.height,this.deco||0)}lineAt(e,t,i,s,l){return this.blockAt(0,i,s,l)}forEachLine(e,t,i,s,l,a){e<=l+this.length&&t>=l&&a(this.blockAt(0,i,s,l))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Oe extends Do{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,s){return new qe(s,this.length,i,this.height,this.breaks)}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof Oe||s instanceof ge&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof ge?s=new Oe(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):ve.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ge extends ve{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,l=s-i+1,a,r=0;if(e.lineWrapping){let d=Math.min(this.height,e.lineHeight*l);a=d/l,this.length>l+1&&(r=(this.height-d)/(this.length-l-1))}else a=this.height/l;return{firstLine:i,lastLine:s,perLine:a,perChar:r}}blockAt(e,t,i,s){let{firstLine:l,lastLine:a,perLine:r,perChar:d}=this.heightMetrics(t,s);if(t.lineWrapping){let c=s+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),h=t.doc.lineAt(c),f=r+h.length*d,u=Math.max(i,e-f/2);return new qe(h.from,h.length,u,f,0)}else{let c=Math.max(0,Math.min(a-l,Math.floor((e-i)/r))),{from:h,length:f}=t.doc.line(l+c);return new qe(h,f,i+r*c,r,0)}}lineAt(e,t,i,s,l){if(t==oe.ByHeight)return this.blockAt(e,i,s,l);if(t==oe.ByPosNoHeight){let{from:p,to:b}=i.doc.lineAt(e);return new qe(p,b-p,0,0,0)}let{firstLine:a,perLine:r,perChar:d}=this.heightMetrics(i,l),c=i.doc.lineAt(e),h=r+c.length*d,f=c.number-a,u=s+r*f+d*(c.from-l-f);return new qe(c.from,c.length,Math.max(s,Math.min(u,s+this.height-h)),h,0)}forEachLine(e,t,i,s,l,a){e=Math.max(e,l),t=Math.min(t,l+this.length);let{firstLine:r,perLine:d,perChar:c}=this.heightMetrics(i,l);for(let h=e,f=s;h<=t;){let u=i.doc.lineAt(h);if(h==e){let b=u.number-r;f+=d*b+c*(e-l-b)}let p=d+c*u.length;a(new qe(u.from,u.length,f,p,0)),f+=p,h=u.to+1}}replace(e,t,i){let s=this.length-t;if(s>0){let l=i[i.length-1];l instanceof ge?i[i.length-1]=new ge(l.length+s):i.push(null,new ge(s-1))}if(e>0){let l=i[0];l instanceof ge?i[0]=new ge(e+l.length):i.unshift(new ge(e-1),null)}return ve.of(i)}decomposeLeft(e,t){t.push(new ge(e-1),null)}decomposeRight(e,t){t.push(null,new ge(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let l=t+this.length;if(s&&s.from<=t+this.length&&s.more){let a=[],r=Math.max(t,s.from),d=-1;for(s.from>t&&a.push(new ge(s.from-t-1).updateHeight(e,t));r<=l&&s.more;){let h=e.doc.lineAt(r).length;a.length&&a.push(null);let f=s.heights[s.index++];d==-1?d=f:Math.abs(f-d)>=zi&&(d=-2);let u=new Oe(h,f);u.outdated=!1,a.push(u),r+=h+1}r<=l&&a.push(null,new ge(l-r).updateHeight(e,r));let c=ve.of(a);return(d<0||Math.abs(c.height-this.height)>=zi||Math.abs(d-this.heightMetrics(e,t).perLine)>=zi)&&(Et=!0),qi(this,c)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class rh extends ve{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let l=i+this.left.height;return e<l?this.left.blockAt(e,t,i,s):this.right.blockAt(e,t,l,s+this.left.length+this.break)}lineAt(e,t,i,s,l){let a=s+this.left.height,r=l+this.left.length+this.break,d=t==oe.ByHeight?e<a:e<r,c=d?this.left.lineAt(e,t,i,s,l):this.right.lineAt(e,t,i,a,r);if(this.break||(d?c.to<r:c.from>r))return c;let h=t==oe.ByPosNoHeight?oe.ByPosNoHeight:oe.ByPos;return d?c.join(this.right.lineAt(r,h,i,a,r)):this.left.lineAt(r,h,i,s,l).join(c)}forEachLine(e,t,i,s,l,a){let r=s+this.left.height,d=l+this.left.length+this.break;if(this.break)e<d&&this.left.forEachLine(e,t,i,s,l,a),t>=d&&this.right.forEachLine(e,t,i,r,d,a);else{let c=this.lineAt(d,oe.ByPos,i,s,l);e<c.from&&this.left.forEachLine(e,c.from-1,i,s,l,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,i,r,d,a)}}replace(e,t,i){let s=this.left.length+this.break;if(t<s)return this.balanced(this.left.replace(e,t,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let l=[];e>0&&this.decomposeLeft(e,l);let a=l.length;for(let r of i)l.push(r);if(e>0&&Po(l,a-1),t<this.length){let r=l.length;this.decomposeRight(t,l),Po(l,r)}return ve.of(l)}decomposeLeft(e,t){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(i++,e>=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e<i&&this.left.decomposeRight(e,t),this.break&&e<s&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ve.of(this.break?[e,null,t]:[e,t]):(this.left=qi(this.left,e),this.right=qi(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,s){let{left:l,right:a}=this,r=t+l.length+this.break,d=null;return s&&s.from<=t+l.length&&s.more?d=l=l.updateHeight(e,t,i,s):l.updateHeight(e,t,i),s&&s.from<=r+a.length&&s.more?d=a=a.updateHeight(e,r,i,s):a.updateHeight(e,r,i),d?this.balanced(l,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Po(o,e){let t,i;o[e]==null&&(t=o[e-1])instanceof ge&&(i=o[e+1])instanceof ge&&o.splice(e-1,3,new ge(t.length+1+i.length))}const dh=5;class ss{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Oe?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Oe(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e<t||i.heightRelevant){let s=i.widget?i.widget.estimatedHeight:0,l=i.widget?i.widget.lineBreaks:0;s<0&&(s=this.oracle.lineHeight);let a=t-e;i.block?this.addBlock(new Do(a,s,i)):(a||l||s>=dh)&&this.addLineDeco(s,l,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Oe(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new ge(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Oe)return e;let t=new Oe(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Oe)&&!this.isCovered?this.nodes.push(new Oe(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let s of this.nodes)s instanceof Oe&&s.updateHeight(this.oracle,i),i+=s?s.length:1;return this.nodes}static build(e,t,i,s){let l=new ss(i,e);return le.spans(t,i,s,l,0),l.finish(i)}}function ch(o,e,t){let i=new hh;return le.compare(o,e,t,i,0),i.changes}class hh{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,i,s){(e<t||i&&i.heightRelevant||s&&s.heightRelevant)&&jn(e,t,this.changes,5)}}function fh(o,e){let t=o.getBoundingClientRect(),i=o.ownerDocument,s=i.defaultView||window,l=Math.max(0,t.left),a=Math.min(s.innerWidth,t.right),r=Math.max(0,t.top),d=Math.min(s.innerHeight,t.bottom);for(let c=o.parentNode;c&&c!=i.body;)if(c.nodeType==1){let h=c,f=window.getComputedStyle(h);if((h.scrollHeight>h.clientHeight||h.scrollWidth>h.clientWidth)&&f.overflow!="visible"){let u=h.getBoundingClientRect();l=Math.max(l,u.left),a=Math.min(a,u.right),r=Math.max(r,u.top),d=Math.min(c==o.parentNode?s.innerHeight:d,u.bottom)}c=f.position=="absolute"||f.position=="fixed"?h.offsetParent:h.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:l-t.left,right:Math.max(l,a)-t.left,top:r-(t.top+e),bottom:Math.max(r,d)-(t.top+e)}}function uh(o,e){let t=o.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class ls{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++){let s=e[i],l=t[i];if(s.from!=l.from||s.to!=l.to||s.size!=l.size)return!1}return!0}draw(e,t){return ye.replace({widget:new ph(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class ph extends Ln{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class $o{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Fo,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=me.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(Xn).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new oh(t),this.stateDeco=e.facet(ii).filter(i=>typeof i!="function"),this.heightMap=ve.empty().applyChanges(this.stateDeco,X.empty,this.heightOracle.setDoc(e.doc),[new Ae(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ye.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:l,to:a})=>s>=l&&s<=a)){let{from:l,to:a}=this.lineBlockAt(s);e.push(new Ui(l,a))}}return this.viewports=e.sort((i,s)=>i.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Fo:new os(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(li(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(ii).filter(h=>typeof h!="function");let s=e.changedRanges,l=Ae.extendWithRanges(s,ch(i,this.stateDeco,e?e.changes:ue.empty(this.state.doc.length))),a=this.heightMap.height,r=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Io(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=a||Et)&&(e.flags|=2),r?(this.scrollAnchorPos=e.changes.mapPos(r.from,-1),this.scrollAnchorHeight=r.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let d=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<d.from||t.range.head>d.to)||!this.viewportIsAppropriate(d))&&(d=this.getViewport(0,t));let c=d.from!=this.viewport.from||d.to!=this.viewport.to;this.viewport=d,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(kc)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,l=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?me.RTL:me.LTR;let a=this.heightOracle.mustRefreshForWrapping(l),r=t.getBoundingClientRect(),d=a||this.mustMeasureContent||this.contentDOMHeight!=r.height;this.contentDOMHeight=r.height,this.mustMeasureContent=!1;let c=0,h=0;if(r.width&&r.height){let{scaleX:g,scaleY:m}=wl(t,r);(g>.005&&Math.abs(this.scaleX-g)>.005||m>.005&&Math.abs(this.scaleY-m)>.005)&&(this.scaleX=g,this.scaleY=m,c|=8,a=d=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(d=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=Cl(e.scrollDOM);let b=(this.printing?uh:fh)(t,this.paddingTop),k=b.top-this.pixelViewport.top,v=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let C=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(C!=this.inView&&(this.inView=C,C&&(d=!0)),!this.inView&&!this.scrollTarget)return 0;let x=r.width;if((this.contentDOMWidth!=x||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=r.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),d){let g=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(g)&&(a=!0),a||s.lineWrapping&&Math.abs(x-this.contentDOMWidth)>s.charWidth){let{lineHeight:m,charWidth:S,textHeight:_}=e.docView.measureTextSize();a=m>0&&s.refresh(l,m,S,_,x/S,g),a&&(e.docView.minWidth=0,c|=8)}k>0&&v>0?h=Math.max(k,v):k<0&&v<0&&(h=Math.min(k,v)),Io();for(let m of this.viewports){let S=m.from==this.viewport.from?g:e.docView.measureVisibleLineHeights(m);this.heightMap=(a?ve.empty().applyChanges(this.stateDeco,X.empty,this.heightOracle,[new Ae(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,a,new ah(m.from,S))}Et&&(c|=2)}let V=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return V&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),c|=this.updateForViewport()),(c&2||V)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,l=this.heightOracle,{visibleTop:a,visibleBottom:r}=this,d=new Ui(s.lineAt(a-i*1e3,oe.ByHeight,l,0,0).from,s.lineAt(r+(1-i)*1e3,oe.ByHeight,l,0,0).to);if(t){let{head:c}=t.range;if(c<d.from||c>d.to){let h=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(c,oe.ByPos,l,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-h/2:t.y=="start"||t.y=="nearest"&&c<d.from?u=f.top:u=f.bottom-h,d=new Ui(s.lineAt(u-1e3/2,oe.ByHeight,l,0,0).from,s.lineAt(u+h+1e3/2,oe.ByHeight,l,0,0).to)}}return d}mapViewport(e,t){let i=t.mapPos(e.from,-1),s=t.mapPos(e.to,1);return new Ui(this.heightMap.lineAt(i,oe.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,oe.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},i=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(e,oe.ByPos,this.heightOracle,0,0),{bottom:l}=this.heightMap.lineAt(t,oe.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:r}=this;return(e==0||s<=a-Math.max(10,Math.min(-i,250)))&&(t==this.state.doc.length||l>=r+Math.max(10,Math.min(i,250)))&&s>a-2*1e3&&l<r+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let i=[];for(let s of e)t.touchesRange(s.from,s.to)||i.push(new ls(t.mapPos(s.from),t.mapPos(s.to),s.size));return i}ensureLineGaps(e,t){let i=this.heightOracle.lineWrapping,s=i?1e4:2e3,l=s>>1,a=s<<1;if(this.defaultTextDirection!=me.LTR&&!i)return[];let r=[],d=(h,f,u,p)=>{if(f-h<l)return;let b=this.state.selection.main,k=[b.from];b.empty||k.push(b.to);for(let C of k)if(C>h&&C<f){d(h,C-10,u,p),d(C+10,f,u,p);return}let v=gh(e,C=>C.from>=u.from&&C.to<=u.to&&Math.abs(C.from-h)<l&&Math.abs(C.to-f)<l&&!k.some(x=>C.from<x&&C.to>x));if(!v){if(f<u.to&&t&&i&&t.visibleRanges.some(C=>C.from<=f&&C.to>=f)){let C=t.moveToLineBoundary(U.cursor(f),!1,!0).head;C>h&&(f=C)}v=new ls(h,f,this.gapSize(u,h,f,p))}r.push(v)},c=h=>{if(h.length<a||h.type!=Le.Text)return;let f=mh(h.from,h.to,this.stateDeco);if(f.total<a)return;let u=this.scrollTarget?this.scrollTarget.range.head:null,p,b;if(i){let k=s/this.heightOracle.lineLength*this.heightOracle.lineHeight,v,C;if(u!=null){let x=Hi(f,u),V=((this.visibleBottom-this.visibleTop)/2+k)/h.height;v=x-V,C=x+V}else v=(this.visibleTop-h.top-k)/h.height,C=(this.visibleBottom-h.top+k)/h.height;p=Wi(f,v),b=Wi(f,C)}else{let k=f.total*this.heightOracle.charWidth,v=s*this.heightOracle.charWidth,C,x;if(u!=null){let V=Hi(f,u),g=((this.pixelViewport.right-this.pixelViewport.left)/2+v)/k;C=V-g,x=V+g}else C=(this.pixelViewport.left-v)/k,x=(this.pixelViewport.right+v)/k;p=Wi(f,C),b=Wi(f,x)}p>h.from&&d(h.from,p,h,f),b<h.to&&d(b,h.to,h,f)};for(let h of this.viewportLines)Array.isArray(h.type)?h.type.forEach(c):c(h);return r}gapSize(e,t,i,s){let l=Hi(s,i)-Hi(s,t);return this.heightOracle.lineWrapping?e.height*l:s.total*this.heightOracle.charWidth*l}updateLineGaps(e){ls.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ye.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];le.spans(e,this.viewport.from,this.viewport.to,{span(s,l){t.push({from:s,to:l})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((s,l)=>s.from!=t[l].from||s.to!=t[l].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||li(this.heightMap.lineAt(e,oe.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||li(this.heightMap.lineAt(this.scaler.fromDOM(e),oe.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return li(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Ui{constructor(e,t){this.from=e,this.to=t}}function mh(o,e,t){let i=[],s=o,l=0;return le.spans(t,o,e,{span(){},point(a,r){a>s&&(i.push({from:s,to:a}),l+=a-s),s=r}},20),s<e&&(i.push({from:s,to:e}),l+=e-s),{total:l,ranges:i}}function Wi({total:o,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let i=Math.floor(o*t);for(let s=0;;s++){let{from:l,to:a}=e[s],r=a-l;if(i<=r)return l+i;i-=r}}function Hi(o,e){let t=0;for(let{from:i,to:s}of o.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/o.total}function gh(o,e){for(let t of o)if(e(t))return t}const Fo={toDOM(o){return o},fromDOM(o){return o},scale:1,eq(o){return o==this}};class os{constructor(e,t,i){let s=0,l=0,a=0;this.viewports=i.map(({from:r,to:d})=>{let c=t.lineAt(r,oe.ByPos,e,0,0).top,h=t.lineAt(d,oe.ByPos,e,0,0).bottom;return s+=h-c,{from:r,to:d,top:c,bottom:h,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let r of this.viewports)r.domTop=a+(r.top-l)*this.scale,a=r.domBottom=r.domTop+(r.bottom-r.top),l=r.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let l=t<this.viewports.length?this.viewports[t]:null;if(!l||e<l.top)return s+(e-i)*this.scale;if(e<=l.bottom)return l.domTop+(e-l.top);i=l.bottom,s=l.domBottom}}fromDOM(e){for(let t=0,i=0,s=0;;t++){let l=t<this.viewports.length?this.viewports[t]:null;if(!l||e<l.domTop)return i+(e-s)/this.scale;if(e<=l.domBottom)return l.top+(e-l.domTop);i=l.bottom,s=l.domBottom}}eq(e){return e instanceof os?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,i)=>t.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}}function li(o,e){if(e.scale==1)return o;let t=e.toDOM(o.top),i=e.toDOM(o.bottom);return new qe(o.from,o.length,t,i-t,Array.isArray(o._content)?o._content.map(s=>li(s,e)):o._content)}const Ki=H.define({combine:o=>o.join(" ")}),as=H.define({combine:o=>o.indexOf(!0)>-1}),rs=st.newName(),Ro=st.newName(),Lo=st.newName(),jo={"&light":"."+Ro,"&dark":"."+Lo};function ds(o,e,t){return new st(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return o;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):o+" "+i}})}const kh=ds("."+rs,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},jo),bh={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},cs=q.ie&&q.ie_version<=11;class wh{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new ec,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(q.ie&&q.ie_version<=11||q.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(q.chrome&&q.chrome_version<126)&&(this.editContext=new xh(e),e.state.facet(at)&&(e.contentDOM.editContext=this.editContext.editContext)),cs&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(at)?i.root.activeElement!=this.dom:!Ai(i.dom,s))return;let l=s.anchorNode&&i.docView.nearest(s.anchorNode);if(l&&l.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(q.ie&&q.ie_version<=11||q.android&&q.chrome)&&!i.state.selection.main.empty&&s.focusNode&&Xt(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Gt(e.root);if(!t)return!1;let i=q.safari&&e.root.nodeType==11&&Yd(this.dom.ownerDocument)==this.dom&&yh(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let s=Ai(this.dom,i);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&ic(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),s&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let i=this.dom;i;)if(i.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=t)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,bh),cs&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),cs&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var i;if(!this.delayedAndroidKey){let s=()=>{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Vt(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,s=!1;for(let l of e){let a=this.readMutation(l);a&&(a.typeOver&&(s=!0),t==-1?{from:t,to:i}=a:(t=Math.min(a.from,t),i=Math.max(a.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Ai(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new $c(this.view,e,t,i);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,s=go(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=zo(t,e.previousSibling||e.target.previousSibling,-1),s=zo(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(at)!=e.state.facet(at)&&(e.view.contentDOM.editContext=e.state.facet(at)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function zo(o,e,t){for(;e;){let i=ne.get(e);if(i&&i.parent==o)return i;let s=e.parentNode;e=s!=o.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function qo(o,e){let t=e.startContainer,i=e.startOffset,s=e.endContainer,l=e.endOffset,a=o.docView.domAtPos(o.state.selection.main.anchor);return Xt(a.node,a.offset,s,l)&&([t,i,s,l]=[s,l,t,i]),{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:l}}function yh(o,e){if(e.getComposedRanges){let s=e.getComposedRanges(o.root)[0];if(s)return qo(o,s)}let t=null;function i(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return o.contentDOM.addEventListener("beforeinput",i,!0),o.dom.ownerDocument.execCommand("indent"),o.contentDOM.removeEventListener("beforeinput",i,!0),t?qo(o,t):null}class xh{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let{anchor:s}=e.state.selection.main,l={from:this.toEditorPos(i.updateRangeStart),to:this.toEditorPos(i.updateRangeEnd),insert:X.of(i.text.split(`
|
|
10
|
+
`))};l.from==this.from&&s<this.from?l.from=s:l.to==this.to&&s>this.to&&(l.to=s),!(l.from==l.to&&!l.insert.length)&&(this.pendingContextChange=l,e.state.readOnly||is(e,l,U.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=i=>{let s=[],l=null;for(let a=this.toEditorPos(i.rangeStart),r=this.toEditorPos(i.rangeEnd);a<r;a++){let d=e.coordsForChar(a);l=d&&new DOMRect(d.left,d.top,d.right-d.left,d.bottom-d.top)||l||new DOMRect,s.push(l)}t.updateCharacterBounds(i.rangeStart,s)},this.handlers.textformatupdate=i=>{let s=[];for(let l of i.getTextFormats()){let a=l.underlineStyle,r=l.underlineThickness;if(a!="None"&&r!="None"){let d=`text-decoration: underline ${a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${r=="Thin"?1:2}px`;s.push(ye.mark({attributes:{style:d}}).range(this.toEditorPos(l.rangeStart),this.toEditorPos(l.rangeEnd)))}}e.dispatch({effects:Zl.of(ye.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=Gt(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((l,a,r,d,c)=>{if(i)return;let h=c.length-(a-l);if(s&&a>=s.to)if(s.from==l&&s.to==a&&s.insert.eq(c)){s=this.pendingContextChange=null,t+=h,this.to+=h;return}else s=null,this.revertPending(e.state);if(l+=t,a+=t,a<=this.from)this.from+=h,this.to+=h;else if(l<this.to){if(l<this.from||a>this.to||this.to-this.from+c.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(a),c.toString()),this.to+=h}t+=h}),s&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class J{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(s=>s.forEach(l=>i(l,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||tc(e.parent)||document,this.viewState=new $o(e.state||ee.create(e)),e.scrollTo&&e.scrollTo.is(Pi)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ti).map(s=>new Yn(s));for(let s of this.plugins)s.update(this);this.observer=new wh(this),this.inputState=new zc(this),this.inputState.ensureHandlers(this.plugins),this.docView=new oo(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof be?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,l=this.state;for(let u of e){if(u.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=u.state}if(this.destroyed){this.viewState.state=l;return}let a=this.hasFocus,r=0,d=null;e.some(u=>u.annotation(_o))?(this.inputState.notifiedFocused=a,r=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,d=Ao(l,a),d||(r=1));let c=this.observer.delayedAndroidKey,h=null;if(c?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(h=null)):this.observer.clear(),l.facet(ee.phrases)!=this.state.facet(ee.phrases))return this.setState(l);s=$i.create(this,l,e),s.flags|=r;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let u of e){if(f&&(f=f.map(u.changes)),u.scrollIntoView){let{main:p}=u.state.selection;f=new Tt(p.empty?p:U.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of u.effects)p.is(Pi)&&(f=p.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=Qi.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(ni)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(u=>u.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Ki)!=s.state.facet(Ki)&&(this.viewState.mustMeasureContent=!0),(t||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let u of this.state.facet(Kn))try{u(s)}catch(p){ze(this.state,p,"update listener")}(d||h)&&Promise.resolve().then(()=>{d&&this.state==d.startState&&this.dispatch(d),h&&!go(this,h)&&c.force&&Vt(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new $o(e),this.plugins=e.facet(ti).map(i=>new Yn(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new oo(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(ti),i=e.state.facet(ti);if(t!=i){let s=[];for(let l of i){let a=t.indexOf(l);if(a<0)s.push(new Yn(l));else{let r=this.plugins[a];r.mustUpdate=e,s.push(r)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s<this.plugins.length;s++)this.plugins[s].update(this);t!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(i){ze(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:l,scrollAnchorHeight:a}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let r=0;;r++){if(a<0)if(Cl(i))l=-1,a=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(s);l=p.from,a=p.top}this.updateState=1;let d=this.viewState.measure(this);if(!d&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(r>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];d&4||([this.measureRequests,c]=[c,this.measureRequests]);let h=c.map(p=>{try{return p.read(this)}catch(b){return ze(this.state,b),Uo}}),f=$i.create(this,this.state,[]),u=!1;f.flags|=d,t?t.flags|=d:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),u=this.docView.update(f),u&&this.docViewUpdate());for(let p=0;p<c.length;p++)if(h[p]!=Uo)try{let b=c[p];b.write&&b.write(h[p],this)}catch(b){ze(this.state,b)}if(u&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let b=(l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-a;if(b>1||b<-1){s=s+b,i.scrollTop=s/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let r of this.state.facet(Kn))r(t)}get themeClasses(){return rs+" "+(this.state.facet(as)?Lo:Ro)+" "+this.state.facet(Ki)}updateAttrs(){let e=Wo(this,eo,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(at)?"true":"false",class:"cm-content",style:`${q.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Wo(this,Xn,t);let i=this.observer.ignore(()=>{let s=Rn(this.contentDOM,this.contentAttrs,t),l=Rn(this.dom,this.editorAttrs,e);return s||l});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is(J.announce)){t&&(this.announceDOM.textContent=""),t=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(ni);let e=this.state.facet(J.cspNonce);st.mount(this.root,this.styleModules.concat(kh).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(i=>i.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return ts(this,e,po(this,e,t,i))}moveByGroup(e,t){return ts(this,e,po(this,e,t,i=>Ec(this,e.head,i)))}visualLineSide(e,t){let i=this.bidiSpans(e),s=this.textDirectionAt(e.from),l=i[t?i.length-1:0];return U.cursor(l.side(t,s)+e.from,l.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,i=!0){return Mc(this,e,t,i)}moveVertically(e,t,i){return ts(this,e,Ic(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),fo(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),l=this.bidiSpans(s),a=l[ot.find(l,e-s.from,-1,t)];return Mi(i,a.dir==me.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Xl)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>vh)return ql(e.length);let t=this.textDirectionAt(e.from),i;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==t&&(l.fresh||zl(l.isolates,i=no(this,e))))return l.order;i||(i=no(this,e));let s=pc(e.text,t,i);return this.bidiCache.push(new Qi(e.from,e.to,t,i,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||q.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{yl(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Pi.of(new Tt(typeof e=="number"?U.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Pi.of(new Tt(U.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Mt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Mt.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=st.newName(),s=[Ki.of(i),ni.of(ds(`.${i}`,e))];return t&&t.dark&&s.push(as.of(!0)),s}static baseTheme(e){return Pd.lowest(ni.of(ds("."+rs,e,jo)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&ne.get(i)||ne.get(e);return((t=s?.rootView)===null||t===void 0?void 0:t.view)||null}}J.styleModule=ni,J.inputHandler=Gl,J.clipboardInputFilter=Qn,J.clipboardOutputFilter=Gn,J.scrollHandler=Jl,J.focusChangeEffect=Yl,J.perLineTextDirection=Xl,J.exceptionSink=Ql,J.updateListener=Kn,J.editable=at,J.mouseSelectionStyle=Kl,J.dragMovesSelection=Hl,J.clickAddsSelectionRange=Wl,J.decorations=ii,J.outerDecorations=to,J.atomicRanges=Jn,J.bidiIsolatedRanges=io,J.scrollMargins=so,J.darkTheme=as,J.cspNonce=H.define({combine:o=>o.length?o[0]:""}),J.contentAttributes=Xn,J.editorAttributes=eo,J.lineWrapping=J.contentAttributes.of({class:"cm-lineWrapping"}),J.announce=ce.define();const vh=4096,Uo={};class Qi{constructor(e,t,i,s,l,a){this.from=e,this.to=t,this.dir=i,this.isolates=s,this.fresh=l,this.order=a}static update(e,t){if(t.empty&&!e.some(l=>l.fresh))return e;let i=[],s=e.length?e[e.length-1].dir:me.LTR;for(let l=Math.max(0,e.length-10);l<e.length;l++){let a=e[l];a.dir==s&&!t.touchesRange(a.from,a.to)&&i.push(new Qi(t.mapPos(a.from,1),t.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return i}}function Wo(o,e,t){for(let i=o.state.facet(e),s=i.length-1;s>=0;s--){let l=i[s],a=typeof l=="function"?l(o):l;a&&Fn(a,t)}return t}const Ch=!q.ios,Ho={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Ch&&(Ho[".cm-line"].caretColor=Ho[".cm-content"].caretColor="transparent !important");class It extends Nt{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}It.prototype.elementClass="",It.prototype.toDOM=void 0,It.prototype.mapMode=Be.TrackBefore,It.prototype.startSide=It.prototype.endSide=-1,It.prototype.point=!0;var hs;const Dt=new Y;function Sh(o){return H.define({combine:o?e=>e.concat(o):void 0})}const Nh=new Y;class De{constructor(e,t,i=[],s=""){this.data=e,this.name=s,ee.prototype.hasOwnProperty("tree")||Object.defineProperty(ee.prototype,"tree",{get(){return fs(this)}}),this.parser=t,this.extension=[$t.of(this),ee.languageData.of((l,a,r)=>{let d=Ko(l,a,r),c=d.type.prop(Dt);if(!c)return[];let h=l.facet(c),f=d.type.prop(Nh);if(f){let u=d.resolve(a-d.from,r);for(let p of f)if(p.test(u,l)){let b=l.facet(p.facet);return p.type=="replace"?b:b.concat(h)}}return h})].concat(i)}isActiveAt(e,t,i=-1){return Ko(e,t,i).type.prop(Dt)==this.data}findRegions(e){let t=e.facet($t);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(l,a)=>{if(l.prop(Dt)==this.data){i.push({from:a,to:a+l.length});return}let r=l.prop(Y.mounted);if(r){if(r.tree.prop(Dt)==this.data){if(r.overlay)for(let d of r.overlay)i.push({from:d.from+a,to:d.to+a});else i.push({from:a,to:a+l.length});return}else if(r.overlay){let d=i.length;if(s(r.tree,r.overlay[0].from+a),i.length>d)return}}for(let d=0;d<l.children.length;d++){let c=l.children[d];c instanceof re&&s(c,l.positions[d]+a)}};return s(fs(e),0),i}get allowsNesting(){return!0}}De.setState=ce.define();function Ko(o,e,t){let i=o.facet($t),s=fs(o).topNode;if(!i||i.allowsNesting)for(let l=s;l;l=l.enter(e,t,fe.ExcludeBuffers))l.type.isTop&&(s=l);return s}class Gi extends De{constructor(e,t,i){super(e,t,[],i),this.parser=t}static define(e){let t=Sh(e.languageData);return new Gi(t,e.parser.configure({props:[Dt.add(i=>i.isTop?t:void 0)]}),e.name)}configure(e,t){return new Gi(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function fs(o){let e=o.field(De.state,!1);return e?e.tree:re.empty}class Bh{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e<i||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let oi=null;class Yi{constructor(e,t,i=[],s,l,a,r,d){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=l,this.viewport=a,this.skipped=r,this.scheduleOn=d,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new Yi(e,t,[],re.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Bh(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=re.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let s=this.parse.advance();if(s)if(this.fragments=this.withoutTempSkipped(ht.addTree(s,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=s,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ht.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=oi;oi=this;try{return e()}finally{oi=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Qo(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:l,viewport:a,skipped:r}=this;if(this.takeTree(),!e.empty){let d=[];if(e.iterChangedRanges((c,h,f,u)=>d.push({fromA:c,toA:h,fromB:f,toB:u})),i=ht.applyChanges(i,d),s=re.empty,l=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){r=[];for(let c of this.skipped){let h=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);h<f&&r.push({from:h,to:f})}}}return new Yi(this.parser,t,i,s,l,a,r,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:s,to:l}=this.skipped[i];s<e.to&&l>e.from&&(this.fragments=Qo(this.fragments,s,l),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Ms{createParse(t,i,s){let l=s[0].from,a=s[s.length-1].to;return{parsedPos:l,advance(){let d=oi;if(d){for(let c of s)d.tempSkipped.push(c);e&&(d.scheduleOn=d.scheduleOn?Promise.all([d.scheduleOn,e]):e)}return this.parsedPos=a,new re(Ce.none,[],[],a-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return oi}}function Qo(o,e,t){return ht.applyChanges(o,[{fromA:e,toA:t,fromB:e,toB:t}])}class Pt{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new Pt(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=Yi.create(e.facet($t).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new Pt(i)}}De.state=pt.define({create:Pt.init,update(o,e){for(let t of e.effects)if(t.is(De.setState))return t.value;return e.startState.facet($t)!=e.state.facet($t)?Pt.init(e.state):o.apply(e)}});let Go=o=>{let e=setTimeout(()=>o(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Go=o=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(o,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const us=typeof navigator<"u"&&(!((hs=navigator.scheduling)===null||hs===void 0)&&hs.isInputPending)?()=>navigator.scheduling.isInputPending():null,Oh=Mt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(De.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(De.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Go(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:s}}=this.view,l=i.field(De.state);if(l.tree==l.context.tree&&l.context.isDone(s+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!us?Math.max(25,e.timeRemaining()-5):1e9),r=l.context.treeLen<s&&i.doc.length>s+1e3,d=l.context.work(()=>us&&us()||Date.now()>a,s+(r?0:1e5));this.chunkBudget-=Date.now()-t,(d||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:De.setState.of(new Pt(l.context))})),this.chunkBudget>0&&!(d&&!r)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>ze(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),$t=H.define({combine(o){return o.length?o[0]:null},enables:o=>[De.state,Oh,J.contentAttributes.compute([o],e=>{let t=e.facet(o);return t&&t.name?{"data-language":t.name}:{}})]});class Vh{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const _h=new Y;function Yo({except:o,units:e=1}={}){return t=>{let i=o&&o.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const Ah=new Y;function Th(o){let e=o.firstChild,t=o.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?o.to:t.from}:null}class ps{constructor(e,t){this.specs=e;let i;function s(r){let d=st.newName();return(i||(i=Object.create(null)))["."+d]=r,d}const l=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,a=t.scope;this.scope=a instanceof De?r=>r.prop(Dt)==a.data:a?r=>r==a:void 0,this.style=Ls(e.map(r=>({tag:r.tag,class:r.class||s(Object.assign({},r,{tag:null}))})),{all:l}).style,this.module=i?new st(i):null,this.themeType=t.themeType}static define(e,t){return new ps(e,t||{})}}P.meta,P.link,P.heading,P.emphasis,P.strong,P.strikethrough,P.keyword,P.atom,P.bool,P.url,P.contentSeparator,P.labelName,P.literal,P.inserted,P.string,P.deleted,P.regexp,P.escape,P.string,P.variableName,P.variableName,P.typeName,P.namespace,P.className,P.variableName,P.macroName,P.propertyName,P.comment,P.invalid;const Mh=Object.create(null),Xo=[Ce.none],Jo=[],Zo=Object.create(null),Eh=Object.create(null);for(let[o,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Eh[o]=Ih(Mh,e);function ms(o,e){Jo.indexOf(o)>-1||(Jo.push(o),console.warn(e))}function Ih(o,e){let t=[];for(let r of e.split(" ")){let d=[];for(let c of r.split(".")){let h=o[c]||P[c];h?typeof h=="function"?d.length?d=d.map(h):ms(c,`Modifier ${c} used at start of tag`):d.length?ms(c,`Tag ${c} used as modifier`):d=Array.isArray(h)?h:[h]:ms(c,`Unknown highlighting tag ${c}`)}for(let c of d)t.push(c)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),s=i+" "+t.map(r=>r.id),l=Zo[s];if(l)return l.id;let a=Zo[s]=Ce.define({id:Xo.length,name:i,props:[Rs({[i]:t})]});return Xo.push(a),a.id}me.RTL,me.LTR;const Dh=Gi.define({name:"json",parser:Ad.configure({props:[_h.add({Object:Yo({except:/^\s*\}/}),Array:Yo({except:/^\s*\]/})}),Ah.add({"Object Array":Th})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function Ph(){return new Vh(Dh)}const gs=[{name:"tel",title:"手机号",express:"^1[3-9]\\d{9}$",error:"手机号不正确"},{name:"email",title:"邮箱",express:"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",error:"邮箱不正确"},{name:"idcard",title:"身份证号码",express:"(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)",error:"身份证号码不正确"}];function $h(){const o=Me();if(o.formRules?.length){const e={};gs.forEach(i=>{e[i.name]=i});const t=[...gs];return o.formRules.forEach(i=>{const s=e[i.name];s?Object.assign(s,i):t.push(s)}),t}return gs}const Fh={loadAdvances:$h},Rh={class:"unione-props-setting data-field-setting"},Lh={key:0},jh=["onClick"],zh={class:"field-txt"},qh=["onClick"],Uh={key:1,class:"field-txt"},Wh=["onClick"],Hh={key:0,class:"field-txt"},Kh={key:3,class:"edit-field"},Qh=["onClick"],Gh=Z(n.defineComponent({__name:"dataFieldSetting",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=n.ref([Ph()]),t=n.ref([{title:"序号",dataIndex:"index",key:"index",width:"30px",fixed:"left",align:"center",customRender:({index:g})=>g+1},{title:"字段名称",dataIndex:"name",key:"name",width:"70px",rowDrag:!0,resizable:!0,fixed:"left",align:"center"},{title:"字段标题",dataIndex:"title",key:"title",width:"90px",align:"center"},{title:"控件类型",dataIndex:"widget",key:"widget",width:"60px",align:"center"},{title:"验证规则",dataIndex:"rules",key:"rules",width:"60px",align:"center"},{title:"表单",dataIndex:"form",key:"form",width:"40px",align:"center"},{title:"详情",dataIndex:"view",key:"view",width:"40px",align:"center"},{title:"列表",dataIndex:"list",key:"list",width:"40px",align:"center"},{title:"排序",dataIndex:"sort",key:"sort",width:"40px",align:"center"},{title:"查询",dataIndex:"query",key:"query",width:"40px",align:"center"},{title:"转换器",dataIndex:"convertName",key:"convertName",width:"50px",align:"center"}]),i=n.useModel(o,"modelValue"),s={mounted:g=>g.focus()},l=n.ref({});function a(){const g=Object.keys(l.value);if(g.length)for(let m in g){const S=i.value.filter(_=>_.name==m);if(S&&S[0]){let _=l.value[m];Object.keys(_).forEach(y=>{y=="convertName"?(S[0].convert||(S[0].convert={}),S[0].convert.type=_[y]):S[0][y]=_[y]})}}l.value={}}function r(g,m){a();const S={};m=="convertName"?(g.convert||(g.convert={}),S[m]=g.convert?.type):S[m]=g[m]||"",l.value[g.name]=S}function d(g,m){{l.value={};return}}function c(g,m){switch(m){case"query":return g.configs?.query?.enable;case"form":return g.configs?.show?.form?.enable;case"view":return g.configs?.show?.view?.enable;case"list":return g.configs?.show?.list?.enable;case"sort":return g.configs?.sort?.enable}}function h(g,m){switch(m){case"query":g.configs=W.utils.obj.ext(g.configs,{query:{enable:!1}}),g.configs.query.enable=!g.configs.query.enable;break;case"form":g.configs=W.utils.obj.ext(g.configs,{show:{form:{enable:!1}}}),g.configs.show.form.enable=!g.configs.show.form.enable;break;case"view":g.configs=W.utils.obj.ext(g.configs,{show:{view:{enable:!1}}}),g.configs.show.view.enable=!g.configs.show.view.enable;break;case"list":g.configs=W.utils.obj.ext(g.configs,{show:{list:{enable:!1}}}),g.configs.show.list.enable=!g.configs.show.list.enable;break;case"sort":g.configs=W.utils.obj.ext(g.configs,{sort:{enable:!1}}),g.configs.sort.enable=!g.configs.sort.enable;break}console.log("record.configs",g.configs)}const f=n.ref({title:"列头设置",prop:"list",visible:!1,field:{},show:{},toSetting:()=>{f.value.visible=!1}});function u(g,m){switch(f.value.prop=m,f.value.field=g,g.configs||(g.configs={}),g.configs.show||(g.configs.show={}),m){case"query":g.configs.query||(g.configs.query={}),g.configs.query.types||(g.configs.query.types="EQ"),f.value.show=g.configs.query,f.value.title=`查询设置/${g.title}(${g.name})`;break;case"form":g.configs.show.form||(g.configs.show.form={}),f.value.show=g.configs.show.form,f.value.title=`表单设置/${g.title}(${g.name})`;break;case"view":g.configs.show.view||(g.configs.show.view={}),f.value.show=g.configs.show.view,f.value.title=`详情设置/${g.title}(${g.name})`;break;case"list":g.configs.show.list||(g.configs.show.list={}),f.value.show=g.configs.show.list,f.value.title=`列头设置/${g.title}(${g.name})`;break;case"sort":g.configs.sort||(g.configs.sort={}),f.value.show=g.configs.sort,f.value.title=`排序设置/${g.title}(${g.name})`;break}f.value.visible=!0}const p=n.ref({options:[{value:"keywords",label:"关键字"},{value:"equle",label:"精确"},{value:"like",label:"模糊"},{value:"like-right",label:"右模糊"},{value:"like-left",label:"左模糊"},{value:"range",label:"范围"}],showLabel:g=>{const m=p.value.options.filter(S=>S.value==g);return m[0]?m[0].label:g}}),b=n.ref({visible:!1,field:{},props:{},advances:Fh.loadAdvances(),showInfo:g=>{let m=0;if(g.configs?.rule){const S=g.configs.rule;S.advance&&m++,typeof S.rangeMin<"u"&&m++,typeof S.rangeMax<"u"&&m++,typeof S.regExpress<"u"&&m++}if(m>0)return"("+m+")"},toSetting:()=>{const g=b.value.props;b.value.field.configs=W.utils.obj.ext(b.value.field.configs,{rule:{...g}}),b.value.visible=!1,b.value.props={}}});function k(g){b.value.visible=!0,b.value.field=g,b.value.props=g.configs?.rule||{}}const v=n.ref({visible:!1,field:{},widget:{},widgets:[{value:"a-input",label:"文本框"},{value:"a-input-number",label:"数值框"},{value:"unione-check-box",label:"多选框"},{value:"unione-radio-box",label:"单选框"},{value:"unione-switch-box",label:"开关"},{value:"unione-select-box",label:"下拉框"},{value:"unione-tree-box",label:"下拉树"},{value:"a-date-picker",label:"日期框"},{value:"a-input-password",label:"密码框"},{value:"a-input-search",label:"搜索框"},{value:"a-upload",label:"文件框"},{value:"unione-avatar",label:"头像框",disabled:!0},{value:"unione-picture-card",label:"照片墙"},{value:"a-slider",label:"滑块"},{value:"a-textarea",label:"文本域"}],widgetName:g=>{const m=g.configs?.widget?.name,S=v.value.widgets.filter(_=>_.value==m);return S[0]?S[0].label:m},toSetting:(g,m)=>{g.configs||(g.configs={}),g.configs.widget||(g.configs.widget={}),g.configs.widget.name=m},toclose:()=>{v.value.visible=!1}});function C(g){v.value.field=g,g.configs=W.utils.obj.ext(g.configs,{widget:{props:{}}}),v.value.widget=g.configs.widget,v.value.visible=!0}const x=n.ref({visible:!1,field:{},convert:{},types:[{value:"dict",label:"字典"},{value:"option",label:"静态"},{value:"dbtable",label:"数据集"},{value:"remote",label:"远程接口"},{value:"local",label:"本地接口"}],optionColumn:[{title:"选项标题",dataIndex:"label"},{title:"选项值",dataIndex:"value"},{title:"操作",dataIndex:"action",width:"20%"}],getTypes:(g,m="--")=>x.value.types.filter(S=>S.value==g)[0]?.label||m,toAddOption:()=>{x.value.convert.options||(x.value.convert.options=[]),x.value.convert.options.push({label:"",value:""})},toDelOption:(g,m)=>{x.value.convert.options.splice(g,1)},toSetting:()=>{x.value.visible=!1}});function V(g){x.value.visible=!0,x.value.field=g,g.configs||(g.configs={}),g.configs.convert||(g.configs.convert={}),x.value.convert=g.configs.convert}return(g,m)=>{const S=n.resolveComponent("ToolOutlined"),_=n.resolveComponent("a-button"),y=n.resolveComponent("a-select"),w=n.resolveComponent("a-checkbox"),N=n.resolveComponent("a-table"),A=n.resolveComponent("a-switch"),O=n.resolveComponent("a-form-item"),D=n.resolveComponent("a-select-option"),M=n.resolveComponent("a-input-number"),E=n.resolveComponent("a-form"),z=n.resolveComponent("a-modal"),$=n.resolveComponent("a-input"),I=n.resolveComponent("unione-select-box"),K=n.resolveComponent("a-checkbox-group"),L=n.resolveComponent("unione-section");return n.openBlock(),n.createElementBlock("div",Rh,[n.createVNode(N,{columns:t.value,"data-source":i.value,bordered:"",scroll:{x:1e3},pagination:!0,"row-key":"name",size:"small"},{headerCell:n.withCtx(({column:B})=>[["widget","queryType","rules","convertName"].includes(B.key)?(n.openBlock(),n.createElementBlock("span",Lh,[n.createVNode(S),n.createTextVNode(" "+n.toDisplayString(B.title),1)])):n.createCommentVNode("",!0)]),bodyCell:n.withCtx(({column:B,text:Q,record:T})=>[["rules"].includes(B.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",!b.value.showInfo(T)&&"empty"]),onClick:j=>k(T)},[n.createElementVNode("span",zh,n.toDisplayString(b.value.showInfo(T)),1),b.value.showInfo(T)?(n.openBlock(),n.createBlock(_,{key:0,type:"link"},{default:n.withCtx(()=>m[50]||(m[50]=[n.createTextVNode("设置")])),_:1})):n.createCommentVNode("",!0)],10,jh)):["widget"].includes(B.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["edit-field",(!l.value[T.name]||!Object.keys(l.value[T.name]).includes(B.dataIndex))&&!Q&&"empty"]),onClick:j=>r(T,B.dataIndex)},[l.value[T.name]&&Object.keys(l.value[T.name]).includes(B.dataIndex)?n.withDirectives((n.openBlock(),n.createBlock(y,{key:0,value:T.configs?.widget?.name,allowClear:!0,options:v.value.widgets,onChange:j=>v.value.toSetting(T,j),onBlur:m[0]||(m[0]=j=>d())},null,8,["value","options","onChange"])),[[s]]):(n.openBlock(),n.createElementBlock("span",Uh,n.toDisplayString(v.value.widgetName(T)),1)),n.createVNode(_,{type:"link",onClick:n.withModifiers(j=>C(T),["stop"])},{default:n.withCtx(()=>m[51]||(m[51]=[n.createTextVNode("设置")])),_:2},1032,["onClick"])],10,qh)):["convertName"].includes(B.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["edit-field",(!l.value[T.name]||!Object.keys(l.value[T.name]).includes(B.dataIndex))&&!T.convert?.type&&"empty"]),onClick:j=>V(T)},[T.configs?.convert?.types?(n.openBlock(),n.createElementBlock("span",Hh,n.toDisplayString(x.value.getTypes(T.configs.convert.types)),1)):n.createCommentVNode("",!0)],10,Wh)):["query","form","view","list","sort"].includes(B.dataIndex)?(n.openBlock(),n.createElementBlock("div",Kh,[n.createVNode(w,{checked:c(T,B.dataIndex),onClick:j=>h(T,B.dataIndex)},null,8,["checked","onClick"]),n.createVNode(_,{type:"link",onClick:j=>u(T,B.dataIndex)},{default:n.withCtx(()=>m[52]||(m[52]=[n.createTextVNode("设置")])),_:2},1032,["onClick"])])):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),n.createVNode(z,{visible:f.value.visible,"onUpdate:visible":m[14]||(m[14]=B=>f.value.visible=B),width:600,title:f.value.title,onOk:f.value.toSetting},{default:n.withCtx(()=>[n.createVNode(E,{model:f.value.show,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off",class:n.normalizeClass(["field-setting-form","form-mix",f.value.prop])},{default:n.withCtx(()=>[n.createVNode(O,{label:"启用状态"},{default:n.withCtx(()=>[n.createVNode(A,{checked:f.value.show.enable,"onUpdate:checked":m[1]||(m[1]=B=>f.value.show.enable=B),checkedChildren:"启用",unCheckedChildren:"停用"},null,8,["checked"])]),_:1}),f.value.prop=="sort"?(n.openBlock(),n.createBlock(O,{key:0,label:"默认排序"},{default:n.withCtx(()=>[n.createVNode(A,{checked:f.value.show.defoult,"onUpdate:checked":m[2]||(m[2]=B=>f.value.show.defoult=B),checkedChildren:"是",unCheckedChildren:"否"},null,8,["checked"])]),_:1})):n.createCommentVNode("",!0),f.value.prop=="sort"?(n.openBlock(),n.createBlock(O,{key:1,label:"排序方式"},{default:n.withCtx(()=>[n.createVNode(A,{checked:f.value.show.asc,"onUpdate:checked":m[3]||(m[3]=B=>f.value.show.asc=B),checkedChildren:"升序",unCheckedChildren:"降序"},null,8,["checked"])]),_:1})):n.createCommentVNode("",!0),f.value.prop=="query"&&f.value.show.types=="ADVANCE"?(n.openBlock(),n.createBlock(O,{key:2,label:"高级查询"})):n.createCommentVNode("",!0),f.value.prop=="query"?(n.openBlock(),n.createBlock(O,{key:3,label:"默认查询",tooltip:"开启后该字段加入关键字查询"},{default:n.withCtx(()=>[n.createVNode(A,{checked:f.value.show.defoult,"onUpdate:checked":m[4]||(m[4]=B=>f.value.show.defoult=B),checkedChildren:"是",unCheckedChildren:"否"},null,8,["checked"])]),_:1})):n.createCommentVNode("",!0),f.value.prop=="query"?(n.openBlock(),n.createBlock(O,{key:4,label:"默认显示",tooltip:"开启后,在查询表单中默认显示该查询字段"},{default:n.withCtx(()=>[n.createVNode(A,{checked:f.value.show.visible,"onUpdate:checked":m[5]||(m[5]=B=>f.value.show.visible=B),checkedChildren:"是",unCheckedChildren:"否"},null,8,["checked"])]),_:1})):n.createCommentVNode("",!0),f.value.prop=="query"?(n.openBlock(),n.createBlock(O,{key:5,label:"查询方式"},{default:n.withCtx(()=>[n.createVNode(y,{value:f.value.show.types,"onUpdate:value":m[6]||(m[6]=B=>f.value.show.types=B)},{default:n.withCtx(()=>[n.createVNode(D,{key:"EQ",value:"EQ"},{default:n.withCtx(()=>m[53]||(m[53]=[n.createTextVNode("精确查询")])),_:1}),n.createVNode(D,{key:"LIKE",value:"LIKE"},{default:n.withCtx(()=>m[54]||(m[54]=[n.createTextVNode("模糊查询")])),_:1}),n.createVNode(D,{key:"LLIKE",value:"LLIKE"},{default:n.withCtx(()=>m[55]||(m[55]=[n.createTextVNode("左模糊")])),_:1}),n.createVNode(D,{key:"RLIKE",value:"RLIKE"},{default:n.withCtx(()=>m[56]||(m[56]=[n.createTextVNode("右模糊")])),_:1}),n.createVNode(D,{key:"RANGE",value:"RANGE"},{default:n.withCtx(()=>m[57]||(m[57]=[n.createTextVNode("范围查询")])),_:1}),n.createVNode(D,{key:"ADVANCE",value:"ADVANCE"},{default:n.withCtx(()=>m[58]||(m[58]=[n.createTextVNode("高级查询")])),_:1})]),_:1},8,["value"])]),_:1})):n.createCommentVNode("",!0),["query","sort"].includes(f.value.prop)?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(O,{key:6,label:"显示顺序",tooltip:"默认根据字段顺序显示,若需调整字段显示顺序,可以通过这里设置!"},{default:n.withCtx(()=>[n.createVNode(M,{value:f.value.show.index,"onUpdate:value":m[7]||(m[7]=B=>f.value.show.index=B)},null,8,["value"])]),_:1})),["form","view"].includes(f.value.prop)?(n.openBlock(),n.createBlock(O,{key:7,label:"显示宽度",tooltip:"字段显示宽度,0-24,设置成0,根据表单默认配置"},{default:n.withCtx(()=>[n.createVNode(M,{min:0,max:24,value:f.value.show.width,"onUpdate:value":m[8]||(m[8]=B=>f.value.show.width=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["list"].includes(f.value.prop)?(n.openBlock(),n.createBlock(O,{key:8,label:"显示宽度",tooltip:"字段显示宽度"},{default:n.withCtx(()=>[n.createVNode(M,{min:0,value:f.value.show.width,"onUpdate:value":m[9]||(m[9]=B=>f.value.show.width=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["form","view"].includes(f.value.prop)?(n.openBlock(),n.createBlock(O,{key:9,label:"标题宽度",tooltip:"表单title部分显示宽度,0-24"},{default:n.withCtx(()=>[n.createVNode(M,{min:0,max:24,value:f.value.show.labelWidth,"onUpdate:value":m[10]||(m[10]=B=>f.value.show.labelWidth=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["form","view"].includes(f.value.prop)?(n.openBlock(),n.createBlock(O,{key:10,label:"控件宽度",tooltip:"表单组件部分显示宽度,0-24"},{default:n.withCtx(()=>[n.createVNode(M,{min:0,max:24,value:f.value.show.valueWidth,"onUpdate:value":m[11]||(m[11]=B=>f.value.show.valueWidth=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["list"].includes(f.value.prop)?(n.openBlock(),n.createBlock(O,{key:11,label:"固定位置"},{default:n.withCtx(()=>[n.createVNode(y,{value:f.value.show.fixed,"onUpdate:value":m[12]||(m[12]=B=>f.value.show.fixed=B),allowClear:"",options:[{value:"left",label:"靠左"},{value:"right",label:"靠右"}]},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["list"].includes(f.value.prop)?(n.openBlock(),n.createBlock(O,{key:12,label:"对齐方式"},{default:n.withCtx(()=>[n.createVNode(y,{value:f.value.show.align,"onUpdate:value":m[13]||(m[13]=B=>f.value.show.align=B),options:[{value:"left",label:"左对齐"},{value:"center",label:"居中"},{value:"right",label:"右对齐"}]},null,8,["value"])]),_:1})):n.createCommentVNode("",!0)]),_:1},8,["model","class"])]),_:1},8,["visible","title","onOk"]),n.createVNode(z,{visible:x.value.visible,"onUpdate:visible":m[33]||(m[33]=B=>x.value.visible=B),width:600,title:x.value.getTypes(x.value.convert.types,"转换")+"设置",onOk:x.value.toSetting},{default:n.withCtx(()=>[n.createVNode(E,{model:x.value.convert,name:"basic","label-col":{span:5},"wrapper-col":{span:17},autocomplete:"off",class:"form-mix"},{default:n.withCtx(()=>[n.createVNode(O,{label:"转换类型"},{default:n.withCtx(()=>[n.createVNode(y,{value:x.value.convert.types,"onUpdate:value":m[15]||(m[15]=B=>x.value.convert.types=B),allowClear:!0,options:x.value.types},null,8,["value","options"])]),_:1}),["unione-select-box","unione-tree-box"].includes(x.value.field.widget?.name)?(n.openBlock(),n.createBlock(O,{key:0,label:"是否搜索"},{default:n.withCtx(()=>[n.createVNode(A,{checked:f.value.convert.search,"onUpdate:checked":m[16]||(m[16]=B=>f.value.convert.search=B),checkedChildren:"启用",unCheckedChildren:"停用"},null,8,["checked"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="option"?(n.openBlock(),n.createBlock(O,{key:1,label:"选项设置"},{default:n.withCtx(()=>[n.createVNode(_,{class:"editable-add-btn",style:{"margin-bottom":"8px"},onClick:x.value.toAddOption},{default:n.withCtx(()=>m[59]||(m[59]=[n.createTextVNode("新增")])),_:1},8,["onClick"]),n.createVNode(N,{columns:x.value.optionColumn,"data-source":x.value.convert.options,size:"small"},{bodyCell:n.withCtx(({column:B,record:Q,index:T})=>[B.dataIndex==="label"?(n.openBlock(),n.createBlock($,{key:0,value:Q.label,"onUpdate:value":j=>Q.label=j,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):n.createCommentVNode("",!0),B.dataIndex==="value"?(n.openBlock(),n.createBlock($,{key:1,value:Q.value,"onUpdate:value":j=>Q.value=j,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):n.createCommentVNode("",!0),B.dataIndex==="action"?(n.openBlock(),n.createElementBlock("a",{key:2,onClick:j=>x.value.toDelOption(T,Q)},"删除",8,Qh)):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source"])]),_:1})):n.createCommentVNode("",!0),["dbtable","remote"].includes(x.value.convert.types)?(n.openBlock(),n.createBlock(O,{key:2,label:"数据源"},{default:n.withCtx(()=>[n.createVNode(I,{value:x.value.convert.dsId,"onUpdate:value":m[17]||(m[17]=B=>x.value.convert.dsId=B),convert:{types:"local",url:"/api/data/source/find",search:!0}},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"?(n.openBlock(),n.createBlock(O,{key:3,label:"table名称"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.tableName,"onUpdate:value":m[18]||(m[18]=B=>x.value.convert.tableName=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"?(n.openBlock(),n.createBlock(O,{key:4,label:"table名称"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.tableName,"onUpdate:value":m[19]||(m[19]=B=>x.value.convert.tableName=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"&&["unione-tree-box"].includes(x.value.field.widget?.name)?(n.openBlock(),n.createBlock(O,{key:5,label:"主键字段"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.idField,"onUpdate:value":m[20]||(m[20]=B=>x.value.convert.idField=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"&&["unione-tree-box"].includes(x.value.field.widget?.name)?(n.openBlock(),n.createBlock(O,{key:6,label:"父级字段"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.pidField,"onUpdate:value":m[21]||(m[21]=B=>x.value.convert.pidField=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"?(n.openBlock(),n.createBlock(O,{key:7,label:"value字段"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.valueField,"onUpdate:value":m[22]||(m[22]=B=>x.value.convert.valueField=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"?(n.openBlock(),n.createBlock(O,{key:8,label:"label字段"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.labelField,"onUpdate:value":m[23]||(m[23]=B=>x.value.convert.labelField=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"?(n.openBlock(),n.createBlock(O,{key:9,label:"扩展字段",tooltip:"默认只加载value,label字段,可以通过该属性加载其他更多字段,多个字段用逗号分隔"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.tableField,"onUpdate:value":m[24]||(m[24]=B=>x.value.convert.tableField=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"?(n.openBlock(),n.createBlock(O,{key:10,label:"数据过滤",tooltip:"支持数据条件过滤,eg:sex=1"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.tableWhere,"onUpdate:value":m[25]||(m[25]=B=>x.value.convert.tableWhere=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"?(n.openBlock(),n.createBlock(O,{key:11,label:"数据排序",tooltip:"设置数据进行排序方式,eg:age desc"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.tableOrder,"onUpdate:value":m[26]||(m[26]=B=>x.value.convert.tableOrder=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"?(n.openBlock(),n.createBlock(O,{key:12,label:"数据排序",tooltip:"设置数据进行排序方式,eg:age desc"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.tableOrder,"onUpdate:value":m[27]||(m[27]=B=>x.value.convert.tableOrder=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"?(n.openBlock(),n.createBlock(O,{key:13,label:"异步加载"},{default:n.withCtx(()=>[n.createVNode(A,{checked:x.value.convert.isAsync,"onUpdate:checked":m[28]||(m[28]=B=>x.value.convert.isAsync=B),checkedChildren:"是",unCheckedChildren:"否"},null,8,["checked"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dbtable"?(n.openBlock(),n.createBlock(O,{key:14,label:"分页加载"},{default:n.withCtx(()=>[n.createVNode(A,{checked:x.value.convert.isPaging,"onUpdate:checked":m[29]||(m[29]=B=>x.value.convert.isPaging=B),checkedChildren:"是",unCheckedChildren:"否"},null,8,["checked"])]),_:1})):n.createCommentVNode("",!0),x.value.convert.types=="dict"?(n.openBlock(),n.createBlock(O,{key:15,label:"字典名称"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.dictName,"onUpdate:value":m[30]||(m[30]=B=>x.value.convert.dictName=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["local","remote"].includes(x.value.convert.types)?(n.openBlock(),n.createBlock(O,{key:16,label:"接口地址",tooltip:"统一使用POST请求,json提交,标准结构:{body:{参数}}"},{default:n.withCtx(()=>[n.createVNode($,{value:x.value.convert.url,"onUpdate:value":m[31]||(m[31]=B=>x.value.convert.url=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),["local","remote"].includes(x.value.convert.types)?(n.openBlock(),n.createBlock(O,{key:17,label:"接口参数",tooltip:"标准json对象/数组,直接使用该参数进行接口请求,请求确保结构和接口匹配!"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ft.Codemirror),{modelValue:x.value.convert.params,"onUpdate:modelValue":m[32]||(m[32]=B=>x.value.convert.params=B),placeholder:"接口请求参数,eg:{sex:1}",style:{height:"250px"},autofocus:!0,"indent-with-tab":!0,tabSize:8,extensions:e.value,scrollbarStyle:null},null,8,["modelValue","extensions"])]),_:1})):n.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["visible","title","onOk"]),n.createVNode(z,{visible:v.value.visible,"onUpdate:visible":m[40]||(m[40]=B=>v.value.visible=B),width:600,title:"控件设置",onOk:v.value.toclose},{default:n.withCtx(()=>[n.createVNode(E,{model:v.value.props,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off",class:"form-mix"},{default:n.withCtx(()=>[n.createVNode(O,{label:"组件类型"},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(y,{value:v.value.widget.name,"onUpdate:value":m[34]||(m[34]=B=>v.value.widget.name=B),allowClear:!0,options:v.value.widgets},null,8,["value","options"]),[[s]])]),_:1}),n.createVNode(O,{label:"输入提示"},{default:n.withCtx(()=>[n.createVNode($,{value:v.value.widget.placeholder,"onUpdate:value":m[35]||(m[35]=B=>v.value.widget.placeholder=B)},null,8,["value"])]),_:1}),n.createVNode(O,{label:"帮助说明"},{default:n.withCtx(()=>[n.createVNode($,{value:v.value.widget.help,"onUpdate:value":m[36]||(m[36]=B=>v.value.widget.help=B)},null,8,["value"])]),_:1}),n.createVNode(O,{label:"提示文本"},{default:n.withCtx(()=>[n.createVNode($,{value:v.value.widget.tooltip,"onUpdate:value":m[37]||(m[37]=B=>v.value.widget.tooltip=B)},null,8,["value"])]),_:1}),["a-date-picker"].includes(v.value.widget.name)?(n.openBlock(),n.createBlock(O,{key:0,label:"显示格式"},{default:n.withCtx(()=>[n.createVNode($,{value:v.value.field.dataFormat,"onUpdate:value":m[38]||(m[38]=B=>v.value.field.dataFormat=B)},null,8,["value"])]),_:1})):n.createCommentVNode("",!0),v.value.widget.name=="unione-select-box"?(n.openBlock(),n.createBlock(O,{key:1,label:"下拉框类型"},{default:n.withCtx(()=>[n.createVNode(y,{value:v.value.widget.props.mode,"onUpdate:value":m[39]||(m[39]=B=>v.value.widget.props.mode=B),allowClear:!0},{default:n.withCtx(()=>[n.createVNode(D,{value:"multiple"},{default:n.withCtx(()=>m[60]||(m[60]=[n.createTextVNode("多选")])),_:1}),n.createVNode(D,{value:"tags"},{default:n.withCtx(()=>m[61]||(m[61]=[n.createTextVNode("标签")])),_:1})]),_:1},8,["value"])]),_:1})):n.createCommentVNode("",!0)]),_:1},8,["model"])]),_:1},8,["visible","onOk"]),n.createVNode(z,{visible:b.value.visible,"onUpdate:visible":m[49]||(m[49]=B=>b.value.visible=B),width:600,title:"规则设置",onOk:b.value.toSetting},{default:n.withCtx(()=>[n.createVNode(E,{model:b.value.props,name:"basic","label-col":{span:6},"wrapper-col":{span:18},autocomplete:"off",class:"form-mix"},{default:n.withCtx(()=>[n.createVNode(L,{title:"基本设置",type:"line"},{default:n.withCtx(()=>[n.createVNode(O,{label:"触发时机"},{default:n.withCtx(()=>[n.createVNode(K,{value:b.value.props.trigger,"onUpdate:value":m[41]||(m[41]=B=>b.value.props.trigger=B),options:["change","blur"]},null,8,["value"])]),_:1}),b.value.field.isNull?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(O,{key:0,label:"忽略空格",class:"checkbox-tips"},{default:n.withCtx(()=>[n.createVNode(w,{checked:b.value.props.whitespace,"onUpdate:checked":m[42]||(m[42]=B=>b.value.props.whitespace=B)},{default:n.withCtx(()=>m[62]||(m[62]=[n.createTextVNode(" 必填验证开启时,是否忽略空格 ")])),_:1},8,["checked"])]),_:1})),n.createVNode(O,{label:"预设类型"},{default:n.withCtx(()=>[n.createVNode(y,{options:b.value.advances,fieldNames:{label:"title",value:"name"},value:b.value.props.advance,"onUpdate:value":m[43]||(m[43]=B=>b.value.props.advance=B)},null,8,["options","value"])]),_:1})]),_:1}),["Long","Short","Integer","Float","Double"].includes(b.value.field.dataType)?(n.openBlock(),n.createBlock(L,{key:0,title:"数值验证",type:"line"},{default:n.withCtx(()=>[n.createVNode(O,{label:"有效区间"},{default:n.withCtx(()=>[n.createVNode(M,{value:b.value.props.rangeMin,"onUpdate:value":m[44]||(m[44]=B=>b.value.props.rangeMin=B)},null,8,["value"]),m[63]||(m[63]=n.createElementVNode("span",{style:{margin:"auto 5px"}},null,-1)),n.createVNode(M,{value:b.value.props.rangeMax,"onUpdate:value":m[45]||(m[45]=B=>b.value.props.rangeMax=B)},null,8,["value"])]),_:1}),n.createVNode(O,{label:"错误提示"},{default:n.withCtx(()=>[n.createVNode($,{value:b.value.props.rangeMessage,"onUpdate:value":m[46]||(m[46]=B=>b.value.props.rangeMessage=B)},null,8,["value"])]),_:1})]),_:1})):n.createCommentVNode("",!0),n.createVNode(L,{title:"正则验证",type:"line"},{default:n.withCtx(()=>[n.createVNode(O,{label:"表达式"},{default:n.withCtx(()=>[n.createVNode($,{value:b.value.props.regExpress,"onUpdate:value":m[47]||(m[47]=B=>b.value.props.regExpress=B)},null,8,["value"])]),_:1}),n.createVNode(O,{label:"错误提示"},{default:n.withCtx(()=>[n.createVNode($,{value:b.value.props.regMessage,"onUpdate:value":m[48]||(m[48]=B=>b.value.props.regMessage=B)},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["visible","onOk"])])}}}),[["__scopeId","data-v-d5938ab8"]]),Yh={class:"unione-props-setting data-field-fkey"},Xh={key:0},Jh=["onClick"],Zh=["onClick"],ef=["onClick"],tf=["onClick"],nf=["onClick"],sf=["onClick"],lf=["onClick"],of=["onClick"],af=Z(n.defineComponent({__name:"dataFieldFKeys",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=W.useDialog(),t=n.ref([{title:"序号",dataIndex:"index",key:"index",width:"35px",fixed:"left",align:"center",customRender:({index:u})=>u+1},{title:"字段名称",dataIndex:"name",key:"name",width:"100px",fixed:"left",align:"center"},{title:"字段标题",dataIndex:"title",key:"title",width:"100px",fixed:"left",align:"center"},{title:"关联数据名称",dataIndex:"dsnName",key:"dsnName",width:"120px",align:"center"},{title:"关联数据标题",dataIndex:"dsnTitle",key:"dsnTitle",width:"150px",align:"center"},{title:"关联字段",dataIndex:"fieldName",key:"fieldName",width:"100px",align:"center"},{title:"显示字段",dataIndex:"labelName",key:"labelName",width:"120px",align:"center"}]),i=n.useModel(o,"modelValue"),s=n.computed(()=>i.value.filter(u=>u.configs?.fkey?.enable)||[]),l=n.ref({});function a(){l.value={}}function r(u,p){a();const b={};b[p]=u.configs.fkey[p]||"",l.value[u.name]=b}function d(u,p,b){u.configs.fkey.dsn=p,u.configs.fkey.dsnName=b.name,u.configs.fkey.dsnTitle=b.title,u.configs.fkey.dsnId=b.id}function c(u,p,b,k){u.configs.fkey[p]=b,p=="fieldName"&&(u.configs.fkey.fieldTitle=k.title),p=="labelName"&&(u.configs.fkey.labelTitle=k.title)}function h(u){f.value.record=u,f.value.visible=!0,f.value.fields=u.configs?.fkey?.fields||[]}const f=n.ref({visible:!1,record:null,editField:{},fields:[],columns:[{title:"字段名称",dataIndex:"title",key:"title",width:"100px",align:"center"},{title:"显示宽度",dataIndex:"width",key:"width",width:"60px",align:"center"},{title:"显示顺序",dataIndex:"index",key:"index",width:"60px",align:"center"},{title:"操作",dataIndex:"action",key:"action",width:"60px",align:"center"}],toEditField:(u,p)=>{f.value.editField[u]=p},onShowFieldChange:(u,p,b)=>{u.name=b.name,u.title=b.title},toAddField:()=>{f.value.fields.push({name:"",title:""}),f.value.editField[f.value.fields.length-1]="title"},toDelField:u=>{e.confirm({content:"确定要删除该字段么?",onOk:()=>{f.value.fields.splice(u,1)}})},toSetting:()=>{f.value.visible=!1,f.value.record.configs=W.utils.obj.ext(f.value.record.configs,{fkey:{fields:f.value.fields}})}});return(u,p)=>{const b=n.resolveComponent("FormOutlined"),k=n.resolveComponent("unione-select-box"),v=n.resolveComponent("a-button"),C=n.resolveComponent("a-table"),x=n.resolveComponent("a-input-number"),V=n.resolveComponent("a-modal");return n.openBlock(),n.createElementBlock("div",Yh,[n.createVNode(C,{columns:t.value,"data-source":s.value,bordered:"","row-key":"name",size:"small",pagination:!1},{headerCell:n.withCtx(({column:g})=>[["dsnName","dsnTitle","fieldName","labelName"].includes(g.key)?(n.openBlock(),n.createElementBlock("span",Xh,[n.createVNode(b),n.createTextVNode(" "+n.toDisplayString(g.title),1)])):n.createCommentVNode("",!0)]),bodyCell:n.withCtx(({column:g,record:m})=>[["dsnName"].includes(g.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",(!l.value[m.name]||!Object.keys(l.value[m.name]).includes(g.dataIndex))&&!m.configs?.fkey?.dsnName&&"empty"]),onClick:S=>r(m,g.dataIndex)},[l.value[m.name]&&Object.keys(l.value[m.name]).includes(g.dataIndex)?(n.openBlock(),n.createBlock(k,{key:0,value:l.value[m.name][g.dataIndex],"onUpdate:value":S=>l.value[m.name][g.dataIndex]=S,convert:{types:"local",url:"/api/data/define/find",valueField:"sn",labelField:"name",search:!0},onBlur:a,onSelect:(S,_)=>d(m,S,_)},null,8,["value","onUpdate:value","onSelect"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(m.configs?.fkey?.dsnName),1)],64))],10,Jh)):["dsnTitle"].includes(g.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["edit-field",(!l.value[m.name]||!Object.keys(l.value[m.name]).includes(g.dataIndex))&&!m.configs?.fkey?.dsnTitle&&"empty"]),onClick:S=>r(m,g.dataIndex)},[l.value[m.name]&&Object.keys(l.value[m.name]).includes(g.dataIndex)?(n.openBlock(),n.createBlock(k,{key:0,value:l.value[m.name][g.dataIndex],"onUpdate:value":S=>l.value[m.name][g.dataIndex]=S,convert:{types:"local",url:"/api/data/define/find",valueField:"sn",labelField:"title",search:!0},onBlur:a,onSelect:(S,_)=>d(m,S,_)},null,8,["value","onUpdate:value","onSelect"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(m.configs?.fkey?.dsnTitle),1)],64))],10,Zh)):n.createCommentVNode("",!0),["fieldName"].includes(g.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["edit-field",(!l.value[m.name]||!Object.keys(l.value[m.name]).includes(g.dataIndex))&&!m.configs?.fkey?.fieldName&&"empty"]),onClick:S=>r(m,g.dataIndex)},[l.value[m.name]&&m.configs?.fkey?.dsn&&Object.keys(l.value[m.name]).includes(g.dataIndex)?(n.openBlock(),n.createBlock(k,{key:0,value:l.value[m.name][g.dataIndex],"onUpdate:value":S=>l.value[m.name][g.dataIndex]=S,convert:{types:"local",url:"/api/data/field/find",params:{body:{defineId:m.configs.fkey.dsnId},pageSize:1e3},valueField:"name",labelField:"title"},onBlur:a,onSelect:(S,_)=>c(m,"fieldName",S,_)},null,8,["value","onUpdate:value","convert","onSelect"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(m.configs?.fkey?.fieldTitle),1)],64))],10,ef)):["labelName"].includes(g.dataIndex)?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(["edit-field",(!l.value[m.name]||!Object.keys(l.value[m.name]).includes(g.dataIndex))&&!m.configs?.fkey?.labelName&&"empty"]),onClick:S=>r(m,g.dataIndex)},[l.value[m.name]&&m.configs?.fkey?.dsn&&Object.keys(l.value[m.name]).includes(g.dataIndex)?(n.openBlock(),n.createBlock(k,{key:0,value:l.value[m.name][g.dataIndex],"onUpdate:value":S=>l.value[m.name][g.dataIndex]=S,convert:{types:"local",url:"/api/data/field/find",params:{body:{defineId:m.configs.fkey.dsnId},pageSize:1e3},valueField:"name",labelField:"title"},onBlur:a,onSelect:(S,_)=>c(m,"labelName",S,_)},null,8,["value","onUpdate:value","convert","onSelect"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(m.configs?.fkey?.labelTitle)+" ",1),m.configs?.fkey?.labelName?(n.openBlock(),n.createBlock(v,{key:0,type:"link",onClick:n.withModifiers(S=>h(m),["stop"])},{default:n.withCtx(()=>p[4]||(p[4]=[n.createTextVNode("设置")])),_:2},1032,["onClick"])):n.createCommentVNode("",!0)],64))],10,tf)):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),n.createVNode(V,{visible:f.value.visible,"onUpdate:visible":p[3]||(p[3]=g=>f.value.visible=g),width:600,title:"更多显示字段",class:"data-field-fkey",onOk:f.value.toSetting},{default:n.withCtx(()=>[n.createVNode(v,{class:"editable-add-btn",style:{"margin-bottom":"8px"},onClick:f.value.toAddField},{default:n.withCtx(()=>p[5]||(p[5]=[n.createTextVNode("新增")])),_:1},8,["onClick"]),n.createVNode(C,{columns:f.value.columns,"data-source":f.value.fields,size:"small"},{bodyCell:n.withCtx(({column:g,record:m,index:S,text:_})=>[g.dataIndex==="title"?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["edit-field",f.value.editField!="title"&&!_&&"empty"]),onClick:y=>f.value.toEditField(S,g.dataIndex)},[f.value.editField[S]=="title"?(n.openBlock(),n.createBlock(k,{key:0,value:m[m.dataIndex],"onUpdate:value":y=>m[m.dataIndex]=y,convert:{types:"local",url:"/api/data/field/find",search:!0,params:{body:{defineId:f.value.record.configs.fkey.dsnId},pageSize:1e3},valueField:"name",labelField:"title"},onBlur:p[0]||(p[0]=y=>f.value.editField={}),onSelect:(y,w)=>f.value.onShowFieldChange(m,y,w)},null,8,["value","onUpdate:value","convert","onSelect"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(_),1)],64))],10,nf)):n.createCommentVNode("",!0),g.dataIndex==="width"?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["edit-field",f.value.editField!="width"&&!_&&"empty"]),onClick:y=>f.value.toEditField(S,g.dataIndex)},[f.value.editField[S]=="width"?(n.openBlock(),n.createBlock(x,{key:0,onBlur:p[1]||(p[1]=y=>f.value.editField={}),value:m.width,"onUpdate:value":y=>m.width=y,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(_),1)],64))],10,sf)):n.createCommentVNode("",!0),g.dataIndex==="index"?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["edit-field",f.value.editField!="wiindexdth"&&!_&&"empty"]),onClick:y=>f.value.toEditField(S,g.dataIndex)},[f.value.editField[S]=="index"?(n.openBlock(),n.createBlock(x,{key:0,onBlur:p[2]||(p[2]=y=>f.value.editField={}),value:m.index,"onUpdate:value":y=>m.index=y,style:{margin:"-5px 0"}},null,8,["value","onUpdate:value"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(_),1)],64))],10,lf)):n.createCommentVNode("",!0),g.dataIndex==="action"?(n.openBlock(),n.createElementBlock("a",{key:3,onClick:y=>f.value.toDelField(S)},"删除",8,of)):n.createCommentVNode("",!0)]),_:1},8,["columns","data-source"])]),_:1},8,["visible","onOk"])])}}}),[["__scopeId","data-v-84143692"]]),rf={class:"unione-props-setting data-filter"},df={class:"title"},cf={class:"name"},hf={class:"action"},ff=Z(n.defineComponent({__name:"dataFilters",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=W.useDialog(),t=n.useModel(o,"modelValue");function i(){r.value.visible=!0,r.value.filter={},r.value.name=null}function s(c){r.value.visible=!0,r.value.filter={...c},r.value.name=c.name}function l(c){e.confirm({content:"确定要删除该过滤对象么?",onOk:()=>{t.value.splice(c,1)}})}const a=n.ref(),r=n.ref({visible:!1,name:null,filter:{},rules:{title:[{required:!0,message:"过滤标题不能为空"}],name:[{required:!0,message:"过滤名称不能为空"}],filter:[{required:!0,message:"过滤脚本不能为空"}]},toSetting:()=>{a.value.validate().then(c=>{if(r.value.name){const h=t.value.filter(f=>f.name==r.value.name)[0];if(!h){e.error({content:"过滤记录未找到"});return}if(r.value.name!=r.value.filter.name&&t.value.filter(u=>u.name==r.value.filter.name).length){e.error({content:"过滤名称已存在!"});return}Object.keys(c).forEach(f=>{h[f]=c[f]})}else{if(t.value.filter(f=>f.name==r.value.filter.name).length){e.error({content:"过滤名称已存在!"});return}t.value.push(c)}r.value.visible=!1})}});function d(){const c=[];r.value.filter.filter||(r.value.filter.filter=""),c.push("-- @if(isNotEmpty(params."),c.push(r.value.filter.name||"xxx"),c.push(") && !isBlank(params."),c.push(r.value.filter.name||"xxx"),c.push(`)
|
|
11
|
+
`),c.push(" AND XXX=#{params."),c.push(r.value.filter.name||"xxx"),c.push(`}
|
|
12
|
+
`),c.push(`-- @}
|
|
13
|
+
`),r.value.filter.filter=r.value.filter.filter+c.join("")}return(c,h)=>{const f=n.resolveComponent("a-button"),u=n.resolveComponent("a-card"),p=n.resolveComponent("PlusOutlined"),b=n.resolveComponent("a-empty"),k=n.resolveComponent("a-input"),v=n.resolveComponent("a-form-item"),C=n.resolveComponent("a-textarea"),x=n.resolveComponent("a-tag"),V=n.resolveComponent("a-form"),g=n.resolveComponent("a-modal");return n.openBlock(),n.createElementBlock("div",rf,[(t.value.length,n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.value,(m,S)=>(n.openBlock(),n.createBlock(u,{class:"filter-box",size:"small",key:S},{default:n.withCtx(()=>[n.createElementVNode("div",df,"过滤标题:"+n.toDisplayString(m.title),1),n.createElementVNode("div",cf,"过滤名称:"+n.toDisplayString(m.name),1),n.createElementVNode("div",hf,[n.createVNode(f,{size:"small",onClick:_=>s(m)},{default:n.withCtx(()=>h[4]||(h[4]=[n.createTextVNode("编辑")])),_:2},1032,["onClick"]),n.createVNode(f,{danger:"",size:"small",onClick:_=>l(S)},{default:n.withCtx(()=>h[5]||(h[5]=[n.createTextVNode("删除")])),_:2},1032,["onClick"])])]),_:2},1024))),128)),n.createVNode(u,{class:"filter-box btn-add",size:"small",onClick:i},{default:n.withCtx(()=>[n.createVNode(p,{class:"btn"})]),_:1})],64)),n.createVNode(g,{visible:r.value.visible,"onUpdate:visible":h[3]||(h[3]=m=>r.value.visible=m),width:600,title:"设置数据过滤",class:"data-filter",onOk:r.value.toSetting},{default:n.withCtx(()=>[n.createVNode(V,{ref_key:"filterForm",ref:a,model:r.value.filter,rules:r.value.rules,name:"basic","label-col":{span:4},"wrapper-col":{span:18},class:"form-mix"},{default:n.withCtx(()=>[n.createVNode(v,{label:"过滤标题",name:"title"},{default:n.withCtx(()=>[n.createVNode(k,{value:r.value.filter.title,"onUpdate:value":h[0]||(h[0]=m=>r.value.filter.title=m)},null,8,["value"])]),_:1}),n.createVNode(v,{label:"过滤名称",name:"name"},{default:n.withCtx(()=>[n.createVNode(k,{value:r.value.filter.name,"onUpdate:value":h[1]||(h[1]=m=>r.value.filter.name=m)},null,8,["value"])]),_:1}),n.createVNode(v,{label:"过滤脚本",name:"filter",tooltip:"使用beetsql语法,参数获取方式params.xxx,判断参数是否为空isNotEmpty(params.xxx) && !isBlank(params.xxx)"},{default:n.withCtx(()=>[n.createVNode(C,{value:r.value.filter.filter,"onUpdate:value":h[2]||(h[2]=m=>r.value.filter.filter=m),autosize:{minRows:10},style:{"padding-top":"20px"}},null,8,["value"]),n.createVNode(x,{class:"btn-tmpl",color:"blue",onClick:d},{default:n.withCtx(()=>h[6]||(h[6]=[n.createTextVNode("插入模版")])),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["visible","onOk"])])}}}),[["__scopeId","data-v-a600b93f"]]),uf={class:"unione-page form-page data-define-edit"},pf={class:"actions"},mf=Z(n.defineComponent({__name:"edit",setup(o){const e=W.useDialog(),t=n.inject("route"),i=n.inject("router"),s=n.ref(),l=n.ref({isPrimary:!1,fields:[{title:"数据类型",name:"category",control:"unione-select-box",value:"sql",convert:{types:"dict",dictName:"DATACATEGORY"}},{title:"数据源",name:"dsId",control:"unione-select-box",convert:{types:"local",url:"/api/data/source/find",search:!0},props:{required:!0}},{title:"自定义",name:"isCustom",control:"unione-switch-box",value:0,convert:{types:"dict",dictName:"TUREORFALSE"}},{title:"数据标题",name:"title",dataLen:10,props:{required:!0}},{title:"数据名称",name:"name",props:{required:!0},rules:{whitespace:!0}},{title:"数据编码",name:"sn",dataLen:50},{title:"描述",name:"descs",control:"a-textarea",view:{width:3}}],setting:{showColumn:2,labelWidth:6}}),a=n.ref(),r=n.ref({isPrimary:!1,fields:[{title:"列表模版",name:"listTmpl",control:"unione-select-box",value:"normal",convert:{types:"option",options:[{value:"normal",label:"标准"}]},props:{required:!0}},{title:"表单风格",name:"showColumn",control:"unione-select-box",value:2,convert:{types:"option",options:[{value:1,label:"一列"},{value:2,label:"二列"},{value:3,label:"三列"}]},props:{required:!0}},{title:"标题宽度",name:"labelWidth",control:"a-input-number",value:9,rule:{rangeMin:1,rangeMax:24},props:{required:!0}}],setting:{showColumn:2,labelWidth:6}}),d=n.ref({configs:{fields:[],filters:[]}}),c=n.ref(!1);function h(){i.back()}function f(){e.confirm({content:"确定要发布当前数据么?",onOk:()=>{ct.release([d.value.id]).then(k=>{k.success?(e.success({title:"发布成功",content:k.body}),b(d.value.id)):e.error({title:"发布失败",content:k.body})})}})}async function u(){const k=await s.value.validate(),v={...d.value,...k};v.configs.show=await a.value.getValue(),console.log("formData",v),G.message.loading({content:"提交中..."}),c.value=!0,ct.save(v).then(C=>{G.message.destroy(),C.success?(d.value=C.body,s.value.setValue(C.body),a.value.setValue(C.body.configs?.show||{}),G.message.success("保存成功!")):G.message.error(C.message)}).finally(()=>{c.value=!1})}const p=n.ref(!1);n.onMounted(()=>{t.query.id&&b(t.query.id)});function b(k){G.message.loading({content:"加载中..."}),ct.detail(k).then(v=>{v.success?(d.value=v.body,s.value.setValue(v.body),a.value.setValue(v.body.configs?.show||{}),G.message.destroy()):G.message.error(v.message)})}return(k,v)=>{const C=n.resolveComponent("unione-form"),x=n.resolveComponent("unione-section"),V=n.resolveComponent("OrderedListOutlined"),g=n.resolveComponent("a-tab-pane"),m=n.resolveComponent("ToolOutlined"),S=n.resolveComponent("ApiOutlined"),_=n.resolveComponent("FunnelPlotOutlined"),y=n.resolveComponent("a-tabs"),w=n.resolveComponent("a-button");return n.openBlock(),n.createElementBlock("div",uf,[n.createVNode(x,{title:"基础信息",type:"line"},{default:n.withCtx(()=>[n.createVNode(C,{form:l.value,ref_key:"formBaseObj",ref:s},null,8,["form"])]),_:1}),n.createVNode(x,{class:"page-setting-section",title:"页面配置",type:p.value&&"line",location:p.value?"left":"right",reactive:"",modelValue:p.value,"onUpdate:modelValue":v[0]||(v[0]=N=>p.value=N)},{default:n.withCtx(()=>[n.createVNode(C,{form:r.value,ref_key:"pageSettingObj",ref:a},null,8,["form"])]),_:1},8,["type","location","modelValue"]),n.createVNode(y,null,{default:n.withCtx(()=>[n.createVNode(g,{key:"field-mange"},{tab:n.withCtx(()=>[n.createVNode(V),v[5]||(v[5]=n.createTextVNode("字段管理 "))]),default:n.withCtx(()=>[n.createVNode(ad,{modelValue:d.value.configs.fields,"onUpdate:modelValue":v[1]||(v[1]=N=>d.value.configs.fields=N)},null,8,["modelValue"])]),_:1}),n.createVNode(g,{key:"field-setting"},{tab:n.withCtx(()=>[n.createVNode(m),v[6]||(v[6]=n.createTextVNode("字段设置 "))]),default:n.withCtx(()=>[n.createVNode(Gh,{modelValue:d.value.configs.fields,"onUpdate:modelValue":v[2]||(v[2]=N=>d.value.configs.fields=N)},null,8,["modelValue"])]),_:1}),n.createVNode(g,{key:"field-fkeys"},{tab:n.withCtx(()=>[n.createVNode(S),v[7]||(v[7]=n.createTextVNode("外键设置 "))]),default:n.withCtx(()=>[n.createVNode(af,{modelValue:d.value.configs.fields,"onUpdate:modelValue":v[3]||(v[3]=N=>d.value.configs.fields=N)},null,8,["modelValue"])]),_:1}),n.createVNode(g,{key:"data-filter"},{tab:n.withCtx(()=>[n.createVNode(_),v[8]||(v[8]=n.createTextVNode("数据过滤 "))]),default:n.withCtx(()=>[n.createVNode(ff,{modelValue:d.value.configs.filters,"onUpdate:modelValue":v[4]||(v[4]=N=>d.value.configs.filters=N)},null,8,["modelValue"])]),_:1})]),_:1}),n.createElementVNode("div",pf,[n.createVNode(w,{type:"primary",onClick:u,loading:c.value},{default:n.withCtx(()=>v[9]||(v[9]=[n.createTextVNode("保存")])),_:1},8,["loading"]),d.value.id?(n.openBlock(),n.createBlock(w,{key:0,danger:"",onClick:f,loading:c.value},{default:n.withCtx(()=>v[10]||(v[10]=[n.createTextVNode("发布")])),_:1},8,["loading"])):n.createCommentVNode("",!0),n.createVNode(w,{onClick:h},{default:n.withCtx(()=>v[11]||(v[11]=[n.createTextVNode("返回")])),_:1})])])}}}),[["__scopeId","data-v-3eeab6e6"]]),gf={UnioneEditor:Rt,locales:Zi,loadConfig:Me,install(o,e){const t=Me(e);t.axios&&W.axios.create(t.axios),o.component("UnioneBtn",ka),o.component("UnioneTabs",wa),o.component("UnioneSection",Na),o.component("UnioneQuery",ys),o.component("UnioneTable",xs),o.component("UnioneFormItem",za),o.component("UnioneForm",Ra),o.component("UnioneSelectBox",Ua),o.component("UnioneSwitchBox",Wa),o.component("UnioneRadioBox",Ha),o.component("UnioneCheckBox",Ka),o.component("UnionePageEditor",vs),o.component("UnionePageForm",Cs),o.component("UnionePageList",Ss)}};ie.UnioneDataDefineEdit=mf,ie.UnioneDataDefineList=Zr,ie.UnioneEditor=Rt,ie.UnionePage=ri,ie.UnionePageEditor=vs,ie.UnionePageForm=Cs,ie.UnionePageList=Ss,ie.UnionePageSetting=di,ie.UnioneQueryForm=ys,ie.UnioneTableList=xs,ie.default=gf,ie.loadConfig=Me,ie.locales=Zi,ie.utils=ur,Object.defineProperties(ie,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|